Browse Source

服务协议弹窗显示
teac求购分页bug
teac求购出售的Teac数量改可用 XXX Teac

xiaomei 6 months ago
parent
commit
bf12bebea5

+ 2 - 1
src/language/en.json

@@ -450,5 +450,6 @@
   "lang449": "Copy",
   "lang450": "Are you sure to submit the exchange?",
   "lang451": "Please select the token currency",
-  "lang452": "Newcomer Gift Pack"
+  "lang452": "Newcomer Gift Pack",
+  "lang453": "Service Agreement"
 }

+ 1 - 1
src/language/zh.json

@@ -451,7 +451,7 @@
   "lang450": "是否确定提交兑换?",
   "lang451": "请选择代币币种",
   "lang452": "新人礼包",
-  "lang453": "",
+  "lang453": "服务协议",
   "lang454": "",
   "lang455": "",
   "lang456": "",

+ 3 - 2
src/views/c2c/list.vue

@@ -27,8 +27,9 @@
               <span class="price">{{ item.price }}</span>
             </div>
             <div class="pb">
-              <span class="grey">{{ $t('lang431') }}</span>
-              <span>{{ item.stock - item.num }}</span>
+              <span class="grey">{{ $t('lang83') }}</span>
+              <span>{{ Math.floor((item.stock - item.num) * 100) / 100 }} </span>
+              <span class="grey">TeaC</span>
             </div>
             <div class="flex sb">
               <div class="flex">

+ 51 - 1
src/views/transfer/initiatePurchase.vue

@@ -89,7 +89,7 @@
         <div class="title">{{ $t('lang356') }}</div>
         <div class="flex">
           <van-checkbox v-model="checked" class="black" shape="square" checked-color="#29b286" icon-size="16px"
-            >{{ $t('lang357') }} <span class="green" @click.stop="navigatorTo('service')">{{ $t('lang358') }}</span></van-checkbox
+            >{{ $t('lang357') }} <span class="green" @click.stop="blogPopop = true">{{ $t('lang358') }}</span></van-checkbox
           >
         </div>
       </div>
@@ -127,6 +127,13 @@
         <van-loading type="spinner" class="loading" />
       </div>
     </van-overlay>
+    <van-popup v-model="blogPopop" round position="bottom">
+      <div class="blogModel">
+        <div class="title"></div>
+        <van-icon name="cross" class="close" size="20" @click="blogPopop = false" />
+        <div class="body" v-html="blogData.body"></div>
+      </div>
+    </van-popup>
   </div>
 </template>
 <script>
@@ -155,6 +162,8 @@ export default {
       balance: 0,
       maxPrice: 0,
       maxCount: 0,
+      blogPopop: false,
+      blogData: {},
     };
   },
   watch: {
@@ -190,6 +199,7 @@ export default {
       homeApi.getMarketConfig({}).then(res => {
         if (res.code == 200) {
           this.configInfo = res.data;
+          this.getAnnouncementDetail();
         } else {
         }
       });
@@ -280,6 +290,27 @@ export default {
         this.$router.push({ name, query: { id: id } });
       }
     },
+    getAnnouncementDetail() {
+      if (this.$i18n.locale == 'zh-cn') {
+        let params = {
+          id: this.configInfo.zh_serve_agree,
+        };
+        homeApi.getAnnouncementDetail(params).then(res => {
+          if (res.code == 200) {
+            this.blogData = res.data;
+          }
+        });
+      } else if (this.$i18n.locale == 'en') {
+        let params = {
+          id: this.configInfo.en_serve_agree,
+        };
+        homeApi.getAnnouncementDetail(params).then(res => {
+          if (res.code == 200) {
+            this.blogData = res.data;
+          }
+        });
+      }
+    },
   },
 };
 </script>
@@ -571,6 +602,25 @@ export default {
     }
   }
 }
+
+.blogModel {
+  color: #000;
+  font-size: 15px;
+  .close {
+    position: absolute;
+    right: 20px;
+    top: 10px;
+  }
+  .title {
+    padding: 20px 20px 26px;
+    text-align: center;
+  }
+  .body {
+    max-height: 600px;
+    overflow: auto;
+    padding: 0 14px 20px;
+  }
+}
 /deep/.van-button--disabled {
   opacity: 0.6;
 }

+ 51 - 1
src/views/transfer/order.vue

@@ -67,7 +67,7 @@
         <div class="title">{{ $t('lang356') }}</div>
         <div class="flex">
           <van-checkbox v-model="checked" class="black" shape="square" checked-color="#29b286" icon-size="16px"
-            >{{ $t('lang357') }} <span class="green" @click.stop="navigatorTo('service')">{{ $t('lang358') }}</span></van-checkbox
+            >{{ $t('lang357') }} <span class="green" @click.stop="blogPopop = true">{{ $t('lang358') }}</span></van-checkbox
           >
         </div>
       </div>
@@ -102,6 +102,13 @@
         <van-loading type="spinner" class="loading" />
       </div>
     </van-overlay>
+    <van-popup v-model="blogPopop" round position="bottom">
+      <div class="blogModel">
+        <div class="title"></div>
+        <van-icon name="cross" class="close" size="20" @click="blogPopop = false" />
+        <div class="body" v-html="blogData.body"></div>
+      </div>
+    </van-popup>
   </div>
 </template>
 <script>
@@ -129,6 +136,8 @@ export default {
         zh_serve_agree: '',
         en_serve_agree: '',
       },
+      blogPopop: false,
+      blogData: {},
     };
   },
   mounted() {
@@ -157,6 +166,7 @@ export default {
       homeApi.getMarketConfig({}).then(res => {
         if (res.code == 200) {
           this.configInfo = res.data;
+          this.getAnnouncementDetail();
         } else {
         }
       });
@@ -229,6 +239,27 @@ export default {
         this.$router.push({ name, query: { id: id } });
       }
     },
+    getAnnouncementDetail() {
+      if (this.$i18n.locale == 'zh-cn') {
+        let params = {
+          id: this.configInfo.zh_serve_agree,
+        };
+        homeApi.getAnnouncementDetail(params).then(res => {
+          if (res.code == 200) {
+            this.blogData = res.data;
+          }
+        });
+      } else if (this.$i18n.locale == 'en') {
+        let params = {
+          id: this.configInfo.en_serve_agree,
+        };
+        homeApi.getAnnouncementDetail(params).then(res => {
+          if (res.code == 200) {
+            this.blogData = res.data;
+          }
+        });
+      }
+    },
   },
 };
 </script>
@@ -527,6 +558,25 @@ export default {
     }
   }
 }
+
+.blogModel {
+  color: #000;
+  font-size: 15px;
+  .close {
+    position: absolute;
+    right: 20px;
+    top: 10px;
+  }
+  .title {
+    padding: 20px 20px 26px;
+    text-align: center;
+  }
+  .body {
+    max-height: 600px;
+    overflow: auto;
+    padding: 0 14px 20px;
+  }
+}
 /deep/.van-button--disabled {
   opacity: 0.6;
 }

+ 51 - 1
src/views/transfer/soldConsignment.vue

@@ -142,7 +142,7 @@
         <div class="title">{{ $t('lang356') }}</div>
         <div class="flex">
           <van-checkbox v-model="checked" class="black" shape="square" checked-color="#29b286" icon-size="16px"
-            >{{ $t('lang357') }} <span class="green" @click.stop="navigatorTo('service')">{{ $t('lang358') }}</span></van-checkbox
+            >{{ $t('lang357') }} <span class="green" @click.stop="blogPopop = true">{{ $t('lang358') }}</span></van-checkbox
           >
         </div>
       </div>
@@ -161,6 +161,13 @@
         <van-loading type="spinner" class="loading" />
       </div>
     </van-overlay>
+    <van-popup v-model="blogPopop" round position="bottom">
+      <div class="blogModel">
+        <div class="title"></div>
+        <van-icon name="cross" class="close" size="20" @click="blogPopop = false" />
+        <div class="body" v-html="blogData.body"></div>
+      </div>
+    </van-popup>
   </div>
 </template>
 <script>
@@ -191,6 +198,8 @@ export default {
       orderIndex: 0,
       fee: 0,
       balance: 0,
+      blogPopop: false,
+      blogData: {},
     };
   },
   mounted() {
@@ -222,6 +231,7 @@ export default {
         if (res.code == 200) {
           this.configInfo = res.data;
           this.fee = this.configInfo.serve_fee * this.product.min_price;
+          this.getAnnouncementDetail();
         } else {
         }
       });
@@ -290,6 +300,27 @@ export default {
         this.$router.push({ name, query: { id: id } });
       }
     },
+    getAnnouncementDetail() {
+      if (this.$i18n.locale == 'zh-cn') {
+        let params = {
+          id: this.configInfo.zh_serve_agree,
+        };
+        homeApi.getAnnouncementDetail(params).then(res => {
+          if (res.code == 200) {
+            this.blogData = res.data;
+          }
+        });
+      } else if (this.$i18n.locale == 'en') {
+        let params = {
+          id: this.configInfo.en_serve_agree,
+        };
+        homeApi.getAnnouncementDetail(params).then(res => {
+          if (res.code == 200) {
+            this.blogData = res.data;
+          }
+        });
+      }
+    },
   },
 };
 </script>
@@ -581,6 +612,25 @@ export default {
     }
   }
 }
+
+.blogModel {
+  color: #000;
+  font-size: 15px;
+  .close {
+    position: absolute;
+    right: 20px;
+    top: 10px;
+  }
+  .title {
+    padding: 20px 20px 26px;
+    text-align: center;
+  }
+  .body {
+    max-height: 600px;
+    overflow: auto;
+    padding: 0 14px 20px;
+  }
+}
 /deep/.van-button--disabled {
   opacity: 0.6;
 }