fix:事务处理
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import config from '../config'
|
||||
import { useStore} from '@/store/index.js'
|
||||
|
||||
// import {useStore} from '@/store/index.js'
|
||||
// console.log(useStore)
|
||||
// const store = useStore()
|
||||
const loginUrl = 'pages/user/login';
|
||||
// function JSON_to_URLEncoded(element,key,list){
|
||||
// var list = list || [];
|
||||
@@ -76,20 +74,20 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
// if(res.data.code === 7) { // 登录失败
|
||||
// uni.showToast({
|
||||
// title:res.msg,
|
||||
// icon:"error",
|
||||
// duration:2000,
|
||||
// mask:true,
|
||||
// success() {
|
||||
// if(res.code === 7) // 登录失败
|
||||
// {
|
||||
// store.afterFailLogin(2000)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
if(res.data.code === 7) { // 登录失败
|
||||
const store = useStore()
|
||||
store.afterFailLogin(2000)
|
||||
uni.showToast({
|
||||
title:res.msg,
|
||||
icon:"error",
|
||||
duration:2000,
|
||||
mask:true,
|
||||
// success() {
|
||||
// console.log(1212121)
|
||||
// store.afterFailLogin(2000)
|
||||
// }
|
||||
})
|
||||
}
|
||||
return res.data;
|
||||
} else {
|
||||
const reg = /abort/;
|
||||
|
Reference in New Issue
Block a user