|
@@ -52,17 +52,17 @@ export default new Vuex.Store({
|
|
|
|
|
|
if(response.data.state ==200){
|
|
|
const result = response.data
|
|
|
- const userInfo = response.data.data
|
|
|
+ // const userInfo = response.data.data
|
|
|
|
|
|
- uni.setStorageSync(USER_INFO,userInfo);
|
|
|
+ //uni.setStorageSync(USER_INFO,userInfo);
|
|
|
|
|
|
commit('SET_TOKEN', "")
|
|
|
commit('SET_AVATAR', null)
|
|
|
- commit('SET_NAME', userInfo.username)
|
|
|
+ //commit('SET_NAME', userInfo.username)
|
|
|
|
|
|
let params = {};
|
|
|
console.log("data:",userInfo)
|
|
|
- params.login_state=userInfo.data;
|
|
|
+ params.login_state=result.data;
|
|
|
params.client_id="ibps";
|
|
|
//授权第二步
|
|
|
api.authorize(params).then(response2 =>{
|
|
@@ -83,6 +83,11 @@ export default new Vuex.Store({
|
|
|
uni.setStorageSync(ACCESS_TOKEN,res.data.data.access_token);
|
|
|
uni.setStorageSync("refresh_token",res.data.data.refresh_token);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
resolve(res)
|
|
|
}
|
|
|
else{
|