lilei 9 ماه پیش
والد
کامیت
03f02293fd
2فایلهای تغییر یافته به همراه10 افزوده شده و 24 حذف شده
  1. 5 11
      pages/index/index.vue
  2. 5 13
      pages/morePage/morePage.vue

+ 5 - 11
pages/index/index.vue

@@ -182,7 +182,7 @@
 	import { getRewardRollList } from '@/api/rewardRule.js'
 	import { getRewardRollList } from '@/api/rewardRule.js'
 	import { getShopStatus } from '@/api/cart.js'
 	import { getShopStatus } from '@/api/cart.js'
 	import { getShopCategory, getShopProductList } from '@/api/shop.js'
 	import { getShopCategory, getShopProductList } from '@/api/shop.js'
-	import { openWebView, clickTab, toAuthStore, clickBannerList } from "@/utils/index.js"
+	import { openWebView, clickTab, toAuthStore, clickBannerList, toLogin } from "@/utils/index.js"
 	export default {
 	export default {
 		components: {
 		components: {
 			iconItemsList, // 图标网格
 			iconItemsList, // 图标网格
@@ -378,12 +378,6 @@
 					url: '/pages/storeManage/storeAuth'
 					url: '/pages/storeManage/storeAuth'
 				})
 				})
 			},
 			},
-			// 去登陆
-			toLogin(){
-				uni.navigateTo({
-					url: '/pages/login/login'
-				})
-			},
 			// 初始化页面
 			// 初始化页面
 			pageInit(flag){
 			pageInit(flag){
 				this.carouselList = []
 				this.carouselList = []
@@ -588,7 +582,7 @@
 						})
 						})
 					}
 					}
 				}else{
 				}else{
-					this.toLogin()
+					toLogin()
 				}
 				}
 			},
 			},
 			// 促销活动的轮播图片
 			// 促销活动的轮播图片
@@ -622,7 +616,7 @@
 						toAuthStore()
 						toAuthStore()
 					}
 					}
 				}else{
 				}else{
-					this.toLogin()
+					toLogin()
 				}
 				}
 			},
 			},
 			//  获取数据字典
 			//  获取数据字典
@@ -860,7 +854,7 @@
 						url: "/pagesA/vinRecord/vinRecord"
 						url: "/pagesA/vinRecord/vinRecord"
 					})
 					})
 				}else{
 				}else{
-					this.toLogin()
+					toLogin()
 				}
 				}
 			},
 			},
 			// 查看用户信息
 			// 查看用户信息
@@ -876,7 +870,7 @@
 						toAuthStore()
 						toAuthStore()
 					}
 					}
 				}else{
 				}else{
-					this.toLogin()
+					toLogin()
 				}
 				}
 			},
 			},
 			// 选择配件
 			// 选择配件

+ 5 - 13
pages/morePage/morePage.vue

@@ -107,7 +107,7 @@
 	import { queryQplsConfig,getProductfindByScanCode } from '@/api/shelf.js'
 	import { queryQplsConfig,getProductfindByScanCode } from '@/api/shelf.js'
 	import { findUserReward } from '@/api/rewardRule.js'
 	import { findUserReward } from '@/api/rewardRule.js'
 	import { ticketQueryCount } from '@/api/user.js'
 	import { ticketQueryCount } from '@/api/user.js'
-	import { clickTab } from "@/utils/index.js"
+	import { clickTab, toLogin } from "@/utils/index.js"
 	export default {
 	export default {
 		components: {
 		components: {
 			UniStatusBar // 状态栏组件
 			UniStatusBar // 状态栏组件
@@ -360,9 +360,7 @@
 						url: this.userInfo.sysUserFlag == '1' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
 						url: this.userInfo.sysUserFlag == '1' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
 					})
 					})
 				}else{
 				}else{
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
+					toLogin()
 				}
 				}
 			},
 			},
 			// 隐藏促销模块
 			// 隐藏促销模块
@@ -494,9 +492,7 @@
 								showCancel: false,
 								showCancel: false,
 								success() {
 								success() {
 									_this.$store.dispatch('userLogout');
 									_this.$store.dispatch('userLogout');
-									uni.redirectTo({
-										url: '/pages/login/login'
-									});
+									toLogin()
 								}
 								}
 							})						
 							})						
 						}else{
 						}else{
@@ -528,9 +524,7 @@
 						}
 						}
 					}
 					}
 				}else{
 				}else{
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
+					toLogin()
 				}
 				}
 			},
 			},
 			// 去认证
 			// 去认证
@@ -553,9 +547,7 @@
 					success: (ret) => {
 					success: (ret) => {
 					  if(ret.confirm){
 					  if(ret.confirm){
 						  _this.$store.dispatch('userLogout');
 						  _this.$store.dispatch('userLogout');
-						  uni.navigateTo({
-							 url: '/pages/login/login'
-						  });
+						  toLogin()
 					  }
 					  }
 					}
 					}
 				})
 				})