Преглед изворни кода

fix:权益卡升级到活动样式

xuyunhui пре 6 дана
родитељ
комит
26cb4cb45a
5 измењених фајлова са 424 додато и 229 уклоњено
  1. 0 2
      common/js/request.js
  2. 208 195
      myPages/userInfo/index.vue
  3. 191 27
      orderPages/bookService/index.vue
  4. 6 5
      pages/index/index.vue
  5. 19 0
      pages/login/login.vue

+ 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>

+ 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>

+ 6 - 5
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');
@@ -572,7 +574,6 @@ export default {
 
 
   methods: {
-
     myActivity() {
       // this.$api.myActivity({
       //   pageNum: 1,
@@ -845,7 +846,7 @@ export default {
 
     getNoticeListData() {
       let req = {
-        auth: true,
+        auth: false,
         noticeType: 2,
         status: 0
       }

+ 19 - 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">-->
@@ -187,6 +190,12 @@
 				console.log(e.detail.errMsg) // 回调信息(成功失败都会返回)
 				console.log(e.detail.errno) // 错误码(失败时返回)
 			},
+			// 返回首页(游客模式)
+			goBack() {
+				uni.switchTab({
+					url: '/pages/index/index',
+				})
+			},
 			// 去找回账号页面
 			gotoRetieveAccount() {
 				uni.navigateTo({
@@ -259,6 +268,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 {