MrShi
2 天以前 6577a7ad7f2044bcfe75601e0360e9172a7d2380
mini-program/components/login/login.vue
@@ -2,13 +2,15 @@
   <u-popup :show="show" round="15" :safeAreaInsetBottom="false" :closeable="true" mode="bottom" @close="show = false">
      <view class="login">
         <image src="/static/images/logo@2x.png" mode="widthFix"></image>
         <view class="login-info">
            <image src="/static/icon/ic_agree@2x.png" mode="widthFix"></image>
         <view class="login-info" @click="isAuth = !isAuth">
            <image src="/static/icon/ic_agree@2x.png" mode="widthFix" v-if="!isAuth"></image>
            <image src="/static/icon/cart_ic_sel@2x.png" mode="widthFix" v-else></image>
            <view class="login-info-text">
               我已阅读并同意<text @click="jumpService(4)">《鼎元科技用户服务协议》</text>及<text @click="jumpService(5)">《鼎元科技用户隐私政策》</text>
               我已阅读并同意<text @click.stop="jumpService(4)">《鼎元科技用户服务协议》</text>及<text @click.stop="jumpService(5)">《鼎元科技用户隐私政策》</text>
            </view>
         </view>
         <button class="login-btn" open-type="getPhoneNumber" @getphonenumber="getphonenumber">手机号快捷登录</button>
         <button class="login-btn" @click="tishi" v-if="!isAuth">手机号快捷登录</button>
         <button class="login-btn" open-type="getPhoneNumber" @getphonenumber="getphonenumber" v-else>手机号快捷登录</button>
      </view>
   </u-popup>
</template>
@@ -19,13 +21,20 @@
      name: "login",
      data() {
         return {
            show: false
            show: false,
            isAuth: false,
         };
      },
      computed: {
         ...mapState(['openid', 'recshopid', 'recuserid'])
      },
      methods: {
         tishi() {
            uni.showToast({
               title: '请先勾选同意协议',
               icon: 'none'
            })
         },
         jumpService(flag) {
            uni.navigateTo({
               url: '/pagesA/pages/rich-text-page/rich-text-page?flag='+flag
@@ -50,6 +59,7 @@
                     this.$store.commit('setToken', res.data.token)
                      this.$store.commit('setRecShopId','')
                      this.$store.commit('setRecUserId','')
                     this.close()
                  }
               })
            }