Commit 4a4e4a7f by ArronYR

modify api request

parent d2ed8a2b
<!--pages/auth/index.wxml-->
<view class='v-page'>
<view class='container'>
<image src='/images/icon_location.png' mode='scaleToFill'></image>
<view></view>
</view>
</view>
\ No newline at end of file
/* pages/auth/index.wxss */
\ No newline at end of file
/* pages/auth/index.wxss */
page {
background: #fff;
}
/* pages/guide/index.wxss */
\ No newline at end of file
/* pages/guide/index.wxss */
......@@ -38,10 +38,7 @@ class Request {
wx.request({
url: (this._baseUrl || '') + url,
method: method || METHOD.GET,
data: {
token: wx.getStorageSync('token'),
...data
},
data: data,
header: {
...this._header,
...header
......@@ -65,7 +62,10 @@ class Request {
url,
method: METHOD.POST,
header,
data: Util.sign(data)
data: Util.sign({
...data,
token: wx.getStorageSync('token')
})
})
}
put(url, data, header) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment