MrShi
3 小时以前 87a0661bd4bfd91228747f77ce575db7775a44a5
mini-program/pagesA/pages/shop_points/shop_points.vue
@@ -4,10 +4,10 @@
      <view class="info-rule" @click="jumpService">积分规则</view>
      <view class="head" :style="{ backgroundImage: 'url(' + backImage + ')', height: 'calc(' + (navHeight + statusbarHeight + 'px + 376rpx)') }">
         <view :style="{ width: '100%', height: navHeight + statusbarHeight + 'px' }"></view>
         <view class="head-bar" :style="{ height: navHeight + statusbarHeight + 'px' }">
         <view class="head-bar" :style="{ height: navHeight + statusbarHeight + 'px' , backgroundImage: 'url(' + backHeadImage + ')'}">
            <view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
            <view class="head-bar-nav" :style="{ height: navHeight + 'px' }" @click="openLoacing">
               <image src="/static/icon/nav_ic_bac@2x.png" mode="widthFix"></image>
            <view class="head-bar-nav" :style="{ height: navHeight + 'px' }" >
               <image src="/static/icon/nav_ic_bac@2x.png" mode="widthFix" @click="jumpBack"></image>
               <text>我的积分</text>
               <image src="/static/icon/nav_ic_bac@2x.png" mode="widthFix" style="opacity: 0;"></image>
            </view>
@@ -29,13 +29,14 @@
                  <view  :class="'list-title-cate-row '+(active ==2?'active':'')" @click="changeActive(2)">扣除</view>
               </view>
            </view>
            <view class="list-item">
            <view class="list-item"  v-for="(item, index) in dataList" :key="index">
               <view class="list-item-left">
                  <text>购买商品,获得100积分</text>
                  <text>2025-11-21 09:00:00</text>
                  <text>{{item.content || ''}}</text>
                  <text>{{item.createDate || ''}}</text>
               </view>
               <view class="list-item-num">+100</view>
               <view class="list-item-num" :style="item.type==1?'color:red':''">{{item.type==1?'-':'+'}}{{item.num||0}}</view>
            </view>
            <view v-if="!hasNext" class="nomore">已加载全部</view>
         </view>
      </view>
   </view>
@@ -56,11 +57,20 @@
            hasNext:true,
            dataList:[],
            countData:{},
            backHeadImage:'',
            backImage: require('@/static/images/jifen_bg@2x.png')
         };
      },
      onReachBottom(){
         this.getDataList( );
      },
      onPageScroll(e){
          console.log('全局页面滚动', e);
          if(e.scrollTop >= 20){
             this.backHeadImage = this.backImage
          }else{
              this.backHeadImage = ''
          }
      },
      onShow() {
          this.shop  ={}
@@ -68,12 +78,19 @@
          this.active=0
          this.shop = this.shopInfo || {}
          this.getCountData()
          this.currentPage = 0
          this.getDataList()
          this.getFirstPageData()
      },
      methods:{
         getFirstPageData(){
            this.currentPage = 0
            this.hasNext=true
            this.total=0
            this.dataList=[]
            this.getDataList()
         },
         changeActive(index){
            this.getCountData(index)
            this.active=index
            this.getFirstPageData()
         },
         showRule(){
             console.log("==================================",this.showPhone)
@@ -96,11 +113,11 @@
                  this.dataList=[]
               }
               var that =this 
               let res = await that.$u.api.shopOrderPage({
               let res = await that.$u.api.findIntegralRecordPage({
                     capacity:10,
                     model: {
                        receiveType: 1,
                        status: 1
                        type: this.active === 1?0:(this.active===2?1:''),
                        userType: 1
                     },
                     page:this.currentPage
                  });
@@ -118,6 +135,9 @@
                  }
               } 
               this.loading=false
         },
         jumpBack(){
            uni.navigateBack({ delta: 1 });
         },
         jumpService() {
            uni.navigateTo({
@@ -177,6 +197,7 @@
            border-radius: 16rpx;
            margin-top: 30rpx;
            padding: 34rpx 30rpx;
            padding-bottom: 60rpx;
            box-sizing: border-box;
            .list-title {
               width: 100%;