|
@@ -14,10 +14,8 @@ export function useWechatAuth() {
|
14
|
14
|
redirectUrl: location.origin + location.pathname
|
15
|
15
|
}).then(res => {
|
16
|
16
|
uni.hideLoading();
|
17
|
|
- if (res.url) {
|
18
|
|
- window.location.href = res.url;
|
19
|
|
- } else {
|
20
|
|
- loginSuccess(res.user);
|
|
17
|
+ if (res.state == "200"){
|
|
18
|
+ loginSuccess(res.user);
|
21
|
19
|
transform(res.user);
|
22
|
20
|
api_systemConfiguration({
|
23
|
21
|
idx: 0,
|
|
@@ -33,7 +31,23 @@ export function useWechatAuth() {
|
33
|
31
|
api_getDictionary(postData).then((data) => {
|
34
|
32
|
uni.setStorageSync('groupData',JSON.stringify(data))
|
35
|
33
|
});
|
36
|
|
- }
|
|
34
|
+ } else if (res.state == "501"){
|
|
35
|
+ uni.showModal({
|
|
36
|
+ title: '提示',
|
|
37
|
+ content: res.remarks,
|
|
38
|
+ showCancel: false,
|
|
39
|
+ confirmColor: '#49b856',
|
|
40
|
+ success: function(res1) {
|
|
41
|
+ if (res1.confirm) {
|
|
42
|
+ console.log('用户点击确定');
|
|
43
|
+ } else if (res1.cancel) {
|
|
44
|
+ console.log('用户点击取消');
|
|
45
|
+ }
|
|
46
|
+ }
|
|
47
|
+ });
|
|
48
|
+ }else if (res.url){
|
|
49
|
+ window.location.href = res.url;
|
|
50
|
+ }
|
37
|
51
|
});
|
38
|
52
|
}
|
39
|
53
|
|