Browse Source

teac兑换

xiaomei 6 months ago
parent
commit
959dadc4f6

+ 35 - 2
src/api/home.js

@@ -1241,7 +1241,7 @@ export default {
   // 福利兑换
   getWelfareRedeConfig(data) {
     return request.request({
-      url: '/ledger/getWelfareRedeConfig',
+      url: '/exchange/getWelfareRedeConfig',
       method: "post",
       headers: {
         'Accept-Language': localStorage.getItem('language') || 'zh-cn',
@@ -1252,7 +1252,7 @@ export default {
   // 福利兑换提交
   submitWelfare(data) {
     return request.request({
-      url: '/ledger/submitWelfare',
+      url: '/exchange/submitWelfare',
       method: "post",
       headers: {
         'Accept-Language': localStorage.getItem('language') || 'zh-cn',
@@ -1271,4 +1271,37 @@ export default {
       data
     })
   },
+  // teac兑换列表
+  getTeacExList(data) {
+    return request.request({
+      url: '/exchange/getTeacList',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac兑换详情
+  getTeacExDetail(data) {
+    return request.request({
+      url: '/exchange/getTeacDetail',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
+  // teac兑换提交
+  getTeacExOrder(data) {
+    return request.request({
+      url: '/exchange/getTeacOrder',
+      method: "post",
+      headers: {
+        'Accept-Language': localStorage.getItem('language') || 'zh-cn',
+      },
+      data
+    })
+  },
 }

+ 3 - 1
src/language/en.json

@@ -452,5 +452,7 @@
   "lang451": "Please select the token currency",
   "lang452": "Newcomer Gift Pack",
   "lang453": "Service Agreement",
-  "lang454": "Please enter the search keyword"
+  "lang454": "Please enter the search keyword",
+  "lang455": "TeaC Exchange",
+  "lang456": "Exchange Now"
 }

+ 2 - 2
src/language/zh.json

@@ -453,8 +453,8 @@
   "lang452": "新人礼包",
   "lang453": "服务协议",
   "lang454": "请输入搜索关键词",
-  "lang455": "",
-  "lang456": "",
+  "lang455": "TeaC兑换",
+  "lang456": "立即兑换",
   "lang457": "",
   "lang458": "",
   "lang459": ""

+ 18 - 0
src/router/index.js

@@ -57,6 +57,8 @@ import teacSell from '../views/c2c/sell.vue'; //c2c出售
 import teacBuy from '../views/c2c/buy.vue'; //c2c求购
 import exchange from '../views/mine/exchange.vue';  //兑换
 import kf from '../views/index/kf.vue';  //客服
+import exList from '../views/teacEx/index.vue';  //Teac兑换
+import exDetail from '../views/teacEx/detail.vue';  //Teac兑换详情
 Vue.use(VueRouter);
 const routes = [
 
@@ -423,6 +425,22 @@ const routes = [
           requiresAuth: true
         }
       },
+      {
+        path: 'exList',
+        name: 'exList',
+        component: exList,
+        meta: {
+          requiresAuth: true
+        }
+      },
+      {
+        path: 'exDetail',
+        name: 'exDetail',
+        component: exDetail,
+        meta: {
+          requiresAuth: true
+        }
+      },
     ],
   },
 ];

+ 1 - 1
src/views/mine/share.vue

@@ -87,7 +87,7 @@
               <div class="buy" @click="navigation('')">
                 <van-button class="buy_btn" type="primary">{{ $t('lang278') }}</van-button>
               </div>
-              <div class="buy" @click="navigation('')">
+              <div class="buy" @click="navigation('exList')">
                 <van-button class="buy_btn" type="primary">{{ $t('lang337') }}</van-button>
               </div>
             </div>

+ 1 - 1
src/views/mine/teaRights.vue

@@ -30,7 +30,7 @@
             <div class="right" style="flex: 2">
               <span class="title">{{ item.name }}</span>
               <div style="font-size: 11px">{{ $t('lang290') }}{{ item.order_no }}</div>
-              <div class="green">{{ item.title }}</div>
+              <div class="green" v-if="item.title">{{ item.title }}</div>
               <div class="cen">
                 <span class="money f-r" v-if="item.price > 0">
                   <svg width="18" height="22" viewBox="20 -2 50 96" xmlns="http://www.w3.org/2000/svg">

+ 525 - 0
src/views/teacEx/detail.vue

@@ -0,0 +1,525 @@
+<template>
+  <div class="product-detail-page">
+    <!-- 顶部返回按钮 -->
+    <!-- <van-nav-bar title="NFTCHA-全球首个NFT茶交易平台" left-arrow @click-left="goBack" /> -->
+    <div class="back" @click="goBack">
+      <van-icon name="arrow-left" size="22" />
+    </div>
+    <!-- 商品图片轮播 -->
+    <van-swipe class="product-swiper" autoplay="3000" indicator-color="#fff">
+      <van-swipe-item class="swipe-item" v-for="(image, index) in product.images" :key="index">
+        <!-- <img :src="image" alt="商品图片" /> -->
+        <van-image class="product-image" style="width: 100%; height: 100%" radius="0" :src="image" />
+      </van-swipe-item>
+    </van-swipe>
+
+    <!-- 商品信息 -->
+    <div class="product-info">
+      <div class="product-price-stock">
+        <div class="left">
+          <div class="price">
+            <span>{{ product.teac_price }}</span>
+            <span class="small" style="color: #fff">TeaC</span>
+          </div>
+        </div>
+      </div>
+      <div class="goods_info">
+        <div class="flex jsb">
+          <span class="title">{{ product.name }}</span>
+        </div>
+      </div>
+    </div>
+
+    <!-- 商品详情 -->
+    <div class="product-details">
+      <div class="section-title">{{ $t('lang62') }}</div>
+    </div>
+
+    <!-- 宣传图片 -->
+    <div v-html="product.details" class="promo-image"></div>
+    <!-- 底部导航栏 -->
+    <div class="bottom">
+      <div class="flex">
+        <div class="flex flex-c" @click="toPage('kf')">
+          <img src="@/assets/images/trade/custom.png" alt="" class="icon" />
+          <span>{{ $t('lang67') }}</span>
+        </div>
+        <div class="flex flex-c" @click="toPage('invite')">
+          <img src="@/assets/images/trade/share.png" alt="" class="icon" />
+          <span>{{ $t('lang68') }}</span>
+        </div>
+      </div>
+      <div class="buy" @click="stepperShow = true">
+        <van-button class="buy_btn" type="primary">{{ $t('lang456') }}</van-button>
+      </div>
+    </div>
+    <!-- 选择数量 -->
+    <van-popup v-model="stepperShow" round position="bottom">
+      <div class="area">
+        <div class="title">{{ $t('lang242') }}</div>
+        <div class="stepper">
+          <span>{{ $t('lang242') }}</span>
+          <van-stepper v-model="number" min="1" />
+        </div>
+        <div class="submit">
+          <van-button class="submit_btn" type="primary" @click="submitNoarea">{{ $t('lang71') }}</van-button>
+        </div>
+      </div>
+    </van-popup>
+    <van-popup v-model="loading" round class="loading-popup">
+      <div class="loading">
+        <van-loading type="spinner" />
+      </div>
+    </van-popup>
+  </div>
+</template>
+  <script>
+import { homeApi } from '@/api/index';
+import { Dialog, Notify, Toast } from 'vant';
+export default {
+  data() {
+    return {
+      product: {},
+      cascaderShow: false,
+      loading: false,
+      stepperShow: false,
+      number: 1,
+    };
+  },
+  mounted() {
+    this.getTeacExDetail(this.$route.query.id);
+  },
+  methods: {
+    goBack() {
+      this.$router.back();
+    },
+    toPage(name) {
+      this.$router.push({ name });
+    },
+    getTeacExDetail(id) {
+      homeApi.getTeacExDetail({ product_id: id }).then(res => {
+        if (res.code == 200) {
+          this.product = res.data;
+          this.product.images = res.data.images.split(',');
+        } else {
+        }
+      });
+    },
+    // 无关联地区的
+    submitNoarea() {
+      if (this.number <= 0) {
+        return Notify({ type: 'warning', message: this.$t('lang119') });
+      }
+      let _this = this;
+      Dialog.confirm({
+        title: this.$t('lang136'),
+        message: this.$t('lang450'),
+        confirmButtonText: _this.$t('lang111'),
+        cancelButtonText: _this.$t('lang135'),
+      })
+        .then(() => {
+          _this.loading = true;
+          homeApi.getTeacExOrder({ product_id: _this.product.id, stock: _this.number }).then(res => {
+            if (res.code == 200) {
+              _this.loading = false;
+              _this.stepperShow = false;
+              Toast({ message: res.msg });
+              _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
+        });
+    },
+  },
+};
+</script>
+  <style lang="less" scoped>
+.product-detail-page {
+  //   background-color: #fff;
+  min-height: 100vh;
+  padding-bottom: 100px;
+}
+
+.product-swiper {
+  height: 250px;
+  width: 100vw;
+}
+
+.product-image {
+  width: 100%;
+  height: 100%;
+}
+
+.product-info {
+  .product-price-stock {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 6px 14px;
+    background: linear-gradient(to right, #1ab986, #25d7bb);
+    .left {
+      flex: 1;
+      padding-right: 10px;
+      .price {
+        font-size: 22px;
+        color: #fff;
+        .small {
+          color: #e7e7e7;
+          font-size: 12px;
+          padding-right: 6px;
+        }
+      }
+      .tags {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        font-size: 11px;
+        color: #f8f8f8;
+        text-align: right;
+        margin-top: 6px;
+        .tag {
+          white-space: nowrap;
+          color: #1ab986;
+          font-size: 11px;
+          border-radius: 4px;
+          background-color: #fff;
+        }
+      }
+    }
+    .end {
+      text-align: center;
+      line-height: 40px;
+    }
+    .countdown {
+      min-width: 100px;
+      height: 40px;
+      font-size: 13px;
+      border-left: 1px solid #f1f1f1;
+      padding-left: 10px;
+      .clock {
+        width: 20px;
+        height: 20px;
+        margin-right: 4px;
+      }
+      .count {
+        margin-top: 6px;
+      }
+      .colon {
+        display: inline-block;
+        margin: 0 4px;
+        color: #fff;
+        font-size: 11px;
+      }
+      .block {
+        display: inline-block;
+        width: 21px;
+        color: #1ab986;
+        font-size: 12px;
+        text-align: center;
+        border-radius: 4px;
+        background-color: #fff;
+      }
+    }
+  }
+
+  .goods_info {
+    padding: 8px 14px;
+    background-color: #fff;
+    .title {
+      font-size: 16px;
+      font-weight: 550;
+      color: #3d3d3d;
+    }
+    .red {
+      color: rgb(255, 48, 48);
+      font-size: 11px;
+    }
+    .tag {
+      color: #0db39a;
+      font-size: 11px;
+      padding-top: 8px;
+    }
+  }
+}
+.issue {
+  color: #aaaaaa;
+  font-size: 13px;
+  padding: 16px 14px;
+  margin: 8px 0;
+  background-color: #ffffff;
+  .item {
+    .ellipsis-icon {
+      transform: rotate(90deg);
+      margin-left: 0.8em;
+    }
+  }
+  .ssm {
+    content: 'USDT';
+    font-size: 8px;
+  }
+  .item:last-child {
+    .ellipsis-icon {
+      display: none;
+    }
+  }
+  .tag {
+    font-size: 12px;
+    padding: 2px 6px;
+    border-radius: 4px;
+    background-color: #fff;
+  }
+  .current {
+    color: #000;
+    .red {
+      color: rgb(255, 48, 48);
+    }
+    .tag {
+      color: #29b286;
+
+      background-color: #d4f0e7;
+    }
+  }
+}
+.zp {
+  color: #3d3d3d;
+  font-size: 12px;
+  padding: 16px 14px;
+  margin: 8px 0;
+  background-color: #ffffff;
+  white-space: nowrap;
+
+  .safe {
+    width: 22px;
+    height: 22px;
+    margin-right: 4px;
+  }
+  .t {
+    font-size: 13px;
+    white-space: wrap;
+  }
+}
+.jsb {
+  justify-content: space-between;
+}
+.flex {
+  display: flex;
+  align-items: center;
+}
+.section-title {
+  font-size: 15px;
+  font-weight: bold;
+}
+
+.product-details {
+  color: #3d3d3d;
+  font-size: 12px;
+  padding: 16px 14px;
+  margin: 8px 0 0;
+  background-color: #ffffff;
+
+  .box {
+    color: #aaaaaa;
+    flex-wrap: wrap;
+    padding: 7px 14px;
+    border-radius: 10px;
+    background-color: #ededed;
+    .item {
+      display: flex;
+      align-items: center;
+      width: 50%;
+      padding: 7px 0px;
+      .val {
+        color: #000;
+        width: 50%;
+        // display: block;
+      }
+    }
+  }
+}
+.ellipsis {
+  overflow: hidden; /* 确保超出容器的文本被裁剪 */
+  white-space: nowrap; /* 确保文本在一行内显示 */
+  text-overflow: ellipsis; /* 使用省略号表示文本超出 */
+}
+.promo-image {
+  width: 100%;
+  img {
+    width: 100% !important;
+  }
+  //   margin-top: 14px;
+}
+.stepper {
+  color: #000;
+  font-size: 14px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 36px 0 50px;
+}
+.van-tabbar-item {
+  font-size: 14px;
+}
+.bottom {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  height: 50px;
+  background-color: #fff;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 0 14px;
+  box-sizing: border-box;
+  .flex-c {
+    color: #3d3d3d;
+    font-size: 10px;
+    flex-direction: column;
+    margin-right: 16px;
+    .icon {
+      width: 22px;
+      height: 22px;
+      margin-bottom: 3px;
+    }
+  }
+
+  .buy {
+    &_btn {
+      height: 30px;
+      line-height: 30px;
+      font-size: 13px;
+      background-color: #29b286;
+      border: none;
+      padding: 0 16px;
+      white-space: nowrap;
+      border-radius: 30px;
+    }
+  }
+}
+.back {
+  position: fixed;
+  z-index: 99;
+  top: 14px;
+  left: 14px;
+  box-sizing: border-box;
+  width: 40px;
+  height: 40px;
+  margin: auto auto;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 50%;
+  background-color: #7a777b;
+}
+.area {
+  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;
+  }
+  .vanlist {
+    max-height: 350px;
+    min-height: 350px;
+    overflow: auto;
+    box-sizing: border-box;
+    margin: 20px 0;
+    border: none !important;
+
+    .item {
+      padding: 12px 0 !important;
+      border-bottom: 0.5px solid rgba(190, 190, 190, 0.15);
+    }
+  }
+  .nomore {
+    color: #aaa;
+    text-align: center;
+    font-size: 12px;
+    height: 350px;
+    padding: 40px 0;
+  }
+  .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;
+    }
+  }
+  .input {
+    width: 100%;
+    border: 1px solid #29b286;
+    border-radius: 20px;
+  }
+  ::v-deep .van-field__control {
+    padding: 6px 12px;
+  }
+  ::v-deep .van-icon-search {
+    font-size: 20px;
+    color: #29b286;
+    font-weight: bold;
+    margin-right: 10px;
+  }
+
+  ::v-deep .van-hairline--top-bottom::after,
+  ::v-deep.van-hairline-unset--top-bottom::after {
+    border: none;
+  }
+}
+::v-deep .van-hairline--left::after {
+  border-left-width: 0.005px !important;
+}
+::v-deep .van-cascader__option,
+::v-deep .van-cascader__title {
+  color: #000;
+}
+
+.loading {
+  padding: 50px 60px;
+  border: none;
+  background-color: rgba(#353535, 1);
+}
+.loading-popup {
+  background-color: rgba(#353535, 0);
+}
+::v-deep .van-stepper__plus::after {
+  font-size: 12px !important;
+  width: 1%;
+  height: 12px;
+  // transform: scale(0.5);
+}
+::v-deep .van-stepper__plus::before {
+  // font-size: 12px !important;
+  width: 12px;
+  height: 2%;
+  // transform: scale(0.5);
+}
+::v-deep .van-stepper__minus::before {
+  width: 12px;
+  height: 2%;
+}
+</style>
+  
+  

+ 320 - 0
src/views/teacEx/index.vue

@@ -0,0 +1,320 @@
+<template>
+  <div class="home_page" @scroll="handleScroll">
+    <div class="head">
+      <img @click="back" src="@/assets/images/back.png" class="arrow_img" />
+      <span>{{ $t('lang455') }}</span>
+    </div>
+    <!-- 热门抢购 -->
+    <div class="goods_box" v-if="list.length > 0">
+      <div class="goods_list" v-for="(item, index) in list" :key="index" @click="navigatorToPage('exDetail', item.id)">
+        <van-image class="goods_list_img" radius="10" :src="item.thum" />
+        <div class="right">
+          <span class="ellipsis">{{ item.name }}</span>
+          <div class="cen">
+            <span class="money flex">
+              {{ item.teac_price }}
+              <span class="ssm">TeaC</span>
+            </span>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="bare" v-else>
+      <span>{{ $t('lang60') }}</span>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapState } from 'vuex';
+import { homeApi } from '@/api/index';
+import { Notify } from 'vant';
+import { Locale } from 'vant';
+import enUS from 'vant/es/locale/lang/en-US';
+import zhCN from 'vant/lib/locale/lang/zh-CN';
+export default {
+  data() {
+    return {
+      showLoading: true,
+      page: 1,
+      list: [],
+    };
+  },
+
+  mounted() {
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getTeacExList();
+    },
+    //返回上一页
+    back() {
+      this.$router.back();
+    },
+    navigatorTo(router) {
+      if (this.$route.name == router) return;
+      if (router != '') {
+        this.$router.push({ name: router });
+      } else {
+        this.$toast(this.$t('lang2'));
+      }
+    },
+    navigatorToPage(name, id, product_id) {
+      this.$router.push({ name, query: { id: id, product_id: product_id } });
+    },
+
+    getTeacExList() {
+      homeApi.getTeacExList({ page: this.page }).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];
+            console.log(this.list.length);
+            if (this.list.length >= res.data.total) {
+              this.page = -1; // 重置为 -1,表示没有更多数据
+            }
+          }
+        } 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.getTeacExList(); // 触发加载更多
+        }
+      }
+    },
+  },
+};
+</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: 14px 0;
+  z-index: 99;
+  .arrow_img {
+    position: absolute;
+    left: 20px;
+    width: 10px;
+    height: 16px;
+    // transform: translate(0, -50%);
+  }
+}
+.home_page {
+  height: 100vh;
+  overflow: auto;
+  padding: 50px 0;
+
+  .pd {
+    padding: 14px;
+    background-color: #fff;
+  }
+  .top {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .cha {
+      width: 100px;
+    }
+
+    .input {
+      width: calc(100% - 110px);
+      border: 1px solid #29b286;
+      border-radius: 20px;
+    }
+    ::v-deep .van-field__control {
+      padding: 6px 12px;
+    }
+    ::v-deep .van-icon-search {
+      font-size: 20px;
+      color: #29b286;
+      font-weight: bold;
+      margin-right: 10px;
+    }
+  }
+  .con {
+    margin: 14px;
+    border-radius: 12px;
+    background-color: #fff;
+  }
+
+  .jsb {
+    justify-content: space-between;
+  }
+
+  .goods_box {
+    margin: 14px;
+    border-radius: 14px;
+    .good_icon {
+      width: 16px;
+      height: 16px;
+      margin-right: 5px;
+    }
+  }
+
+  .goods_list {
+    display: flex;
+    align-items: center;
+    // justify-content: space-between;
+    color: #000;
+    padding: 12px;
+    border-radius: 10px;
+    // box-shadow: 0 4px 16px 0 rgba(53, 73, 93, 0.15);
+    margin-bottom: 20px;
+    // box-shadow: 4px 4px 15px 0px rgba(180, 212, 212, 0.29);
+    background-color: #fff;
+    // background-image: linear-gradient(90deg, rgba(217, 239, 239, 0.3) 0, rgba(217, 239, 239, 0.3) 0, rgba(225, 240, 242, 0.3) 100%, rgba(225, 240, 242, 0.3) 100%);
+    &_img {
+      width: 80px;
+      height: 80px;
+      border-radius: 10px;
+      margin-right: 10px;
+    }
+
+    .right {
+      width: calc(100% - 90px);
+      height: 65px;
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+      font-size: 13px;
+
+      .time_text {
+        color: #7f7f7f;
+        font-weight: normal;
+        font-size: 10px;
+        text-decoration: line-through;
+        // padding-top: 10px;
+      }
+      .cen1 {
+        color: red;
+        // font-weight: 550;
+        // padding: 5px 0;
+        font-size: 12px;
+      }
+      .cen {
+        color: #29b286;
+        // font-weight: 550;
+        display: flex;
+        align-items: center;
+        // padding: 5px 0;
+        font-size: 12px;
+      }
+      .money {
+        font-size: 15px;
+      }
+      .ssm {
+        font-size: 10px;
+        font-weight: normal;
+        padding-top: 2px;
+      }
+      .mon_t {
+        color: #000;
+        font-weight: normal;
+      }
+      .yel {
+        font-weight: normal;
+        white-space: nowrap;
+        line-height: 100%;
+        width: fit-content;
+        // margin-left: 8px;
+        padding: 0px 8px;
+        border-radius: 16px;
+        background-color: #f9f6e5;
+        .count {
+          color: #f7c35d;
+          font-size: 9px;
+        }
+      }
+      .green {
+        width: fit-content;
+        color: #29b286;
+        background-color: #ddf2e7;
+        font-size: 10px;
+        font-weight: normal;
+        padding: 2px 6px;
+        border-radius: 6px;
+      }
+      .t2 {
+        text-decoration: none;
+      }
+
+      .progress {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        font-size: 10px;
+        .pro {
+          width: 70%;
+          overflow: hidden;
+        }
+      }
+    }
+    .buy {
+      display: flex;
+      align-items: flex-end;
+      justify-content: flex-end;
+      &_btn {
+        height: 26px;
+        line-height: 26px;
+        font-size: 10px;
+        background-color: #29b286;
+        border: none;
+        padding: 0 10px;
+        white-space: nowrap;
+        border-radius: 30px;
+      }
+    }
+  }
+}
+
+
+.flex {
+  display: flex;
+  align-items: center;
+}
+
+.ellipsis {
+  // overflow: hidden; /* 确保超出容器的文本被裁剪 */
+  // white-space: nowrap; /* 确保文本在一行内显示 */
+  // text-overflow: ellipsis; /* 使用省略号表示文本超出 */
+  display: -webkit-box;
+  -webkit-line-clamp: 2; /* 限制显示的行数为2 */
+  -webkit-box-orient: vertical;
+  overflow: hidden; /* 隐藏溢出的文本 */
+  text-overflow: ellipsis; /* 显示省略号 */
+}
+// ::v-deep .van-field__control {
+//   overflow: hidden; /* 确保超出容器的文本被裁剪 */
+//   white-space: nowrap; /* 确保文本在一行内显示 */
+//   text-overflow: ellipsis; /* 使用省略号表示文本超出 */
+// }
+.bare {
+  text-align: center;
+  font-size: 14px;
+  padding: 60px 14px;
+  color: #888;
+}
+</style>

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

@@ -344,7 +344,7 @@ export default {
     // 无关联地区的
     submitNoarea() {
       if (this.number <= 0) {
-        return Notify({ type: 'warning', message: this.$t('lang69') });
+        return Notify({ type: 'warning', message: this.$t('lang242') });
       }
       let _this = this;
       Dialog.confirm({
@@ -358,7 +358,7 @@ export default {
           homeApi.create({ type: 2, order_id: _this.product.info.id, product_id: _this.product.info.product_id, num: _this.number }).then(res => {
             if (res.code == 200) {
               _this.loading = false;
-              _this.cascaderShow = false;
+              _this.stepperShow = false;
               _this.areaIds = [];
               Toast({ message: res.msg });
               _this.$router.push('mine');