绿满眶商城微信小程序-uniapp
peng
2025-09-01 0c83611409654cfc53c64345ba60b7e1e5fcc5b7
pages/prize/PrizeDetail/PrizeDetail.vue
@@ -166,6 +166,7 @@
               img: item.prizeImg
            }
         })
         this.prizeList = [...this.prizeList]
         this.prizeList.push({
            id: 'notWIn',
            name: "谢谢参与"
@@ -173,22 +174,22 @@
         await this.getUnmber(this.activityId)
         await this.getGrantRecord(this.activityId)
      },
      onShareTimeline(e) {
         console.log('------------------>', e)
         // 如果用户尝试过分享朋友圈,给予奖励
         if (this.shareTimelineAttempt) {
            this.remainingTimes++;
            this.shareTimelineAttempt = false;
            uni.showToast({
               title: '获得1次抽奖机会',
               icon: 'success'
            });
         }
         return {
            title: '快来参与抽奖活动吧!',
            path: '/pages/prize/PrizeDetail/PrizeDetail?id=' + this.activityId
         }
      },
      // onShareTimeline(e) {
      //    console.log('------------------>', e)
      //    // 如果用户尝试过分享朋友圈,给予奖励
      //    if (this.shareTimelineAttempt) {
      //       this.remainingTimes++;
      //       this.shareTimelineAttempt = false;
      //       uni.showToast({
      //          title: '获得1次抽奖机会',
      //          icon: 'success'
      //       });
      //    }
      //    return {
      //       title: '快来参与抽奖活动吧!',
      //       path: '/pages/prize/PrizeDetail/PrizeDetail?id=' + this.activityId
      //    }
      // },
      //可能会使用到
      mounted() {
         // this.startAutoScroll()
@@ -335,7 +336,7 @@
            this.closeMoreChancesModal();
            uni.showModal({
               title: '去购物',
               content: '即将跳转到商品广场',
               content: '即将跳转到购物车',
               success: (res) => {
                  if (res.confirm) {
                     // 或者跳转到购物车
@@ -489,9 +490,11 @@
   .prize-grid {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      justify-content: flex-start;
   }
   .prize-item:nth-child(n+1){
      margin-left: 15rpx;
   }
   .prize-item {
      width: 22%;
      margin-bottom: 20rpx;