Browse Source

客服、存储按钮跳转

xiaomei 6 months ago
parent
commit
d899f1b8a8

+ 9 - 0
src/router/index.js

@@ -56,6 +56,7 @@ import C2CList from '../views/c2c/list.vue'; //c2c列表
 import teacSell from '../views/c2c/sell.vue'; //c2c出售
 import teacBuy from '../views/c2c/buy.vue'; //c2c求购
 import exchange from '../views/mine/exchange.vue';  //兑换
+import kf from '../views/index/kf.vue';  //客服
 Vue.use(VueRouter);
 const routes = [
 
@@ -414,6 +415,14 @@ const routes = [
           requiresAuth: true
         }
       },
+      {
+        path: 'kf',
+        name: 'kf',
+        component: kf,
+        meta: {
+          requiresAuth: true
+        }
+      },
     ],
   },
 ];

+ 3 - 3
src/store/index.js

@@ -217,7 +217,7 @@ export default new Vuex.Store({
               },
             ],
           });
-          await web3Provider.enable();
+          await web3Provider.request({ method: 'eth_requestAccounts' });
         } else {
           try {
             // 请求用户授权
@@ -237,7 +237,7 @@ export default new Vuex.Store({
                 },
               ],
             });
-            await web3Provider.enable();
+            await web3Provider.request({ method: 'eth_requestAccounts' });
           } catch (error) {
             console.error('User denied account access');
           }
@@ -255,7 +255,7 @@ export default new Vuex.Store({
             commit('SETACCOUNTS', result[0]);
           }
         });
-        web3Provider.on('networkChanged', function (networkIDstring) {
+        web3Provider.on('chainChanged', function (networkIDstring) {
           commit('SETNET', networkIDstring);
         });
         web3Provider.on('accountsChanged', function (accounts) {

+ 1 - 1
src/views/index/index.vue

@@ -219,7 +219,7 @@ export default {
         {
           text: this.$t('lang261'),
           icon: require('@/assets/images/index/kf.png'),
-          url: '',
+          url: 'kf',
         },
         {
           text: this.$t('lang262'),

+ 31 - 0
src/views/index/kf.vue

@@ -0,0 +1,31 @@
+<template>
+  <div class="webpage">
+    <iframe :src="url" width="100%" height="100%"></iframe>
+  </div>
+</template>
+  
+  
+<script>
+export default {
+  name: 'WebViewComponent',
+  data() {
+    return {
+      url: '',
+    };
+  },
+  mounted() {
+    let userinfo = JSON.parse(localStorage.getItem('userinfo'));
+    this.url = `https://ke-fu.haocha13.cn/index/index/home?visiter_id=${userinfo?.nickname}&visiter_name=${userinfo?.nickname}&avatar=${userinfo?.avatar}&groupid=0&business_id=1`;
+  },
+};
+</script>
+  
+  
+<style scoped>
+iframe {
+  border: none;
+}
+.webpage {
+  height: 100vh;
+}
+</style>

+ 1 - 0
src/views/mine/index.vue

@@ -450,6 +450,7 @@ export default {
   height: 100vh;
   overflow: scroll;
   .banner {
+    position: relative;
     // display: flex;
     // justify-content: space-between;
     background: linear-gradient(to bottom right, #29b286, #dae9fd);

+ 21 - 5
src/views/mine/teaRights.vue

@@ -111,7 +111,7 @@
               <div class="buy" @click="give(item)" v-if="item.is_gift == 1">
                 <van-button class="buy_btn btn1" type="primary">{{ $t('lang186') }}</van-button>
               </div>
-              <div class="buy" @click="noopen()" v-if="item.is_storage == 1">
+              <div class="buy" @click="navigation('storage')" v-if="item.is_storage == 1">
                 <van-button class="buy_btn" type="primary">{{ $t('lang220') }}</van-button>
               </div>
             </div>
@@ -188,7 +188,7 @@
           </div>
           <div class="f-s">
             <span> {{ $t('lang91') }} </span>
-            <span class="s">{{ transfes_txt }}</span>
+            <span class="s" v-html="transfes_txt"></span>
           </div>
         </div>
         <div class="submit">
@@ -218,7 +218,23 @@
           </div>
           <div class="f-r">
             <span> {{ $t('lang190') }} </span>
-            <span class="s f-r">
+            <span class="s f-r" v-if="item.floor_price > 0">
+              <svg width="11" height="20" viewBox="40 0 50 96" xmlns="http://www.w3.org/2000/svg">
+                <path
+                  d="M70,35
+           C56,28 38,40 40,54
+           C40,64 50,74 70,66"
+                  fill="none"
+                  stroke="#999999"
+                  stroke-width="6"
+                  stroke-linecap="round"
+                />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="#999999" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="#999999" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              {{ Math.floor(item.floor_price * Number(item.gift_fee / 100) * 100) / 100 || 0 }}
+            </span>
+            <span class="s f-r" v-else>
               <svg width="11" height="20" viewBox="40 0 50 96" xmlns="http://www.w3.org/2000/svg">
                 <path
                   d="M70,35
@@ -232,12 +248,12 @@
                 <line x1="52" y1="29" x2="52" y2="73" stroke="#999999" stroke-width="5.2" stroke-linecap="round" />
                 <line x1="63" y1="29" x2="63" y2="73" stroke="#999999" stroke-width="5.2" stroke-linecap="round" />
               </svg>
-              {{ Math.floor(item.price * Number(item.gift_fee / 100) * 100) / 100 }}
+              {{ Math.floor(item.price * Number(item.gift_fee / 100) * 100) / 100 || 0 }}
             </span>
           </div>
           <div class="f-s">
             <span> {{ $t('lang91') }} </span>
-            <span class="s">{{ giveaway_txt }}</span>
+            <span class="s" v-html="giveaway_txt"></span>
           </div>
         </div>
         <div class="submit">

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

@@ -153,7 +153,7 @@
     <!-- 底部导航栏 -->
     <div class="bottom">
       <div class="flex">
-        <div class="flex flex-c">
+        <div class="flex flex-c" @click="toPage('kf')">
           <img src="@/assets/images/trade/custom.png" alt="" class="icon" />
           <span>{{ $t('lang67') }}</span>
         </div>

+ 1 - 1
src/views/transfer/TransferDetail.vue

@@ -124,7 +124,7 @@
     <!-- 底部导航栏 -->
     <div class="bottom">
       <div class="flex">
-        <div class="flex flex-c">
+        <div class="flex flex-c" @click="toPage('kf')">
           <img src="@/assets/images/trade/custom.png" alt="" class="icon" />
           <span>{{ $t('lang67') }}</span>
         </div>