xuxueyang
2024-08-14 e474ab6cee45627c34a8fc79f2b76c9e82763f2c
pages/login/supplier-reg.vue
@@ -86,13 +86,33 @@
                  </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
@@ -286,7 +308,7 @@
            }, 1000)
         },
         toLogin() {
            uni.redirectTo({
            uni.reLaunch({
               url: '/pages/login/supplier-login'
            })
@@ -307,6 +329,10 @@
         //   })
         // },
         wxreg(e) {
            if (!this.protocal) {
               this.$message.showToast('请同意协议')
               return;
            }
            let tmp = this
            wx.login({
               success: async res => {
@@ -363,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,
@@ -395,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