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;
-
+
首页
-
+
福利购
-
+
紫环会
-
+
-
+
@@ -56,7 +56,7 @@ module.exports.parseImage = parseImage;
{{currentAddress.address}}
-
+
diff --git a/mini-app/src/pages/mall/order/order-detail-list.wpy b/mini-app/src/pages/mall/order/order-detail-list.wpy
new file mode 100644
index 000000000..b904feaa7
--- /dev/null
+++ b/mini-app/src/pages/mall/order/order-detail-list.wpy
@@ -0,0 +1,96 @@
+
+
+
+const parseImage = (imageKey) => {
+return 'https://winery-1257413599.cos.ap-beijing.myqcloud.com/' + imageKey
+}
+module.exports.parseImage = parseImage;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{
+navigationBarTitleText: '',
+
+usingComponents: {
+'order-detail-list-body': '../../../components/mall/order/order-detail-list-body',
+}
+
+
+}
+
diff --git a/mini-app/src/pages/mall/order/order-list.wpy b/mini-app/src/pages/mall/order/order-list.wpy
index f1d49978e..684b88642 100644
--- a/mini-app/src/pages/mall/order/order-list.wpy
+++ b/mini-app/src/pages/mall/order/order-list.wpy
@@ -28,7 +28,7 @@ module.exports.parseImage = parseImage;
-
+
@@ -87,6 +87,13 @@ wepy.page({
}
},
+ onLoad(options) {
+
+ if (options.orderStatus) {
+ this.activeTab = Number(options.orderStatus)
+ }
+ },
+
ready() {
this.init()
},
diff --git a/mini-app/src/pages/mall/shopping-car/shopping-car-list.wpy b/mini-app/src/pages/mall/shopping-car/shopping-car-list.wpy
index 09948b334..9650ac6b5 100644
--- a/mini-app/src/pages/mall/shopping-car/shopping-car-list.wpy
+++ b/mini-app/src/pages/mall/shopping-car/shopping-car-list.wpy
@@ -130,6 +130,11 @@ wepy.page({
this.isCheckedAll = this.checkList.length === this.shoppingCar.length
},
onSubmit() {
+ if (this.shoppingCar.length < 1) {
+ appManager.showToast('购物车中没有商品.')
+ return
+ }
+
let order = {
addressId: '',
orderDetailList: [],
diff --git a/mini-app/src/store/constant/nav/my.js b/mini-app/src/store/constant/nav/my.js
index 72ad107c2..33817ef00 100644
--- a/mini-app/src/store/constant/nav/my.js
+++ b/mini-app/src/store/constant/nav/my.js
@@ -1,5 +1,5 @@
import { imgbaseUrl } from '../../../baseDefine'
-import { orderListPage, userAddressListPage } from './pages'
+import { orderDetailListPage, orderListPage, userAddressListPage } from './pages'
export const myMenuList1 = [
@@ -25,9 +25,9 @@ export const myMenuList2 = [
path: userAddressListPage
},
{
- name: '发票管理',
+ name: '退款管理',
icon: imgbaseUrl + 'doctor.png',
- path: ''
+ path: orderDetailListPage
}, {
name: '优惠券',
icon: imgbaseUrl + 'doctor.png',
diff --git a/mini-app/src/store/constant/nav/pages.js b/mini-app/src/store/constant/nav/pages.js
index ee4a02324..773ba4b4d 100644
--- a/mini-app/src/store/constant/nav/pages.js
+++ b/mini-app/src/store/constant/nav/pages.js
@@ -1,5 +1,6 @@
export const shoppingCarList = '/pages/mall/shopping-car/shopping-car-list'
export const orderListPage = '/pages/mall/order/order-list'
+export const orderDetailListPage = '/pages/mall/order/order-detail-list'
export const orderCheck = '/pages/mall/order/order-check'
export const userAddressListPage = '/pages/mall/user/user-address-list'
export const goodsDetailPage = '/pages/mall/goods/goods-detail'
diff --git a/mini-app/src/store/constant/navDefine.js b/mini-app/src/store/constant/navDefine.js
index 3f6ae036f..b7bf0b466 100644
--- a/mini-app/src/store/constant/navDefine.js
+++ b/mini-app/src/store/constant/navDefine.js
@@ -1,6 +1,6 @@
import { homeBanner, homeBanner1, homeBanner2, homeHeader, homeMenuList, menu1, menu2 } from './nav/home'
import { myMenuList1, myMenuList2, myMenuList3 } from './nav/my'
-import { orderCheck, orderListPage, shoppingCarList, userAddressListPage } from './nav/pages'
+import { orderCheck, orderDetailListPage, orderListPage, shoppingCarList, userAddressListPage } from './nav/pages'
export const navDefine = {
HOME_MENU_LIST: homeMenuList,
@@ -18,6 +18,7 @@ export const navDefine = {
SHOPPING_CAR_LIST: shoppingCarList,
ORDER_LIST_PAGE: orderListPage,
+ ORDER_DETAIL_LIST_PAGE: orderDetailListPage,
ORDER_CHECK: orderCheck,
USER_ADDRESS_LIST_PAGE: userAddressListPage,