Merge pull request '更新 'service/request.js'' (#27) from odjbin-patch-1 into dev
Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/27
This commit is contained in:
@@ -16,7 +16,7 @@ function isOutTime(res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const service = {
|
const service = {
|
||||||
get(url) {
|
get(url,data) {
|
||||||
const header = {}
|
const header = {}
|
||||||
header['Authorization'] = 'Bearer ' + uni.getStorageSync('token')
|
header['Authorization'] = 'Bearer ' + uni.getStorageSync('token')
|
||||||
header['content-type'] = 'application/json'
|
header['content-type'] = 'application/json'
|
||||||
@@ -25,6 +25,7 @@ const service = {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
url: serverHost + url,
|
url: serverHost + url,
|
||||||
header: header,
|
header: header,
|
||||||
|
data:data,
|
||||||
success: res => {
|
success: res => {
|
||||||
// // 调用接口成功
|
// // 调用接口成功
|
||||||
// if (!res.data.data) {
|
// if (!res.data.data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user