Kaynağa Gözat

fix: 活动列表提示词 首页按钮判断

xuyunhui 4 ay önce
ebeveyn
işleme
238f0a493c

+ 7 - 0
common/js/api.js

@@ -50,6 +50,13 @@ export default {
             data: data
             data: data
         })
         })
     },
     },
+    myActivityIsShow(data) {
+        return request({
+            url: '/business/wechat/myActivityIsShow',
+            method: 'GET',
+            data: data
+        })
+    },
 
 
     //活动详情
     //活动详情
     activityCheck(data) {
     activityCheck(data) {

+ 97 - 87
pages/index/index.vue

@@ -26,12 +26,12 @@
                 <view class="phone">{{ userInfo.ncikName || '' }}</view>
                 <view class="phone">{{ userInfo.ncikName || '' }}</view>
                 <!--                <view class="welcome">尊敬的{{ userInfo.ncikName || ''}},下午好~</view>-->
                 <!--                <view class="welcome">尊敬的{{ userInfo.ncikName || ''}},下午好~</view>-->
               </view>
               </view>
-              <view v-if="myActivityList.length > 0" @click="goQrCode" class="arrow-right">
+              <view v-if="isShowCoupon" @click="goQrCode" class="arrow-right">
                 <!-- <image v-if="userInfo.wxQrCode" class="qrcode" :src="userInfo.qrcode" mode=""></image> -->
                 <!-- <image v-if="userInfo.wxQrCode" class="qrcode" :src="userInfo.qrcode" mode=""></image> -->
                 <!-- <image class="qrcode" src="../../static/index/qrcode.png" mode=""></image>
                 <!-- <image class="qrcode" src="../../static/index/qrcode.png" mode=""></image>
                 <view class="h-text">会员码</view> -->
                 <view class="h-text">会员码</view> -->
-                <view  class="coupon-wrap">
-<!--                  <u-icon name="/static/me/u5.png" color="#ffb83d" size="22"></u-icon>-->
+                <view class="coupon-wrap">
+                  <!--                  <u-icon name="/static/me/u5.png" color="#ffb83d" size="22"></u-icon>-->
                   <text>邀约有礼</text>
                   <text>邀约有礼</text>
                 </view>
                 </view>
               </view>
               </view>
@@ -240,8 +240,9 @@
     <uni-popup :mask-click="false" ref="strategyListPoup">
     <uni-popup :mask-click="false" ref="strategyListPoup">
 
 
       <view class="flex-col justify-start expirePopup" style="position: relative;">
       <view class="flex-col justify-start expirePopup" style="position: relative;">
-        <view class="flex-row justify-between" style="position: absolute;top: 20rpx;right: 20rpx" @click="closeStrategyListPoup">
-         <u-icon size="20" name="close-circle-fill"></u-icon>
+        <view class="flex-row justify-between" style="position: absolute;top: 20rpx;right: 20rpx"
+              @click="closeStrategyListPoup">
+          <u-icon size="20" name="close-circle-fill"></u-icon>
         </view>
         </view>
         <view class="flex-row justify-center">
         <view class="flex-row justify-center">
           <text class="popupTitle">新人专享</text>
           <text class="popupTitle">新人专享</text>
@@ -305,29 +306,30 @@
             </u--form>
             </u--form>
 
 
             <view class="flex-col justify-start">
             <view class="flex-col justify-start">
-              <text style="font-size: 28rpx;color: #333333;text-align: center">{{rule.title}}</text>
+              <text style="font-size: 28rpx;color: #333333;text-align: center">{{ rule.title }}</text>
 
 
             </view>
             </view>
 
 
-            <view  class="flex-col " v-for="(item,index) in rule.strategyList" :key="index" >
-              <view class="flex-row justify-start quan "  :class="[item.select == 1 ? 'row-list' : 'listBackground']" @click="selectQuan(item,index)">
+            <view class="flex-col " v-for="(item,index) in rule.strategyList" :key="index">
+              <view class="flex-row justify-start quan " :class="[item.select == 1 ? 'row-list' : 'listBackground']"
+                    @click="selectQuan(item,index)">
                 <view class="  h-text flex-col justify-center ">
                 <view class="  h-text flex-col justify-center ">
                   <view class="money">
                   <view class="money">
-                    <text class="money" v-if="item.discountsType == 2">{{item.discount}}折</text>
-                    <text class="money" v-else>{{`减` + item.discountsPrice}}</text>
+                    <text class="money" v-if="item.discountsType == 2">{{ item.discount }}折</text>
+                    <text class="money" v-else>{{ `减` + item.discountsPrice }}</text>
                   </view>
                   </view>
                   <view class="desc">
                   <view class="desc">
-                    <text>满{{item.reachPrice}}可用</text>
+                    <text>满{{ item.reachPrice }}可用</text>
                   </view>
                   </view>
                 </view>
                 </view>
 
 
                 <view class="  h-center-content flex-col justify-around">
                 <view class="  h-center-content flex-col justify-around">
                   <view class="h-value">
                   <view class="h-value">
-                    <text>{{item.name}}</text>
+                    <text>{{ item.name }}</text>
                   </view>
                   </view>
                   <view>
                   <view>
                     <view class="title">
                     <view class="title">
-                      可用次数:{{item.degree}}
+                      可用次数:{{ item.degree }}
                     </view>
                     </view>
                   </view>
                   </view>
 
 
@@ -338,16 +340,19 @@
                   </view>
                   </view>
                 </view>
                 </view>
               </view>
               </view>
-              <view v-if="showRemarkId == item.id" class="remark"  style="text-indent:unset">
-                <view  class="remarkText">
+              <view v-if="showRemarkId == item.id" class="remark" style="text-indent:unset">
+                <view class="remarkText">
                   <view>
                   <view>
-                    可用门店:<text>{{item.useStoreDesc}}</text>
+                    可用门店:
+                    <text>{{ item.useStoreDesc }}</text>
                   </view>
                   </view>
                   <view>
                   <view>
-                    适用项目:<text>{{item.useServiceDesc}}</text>
+                    适用项目:
+                    <text>{{ item.useServiceDesc }}</text>
                   </view>
                   </view>
                   <view v-if="item.remark !=null">
                   <view v-if="item.remark !=null">
-                    使用说明:<text>{{item.remark}}</text>
+                    使用说明:
+                    <text>{{ item.remark }}</text>
                   </view>
                   </view>
                   <text v-else class="remarkText">该优惠券暂无使用说明</text>
                   <text v-else class="remarkText">该优惠券暂无使用说明</text>
                 </view>
                 </view>
@@ -359,7 +364,7 @@
         <view @click="userBindMember" class="op-btn-wrap">
         <view @click="userBindMember" class="op-btn-wrap">
           <view class="h-btn">
           <view class="h-btn">
             <text v-if="rule.isAllReceived == 1">全部领取</text>
             <text v-if="rule.isAllReceived == 1">全部领取</text>
-            <text v-else>确定 (可选{{rule.receivedCount}}张优惠券)</text>
+            <text v-else>确定 (可选{{ rule.receivedCount }}张优惠券)</text>
           </view>
           </view>
         </view>
         </view>
 
 
@@ -383,7 +388,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-
+      isShowCoupon: false,
       isGetAddress: true, //是否获取到了经纬度
       isGetAddress: true, //是否获取到了经纬度
       noticeList: [],
       noticeList: [],
       notice: '',
       notice: '',
@@ -399,8 +404,8 @@ export default {
       storeList: [],
       storeList: [],
       storeInfo: {},
       storeInfo: {},
 
 
-      showRemarkId:'',
-      rule:[],
+      showRemarkId: '',
+      rule: [],
       tips2: '',
       tips2: '',
 
 
       phoneParam: {
       phoneParam: {
@@ -435,7 +440,7 @@ export default {
         },
         },
       },
       },
 
 
-      myActivityList:[],
+      myActivityList: [],
 
 
     };
     };
   },
   },
@@ -443,6 +448,7 @@ export default {
   onShow() {
   onShow() {
     // this.getRuleById()
     // this.getRuleById()
     this.myActivity()
     this.myActivity()
+
     this.updateApp()
     this.updateApp()
     this.userInfo = uni.getStorageSync('userInfo');
     this.userInfo = uni.getStorageSync('userInfo');
     if (this.userInfo.selfPhoto) {
     if (this.userInfo.selfPhoto) {
@@ -469,7 +475,7 @@ export default {
 
 
     //程序启动时自动登录成功时触发的事件
     //程序启动时自动登录成功时触发的事件
     uni.$off('loginSuccess')
     uni.$off('loginSuccess')
-    uni.$on('loginSuccess',this.getRuleById)
+    uni.$on('loginSuccess', this.getRuleById)
 
 
     console.log(e)
     console.log(e)
     if (e.shareUserId) {
     if (e.shareUserId) {
@@ -567,86 +573,90 @@ export default {
 
 
   methods: {
   methods: {
 
 
-    myActivity(){
-      this.$api.myActivity({
-        pageNum: 1,
-        pageSize: 10,
-      }).then(res=>{
-        this.myActivityList = res.data.rows
+    myActivity() {
+      // this.$api.myActivity({
+      //   pageNum: 1,
+      //   pageSize: 10,
+      // }).then(res => {
+      //   this.myActivityList = res.data.rows
+      //
+      // })
+      this.$api.myActivityIsShow().then(res =>{
+        this.isShowCoupon = res.data.data
       })
       })
     },
     },
 
 
-    closeStrategyListPoup(){
+    closeStrategyListPoup() {
       this.$refs.strategyListPoup.close()
       this.$refs.strategyListPoup.close()
       //关闭弹窗
       //关闭弹窗
       console.log('拓客端推广用户绑定失败!')
       console.log('拓客端推广用户绑定失败!')
-      console.log('+++++++++++++++expandParam+++++++++++++++++++++++',expandParam)
+      console.log('+++++++++++++++expandParam+++++++++++++++++++++++', expandParam)
       that.$api.addRecordForAttach({
       that.$api.addRecordForAttach({
         ...expandParam,
         ...expandParam,
-        isNew:1,
-        isBindSuccess:0,
-      }).then(res=>{
+        isNew: 1,
+        isBindSuccess: 0,
+      }).then(res => {
         console.log('+++++++++新用户,扫码推广失败记录!++++++++++++++++')
         console.log('+++++++++新用户,扫码推广失败记录!++++++++++++++++')
       })
       })
       uni.removeStorageSync('expandParam');
       uni.removeStorageSync('expandParam');
     },
     },
 
 
-    userBindMember (){
+    userBindMember() {
       let expandParam = uni.getStorageSync('expandParam')
       let expandParam = uni.getStorageSync('expandParam')
       let that = this
       let that = this
       this.$refs.form1.validate().then(res => {
       this.$refs.form1.validate().then(res => {
         let couponIds = []
         let couponIds = []
         for (const strategy of this.rule.strategyList) {
         for (const strategy of this.rule.strategyList) {
-          if (strategy.select == 1){
+          if (strategy.select == 1) {
             couponIds.push(strategy.id)
             couponIds.push(strategy.id)
           }
           }
         }
         }
 
 
-        if (couponIds.length !== this.rule.receivedCount){
+        if (couponIds.length !== this.rule.receivedCount) {
           uni.showToast({
           uni.showToast({
             title: '请选择' + this.rule.receivedCount + '张优惠券',
             title: '请选择' + this.rule.receivedCount + '张优惠券',
             duration: 2000,
             duration: 2000,
-            icon:"error"
+            icon: "error"
           });
           });
           return
           return
         }
         }
 
 
-      //用户扫码拓客端进入小程序
-      that.$api.userBindMember(
-          {
-            ...expandParam,
-            memberId: this.userInfo.id,
-            memberPhone:this.phoneParam.phonenumber,
-            smsCode:this.phoneParam.smsCode,
-            couponIds: couponIds
-          }
-      ).then(res1 => {
+        //用户扫码拓客端进入小程序
+        that.$api.userBindMember(
+            {
+              ...expandParam,
+              memberId: this.userInfo.id,
+              memberPhone: this.phoneParam.phonenumber,
+              smsCode: this.phoneParam.smsCode,
+              couponIds: couponIds
+            }
+        ).then(res1 => {
 
 
-        //关闭弹窗
-        this.$refs.strategyListPoup.close()
-        uni.showToast({
-          title: '领取成功',
-          duration: 2000,
-          icon:"success"
-        });
-
-        setTimeout(()=>{
-          uni.navigateTo({
-            url:"/orderPages/myCoupon/index"
+          //关闭弹窗
+          this.$refs.strategyListPoup.close()
+          uni.showToast({
+            title: '领取成功',
+            duration: 2000,
+            icon: "success"
+          });
+
+          setTimeout(() => {
+            uni.navigateTo({
+              url: "/orderPages/myCoupon/index"
+            })
+          }, 2000)
+
+          console.log('拓客端推广用户绑定成功!')
+          console.log('+++++++++++++++expandParam+++++++++++++++++++++++', expandParam)
+          that.$api.addRecordForAttach({
+            ...expandParam,
+            isNew: 1,
+            isBindSuccess: 1,
+          }).then(res => {
+            console.log('+++++++++新用户,扫码推广成功记录!++++++++++++++++')
           })
           })
-        },2000)
-
-        console.log('拓客端推广用户绑定成功!')
-        console.log('+++++++++++++++expandParam+++++++++++++++++++++++',expandParam)
-        that.$api.addRecordForAttach({
-          ...expandParam,
-          isNew:1,
-          isBindSuccess:1,
-        }).then(res=>{
-          console.log('+++++++++新用户,扫码推广成功记录!++++++++++++++++')
+          uni.removeStorageSync('expandParam');
         })
         })
-        uni.removeStorageSync('expandParam');
-      })
 
 
       }).catch(errors => {
       }).catch(errors => {
         console.log(errors)
         console.log(errors)
@@ -683,43 +693,43 @@ export default {
     },
     },
 
 
 
 
-    showRemark(item){
-      if (this.showRemarkId == item.id ){
+    showRemark(item) {
+      if (this.showRemarkId == item.id) {
         this.showRemarkId = ''
         this.showRemarkId = ''
 
 
-      }else {
+      } else {
         this.showRemarkId = item.id
         this.showRemarkId = item.id
 
 
       }
       }
     },
     },
 
 
-    getRuleById(){
+    getRuleById() {
       let expandParam = uni.getStorageSync('expandParam')
       let expandParam = uni.getStorageSync('expandParam')
       this.$api.getRuleById({
       this.$api.getRuleById({
         id: expandParam.ruleId
         id: expandParam.ruleId
-      }).then(res=>{
-        this.rule  = res.data.data
+      }).then(res => {
+        this.rule = res.data.data
 
 
-        if (this.rule.strategyList.length > 0){
+        if (this.rule.strategyList.length > 0) {
           for (const strategy of this.rule.strategyList) {
           for (const strategy of this.rule.strategyList) {
-              if (this.rule.isAllReceived == 1){
-                strategy.select = 1
-              }else {
-                strategy.select = 0
-              }
+            if (this.rule.isAllReceived == 1) {
+              strategy.select = 1
+            } else {
+              strategy.select = 0
+            }
           }
           }
           this.$refs.strategyListPoup.open()
           this.$refs.strategyListPoup.open()
         }
         }
       })
       })
     },
     },
 
 
-    selectQuan(item,index){
-      if (this.rule.isAllReceived == 1){
+    selectQuan(item, index) {
+      if (this.rule.isAllReceived == 1) {
         return
         return
       }
       }
       console.log(item)
       console.log(item)
       item.select = item.select ? 0 : 1
       item.select = item.select ? 0 : 1
-      this.$set(this.rule.strategyList,index,item)
+      this.$set(this.rule.strategyList, index, item)
     },
     },
 
 
     operLog() {
     operLog() {

+ 1 - 1
pages/order/module/index.rpx.css

@@ -390,7 +390,7 @@
 
 
 
 
 .planNumber {
 .planNumber {
-    font-size: 40rpx;
+    font-size: 26rpx;
     font-family: PingFangSC-Semibold, PingFang SC;
     font-family: PingFangSC-Semibold, PingFang SC;
     font-weight: 600;
     font-weight: 600;
     color: #333333;
     color: #333333;

+ 7 - 7
pages/order/module/mescrollUni-item.vue

@@ -78,10 +78,10 @@
 
 
 								<view class="flex-col justify-center" v-if="item.serviceAttribute == 1">
 								<view class="flex-col justify-center" v-if="item.serviceAttribute == 1">
 									<view class="planNumber flex-row justify-center">
 									<view class="planNumber flex-row justify-center">
-                    <text>C号段</text>	<text style="margin-left: 10rpx">{{ item.planNumber || '未排号' }}</text>
+                    <text v-if="!item.planNumber">C号段</text>	<text style="margin-left: 10rpx">{{ item.planNumber || '未排号' }}</text>
 									</view>
 									</view>
-                  <view class="planNumber1 flex-row justify-center" style="margin-top: 10rpx">
-                    <text>提前半小时签到</text>
+                  <view v-if="!item.planNumber" class="planNumber1 flex-row justify-center" style="margin-top: 10rpx">
+                    <text>最早可提前半小时签到</text>
                   </view>
                   </view>
 
 
 								</view>
 								</view>
@@ -115,12 +115,12 @@
 											</view>
 											</view>
 										</view>
 										</view>
 									</view>
 									</view>
-									<view class=" flex-col justify-center">
+									<view class="flex-col justify-center">
 										<view class="planNumber flex-row justify-center">
 										<view class="planNumber flex-row justify-center">
-                      <text>A号段</text> <text style="margin-left: 10rpx">{{ item.planNumber || '未排号' }}</text>
+                      <text v-if="!item.planNumber">A号段</text> <text style="margin-left: 10rpx">{{ item.planNumber || '未排号' }}</text>
 										</view>
 										</view>
-                    <view class="planNumber1 flex-row justify-center" style="margin-top: 10rpx">
-                      <text>提前半小时签到</text>
+                    <view v-if="!item.planNumber" class="planNumber1 flex-row justify-center" style="margin-top: 10rpx">
+                      <text>最早可提前半小时签到</text>
                     </view>
                     </view>
 									</view>
 									</view>
 								</view>
 								</view>