소스 검색

Merge branch 'master' of http://git.jhcs888.com/zpj/zh-new-promotion

USER-20230908AJ\Administrator 2 년 전
부모
커밋
a76f1dabab
1개의 변경된 파일과 2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      service/router.js

+ 2 - 2
service/router.js

@@ -18,7 +18,7 @@ const router = createRouter({
 });
 //全局路由前置守卫
 
-router.beforeEach((to, from, next) => {
+router.beforeEach( async (to, from, next) => {
 	if(to.query.shopCode){
 		uni.setStorageSync("invite_code", to.query.shopCode);
 	}
@@ -56,7 +56,7 @@ router.beforeEach((to, from, next) => {
 					invite_code:uni.getStorageSync("invite_code"),
 					memberCode:uni.getStorageSync("memberCode"),
 				}
-				userWxAppletLogin(from).then((res)=>{
+				await userWxAppletLogin(from).then((res)=>{
 					if (res.code === 1) {
 						uni.setStorageSync('userNmae',res.data.name)
 						uni.setStorageSync('token_str',res.data.token)