@@ -1,15 +1,15 @@ | |||
{ | |||
"pages": [ | |||
"pages":[ | |||
"pages/index/index", | |||
"pages/market/index", | |||
"pages/user/index", | |||
"pages/coupons/details/index", | |||
"pages/shop/details/index", | |||
"pages/rushToBuy/index", | |||
"pages/shop/index/index", | |||
"pages/market/index", | |||
"pages/coupons/index/index", | |||
"pages/order/details/index", | |||
"pages/order/index/index", | |||
"pages/user/index", | |||
"pages/success/index", | |||
"pages/login/index" | |||
], | |||
@@ -28,15 +28,15 @@ | |||
"text": "我的" | |||
}] | |||
}, | |||
"window": { | |||
"backgroundTextStyle": "light", | |||
"window":{ | |||
"backgroundTextStyle":"light", | |||
"navigationBarBackgroundColor": "#fff", | |||
"navigationBarTitleText": "WeChat", | |||
"navigationBarTextStyle": "black" | |||
"navigationBarTextStyle":"black" | |||
}, | |||
"networkTimeout": { | |||
"request": 10000, | |||
"downloadFile": 10000 | |||
}, | |||
"debug": false | |||
} | |||
} |
@@ -212,5 +212,54 @@ const func = { | |||
}) | |||
}) | |||
}, | |||
refundCouponOrder: function (couponOrderId) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.refundCouponOrder, | |||
header: { | |||
"token": app.globalData.token | |||
}, | |||
data: { | |||
couponOrderId: couponOrderId, | |||
token: app.globalData.token | |||
}, | |||
method: "POST", | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
refundOrderCreate: function (orderId, payOrderId) { | |||
return new Promise((resolve, reject) => { | |||
wx.request({ | |||
url: config.api.refundOrdercCreate, | |||
header: { | |||
"token": app.globalData.token | |||
}, | |||
data: { | |||
payOrderId: payOrderId, | |||
orderId: orderId, | |||
token: app.globalData.token | |||
}, | |||
method: "POST", | |||
success: function (res) { | |||
resolve(res) | |||
}, | |||
fail: function (err) { | |||
reject(err) | |||
}, | |||
complete: function (res) { | |||
console.log(res) | |||
} | |||
}) | |||
}) | |||
}, | |||
} | |||
module.exports = func; |
@@ -1,4 +1,5 @@ | |||
var url = 'https://ciformall.youlane.cn' | |||
//var url = 'http://a8b668aa.ngrok.io' | |||
//var url = 'http://localhost:8001' | |||
var apiPrefix = url + '/C'; | |||
var config = { | |||
@@ -40,10 +41,18 @@ var config = { | |||
* 订单列表 | |||
*/ | |||
orderList: '/api/order/list', | |||
/** | |||
* 退券 | |||
*/ | |||
refundCouponOrder: '/api/couponOrder/refund', | |||
/** | |||
* 退款申请 | |||
*/ | |||
refundOrdercCreate: '/api/refund/create', | |||
}, | |||
weapp: { | |||
AppId: 'wx649b3be73c1afe47', | |||
AppId: 'wx8eb8275b78db4ede', | |||
} | |||
}; | |||
@@ -7,13 +7,13 @@ | |||
</view> | |||
<view class="margin"></view> | |||
<view class="user-btns"> | |||
<navigator url="/pages/market/index"> | |||
<navigator url="/pages/order/index/index?id=0"> | |||
<view class="user-btn app-border-bottom"> | |||
<view>我的订单</view> | |||
<view>全部订单</view> | |||
</view> | |||
</navigator> | |||
<navigator url="/pages/market/index"> | |||
<navigator url="/pages/order/index/index?id=1"> | |||
<view class="user-btn app-border-bottom"> | |||
<view>待付款</view> | |||
<view> | |||
@@ -21,7 +21,7 @@ | |||
</view> | |||
</view> | |||
</navigator> | |||
<navigator url="/pages/market/index"> | |||
<navigator url="/pages/order/index/index?id=2"> | |||
<view class="user-btn app-border-bottom"> | |||
<view>已完成</view> | |||
<view> | |||
@@ -12,8 +12,8 @@ | |||
}, | |||
"compileType": "miniprogram", | |||
"libVersion": "2.2.2", | |||
"appid": "wx649b3be73c1afe47", | |||
"projectname": "C4", | |||
"appid": "wx8eb8275b78db4ede", | |||
"projectname": "%E5%AF%8C%E8%8C%82%E6%94%AF%E4%BB%98%E6%B5%8B%E8%AF%95", | |||
"isGameTourist": false, | |||
"condition": { | |||
"search": { | |||
@@ -1,5 +1,7 @@ | |||
let host = 'https://ciformall.youlane.cn/C' | |||
const postResquest = (url, token, message, postData, doSuccess, doFail) => { | |||
let body={...postData}; | |||
let body = { ...postData }; | |||
if (message != "") { | |||
wx.showLoading({ | |||
title: message, | |||
@@ -7,7 +9,7 @@ const postResquest = (url, token, message, postData, doSuccess, doFail) => { | |||
} | |||
wx.request({ | |||
//项目的真正接口,通过字符串拼接方式实现 | |||
url: url, | |||
url: host + url, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": token | |||
@@ -39,7 +41,7 @@ const getResquest = (url, token, message, getData, doSuccess, doFail) => { | |||
}) | |||
} | |||
wx.request({ | |||
url: url, | |||
url: host + url, | |||
header: { | |||
"content-type": "application/json;charset=UTF-8", | |||
"token": token | |||
@@ -63,6 +65,6 @@ const getResquest = (url, token, message, getData, doSuccess, doFail) => { | |||
}) | |||
} | |||
module.exports = { | |||
postResquest: postResquest, | |||
getResquest: getResquest | |||
} | |||
postResquest: postResquest, | |||
getResquest: getResquest | |||
} |