diff --git a/api/model/index.js b/api/model/index.js index c391812..ca344fb 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -109,14 +109,6 @@ const api = { limit: 1000, showLoading: true, }, - // 取消订单 - cancelOrder: { - url: '/order/cancelOrder', - method: 'POST', - auth: true, - limit: 1000, - showLoading: true, - }, // 获取首页广告列表 getRiceProductList: { url: '/index_common/getRiceAdList', diff --git a/api/model/login.js b/api/model/login.js index a08f43f..952162b 100644 --- a/api/model/login.js +++ b/api/model/login.js @@ -30,6 +30,12 @@ const api = { method: 'GET', auth: true, }, + // 获取个人中心基础数据信息 + getUserCenterData: { + url: '/userInfo/getUserCenterData', + method: 'GET', + auth: true, + }, } export default api \ No newline at end of file diff --git a/api/model/order.js b/api/model/order.js index 7f8252b..f868535 100644 --- a/api/model/order.js +++ b/api/model/order.js @@ -48,16 +48,26 @@ const api = { method: 'GET', auth: true, }, - // /** - // * 取消订单 - // */ - // cancelOrder: { - // url: '/order/cancelOrder', - // method: 'POST', - // limit: 500, - // auth: true, - // showLoading: true, - // }, + /** + * 取消订单 + */ + cancelOrder: { + url: '/order/cancelOrder', + method: 'POST', + auth: true, + limit: 1000, + showLoading: true, + }, + /** + * 删除订单 + */ + deleteOrder: { + url: '/order/deleteOrder', + method: 'POST', + auth: true, + limit: 1000, + showLoading: true, + }, /** * 申请退款 @@ -70,7 +80,7 @@ const api = { showLoading: true, }, - fetchVoucher: { + fetchOverOrder: { url: '/order/overOrderList', method: 'POST', limit : 500, @@ -78,8 +88,8 @@ const api = { showLoading : true, }, - fetchStore: { - url: '/order/overOrderList', + fetchOverVoucher: { + url: '/order/useVouchersList', method: 'POST', limit : 500, auth : true, diff --git a/components/order/orderCard.vue b/components/order/orderCard.vue index 5011f4b..a33a659 100644 --- a/components/order/orderCard.vue +++ b/components/order/orderCard.vue @@ -16,19 +16,24 @@ 总价格:¥{{ data.amount }} - - - - - - + + + @@ -44,6 +49,10 @@ return {} } }, + readonly: { + type: Boolean, + default: false, + } }, data() { return { @@ -62,6 +71,23 @@ this.$utils.navigateTo(`/pages_order/order/orderDetail?id=${this.data.id}`) } }, + onDelete() { + uni.showModal({ + title: '确认删除订单吗?', + success : e => { + if(e.confirm){ + this.$api('deleteOrder', { + orderId : this.data.id, + }, res => { + this.$emit('done') + uni.showToast({ + title: '删除成功', + }); + }) + } + } + }) + }, onCancel() { // todo uni.showModal({ @@ -83,45 +109,9 @@ ]) this.$utils.navigateTo(`/pages_order/order/createOrder?id=${this.data.id}`) - - return - // todo - this.$api('payOrder', { - orderId : this.data.id, - // todo: payType -> 支付方式(payType):0-微信支付 1-余额支付 - }, res => { - if(res.code == 200){ - uni.requestPaymentWxPay(res) - .then(res => { - uni.showToast({ - title: '支付成功', - icon: 'none' - }) - this.$emit('done') - }).catch(n => { - this.$emit('done') - }) - } - }) + }, onVerify() { - // uni.showModal({ - // title: '确认核销订单吗?', - // success : e => { - // if(e.confirm){ - // this.$api('overOrder', { - // orderId : this.data.id, - // }, res => { - // this.$emit('done') - - // this.$utils.navigateTo(`/pages_order/order/verifyOrder?id=${this.data.id}`) - // }) - - - // } - // } - // }) - // todo this.$utils.navigateTo(`/pages_order/order/verifyOrder?id=${this.data.id}`) } }, @@ -161,7 +151,7 @@ width: 167rpx; height: 167rpx; margin-right: 15rpx; - margin-bottom: 29rpx; + // margin-bottom: 29rpx; } } @@ -199,11 +189,12 @@ font-size: 18rpx; } } +} - .btns { - text-align: right; - font-size: 0; - } +.btns { + text-align: right; + font-size: 0; + min-height: 29rpx; } .btn { diff --git a/components/product/productCard.vue b/components/product/productCard.vue index 7519f98..5bbfb4a 100644 --- a/components/product/productCard.vue +++ b/components/product/productCard.vue @@ -15,13 +15,9 @@ {{ data.price }} - - - 个人会员价 - - - - 企业会员价 + + + {{ vipInfo.massageVipCombo.title }} @@ -38,7 +34,7 @@