Ver Fonte

存储协议、月服务费、日产改月产

xiaomei há 6 meses atrás
pai
commit
fba6fed1cd

+ 6 - 2
src/language/en.json

@@ -396,7 +396,7 @@
   "lang395": "Purchase price:",
   "lang396": "To be paid",
   "lang397": "Price:",
-  "lang398": "Service fee:",
+  "lang398": "Monthly service fee:",
   "lang399": "Payment countdown:",
   "lang400": "Payment",
   "lang401": "Are you sure you want to cancel the order?",
@@ -475,5 +475,9 @@
   "lang474": "Confirm cancellation",
   "lang475": "Expired",
   "lang476": "Are you sure to renew?",
-  "lang477": "Wallet Balance"
+  "lang477": "Wallet Balance",
+  "lang478": "The highest monthly output of this tea mining pool",
+  "lang479": "Please read and check the 《Storage Agreement》",
+  "lang480": "Please read and check",
+  "lang481": "Storage Agreement"
 }

+ 5 - 5
src/language/zh.json

@@ -396,7 +396,7 @@
   "lang395": "求购价格:",
   "lang396": "待支付",
   "lang397": "价格:",
-  "lang398": "服务费:",
+  "lang398": "服务费:",
   "lang399": "支付倒计时:",
   "lang400": "支付",
   "lang401": "是否确定取消订单?",
@@ -476,10 +476,10 @@
   "lang475": "已到期",
   "lang476": "是否确定续费?",
   "lang477": "钱包余额",
-  "lang478": "",
-  "lang479": "",
-  "lang480": "",
-  "lang481": "",
+  "lang478": "本茶矿池最高月产出",
+  "lang479": "请阅读并勾选《存储协议》",
+  "lang480": "请阅读并勾选",
+  "lang481": "存储协议",
   "lang482": "",
   "lang483": "",
   "lang484": "",

+ 9 - 0
src/router/index.js

@@ -12,6 +12,7 @@ import orders from '../views/trade/orders.vue';  //订单页面
 import bulletin from '../views/bulletin/index.vue'; //公告
 import bulletinDetail from '../views/bulletin/details.vue'; //公告详情
 import service from '../views/bulletin/service.vue'; //服务协议
+import protocol from '../views/bulletin/protocol.vue'; //服务协议
 
 import mine from '../views/mine/index.vue';  //我的
 import invite from '../views/mine/invite.vue';  //邀请
@@ -386,6 +387,14 @@ const routes = [
           requiresAuth: true
         }
       },
+      {
+        path: 'protocol',
+        name: 'protocol',
+        component: protocol,
+        meta: {
+          requiresAuth: true
+        }
+      },
       {
         path: 'C2CList',
         name: 'C2CList',

+ 127 - 0
src/views/bulletin/protocol.vue

@@ -0,0 +1,127 @@
+<template>
+  <div class="invite">
+    <div class="head">
+      <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
+      <span>{{ $t('lang481') }}</span>
+    </div>
+    <div class="box">
+      <!-- <div class="title">
+        <span> {{ dataObj.title }} </span>
+      </div> -->
+      
+      <div class="content">
+        <div class="">
+          <span v-html="dataObj.body"></span>
+        </div>
+      </div>
+
+      <div class="time">
+        <span>{{ dateFormatFn(dataObj.createtime) }}</span>
+      </div>
+    </div>
+  </div>
+</template>
+  
+<script>
+import { homeApi } from '@/api/index';
+import { dateFormat } from '@/utils/formatTool.js';
+export default {
+  data() {
+    return {
+      dataObj: {
+        title: undefined,
+        createtime: undefined,
+        body: undefined,
+      },
+    };
+  },
+  mounted() {
+    // this.dataObj = ;
+    this.getData(this.$route.query.id);
+  },
+  methods: {
+    //返回上一页
+    back() {
+      this.$router.back();
+    },
+    dateFormatFn(date) {
+      if (date) {
+        return dateFormat(new Date(date * 1000), 'yyyy-MM-dd');
+      }
+    },
+    getData(id) {
+      let params = {
+        id,
+      };
+      homeApi.getAnnouncementDetail(params).then(res => {
+        if (res.code == 200) {
+          this.dataObj = res.data;
+        }
+      });
+    },
+  },
+};
+</script>
+  
+<style lang="less" scoped>
+.invite {
+  min-height: 100vh;
+  padding-top: 50px;
+  .head {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: rgba(#000, 0.8);
+    letter-spacing: 1.5px;
+    font-weight: 550;
+    background: #fff;
+    padding: 14px 0;
+    .arrow_img {
+      position: absolute;
+      left: 20px;
+      width: 10px;
+      height: 16px;
+    }
+  }
+  .box {
+    border-radius: 16px;
+    margin: 16px;
+    color: #000;
+    font-size: 13px;
+    padding: 16px;
+    box-shadow: 4px 4px 15px 0px rgba(180, 212, 212, 0.59);
+    background-color: rgba(255, 255, 255, 1);
+    // .flex {
+    //   display: flex;
+    //   align-items: center;
+    //   justify-content: space-between;
+    // }
+
+    .title {
+      font-weight: 550;
+      // text-align: center;
+      color: rgba(#000, 0.86);
+      font-size: 16px;
+      padding-bottom: 16px;
+    }
+    .time {
+      text-align: right;
+      padding-top: 16px;
+      border-top: 1px solid rgba(232, 240, 247, 1);
+
+    }
+    .content {
+      font-size: 13px;
+      color: #2e2e2e;
+      line-height: 200%;
+      .image {
+        width: 100%;
+      }
+    }
+  }
+}
+</style>

+ 3 - 2
src/views/index/index.vue

@@ -95,10 +95,10 @@
             <div class="yel" style="background-color: #f1f1f1" v-else-if="item.status == 0">
               <span class="count" style="color: #aaa">{{ $t('lang72') }}</span>
             </div>
-            <div class="progress">
+            <!-- <div class="progress">
               <van-progress :percentage="((item.num + item.init_num) / item.stock) * 100 || 0" class="pro" color="#29b286" :show-pivot="false" />
               <span>{{ item.num + item.init_num }}/{{ item.stock }}{{ $t('lang7') }}</span>
-            </div>
+            </div> -->
           </div>
         </div>
       </div>
@@ -610,6 +610,7 @@ export default {
       flex-direction: column;
       justify-content: space-between;
       font-size: 13px;
+      padding: 6px 0;
 
       .time_text {
         color: #7f7f7f;

+ 28 - 2
src/views/storage/mulDetail.vue

@@ -14,7 +14,7 @@
             <span class="value_2">{{ Math.round(Number(product.income_reta) * 100 * 100) / 100 || 0 }}</span>
           </div>
           <div class="">
-            <span class="key">{{ $t('lang332') }}:</span>
+            <span class="key">{{ $t('lang478') }}:</span>
             <span class="value_1">{{ product.day_num || 0 }}</span>
           </div>
         </div>
@@ -49,6 +49,12 @@
       </div>
       <div class="btn_box">
         <van-button class="btn" @click="submit">{{ $t('lang325') }}</van-button>
+        <div class="btn_checkbox flex">
+          <van-checkbox icon-size="16px" checked-color="#21926f" v-model="readProtocol"> </van-checkbox>
+          <span style="padding-left: 6px">
+            {{ $t('lang480') }}<span style="color: #29b286" @click="toPage">《{{ $t('lang481') }}》</span>
+          </span>
+        </div>
       </div>
       <van-popup v-model="showOrders" round closeable>
         <div class="orderpopup">
@@ -91,6 +97,7 @@ export default {
       order_no: {}, // 存放已选择订单
       show: false,
       pay_type: -1,
+      readProtocol: false,
     };
   },
   mounted() {
@@ -101,6 +108,13 @@ export default {
     back() {
       this.$router.back();
     },
+    toPage(){
+      if (this.$i18n.locale == 'zh-cn') {
+        this.$router.push({ name: 'protocol' ,query: {id: this.product.announcement_id.zh }});
+      } else if (this.$i18n.locale == 'en') {
+        this.$router.push({ name: 'protocol' ,query: {id: this.product.announcement_id.en }});
+      }
+    },
     getInfo() {
       homeApi.pledgeDetail({ id: this.$route.query.id }).then(res => {
         if (res.code == 200) {
@@ -160,6 +174,9 @@ export default {
       if (this.pay_type == -1) {
         return this.$toast(this.$t('lang470'));
       }
+      if (!this.readProtocol) {
+        return this.$toast(this.$t('lang479'));
+      }
       let _this = this;
       Dialog.confirm({
         title: _this.$t('lang136'),
@@ -323,19 +340,26 @@ export default {
     }
   }
   .btn_box {
+    text-align: center;
     position: fixed;
     bottom: 0;
     left: 0;
     right: 0;
-    padding: 20px;
+    padding: 16px 20px;
     background-color: #fff;
     .btn {
       width: 100%;
       color: #fff;
       letter-spacing: 2px;
       border-radius: 20px;
+      margin-bottom: 10px;
       background-color: #29b286;
     }
+    .btn_checkbox {
+      color: #000;
+      font-size: 12px;
+      justify-content: center;
+    }
   }
   .nodata {
     font-size: 13px;
@@ -379,6 +403,8 @@ export default {
     .key {
       color: #4b4b4b;
       font-size: 12px;
+      flex: 1;
+      white-space: nowrap;
     }
     ::v-deep .van-radio__label {
       color: #21926f;

+ 28 - 2
src/views/storage/singleDetail.vue

@@ -14,7 +14,7 @@
             <span class="value_2">{{ Math.round(Number(product.income_reta) * 100 * 100) / 100 || 0 }}</span>
           </div>
           <div class="">
-            <span class="key">{{ $t('lang332') }}:</span>
+            <span class="key">{{ $t('lang478') }}:</span>
             <span class="value_1">{{ product.day_num || 0 }}</span>
           </div>
         </div>
@@ -49,6 +49,12 @@
       </div>
       <div class="btn_box">
         <van-button class="btn" @click="submit">{{ $t('lang325') }}</van-button>
+        <div class="btn_checkbox flex">
+          <van-checkbox icon-size="16px" checked-color="#21926f" v-model="readProtocol"> </van-checkbox>
+          <span style="padding-left: 6px">
+            {{ $t('lang480') }}<span style="color: #29b286" @click="toPage">《{{ $t('lang481') }}》</span>
+          </span>
+        </div>
       </div>
       <van-popup v-model="showOrders" round closeable>
         <div class="orderpopup">
@@ -92,6 +98,7 @@ export default {
       order_no: {},
       show: false,
       pay_type: -1,
+      readProtocol: false,
     };
   },
   watch: {
@@ -110,6 +117,13 @@ export default {
     back() {
       this.$router.back();
     },
+    toPage(){
+      if (this.$i18n.locale == 'zh-cn') {
+        this.$router.push({ name: 'protocol' ,query: {id: this.product.announcement_id.zh }});
+      } else if (this.$i18n.locale == 'en') {
+        this.$router.push({ name: 'protocol' ,query: {id: this.product.announcement_id.en }});
+      }
+    },
     getInfo() {
       homeApi.pledgeDetail({ id: this.$route.query.id }).then(res => {
         if (res.code == 200) {
@@ -157,6 +171,9 @@ export default {
       if (this.pay_type == -1) {
         return this.$toast(this.$t('lang470'));
       }
+      if (!this.readProtocol) {
+        return this.$toast(this.$t('lang479'));
+      }
       let _this = this;
       Dialog.confirm({
         title: _this.$t('lang136'),
@@ -320,19 +337,26 @@ export default {
     }
   }
   .btn_box {
+    text-align: center;
     position: fixed;
     bottom: 0;
     left: 0;
     right: 0;
-    padding: 20px;
+    padding: 16px 20px;
     background-color: #fff;
     .btn {
       width: 100%;
       color: #fff;
       letter-spacing: 2px;
       border-radius: 20px;
+      margin-bottom: 10px;
       background-color: #29b286;
     }
+    .btn_checkbox {
+      color: #000;
+      font-size: 12px;
+      justify-content: center;
+    }
   }
   .nodata {
     font-size: 13px;
@@ -376,6 +400,8 @@ export default {
     .key {
       color: #4b4b4b;
       font-size: 12px;
+      flex: 1;
+      white-space: nowrap;
     }
     ::v-deep .van-radio__label {
       color: #21926f;

+ 1 - 1
src/views/teacEx/detail.vue

@@ -133,7 +133,7 @@ export default {
             } else if (res.code == 15001) {
               _this.loading = false;
               setTimeout(() => {
-                _this.$router.push('recharge');
+                _this.$router.push('C2CList');
               }, 300);
             } else {
               _this.loading = false;