diff --git a/mini-app/src/apis/orderApis.js b/mini-app/src/apis/orderApis.js index 6416fd640..08c8446db 100644 --- a/mini-app/src/apis/orderApis.js +++ b/mini-app/src/apis/orderApis.js @@ -1,4 +1,3 @@ - import request from '../js/request' import { baseUrl } from '../baseDefine' @@ -30,6 +29,13 @@ class OrderApis { url: baseUrl + 'winery/detail/refund/' + id }) } + + getOrderDetailList(data) { + return request.get({ + url: baseUrl + 'winery/detail/list', + data: data + }) + } } export default new OrderApis() diff --git a/mini-app/src/app.wpy b/mini-app/src/app.wpy index c340fa289..6736f0810 100644 --- a/mini-app/src/app.wpy +++ b/mini-app/src/app.wpy @@ -106,6 +106,7 @@ pages: [ 'pages/mall/user/user-address', 'pages/mall/user/user-address-list', 'pages/mall/order/order-list', +'pages/mall/order/order-detail-list', 'pages/mall/order/order-check', 'pages/mall/shopping-car/shopping-car-list', 'pages/winery/winery-detail' diff --git a/mini-app/src/baseDefine.js b/mini-app/src/baseDefine.js index 80c567fc3..b935fe8ec 100644 --- a/mini-app/src/baseDefine.js +++ b/mini-app/src/baseDefine.js @@ -5,9 +5,9 @@ */ // export const baseUrl = 'http://127.0.0.1:18989/' -export const baseUrl = 'http://36.1.51.30:18989/' -// export const baseUrl = 'http://36.1.50.18:18989/winery/' -// export const baseUrl = 'http://62.234.123.172:18989/api/' +// export const baseUrl = 'http://36.1.51.30:18989/' +export const baseUrl = 'http://41.liyiren.me:8696/' +// export const baseUrl = 'http://36.1.50.18:18989/' // export const baseUrl = 'https://www.xiao4r.com/wine/winery/' export const imgbaseUrl = 'https://www.xiao4r.com/xiao4rstatic/img/winery/' diff --git a/mini-app/src/components/mall/order/order-detail-body.wpy b/mini-app/src/components/mall/order/order-detail-body.wpy index b64aba3b7..c67f72690 100644 --- a/mini-app/src/components/mall/order/order-detail-body.wpy +++ b/mini-app/src/components/mall/order/order-detail-body.wpy @@ -24,13 +24,11 @@ module.exports.parseImage = parseImage;
申请退款 diff --git a/mini-app/src/components/mall/order/order-detail-list-body.wpy b/mini-app/src/components/mall/order/order-detail-list-body.wpy new file mode 100644 index 000000000..20d57a30d --- /dev/null +++ b/mini-app/src/components/mall/order/order-detail-list-body.wpy @@ -0,0 +1,172 @@ + + + +const parseImage = (imageKey) => { +return 'https://winery-1257413599.cos.ap-beijing.myqcloud.com/' + imageKey +} +const parseOrderStatus = (status) => { + +let result = '未知状态' +switch(status) { +case 0: +result = '未支付' +break +case 1: +result = '已取消' +break +case 2: +result = '已支付' +break +case 3: +result = '待收货' +break +case 4: +result = '交易完成' +break +default: +break + +} +console.log("123:",status) +console.log("123:",result) +return result + + + +} + +module.exports.parseImage = parseImage; +module.exports.parseOrderStatus = parseOrderStatus; + + + + + +{ +navigationBarTitleText: '' +} + diff --git a/mini-app/src/components/mall/order/order-list-body.wpy b/mini-app/src/components/mall/order/order-list-body.wpy index 29074714c..156e0f64b 100644 --- a/mini-app/src/components/mall/order/order-list-body.wpy +++ b/mini-app/src/components/mall/order/order-list-body.wpy @@ -47,10 +47,8 @@ default: break } -console.log("123:",status) -console.log("123:",result) -return result +return result } @@ -63,7 +61,8 @@ module.exports.parseOrderStatus = parseOrderStatus;
- + @@ -72,24 +71,30 @@ module.exports.parseOrderStatus = parseOrderStatus;
-
- {{filters.parseOrderStatus(row.status)}} +
+ {{filters.parseOrderStatus(row.status)}}
- 申请退款 - 查看详情 + 申请退款 + + + 查看详情 +
+ + 继续支付 +
@@ -139,7 +144,30 @@ wepy.component({ }, onDetail(item) { appManager.navigateTo(goodsDetailPage + '?id=' + item.goods.id) + }, + onPay(item) { + let self = this + console.log(item) + let payData = JSON.parse(item.payMsg) + wx.requestPayment({ + appId: payData.appId, + timeStamp: payData.timeStamp, + nonceStr: payData.nonceStr, + package: payData.packageValue, + signType: payData.signType, + paySign: payData.paySign, + success: function(res) { + wx.showLoading({ title: '正在获取订单信息.', mask: true }) + setTimeout(() => { + wx.hideLoading() + self.init() + }, 3000) + }, + fail: function(res) { + appManager.showToast('支付失败.') + } + }) }, async init() { this.isInit = false diff --git a/mini-app/src/pages/mall/index.wpy b/mini-app/src/pages/mall/index.wpy index faf2f2882..5661e8477 100644 --- a/mini-app/src/pages/mall/index.wpy +++ b/mini-app/src/pages/mall/index.wpy @@ -29,7 +29,7 @@ module.exports.getTime = getTime;