From 87a56274d598af9842b593ec972f517161f60707 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期日, 19 一月 2025 18:44:27 +0800
Subject: [PATCH] 1.v6-屏蔽微信登录
---
pages/login/supplier-reg.vue | 121 ++++++++++++++++++++++++++++++----------
1 files changed, 90 insertions(+), 31 deletions(-)
diff --git a/pages/login/supplier-reg.vue b/pages/login/supplier-reg.vue
index 19649a0..00fb6f6 100644
--- a/pages/login/supplier-reg.vue
+++ b/pages/login/supplier-reg.vue
@@ -1,21 +1,20 @@
<template>
<view>
- <view v-if="source==='step'" style="padding: 20rpx 0rpx;color: red;;background-color: #e6e6e6;">
- <!-- #ifdef PUB_PARTNER -->
- <view style="padding: 20rpx;text-align: center;background-color: #fff;">仅限花满芫合伙人入驻</view>
- <!-- #endif -->e
-
- <view v-if="source==='step'" class="" style="background-color:#ffffff;padding: 20rpx;padding-top: 60rpx;">
- <u-steps current="1">
- <u-steps-item title="信息填写" class="u-steps-item">
- </u-steps-item>
- <u-steps-item title="提交申请" class="u-steps-item"></u-steps-item>
- </u-steps>
- </view>
- </view>
-
<view class="main-container login-container img100 relative" style="margin-top: 0rpx;">
+ <view v-if="source==='step'" style="padding: 20rpx 0rpx;color: red;;background-color: #e6e6e6;">
+ <!-- #ifdef PUB_PARTNER -->
+ <view style="padding: 20rpx;text-align: center;background-color: #fff;padding-top: 60rpx;">仅限花满芫合伙人入驻</view>
+ <!-- #endif -->
+
+ <view v-if="source==='step'" class="" style="background-color:#ffffff;padding: 20rpx;padding-top: 60rpx;">
+ <u-steps current="1">
+ <u-steps-item title="信息填写" class="u-steps-item">
+ </u-steps-item>
+ <u-steps-item title="提交申请" class="u-steps-item"></u-steps-item>
+ </u-steps>
+ </view>
+ </view>
<image class="component-bg"
src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png"
mode="scaleToFill" />
@@ -46,7 +45,7 @@
</view>
<!-- #endif -->
<view class="t-a form-input" v-if="loginType=='code'">
- <u-input placeholder="请输入手机号" :border="false" v-model="phoneNumber">
+ <u-input placeholder="请输入手机号" :border="false" v-model="phoneNumber" @blur="validatePhoneNumber()">
<template slot="suffix">
<view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
{{ getCodeText }}
@@ -63,6 +62,45 @@
<u-input :password="true" :border="false" placeholder="请输入密码" v-model="password"></u-input>
</view>
+
+ <view class="flex flex-wrap-normal"
+ v-if="true">
+ <view :style="{'margin-top': '40rpx','margin-right': '12rpx','font-size':'24rpx'}"
+ @click="protocal=!protocal" class="component-radio" :class="[protocal?'cur':'']">
+
+ </view>
+ <!-- /pages/help/content?id=新手帮助 -->
+ <!-- 用户协议,隐私政策、卖家入驻协议、合伙人入驻协议 -->
+
+ <!-- #ifdef PUB_PARTNER -->
+ <view class="topic-gray">
+ 请仔细阅读<span class="t-red"
+ @click="goto('/pages/help/content?id=用户协议',false)">《用户协议》</span>、
+ <span class="t-red" @click="goto('/pages/help/content?id=隐私政策',false)">《隐私政策》</span>
+ 、<span class="t-red" @click="goto('/pages/help/content?id=合伙人入驻协议',false)">《合伙人入驻协议》</span>
+ 如您同意该指引,请勾选开始使用本小程序
+ </view>
+ <!-- #endif -->
+ <!-- #ifdef PUB_SUPPLIER -->
+ <view class="topic-gray">
+ 请仔细阅读<span class="t-red"
+ @click="goto('/pages/help/content?id=用户协议',false)">《用户协议》</span>、
+ <span class="t-red" @click="goto('/pages/help/content?id=隐私政策',false)">《隐私政策》</span>
+ 、<span class="t-red" @click="goto('/pages/help/content?id=卖家入驻协议',false)">《卖家入驻协议》</span>
+ 如您同意该指引,请勾选开始使用本小程序
+ </view>
+ <!-- #endif -->
+ <!-- #ifdef PUB_CUSTOMER -->
+ <view class="topic-gray">
+ 请仔细阅读<span class="t-red"
+ @click="goto('/pages/help/content?id=用户协议',false)">《用户协议》</span>和 <span class="t-red"
+ @click="goto('/pages/help/content?id=隐私政策',false)">《隐私政策》</span>
+ 如您同意该指引,请勾选开始使用本小程序
+ </view>
+ <!-- #endif -->
+
+ </view>
+
<!-- #ifndef PUB_CUSTOMER -->
<button @tap="reg('')" class="bottom-button">注 册</button>
@@ -83,16 +121,6 @@
</view> -->
<!-- #endif -->
<view class="topic-font m-l-a m-r-0" @click="toLogin">前往登录</view>
-
- </view>
- <view class="flex flex-wrap-normal"
- style="position: fixed;bottom: 40rpx;left: 40rpx;right: 40rpx;" v-if="false">
- <view :style="{'margin-top': '8rpx','margin-right': '12rpx','font-size':'24rpx'}"
- @click="protocal=!protocal" class="component-radio" :class="[protocal?'cur':'']">
-
- </view>
- <view class="topic-gray" @click="toProtocol">请仔细阅读《花满芫合伙人供应商入口小程序隐私保护指引》如您同意该指引,请勾选开始使用本小程序
- </view>
</view>
</form>
</view>
@@ -154,11 +182,22 @@
if (options.partnerUserName) {
this.partnerName = options.partnerUserName || '佚名'
}
+ //扫码过来的,自然要清除分享商品的id
+ this.$storage.removeItem('cache_sharePartnerUserId')
}
// #endif
},
methods: {
+ // 手机号码正则表达式校验
+ validatePhoneNumber() {
+ // 手机号码正则表达式,可以根据需要调整
+ const phoneRegex = /^[1][3-9][0-9]{9}$/;
+ if (!phoneRegex.test(this.phoneNumber)) {
+ this.$message.showToast('请填写正确手机号码')
+ }
+ },
+
async scanPartnerCode() {
// await this.$message.confirm('确定要绑定合伙人吗?')
//扫二维码确认
@@ -167,7 +206,7 @@
success: async function(res) {
console.log('条码内容:' + res.result);
if (!res.result) {
- that.$message.showToast('未识别出信息,如果是微信小程序二维码,请微信扫码打开')
+ that.$message.showToast('未识别出合伙人信息,请用微信扫码打开')
return
}
var dto = undefined
@@ -286,7 +325,7 @@
}, 1000)
},
toLogin() {
- uni.redirectTo({
+ uni.reLaunch({
url: '/pages/login/supplier-login'
})
@@ -307,6 +346,10 @@
// })
// },
wxreg(e) {
+ if (!this.protocal) {
+ this.$message.showToast('请同意协议')
+ return;
+ }
let tmp = this
wx.login({
success: async res => {
@@ -363,10 +406,10 @@
return
}
// #endif
- // if (this.pcfvalue == undefined) {
- // util.showMyToast('必须勾选《用户服务协议》及《隐私政策》');
- // return;
- // }
+ if (!this.protocal) {
+ this.$message.showToast('请同意协议')
+ return;
+ }
let post = {
tel: this.phoneNumber,
smsCode: this.smsCode,
@@ -395,6 +438,20 @@
// #ifdef PUB_CUSTOMER
var dto = {}
dto.partnerUserId = this.partnerId || undefined
+ //如果没有绑定,有商品详情的分享合伙人id的话缓存的话,尝试用这个
+ if (!dto.partnerUserId) {
+ try {
+ var sharePartnerUserId = this.$storage.getItem('cache_sharePartnerUserId')
+ if (sharePartnerUserId) {
+ //试图绑定
+ this.$storage.removeItem('cache_sharePartnerUserId')
+ dto.partnerUserId = sharePartnerUserId
+ }
+ } catch (e) {
+ console.error('reg bind ', e)
+ }
+ }
+
dto.name = this.regCustomerName || ''
post.dto = dto
// #endif
@@ -406,7 +463,9 @@
// const {
// code
// } = await this.$http.request('get', '/api/login/admin')
+ this.$message.showLoading()
const resp = await this.$store.dispatch('regUser', post);
+ this.$message.hideLoading()
// uni.hideLoading()
if (resp.code === 0) {
--
Gitblit v1.9.3