Просмотр исходного кода

Merge branch '安卓审核' of xiongzhu/raex_front into master

panhui 4 лет назад
Родитель
Сommit
c67cdebb41
3 измененных файлов с 31 добавлено и 1 удалено
  1. 11 0
      src/views/account/About.vue
  2. 8 1
      src/views/account/Agreement.vue
  3. 12 0
      src/views/account/Security.vue

+ 11 - 0
src/views/account/About.vue

@@ -4,6 +4,17 @@
         <van-cell-group :border="false">
             <van-cell title="平台简介" is-link :to="{ path: '/introduction' }" />
             <van-cell title="了解更多" is-link :to="{ path: '/question' }" />
+            <van-cell
+                title="用户协议"
+                is-link
+                :to="{
+                    path: '/agreement',
+                    query: {
+                        page: 'service'
+                    }
+                }"
+            />
+            <van-cell title="隐私政策" is-link :to="{ path: '/agreement' }" />
             <van-cell title="联系客服" @click="show = true" is-link />
         </van-cell-group>
 

+ 8 - 1
src/views/account/Agreement.vue

@@ -15,10 +15,13 @@ export default {
         };
     },
     mounted() {
+        let day = this.dayjs().format('YYYY-MM-DD');
         let page = this.$route.query.page || 'privacy';
         this.$http.get(`/${page}.html`).then(res => {
             let contents = res.split('<body>')[1].split('</body>');
-            this.detail = contents[0].replace(/绿洲/g, 'RAEX');
+            let detail = contents[0].replace(/绿洲/g, 'RAEX');
+            detail = detail.replace(/<\/h1>/, `</h1><h3>生效时间:【${day}】</h3><h3>更新时间:【${day}】</h3>`);
+            this.detail = detail;
         });
     },
     methods: {}
@@ -54,5 +57,9 @@ export default {
         font-size: @font2;
         margin: 20px 0 0;
     }
+    h3 {
+        font-size: @font2;
+        margin: 0;
+    }
 }
 </style>

+ 12 - 0
src/views/account/Security.vue

@@ -5,6 +5,7 @@
             <van-cell title="修改登录密码" :to="{ path: '/forget' }" is-link />
             <van-cell title="修改支付密码" :to="{ path: '/tradingPassword' }" is-link />
             <van-cell title="修改手机号" :to="{ path: '/changePhone' }" is-link />
+            <van-cell title="注销账号" @click="cancel" is-link />
         </van-cell-group>
         <div class="logout">
             <van-button type="primary" @click="logout" plain block round>退出登录</van-button>
@@ -25,6 +26,17 @@ export default {
                     localStorage.removeItem('nineToken');
                     this.$router.go(-1);
                 });
+        },
+        cancel() {
+            this.$dialog
+                .confirm({
+                    title: '提示',
+                    message:
+                        '亲爱的用户,你确定要注销该账号吗?如果你选择继续注销你APP的所有的订单以及内容将会全部清除,请您谨慎操作,如果你确定注销,我们会在15个工作日以内将您的账号注销?'
+                })
+                .then(() => {
+                    this.$router.go(-1);
+                });
         }
     }
 };