zhaojs
2023-07-20 fc9bd6378d3bfbde6d5c71535757a3d44de8d8ff
uniapp/pages/active/specialOffer.vue
@@ -27,8 +27,14 @@
               </view>
            </view>
         </view>
         <view class="rangeList-container rowCen">
         <view style="width: 100%;z-index: 999;">
            <view class="platvie">
               <view @click="changePlat(items.id)" class="platvie-plat" :class="currentplat==items.id?'platvie-active':''" v-for="(items,index) in platList" :key="index">
                  {{items.text}}
               </view>
            </view>
         </view>
         <view class="rangeList-container rowCen" v-if="currentplat=='tb'">
            <block v-for="(items,index) in priceRangelist" :key="index">
               <view class="rangeItem colCen" :class="nowCurrent==items.type?'rangeItem-active':''" @tap="changeRange(items.type)">
                  <view class="nameBox">
@@ -61,7 +67,18 @@
      },
      data() {
         return {
            currentplat:'tb',
            nowCurrent: -1,
            platList:[
               {
                  id:'tb',
                  text:'淘宝'
               },
               {
                  id:'jd',
                  text:'京东'
               }
            ],
            priceRangelist: [{
                  txt: '推荐',
                  type: -1
@@ -91,10 +108,19 @@
      },
      onReachBottom() {
         if (this.canloadmore) {
            this.getData()
         }
      },
      methods: {
         changePlat(plat)
         {
            this.currentplat=plat;
            this.pageCurrent = 1
            this.goodsList = []
            this.canloadmore = false
            this.getData();
         },
         changeRange(type) {
            this.pageCurrent = 1
            this.canloadmore = false
@@ -106,8 +132,10 @@
            this.$u.api.getPineGoods( {
               nineCid: this.nowCurrent,
               page: this.pageCurrent,
               plat:this.currentplat,
               pageSize: 20
            }).then(e => {
               console.log(e);
               if(e.code == 1)return that.$alert(e.msg);
               var res = e.data.list;
               uni.stopPullDownRefresh();
@@ -128,7 +156,6 @@
            })
         },
         goDetail(info) {
            console.log(info);
            uni.navigateTo({
               url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info))
            })
@@ -149,6 +176,28 @@
</script>
<style lang="scss">
   .platvie
   {
      width: 55%;
      height: 100rpx;
      z-index: 999;
      display: flex;
      text-align: center;
      justify-content: center;
      align-items: center;
      margin: 0 auto;
   }
   .platvie-plat
   {
      width:33%;
      font-size: 17px;
      color: #dbd5d5;
   }
   .platvie-active
   {
      font-size: 19px;
      color:#fff;
   }
   .specialOffer-wrapper {
      width: 100%;
      min-height: 380rpx;
@@ -266,7 +315,7 @@
         z-index: 1;
         width: 100%;
         padding: 0 32rpx;
         margin-top: 210rpx;
         margin-top: 310rpx;
         .goods-content {
            width: 100%;