整合应用进入判断

This commit is contained in:
aixianling
2022-06-29 17:59:29 +08:00
parent 4f1592540e
commit 2655a44573
3 changed files with 34 additions and 26 deletions

View File

@@ -328,30 +328,6 @@ const $getLoginCode = () => {
});
};
const $autoLogin = (params, store) => {
params = params ? params : {};
return new Promise(function (resolve, reject) {
$getLoginCode().then((res) => {
let body = {...params, code: res.code};
store.commit('getToken', {
...body,
then: (v1) => {
if (v1) {
store.commit('getUserInfo', (v2) => {
if (v2) {
resolve(v2);
} else {
reject(v2);
}
});
} else {
reject(v1);
}
}
});
});
});
};
export default {
$toast,
$loading,
@@ -366,6 +342,5 @@ export default {
$dayjs,
$dict,
$getLoginCode,
$autoLogin,
$qs
};