diff --git a/mini-app/src/apis/orderApis.js b/mini-app/src/apis/orderApis.js index f9222cb54..6416fd640 100644 --- a/mini-app/src/apis/orderApis.js +++ b/mini-app/src/apis/orderApis.js @@ -6,8 +6,6 @@ import { baseUrl } from '../baseDefine' * 订单相关接口 */ class OrderApis { - - /** * 创建订单 * @param data @@ -22,11 +20,16 @@ class OrderApis { getOrderList(data) { return request.get({ - url: baseUrl + 'winery/user_orders/list', + url: baseUrl + 'winery/order/list', data: data }) } + refundOrder(id) { + return request.post({ + url: baseUrl + 'winery/detail/refund/' + id + }) + } } export default new OrderApis() diff --git a/mini-app/src/app.wpy b/mini-app/src/app.wpy index 791aa0502..c340fa289 100644 --- a/mini-app/src/app.wpy +++ b/mini-app/src/app.wpy @@ -102,7 +102,7 @@ pages: [ 'pages/form5', 'pages/form6', -'pages/mall/goods-detail', +'pages/mall/goods/goods-detail', 'pages/mall/user/user-address', 'pages/mall/user/user-address-list', 'pages/mall/order/order-list', diff --git a/mini-app/src/appManager.js b/mini-app/src/appManager.js index 5fb296719..94ca4f0b8 100644 --- a/mini-app/src/appManager.js +++ b/mini-app/src/appManager.js @@ -44,7 +44,7 @@ class AppManager { } saveOpenid(openid) { - console.log('saveOpenid:' + openid) + // console.log('saveOpenid:' + openid) store.dispatch('setOpenidAction', openid) } @@ -56,10 +56,12 @@ class AppManager { const mobile = wx.getStorageSync('mobile') const openid = wx.getStorageSync('openid') const userInfo = wx.getStorageSync('userInfo') + const shoppingCar = wx.getStorageSync('shoppingCar') console.log('setCacheInfo:', mobile) console.log('setCacheInfo:', openid) console.log('setCacheInfo:', userInfo) + console.log('shoppingCar:', shoppingCar) if (mobile) { store.dispatch('setMobileAction', mobile) @@ -72,6 +74,9 @@ class AppManager { if (userInfo) { store.dispatch('setUserInfoAction', userInfo) } + if (shoppingCar) { + store.dispatch('setShoppingCarAction', shoppingCar) + } } navigateTo(path) { diff --git a/mini-app/src/components/mall/order/order-detail-body.wpy b/mini-app/src/components/mall/order/order-detail-body.wpy new file mode 100644 index 000000000..b64aba3b7 --- /dev/null +++ b/mini-app/src/components/mall/order/order-detail-body.wpy @@ -0,0 +1,108 @@ + + + +const parseImage = (imageKey) => { +return 'https://winery-1257413599.cos.ap-beijing.myqcloud.com/' + imageKey +} +module.exports.parseImage = parseImage; + + + + + +{ +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 7ae35e157..29074714c 100644 --- a/mini-app/src/components/mall/order/order-list-body.wpy +++ b/mini-app/src/components/mall/order/order-list-body.wpy @@ -1,5 +1,22 @@ @@ -7,7 +24,39 @@ 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;