|
@@ -14,6 +14,7 @@ export default class Index extends Component {
|
14
|
14
|
getUserInfo() {
|
15
|
15
|
const { dispatchUpdateUserInfo } = this.props
|
16
|
16
|
const sessionKey = Taro.getStorageSync('sessionKey')
|
|
17
|
+ Taro.showLoading()
|
17
|
18
|
// 获取用户信息
|
18
|
19
|
Taro.getUserInfo({
|
19
|
20
|
lang: 'zh_CN',
|
|
@@ -30,10 +31,12 @@ export default class Index extends Component {
|
30
|
31
|
|
31
|
32
|
// 用户信息保存至服务器
|
32
|
33
|
dispatchUpdateUserInfo(payload).then(res => {
|
|
34
|
+ Taro.hideLoading()
|
33
|
35
|
this.toPage(true)
|
34
|
36
|
})
|
35
|
37
|
},
|
36
|
38
|
fail: () => {
|
|
39
|
+ Taro.hideLoading()
|
37
|
40
|
this.toPage(false)
|
38
|
41
|
}
|
39
|
42
|
})
|
|
@@ -43,7 +46,7 @@ export default class Index extends Component {
|
43
|
46
|
const router = Taro.getStorageSync('router') || { query: {} }
|
44
|
47
|
const loadOptions = wx.getLaunchOptionsSync()
|
45
|
48
|
|
46
|
|
-
|
|
49
|
+
|
47
|
50
|
console.log('-------router, loadOptions--------->', router, loadOptions)
|
48
|
51
|
|
49
|
52
|
let { query, path } = router
|
|
@@ -53,9 +56,9 @@ export default class Index extends Component {
|
53
|
56
|
} else {
|
54
|
57
|
query = mergeNotNull(query, loadOptions.query)
|
55
|
58
|
}
|
56
|
|
-
|
|
59
|
+
|
57
|
60
|
console.log('-------query--------->', query)
|
58
|
|
-
|
|
61
|
+
|
59
|
62
|
Taro.setStorageSync('firstLoading', '8')
|
60
|
63
|
if (!succed && path === 'pages/signin/index') {
|
61
|
64
|
return
|