Selaa lähdekoodia

优化钱包界面、存储列表
独立标记茶宝

xiaomei 7 kuukautta sitten
vanhempi
sitoutus
82582e5b5c

+ 12 - 1
src/api/home.js

@@ -746,7 +746,7 @@ export default {
   //转账茶宝说明
   chabaoInfo(data) {
     return request.request({
-      url: 'ledger/chabao',
+      url: 'ledger/getGiftDesc',
       method: "post",
       headers: {
         'Accept-Language': localStorage.getItem('language') || 'zh-cn',
@@ -941,4 +941,15 @@ export default {
       data
     })
   },
+  // 标记茶宝转账
+  frozenTransfer(data) {
+    return request.request({
+      url: '/ledger/frozenTransfer',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
 }

BIN
src/assets/images/index/frozen.png


BIN
src/assets/images/index/mul.png


BIN
src/assets/images/index/mul_1.png


BIN
src/assets/images/index/single.png


BIN
src/assets/images/index/single_1.png


BIN
src/assets/images/index/teac.png


BIN
src/assets/images/index/teamine.png


BIN
src/assets/images/index/teamine_1.png


BIN
src/assets/images/index/token.png


+ 7 - 1
src/language/en.json

@@ -333,5 +333,11 @@
   "lang332": "Daily income",
   "lang333": "Selected",
   "lang334": "Select RWA",
-  "lang335": "Are you sure to release storage?"
+  "lang335": "Are you sure to release storage?",
+  "lang336": "Freeze amount",
+  "lang337": "Exchange",
+  "lang338": "Current balance of Marked Tea Treasure",
+  "lang339": "Marked Tea Treasure",
+  "lang340": "Are you sure to transfer Marked Tea Treasure?",
+  "lang341": "Floor price:"
 }

+ 6 - 6
src/language/zh.json

@@ -334,12 +334,12 @@
   "lang333": "已选",
   "lang334": "选择RWA",
   "lang335": "是否确定解除存储?",
-  "lang336": "",
-  "lang337": "",
-  "lang338": "",
-  "lang339": "",
-  "lang340": "",
-  "lang341": "",
+  "lang336": "冻结金额",
+  "lang337": "兑换",
+  "lang338": "当前标记茶宝余额",
+  "lang339": "标记茶宝",
+  "lang340": "是否确定转账标记茶宝?",
+  "lang341": "地板价:",
   "lang342": "",
   "lang343": "",
   "lang344": "",

+ 9 - 0
src/router/index.js

@@ -44,6 +44,7 @@ import storage from '../views/storage/list.vue'; //茶权存储
 import MulStorageDetail from '../views/storage/mulDetail.vue'; //组合茶权存储详情
 import SingleStorageDetail from '../views/storage/singleDetail.vue'; //单个茶权存储详情
 import storing from '../views/storage/storing.vue'; //我的茶矿
+import frozenTransfer from '../views/mine/frozenTransfer.vue'; //转账标记茶宝
 Vue.use(VueRouter);
 const routes = [
 
@@ -314,6 +315,14 @@ const routes = [
           requiresAuth: true
         }
       },
+      {
+        path: 'frozenTransfer',
+        name: 'frozenTransfer',
+        component: frozenTransfer,
+        meta: {
+          requiresAuth: true
+        }
+      },
     ],
   },
 ];

+ 28 - 35
src/views/mine/assets.vue

@@ -8,8 +8,7 @@
       <span v-for="(item, index) in navList" :key="index" @click="changeNav(item, index)" :style="{ color: navIndex == index ? '#000' : '' }">{{ item.key }}</span>
     </div> -->
     <div class="pd">
-      <div class="">
-        <div class="total_box">
+      <!-- <div class="total_box">
           <div>
             <span class="text">{{ $t('lang80') }}({{ $t('lang174') }})</span>
           </div>
@@ -27,35 +26,30 @@
               <van-button class="buy_btn" type="primary">{{ $t('lang113') }}</van-button>
             </div>
           </div>
-        </div>
+        </div> -->
 
-        <div class="bare" v-if="coinList.length <= 0">
-          <span>{{ $t('lang82') }}</span>
-        </div>
-        <div v-else>
-          <div class="list">
-            <div v-for="(item, index) in coinList" :key="index" class="li" @click="navigatorToPage('share', { coin_type: item.coin_key })">
-              <div class="li_left">
-                <!-- <div class="imgbox">
-                  <img :src="require('@/assets/images/wallet/' + item.coin_key + '.png')" class="li_img" />
-                </div> -->
-                <span class="title">{{ item.coin_name }}</span>
-              </div>
-              <div class="box">
-                <div class="box_item">
-                  <span class="key">{{ $t('lang83') }}</span>
-                  <span class="num">{{ item.amount || 0 }}</span>
-                </div>
-                <div class="box_item">
-                  <span class="key">{{ $t('lang289') }}</span>
-                  <span class="num">{{ item.frozen_amount || 0 }}</span>
-                </div>
-                <!-- <div class="box_item">
+      <div class="bare" v-if="coinList.length <= 0">
+        <span>{{ $t('lang82') }}</span>
+      </div>
+      <div class="list" v-else>
+        <div v-for="(item, index) in coinList" :key="index" class="li" @click="navigatorToPage('share', { coin_type: item.coin_key })">
+          <div class="li_left">
+            <img :src="require('@/assets/images/index/' + item.coin_key + '.png')" class="li_img" />
+            <span class="title">{{ item.coin_name }}</span>
+          </div>
+          <div class="box">
+            <div class="box_item">
+              <span class="key">{{ $t('lang83') }}</span>
+              <span class="num">{{ item.amount || 0 }}</span>
+            </div>
+            <div class="box_item">
+              <span class="key">{{ $t('lang336') }}</span>
+              <span class="num">{{ item.frozen_amount || 0 }}</span>
+            </div>
+            <!-- <div class="box_item">
                   <span class="key">{{ $t('lang85') }}(CNY)</span>
                   <span class="num">{{ Math.floor(item.amount * Number(item.convert_rate) * 100) / 100 || 0 }}</span>
                 </div> -->
-              </div>
-            </div>
           </div>
         </div>
       </div>
@@ -318,7 +312,7 @@ export default {
     padding: 0 8px;
     margin-top: 16px;
     background-color: #fff;
-    margin: 16px 6px;
+    margin: 0 6px 16px;
     .li {
       // display: flex;
       // align-items: center;
@@ -328,8 +322,8 @@ export default {
       padding: 14px 0;
 
       .li_left {
-        // display: flex;
-        // align-items: center;
+        display: flex;
+        align-items: center;
         .imgbox {
           width: 40px;
           height: 40px;
@@ -341,14 +335,13 @@ export default {
           margin-right: 6px;
         }
         .li_img {
-          display: block;
-          width: 32px;
-          height: 32px;
-          border-radius: 50%;
+          width: 16px;
+          height: 16px;
+          margin-right: 6px;
         }
         .title {
           color: #29b286;
-          font-size: 14px;
+          font-size: 15px;
           font-weight: bold;
         }
       }

+ 387 - 0
src/views/mine/frozenTransfer.vue

@@ -0,0 +1,387 @@
+<template>
+  <div class="assets">
+    <div class="head">
+      <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
+      <span>{{ $t('lang278') }}</span>
+    </div>
+    <div class="pd">
+      <div class="">
+        <div class="total_box">
+          <div>
+            <span class="text">{{ $t('lang338') }}</span>
+          </div>
+          <div class="total">
+            <span>{{ Math.floor(assets * 100) / 100 || 0 }}</span>
+          </div>
+          <div class="bo">
+            <!-- <img src="@/assets/images/chance.png" class="icon" />
+            <span>{{ $t('lang121') }}</span> -->
+          </div>
+          <div @click="navigation('share')" class="mx">{{ $t('lang122') }}</div>
+        </div>
+
+        <div class="list">
+          <div class="box">
+            <div class="box_item">
+              <span class="left">{{ $t('lang207') }}</span>
+              <!-- <van-field v-model="send_address" placeholder="输入对方钱包地址" class="input" input-align="right" /> -->
+              <van-field v-model="send_address" type="textarea" style="height: 46px" :placeholder="$t('lang208')" class="input" input-align="right" />
+            </div>
+            <div class="box_item">
+              <span class="left">{{ $t('lang281') }}</span>
+              <van-field v-model="amount" :placeholder="$t('lang119')" type="number" class="input" input-align="right" />
+            </div>
+            <div class="box_item">
+              <span class="left">{{ $t('lang210') }}</span>
+              <span>{{ parseFloat((networkfee * 100).toFixed(2)) }}%</span>
+            </div>
+            <!-- <div class="box_item">
+              <span class="left">{{ $t('lang125') }}</span>
+              <van-field v-model="value" :placeholder="$t('lang118')" class="input" input-align="right" />
+            </div> -->
+          </div>
+        </div>
+        <div class="buy" @click="submit">
+          <van-button class="buy_btn" type="primary">{{ $t('lang279') }}</van-button>
+        </div>
+        <div class="tips">
+          <div>{{ $t('lang116') }}</div>
+          <div>{{ tip }}</div>
+        </div>
+      </div>
+    </div>
+    <van-overlay :show="show">
+      <div class="wrapper" @click.stop>
+        <van-loading type="spinner" class="loading" />
+      </div>
+    </van-overlay>
+  </div>
+</template>
+
+<script>
+import { homeApi } from '@/api/index';
+import { dateFormat } from '@/utils/formatTool.js';
+import packApi from '@/methods/pack.js';
+import { getErc20Contract } from '@/utils/contractHelp';
+import usdt from '@/methods/usdt.js';
+import { formatAmount } from '@/utils/format.js';
+import { Dialog, Notify, Toast } from 'vant';
+export default {
+  data() {
+    return {
+      assets: 0,
+      amount: '',
+      payToken: undefined, //支付币种
+      walletBalance: 0,
+      show: false,
+      send_address: '',
+      tip: '',
+      networkfee: 0,
+    };
+  },
+  mounted() {
+    this.getUserInfo();
+    this.chabaoInfo();
+  },
+  methods: {
+    //返回上一页
+    back() {
+      this.$router.back();
+    },
+    navigation(name) {
+      this.$router.push({ name, query: { coin_type: 'frozen' } });
+    },
+    chabaoInfo() {
+      homeApi.chabaoInfo().then(res => {
+        if (res.code == 200) {
+          this.networkfee = res.data.frozen.value;
+          this.tip = res.data.frozen.text;
+        } else {
+        }
+      });
+    },
+    getUserInfo() {
+      homeApi.assets({}).then(res => {
+        if (res.code == 200) {
+          let data = res.data.coin_list;
+          this.assets = data.filter(i => i.coin_key == 'frozen')[0].amount;
+        } else {
+        }
+      });
+    },
+    // getPayToken() {
+    //   packApi.getPayToken(this.account).then(res => {
+    //     this.payToken = res;
+    //     // this.handleApproveBtnShow(); //获取授权余额
+    //     this.getWalletBalance(); //获取钱包余额
+    //   });
+    // },
+    // // 查询链上钱包余额
+    // async getWalletBalance() {
+    //   const erc20Contract = getErc20Contract(this.payToken);
+    //   let bal = await erc20Contract.methods.balanceOf(this.account).call();
+    //   this.walletBalance = (formatAmount(bal, 18) * 1).toFixed(2);
+    // },
+    submit() {
+      if (!this.send_address) {
+        return this.$toast(this.$t('lang211'));
+      }
+      if (!this.amount) {
+        return this.$toast(this.$t('lang282'));
+      }
+      let _this = this;
+      Dialog.confirm({
+        title: _this.$t('lang136'),
+        message: _this.$t('lang340'),
+        confirmButtonText: _this.$t('lang111'),
+        cancelButtonText: _this.$t('lang135'),
+      })
+        .then(() => {
+          _this.show = true;
+          homeApi
+            .frozenTransfer({
+              amount: _this.amount,
+              address: _this.send_address,
+            })
+            .then(res => {
+              if (res.code == 200) {
+                _this.amount = '';
+                _this.send_address = '';
+                _this.show = false;
+                _this.getUserInfo();
+                Notify({ type: 'success', message: _this.$t('lang152') });
+              } else if (res.code == 15001) {
+                _this.show = false;
+                Toast({ message: `${res.msg}` });
+                // setTimeout(() => {
+                //   this.$router.push('recharge');
+                // }, 300);
+              } else {
+                _this.show = false;
+                Toast({ message: `${res.msg}` });
+              }
+            })
+            .catch(err => {
+              _this.show = false;
+              _this.$toast(err.msg);
+              return;
+            });
+        })
+        .catch(() => {
+          // on cancel
+        });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.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: 15px 0;
+  // z-index: 99;
+  .arrow_img {
+    position: absolute;
+    left: 20px;
+    width: 10px;
+    height: 16px;
+    // transform: translate(0, -50%);
+  }
+}
+.f-sb {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.f-sa {
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+}
+.f-sb-n {
+  display: flex;
+  align-items: flex-end;
+  justify-content: space-between;
+}
+.f-col {
+  display: flex;
+  flex-direction: column;
+}
+.assets {
+  min-height: 100vh;
+  padding: 50px 0 0;
+  // background-color: #fafbfc;
+  .top {
+    color: #000;
+    padding-bottom: 16px;
+    margin: 0 6px;
+  }
+  .pd {
+    padding: 4px;
+    margin-top: 4px;
+    // background-color: #fff;
+  }
+  .total_box {
+    position: relative;
+    display: flex;
+    // align-items: center;
+    flex-direction: column;
+    justify-content: space-between;
+    // position: relative;
+    font-size: 13px;
+    color: #fff;
+    height: 140px;
+    // border-radius: 16px;
+    padding: 20px 20px;
+    box-sizing: border-box;
+    border-radius: 10px;
+    margin: 10px;
+    background: linear-gradient(to right, #1ab986, #25d7bb);
+
+    .total {
+      font-size: 28px;
+      // text-align: center;
+      padding-top: 10px;
+    }
+    .bo {
+      font-size: 12px;
+      display: flex;
+      align-items: center;
+      color: rgba(#fff, 0.8);
+      margin: 10px 10px 0 0;
+
+      .icon {
+        width: 20px;
+        height: 20px;
+        margin-right: 6px;
+        border-radius: 50%;
+        padding: 4px;
+        background-color: rgba(#000, 0.1);
+      }
+    }
+    .mx {
+      position: absolute;
+      right: 20px;
+      width: fit-content;
+      font-size: 11px;
+      color: rgba(#f7f7f7, 0.9);
+      padding: 2px 12px;
+      border-radius: 10px;
+      background-color: rgba(#000, 0.1);
+    }
+    .text {
+      color: rgba(#fff, 0.8);
+    }
+    .buy {
+      position: absolute;
+      right: 14px;
+      bottom: 14px;
+
+      &_btn {
+        color: #29b286;
+        height: 30px;
+        line-height: 30px;
+        font-size: 14px;
+        background-color: #ffffff;
+        border: none;
+        padding: 0 16px;
+        white-space: nowrap;
+        border-radius: 30px;
+      }
+    }
+  }
+
+  .bare {
+    text-align: center;
+    font-size: 14px;
+    padding: 60px 14px;
+    color: #888;
+  }
+  .list {
+    border-radius: 20px;
+    padding: 0 20px;
+    margin-top: 16px;
+    background-color: #fff;
+    margin: 16px 6px;
+
+    .box {
+      width: 100%;
+      color: rgba(51, 51, 51, 1);
+      font-size: 14px;
+      padding: 18px 0 18px;
+      .box_item:last-child {
+        border-bottom: none;
+      }
+      .box_item:first-child {
+        align-items: flex-start;
+      }
+
+      &_item {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        padding: 16px 0;
+        border-bottom: 0.5px solid rgba(190, 190, 190, 0.15);
+
+        .key {
+          color: #aaa;
+          font-size: 12px;
+        }
+        .left {
+          font-size: 13px;
+        }
+        .mobile {
+          font-size: 14px;
+          color: #000;
+          font-weight: 550;
+        }
+        .input {
+          width: 180px;
+        }
+      }
+    }
+  }
+  .buy {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-top: 30px;
+    &_btn {
+      width: 80%;
+      height: 46px;
+      line-height: 46px;
+      font-size: 14px;
+      background-color: #29b286;
+      border: none;
+      padding: 0 10px;
+      white-space: nowrap;
+      border-radius: 30px;
+    }
+  }
+  .tips {
+    color: #aaa;
+    font-size: 12px;
+    line-height: 180%;
+    padding: 14px;
+  }
+}
+.wrapper {
+  // display: flex;
+  // justify-content: center;
+  .loading {
+    position: absolute;
+    left: 46%;
+    top: 46%;
+  }
+}
+</style>

+ 2 - 3
src/views/mine/sendChaBao.vue

@@ -94,9 +94,8 @@ export default {
     chabaoInfo() {
       homeApi.chabaoInfo().then(res => {
         if (res.code == 200) {
-          console.log(res.data);
-          this.networkfee = res.data.value;
-          this.tip = res.data.text;
+          this.networkfee = res.data.chabao.value;
+          this.tip = res.data.chabao.text;
         } else {
         }
       });

+ 144 - 79
src/views/mine/share.vue

@@ -7,15 +7,15 @@
 
     <div class="pd">
       <div class="">
-        <div class="total_box">
+        <!-- <div class="total_box">
           <div>
             <span class="text">{{ $t('lang112') }}</span>
           </div>
           <div class="f-sa">
-            <!-- <div class="item">
+            <div class="item">
               <span class="total">{{ Math.floor(assets * 100) / 100 || 0 }}</span>
               <span>USDT</span>
-            </div> -->
+            </div>
             <div class="item">
               <span class="total">{{ Math.floor(totalReward * 100) / 100 || 0 }}</span>
               <span>{{ $t('lang174') }}</span>
@@ -33,6 +33,62 @@
               {{ $t('lang113') }}
             </van-button>
           </div>
+        </div> -->
+        <div class="bg">
+          <div class="total_box" v-if="coin_type == 'token'">
+            <div>
+              <span class="text">{{ $t('lang80') }}({{ $t('lang174') }})</span>
+            </div>
+            <div class="total">
+              <span>{{ Math.floor(balance * 100) / 100 || 0 }}</span>
+            </div>
+            <div class="buy_box f-sb">
+              <div class="buy" @click="navigation('recharge')">
+                <van-button class="buy_btn" type="primary">{{ $t('lang138') }}</van-button>
+              </div>
+              <div class="buy" @click="navigation('sendChaBao')">
+                <van-button class="buy_btn" type="primary">{{ $t('lang278') }}</van-button>
+              </div>
+              <div class="buy" @click="navigation('withdraw')">
+                <van-button class="buy_btn" type="primary">{{ $t('lang113') }}</van-button>
+              </div>
+            </div>
+          </div>
+          <div class="total_box" v-else-if="coin_type == 'teac'">
+            <div>
+              <span class="text">{{ $t('lang80') }}(TeaC)</span>
+            </div>
+            <div class="total">
+              <span>{{ Math.floor(teac * 100) / 100 || 0 }}</span>
+            </div>
+            <div class="buy_box f-sb">
+              <div class="buy" @click="navigation('')">
+                <van-button class="buy_btn" type="primary">{{ $t('lang278') }}</van-button>
+              </div>
+              <div class="buy" @click="navigation('')">
+                <van-button class="buy_btn" type="primary">{{ $t('lang113') }}</van-button>
+              </div>
+              <div class="buy" @click="navigation('')">
+                <van-button class="buy_btn" type="primary">{{ $t('lang337') }}</van-button>
+              </div>
+            </div>
+          </div>
+          <div class="total_box" v-else-if="coin_type == 'frozen'">
+            <div>
+              <span class="text">{{ $t('lang80') }}({{ $t('lang339') }})</span>
+            </div>
+            <div class="total">
+              <span>{{ Math.floor(frozen * 100) / 100 || 0 }}</span>
+            </div>
+            <div class="buy_box f-sa">
+              <div class="buy" @click="navigation('')">
+                <van-button class="buy_btn" type="primary">{{ $t('lang138') }}</van-button>
+              </div>
+              <div class="buy" @click="navigation('frozenTransfer')">
+                <van-button class="buy_btn" type="primary">{{ $t('lang278') }}</van-button>
+              </div>
+            </div>
+          </div>
         </div>
 
         <div class="bare" v-if="total <= 0">
@@ -58,9 +114,19 @@
                       {{ item.change_amount >= 0 ? '+' + Number(item.change_amount) : Number(item.change_amount) }}
                       <span class="ssm" v-if="coin_type == 'token'">{{ $t('lang174') }}</span>
                       <span class="ssm" v-else-if="coin_type == 'teac'">TeaC</span>
+                      <span class="ssm" v-else-if="coin_type == 'frozen'">{{ $t('lang339') }}</span>
                     </span>
                   </div>
-                  <div class="f-c">
+                  <div class="f-c" v-if="coin_type == 'token'">
+                    <span class="key">{{ statusList[item.action] }}</span>
+                    <span class="key" v-if="item.action == 10 && item.address">
+                      {{ $t('lang295') + (item.address.substring(0, 5) + '****' + item.address.substring(item.address.length - 5, item.address.length)) }}
+                    </span>
+                    <span class="key" v-if="item.action == 11 && item.address">
+                      {{ $t('lang294') + (item.address.substring(0, 5) + '****' + item.address.substring(item.address.length - 5, item.address.length)) }}
+                    </span>
+                  </div>
+                  <div class="f-c" v-else-if="coin_type == 'teac'">
                     <span class="key">{{ statusList[item.action] }}</span>
                     <span class="key" v-if="item.action == 10 && item.address">
                       {{ $t('lang295') + (item.address.substring(0, 5) + '****' + item.address.substring(item.address.length - 5, item.address.length)) }}
@@ -69,6 +135,15 @@
                       {{ $t('lang294') + (item.address.substring(0, 5) + '****' + item.address.substring(item.address.length - 5, item.address.length)) }}
                     </span>
                   </div>
+                  <div class="f-c" v-else-if="coin_type == 'frozen'">
+                    <span class="key">{{ statusList[item.action] }}</span>
+                    <span class="key" v-if="item.action == 3 && item.address">
+                      {{ $t('lang295') + (item.address.substring(0, 5) + '****' + item.address.substring(item.address.length - 5, item.address.length)) }}
+                    </span>
+                    <span class="key" v-if="item.action == 4 && item.address">
+                      {{ $t('lang294') + (item.address.substring(0, 5) + '****' + item.address.substring(item.address.length - 5, item.address.length)) }}
+                    </span>
+                  </div>
                 </div>
               </div>
             </div>
@@ -90,7 +165,6 @@ export default {
       finished: false,
       total: 1,
       nickname: '',
-      assets: 0,
       list: [],
       navIndex: 0,
       navList: [
@@ -105,14 +179,16 @@ export default {
       ],
       nft_list: [],
       statusList: [],
-      totalReward: 0,
+      balance: 0, //茶宝资产
+      teac: 0, // teac资产
+      frozen: 0, // 标记茶宝资产
       coin_type: '',
     };
   },
   mounted() {
     this.coin_type = this.$route.query.coin_type;
     // this.actionGet();
-    this.getUserBalanceLog();
+    this.assets();
     this.coinList();
   },
   methods: {
@@ -124,7 +200,11 @@ export default {
       return dateFormat(new Date(date * 1000), 'yyyy-MM-dd hh:mm:ss');
     },
     navigation(name) {
-      this.$router.push({ name });
+      if (name != '') {
+        this.$router.push({ name });
+      } else {
+        this.$toast(this.$t('lang2'));
+      }
     },
     changeNav(item, index) {
       this.navIndex = index;
@@ -145,20 +225,13 @@ export default {
         }
       }
     },
-    getUserBalanceLog() {
-      homeApi.getUserBalanceLog({ page: this.page }).then(res => {
+    assets() {
+      homeApi.assets({}).then(res => {
         if (res.code == 200) {
-          // this.statusList = res.data.statusList;
-          this.totalReward = res.data.total;
-          // if (this.list.length >= res.data.data.total) {
-          //   this.page = -1; // 重置为 -1,表示没有更多数据
-          // } else {
-          //   this.list = [...this.list, ...res.data.data.data];
-          //   console.log(this.list.length);
-          //   if (this.list.length >= res.data.data.total) {
-          //     this.page = -1; // 重置为 -1,表示没有更多数据
-          //   }
-          // }
+          let data = res.data.coin_list;
+          this.balance = data.filter(i => i.coin_key == 'token')[0].amount;
+          this.teac = data.filter(i => i.coin_key == 'teac')[0].amount;
+          this.frozen = data.filter(i => i.coin_key == 'frozen')[0].amount;
         } else {
         }
       });
@@ -186,14 +259,14 @@ export default {
         }
       });
     },
-    actionGet() {
-      homeApi.assets().then(res => {
-        if (res.code == 200) {
-          this.assets = res.data.assets;
-          this.coinList = res.data.coin_list;
-        }
-      });
-    },
+    // actionGet() {
+    //   homeApi.assets().then(res => {
+    //     if (res.code == 200) {
+    //       this.assets = res.data.assets;
+    //       this.coinList = res.data.coin_list;
+    //     }
+    //   });
+    // },
   },
 };
 </script>
@@ -273,61 +346,53 @@ export default {
       border-bottom: 1px solid #ffffff;
     }
   }
+  .bg {
+    padding: 14px 14px 8px;
+    background-color: #fff;
 
-  .total_box {
-    position: relative;
-    display: flex;
-    align-items: center;
-    flex-direction: column;
-    justify-content: center;
-    width: 100%;
-    font-size: 12px;
-    color: #fff;
-    height: 180px;
-    padding: 30px 0 60px;
-    background: linear-gradient(to right, #1ab986, #25d7bb);
-    .f-sa {
-      width: 100%;
-    }
-    .total {
-      font-size: 28px;
-      text-align: center;
-      padding: 16px 0 6px;
-      color: rgba(#fff, 1);
-    }
-    .text {
-      font-size: 16px;
-      font-weight: bold;
-      color: rgba(#fff, 1);
-    }
-    .item {
-      color: rgba(#fff, 0.8);
-      width: 50%;
-      text-align: center;
+    .total_box {
+      position: relative;
       display: flex;
+      align-items: center;
       flex-direction: column;
-    }
-    .buy {
-      position: absolute;
-      right: 14px;
-      bottom: 14px;
+      justify-content: center;
+      // position: relative;
+      font-size: 12px;
+      color: #fff;
+      height: 150px;
+      // border-radius: 16px;
+      padding: 20px 20px 40px;
+      box-sizing: border-box;
+      border-radius: 10px;
+      background: linear-gradient(to right, #1bb986, #23d4b7);
 
-      &_btn {
-        color: #29b286;
-        height: 30px;
-        line-height: 30px;
-        font-size: 14px;
-        background-color: #ffffff;
-        border: none;
-        padding: 0 16px;
-        white-space: nowrap;
-        border-radius: 30px;
-        display: flex;
-        align-items: flex-start;
+      .total {
+        font-size: 28px;
+        text-align: center;
+        padding-top: 10px;
+      }
+      .text {
+        color: rgba(#fff, 0.8);
+      }
+      .buy_box {
+        position: absolute;
+        bottom: 14px;
+        width: 100%;
+        padding: 0 14px;
+      }
+      .buy {
+        &_btn {
+          color: #29b286;
+          height: 30px;
+          line-height: 30px;
+          font-size: 14px;
+          background-color: #ffffff;
+          border: none;
+          padding: 0 16px;
+          white-space: nowrap;
+          border-radius: 30px;
+        }
       }
-    }
-    .buy1 {
-      left: 14px;
     }
   }
 

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

@@ -28,12 +28,19 @@
             <van-image class="goods_list_img" radius="10" :src="item.img_url" />
             <div class="right" style="flex: 2">
               <span class="title">{{ item.name }}</span>
-              <div style="font-size: 11px;">{{$t('lang290')}}{{ item.order_no }}</div>
+              <div style="font-size: 11px">{{ $t('lang290') }}{{ item.order_no }}</div>
               <div class="green">{{ item.title }}</div>
               <div class="cen">
-                <span class="money"
-                  >{{ item.price }}<span class="ssm">{{ $t('lang174') }}</span></span
-                >
+                <span class="money" v-if="item.price > 0">
+                  {{ item.price }}<span class="ssm">{{ $t('lang174') }}</span>
+                </span>
+                <span class="money" v-else-if="item.price <= 0 && item.floor_price > 0">
+                  <span style="font-size: 13px">{{ $t('lang341') }}</span>
+                  {{ item.floor_price }}<span class="ssm">{{ $t('lang174') }}</span>
+                </span>
+                <span class="money" v-else-if="item.price <= 0 && item.floor_price <= 0">
+                  --<span class="ssm">{{ $t('lang174') }}</span>
+                </span>
               </div>
               <div class="cen" v-if="item.status == 2">
                 <span class="money" style="color: #29b286; font-size: 13px">
@@ -138,7 +145,7 @@
           </div>
           <div class="f-r">
             <span> {{ $t('lang190') }} </span>
-            <span class="s">{{ Math.floor(item.price * Number(item.gift_fee /  100) * 100) / 100 }} {{ $t('lang174') }}</span>
+            <span class="s">{{ Math.floor(item.price * Number(item.gift_fee / 100) * 100) / 100 }} {{ $t('lang174') }}</span>
           </div>
           <div class="f-s">
             <span> {{ $t('lang91') }} </span>

+ 34 - 12
src/views/storage/list.vue

@@ -5,8 +5,21 @@
       <span>{{ $t('lang217') }}</span>
     </div>
     <div class="btn_box">
-      <van-button :class="[typeIndex == 2 ? 'cc_btn cc_active' : 'cc_btn']" @click="changeType(2)">{{ $t('lang319') }}</van-button>
-      <van-button :class="[typeIndex == 1 ? 'cc_btn cc_active' : 'cc_btn']" @click="changeType(1)">{{ $t('lang320') }}</van-button>
+      <van-button
+        :class="[typeIndex == 2 ? 'cc_btn cc_active' : 'cc_btn']"
+        :icon="typeIndex == 2 ? 'https://teaclub.oss-cn-chengdu.aliyuncs.com/mall/mul_1.png' : 'https://teaclub.oss-cn-chengdu.aliyuncs.com/mall/mul.png'"
+        @click="changeType(2)"
+      >
+        <!-- <img src="@/assets/images/index/mul.png" class="icon" /> -->
+        {{ $t('lang319') }}</van-button
+      >
+      <van-button
+        :class="[typeIndex == 1 ? 'cc_btn cc_active' : 'cc_btn']"
+        :icon="typeIndex == 1 ? 'https://teaclub.oss-cn-chengdu.aliyuncs.com/mall/single_1.png' : 'https://teaclub.oss-cn-chengdu.aliyuncs.com/mall/single.png'"
+        @click="changeType(1)"
+        >{{ $t('lang320') }}</van-button
+      >
+      <van-button class="cc_btn" icon="https://teaclub.oss-cn-chengdu.aliyuncs.com/mall/teamine.png" @click="navigatorToPage('storing')">{{ $t('lang38') }}</van-button>
     </div>
     <div class="home_page" @scroll="handleScroll">
       <div class="pd goods_box" v-if="list.length > 0">
@@ -168,26 +181,31 @@ export default {
   width: 100%;
   box-sizing: border-box;
   position: fixed;
-  top: 49px;
+  top: 52px;
   display: flex;
   align-items: center;
   justify-content: space-between;
-  padding: 10px 16px 0;
+  padding: 10px 16px;
   background-color: #fff;
   .cc_btn {
-    width: 48%;
-    height: 38px;
+    width: 31%;
+    height: 36px;
     color: #29b286;
-    line-height: 38px;
+    line-height: 36px;
     font-size: 13px;
     // letter-spacing: 2px;
     text-align: center;
-    white-space: nowrap;
-    padding: 0 20px;
+    // white-space: nowrap;
+    padding: 0 10px;
     border: none;
-    border-radius: 4px;
-    border: 1px solid #29b286;
-    background-color: #fff;
+    border-radius: 8px;
+    // border: 1px solid #29b286;
+    background-color: #f3f3f3;
+    .van-button__text {
+      overflow: hidden; //超出的文本隐藏
+      text-overflow: ellipsis; //溢出用省略号显示
+      white-space: nowrap; //溢出不换行
+    }
   }
   .cc_active {
     color: #fff;
@@ -362,6 +380,10 @@ export default {
     }
   }
 }
+.icon {
+  width: 20px;
+  height: 20px;
+}
 .bare {
   text-align: center;
   font-size: 14px;

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

@@ -199,8 +199,8 @@ export default {
   }
 }
 .home_page {
-  padding: 60px 16px 20px;
-  height: 100vh;
+  min-height: 100vh;
+  padding: 60px 16px 110px;
 
   .jsb {
     justify-content: space-between;

+ 5 - 5
src/views/storage/singleDetail.vue

@@ -154,15 +154,15 @@ export default {
         cancelButtonText: _this.$t('lang135'),
       })
         .then(() => {
-          _this.show = true
+          _this.show = true;
           let params = { pledge_id: _this.$route.query.id, order_no: Object.assign({}, _this.order_no) };
           homeApi.createPledge(params).then(res => {
             if (res.code == 200) {
-              _this.show = false
+              _this.show = false;
               _this.$toast(_this.$t('lang326'));
               _this.$router.push({ name: 'storing' });
             } else {
-              _this.show = false
+              _this.show = false;
               _this.$toast(res.msg);
             }
           });
@@ -202,8 +202,8 @@ export default {
   }
 }
 .home_page {
-  padding: 60px 16px 20px;
-  height: 100vh;
+  min-height: 100vh;
+  padding: 60px 16px 110px;
 
   .jsb {
     justify-content: space-between;