|
@@ -250,37 +250,31 @@ export default {
|
|
|
|
|
|
TokenLogin2() {
|
|
|
let that = this;
|
|
|
- xm.getStorage({ key: "MZ_TOKEN" }).then((result) => {
|
|
|
- xm.showToast({
|
|
|
- message: result,
|
|
|
- });
|
|
|
- return result;
|
|
|
- });
|
|
|
//添加PCtoken过期判断,(请求拦截到token过期,会设置PCtoken为空,为空的时候再调用免登功能)
|
|
|
if (
|
|
|
this.$store.state.pctoken == "" ||
|
|
|
this.$store.state.pctoken == undefined
|
|
|
) {
|
|
|
//SDK中 getToken() 方法获取免登token
|
|
|
- // window.xm.getToken().then(async function (token) {
|
|
|
- //上线取消注释
|
|
|
- let token = "test"; //上线注释
|
|
|
+ window.xm.getToken().then(async function (token) {
|
|
|
+ //上线取消注释
|
|
|
+ // let token = "test"; //上线注释
|
|
|
|
|
|
- new userSets()
|
|
|
- .TokenLogin({
|
|
|
- token: token,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- // xm.showToast({
|
|
|
- // message: res.PcToken,
|
|
|
- // });
|
|
|
- that.$store.commit("setPcToken", res.PcToken);
|
|
|
- that.$store.commit("setUser", res.account);
|
|
|
- that.getBannerImg(); //获取轮播图
|
|
|
- that.getSelectColor(); //获取主题颜色
|
|
|
- that.dataNumber(); //获取待办事项数
|
|
|
- });
|
|
|
- // }); //上线取消注释
|
|
|
+ new userSets()
|
|
|
+ .TokenLogin({
|
|
|
+ token: token,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ // xm.showToast({
|
|
|
+ // message: res.PcToken,
|
|
|
+ // });
|
|
|
+ that.$store.commit("setPcToken", res.PcToken);
|
|
|
+ that.$store.commit("setUser", res.account);
|
|
|
+ that.getBannerImg(); //获取轮播图
|
|
|
+ that.getSelectColor(); //获取主题颜色
|
|
|
+ that.dataNumber(); //获取待办事项数
|
|
|
+ });
|
|
|
+ }); //上线取消注释
|
|
|
} else {
|
|
|
xm.showToast({
|
|
|
message: "222",
|