优化未授权时无法进行登录的问题
This commit is contained in:
@ -115,20 +115,18 @@ export default {
|
|||||||
this.changeAuthorization(false);
|
this.changeAuthorization(false);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// console.log("当前是授权页面,11111");
|
this.UPDATE_AUTHORIZATIONPAGE(true);
|
||||||
// this.UPDATE_AUTHORIZATIONPAGE(true);
|
|
||||||
// // 先校验用户是否授权,如果没有授权,显示授权按钮
|
// // 先校验用户是否授权,如果没有授权,显示授权按钮
|
||||||
// console.log("先校验用户是否授权,如果没有授权,显示授权按钮");
|
console.log("先校验用户是否授权,如果没有授权,显示授权按钮");
|
||||||
// authorize("userInfo")
|
authorize("userInfo")
|
||||||
// .then(res => {
|
.then(res => {
|
||||||
// console.log(res);
|
console.log(res);
|
||||||
// this.authorize = false;
|
})
|
||||||
// })
|
.catch(error => {
|
||||||
// .catch(error => {
|
console.log(error);
|
||||||
// console.log(error);
|
// 用户未授权,显示授权按钮
|
||||||
// // 用户未授权,显示授权按钮
|
this.authorize = true;
|
||||||
// this.authorize = true;
|
});
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -164,11 +164,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState, mapGetters, mapMutations, mapActions } from "vuex";
|
||||||
import { getUser, getMenuUser, bindingPhone } from "@/api/user";
|
import { getUser, getMenuUser, bindingPhone } from "@/api/user";
|
||||||
import { isWeixin, VUE_APP_RESOURCES_URL } from "@/utils";
|
import { isWeixin, VUE_APP_RESOURCES_URL } from "@/utils";
|
||||||
import SwitchWindow from "@/components/SwitchWindow";
|
import SwitchWindow from "@/components/SwitchWindow";
|
||||||
import Authorization from "@/pages/authorization/index";
|
import Authorization from "@/pages/authorization/index";
|
||||||
import { mapGetters } from "vuex";
|
|
||||||
|
|
||||||
const NAME = "User";
|
const NAME = "User";
|
||||||
|
|
||||||
@ -188,6 +188,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: mapGetters(["userInfo"]),
|
computed: mapGetters(["userInfo"]),
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(["UPDATE_AUTHORIZATIONPAGE", "CHANGE_TABTAR"]),
|
||||||
goReturnList() {
|
goReturnList() {
|
||||||
this.$yrouter.push("/pages/order/ReturnList/index");
|
this.$yrouter.push("/pages/order/ReturnList/index");
|
||||||
},
|
},
|
||||||
@ -349,6 +350,10 @@ export default {
|
|||||||
this.MenuUser();
|
this.MenuUser();
|
||||||
this.isWeixin = isWeixin();
|
this.isWeixin = isWeixin();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
console.log('离开用户中心')
|
||||||
|
this.UPDATE_AUTHORIZATIONPAGE(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user