|
|
@@ -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)
|