From e474ab6cee45627c34a8fc79f2b76c9e82763f2c Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期三, 14 八月 2024 17:44:40 +0800
Subject: [PATCH] update 供应商结算单
---
pages/login/supplier-reg.vue | 62 ++++++++++++++++++++++++++----
1 files changed, 53 insertions(+), 9 deletions(-)
diff --git a/pages/login/supplier-reg.vue b/pages/login/supplier-reg.vue
index 135ff49..7af59c7 100644
--- a/pages/login/supplier-reg.vue
+++ b/pages/login/supplier-reg.vue
@@ -79,20 +79,40 @@
</view>
<!-- #ifdef PUB_CUSTOMER -->
<!-- v-if="source==='step'" -->
- <view class="topic-font m-l-0 m-r-a" @click="scanPartnerCode">扫码绑定合伙人
- </view>
+ <!-- <view class="topic-font m-l-0 m-r-a" @click="scanPartnerCode">扫码绑定合伙人
+ </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">
+ style="position: fixed;bottom: 40rpx;left: 40rpx;right: 40rpx;" v-if="true">
<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">请仔细阅读《花满芫合伙人供应商入口小程序隐私保护指引》如您同意该指引,请勾选开始使用本小程序
+ <!-- /pages/help/content?id=新手帮助 -->
+ <!-- 用户协议,隐私政策、卖家入驻协议、合伙人入驻协议 -->
+
+ <!-- #ifdef PUB_PARTNER -->
+ <view class="topic-gray" @click="goto('/pages/help/content?id=合伙人入驻协议',false)">
+ 请仔细阅读《合伙人入驻协议》如您同意该指引,请勾选开始使用本小程序
</view>
+ <!-- #endif -->
+ <!-- #ifdef PUB_SUPPLIER -->
+ <view class="topic-gray" @click="goto('/pages/help/content?id=卖家入驻协议',false)">
+ 请仔细阅读《卖家入驻协议》如您同意该指引,请勾选开始使用本小程序
+ </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>
</form>
</view>
@@ -154,6 +174,8 @@
if (options.partnerUserName) {
this.partnerName = options.partnerUserName || '佚名'
}
+ //扫码过来的,自然要清除分享商品的id
+ this.$storage.removeItem('cache_sharePartnerUserId')
}
// #endif
@@ -166,6 +188,10 @@
uni.scanCode({
success: async function(res) {
console.log('条码内容:' + res.result);
+ if (!res.result) {
+ that.$message.showToast('未识别出信息,如果是微信小程序二维码,请微信扫码打开')
+ return
+ }
var dto = undefined
try {
if (res.result && (res.result.startsWith('http://') || res.result.startsWith(
@@ -282,7 +308,7 @@
}, 1000)
},
toLogin() {
- uni.redirectTo({
+ uni.reLaunch({
url: '/pages/login/supplier-login'
})
@@ -303,6 +329,10 @@
// })
// },
wxreg(e) {
+ if (!this.protocal) {
+ this.$message.showToast('请同意协议')
+ return;
+ }
let tmp = this
wx.login({
success: async res => {
@@ -359,10 +389,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,
@@ -391,6 +421,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
--
Gitblit v1.9.3