|
@@ -39,7 +39,7 @@ const ToolClass = {
|
39
|
39
|
Header['X-Authorization-Jwt'] = wx.getStorageSync('token')
|
40
|
40
|
}
|
41
|
41
|
wx.request({
|
42
|
|
- url: `https://dev.fangdeal.cn/liyuanhui/wx${config.url}`,
|
|
42
|
+ url: `${SERVER_API}${config.url}`,
|
43
|
43
|
method: config.method,
|
44
|
44
|
...(config.data || {}),
|
45
|
45
|
header: { ...Header },
|
|
@@ -51,7 +51,7 @@ const ToolClass = {
|
51
|
51
|
wx.login({ // 微信获取code
|
52
|
52
|
success (subRes) {
|
53
|
53
|
wx.request({ // 登录获取token
|
54
|
|
- url: `https://dev.fangdeal.cn/liyuanhui/wx/login?code=${subRes.code}`,
|
|
54
|
+ url: `${SERVER_API}/login?code=${subRes.code}`,
|
55
|
55
|
method: `post`,
|
56
|
56
|
success: (cRes) => {
|
57
|
57
|
if (cRes.header['X-Authorization-Jwt'] !== undefined) { // 更新本地存储token
|