xiaoxin vor 2 Jahren
Ursprung
Commit
196a73ae23
4 geänderte Dateien mit 9 neuen und 6 gelöschten Zeilen
  1. 2 1
      pages/community/community.vue
  2. 2 1
      pages/detail/detail.vue
  3. 4 4
      pages/home3/home3.vue
  4. 1 0
      pages/login/login.vue

+ 2 - 1
pages/community/community.vue

@@ -127,7 +127,8 @@ export default {
 	},
 	onShow() {
 		let userInfo = uni.getStorageSync('userInfo')
-		if (!userInfo) {
+		let tokenId = uni.getStorageSync('tokenId')
+		if (!userInfo || !tokenId) {
 			uni.showModal({
 				title: '提示',
 				content: '您当前未登录,请授权登录查看社区信息',

+ 2 - 1
pages/detail/detail.vue

@@ -700,7 +700,8 @@ export default {
 		// 点击 订 预定 按钮回调
 		goPageAffOrder(item) {
 			let flag = uni.getStorageSync('openid')
-			if (flag) {
+			let tokenId = uni.getStorageSync('tokenId')
+			if (flag && tokenId) {
 				if (!this.startTime) {
 					uni.showToast({
 						title: '请选择入住时间',

+ 4 - 4
pages/home3/home3.vue

@@ -60,7 +60,7 @@
 
 			<view class="body">
 				<!-- 优选民宿区域 -->
-				<view class="body_top">
+				<view class="body_top" v-if="hotelList.length">
 					<view class="circle"></view>
 					<view class="circle color"></view>
 					<view class="top_title">优选民宿 .</view>
@@ -122,7 +122,7 @@
 				</view>
 
 				<!-- 招商资讯区域 -->
-				<view class="body_top">
+				<view class="body_top" v-if="newsList.length">
 					<view class="circle"></view>
 					<view class="circle color"></view>
 					<view class="top_title">招商资讯 .</view>
@@ -150,7 +150,7 @@
 				</uni-swiper-dot>
 
 				<!-- 特产甄选区域 -->
-				<view class="body_top">
+				<view class="body_top" v-if="goodsList.length">
 					<view class="circle"></view>
 					<view class="circle color"></view>
 					<view class="top_title">特产甄选 .</view>
@@ -178,7 +178,7 @@
 				</view>
 
 				<!-- 精选推荐区域 -->
-				<view class="body_top">
+				<view class="body_top" v-if="hotelList.length">
 					<view class="circle"></view>
 					<view class="circle color"></view>
 					<view class="top_title">精选推荐 .</view>

+ 1 - 0
pages/login/login.vue

@@ -36,6 +36,7 @@ export default {
 			if (res.code === 200) {
 				uni.setStorageSync('openid', res.data.openid)
 				uni.setStorageSync('userInfo', res.data)
+				uni.setStorageSync('tokenId', res.data.token)
 
 				uni.showToast({
 					title: '授权成功',