1
0

7 Commity b2de815319 ... be40a1548e

Autor SHA1 Správa Dátum
  xuyunhui be40a1548e Merge remote-tracking branch 'gogs/dev2.0' into dev2.0 6 hodín pred
  xuyunhui 0e004fd59d fix: userBindMember 中 memberId 时有时无的问题 2 dní pred
  xuyunhui 2e42f5e56a fix: 权益卡续费活动弹窗样式和交互 2 dní pred
  xuyunhui 68626d81a5 fix: 扫码拓客端进入小程序时未登录用户先静默登录,已登录用户直接使用本地数据执行拓客逻辑 2 dní pred
  xuyunhui 26cb4cb45a fix:权益卡升级到活动样式 6 dní pred
  xuyunhui 3e42cb2535 fix:权益卡升级到活动样式 6 dní pred
  xuyunhui 1e8864784c fix:权益卡升级到活动 1 týždeň pred

+ 91 - 60
App.vue

@@ -10,83 +10,114 @@
         onShow: function () {
             console.log('App Show 小程序显示了+++++++++++++++++++++++')
             let that = this;
+
+            // 检查是否已登录(有 accessToken)
+            const accessToken = uni.getStorageSync('accessToken')
+
+            if (accessToken) {
+                // 已登录,直接使用本地数据执行拓客逻辑,不再调用 wxLogin
+                console.log('++++++++++已登录用户,直接使用本地数据执行拓客逻辑++++++++++')
+                that.handleShareBind()
+                that.handleExpandLogic()
+                return
+            }
+
+            // 未登录,走静默登录
             wx.login({
                 success(re) {
                     that.$api.wxLogin({code: re.code}).then(res => {
                         console.log('++++++++++登录返回了++++++++++++++++', res)
                         uni.setStorageSync('userInfo', res.data.data.userInfo)
                         uni.setStorageSync('accessToken', res.data.data.access_token)
+                        uni.setStorageSync('phoneIsBind', res.data.data.phoneIsBind)
+                        uni.setStorageSync('wxLoginIsNew', res.data.data.isNew)
                         let isNew = res.data.data.isNew
                         uni.removeStorageSync('parent_member_id');
 
+                        that.handleShareBind(res.data.data.userInfo.otherId)
+                        that.handleExpandLogic(isNew)
 
-                        //用户点击用户分享进入小程序,进行绑定操作
-                        let shareUserId = uni.getStorageSync('shareUserId')
-                        if (shareUserId) {
-                            that.$api.scanCode({
-                                openId: res.data.data.userInfo.otherId,
-                                memberId: shareUserId
-                            }).then(res => {
-                                console.log('用户分享用户绑定成功', res)
-                                uni.removeStorageSync('shareUserId');
-                            })
-                        }
+                    }).catch(err => {
+                        console.log('++++++++++App.vue wxLogin 失败++++++++++++++++')
+                        console.log('err.data:', err.data)
+                        console.log('err.statusCode:', err.statusCode)
+                        console.log('err.header:', err.header)
+                    })
+                },
+            })
 
 
-                        //用户扫码拓客端进入小程序,携带的参数,进行绑定操作
-                        let expandParam = uni.getStorageSync('expandParam')
-                        if (expandParam) {
-
-                          if (expandParam.isUse != 1){
-                            console.log('获取到的拓客端参数',expandParam)
-                            if (new Date().getTime() <= expandParam.timestamp){
-                              if (isNew){
-                                //登录成功,且是新用户,触发首页的自定义事件
-                                uni.$emit("loginSuccess")
-                              }else {
-
-                                that.$api.addRecordForAttach({
-                                  ...expandParam,
-                                  isNew:0,
-                                  isBindSuccess:0,
-                                }).then(res=>{
-                                  expandParam.isUse = 1
-                                  uni.setStorageSync('expandParam', expandParam)
-                                  console.log('+++++++++老用户,扫码推广失败记录!++++++++++++++++')
-                                })
-
-                                // uni.removeStorageSync('expandParam');
-                              }
-
-                            }else {
-                              uni.showModal({
-                                title: '温馨提示',
-                                content: ' 当前二维码已过期,请重新扫码',
-                                showCancel:false,
-                                success: function (res) {
-                                  if (res.confirm) {
-                                    console.log('用户点击确定');
-                                  } else if (res.cancel) {
-                                    console.log('用户点击取消');
-                                  }
-                                }
-                              });
-                              expandParam.isUse = 1
-                              uni.setStorageSync('expandParam', expandParam)
-                              // uni.removeStorageSync('expandParam');
-                            }
-                          }
-                        }
+        },
+        methods: {
+            // 处理用户分享绑定
+            handleShareBind(openId) {
+                let shareUserId = uni.getStorageSync('shareUserId')
+                if (!shareUserId) return
 
-                        //用户扫码技师端进入小程序,携带的参数。 暂无操作
-                        let promotionParam = uni.getStorageSync('promotionParam')
+                let userInfo = uni.getStorageSync('userInfo')
+                let targetOpenId = openId || (userInfo && userInfo.otherId)
+                if (!targetOpenId) return
 
+                this.$api.scanCode({
+                    openId: targetOpenId,
+                    memberId: shareUserId
+                }).then(res => {
+                    console.log('用户分享用户绑定成功', res)
+                    uni.removeStorageSync('shareUserId');
+                })
+            },
+            // 处理拓客端扫码逻辑
+            // isNew: 是否新用户(true=新用户弹窗领券,false=老用户记录推广失败)
+            handleExpandLogic(isNew) {
+                let expandParam = uni.getStorageSync('expandParam')
+                if (!expandParam) return
 
-                    })
-                },
-            })
+                // 使用传入的参数或本地缓存
+                let _isNew = isNew !== undefined ? isNew : uni.getStorageSync('wxLoginIsNew')
+
+                if (expandParam.isUse != 1){
+                    console.log('获取到的拓客端参数',expandParam)
+                    if (new Date().getTime() <= expandParam.timestamp){
+                        if (_isNew){
+                            //登录成功,且是新用户,触发首页的自定义事件(弹出新人专享窗口)
+                            uni.$emit("loginSuccess")
+                            // 标记为已使用,避免重复处理
+                            expandParam.isUse = 1
+                            uni.setStorageSync('expandParam', expandParam)
+                        }else {
+
+                            this.$api.addRecordForAttach({
+                                ...expandParam,
+                                isNew:0,
+                                isBindSuccess:0,
+                            }).then(res=>{
+                                expandParam.isUse = 1
+                                uni.setStorageSync('expandParam', expandParam)
+                                console.log('+++++++++老用户,扫码推广失败记录!++++++++++++++++')
+                            })
 
+                            // uni.removeStorageSync('expandParam');
+                        }
 
+                    }else {
+                        uni.showModal({
+                            title: '温馨提示',
+                            content: ' 当前二维码已过期,请重新扫码',
+                            showCancel:false,
+                            success: function (res) {
+                                if (res.confirm) {
+                                    console.log('用户点击确定');
+                                } else if (res.cancel) {
+                                    console.log('用户点击取消');
+                                }
+                            }
+                        });
+                        expandParam.isUse = 1
+                        uni.setStorageSync('expandParam', expandParam)
+                        // uni.removeStorageSync('expandParam');
+                    }
+                }
+            }
         },
         onHide: function () {
             console.log('App Hide')

+ 8 - 0
common/js/api.js

@@ -84,6 +84,14 @@ export default {
         })
     },
 
+    //权益卡可升级活动列表
+    upgradeList(equityCardId) {
+        return request({
+            url: '/business/wechat/activity/upgradeList/' + equityCardId,
+            method: 'GET'
+        })
+    },
+
     //根据key获取系统配置
     getConfigKey(data) {
         return request({

+ 2 - 2
common/js/env.js

@@ -11,8 +11,8 @@ let trialActivityImgUrl = `https://minio.xinyuekj.com.cn/jje-test/`
 /** 开发环境*/
 // let developBaseUrl = `http://65i1sxopd9qp.ngrok.xiaomiqiu123.top`
 // let developBaseUrl = `https://jje.xinyuekj.com.cn/prod-api`
-// let developBaseUrl = `https://jje.xinyuekj.com.cn/test-api`
-let developBaseUrl = `http://192.168.31.197:9201`
+	// let developBaseUrl = `https://jje.xinyuekj.com.cn/test-api`
+	let developBaseUrl = `http://192.168.31.197:9201`
 let developActivityImgUrl = `https://minio.xinyuekj.com.cn/jje-test/`
 
 

+ 0 - 2
common/js/request.js

@@ -21,7 +21,6 @@ function service(options = {}) {
 			if (res.data.code !== 200) {
 				// 非成功状态码弹窗
 				console.log('错误信息:+++',res.data.msg)
-
 				// 这里可以做一些状态码判断以及操作
 				if(res.data.code === 401){
 					uni.showToast({
@@ -34,7 +33,6 @@ function service(options = {}) {
 							url:'/pages/login/login'
 						})
 					},3000)
-
 				}else{
 					uni.showToast({
 						icon: 'none',

+ 208 - 195
myPages/userInfo/index.vue

@@ -1,123 +1,123 @@
 <template>
-	<view class="page">
-		<view class="outView">
-			<form @submit="inputValue">
-			<view class="flex-row justify-between bordBot" >
-				<view class="key flex-col justify-center ">
-					<text>头像</text>
-				</view>
-					<button class="photoView" open-type="chooseAvatar" @chooseavatar="chooseavatar">
-						<image class="photoImage" :src="userInfo.selfPhotoUrl || '/static/me/ud4.png'"></image>
-					</button>
-			</view>
-			<view class="flex-row justify-between bordBot" >
-				<view class="key flex-col justify-center ">
-					<text>昵称</text>
-				</view>
-				<view class="nikeName flex-col justify-center">
-					<input type="nickname" name="nickname" v-model="userInfo.ncikName"   placeholder="请输入昵称"/>
-				</view>
-			</view>
-        <view class="flex-row justify-between bordBot" >
+  <view class="page">
+    <view class="outView">
+      <form @submit="inputValue">
+        <view class="flex-row justify-between bordBot">
+          <view class="key flex-col justify-center ">
+            <text>头像</text>
+          </view>
+          <button class="photoView" open-type="chooseAvatar" @chooseavatar="chooseavatar">
+            <image class="photoImage" :src="userInfo.selfPhotoUrl || '/static/me/ud4.png'"></image>
+          </button>
+        </view>
+        <view class="flex-row justify-between bordBot">
+          <view class="key flex-col justify-center ">
+            <text>昵称</text>
+          </view>
+          <view class="nikeName flex-col justify-center">
+            <input type="nickname" name="nickname" v-model="userInfo.ncikName" placeholder="请输入昵称"/>
+          </view>
+        </view>
+        <view class="flex-row justify-between bordBot">
           <view class="key flex-col justify-center ">
             <text>会员编号</text>
           </view>
-			<view class="flex-row justify-end groupItemContent">
-				<text>{{userInfo.no}}</text>
-			</view>
+          <view class="flex-row justify-end groupItemContent">
+            <text>{{ userInfo.no }}</text>
+          </view>
+        </view>
+        <view class="flex-row justify-between bordBot">
+          <view class="key flex-col justify-center ">
+            <text>性别</text>
+          </view>
+          <picker class="picker" @change="genderChange" mode='selector' range-key="gender" :value="genderIndex"
+                  :range="genderList">
+            <view class="flex-row justify-end groupItemContent">
+              <text v-if="userInfo.sex == 0">男</text>
+              <text v-else-if="userInfo.sex == 1">女</text>
+              <text v-else-if="userInfo.sex == 2">未知</text>
+              <text v-else>请选择性别</text>
+              <u-icon name="arrow-right" color="#666" size="18"></u-icon>
+            </view>
+          </picker>
         </view>
-			<view class="flex-row justify-between bordBot" >
-				<view class="key flex-col justify-center ">
-					<text>性别</text>
-				</view>
-				<picker class="picker"  @change="genderChange" mode='selector'  range-key="gender" :value="genderIndex" :range="genderList">
-					<view class="flex-row justify-end groupItemContent">
-						<text v-if="userInfo.sex == 0">男</text>
-						<text v-else-if="userInfo.sex == 1">女</text>
-						<text v-else-if="userInfo.sex == 2">未知</text>
-						<text v-else>请选择性别</text>
-						<u-icon name="arrow-right" color="#666" size="18"></u-icon>
-					</view>
-				</picker>
-			</view>
-
-			<view class="flex-row justify-between bordBot" >
-				<view class="key flex-col justify-center ">
-					<text>生日</text>
-				</view>
-				<picker class="picker" :end="endDate" @change="birthdayChange" mode='date'  range-key="label" >
-					<view class="flex-row justify-end groupItemContent">
-						<text>{{userInfo.birthday || '请选择出生日期' }}</text>
-						<u-icon name="arrow-right" color="#666" size="18"></u-icon>
-					</view>
-				</picker>
-			</view>
-
-				<view class="flex-row justify-between bordBot" >
-					<view class="key flex-col justify-center ">
-						<text>手机号</text>
-					</view>
-					<view class="flex-row justify-end groupItemContent" @click="settingTelphone">
-						<text>{{userInfo.phone? userInfo.phone : '绑定手机号' }}</text>
-						<u-icon name="arrow-right" color="#666" size="18"></u-icon>
-					</view>
-				</view>
-
-<!--			<view class="flex-row justify-between bordBot" >-->
-<!--				<view class="key flex-col justify-center ">-->
-<!--					<text>实名认证</text>-->
-<!--				</view>-->
-<!--				<view class="flex-row justify-end groupItemContent" @click="gotoRealNameAuth">-->
-<!--					<text>{{userInfo.isAttestation? '已认证' : '未实名认证,去认证' }}</text>-->
-<!--					<u-icon name="arrow-right" color="#666" size="18"></u-icon>-->
-<!--				</view>-->
-<!--			</view>-->
-
-			<button class="updateButton"  formType="submit">
-				<text>保存</text>
-			</button>
-
-			</form>
-
-
-		</view>
-	</view>
+
+        <view class="flex-row justify-between bordBot">
+          <view class="key flex-col justify-center ">
+            <text>生日</text>
+          </view>
+          <picker class="picker" :end="endDate" @change="birthdayChange" mode='date' range-key="label">
+            <view class="flex-row justify-end groupItemContent">
+              <text>{{ userInfo.birthday || '请选择出生日期' }}</text>
+              <u-icon name="arrow-right" color="#666" size="18"></u-icon>
+            </view>
+          </picker>
+        </view>
+
+        <view class="flex-row justify-between bordBot">
+          <view class="key flex-col justify-center ">
+            <text>手机号</text>
+          </view>
+          <view class="flex-row justify-end groupItemContent" @click="settingTelphone">
+            <text>{{ userInfo.phone ? userInfo.phone : '绑定手机号' }}</text>
+            <u-icon name="arrow-right" color="#666" size="18"></u-icon>
+          </view>
+        </view>
+
+        <!--			<view class="flex-row justify-between bordBot" >-->
+        <!--				<view class="key flex-col justify-center ">-->
+        <!--					<text>实名认证</text>-->
+        <!--				</view>-->
+        <!--				<view class="flex-row justify-end groupItemContent" @click="gotoRealNameAuth">-->
+        <!--					<text>{{userInfo.isAttestation? '已认证' : '未实名认证,去认证' }}</text>-->
+        <!--					<u-icon name="arrow-right" color="#666" size="18"></u-icon>-->
+        <!--				</view>-->
+        <!--			</view>-->
+
+        <button class="updateButton" formType="submit">
+          <text>保存</text>
+        </button>
+
+      </form>
+
+    </view>
+  </view>
 </template>
 
 <script>
 export default {
-	data() {
-		return {
-			photoUrl:'',
-			userInfo: {},
-			genderIndex:0,
-			genderList: [{gender:'男',id:'0'},
-				  		 {gender:'女',id:'1'},
-						 {gender:'未知',id:'2'}],
-		};
-	},
-	mounted() {
-	},
-  onLoad(){
+  data() {
+    return {
+      photoUrl: '',
+      userInfo: {},
+      genderIndex: 0,
+      genderList: [{gender: '男', id: '0'},
+        {gender: '女', id: '1'},
+        {gender: '未知', id: '2'}],
+    };
+  },
+  mounted() {
+  },
+  onLoad() {
     // 用户信息
     this.userInfo = uni.getStorageSync('userInfo')
 
-    if (this.userInfo.selfPhoto){
+    if (this.userInfo.selfPhoto) {
       this.getImgUrlByOssId(this.userInfo.selfPhoto)
     }
   },
-	onShow() {
+  onShow() {
 
     this.userInfo.phone = uni.getStorageSync('userInfo').phone
 
 
-	},
+  },
   computed: {
     endDate() {
       return this.getDate('end');
     }
   },
-	methods: {
+  methods: {
     getDate(type) {
       const date = new Date();
       let year = date.getFullYear();
@@ -127,112 +127,125 @@ export default {
       if (type === 'start') {
         year = year - 60;
       } else if (type === 'end') {
-        year = year ;
+        year = year;
       }
       month = month > 9 ? month : '0' + month;
       day = day > 9 ? day : '0' + day;
       return `${year}-${month}-${day}`;
     },
-		settingTelphone(){
-			uni.navigateTo({
-				url:'/myPages/setting/setting-telphone'
-			})
-		},
-
-		inputValue(e){
-			console.log('+++++++++++++inputValue+++++++++++',e)
-			this.userInfo.ncikName = e.detail.value.nickname
-			this.saveUserInfo()
-		},
-
-		// 选择性别
-		genderChange(e){
-			console.log(e.detail.value)
-			this.userInfo.sex = e.detail.value
-		},
-
-		//选择的日期
-		birthdayChange(e){
-			console.log(e.detail.value)
-			this.userInfo.birthday = e.detail.value
-		},
-
-		// 去实名认证
-		gotoRealNameAuth(){
-			uni.navigateTo({
-				url: '/myPages/realNameAuth/index',
-			})
-		},
-		// 保存用户信息
-		saveUserInfo(){
-			// 保存数据
-			this.$api.saveUserInfo(this.userInfo).then((res)=>{
-				console.log(res)
-				// 刷新用户信息
-				this.getUserInfo();
-				uni.showToast({
-					title: "操作成功"
-				})
-				// setTimeout(res=>{
-				// 	uni.switchTab({
-				// 		url: '/pages/index/index',
-				// 	},2000)
-				// })
-
-			}).catch(() =>{
-				uni.showToast({
-					title: "操作失败"
-				})
-			});
-		},
-
-		getUserInfo(){
-			this.$api.getUserInfo().then(res=>{
-				console.log('++++++++++++获取用户信息++++++++++++++++++',res)
-				uni.setStorageSync('userInfo',res.data.data)
-				this.userInfo = res.data.data
-				if (this.userInfo.selfPhoto){
-					this.getImgUrlByOssId(this.userInfo.selfPhoto)
-				}
-			})
-
-		},
-
-		getImgUrlByOssId(Id){
-			this.$api.getImage(Id).then(res=>{
-				this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
-				this.$set(this.userInfo)
-			});
-		},
-		//头像上传
-
-		chooseavatar(e){
-			let that = this
-			let avatarUrl =e.detail.avatarUrl
-			console.log(e.detail.avatarUrl)
-			uni.uploadFile({
-				url: that.$baseUrl + '/resource/oss/upload', //仅为示例,非真实的接口地址
-				filePath:avatarUrl,
-				name: 'file',
-				header: {
-					// "Content-Type": "multipart/form-data",
-					// 'X-Access-Token': uni.getStorageSync('token'),
-					'Authorization': 'Bearer ' + uni.getStorageSync('accessToken'),
-				},
-				success: (uploadFileRes) => {
-					let res = JSON.parse(uploadFileRes.data)
-					console.log('+++++++++++++++++chooseavatar+++++++++++++++++++++++',uploadFileRes.data)
-					that.userInfo.selfPhoto=res.data.ossId
-					that.userInfo.selfPhotoUrl = res.data.url.replace(/^http:/, "https:")
-				}
-			});
-
-		},
-	}
+    settingTelphone() {
+      uni.navigateTo({
+        url: '/myPages/setting/setting-telphone'
+      })
+    },
+
+    inputValue(e) {
+      console.log('+++++++++++++inputValue+++++++++++', e)
+      this.userInfo.ncikName = e.detail.value.nickname
+      this.saveUserInfo()
+    },
+
+    // 选择性别
+    genderChange(e) {
+      console.log(e.detail.value)
+      this.userInfo.sex = e.detail.value
+    },
+
+    //选择的日期
+    birthdayChange(e) {
+      console.log(e.detail.value)
+      this.userInfo.birthday = e.detail.value
+    },
+
+    // 去实名认证
+    gotoRealNameAuth() {
+      uni.navigateTo({
+        url: '/myPages/realNameAuth/index',
+      })
+    },
+    // 保存用户信息
+    saveUserInfo() {
+      // 保存数据
+      this.$api.saveUserInfo(this.userInfo).then((res) => {
+        console.log(res)
+        // 刷新用户信息
+        this.getUserInfo();
+        uni.showToast({
+          title: "操作成功"
+        })
+        // setTimeout(res=>{
+        // 	uni.switchTab({
+        // 		url: '/pages/index/index',
+        // 	},2000)
+        // })
+
+      }).catch(() => {
+        uni.showToast({
+          title: "操作失败"
+        })
+      });
+    },
+
+    getUserInfo() {
+      this.$api.getUserInfo().then(res => {
+        console.log('++++++++++++获取用户信息++++++++++++++++++', res)
+        uni.setStorageSync('userInfo', res.data.data)
+        this.userInfo = res.data.data
+        if (this.userInfo.selfPhoto) {
+          this.getImgUrlByOssId(this.userInfo.selfPhoto)
+        }
+      })
+
+    },
+
+    getImgUrlByOssId(Id) {
+      this.$api.getImage(Id).then(res => {
+        this.userInfo.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
+        this.$set(this.userInfo)
+      });
+    },
+    //头像上传
+    chooseavatar(e) {
+      let that = this
+      let avatarUrl = e.detail.avatarUrl
+      console.log(e.detail.avatarUrl)
+      uni.uploadFile({
+        url: that.$baseUrl + '/resource/oss/upload', //仅为示例,非真实的接口地址
+        filePath: avatarUrl,
+        name: 'file',
+        header: {
+          // "Content-Type": "multipart/form-data",
+          // 'X-Access-Token': uni.getStorageSync('token'),
+          'Authorization': 'Bearer ' + uni.getStorageSync('accessToken'),
+        },
+        success: (uploadFileRes) => {
+          let res = JSON.parse(uploadFileRes.data)
+          console.log('+++++++++++++++++chooseavatar+++++++++++++++++++++++', uploadFileRes.data)
+          that.userInfo.selfPhoto = res.data.ossId
+          that.userInfo.selfPhotoUrl = res.data.url.replace(/^http:/, "https:")
+        }
+      });
+
+    },
+  }
 };
 </script>
 
 <style lang="scss">
-	@import '/common/css/common.css';
-	@import './index.rpx.css';
+@import '/common/css/common.css';
+@import './index.rpx.css';
+
+.logoutButton {
+  width: 70%;
+  margin: 0 auto;
+  margin-top: 60rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  background: #FFE05C;
+  border-radius: 40rpx;
+  text-align: center;
+  font-size: 32rpx;
+  color: #333;
+  font-weight: 500;
+}
 </style>

+ 8 - 4
orderPages/activityDetail/activityDetail.vue

@@ -256,7 +256,8 @@ export default {
       inviteOrderId: null,
       inviteActivityId:null,
       isShareMax: false,
-      renewServiceObjectId:null
+      renewServiceObjectId:null,
+      upgradeEquityCardId:null
     }
   },
 
@@ -276,6 +277,10 @@ export default {
       this.renewServiceObjectId = e.renewServiceObjectId
     }
 
+    if (e.upgradeEquityCardId){
+      this.upgradeEquityCardId = e.upgradeEquityCardId
+    }
+
     if (e.id) {
       this.id = e.id
       console.log('上一个页面传递过来的活动ID===>', this.id)
@@ -526,7 +531,8 @@ export default {
         inviteUserId: this.inviteUserId,
         inviteOrderId: this.inviteOrderId,
         inviteActivityId: this.inviteActivityId,
-        techNo: this.techNo
+        techNo: this.techNo,
+        upgradeEquityCardId: this.upgradeEquityCardId
       }).then(res => {
         console.log('++++++++++++++++++订单提交+++++++++++', res)
         uni.hideLoading();
@@ -593,9 +599,7 @@ export default {
           }
           this.storeList.push(store)
         }
-
         console.log(this.storeList,'+++++++++store_list++++++++++')
-
         this.$set(this.activity)
         if (this.isShare) {
           console.log(this.activity)

+ 191 - 27
orderPages/bookService/index.vue

@@ -159,11 +159,11 @@
 <!--      </view>-->
 
 			<view class="btnTitle flex-row">
-				<u-icon v-if="selectIcon" name="checkmark-circle-fill" color="#FFE52C" size="18"
-					@click="selectChange"></u-icon>
-				<u-icon v-else name="/static/order/ud9.png" color="#FFE52C" size="18" @click="selectChange"></u-icon>
-				<text :style="{'margin-left':'10rpx'}">请阅读并同意</text>
-				<text :style="{'color':'red'}" @click="goTermsOfService">《预约需知》</text>
+				<view class="agree-checkbox" :class="{ checked: selectIcon }" @click="selectChange">
+					<text v-if="selectIcon" class="check-icon">✓</text>
+				</view>
+				<text class="agree-text">请阅读并同意</text>
+				<text class="agree-link" @click="goTermsOfService">《预约需知》</text>
 			</view>
 			<view class="btn flex-row justify-between">
 				<view>
@@ -206,7 +206,7 @@
                 服务对象:{{ item.serviceObjectName || '' }}
               </view>
               <view class="title1">
-                适用门店:{{ item.useStoreDesc || '' }} {{ item.use_store_desc || '' }} {{ item.useStoreDesc || '' }} {{ item.useStoreDesc || '' }}
+                适用门店:{{ item.useStoreDesc || '' }}
               </view>
               <view class="title1">
                 到期时间:{{ item.effectiveEndTime.slice(0,10) }}
@@ -214,7 +214,7 @@
             </view>
 
             <view class="h-right-content flex-col justify-center ">
-              <view class="btn1" @click="navigateTo(item)">
+              <view class="btn1" @click="upgrade(item)">
                 <text>续费</text>
               </view>
             </view>
@@ -222,9 +222,31 @@
 
         </scroll-view>
 
+        <view class="expire-popup-footer">
+          <view class="no-more-prompt" @click="noMoreExpirePrompt = !noMoreExpirePrompt">
+            <view class="checkbox" :class="{ checked: noMoreExpirePrompt }">
+              <text v-if="noMoreExpirePrompt" class="check-icon">✓</text>
+            </view>
+            <text class="no-more-text">不再提示</text>
+          </view>
+          <view class="close-btn" @click="closeExpirePopup">关闭</view>
+        </view>
+
       </view>
 
     </uni-popup>
+    <uni-popup ref="upgradePopup" type="center">
+      <view class="upgradePopupView">
+        <view class="upgradeTitle">请选择升级活动</view>
+        <scroll-view class="upgradeScroll" scroll-y>
+          <view class="upgradeItem" v-for="(act,idx) in upgradeActivityList" :key="idx" @click="selectUpgradeActivity(idx)">
+            <view class="upgradeItemTitle">{{act.title}}</view>
+            <view class="upgradeItemPrice">活动价格:<text class="upgradePrice">{{act.salePrice}}元</text></view>
+          </view>
+        </scroll-view>
+        <view class="upgradeCloseBtn" @click="closeUpgradePopup">取消</view>
+      </view>
+    </uni-popup>
 
 
   </view>
@@ -260,7 +282,7 @@
 				price: '0',
 				//订单编号
 				subOrderNo:'',
-				selectIcon: true,
+				selectIcon: false,
 				orderParam:{
 					orderType: 1,
 					serviceAttribute: 2,
@@ -289,6 +311,8 @@
         takeNumberRules:[],
         storeInfo: {},
         expireEquityCard:[], //过期的权益卡
+        noMoreExpirePrompt: false, // 权益卡到期弹框不再提示
+        upgradeActivityList:[],
         activityImg:'',
 			}
 		},
@@ -395,30 +419,89 @@
         this.$api.getExpireEquityCard({
           serviceObjectId:0
         }).then((res)=>{
-          this.expireEquityCard = res.data.data;
-          // if (this.expireEquityCard.length > 0){
-          //   uni.showModal({
-          //     title:'温馨提示',
-          //     content:'您有' + this.expireEquityCard.length + '张权益卡即将到期',
-          //     confirmText:'立即续费',
-          //     success:(res)=>{
-          //       if (res.confirm) {
-          //         console.log('用户点击确定');
-          //         uni.navigateTo({
-          //           url:'/storePages/myRights/index'
-          //         })
-          //       } else if (res.cancel) {
-          //         console.log('用户点击取消');
-          //       }
-          //     }
-          //   })
-          // }
-
+          let list = res.data.data || [];
+          // 过滤掉用户已标记"不再提示"的卡片
+          const dismissedIds = uni.getStorageSync('dismissed_expire_equity_cards') || []
+          const validDismissedIds = []
+          const newList = []
+          for (const item of list) {
+            if (dismissedIds.includes(item.equityCardId)) {
+              validDismissedIds.push(item.equityCardId)
+            } else {
+              newList.push(item)
+            }
+          }
+          // 清理已失效的 dismissed 记录
+          uni.setStorageSync('dismissed_expire_equity_cards', validDismissedIds)
+          this.expireEquityCard = newList
           if (this.expireEquityCard.length > 0){
+            this.noMoreExpirePrompt = false
             this.$refs.showExpireEquityCard.open()
           }
         })
       },
+      closeExpirePopup() {
+        if (this.noMoreExpirePrompt) {
+          const dismissedIds = uni.getStorageSync('dismissed_expire_equity_cards') || []
+          for (const item of this.expireEquityCard) {
+            if (item.equityCardId && !dismissedIds.includes(item.equityCardId)) {
+              dismissedIds.push(item.equityCardId)
+            }
+          }
+          uni.setStorageSync('dismissed_expire_equity_cards', dismissedIds)
+        }
+        this.$refs.showExpireEquityCard.close()
+      },
+      upgrade(item){
+        console.log(item,'itemitem')
+        if (!item.equityCardId){
+          uni.showToast({
+            title: '当前权益卡暂无可升级活动',
+            icon: 'none'
+          })
+          return
+        }
+        uni.showLoading({title: '加载中'})
+        this.$api.upgradeList(item.equityCardId).then(res=>{
+          uni.hideLoading()
+          const list = (res && res.data && (res.data.data || res.data.rows)) || []
+          if (!list || list.length === 0){
+            uni.showToast({
+              title: '当前权益卡暂无可升级活动',
+              icon: 'none'
+            })
+            return
+          }
+          this.currentUpgradeItem = item
+          if (list.length === 1){
+            this.goUpgradeDetail(list[0], item)
+          }else {
+            this.upgradeActivityList = list
+            this.$refs.upgradePopup.open()
+          }
+        }).catch(()=>{
+          uni.hideLoading()
+        })
+      },
+      goUpgradeDetail(activity, item){
+        console.log(activity, item,'activity, item')
+        if (!activity || !activity.id){
+          return
+        }
+        let url = '/orderPages/activityDetail/activityDetail?id=' + activity.id + '&upgradeEquityCardId=' + item.id
+        if (item.serviceObjectId){
+          url += '&renewServiceObjectId=' + item.serviceObjectId
+        }
+        uni.navigateTo({url})
+      },
+      closeUpgradePopup() {
+        this.$refs.upgradePopup.close()
+      },
+      selectUpgradeActivity(idx) {
+        const activity = this.upgradeActivityList[idx]
+        this.goUpgradeDetail(activity, this.currentUpgradeItem)
+        this.$refs.upgradePopup.close()
+      },
 
 
 
@@ -1065,4 +1148,85 @@
       color: #666;
     }
   }
+
+  .agree-checkbox {
+    width: 34rpx;
+    height: 34rpx;
+    border: 2rpx solid #ccc;
+    border-radius: 8rpx;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-right: 10rpx;
+    flex-shrink: 0;
+
+    &.checked {
+      background-color: #FFE05C;
+      border-color: #FFE05C;
+    }
+
+    .check-icon {
+      color: #333;
+      font-size: 22rpx;
+      font-weight: bold;
+    }
+  }
+
+  .agree-text {
+    font-size: 26rpx;
+    color: #666;
+    margin-right: 6rpx;
+  }
+
+  .agree-link {
+    font-size: 26rpx;
+    color: #2979ff;
+  }
+
+  .expire-popup-footer {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 20rpx 32rpx 30rpx;
+
+    .no-more-prompt {
+      display: flex;
+      align-items: center;
+
+      .checkbox {
+        width: 32rpx;
+        height: 32rpx;
+        border: 2rpx solid #ccc;
+        border-radius: 6rpx;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-right: 10rpx;
+
+        &.checked {
+          background-color: #2979ff;
+          border-color: #2979ff;
+        }
+
+        .check-icon {
+          color: #fff;
+          font-size: 22rpx;
+          font-weight: bold;
+        }
+      }
+
+      .no-more-text {
+        font-size: 26rpx;
+        color: #666;
+      }
+    }
+
+    .close-btn {
+      padding: 10rpx 36rpx;
+      background-color: #2979ff;
+      color: #fff;
+      font-size: 28rpx;
+      border-radius: 30rpx;
+    }
+  }
 </style>

+ 48 - 0
orderPages/storeService/index.rpx.scss

@@ -258,3 +258,51 @@
   border-radius: 36rpx;
   padding: 10rpx 20rpx;
 }
+.upgradePopupView{
+  width: 600rpx;
+  background: #FFFFFF;
+  border-radius: 20rpx;
+  padding: 32rpx;
+  box-sizing: border-box;
+}
+.upgradeTitle{
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333333;
+  text-align: center;
+  margin-bottom: 24rpx;
+}
+.upgradeScroll{
+  max-height: 600rpx;
+}
+.upgradeItem{
+  padding: 24rpx;
+  background: #F7F7F7;
+  border-radius: 16rpx;
+  margin-bottom: 16rpx;
+}
+.upgradeItemTitle{
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333333;
+  line-height: 40rpx;
+}
+.upgradeItemPrice{
+  font-size: 24rpx;
+  color: #666666;
+  margin-top: 8rpx;
+}
+.upgradePrice{
+  color: #FF4444;
+  font-weight: bold;
+}
+.upgradeCloseBtn{
+  height: 80rpx;
+  line-height: 80rpx;
+  text-align: center;
+  background: #FFE05C;
+  border-radius: 40rpx;
+  font-size: 28rpx;
+  color: #333333;
+  margin-top: 16rpx;
+}

+ 154 - 22
orderPages/storeService/index.vue

@@ -149,7 +149,10 @@
             </view>
 
             <view class="h-right-content flex-col justify-center ">
-              <view class="btn" @click="navigateTo(item)">
+<!--              <view class="btn" @click="navigateTo(item)">-->
+<!--                <text>续费</text>-->
+<!--              </view>-->
+              <view class="btn" @click="upgrade(item)">
                 <text>续费</text>
               </view>
             </view>
@@ -157,10 +160,31 @@
 
         </scroll-view>
 
+        <view class="expire-popup-footer">
+          <view class="no-more-prompt" @click="noMoreExpirePrompt = !noMoreExpirePrompt">
+            <view class="checkbox" :class="{ checked: noMoreExpirePrompt }">
+              <text v-if="noMoreExpirePrompt" class="check-icon">✓</text>
+            </view>
+            <text class="no-more-text">不再提示</text>
+          </view>
+          <view class="close-btn" @click="closeExpirePopup">关闭</view>
+        </view>
+
       </view>
 
     </uni-popup>
-
+    <uni-popup ref="upgradePopup" type="center">
+      <view class="upgradePopupView">
+        <view class="upgradeTitle">请选择续费活动</view>
+        <scroll-view class="upgradeScroll" scroll-y>
+          <view class="upgradeItem" v-for="(act,idx) in upgradeActivityList" :key="idx" @click="selectUpgradeActivity(idx)">
+            <view class="upgradeItemTitle">{{act.title}}</view>
+            <view class="upgradeItemPrice">活动价格:<text class="upgradePrice">{{act.salePrice}}元</text></view>
+          </view>
+        </scroll-view>
+        <view class="upgradeCloseBtn" @click="closeUpgradePopup">取消</view>
+      </view>
+    </uni-popup>
 
 
   </view>
@@ -182,6 +206,7 @@
 				store: {},
 				serviceObjectList: [],
 				requestStatus: false,
+        upgradeActivityList:[],
 				orderParam: {
 					orderType: 1,
 					serviceAttribute: 1,
@@ -209,6 +234,7 @@
         takeNumberRules:[],
         storeInfo: {},
         expireEquityCard:[], //过期的权益卡
+        noMoreExpirePrompt: false, // 权益卡到期弹框不再提示
         activityImg:"",
 			}
 		},
@@ -288,7 +314,15 @@
           this.recommendActivity = res.data.data
         })
       },
-
+      selectUpgradeActivity(idx){
+        const activity = this.upgradeActivityList[idx]
+        console.log(activity, 'activity')
+        this.goUpgradeDetail(activity, this.currentUpgradeItem)
+        this.closeUpgradePopup()
+      },
+      closeUpgradePopup(){
+        this.$refs.upgradePopup.close()
+      },
       navigateTo(item){
         if(item.activityId){
           let list = item.activityId.split(',')
@@ -308,34 +342,85 @@
         }
 
       },
-
+      upgrade(item){
+        console.log(item,'itemitem')
+        if (!item.equityCardId){
+          uni.showToast({
+            title: '当前权益卡暂无可升级活动',
+            icon: 'none'
+          })
+          return
+        }
+        uni.showLoading({title: '加载中'})
+        this.$api.upgradeList(item.equityCardId).then(res=>{
+          uni.hideLoading()
+          const list = (res && res.data && (res.data.data || res.data.rows)) || []
+          if (!list || list.length === 0){
+            uni.showToast({
+              title: '当前权益卡暂无可升级活动',
+              icon: 'none'
+            })
+            return
+          }
+          this.currentUpgradeItem = item
+          if (list.length === 1){
+            this.goUpgradeDetail(list[0], item)
+          }else {
+            this.upgradeActivityList = list
+            this.$refs.upgradePopup.open()
+          }
+        }).catch(()=>{
+          uni.hideLoading()
+        })
+      },
+      goUpgradeDetail(activity, item){
+        console.log(activity, item,'activity, item')
+        if (!activity || !activity.id){
+          return
+        }
+        let url = '/orderPages/activityDetail/activityDetail?id=' + activity.id + '&upgradeEquityCardId=' + item.id
+        if (item.serviceObjectId){
+          url += '&renewServiceObjectId=' + item.serviceObjectId
+        }
+        uni.navigateTo({url})
+      },
       getExpireEquityCard(){
         this.$api.getExpireEquityCard({
           serviceObjectId:0
         }).then((res)=>{
-          this.expireEquityCard = res.data.data;
-          // if (this.expireEquityCard.length > 0){
-          //   uni.showModal({
-          //     title:'温馨提示',
-          //     content:'您有' + this.expireEquityCard.length + '张权益卡即将到期',
-          //     confirmText:'立即续费',
-          //     success:(res)=>{
-          //       if (res.confirm) {
-          //         console.log('用户点击确定');
-          //         uni.navigateTo({
-          //           url:'/storePages/myRights/index'
-          //         })
-          //       } else if (res.cancel) {
-          //         console.log('用户点击取消');
-          //       }
-          //     }
-          //   })
-          // }
+          let list = res.data.data || [];
+          // 过滤掉用户已标记"不再提示"的卡片
+          const dismissedIds = uni.getStorageSync('dismissed_expire_equity_cards') || []
+          const validDismissedIds = []
+          const newList = []
+          for (const item of list) {
+            if (dismissedIds.includes(item.equityCardId)) {
+              validDismissedIds.push(item.equityCardId)
+            } else {
+              newList.push(item)
+            }
+          }
+          // 清理已失效的 dismissed 记录
+          uni.setStorageSync('dismissed_expire_equity_cards', validDismissedIds)
+          this.expireEquityCard = newList
           if (this.expireEquityCard.length > 0){
+            this.noMoreExpirePrompt = false
             this.$refs.showExpireEquityCard.open()
           }
         })
       },
+      closeExpirePopup() {
+        if (this.noMoreExpirePrompt) {
+          const dismissedIds = uni.getStorageSync('dismissed_expire_equity_cards') || []
+          for (const item of this.expireEquityCard) {
+            if (item.equityCardId && !dismissedIds.includes(item.equityCardId)) {
+              dismissedIds.push(item.equityCardId)
+            }
+          }
+          uni.setStorageSync('dismissed_expire_equity_cards', dismissedIds)
+        }
+        this.$refs.showExpireEquityCard.close()
+      },
 
 
 			dialogConfirm(){
@@ -734,4 +819,51 @@ background-color: white;
       color: #666;
     }
   }
+
+  .expire-popup-footer {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 20rpx 32rpx 30rpx;
+
+    .no-more-prompt {
+      display: flex;
+      align-items: center;
+
+      .checkbox {
+        width: 32rpx;
+        height: 32rpx;
+        border: 2rpx solid #ccc;
+        border-radius: 6rpx;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-right: 10rpx;
+
+        &.checked {
+          background-color: #2979ff;
+          border-color: #2979ff;
+        }
+
+        .check-icon {
+          color: #fff;
+          font-size: 22rpx;
+          font-weight: bold;
+        }
+      }
+
+      .no-more-text {
+        font-size: 26rpx;
+        color: #666;
+      }
+    }
+
+    .close-btn {
+      padding: 10rpx 36rpx;
+      background-color: #2979ff;
+      color: #fff;
+      font-size: 28rpx;
+      border-radius: 30rpx;
+    }
+  }
 </style>

+ 81 - 6
pages/index/index.vue

@@ -395,7 +395,7 @@ export default {
       userInfo: {},
       bannerList: [],
       reqParm: {
-        auth: true,
+        auth: false,
         appid: 46,
         telphone: '',
         latitude: 26.5737,
@@ -446,8 +446,10 @@ export default {
   },
 
   onShow() {
-    // this.getRuleById()
-    this.myActivity()
+    const accessToken = uni.getStorageSync('accessToken')
+    if (accessToken) {
+      this.myActivity()
+    }
 
     this.updateApp()
     this.userInfo = uni.getStorageSync('userInfo');
@@ -470,6 +472,9 @@ export default {
     } else {
       this.storeInfo = data;
     }
+
+    // 用户主动登录后,处理拓客端扫码逻辑
+    this.handleExpandParam()
   },
   onLoad(e) {
 
@@ -572,6 +577,50 @@ export default {
 
 
   methods: {
+    // 处理拓客端扫码逻辑(用户从登录页回来后调用)
+    handleExpandParam() {
+      let expandParam = uni.getStorageSync('expandParam')
+      console.log('========handleExpandParam expandParam=======', expandParam)
+      if (!expandParam || expandParam.isUse == 1) {
+        console.log('========handleExpandParam 无参数或已使用,直接返回=======')
+        return
+      }
+
+      // 检查是否已登录(有 accessToken)
+      const accessToken = uni.getStorageSync('accessToken')
+      if (!accessToken) {
+        console.log('========handleExpandParam 未登录,直接返回=======')
+        return
+      }
+
+      // 二维码过期检查
+      if (new Date().getTime() > expandParam.timestamp) {
+        uni.showModal({
+          title: '温馨提示',
+          content: '当前二维码已过期,请重新扫码',
+          showCancel: false
+        });
+        expandParam.isUse = 1
+        uni.setStorageSync('expandParam', expandParam)
+        return
+      }
+
+      const isNew = uni.getStorageSync('wxLoginIsNew')
+      console.log('========handleExpandParam isNew=======', isNew)
+      if (isNew) {
+        this.getRuleById()
+      } else {
+        this.$api.addRecordForAttach({
+          ...expandParam,
+          isNew: 0,
+          isBindSuccess: 0,
+        }).then(res => {
+          expandParam.isUse = 1
+          uni.setStorageSync('expandParam', expandParam)
+          console.log('+++++++++老用户,扫码推广失败记录!++++++++++++++++')
+        })
+      }
+    },
 
     myActivity() {
       // this.$api.myActivity({
@@ -589,6 +638,8 @@ export default {
     closeStrategyListPoup() {
       this.$refs.strategyListPoup.close()
       //关闭弹窗
+      let expandParam = uni.getStorageSync('expandParam')
+      let that = this
       console.log('拓客端推广用户绑定失败!')
       console.log('+++++++++++++++expandParam+++++++++++++++++++++++', expandParam)
       that.$api.addRecordForAttach({
@@ -606,6 +657,22 @@ export default {
     userBindMember() {
       let expandParam = uni.getStorageSync('expandParam')
       let that = this
+
+      // 直接从 Storage 获取最新的 userInfo,避免 this.userInfo 未正确赋值
+      const userInfo = uni.getStorageSync('userInfo') || {}
+      const memberId = userInfo.id
+      console.log('========userBindMember memberId=======', memberId)
+      console.log('========userBindMember userInfo=======', userInfo)
+
+      if (!memberId) {
+        uni.showToast({
+          title: '用户信息获取失败,请重新登录',
+          duration: 2000,
+          icon: "error"
+        });
+        return
+      }
+
       this.$refs.form1.validate().then(res => {
         let couponIds = []
         for (const strategy of this.rule.strategyList) {
@@ -627,7 +694,7 @@ export default {
         that.$api.userBindMember(
             {
               ...expandParam,
-              memberId: this.userInfo.id,
+              memberId: memberId,
               memberPhone: this.phoneParam.phonenumber,
               smsCode: this.phoneParam.smsCode,
               couponIds: couponIds
@@ -709,12 +776,15 @@ export default {
 
     getRuleById() {
       let expandParam = uni.getStorageSync('expandParam')
+      console.log('========getRuleById expandParam=======', expandParam)
+      console.log('========getRuleById ruleId=======', expandParam.ruleId)
       this.$api.getRuleById({
         id: expandParam.ruleId
       }).then(res => {
+        console.log('========getRuleById res=======', res)
         this.rule = res.data.data
 
-        if (this.rule.strategyList.length > 0) {
+        if (this.rule.strategyList && this.rule.strategyList.length > 0) {
           for (const strategy of this.rule.strategyList) {
             if (this.rule.isAllReceived == 1) {
               strategy.select = 1
@@ -723,7 +793,12 @@ export default {
             }
           }
           this.$refs.strategyListPoup.open()
+          console.log('========拓客弹窗已打开=======')
+        } else {
+          console.log('========strategyList为空,不弹窗=======')
         }
+      }).catch(err => {
+        console.log('========getRuleById 请求失败=======', err)
       })
     },
 
@@ -845,7 +920,7 @@ export default {
 
     getNoticeListData() {
       let req = {
-        auth: true,
+        auth: false,
         noticeType: 2,
         status: 0
       }

+ 20 - 0
pages/login/login.vue

@@ -18,6 +18,9 @@
 				<!--				<u-icon name="weixin-fill" color="green" size="26"></u-icon>-->
 				快捷登录
 			</button>
+			<view class="guest-btn" @click="goBack()">
+				<text>暂不登录,先逛逛</text>
+			</view>
 
 			<!--			<view class="login-form">-->
 			<!--				<view class="remember-acconut">-->
@@ -151,6 +154,7 @@
 							uni.setStorageSync('userInfo',res.data.data.userInfo)
 							uni.setStorageSync('accessToken',res.data.data.access_token)
 							uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
+							uni.setStorageSync('wxLoginIsNew',res.data.data.isNew)
 
 							uni.removeStorageSync('parent_member_id');
 							// if (!res.data.data.phoneIsBind){
@@ -187,6 +191,12 @@
 				console.log(e.detail.errMsg) // 回调信息(成功失败都会返回)
 				console.log(e.detail.errno) // 错误码(失败时返回)
 			},
+			// 返回首页(游客模式)
+			goBack() {
+				uni.switchTab({
+					url: '/pages/index/index',
+				})
+			},
 			// 去找回账号页面
 			gotoRetieveAccount() {
 				uni.navigateTo({
@@ -259,6 +269,16 @@
 				width: 12px;
 			}
 		}
+			.guest-btn {
+				text-align: center;
+				width: 70%;
+				margin: 0 auto;
+				margin-top: 20px;
+				height: 40px;
+				line-height: 40px;
+				font-size: 14px;
+				color: #999;
+			}
 
 		.identifying-code {
 			image {

+ 173 - 147
storePages/myRights/index.rpx.scss

@@ -1,63 +1,118 @@
-
 .page{
   background: #F7F7F7;
   padding: 0 32rpx;
-  border-top: 1px solid #F7F7F7 ;
+  border-top: 1px solid #F7F7F7;
 }
-.btn{
-  height: 84rpx;
-  background: #FFE05C;
-  border-radius: 54rpx;
-  margin: 32rpx 0;
 
-  font-size: 28rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #333333;
-  line-height: 84rpx;
-  text-align: center;
-}
-.noUse{
-  margin: 32rpx 0;
-  font-size: 28rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #333333;
-  line-height: 40rpx;
+/* ===== 卡片堆叠动画 ===== */
+.card-list {
+  padding-top: 24rpx;
+  padding-bottom: 60rpx;
 }
 
-
-.row-list{
+.card-item {
   width: 686rpx;
-  min-height:188rpx;
-  margin-top: 24rpx;
   background: #FFFFFF;
-  //background-image: url('/static/coupon/u210.png');
-  //background-repeat: no-repeat;
-  //background-size: cover;
-  overflow: hidden;
   border-radius: 20rpx;
+  overflow: hidden;
+  box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.08);
+  position: relative;
+  margin-bottom: 24rpx;
 }
 
+/* 展开状态 */
+.card-expanded {
+  box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.12);
+}
 
-.h-text{
-  width: 200rpx;
-  min-height:188rpx;
-  background: #FFE05C;
+/* 收起状态 */
+.card-collapsed .card-header {
+  padding: 16rpx 24rpx;
+  min-height: unset;
 }
-.h-center-content{
-  width: 298rpx;
-  min-height: 188rpx;
+
+/* 卡片头部 */
+.card-header {
+  padding: 20rpx 24rpx;
+  min-height: 140rpx;
+}
+
+/* 卡片内容区 */
+.card-body {
+  max-height: 0;
+  opacity: 0;
+  overflow: hidden;
+  transition: max-height 0.35s ease, opacity 0.3s ease;
+}
+
+.card-expanded .card-body {
+  max-height: 1200rpx;
+  opacity: 1;
+  transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
+}
+
+.card-body-inner {
+  padding: 0 24rpx 24rpx 24rpx;
+}
+
+/* 展开/收起箭头 */
+.arrow-icon {
+  text-align: center;
+  margin-top: 8rpx;
+  transition: transform 0.3s ease;
+}
+
+.arrow-up {
+  transform: rotate(180deg);
+}
+
+/* 收起时显示的信息 */
+.collapsed-info {
+  display: flex;
+  flex-direction: row;
+  margin-top: 8rpx;
 }
-.h-right-content{
-  width: 188rpx;
-  height: 188rpx;
+
+/* 详情信息 */
+.detail-info {
+  padding-top: 16rpx;
+  border-top: 1rpx solid #F2F2F2;
 }
-.h-right-content-img{
-  width: 188rpx;
-  height: 188rpx;
+
+/* 使用规则 */
+.rule-toggle {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 20rpx 0;
+  border-top: 1rpx solid #F2F2F2;
+  font-size: 24rpx;
+  color: #666666;
+}
+
+/* ===== 原有样式 ===== */
+.h-left-content-img{
+  width: 140rpx;
+  height: 140rpx;
   border-radius: 8rpx;
 }
+.img-label{
+  font-size: 20rpx;
+  color: #999999;
+  text-align: center;
+  margin-top: 8rpx;
+}
+.h-center-content{
+  width: 340rpx;
+  min-height: 120rpx;
+  margin-left: 20rpx;
+}
+.h-text{
+  width: 120rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 .magnifyUrlView{
   border-radius: 20rpx;
   overflow: hidden;
@@ -71,23 +126,12 @@
   line-height: 52rpx;
   text-align: center;
 }
-.desc{
-  height: 36rpx;
-  font-size: 20rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #333333;
-  line-height: 36rpx;
-  text-align: center;
-}
 .h-value{
   font-size: 28rpx;
   font-family: PingFangSC-Medium, PingFang SC;
   font-weight: bold;
   color: #333333;
   line-height: 44rpx;
-  margin-top: 24rpx;
-  margin-left: 24rpx;
 }
 .title{
   font-size: 20rpx;
@@ -95,119 +139,101 @@
   font-weight: 400;
   color: #999999;
   line-height: 36rpx;
-  margin-left: 24rpx;
 }
-.h-btn-value-use{
-  width: 156rpx;
-  height: 64rpx;
-  background: #93D21A;
-  border-radius: 32rpx;
-
-  font-size: 24rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #FFFFFF;
-  line-height: 64rpx;
-  text-align: center;
+.empty{
+  margin-top: 80rpx;
+  width: 300rpx;
 }
-.h-btn-img{
-  width: 136rpx;
-  height: 136rpx;
+.emptyText{
+  font-size: 28rpx;
+  color: #8f939c;
+  margin-top: 20rpx;
 }
-.row-list:first-child{
-  margin-top: 0;
-
+.remark{
+  width: 100%;
+  font-size: 24rpx;
+  line-height: 40rpx;
+  background: #FAFAFA;
+  border-radius: 12rpx;
+  padding: 20rpx;
+  text-indent: unset;
+  color: #999999;
+  margin-top: 12rpx;
+  box-sizing: border-box;
+}
+.remarkText{
+  color: #CCCCCC;
 }
-.btn{
-  width: 156rpx;
-  height: 64rpx;
-  background: #93D21A;
-  border-radius: 32rpx;
 
+.actionBar{
+  padding: 16rpx 0;
+  //border-top: 1rpx solid #F2F2F2;
+}
+.actionBtn{
+  min-width: 128rpx;
+  height: 56rpx;
+  line-height: 56rpx;
+  text-align: center;
+  border-radius: 28rpx;
   font-size: 24rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
+  font-weight: bold;
+  padding: 0 24rpx;
+  margin-left: 16rpx;
+}
+.renewBtn{
+  background: #FFE05C;
+  color: #333333;
+}
+.upgradeBtn{
+  background: #FF6B35;
   color: #FFFFFF;
-  line-height: 64rpx;
-  text-align: center;
 }
 
-
-
-.payView{
-  height: 638rpx;
+.upgradePopupView{
+  width: 600rpx;
   background: #FFFFFF;
-  box-shadow: 0rpx -4rpx 8rpx 0rpx rgba(0,0,0,0.03);
-  border-radius: 24rpx 24rpx 0rpx 0rpx;
-  padding: 24rpx 32rpx;
-  z-index: 100;
+  border-radius: 20rpx;
+  padding: 32rpx;
+  box-sizing: border-box;
 }
-.payType{
+.upgradeTitle{
   font-size: 32rpx;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: bord;
-  color: #111111;
-  line-height: 48rpx;
+  font-weight: bold;
+  color: #333333;
+  text-align: center;
+  margin-bottom: 24rpx;
 }
-.x{
-  width: 35rpx;
-  height: 35rpx;
-  border-radius: 18rpx;
+.upgradeScroll{
+  max-height: 600rpx;
 }
-.payTitle{
-  font-size: 24rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #666666;
-  line-height: 40rpx;
-  margin-top: 8rpx;
-}
-.payItem{
-  background: #FAFAFA;
-  border-radius: 20rpx;
-  padding: 34rpx 32rpx;
-  margin-top: 32rpx;
+.upgradeItem{
+  padding: 24rpx;
+  background: #F7F7F7;
+  border-radius: 16rpx;
+  margin-bottom: 16rpx;
 }
-.payName{
-  margin-left: 24rpx;
+.upgradeItemTitle{
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333333;
+  line-height: 40rpx;
 }
-.balance{
+.upgradeItemPrice{
   font-size: 24rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #999999;
-  line-height: 40rpx;
+  color: #666666;
+  margin-top: 8rpx;
 }
-.commitBtn{
-  width: 686rpx;
-  height: 108rpx;
-  background: #FFE05C;
-  border-radius: 60rpx;
-  margin-top: 32rpx;
-
-  font-size: 32rpx;
-  font-family: PingFangSC-Medium, PingFang SC;
+.upgradePrice{
+  color: #FF4444;
   font-weight: bold;
-  color: #111111;
-  line-height: 108rpx;
-  text-align: center;
 }
-.empty{
-  margin-top: 80rpx;
-  width: 300rpx;
-}
-.emptyText{
+.upgradeCloseBtn{
+  height: 80rpx;
+  line-height: 80rpx;
+  text-align: center;
+  background: #FFE05C;
+  border-radius: 40rpx;
   font-size: 28rpx;
-  color: #8f939c;
-  margin-top: 20rpx;
-}
-.remark{
-  width: 646rpx;
-  font-size: 25rpx;
-  line-height: 40rpx;
-  background: #FFFFFF;
-  border-radius: 20rpx;
-  padding: 20rpx;
-  text-indent: 2em;
-  color: #999999;
+  color: #333333;
+  margin-top: 16rpx;
 }

+ 253 - 144
storePages/myRights/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="page" :style="{'height':windowHeight}">
 
-		<view class="flex-col" v-if="!equityList">
+		<view class="flex-col" v-if="!equityList || equityList.length === 0">
 			<view class="flex-row justify-center">
 				<image class="empty" src="/static/imageIcon/empty.png" mode="widthFix"></image>
 			</view>
@@ -11,169 +11,280 @@
 		</view>
 
 		<scroll-view v-else scroll-y :style="{'height':windowHeight}">
-			<view  class="row-list" v-for="(item,index) in equityList" :key="index">
-        <view class="flex-row justify-start" @click.stop="showRemark(item)">
-          <view class="h-text flex-col justify-center ">
-            <view class="money">
-              <text>{{item.faceValue}}</text>
-            </view>
-            <!--				<view class="desc">-->
-            <!--					<text>{{item.title}}</text>-->
-            <!--				</view>-->
-            <view class="flex-row justify-center" v-if="item.isShow">
-              <text style="font-size: 28rpx;font-weight: bold;color: red;" @click.stop="navigateTo(item)">点击续费</text>
-            </view>
-          </view>
-
-          <view class="h-center-content flex-col justify-around ">
-            <view class="h-value">
-              <text>{{item.title}}</text>
-            </view>
-            <view class="title">
-              适用项目:{{item.serviceProjectName || ''}}
-            </view>
-            <view class="title">
-              适用门店:{{ item.useStoreDesc || '' }}
-            </view>
-            <view class="title">
-              绑定对象:{{item.serviceObjectName}}
-            </view>
-            <view class="title">
-              结束期限:{{item.effectiveEndTime.substring(0,10)}}
-            </view>
-          </view>
-
-          <view class=" flex-col justify-center ">
-            <image class="h-right-content-img "  :src="item.facePhotoUrl || '/static/logo.png'" mode="aspectFit" @click="magnify(item.facePhotoUrl)"></image>
-          </view>
-        </view>
-
-        <view v-if="showRemarkId == item.id" class="remark" style="text-indent:unset">
-          <view v-if="item.unavailableWeeklyTimes || item.unavailableTimeRanges">
-            不可用日期:
-            <view v-if="item.unavailableWeeklyTimes">{{ parseWeeklyTimes(item.unavailableWeeklyTimes) }}</view>
-            <view v-if="item.unavailableTimeRanges">{{ parseTimeRanges(item.unavailableTimeRanges) }}</view>
-          </view>
-          <view v-if="item.delayEffectiveDays > 0">
-            生效时间:
-            <text>购买后{{item.delayEffectiveDays}}天生效</text>
-          </view>
-          <view v-if="item.description !=null">
-            使用说明:
-            <text>{{ item.description }}</text>
-          </view>
-          <text v-else class="remarkText">该优惠券暂无使用说明</text>
-        </view>
+			<view class="card-list">
+				<view
+					class="card-item"
+					:class="{
+						'card-expanded': expandedId == item.id,
+						'card-collapsed': expandedId != item.id,
+						'card-first': index === 0,
+						'card-last': index === equityList.length - 1
+					}"
+					v-for="(item,index) in equityList"
+					:key="index"
+					:style="{zIndex: expandedId == item.id ? equityList.length + 1 : equityList.length - index}"
+				>
+					<!-- 卡片头部 -->
+					<view class="card-header flex-row justify-between" @click.stop="toggleCard(item)">
+						<view class="flex-row">
+							<view class="flex-col justify-center" style="align-items: center;" v-show="expandedId == item.id">
+								<image class="h-left-content-img" :src="item.facePhotoUrl || '/static/logo.png'" mode="aspectFit" @click.stop="magnify(item.facePhotoUrl)"></image>
+								<text class="img-label">服务对象图片</text>
+							</view>
+
+							<view class="h-center-content flex-col justify-around">
+								<view class="h-value">
+									<text>{{item.title}}</text>
+								</view>
+								<view class="title collapsed-info" v-show="expandedId == item.id">
+									<text>{{item.serviceObjectName}}</text>
+									<text style="margin-left: 16rpx;">{{item.effectiveEndTime.substring(0,10)}}到期</text>
+								</view>
+							</view>
+						</view>
+
+						<view class="h-text flex-col justify-center">
+							<view class="money">
+								<text>{{item.faceValue}}</text>
+							</view>
+							<view class="arrow-icon" :class="{'arrow-up': expandedId == item.id}">
+								<u-icon name="arrow-down-fill" color="#999" size="12"></u-icon>
+							</view>
+						</view>
+					</view>
+
+					<!-- 卡片内容:展开时显示 -->
+					<view class="card-body" :class="{'card-body-expanded': expandedId == item.id}">
+						<view class="card-body-inner">
+							<view class="detail-info">
+								<view class="title">
+									适用项目:{{item.serviceProjectName || ''}}
+								</view>
+								<view class="title">
+									适用门店:{{ item.useStoreDesc || '' }}
+								</view>
+								<view class="title">
+									绑定对象:{{item.serviceObjectName}}
+								</view>
+								<view class="title">
+									结束期限:{{item.effectiveEndTime.substring(0,10)}}
+								</view>
+							</view>
+
+							<view class="actionBar flex-row justify-end">
+<!--								<view class="actionBtn renewBtn" v-if="item.isShow" @click.stop="navigateTo(item)">续费</view>-->
+								<view class="actionBtn upgradeBtn" v-if="item.canRenew" @click.stop="upgrade(item)">续费</view>
+							</view>
+
+							<view class="rule-toggle" @click.stop="showRemark(item)">
+								<text>使用规则</text>
+								<u-icon v-if="item.id == showRemarkId" name="arrow-down-fill" color="#999" size="12"></u-icon>
+								<u-icon v-else name="play-right-fill" color="#999" size="12"></u-icon>
+							</view>
+
+							<view v-if="showRemarkId == item.id" class="remark" style="text-indent:unset">
+								<view v-if="item.unavailableWeeklyTimes || item.unavailableTimeRanges">
+									不可用日期:
+									<view v-if="item.unavailableWeeklyTimes">{{ parseWeeklyTimes(item.unavailableWeeklyTimes) }}</view>
+									<view v-if="item.unavailableTimeRanges">{{ parseTimeRanges(item.unavailableTimeRanges) }}</view>
+								</view>
+								<view v-if="item.delayEffectiveDays > 0">
+									生效时间:
+									<text>购买后{{item.delayEffectiveDays}}天生效</text>
+								</view>
+								<view v-if="item.description !=null">
+									使用说明:
+									<text>{{ item.description }}</text>
+								</view>
+								<text v-else class="remarkText">该优惠券暂无使用说明</text>
+							</view>
+						</view>
+					</view>
+				</view>
 			</view>
 		</scroll-view>
+
 		<uni-popup ref="popup">
 			<view class="magnifyUrlView">
 				<image :src="magnifyUrl" mode="widthFix"></image>
 			</view>
 		</uni-popup>
+
+		<uni-popup ref="upgradePopup" type="center">
+			<view class="upgradePopupView">
+				<view class="upgradeTitle">请选择续费活动</view>
+				<scroll-view class="upgradeScroll" scroll-y>
+					<view class="upgradeItem" v-for="(act,idx) in upgradeActivityList" :key="idx" @click="selectUpgradeActivity(idx)">
+						<view class="upgradeItemTitle">{{act.title}}</view>
+						<view class="upgradeItemPrice">活动价格:<text class="upgradePrice">{{act.salePrice}}元</text></view>
+					</view>
+				</scroll-view>
+				<view class="upgradeCloseBtn" @click="closeUpgradePopup">取消</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 <script>
 	import {date} from "@/uni_modules/uv-ui-tools/libs/function/test";
 
-  export default {
+	export default {
 		data() {
 			return {
-        showRemarkId:'',
+				expandedId: '',
+				showRemarkId:'',
 				magnifyUrl:'',
 				windowHeight:'',
 				userInfo:{},
 				equityList:[],
+				upgradeActivityList:[],
+				currentUpgradeItem:null,
 			};
 		},
 
-    computed: {
-      // 解析 unavailableWeeklyTimes,将 "3,4,5" 转换为 ["星期二", "星期三", "星期四"]
-      parseWeeklyTimes() {
-        return function(times) {
-          if (!times) return '';
-          const arr = times.split(',');
-          const weekMap = {
-            '1': '星期日',
-            '2': '星期一',
-            '3': '星期二',
-            '4': '星期三',
-            '5': '星期四',
-            '6': '星期五',
-            '7': '星期六'
-          };
-          return arr.map(item => weekMap[item]).join('、');
-        };
-      },
-      // 解析 unavailableTimeRanges,将 JSON 字符串转换为可读格式
-      parseTimeRanges() {
-        return function(ranges) {
-          if (!ranges) return '';
-          try {
-            const arr = JSON.parse(ranges);
-            return arr.map(item => {
-              const begin = item.beginTime?.split?.(' ')?.[0] || '';
-              const end = item.endTime?.split?.(' ')?.[0] || '';
-              return begin && end ? `${begin} - ${end}` : '';
-            }).filter(Boolean).join(';');
-          } catch (e) {
-            return '';
-          }
-        };
-      }
-    },
+		computed: {
+			parseWeeklyTimes() {
+				return function(times) {
+					if (!times) return '';
+					const arr = times.split(',');
+					const weekMap = {
+						'1': '星期日',
+						'2': '星期一',
+						'3': '星期二',
+						'4': '星期三',
+						'5': '星期四',
+						'6': '星期五',
+						'7': '星期六'
+					};
+					return arr.map(item => weekMap[item]).join('、');
+				};
+			},
+			parseTimeRanges() {
+				return function(ranges) {
+					if (!ranges) return '';
+					try {
+						const arr = JSON.parse(ranges);
+						return arr.map(item => {
+							const begin = item.beginTime?.split?.(' ')?.[0] || '';
+							const end = item.endTime?.split?.(' ')?.[0] || '';
+							return begin && end ? `${begin} - ${end}` : '';
+						}).filter(Boolean).join(';');
+					} catch (e) {
+						return '';
+					}
+				};
+			}
+		},
 
 		onLoad(option) {
 			let sysInfo = uni.getSystemInfoSync()
-			this.windowHeight =sysInfo.windowHeight - 3 +'px'//除标题栏栏外的屏幕可用高度
+			this.windowHeight = sysInfo.windowHeight - 3 + 'px'
 			this.userInfo = uni.getStorageSync('userInfo')
-
 			this.myEquityCardList()
 		},
 
 		methods: {
+			toggleCard(item) {
+				if (this.expandedId === item.id) {
+					this.expandedId = ''
+					this.showRemarkId = ''
+				} else {
+					this.expandedId = item.id
+					this.showRemarkId = ''
+				}
+			},
+
+			isShow(item){
+				if (item.effectiveEndTime){
+					let date = new Date(item.effectiveEndTime);
+					let now = new Date().getTime();
+					const timeDiff = Math.abs(now - date.getTime());
+					const ninetyDaysMs = 90 * 24 * 60 * 60 * 1000;
+					return timeDiff < ninetyDaysMs;
+				}
+				return false
+			},
+
+			navigateTo(item){
+				console.log('+++++++++++++++++++++++++++++++',item)
+				if(item.activityId){
+					let list = item.activityId.split(',')
+					if (list.length == 1){
+						uni.navigateTo({
+							url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId +'&renewServiceObjectId=' + item.serviceObjectId
+						})
+					}else {
+						uni.navigateTo({
+							url:'/orderPages/activityList/activityList?renewServiceObjectId=' + item.serviceObjectId + '&equityCardId=' + item.equityCardId
+						})
+					}
+				}else{
+					uni.navigateTo({
+						url:'/orderPages/activityList/activityList?renewServiceObjectId=' + item.serviceObjectId
+					})
+				}
+			},
+
+			upgrade(item){
+				if (!item.equityCardId){
+					uni.showToast({
+						title: '当前权益卡暂无可升级活动',
+						icon: 'none'
+					})
+					return
+				}
+				uni.showLoading({title: '加载中'})
+				this.$api.upgradeList(item.equityCardId).then(res=>{
+					uni.hideLoading()
+					const list = (res && res.data && (res.data.data || res.data.rows)) || []
+					if (!list || list.length === 0){
+						uni.showToast({
+							title: '当前权益卡暂无可升级活动',
+							icon: 'none'
+						})
+						return
+					}
+					this.currentUpgradeItem = item
+					if (list.length === 1){
+						this.goUpgradeDetail(list[0], item)
+					}else {
+						this.upgradeActivityList = list
+						this.$refs.upgradePopup.open()
+					}
+				}).catch(()=>{
+					uni.hideLoading()
+				})
+			},
+
+			selectUpgradeActivity(idx){
+				const activity = this.upgradeActivityList[idx]
+				console.log(activity, 'activity')
+				this.goUpgradeDetail(activity, this.currentUpgradeItem)
+				this.closeUpgradePopup()
+			},
+
+			goUpgradeDetail(activity, item){
+				if (!activity || !activity.id){
+					return
+				}
+				let url = '/orderPages/activityDetail/activityDetail?id=' + activity.id + '&upgradeEquityCardId=' + item.id
+				if (item.serviceObjectId){
+					url += '&renewServiceObjectId=' + item.serviceObjectId
+				}
+				uni.navigateTo({url})
+			},
+
+			closeUpgradePopup(){
+				this.$refs.upgradePopup.close()
+			},
+
+			showRemark(item) {
+				if (this.showRemarkId == item.id) {
+					this.showRemarkId = ''
+				} else {
+					this.showRemarkId = item.id
+				}
+			},
 
-      isShow(item){
-        if (item.effectiveEndTime){
-          let date = new Date(item.effectiveEndTime);
-          let now = new Date().getTime();
-          const timeDiff = Math.abs(now - date.getTime());
-          const ninetyDaysMs = 90 * 24 * 60 * 60 * 1000;
-          return timeDiff < ninetyDaysMs;
-        }
-        return false
-      },
-
-      navigateTo(item){
-        console.log('+++++++++++++++++++++++++++++++',item)
-        if(item.activityId){
-          let list = item.activityId.split(',')
-          if (list.length == 1){
-            uni.navigateTo({
-              url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId +'&renewServiceObjectId=' + item.serviceObjectId
-            })
-          }else {
-            uni.navigateTo({
-              url:'/orderPages/activityList/activityList?renewServiceObjectId=' + item.serviceObjectId + '&equityCardId=' + item.equityCardId
-            })
-          }
-        }else{
-          uni.navigateTo({
-            url:'/orderPages/activityList/activityList?renewServiceObjectId=' + item.serviceObjectId
-          })
-        }
-
-      },
-
-      showRemark(item) {
-        if (this.showRemarkId == item.id) {
-          this.showRemarkId = ''
-
-        } else {
-          this.showRemarkId = item.id
-
-        }
-      },
 			magnify(url){
 				if (!url){
 					return
@@ -186,19 +297,20 @@
 				this.$api.myEquityCardList().then(res=>{
 					console.log(res)
 					this.equityList = res.data.data
-          for (let equityListElement of this.equityList) {
-
-            let a = this.isShow(equityListElement)
-            console.log(a)
-            equityListElement.isShow = this.isShow(equityListElement)
-          }
+					if (this.equityList && this.equityList.length > 0) {
+						this.expandedId = this.equityList[0].id
+					}
+					for (let equityListElement of this.equityList) {
+						let a = this.isShow(equityListElement)
+						console.log(a)
+						equityListElement.isShow = this.isShow(equityListElement)
+					}
 					if (this.equityList){
 						this.getImgUrlByBannerOssId(this.equityList)
 					}
 				})
 			},
 
-			// 获取图片
 			getImgUrlByBannerOssId(items){
 				for(let i = 0; i <items.length; i++) {
 					if (items[i].facePhoto){
@@ -210,13 +322,10 @@
 					}
 				}
 			},
-
 		},
 	};
 </script>
 <style lang="scss" scoped>
-
 	@import '/common/css/common.css';
 	@import './index.rpx.scss';
-
 </style>