فهرست منبع

feat:删除储值页面的活动

zhanghui 4 ماه پیش
والد
کامیت
ff83196e97

+ 12 - 7
myPages/serviceObjectAllInfo/index.vue

@@ -68,9 +68,9 @@
 <!--              </view>-->
 <!--            </picker>-->
 
-            <picker @change="bindDateChange" mode='date' :disabled="!this.isAuthUpdate" range-key="label" >
+            <picker @change="bindDateChange" mode='date' :disabled="isAuthUpdate ? false : true " range-key="label" >
               <view class="flex-row justify-end picker-change-store">
-                <text>{{userInfo.birthday.substring(0,10) || '请选择出生日期' }}</text>
+                <text>{{ userInfo.birthday ?  userInfo.birthday.substring(0,10) : '请选择出生日期' }}</text>
                 <u-icon name="arrow-right" color="#666" size="16"></u-icon>
               </view>
             </picker>
@@ -228,7 +228,7 @@ export default {
   data() {
     return {
       accessToken: null,
-      isAuthUpdate: false,
+      isAuthUpdate: true,
       serviceProjectList: [],
       userInfo: {
         auth: true,
@@ -275,6 +275,7 @@ export default {
         this.userInfo.serviceProjectId = data.authServiceIds.split(',');
       }
       this.userInfo.facePhotoUrl = data.facePhotoUrl;
+      this.userInfo.isSelf = data.isSelf;
       this.userInfo.minMainCardStatus = data.minMainCardStatus;
       this.userInfo.facePhoto = data.facePhoto;
       this.userInfo.facePhotos = data.facePhoto;
@@ -291,7 +292,7 @@ export default {
       this.userInfo.nickName = data.nickName;
       this.userInfo.remark = data.remark;
       this.userInfo.id = data.id;
-      if (this.userInfo.id){
+      if (this.userInfo.id && this.userInfo.isSelf != 1){
         this.getServiceObjectPhotoRecord(this.userInfo.id)
       }
       console.log('+++++++JSON.parse(option.data)++++++', this.userInfo)
@@ -432,21 +433,25 @@ export default {
 
     // 保存用户信息
     saveUserInfo() {
+      console.log(this.userInfo)
       if (!this.userInfo.nickName) {
         uni.showToast({
-          title: "请认真填写宝贝昵称"
+          title: "请认真填写宝贝昵称",
+          icon:"none"
         })
         return;
       }
       if (!this.userInfo.blood) {
         uni.showToast({
-          title: "请认真填写关系"
+          title: "请认真填写关系",
+          icon:"none"
         })
         return;
       }
       if (!this.userInfo.birthday) {
         uni.showToast({
-          title: "请认真填写宝贝生日"
+          title: "请认真填写宝贝生日",
+          icon:"none"
         })
         return;
       }

+ 4 - 3
orderPages/bookService/index.rpx.scss

@@ -140,17 +140,18 @@
 }
 
 .btnTitle1{
-  font-size: 24rpx;
+  font-size: 28rpx;
   font-weight: 400;
   margin-top: 20rpx;
   color: #333333;
   line-height: 44rpx;
 }
 .btnRight1 {
-  color: red;
   font-size: 24rpx;
   font-weight: 400;
-
+  background-color: #ffe05c;
+  border-radius: 36rpx;
+  padding: 10rpx 20rpx;
 }
 
 .btnTitle{

+ 1 - 1
orderPages/bookService/index.vue

@@ -151,7 +151,7 @@
           <text>推荐活动:{{recommendActivity.title}}</text>
           <text style="margin-left: 10rpx;color: #999999" >({{recommendActivity.description}})</text>
         </view>
-        <text class="btnRight1" @click="goDetail(recommendActivity)">去购买</text>
+        <view class="btnRight1" @click="goDetail(recommendActivity)">购买({{recommendActivity.salePrice}})</view>
       </view>
 
 			<view class="btnTitle flex-row">

+ 4 - 3
orderPages/storeService/index.rpx.scss

@@ -244,7 +244,7 @@
 
 
 .btnTitle1{
-  font-size: 24rpx;
+  font-size: 28rpx;
   font-weight: 400;
   margin-top: 20rpx;
   color: #333333;
@@ -252,8 +252,9 @@
   padding: 0 32rpx;
 }
 .btnRight1 {
-  color: red;
   font-size: 24rpx;
   font-weight: 400;
-
+  background-color: #ffe05c;
+  border-radius: 36rpx;
+  padding: 10rpx 20rpx;
 }

+ 1 - 1
orderPages/storeService/index.vue

@@ -101,7 +101,7 @@
           <text>推荐活动:{{recommendActivity.title}}</text>
           <text style="margin-left: 10rpx;color: #999999" >({{recommendActivity.description}})</text>
         </view>
-        <text class="btnRight1" @click="goDetail(recommendActivity)">去购买</text>
+        <view class="btnRight1" @click="goDetail(recommendActivity)">购买({{recommendActivity.salePrice}})</view>
       </view>
 			<view class="submitButton " @click="openSetting">提交</view>
 		</view>

+ 1 - 0
pages/index/index.rpx.css

@@ -41,6 +41,7 @@
 }
 .h-center-content{
     height: 188rpx;
+    width: 400rpx;
 }
 .quan{
     position: relative;

+ 61 - 19
pages/index/index.vue

@@ -26,13 +26,13 @@
                 <view class="phone">{{ userInfo.ncikName || '' }}</view>
                 <!--                <view class="welcome">尊敬的{{ userInfo.ncikName || ''}},下午好~</view>-->
               </view>
-              <view @click="goQrCode" class="arrow-right">
+              <view v-if="myActivityList.length > 0" @click="goQrCode" class="arrow-right">
                 <!-- <image v-if="userInfo.wxQrCode" class="qrcode" :src="userInfo.qrcode" mode=""></image> -->
                 <!-- <image class="qrcode" src="../../static/index/qrcode.png" mode=""></image>
                 <view class="h-text">会员码</view> -->
-                <view class="coupon-wrap">
+                <view  class="coupon-wrap">
 <!--                  <u-icon name="/static/me/u5.png" color="#ffb83d" size="22"></u-icon>-->
-                  <text>邀有礼</text>
+                  <text>邀有礼</text>
                 </view>
               </view>
             </view>
@@ -237,9 +237,12 @@
     <!--    </view>-->
 
 
-    <uni-popup ref="strategyListPoup">
+    <uni-popup :mask-click="false" ref="strategyListPoup">
 
-      <view class="flex-col justify-start expirePopup" >
+      <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>
         <view class="flex-row justify-center">
           <text class="popupTitle">新人专享</text>
         </view>
@@ -432,10 +435,14 @@ export default {
         },
       },
 
+      myActivityList:[],
+
     };
   },
 
   onShow() {
+    // this.getRuleById()
+    this.myActivity()
     this.updateApp()
     this.userInfo = uni.getStorageSync('userInfo');
     if (this.userInfo.selfPhoto) {
@@ -560,6 +567,29 @@ export default {
 
   methods: {
 
+    myActivity(){
+      this.$api.myActivity({
+        pageNum: 1,
+        pageSize: 10,
+      }).then(res=>{
+        this.myActivityList = res.data.rows
+      })
+    },
+
+    closeStrategyListPoup(){
+      this.$refs.strategyListPoup.close()
+      //关闭弹窗
+      console.log('拓客端推广用户绑定失败!')
+      console.log('+++++++++++++++expandParam+++++++++++++++++++++++',expandParam)
+      that.$api.addRecordForAttach({
+        ...expandParam,
+        isNew:1,
+        isBindSuccess:0,
+      }).then(res=>{
+        console.log('+++++++++新用户,扫码推广失败记录!++++++++++++++++')
+      })
+      uni.removeStorageSync('expandParam');
+    },
 
     userBindMember (){
       let expandParam = uni.getStorageSync('expandParam')
@@ -572,18 +602,42 @@ export default {
           }
         }
 
+        if (couponIds.length !== this.rule.receivedCount){
+          uni.showToast({
+            title: '请选择' + this.rule.receivedCount + '张优惠券',
+            duration: 2000,
+            icon:"error"
+          });
+          return
+        }
+
       //用户扫码拓客端进入小程序
       that.$api.userBindMember(
           {
             ...expandParam,
             memberId: this.userInfo.id,
             memberPhone:this.phoneParam.phonenumber,
-            code:this.phoneParam.code,
+            smsCode:this.phoneParam.smsCode,
             couponIds: couponIds
           }
       ).then(res1 => {
-        console.log('拓客端推广用户绑定成功!')
 
+        //关闭弹窗
+        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,
@@ -591,18 +645,6 @@ export default {
         }).then(res=>{
           console.log('+++++++++新用户,扫码推广成功记录!++++++++++++++++')
         })
-
-        uni.removeStorageSync('expandParam');
-      }).catch(err=>{
-
-        that.$api.addRecordForAttach({
-          ...expandParam,
-          isNew:1,
-          isBindSuccess:0,
-        }).then(res=>{
-          console.log('+++++++++新用户,扫码推广失败记录!++++++++++++++++')
-        })
-
         uni.removeStorageSync('expandParam');
       })