MrShi
14 小时以前 ac33a3140ef8ef20dfd2537fce2dfdd0f374f30e
mini-program/pages/agreement-description/agreement-description.vue
@@ -1,10 +1,10 @@
<template>
   <view class="box">
      <view class="item">
      <view class="item" @click="jumpService(4)">
         <text>《用户服务协议》</text>
         <image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image>
      </view>
      <view class="item">
      <view class="item" @click="jumpService(5)">
         <text>《用户隐私协议》</text>
         <image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image>
      </view>
@@ -23,7 +23,7 @@
            </view>
            <view class="tc-btn">
               <view class="tc-btn-item" @click="show = false">我再想想</view>
               <view class="tc-btn-item" style="color: #E4001D;">确认注销</view>
               <view class="tc-btn-item" style="color: #E4001D;" @click="loginOut()">确认注销</view>
            </view>
         </view>
      </u-popup>
@@ -36,6 +36,28 @@
         return {
            show: false
         };
      },
      methods: {
         jumpService(flag) {
            uni.navigateTo({
               url: '/pagesA/pages/rich-text-page/rich-text-page?flag='+flag
            })
         },
         loginOut() {
            this.$u.api.logOff()
               .then(res => {
                  if (res.code == 200) {
                     uni.showToast({
                        title:'账号注销成功',
                        icon:'success'
                     })
                     this.$store.commit('clear')
                     uni.switchTab({
                        url: '/pages/index/index'
                     })
                  }
               })
         }
      }
   }
</script>