gcz 4 lat temu
rodzic
commit
e8f9735a7a

+ 34 - 0
pages/index/index.vue

@@ -233,11 +233,37 @@
 					};
 				}
 			});
+			//页面跳转
+			uni.getStorage({
+				key:'beforeLoginPage',
+				success: (res) => {
+					console.log('beforeLoginPage',res.data)
+					uni.navigateTo({
+					    url: res.data,
+						success: () => {
+							uni.removeStorage({
+								key:'beforeLoginPage'
+							})
+						}
+					});
+				}
+			});
+			//产品跳转
+			uni.getStorage({
+				key:'productID',
+				success: (res) => {
+					// console.log('productID',res.data)
+					let item=new Object();
+					item.guid = res.data;
+					this.productClick(item);
+				}
+			});
 		},
 		onLoad() {
 			this.thetoken = 'Bearer' + ' ' + this.$store.state.token;
 			this.getProductList();
 			this.getRank();
+			
 		},
 		methods: {
 			swiperChange (e) {
@@ -301,6 +327,14 @@
 				//登录判断
 				if(!this.$store.state.hasLogin){
 					this.$api.msg('请先登录');
+					setTimeout(i=>{
+						uni.navigateTo({
+							url: '/pages/login/loginType',
+							fail:function(err){
+								console.log(err)
+							}
+						});
+					},2000);
 					return;
 				};
 				this.modal.visibleModal = true;

+ 5 - 2
pages/index/init.vue

@@ -37,8 +37,11 @@
 			   // 没有值,跳到引导页,并存储,下次打开就不会进去引导页
 			   this.goGuide();			   
 				// this.lxfEndtime();
-			 }
-			 
+			 };
+			//
+			uni.removeStorage({
+				key:'beforeLoginPage'
+			});
 		},
 		onReady() {
 			

+ 11 - 1
pages/login/loginType.vue

@@ -56,7 +56,17 @@
 						console.log(err)						
 					}
 				})				
-			}	
+			};
+			let pages = getCurrentPages();
+			let prevPage = pages[pages.length - 2];
+			if(prevPage.route!='pages/product/product'){
+				uni.setStorage({
+					key:'beforeLoginPage',
+					data:'/'+prevPage.route
+				});
+				// console.log('prevPage',prevPage.route);
+			}
+			
 		},
 		onLoad(options) {
 			let self = this;

+ 15 - 0
pages/product/product.vue

@@ -131,6 +131,9 @@
 			this.thetoken = 'Bearer' + ' ' + this.$store.state.token;
 			this.params.goodsId = option.guid;
 			this.getdetails();
+			uni.removeStorage({
+				key:'productID'
+			});
 		},
 		methods: {
 			getdetails(){
@@ -156,6 +159,18 @@
 				//登录判断
 				if(!this.$store.state.hasLogin){
 					this.$api.msg('请先登录');
+					uni.setStorage({
+						key:'productID',
+						data:this.params.goodsId						
+					});
+					setTimeout(i=>{
+						uni.navigateTo({
+							url: '/pages/login/loginType',
+							fail:function(err){
+								console.log(err)
+							}
+						});
+					},2000);
 					return;
 				};
 				this.modal.visibleModal = true;

+ 1 - 1
pages/use/use.css

@@ -5,7 +5,7 @@ page{background-color: #f5f5f5;}
 .use-wrap-header .til{font-size: 32rpx;color: #333;font-weight: 500;padding-left: 16rpx;}
 .use-wrap-header .subtil{font-size: 24rpx;color: #999;padding-right: 16rpx;}
 .use-wrap-header .subtil .iconfont{margin-left: 8rpx;}
-
+.use-wrap.shortscreen{margin-top: -320rpx;}
 .use-item{margin-bottom: 30rpx;padding-left: 121rpx;display: flex;align-items: center;justify-content: flex-start;border-radius: 32rpx;height: 152rpx;box-shadow: 0px 20rpx 15rpx 0px rgba(0, 0, 0, 0.00004), 0px 13rpx 14rpx 0px rgba(0, 0, 0, 0.08), 0px 7rpx 12rpx 0px rgba(0, 0, 0, 0.06), 0px 0px 12rpx 0px rgba(0, 0, 0, 0.04);}
 .use-item-img{width: 80rpx;height: 80rpx;margin-right: 35rpx;}
 .use-item-til{font-size: 32rpx;color: #333;font-weight: 600;letter-spacing: 2rpx;margin-right: 24rpx;}

+ 21 - 9
pages/use/use.vue

@@ -6,7 +6,7 @@
 			<view class="custom-nav-center"></view>
 		</view>
 		<view class="top-img"><image :src="$getimg + 'use-bg-s1.png'" class="img" mode="widthFix"></image></view>
-		<view class="use-wrap">
+		<view class="use-wrap" :class="{shortscreen:!isheight}">
 			<view class="use-wrap-header">
 				<view class="til">价值实现</view>
 				<view class="subtil" @click="useClick">
@@ -24,11 +24,11 @@
 				<view class="use-item-til">企业碳中和</view>
 			</view>
 			<view class="use-item" @click="huodong">
-				<image :src="$getimg + 'icon-huodong.png'" class="use-item-img" mode="scaleToFill"></image>
+				<image :src="$getimg + 'icon-tanpuhui.png'" class="use-item-img" mode="scaleToFill"></image>
 				<view class="use-item-til">大型活动碳中和</view>
 			</view>
 			<view class="use-item" @click="shangcheng">
-				<image :src="$getimg + 'mall.png'" class="use-item-img" mode="scaleToFill"></image>
+				<image :src="$getimg + 'icon-huodong.png'" class="use-item-img" mode="scaleToFill"></image>
 				<view class="use-item-til">普惠商城</view>
 			</view>
 		</view>
@@ -65,7 +65,8 @@ export default {
 			],
 			$getimg: this.$getimg,
 			token: '',
-			params: {}
+			params: {},
+			isheight:false,
 		};
 	},
 	onShow() {
@@ -82,23 +83,34 @@ export default {
 		// 	}
 		// });
 	},
-	onLoad() {},
+	onLoad() {
+		let self = this;
+		uni.getSystemInfo({
+		    success: function (res) {
+				console.log('getSystemInfo',res);
+				let windowscale = res.windowHeight/res.screenWidth;//屏幕高宽比 
+				if(res.screenHeight>800){
+					self.isheight = true;						
+				}
+		    }
+		}); 
+	},
 	methods: {
 		lvyue() {
-			this.$api.msg('暂未开放');
+			this.$api.msg('你没有权限使用该功能!');
 		},
 		zhonghe() {
-			this.$api.msg('暂未开放');
+			this.$api.msg('你没有权限使用该功能!');
 		},
 		huodong() {
-			this.$api.msg('暂未开放');
+			this.$api.msg('你没有权限使用该功能!');
 		},
 		useClick() {
 			this.$api.href('/pages/usercenter/question/question');
 			// this.$api.msg('稍后展示')
 		},
 		shangcheng(){
-			this.$api.msg('暂未开放');
+			this.$api.msg('你没有权限使用该功能!');
 		},
 		tabChange(index) {
 			console.log(index);

+ 11 - 2
pages/usercenter/subscribe/subscribe.vue

@@ -151,8 +151,17 @@
 				
 				}).catch(err => {
 					this.mescroll.endErr()
-					console.log(err)
-				
+					console.log('apply/list',err.data.msg);
+					if(err.data.msg=='暂未登录或token已经过期'){
+						setTimeout(i=>{
+							uni.navigateTo({
+								url: '/pages/login/loginType',
+								fail:function(err){
+									console.log(err)
+								}
+							});
+						},2000);
+					}
 				});
 				
 			},

+ 2 - 2
pages/usercenter/usercenter.vue

@@ -28,12 +28,12 @@
 						<text class="iconfont icon-jiantou"></text>
 					</view>
 				</view>
-				<view class="tool-bar-item" @click="this.$api.msg('暂未开放')">
+				<!-- <view class="tool-bar-item" @click="this.$api.msg('暂未开放')">
 					<view class="tool-bar-til">任务中心</view>
 					<view class="tool-bar-num">
 						<text class="iconfont icon-jiantou"></text>
 					</view>
-				</view>
+				</view> -->
 			</view>
 		</view>
 		<!-- top end -->