xiaomei 6 months ago
parent
commit
d2cbeb4fb3

+ 88 - 0
src/api/home.js

@@ -1150,4 +1150,92 @@ export default {
       data
     })
   },
+  // teac获取配置
+  getTeacConfig(data) {
+    return request.request({
+      url: '/teac/getConfig',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac交易列表
+  getTeacList(data) {
+    return request.request({
+      url: '/teac/getTeacList',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac发布购买
+  setTeacBuying(data) {
+    return request.request({
+      url: '/teac/setBuying',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac发布出售
+  setTeacSell(data) {
+    return request.request({
+      url: '/teac/setSell',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac出售购买
+  setTeacSellOrder(data) {
+    return request.request({
+      url: '/teac/setSellOrder',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac求购出售
+  setTeacBuyOrder(data) {
+    return request.request({
+      url: '/teac/setBuyOrder',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac求购取消
+  cancelTrade(data) {
+    return request.request({
+      url: '/teac/cancelTrade',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac求购记录
+  getUserTeacList(data) {
+    return request.request({
+      url: '/teac/getUserTeacList',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
 }

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


+ 34 - 1
src/language/en.json

@@ -404,5 +404,38 @@
   "lang403": "Purchasing",
   "lang404": "Are you sure you want to cancel the purchase?",
   "lang405": "Are you sure you will pay CCXX to purchase the tea rights?",
-  "lang406": "You have no sales orders"
+  "lang406": "You have no sales orders",
+  "lang407": "Sell",
+  "lang408": "Sell TeaC",
+  "lang409": "Purchase information",
+  "lang410": "Sell quantity",
+  "lang411": "Selling price",
+  "lang412": "Selling description:",
+  "lang413": "Confirm selling",
+  "lang414": "Purchase price",
+  "lang415": "Confirm purchase",
+  "lang416": "Purchase description:",
+  "lang417": "Please enter the selling quantity",
+  "lang418": "Please enter the selling price",
+  "lang419": "Are you sure to buy?",
+  "lang420": "Please enter the purchase quantity",
+  "lang421": "Please enter the purchase price",
+  "lang422": "Purchase quantity:",
+  "lang423": "Pay TeaC:",
+  "lang424": "Selling information",
+  "lang425": "Get TeaC:",
+  "lang426": "Sell",
+  "lang427": "Publish successfully",
+  "lang428": "Conversion",
+  "lang429": "Sell quantity",
+  "lang430": "Payment required",
+  "lang431": "Quantity",
+  "lang432": "Total amount",
+  "lang433": "Purchase",
+  "lang434": "C2C record",
+  "lang435": "In progress",
+  "lang436": "Unit price:",
+  "lang437": "Purchase in progress",
+  "lang438": "Selling in progress",
+  "lang439": "Cancel sale"
 }

+ 33 - 30
src/language/zh.json

@@ -405,34 +405,37 @@
   "lang404": "是否确定取消求购?",
   "lang405": "您确认支付CCXX购买该茶权吗?",
   "lang406": "您无可出售订单",
-  "lang407": "",
-  "lang408": "",
-  "lang409": "",
-  "lang410": "",
-  "lang411": "",
-  "lang412": "",
-  "lang413": "",
-  "lang414": "",
-  "lang415": "",
-  "lang416": "",
-  "lang417": "",
-  "lang418": "",
-  "lang419": "",
-  "lang420": "",
-  "lang421": "",
-  "lang422": "",
-  "lang423": "",
-  "lang424": "",
-  "lang425": "",
-  "lang426": "",
-  "lang427": "",
-  "lang428": "",
-  "lang429": "",
-  "lang430": "",
-  "lang431": "",
-  "lang432": "",
-  "lang433": "",
-  "lang434": "",
-  "lang435": "",
-  "lang436": ""
+  "lang407": "出售",
+  "lang408": "出售TeaC",
+  "lang409": "购买信息",
+  "lang410": "出售数量",
+  "lang411": "出售单价",
+  "lang412": "出售说明:",
+  "lang413": "确认出售",
+  "lang414": "求购单价",
+  "lang415": "确认求购",
+  "lang416": "求购说明:",
+  "lang417": "请输入出售数量",
+  "lang418": "请输入出售单价",
+  "lang419": "是否确定求购?",
+  "lang420": "请输入求购数量",
+  "lang421": "请输入求购单价",
+  "lang422": "购买数量:",
+  "lang423": "支付TeaC:",
+  "lang424": "出售信息",
+  "lang425": "获得TeaC:",
+  "lang426": "卖出",
+  "lang427": "发布成功",
+  "lang428": "转化",
+  "lang429": "卖出数量",
+  "lang430": "需支付",
+  "lang431": "数量",
+  "lang432": "总额",
+  "lang433": "购买",
+  "lang434": "C2C记录",
+  "lang435": "进行中",
+  "lang436": "单价:",
+  "lang437": "求购中",
+  "lang438": "出售中",
+  "lang439": "取消出售"
 }

+ 27 - 0
src/router/index.js

@@ -52,6 +52,9 @@ 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'; //转账标记茶宝
+import C2CList from '../views/c2c/list.vue'; //c2c列表
+import teacSell from '../views/c2c/sell.vue'; //c2c出售
+import teacBuy from '../views/c2c/buy.vue'; //c2c求购
 Vue.use(VueRouter);
 const routes = [
 
@@ -378,6 +381,30 @@ const routes = [
           requiresAuth: true
         }
       },
+      {
+        path: 'C2CList',
+        name: 'C2CList',
+        component: C2CList,
+        meta: {
+          requiresAuth: true
+        }
+      },
+      {
+        path: 'teacSell',
+        name: 'teacSell',
+        component: teacSell,
+        meta: {
+          requiresAuth: true
+        }
+      },
+      {
+        path: 'teacBuy',
+        name: 'teacBuy',
+        component: teacBuy,
+        meta: {
+          requiresAuth: true
+        }
+      },
     ],
   },
 ];

+ 472 - 0
src/views/c2c/buy.vue

@@ -0,0 +1,472 @@
+<template>
+  <div class="assets">
+    <div class="head">
+      <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
+      <span>{{ $t('lang345') }}</span>
+    </div>
+    <div class="pd">
+      <div class="list">
+        <div class="box">
+          <div class="box_item">
+            <span class="left">{{ $t('lang370') }}</span>
+            <div class="f">
+              <img src="@/assets/images/index/teac.png" alt="" class="icon" />
+              <van-field v-model="stock" placeholder="0" class="input" type="number" />
+            </div>
+          </div>
+          <div class="box_item">
+            <span class="left">{{ $t('lang414') }}</span>
+            <div class="f">
+              <img src="@/assets/images/index/chabao.png" alt="" class="icon" />
+              <van-field v-model="price" placeholder="0" class="input" type="number" />
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="yuji_box">
+        <div class="title">{{ $t('lang364') }}</div>
+
+        <div class="f">
+          {{ $t('lang363') }}
+          <span class="grey f">
+            ({{ $t('lang362') + ':' }}
+
+            <svg width="12" height="22" viewBox="32 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="#808080" stroke-width="6" stroke-linecap="round" />
+              <line x1="52" y1="29" x2="52" y2="73" stroke="#808080" stroke-width="5.2" stroke-linecap="round" />
+              <line x1="63" y1="29" x2="63" y2="73" stroke="#808080" stroke-width="5.2" stroke-linecap="round" />
+            </svg>
+            {{ balance }})</span
+          >
+        </div>
+      </div>
+      <div class="buy" @click="submit">
+        <van-button class="buy_btn" type="primary">{{ $t('lang415') }}</van-button>
+      </div>
+      <div class="tips">
+        <div class="tips_tit">{{ $t('lang416') }}</div>
+        <div v-html="configInfo.buy_desc"></div>
+      </div>
+    </div>
+    <van-overlay :show="loading">
+      <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 { Dialog, Notify, Toast } from 'vant';
+export default {
+  data() {
+    return {
+      page: 0,
+      stock: '',
+      price: '',
+      configInfo: {
+        buy_min_price: 0,
+        buy_min_num: 0,
+        buy_serve_fee: 0,
+        buy_desc: '',
+      },
+      loading: false,
+      balance: 0,
+    };
+  },
+  mounted() {
+    this.getTeacConfig();
+    this.getUserInfo();
+  },
+  methods: {
+    //返回上一页
+    back() {
+      this.$router.back();
+    },
+    navigation(name) {
+      this.$router.push({ name });
+    },
+    changeNav(item, index) {
+      this.navIndex = index;
+    },
+    dateFormatFn(date) {
+      return dateFormat(new Date(date * 1000), 'yyyy-MM-dd hh:mm:ss');
+    },
+    getUserInfo() {
+      homeApi.getUserInfo({}).then(res => {
+        if (res.code == 200) {
+          this.balance = res.data.balance;
+        } else {
+        }
+      });
+    },
+    getTeacConfig() {
+      homeApi.getTeacConfig({}).then(res => {
+        if (res.code == 200) {
+          this.configInfo = res.data;
+        } else {
+        }
+      });
+    },
+    submit() {
+      let _this = this;
+      if (!this.stock) {
+        return this.$toast(this.$t('lang420'));
+      }
+      if (!this.price) {
+        return this.$toast(this.$t('lang421'));
+      }
+      let params = {
+        stock: this.stock,
+        price: this.price,
+      };
+      Dialog.confirm({
+        title: _this.$t('lang136'),
+        message: _this.$t('lang419'),
+        confirmButtonText: _this.$t('lang111'),
+        cancelButtonText: _this.$t('lang135'),
+      })
+        .then(() => {
+          _this.loading = true;
+          homeApi.setTeacBuying(params).then(res => {
+            if (res.code == 200) {
+              _this.loading = false;
+              Toast({ message: _this.$t('lang427') });
+              _this.$router.back();
+            } else if (res.code == 15001) {
+              _this.loading = false;
+              // setTimeout(() => {
+              //   _this.$router.push('recharge');
+              // }, 300);
+            } else {
+              _this.loading = false;
+            }
+          });
+        })
+        .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;
+}
+.f {
+  display: flex;
+  align-items: center;
+}
+.assets {
+  min-height: 100vh;
+  padding: 50px 0 0;
+  background-color: #fff;
+  .top {
+    color: #000;
+    padding-bottom: 16px;
+    margin: 0 6px;
+  }
+  .pd {
+    padding: 4px;
+    //   margin-top: 4px;
+    // background-color: #fff;
+  }
+
+  .bare {
+    text-align: center;
+    font-size: 14px;
+    padding: 60px 14px;
+    color: #888;
+  }
+  .list {
+    border-radius: 20px;
+    padding: 0 14px;
+    background-color: #fff;
+    // margin: 16px 6px;
+
+    .box {
+      width: 100%;
+      color: #000;
+      font-size: 14px;
+      //   padding: 18px 0 18px;
+
+      &_item {
+        display: flex;
+        flex-direction: column;
+        // align-items: center;
+        // justify-content: space-between;
+        padding: 16px 0 2px;
+        border-bottom: 0.5px solid rgba(190, 190, 190, 0.2);
+
+        .left {
+          font-size: 13px;
+          padding-bottom: 10px;
+        }
+        .mobile {
+          font-size: 14px;
+          color: #000;
+          font-weight: 550;
+        }
+        .input {
+          width: 180px;
+          font-size: 29px;
+          font-weight: 700;
+          margin-left: 6px;
+        }
+
+        .icon {
+          width: 24px;
+          height: 24px;
+        }
+      }
+    }
+  }
+  .buy {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 30px 0 16px;
+    &_btn {
+      width: 80%;
+      height: 40px;
+      line-height: 40px;
+      font-size: 14px;
+      white-space: nowrap;
+      letter-spacing: 1px;
+      padding: 0 10px;
+      border: none;
+      border-radius: 30px;
+      background-color: #29b286;
+    }
+  }
+  .tips {
+    color: #888888;
+    font-size: 12px;
+    line-height: 180%;
+    padding: 14px;
+
+    &_tit {
+      color: #000;
+    }
+  }
+
+  .yuji_box {
+    font-size: 12px;
+    color: #000;
+    letter-spacing: 1px;
+    padding: 14px;
+    border-radius: 12px;
+    margin-bottom: 10px;
+    border-bottom: 0.5px solid rgba(190, 190, 190, 0.2);
+    .pic {
+      width: 80px;
+      height: 80px;
+      border-radius: 8px;
+    }
+
+    .right {
+      padding-left: 14px;
+      .name_box {
+        color: #808080;
+        font-size: 13px;
+
+        .name {
+          color: #000;
+          font-size: 16px;
+          font-weight: 600;
+          line-height: 160%;
+        }
+      }
+      .qiu {
+        padding-top: 8px;
+        &_price {
+          font-size: 17px;
+          font-weight: 600;
+          margin-left: -2px;
+          margin-top: -3px;
+        }
+      }
+    }
+    .title {
+      font-size: 13px;
+      font-weight: 600;
+      line-height: 160%;
+      padding-bottom: 8px;
+    }
+    .price {
+      font-size: 13px;
+      font-weight: 600;
+      margin-left: -2px;
+    }
+    .green {
+      color: #29b286;
+    }
+    .grey {
+      color: #808080;
+    }
+    .van-checkbox {
+      padding-top: 6px;
+    }
+    .desc {
+      font-size: 11px;
+      line-height: 150%;
+      padding-top: 3px;
+    }
+    .yuji {
+      width: 100%;
+      // padding-top: 8px;
+    }
+    .font {
+      color: #808080;
+      font-size: 11px;
+    }
+    .snlist {
+      flex-wrap: wrap;
+      // justify-content: space-around;
+      justify-content: flex-start;
+      gap: 10px; /* 横向和纵向间距 */
+      padding-top: 8px;
+      &_item {
+        font-size: 11px;
+        text-align: center;
+        padding: 4px 6px;
+        border-radius: 4px;
+        // margin: 0 10px 10px 0;
+        width: calc((100% - 20px) / 3); /* 3列,减去两个gap */
+        background-color: #f5f5f5;
+      }
+      .snlist_item_active {
+        position: relative;
+        color: #29b286;
+        background-color: #cfe9e0;
+        svg {
+          position: absolute;
+          bottom: -6px;
+          right: -7px;
+          font-size: 1px;
+          width: 8px;
+          z-index: 100;
+          fill: #fff;
+        }
+      }
+      .snlist_item_active_tag {
+        bottom: 0px;
+        right: 0px;
+        width: 0;
+        height: 0;
+        z-index: 9;
+        position: absolute;
+        border-width: 8px 8px;
+        border-color: rgba(0, 0, 0, 0) #29b286 #29b286 rgba(0, 0, 0, 0);
+        border-style: solid;
+        border-radius: 4px;
+        margin: 0;
+        padding: 0;
+        box-sizing: border-box;
+      }
+    }
+    .reflash {
+      font-size: 10px;
+      color: #000;
+      width: calc(100vw - 150px);
+      padding: 8px;
+      border-radius: 6px;
+      margin-top: 8px;
+      background-color: #f5f5f5;
+
+      &_price {
+        font-size: 16px;
+        font-weight: 600;
+        margin-left: -6px;
+      }
+    }
+    .pt {
+      padding-top: 10px;
+    }
+    /deep/ .van-checkbox__icon .van-icon {
+      border-radius: 2px;
+      border-color: #29b286 !important;
+    }
+    /deep/.van-stepper__input {
+      background-color: #fff;
+    }
+    /deep/.van-stepper__plus,
+    /deep/.van-stepper__minus {
+      transform: scale(0.9);
+      border-radius: 50%;
+    }
+    /deep/.van-field {
+      font-size: 18px;
+      font-weight: 600;
+      margin-left: -10px;
+    }
+    /deep/.van-field__control::placeholder {
+      font-size: 15px;
+      font-weight: normal;
+    }
+    /deep/.van-field__control::-webkit-input-placeholder {
+      font-size: 15px;
+      font-weight: normal;
+    }
+    /deep/.van-field__control::-moz-placeholder {
+      font-size: 15px;
+      font-weight: normal;
+    }
+    /deep/.van-field__control::-ms-input-placeholder {
+      font-size: 15px;
+      font-weight: normal;
+    }
+  }
+}
+.wrapper {
+  // display: flex;
+  // justify-content: center;
+  .loading {
+    position: absolute;
+    left: 46%;
+    top: 46%;
+  }
+}
+</style>

+ 596 - 0
src/views/c2c/list.vue

@@ -0,0 +1,596 @@
+<template>
+  <div class="page" @scroll="handleScroll">
+    <!-- 顶部返回按钮 -->
+    <div class="head">
+      <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
+      <span>C2C</span>
+    </div>
+    <div class="box">
+      <div class="flex sb">
+        <div class="small_nav flex">
+          <span :class="[index == smallNavIndex ? 'small_nav_item nav_active' : 'small_nav_item']" v-for="(item, index) in smallNav" :key="index" @click="changeType(item, index)">{{ item.key }}</span>
+        </div>
+      </div>
+      <template>
+        <div class="list" v-if="list.length > 0">
+          <div class="list_item" v-for="(item, index) in list" :key="index">
+            <div class="flex pb">
+              <img :src="item.users.avatar" alt="" class="avatar" />
+              <span>{{ item.users.address.substring(0, 6) + '******' + item.users.address.substring(item.users.address.length - 5, item.users.address.length) }}</span>
+            </div>
+            <div class="flex pb">
+              <svg width="12" height="22" viewBox="32 -2 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="black" stroke-width="6" stroke-linecap="round" />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              <span class="price">{{ item.price }}</span>
+            </div>
+            <div class="pb">
+              <span class="grey">{{ $t('lang431') }}</span>
+              <span>{{ item.stock - item.num }}</span>
+            </div>
+            <div class="flex sb">
+              <div class="flex">
+                <span class="grey">{{ $t('lang432') }}</span>
+                <span class="flex">
+                  {{ item.total_price }}
+                  <svg width="12" height="22" viewBox="32 4 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="black" stroke-width="6" stroke-linecap="round" />
+                    <line x1="52" y1="29" x2="52" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                    <line x1="63" y1="29" x2="63" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                  </svg>
+                </span>
+              </div>
+              <div class="buy" v-if="smallNavIndex == 0" @click="buy(item)">{{ $t('lang433') }}</div>
+              <div class="buy" v-else-if="smallNavIndex == 1" @click="buy(item)">{{ $t('lang426') }}</div>
+            </div>
+          </div>
+        </div>
+        <div class="bare" v-else>
+          <span>{{ $t('lang60') }}</span>
+        </div>
+        <div class="btn_box" @click="navigatorTo('teacSell')" v-if="smallNavIndex == 0">
+          <div class="btn">{{ $t('lang408') }}</div>
+        </div>
+        <div class="btn_box" @click="navigatorTo('teacBuy')" v-else-if="smallNavIndex == 1">
+          <div class="btn">{{ $t('lang349') }}</div>
+        </div>
+      </template>
+    </div>
+    <van-popup v-model="buyPopop" round position="bottom">
+      <div class="area" v-if="smallNavIndex == 0">
+        <div class="title">{{ $t('lang409') }}</div>
+        <div class="popup_box">
+          <div class="f-r">
+            <span> {{ $t('lang422') }} </span>
+            <div class="d">
+              <van-field v-model="number" :placeholder="$t('lang119')" type="number" class="input" />
+            </div>
+          </div>
+          <div class="f-r">
+            <span> {{ $t('lang430') + ':' }} </span>
+            <span class="flex">
+              <svg width="12" height="22" viewBox="32 2 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="#363636" stroke-width="6" stroke-linecap="round" />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="#363636" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="#363636" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              {{ (number * item.price).toFixed(2) }}
+            </span>
+          </div>
+        </div>
+        <div class="submit">
+          <van-button class="submit_btn" type="primary" @click="setTeacSellOrder">{{ $t('lang71') }}</van-button>
+        </div>
+      </div>
+      <div class="area" v-else-if="smallNavIndex == 1">
+        <div class="title">{{ $t('lang424') }}</div>
+        <div class="popup_box">
+          <div class="f-r">
+            <span> {{ $t('lang429') + ':' }} </span>
+            <div class="d">
+              <van-field v-model="number" :placeholder="$t('lang119')" type="number" class="input" />
+            </div>
+          </div>
+          <div class="f-r">
+            <span> {{ $t('lang367') + `(${(configInfo.buy_serve_fee * 100).toFixed(2)}%):` }} </span>
+            <span class="flex">
+              <svg width="12" height="22" viewBox="32 1 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="#363636" stroke-width="6" stroke-linecap="round" />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="#363636" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="#363636" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              {{ (number * item.price * configInfo.buy_serve_fee).toFixed(2) }}
+            </span>
+          </div>
+          <div class="f-r">
+            <span> {{ $t('lang366') + ':' }} </span>
+            <span class="flex">
+              <svg width="12" height="22" viewBox="32 1 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="#363636" stroke-width="6" stroke-linecap="round" />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="#363636" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="#363636" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              {{ (number * item.price - number * item.price * configInfo.buy_serve_fee).toFixed(2) || 0 }}
+            </span>
+          </div>
+        </div>
+        <div class="submit">
+          <van-button class="submit_btn" type="primary" @click="setTeacBuyOrder">{{ $t('lang71') }}</van-button>
+        </div>
+      </div>
+    </van-popup>
+  </div>
+</template>
+  <script>
+import { homeApi } from '@/api/index';
+import { Dialog, Notify, Toast } from 'vant';
+export default {
+  data() {
+    return {
+      loading: false,
+      number: '',
+      list: [],
+      smallNav: [
+        {
+          key: this.$t('lang407'),
+          value: 1,
+        },
+        {
+          key: this.$t('lang345'),
+          value: 2,
+        },
+      ],
+      smallNavIndex: 0,
+      page: 1,
+      price: '', // 寄售金额
+      buyPopop: false,
+      item: {},
+      configInfo: {
+        sell_min_price: 0,
+        sell_min_num: 0,
+        sell_serve_fee: 0,
+        buy_min_price: 0,
+        buy_min_num: 0,
+        buy_serve_fee: 0,
+      },
+    };
+  },
+  mounted() {
+    this.getTeacList();
+    this.getTeacConfig();
+  },
+  methods: {
+    back() {
+      this.$router.back();
+    },
+    getTeacList() {
+      homeApi.getTeacList({ type_id: this.smallNav[this.smallNavIndex].value }).then(res => {
+        if (res.code == 200) {
+          this.total = res.data.total;
+          if (this.list.length >= res.data.total) {
+            this.page = -1; // 重置为 -1,表示没有更多数据
+          } else {
+            this.list = [...this.list, ...res.data.data];
+            if (this.list.length >= res.data.total) {
+              this.page = -1; // 重置为 -1,表示没有更多数据
+            }
+          }
+        } else {
+        }
+      });
+    },
+    getTeacConfig() {
+      homeApi.getTeacConfig({}).then(res => {
+        if (res.code == 200) {
+          this.configInfo = res.data;
+        } else {
+        }
+      });
+    },
+    handleScroll(event) {
+      const container = event.target;
+      const scrollTop = container.scrollTop; // 滚动距离
+      const scrollHeight = container.scrollHeight; // 内容总高度
+      const clientHeight = container.clientHeight; // 可视区域高度
+      // 判断是否滑动到底部
+      if (scrollTop + clientHeight >= scrollHeight - 10) {
+        console.log('Bottom');
+        if (this.page != -1) {
+          this.page++; // 页数加 1
+          this.getTeacList();
+        }
+      }
+    },
+    buy(item) {
+      this.buyPopop = true;
+      this.item = item;
+    },
+    setTeacBuyOrder() {
+      let _this = this;
+      let params = {
+        num: this.number,
+        teac_id: this.item.id,
+      };
+      this.loading = true;
+      homeApi.setTeacBuyOrder(params).then(res => {
+        if (res.code == 200) {
+          _this.loading = false;
+          _this.buyPopop = false;
+          _this.number = '';
+          _this.page = 1;
+          _this.list = [];
+          _this.getTeacList();
+          Toast({ message: _this.$t('lang152') });
+          // _this.$router.push('mine');
+        } else if (res.code == 15001) {
+          _this.loading = false;
+          // setTimeout(() => {
+          //   _this.$router.push('recharge');
+          // }, 300);
+        } else {
+          _this.loading = false;
+        }
+      });
+    },
+    setTeacSellOrder() {
+      let _this = this;
+      let params = {
+        num: this.number,
+        teac_id: this.item.id,
+      };
+      this.loading = true;
+      homeApi.setTeacSellOrder(params).then(res => {
+        if (res.code == 200) {
+          _this.loading = false;
+          _this.buyPopop = false;
+          _this.number = '';
+          _this.page = 1;
+          _this.list = [];
+          _this.getTeacList();
+          Toast({ message: _this.$t('lang152') });
+          // _this.$router.push('mine');
+        } else if (res.code == 15001) {
+          _this.loading = false;
+          // setTimeout(() => {
+          //   _this.$router.push('recharge');
+          // }, 300);
+        } else {
+          _this.loading = false;
+        }
+      });
+    },
+    changeType(item, index) {
+      this.smallNavIndex = index;
+      this.page = 1;
+      this.list = [];
+      this.getTeacList();
+    },
+    navigatorTo(router) {
+      if (this.$route.name == router) return;
+      if (router != '') {
+        this.$router.push({ name: router });
+      } else {
+        this.$toast(this.$t('lang2'));
+      }
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.page {
+  height: 100vh;
+  overflow: auto;
+}
+.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;
+  z-index: 99;
+  .arrow_img {
+    position: absolute;
+    left: 20px;
+    width: 10px;
+    height: 16px;
+    // transform: translate(0, -50%);
+  }
+}
+.box {
+  color: #000;
+  font-size: 13px;
+  min-height: 90vh;
+  padding: 6px 10px;
+  box-sizing: border-box;
+  border-radius: 14px;
+  margin: 56px 10px 120px;
+  background-color: #fff;
+
+  .flex {
+    display: flex;
+    align-items: center;
+  }
+  .sb {
+    justify-content: space-between;
+  }
+  .small_nav {
+    width: fit-content;
+    font-size: 11px;
+    padding: 2px;
+    border-radius: 20px;
+    margin-top: 6px;
+    background-color: #f5f5f5;
+    &_item {
+      color: #8b8b8b;
+      display: block;
+      text-align: center;
+      min-width: 26px;
+      padding: 4px 12px;
+      margin: 1px;
+      border-radius: 20px;
+      overflow: hidden; //超出的文本隐藏
+      text-overflow: ellipsis; //溢出用省略号显示
+      white-space: nowrap; //溢出不换行
+    }
+  }
+
+  .nav_active {
+    color: #fff;
+    background-color: #29b286 !important;
+  }
+
+  .list {
+    &_item {
+      letter-spacing: 1px;
+      padding: 14px 0;
+      border-bottom: 1px solid rgba(#c7c7c7, 0.3);
+      &_name {
+        font-weight: 600;
+        font-size: 15px;
+        width: 160px;
+        overflow: hidden; /* 确保超出容器的文本被裁剪 */
+        white-space: nowrap; /* 确保文本在一行内显示 */
+        text-overflow: ellipsis; /* 使用省略号表示文本超出 */
+      }
+      .avatar {
+        width: 30px;
+        height: 30px;
+        border-radius: 50%;
+        margin-right: 8px;
+      }
+      .sn {
+        font-weight: 600;
+        font-size: 13px;
+        padding-top: 8px;
+      }
+      .price {
+        font-weight: 600;
+        font-size: 17px;
+      }
+      .van-icon {
+        margin-left: 12px;
+      }
+      .grey {
+        color: #888888;
+        font-size: 12px;
+        padding-right: 6px;
+      }
+      .pb {
+        padding-bottom: 10px;
+      }
+      .buy {
+        color: #fff;
+        text-align: center;
+        font-size: 12px;
+        min-width: 26px;
+        padding: 4px 12px;
+        border-radius: 18px;
+        background-color: #29b286;
+      }
+      /deep/ .van-checkbox__icon .van-icon {
+        margin-right: 8px;
+        border-radius: 2px;
+        border-color: #29b286 !important;
+      }
+    }
+  }
+  .buy {
+    .price {
+      margin-left: -12px;
+    }
+    .wallet {
+      font-size: 11px;
+      color: #8b8b8b;
+      padding-top: 4px;
+    }
+  }
+
+  .announcement {
+    padding-top: 10px;
+    &_item {
+      padding: 10px 0;
+      border-bottom: 1px solid rgba(#c7c7c7, 0.3);
+      margin-bottom: 8px;
+    }
+  }
+
+  /deep/.van-tab {
+    flex: none;
+    font-weight: 600;
+    color: #c5c5c5;
+    font-size: 13px;
+    letter-spacing: 0.5px;
+    margin-right: 10px;
+  }
+
+  /deep/.van-tabs__nav--line {
+    padding-bottom: 10px;
+  }
+  .btn_box {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    height: 80px;
+    padding: 16px 20px;
+    border-top: 1px solid rgba(#c7c7c7, 0.3);
+    background-color: #fff;
+    .btn {
+      display: flex;
+      align-items: center;
+      flex-direction: column;
+      justify-content: center;
+      height: 100%;
+      box-sizing: border-box;
+      color: #fff;
+      font-size: 15px;
+      text-align: center;
+      font-weight: 600;
+      letter-spacing: 1px;
+      padding: 12px 10px;
+      border-radius: 22px;
+      background-color: #29b286;
+    }
+    .submit {
+      width: 58%;
+      background-color: #17ab79;
+    }
+  }
+  .bare {
+    text-align: center;
+    font-size: 14px;
+    padding: 60px 14px;
+    color: #888;
+  }
+}
+.flex {
+  display: flex;
+  align-items: center;
+}
+.area {
+  color: #363636;
+  font-size: 13px;
+  padding: 20px 30px;
+  width: 100%;
+  box-sizing: border-box;
+  position: relative;
+
+  .title {
+    color: #000;
+    font-size: 15px;
+    text-align: center;
+    font-weight: bold;
+    // padding: 0 0 14px;
+  }
+
+  .popup_box {
+    margin: 20px 0;
+    .f-r,
+    .f-s {
+      padding: 6px 0 15px;
+      letter-spacing: 1px;
+    }
+    .f-r span:first-child,
+    .f-s span:first-child {
+      padding-right: 8px;
+      white-space: nowrap;
+    }
+    .d {
+      display: flex;
+      align-items: flex-end;
+    }
+    .input {
+      // width: 100%;
+      // border: 1px solid #29b286;
+      // border-radius: 20px;
+      width: 230px;
+      border-bottom: 0.5px solid rgba(27, 27, 27, 0.15);
+    }
+    .k {
+      padding-top: 6px;
+    }
+
+    .van-cell {
+      padding: 0 !important;
+    }
+    .s {
+      font-size: 11px;
+      color: #999999;
+      width: 70%;
+    }
+  }
+  .submit {
+    width: 100%;
+    // position: fixed;
+    bottom: 30px;
+    box-sizing: border-box;
+    &_btn {
+      width: 100%;
+      height: 40px;
+      line-height: 40px;
+      font-size: 14px;
+      background-color: #29b286;
+      border: none;
+      white-space: nowrap;
+      border-radius: 30px;
+    }
+  }
+
+  ::v-deep .van-field__control {
+    padding: 0 6px;
+    font-size: 12px;
+  }
+
+  ::v-deep .van-hairline--top-bottom::after,
+  ::v-deep.van-hairline-unset--top-bottom::after {
+    border: none;
+  }
+}
+::v-deep .van-overlay {
+  background-color: rgba(#000, 0.3);
+}
+::v-deep .van-cell {
+  padding: 10px 0 !important;
+}
+.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;
+}
+.f-r {
+  display: flex;
+  align-items: center;
+}
+.f {
+  display: flex;
+}
+.f-s {
+  display: flex;
+  align-items: flex-start;
+}
+</style>
+  
+  

+ 484 - 0
src/views/c2c/records.vue

@@ -0,0 +1,484 @@
+<template>
+  <div class="page" @scroll="handleScroll">
+    <!-- 顶部返回按钮 -->
+    <div class="head">
+      <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
+      <span>{{ $t('lang434') }}</span>
+    </div>
+    <div class="box">
+      <template>
+        <div class="list" v-if="list.length > 0">
+          <div class="list_item" v-for="(item, index) in list" :key="index">
+            <div class="flex pb">
+              <img :src="item.users.avatar" alt="" class="avatar" />
+              <span>{{ item.users.address.substring(0, 6) + '******' + item.users.address.substring(item.users.address.length - 5, item.users.address.length) }}</span>
+            </div>
+            <div class="flex pb">
+              <svg width="12" height="22" viewBox="32 -2 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="black" stroke-width="6" stroke-linecap="round" />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              <span class="price">{{ item.price }}</span>
+            </div>
+            <div class="pb">
+              <span class="grey">{{ $t('lang431') }}</span>
+              <span>{{ item.stock - item.num }}</span>
+            </div>
+            <div class="flex sb">
+              <div class="flex">
+                <span class="grey">{{ $t('lang432') }}</span>
+                <span class="flex">
+                  {{ item.total_price }}
+                  <svg width="12" height="22" viewBox="32 4 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="black" stroke-width="6" stroke-linecap="round" />
+                    <line x1="52" y1="29" x2="52" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                    <line x1="63" y1="29" x2="63" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                  </svg>
+                </span>
+              </div>
+              <div class="buy" v-if="smallNavIndex == 0" @click="cancelTrade(item)">取消</div>
+            </div>
+          </div>
+        </div>
+        <div class="bare" v-else>
+          <span>{{ $t('lang60') }}</span>
+        </div>
+      </template>
+    </div>
+  </div>
+</template>
+    <script>
+import { homeApi } from '@/api/index';
+import { Dialog, Notify, Toast } from 'vant';
+export default {
+  data() {
+    return {
+      loading: false,
+      number: '',
+      list: [],
+      page: 1,
+      price: '', // 寄售金额
+      buyPopop: false,
+      item: {},
+      configInfo: {
+        sell_min_price: 0,
+        sell_min_num: 0,
+        sell_serve_fee: 0,
+        buy_min_price: 0,
+        buy_min_num: 0,
+        buy_serve_fee: 0,
+      },
+    };
+  },
+  mounted() {
+    this.getUserTeacList();
+    this.getTeacConfig();
+  },
+  methods: {
+    back() {
+      this.$router.back();
+    },
+    getUserTeacList() {
+      homeApi.getUserTeacList({}).then(res => {
+        if (res.code == 200) {
+          this.total = res.data.total;
+          if (this.list.length >= res.data.total) {
+            this.page = -1; // 重置为 -1,表示没有更多数据
+          } else {
+            this.list = [...this.list, ...res.data.data];
+            if (this.list.length >= res.data.total) {
+              this.page = -1; // 重置为 -1,表示没有更多数据
+            }
+          }
+        } else {
+        }
+      });
+    },
+    getTeacConfig() {
+      homeApi.getTeacConfig({}).then(res => {
+        if (res.code == 200) {
+          this.configInfo = res.data;
+        } else {
+        }
+      });
+    },
+    handleScroll(event) {
+      const container = event.target;
+      const scrollTop = container.scrollTop; // 滚动距离
+      const scrollHeight = container.scrollHeight; // 内容总高度
+      const clientHeight = container.clientHeight; // 可视区域高度
+      // 判断是否滑动到底部
+      if (scrollTop + clientHeight >= scrollHeight - 10) {
+        console.log('Bottom');
+        if (this.page != -1) {
+          this.page++; // 页数加 1
+          this.getUserTeacList();
+        }
+      }
+    },
+    cancelTrade() {
+      let _this = this;
+      let params = {
+        num: this.number,
+        teac_id: this.item.id,
+      };
+      Dialog.confirm({
+        title: _this.$t('lang136'),
+        message: _this.$t('lang374'),
+        confirmButtonText: _this.$t('lang111'),
+        cancelButtonText: _this.$t('lang135'),
+      })
+        .then(() => {
+          this.loading = true;
+          homeApi.cancelTrade(params).then(res => {
+            if (res.code == 200) {
+              _this.loading = false;
+              _this.buyPopop = false;
+              _this.number = '';
+              _this.page = 1;
+              _this.list = [];
+              _this.getUserTeacList();
+              Toast({ message: _this.$t('lang152') });
+              // _this.$router.push('mine');
+            } else if (res.code == 15001) {
+              _this.loading = false;
+              // setTimeout(() => {
+              //   _this.$router.push('recharge');
+              // }, 300);
+            } else {
+              _this.loading = false;
+            }
+          });
+        })
+        .catch(() => {
+          // on cancel
+        });
+    },
+    navigatorTo(router) {
+      if (this.$route.name == router) return;
+      if (router != '') {
+        this.$router.push({ name: router });
+      } else {
+        this.$toast(this.$t('lang2'));
+      }
+    },
+  },
+};
+</script>
+  <style lang="less" scoped>
+.page {
+  height: 100vh;
+  overflow: auto;
+}
+.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;
+  z-index: 99;
+  .arrow_img {
+    position: absolute;
+    left: 20px;
+    width: 10px;
+    height: 16px;
+    // transform: translate(0, -50%);
+  }
+}
+.box {
+  color: #000;
+  font-size: 13px;
+  min-height: 90vh;
+  padding: 6px 10px;
+  box-sizing: border-box;
+  border-radius: 14px;
+  margin: 56px 10px 120px;
+  background-color: #fff;
+
+  .flex {
+    display: flex;
+    align-items: center;
+  }
+  .sb {
+    justify-content: space-between;
+  }
+  .small_nav {
+    width: fit-content;
+    font-size: 11px;
+    padding: 2px;
+    border-radius: 20px;
+    margin-top: 6px;
+    background-color: #f5f5f5;
+    &_item {
+      color: #8b8b8b;
+      display: block;
+      text-align: center;
+      min-width: 26px;
+      padding: 4px 12px;
+      margin: 1px;
+      border-radius: 20px;
+      overflow: hidden; //超出的文本隐藏
+      text-overflow: ellipsis; //溢出用省略号显示
+      white-space: nowrap; //溢出不换行
+    }
+  }
+
+  .nav_active {
+    color: #fff;
+    background-color: #29b286 !important;
+  }
+
+  .list {
+    &_item {
+      letter-spacing: 1px;
+      padding: 14px 0;
+      border-bottom: 1px solid rgba(#c7c7c7, 0.3);
+      &_name {
+        font-weight: 600;
+        font-size: 15px;
+        width: 160px;
+        overflow: hidden; /* 确保超出容器的文本被裁剪 */
+        white-space: nowrap; /* 确保文本在一行内显示 */
+        text-overflow: ellipsis; /* 使用省略号表示文本超出 */
+      }
+      .avatar {
+        width: 30px;
+        height: 30px;
+        border-radius: 50%;
+        margin-right: 8px;
+      }
+      .sn {
+        font-weight: 600;
+        font-size: 13px;
+        padding-top: 8px;
+      }
+      .price {
+        font-weight: 600;
+        font-size: 17px;
+      }
+      .van-icon {
+        margin-left: 12px;
+      }
+      .grey {
+        color: #888888;
+        font-size: 12px;
+        padding-right: 6px;
+      }
+      .pb {
+        padding-bottom: 10px;
+      }
+      .buy {
+        color: #fff;
+        text-align: center;
+        font-size: 12px;
+        min-width: 26px;
+        padding: 4px 12px;
+        border-radius: 18px;
+        background-color: #29b286;
+      }
+      /deep/ .van-checkbox__icon .van-icon {
+        margin-right: 8px;
+        border-radius: 2px;
+        border-color: #29b286 !important;
+      }
+    }
+  }
+  .buy {
+    .price {
+      margin-left: -12px;
+    }
+    .wallet {
+      font-size: 11px;
+      color: #8b8b8b;
+      padding-top: 4px;
+    }
+  }
+
+  .announcement {
+    padding-top: 10px;
+    &_item {
+      padding: 10px 0;
+      border-bottom: 1px solid rgba(#c7c7c7, 0.3);
+      margin-bottom: 8px;
+    }
+  }
+
+  /deep/.van-tab {
+    flex: none;
+    font-weight: 600;
+    color: #c5c5c5;
+    font-size: 13px;
+    letter-spacing: 0.5px;
+    margin-right: 10px;
+  }
+
+  /deep/.van-tabs__nav--line {
+    padding-bottom: 10px;
+  }
+  .btn_box {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    height: 80px;
+    padding: 16px 20px;
+    border-top: 1px solid rgba(#c7c7c7, 0.3);
+    background-color: #fff;
+    .btn {
+      display: flex;
+      align-items: center;
+      flex-direction: column;
+      justify-content: center;
+      height: 100%;
+      box-sizing: border-box;
+      color: #fff;
+      font-size: 15px;
+      text-align: center;
+      font-weight: 600;
+      letter-spacing: 1px;
+      padding: 12px 10px;
+      border-radius: 22px;
+      background-color: #29b286;
+    }
+    .submit {
+      width: 58%;
+      background-color: #17ab79;
+    }
+  }
+  .bare {
+    text-align: center;
+    font-size: 14px;
+    padding: 60px 14px;
+    color: #888;
+  }
+}
+.flex {
+  display: flex;
+  align-items: center;
+}
+.area {
+  color: #363636;
+  font-size: 13px;
+  padding: 20px 30px;
+  width: 100%;
+  box-sizing: border-box;
+  position: relative;
+
+  .title {
+    color: #000;
+    font-size: 15px;
+    text-align: center;
+    font-weight: bold;
+    // padding: 0 0 14px;
+  }
+
+  .popup_box {
+    margin: 20px 0;
+    .f-r,
+    .f-s {
+      padding: 6px 0 15px;
+      letter-spacing: 1px;
+    }
+    .f-r span:first-child,
+    .f-s span:first-child {
+      padding-right: 8px;
+      white-space: nowrap;
+    }
+    .d {
+      display: flex;
+      align-items: flex-end;
+    }
+    .input {
+      // width: 100%;
+      // border: 1px solid #29b286;
+      // border-radius: 20px;
+      width: 230px;
+      border-bottom: 0.5px solid rgba(27, 27, 27, 0.15);
+    }
+    .k {
+      padding-top: 6px;
+    }
+
+    .van-cell {
+      padding: 0 !important;
+    }
+    .s {
+      font-size: 11px;
+      color: #999999;
+      width: 70%;
+    }
+  }
+  .submit {
+    width: 100%;
+    // position: fixed;
+    bottom: 30px;
+    box-sizing: border-box;
+    &_btn {
+      width: 100%;
+      height: 40px;
+      line-height: 40px;
+      font-size: 14px;
+      background-color: #29b286;
+      border: none;
+      white-space: nowrap;
+      border-radius: 30px;
+    }
+  }
+
+  ::v-deep .van-field__control {
+    padding: 0 6px;
+    font-size: 12px;
+  }
+
+  ::v-deep .van-hairline--top-bottom::after,
+  ::v-deep.van-hairline-unset--top-bottom::after {
+    border: none;
+  }
+}
+::v-deep .van-overlay {
+  background-color: rgba(#000, 0.3);
+}
+::v-deep .van-cell {
+  padding: 10px 0 !important;
+}
+.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;
+}
+.f-r {
+  display: flex;
+  align-items: center;
+}
+.f {
+  display: flex;
+}
+.f-s {
+  display: flex;
+  align-items: flex-start;
+}
+</style>
+    
+    

+ 484 - 0
src/views/c2c/sell.vue

@@ -0,0 +1,484 @@
+<template>
+  <div class="assets">
+    <div class="head">
+      <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
+      <span>{{ $t('lang407') }}</span>
+    </div>
+    <div class="pd">
+      <div class="list">
+        <div class="box">
+          <div class="box_item">
+            <span class="left">{{ $t('lang410') }}</span>
+            <div class="f">
+              <img src="@/assets/images/index/teac.png" alt="" class="icon" />
+              <van-field v-model="stock" placeholder="0" class="input" type="number" />
+            </div>
+          </div>
+          <div class="box_item">
+            <span class="left">{{ $t('lang411') }}</span>
+            <div class="f">
+              <img src="@/assets/images/index/chabao.png" alt="" class="icon" />
+              <van-field v-model="price" placeholder="0" class="input" type="number" />
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="yuji_box">
+        <div class="title">{{ $t('lang366') }}</div>
+        <div class="yuji">
+          <div class="f f-sb yuji_item">
+            <span class="grey">{{ $t('lang382') }}</span>
+            <span class="f">
+              <svg width="20" height="26" viewBox="0 0 100 100" 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="black" stroke-width="6" stroke-linecap="round" />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              {{ stock * price || 0 }}
+            </span>
+          </div>
+          <div class="f f-sb yuji_item">
+            <span class="grey">{{ $t('lang367') + '(' + configInfo.sell_serve_fee * 100 + '%)' }}</span>
+            <span class="f" style="color: red">
+              <svg width="20" height="26" viewBox="0 0 100 100" 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="red" stroke-width="6" stroke-linecap="round" />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="red" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="red" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              -{{ (stock * price * configInfo.sell_serve_fee).toFixed(2) || 0 }}
+            </span>
+          </div>
+          <div class="f f-sb yuji_item">
+            <span class="grey">{{ $t('lang366') }}</span>
+            <span class="f">
+              <svg width="20" height="26" viewBox="0 0 100 100" 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="black" stroke-width="6" stroke-linecap="round" />
+                <line x1="52" y1="29" x2="52" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                <line x1="63" y1="29" x2="63" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+              </svg>
+              {{ (stock * price - stock * price * configInfo.sell_serve_fee).toFixed(2) || 0 }}
+            </span>
+          </div>
+        </div>
+      </div>
+      <div class="buy" @click="submit">
+        <van-button class="buy_btn" type="primary">{{ $t('lang413') }}</van-button>
+      </div>
+      <div class="tips">
+        <div class="tips_tit">{{ $t('lang412') }}</div>
+        <div v-html="configInfo.sell_desc"></div>
+      </div>
+    </div>
+    <van-overlay :show="loading">
+      <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 { Dialog, Notify, Toast } from 'vant';
+export default {
+  data() {
+    return {
+      page: 0,
+      stock: '',
+      price: '',
+      configInfo: {
+        sell_min_price: 0,
+        sell_min_num: 0,
+        sell_serve_fee: 0,
+        sell_desc: '',
+      },
+      loading: false,
+    };
+  },
+  mounted() {
+    this.getTeacConfig();
+  },
+  methods: {
+    //返回上一页
+    back() {
+      this.$router.back();
+    },
+    navigation(name) {
+      this.$router.push({ name });
+    },
+    changeNav(item, index) {
+      this.navIndex = index;
+    },
+    dateFormatFn(date) {
+      return dateFormat(new Date(date * 1000), 'yyyy-MM-dd hh:mm:ss');
+    },
+
+    getTeacConfig() {
+      homeApi.getTeacConfig({}).then(res => {
+        if (res.code == 200) {
+          this.configInfo = res.data;
+        } else {
+        }
+      });
+    },
+    submit() {
+      let _this = this;
+      if (!this.stock) {
+        return this.$toast(this.$t('lang417'))
+      }
+      if (!this.price) {
+        return this.$toast(this.$t('lang418'))
+      }
+      let params = {
+        stock: this.stock,
+        price: this.price,
+      };
+      Dialog.confirm({
+        title: _this.$t('lang136'),
+        message: _this.$t('lang374'),
+        confirmButtonText: _this.$t('lang111'),
+        cancelButtonText: _this.$t('lang135'),
+      })
+        .then(() => {
+          _this.loading = true;
+          homeApi.setTeacSell(params).then(res => {
+            if (res.code == 200) {
+              _this.loading = false;
+              Toast({ message: _this.$t('lang427') });
+              _this.$router.back();
+            } else if (res.code == 15001) {
+              _this.loading = false;
+              // setTimeout(() => {
+              //   _this.$router.push('recharge');
+              // }, 300);
+            } else {
+              _this.loading = false;
+            }
+          });
+        })
+        .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;
+}
+.f {
+  display: flex;
+  align-items: center;
+}
+.assets {
+  min-height: 100vh;
+  padding: 50px 0 0;
+  background-color: #fff;
+  .top {
+    color: #000;
+    padding-bottom: 16px;
+    margin: 0 6px;
+  }
+  .pd {
+    padding: 4px;
+    //   margin-top: 4px;
+    // background-color: #fff;
+  }
+
+  .bare {
+    text-align: center;
+    font-size: 14px;
+    padding: 60px 14px;
+    color: #888;
+  }
+  .list {
+    border-radius: 20px;
+    padding: 0 14px;
+    background-color: #fff;
+    // margin: 16px 6px;
+
+    .box {
+      width: 100%;
+      color: #000;
+      font-size: 14px;
+      //   padding: 18px 0 18px;
+
+      &_item {
+        display: flex;
+        flex-direction: column;
+        // align-items: center;
+        // justify-content: space-between;
+        padding: 16px 0 2px;
+        border-bottom: 0.5px solid rgba(190, 190, 190, 0.2);
+
+        .left {
+          font-size: 13px;
+          padding-bottom: 10px;
+        }
+        .mobile {
+          font-size: 14px;
+          color: #000;
+          font-weight: 550;
+        }
+        .input {
+          width: 180px;
+          font-size: 29px;
+          font-weight: 700;
+          margin-left: 6px;
+        }
+
+        .icon {
+          width: 24px;
+          height: 24px;
+        }
+      }
+    }
+  }
+  .buy {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin: 30px 0 16px;
+    &_btn {
+      width: 80%;
+      height: 40px;
+      line-height: 40px;
+      font-size: 14px;
+      white-space: nowrap;
+      letter-spacing: 1px;
+      padding: 0 10px;
+      border: none;
+      border-radius: 30px;
+      background-color: #29b286;
+    }
+  }
+  .tips {
+    color: #888888;
+    font-size: 12px;
+    line-height: 180%;
+    padding: 14px;
+
+    &_tit {
+      color: #000;
+    }
+  }
+
+  .yuji_box {
+    font-size: 12px;
+    color: #000;
+    letter-spacing: 1px;
+    padding: 14px;
+    border-radius: 12px;
+    margin-bottom: 10px;
+    border-bottom: 0.5px solid rgba(190, 190, 190, 0.2);
+    .pic {
+      width: 80px;
+      height: 80px;
+      border-radius: 8px;
+    }
+
+    .right {
+      padding-left: 14px;
+      .name_box {
+        color: #808080;
+        font-size: 13px;
+
+        .name {
+          color: #000;
+          font-size: 16px;
+          font-weight: 600;
+          line-height: 160%;
+        }
+      }
+      .qiu {
+        padding-top: 8px;
+        &_price {
+          font-size: 17px;
+          font-weight: 600;
+          margin-left: -2px;
+          margin-top: -3px;
+        }
+      }
+    }
+    .title {
+      font-size: 13px;
+      font-weight: 600;
+      line-height: 160%;
+      padding-bottom: 8px;
+    }
+    .price {
+      font-size: 13px;
+      font-weight: 600;
+      margin-left: -2px;
+    }
+    .green {
+      color: #29b286;
+    }
+    .grey {
+      color: #808080;
+    }
+    .van-checkbox {
+      padding-top: 6px;
+    }
+    .desc {
+      font-size: 11px;
+      line-height: 150%;
+      padding-top: 3px;
+    }
+    .yuji {
+      width: 100%;
+      // padding-top: 8px;
+    }
+    .font {
+      color: #808080;
+      font-size: 11px;
+    }
+    .snlist {
+      flex-wrap: wrap;
+      // justify-content: space-around;
+      justify-content: flex-start;
+      gap: 10px; /* 横向和纵向间距 */
+      padding-top: 8px;
+      &_item {
+        font-size: 11px;
+        text-align: center;
+        padding: 4px 6px;
+        border-radius: 4px;
+        // margin: 0 10px 10px 0;
+        width: calc((100% - 20px) / 3); /* 3列,减去两个gap */
+        background-color: #f5f5f5;
+      }
+      .snlist_item_active {
+        position: relative;
+        color: #29b286;
+        background-color: #cfe9e0;
+        svg {
+          position: absolute;
+          bottom: -6px;
+          right: -7px;
+          font-size: 1px;
+          width: 8px;
+          z-index: 100;
+          fill: #fff;
+        }
+      }
+      .snlist_item_active_tag {
+        bottom: 0px;
+        right: 0px;
+        width: 0;
+        height: 0;
+        z-index: 9;
+        position: absolute;
+        border-width: 8px 8px;
+        border-color: rgba(0, 0, 0, 0) #29b286 #29b286 rgba(0, 0, 0, 0);
+        border-style: solid;
+        border-radius: 4px;
+        margin: 0;
+        padding: 0;
+        box-sizing: border-box;
+      }
+    }
+    .reflash {
+      font-size: 10px;
+      color: #000;
+      width: calc(100vw - 150px);
+      padding: 8px;
+      border-radius: 6px;
+      margin-top: 8px;
+      background-color: #f5f5f5;
+
+      &_price {
+        font-size: 16px;
+        font-weight: 600;
+        margin-left: -6px;
+      }
+    }
+    .pt {
+      padding-top: 10px;
+    }
+    /deep/ .van-checkbox__icon .van-icon {
+      border-radius: 2px;
+      border-color: #29b286 !important;
+    }
+    /deep/.van-stepper__input {
+      background-color: #fff;
+    }
+    /deep/.van-stepper__plus,
+    /deep/.van-stepper__minus {
+      transform: scale(0.9);
+      border-radius: 50%;
+    }
+    /deep/.van-field {
+      font-size: 18px;
+      font-weight: 600;
+      margin-left: -10px;
+    }
+    /deep/.van-field__control::placeholder {
+      font-size: 15px;
+      font-weight: normal;
+    }
+    /deep/.van-field__control::-webkit-input-placeholder {
+      font-size: 15px;
+      font-weight: normal;
+    }
+    /deep/.van-field__control::-moz-placeholder {
+      font-size: 15px;
+      font-weight: normal;
+    }
+    /deep/.van-field__control::-ms-input-placeholder {
+      font-size: 15px;
+      font-weight: normal;
+    }
+  }
+}
+.wrapper {
+  // display: flex;
+  // justify-content: center;
+  .loading {
+    position: absolute;
+    left: 46%;
+    top: 46%;
+  }
+}
+</style>

+ 117 - 5
src/views/mine/operationLog.vue

@@ -9,6 +9,7 @@
       <van-tabs v-model="navActive" color="#29B286" title-active-color="#29B286" title-inactive-color="#c8c9cc" class="van-tabs" @change="changeTab">
         <van-tab :title="$t('lang389')"></van-tab>
         <van-tab :title="$t('lang390')"></van-tab>
+        <van-tab :title="$t('lang434')"></van-tab>
       </van-tabs>
       <div class="top_box" v-if="navActive == 0">
         <van-popover v-model="showPopover" trigger="click" :actions="actions" @select="onSelect">
@@ -99,6 +100,58 @@
           <span>{{ $t('lang82') }}</span>
         </div>
       </div>
+      <div v-else-if="navActive == 2">
+        <div class="pd1 goods_box" v-if="teacList.length > 0">
+          <div class="goods_list" v-for="(item, index) in teacList" :key="index">
+            <div class="tags tags4" v-if="item.status == 0">{{ $t('lang192') }}</div>
+            <div class="tags1" v-if="item.status == 1 && item.type_id == 1">{{ $t('lang438') }}</div>
+            <div class="tags1 tags5" v-if="item.status == 1 && item.type_id == 2">{{ $t('lang437') }}</div>
+            <div class="tags tags2" v-if="item.status == 2">{{ $t('lang146') }}</div>
+
+            <div class="f">
+              <!-- <van-image class="goods_list_img" radius="10" :src="item.thum" /> -->
+              <div class="right" style="flex: 2">
+                <div class="cen">
+                  <span class="f-sb" v-if="item.price > 0">
+                    <span>{{ $t('lang436') }}</span>
+                    <div class="f-r">
+                      <svg width="24" height="24" viewBox="22 0 96 100" 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="black" stroke-width="6" stroke-linecap="round" />
+                        <line x1="52" y1="29" x2="52" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                        <line x1="63" y1="29" x2="63" y2="73" stroke="black" stroke-width="5.2" stroke-linecap="round" />
+                      </svg>
+                      <span class="money">{{ item.price }}</span>
+                    </div>
+                  </span>
+                </div>
+                <div class="f-sb">
+                  <span>{{ $t('lang393') }}</span>
+                  <span>{{ item.stock }}</span>
+                </div>
+                <div class="f-sb">
+                  <span>
+                    {{ $t('lang394') }}
+                  </span>
+                  <span>{{ item.num }}</span>
+                </div>
+                <div class="f-sb">
+                  <span>{{ $t('lang199') + ':' }}</span>
+                  <span>{{ dateFormatFn(item.create_time) }}</span>
+                </div>
+              </div>
+            </div>
+
+            <div class="btn_box" v-if="item.status == 1">
+              <div class="buy">
+                <van-button class="buy_btn btn1" type="primary" @click="cancelTrade(item)">{{ item.type_id == 1 ? $t('lang439') : $t('lang391') }}</van-button>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="bare" v-if="teacList.length <= 0">
+          <span>{{ $t('lang82') }}</span>
+        </div>
+      </div>
     </div>
     <van-overlay :show="loading">
       <div class="wrapper" @click.stop>
@@ -126,6 +179,7 @@ export default {
       navActive: 0,
       nft_list: [],
       statusList: [],
+      teacList: [],
       totalReward: 0,
       showPopover: false,
       // 通过 actions 属性来定义菜单选项
@@ -159,8 +213,10 @@ export default {
           this.page++; // 页数加 1
           if (this.navActive == 0) {
             this.getOperateLog(); // 触发加载更多
-          } else {
+          } else if (this.navActive == 1) {
             this.getMyBuyingList(); // 触发加载更多
+          } else if (this.navActive == 2) {
+            this.getUserTeacList(); // 触发加载更多
           }
         }
       }
@@ -192,6 +248,22 @@ export default {
         }
       });
     },
+    getUserTeacList() {
+      homeApi.getUserTeacList({ page: this.page }).then(res => {
+        if (res.code == 200) {
+          this.total = res.data.total;
+          if (this.teacList.length >= res.data.total) {
+            this.page = -1; // 重置为 -1,表示没有更多数据
+          } else {
+            this.teacList = [...this.teacList, ...res.data.data];
+            if (this.teacList.length >= res.data.total) {
+              this.page = -1; // 重置为 -1,表示没有更多数据
+            }
+          }
+        } else {
+        }
+      });
+    },
     getOperateLog() {
       let params = {
         page: this.page,
@@ -228,10 +300,13 @@ export default {
       this.page = 1;
       this.list = []; // 重置列表数据
       this.nft_list = [];
+      this.teacList = [];
       if (this.navActive == 0) {
         this.getOperateLog(); // 触发重新获取列表数据
-      } else {
+      } else if (this.navActive == 1) {
         this.getMyBuyingList(); // 触发重新获取列表数据
+      } else if (this.navActive == 2) {
+        this.getUserTeacList(); // 触发重新获取列表数据
       }
     },
     cancelBuying(item) {
@@ -266,6 +341,38 @@ export default {
           // on cancel
         });
     },
+    cancelTrade(item) {
+      let _this = this;
+      Dialog.confirm({
+        title: _this.$t('lang136'),
+        message: _this.$t('lang401'),
+        confirmButtonText: _this.$t('lang111'),
+        cancelButtonText: _this.$t('lang135'),
+      })
+        .then(() => {
+          _this.loading = true;
+          homeApi
+            .cancelTrade({ teac_id: item.id })
+            .then(res => {
+              if (res.code == 200) {
+                _this.loading = false;
+                _this.page = 1;
+                _this.teacList = [];
+                _this.getUserTeacList();
+                Notify({ type: 'success', message: _this.$t('lang150') });
+              } else {
+                _this.loading = false;
+                _this.$toast(res.msg);
+              }
+            })
+            .catch(err => {
+              _this.loading = false;
+            });
+        })
+        .catch(() => {
+          // on cancel
+        });
+    },
   },
 };
 </script>
@@ -567,6 +674,9 @@ export default {
   .tags4 {
     background-color: #cccccc;
   }
+  .tags5 {
+    background-color: #179b9b;
+  }
   &_img {
     width: 105px;
     height: 105px;
@@ -581,7 +691,7 @@ export default {
     justify-content: space-between;
     font-size: 13px;
     box-sizing: border-box;
-    padding: 6px 0;
+    padding: 18px 0 6px;
     .title {
       width: 100%;
       overflow: hidden; /* 确保超出容器的文本被裁剪 */
@@ -597,8 +707,10 @@ export default {
     }
     .cen {
       color: #000;
-
-      font-size: 12px;
+      // font-size: 12px;
+    }
+    .f-sb {
+      line-height: 200%;
     }
     .money {
       font-size: 15px;

+ 9 - 2
src/views/mine/share.vue

@@ -78,12 +78,15 @@
               <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 class="buy" @click="navigation('C2CList')">
+                <van-button class="buy_btn" type="primary">C2C</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('lang278') }}</van-button>
+              </div>
               <div class="buy" @click="navigation('')">
                 <van-button class="buy_btn" type="primary">{{ $t('lang337') }}</van-button>
               </div>
@@ -418,6 +421,7 @@ export default {
         &_btn {
           color: #29b286;
           height: 30px;
+          max-width: 70px;
           line-height: 30px;
           font-size: 14px;
           background-color: #ffffff;
@@ -425,6 +429,9 @@ export default {
           padding: 0 16px;
           white-space: nowrap;
           border-radius: 30px;
+          overflow: hidden; //超出的文本隐藏
+          text-overflow: ellipsis; //溢出用省略号显示
+          white-space: nowrap; //溢出不换行
         }
       }
     }

+ 7 - 9
src/views/transfer/detail.vue

@@ -23,14 +23,14 @@
       </div>
     </div>
     <div class="box">
-      <div class="bg" :style="{ backgroundImage: `url(${product.products.thum})` }"></div>
+      <div class="bg" :style="{ backgroundImage: `url(${product.thum})` }"></div>
       <div class="content">
         <!-- <div class="mb">
             <span>{{ $t('lang300') }}</span>
           </div> -->
-        <img :src="product.products.thum" alt="" class="pic" />
+        <img :src="product.thum" alt="" class="pic" />
 
-        <span class="name">{{ product.products.name }}</span>
+        <span class="name">{{ product.name }}</span>
         <div class="num">
           <div class="num_box">
             <div class="left">{{ $t('lang301') }}</div>
@@ -48,7 +48,7 @@
         <van-tab :title="$t('lang351')"></van-tab>
         <van-tab :title="$t('lang344')"></van-tab>
       </van-tabs>
-      <div v-if="navActive == 0" v-html="product.products.details"></div>
+      <div v-if="navActive == 0" v-html="product.details"></div>
       <div v-if="navActive == 1">
         <div class="announcement" v-if="announcement.length > 0">
           <div class="announcement_item" v-for="(item1, index1) in announcement" :key="index1">
@@ -94,9 +94,7 @@ export default {
       loading: false,
       number: 1,
       product: {
-        products: {
-          thum: '',
-        },
+        
         producttransfer: [],
       },
       navActive: 0,
@@ -168,7 +166,7 @@ export default {
       });
     },
     marketAnnouncement() {
-      homeApi.marketAnnouncement({ product_id: this.product.product_id, page: this.page }).then(res => {
+      homeApi.marketAnnouncement({ product_id: this.product.id, page: this.page }).then(res => {
         if (res.code == 200) {
           if (this.announcement.length >= res.data.total) {
             this.page = -1; // 重置为 -1,表示没有更多数据
@@ -208,7 +206,7 @@ export default {
     navigatorTo(name, query) {
       if (name == 'TransferOrder') {
         query = {
-          product: JSON.stringify(this.product.products),
+          product: JSON.stringify(this.product),
           checkOrder: JSON.stringify(this.product.producttransfer),
         };
       }

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

@@ -53,7 +53,7 @@
         </div>
       </div>
       <div class="goods_box" v-if="list.length > 0">
-        <div class="goods_list jsb" v-for="(item, index) in list" :key="index" @click="navigatorToPage('typeDetail', item.id)">
+        <div class="goods_list jsb" v-for="(item, index) in list" :key="index" @click="navigatorToPage('typeDetail', item.product_id)">
           <div class="info">
             <van-image class="goods_list_img" radius="10" :src="item.img_url" />
             <div class="name_box">

+ 12 - 12
src/views/transfer/typeDetail.vue

@@ -23,14 +23,14 @@
       </div>
     </div>
     <div class="box" @scroll="handleScroll">
-      <div class="bg" :style="{ backgroundImage: `url(${product.products.thum})` }"></div>
+      <div class="bg" :style="{ backgroundImage: `url(${product.thum})` }"></div>
       <div class="content">
         <!-- <div class="mb">
           <span>{{ $t('lang300') }}</span>
         </div> -->
-        <img :src="product.products.thum" alt="" class="pic" />
+        <img :src="product.thum" alt="" class="pic" />
 
-        <span class="name">{{ product.products.name }}</span>
+        <span class="name">{{ product.name }}</span>
         <div class="num">
           <div class="num_box">
             <div class="left">{{ $t('lang301') }}</div>
@@ -76,7 +76,7 @@
                   <van-checkbox :name="item" @click.stop shape="square" checked-color="#29b286" icon-size="16px"></van-checkbox>
                   <div @click="navigatorTo('TransferDetail', { id: ids, transfer_id: item.id })">
                     <div class="flex">
-                      <span class="list_item_name">{{ product.products.name }}</span>
+                      <span class="list_item_name">{{ product.name }}</span>
                       <div class="lock flex" v-if="new Date().getTime() - item.lock_time * 1000 <= 180000 && new Date().getTime() - item.lock_time * 1000 > 0">
                         <svg t="1746769983067" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15442" width="11" height="11">
                           <path
@@ -114,7 +114,7 @@
         </template>
         <template v-else-if="navActive == 0 && smallNavIndex == 1">
           <div class="list buy" v-if="buyingList.length > 0">
-            <div class="list_item flex sb" v-for="(item, index) in buyingList" @click="navigatorTo('soldConsignment', { product_id: product.product_id, buying: item.id })" :key="index">
+            <div class="list_item flex sb" v-for="(item, index) in buyingList" @click="navigatorTo('soldConsignment', { product_id: product.id, buying: item.id })" :key="index">
               <div>
                 <div class="flex">
                   <svg width="28" height="28" viewBox="28 2 100 96" xmlns="http://www.w3.org/2000/svg">
@@ -142,7 +142,7 @@
           <div class="bare" v-else>
             <span>{{ $t('lang60') }}</span>
           </div>
-          <div class="btn_box" @click="navigatorTo('initiatePurchase', { product: JSON.stringify(product.products) })">
+          <div class="btn_box" @click="navigatorTo('initiatePurchase', { product: JSON.stringify(product) })">
             <div class="btn">{{ $t('lang349') }}</div>
           </div>
         </template>
@@ -170,9 +170,9 @@ export default {
       submitPopop: false,
       number: 1,
       product: {
-        products: {
-          thum: '',
-        },
+        // products: {
+        //   thum: '',
+        // },
         producttransfer: [],
       },
       navActive: 0,
@@ -231,7 +231,7 @@ export default {
       }
     },
     marketAnnouncement() {
-      homeApi.marketAnnouncement({ product_id: this.product.product_id, page: this.page }).then(res => {
+      homeApi.marketAnnouncement({ product_id: this.product.id, page: this.page }).then(res => {
         if (res.code == 200) {
           if (this.announcement.length >= res.data.total) {
             this.page = -1; // 重置为 -1,表示没有更多数据
@@ -246,7 +246,7 @@ export default {
       });
     },
     getBuyingList() {
-      homeApi.getBuyingList({ product_id: this.product.product_id }).then(res => {
+      homeApi.getBuyingList({ product_id: this.product.id }).then(res => {
         if (res.code == 200) {
           this.buyingList = res.data;
         } else {
@@ -284,7 +284,7 @@ export default {
           return this.$toast(this.$t('lang373'));
         }
         query = {
-          product: JSON.stringify(this.product.products),
+          product: JSON.stringify(this.product),
           checkOrder: JSON.stringify(this.checkOrder),
         };
       }