|
|
@ -5,18 +5,18 @@ |
|
|
|
<view class="page-content"> |
|
|
|
<view class="page-label">订单详情</view> |
|
|
|
<!-- 商品详情 --> |
|
|
|
<productCard :data="productDetail" size="medium" :readonly="true"></productCard> |
|
|
|
<productCard :data="orderDetail.massageItem" size="medium" :readonly="true"></productCard> |
|
|
|
|
|
|
|
<view class="info"> |
|
|
|
<view class="info-header">订单信息</view> |
|
|
|
<view class="info-content"> |
|
|
|
<view class="flex info-row"> |
|
|
|
<text>实付款</text> |
|
|
|
<text class="price"><text class="price-unit">¥</text>{{ orderDetail.price }}</text> |
|
|
|
<text class="price"><text class="price-unit">¥</text>{{ orderDetail.amount }}</text> |
|
|
|
</view> |
|
|
|
<view class="flex info-row"> |
|
|
|
<text>订单号</text> |
|
|
|
<text>{{ orderDetail.orderNo }}</text> |
|
|
|
<text>{{ orderDetail.id }}</text> |
|
|
|
</view> |
|
|
|
<view class="flex info-row"> |
|
|
|
<text>付款时间</text> |
|
|
@ -24,7 +24,7 @@ |
|
|
|
</view> |
|
|
|
<view class="flex info-row"> |
|
|
|
<text>核销时间</text> |
|
|
|
<text>{{ orderDetail.verifyTime }}</text> |
|
|
|
<text>{{ orderDetail.validTime }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -39,8 +39,6 @@ |
|
|
|
mapState |
|
|
|
} from 'vuex' |
|
|
|
|
|
|
|
const TEMP_BANNER_IMG_URL = 'http://gips3.baidu.com/it/u=70459541,3412285454&fm=3028&app=3028&f=JPEG&fmt=auto?w=960&h=1280' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
productCard |
|
|
@ -48,62 +46,28 @@ |
|
|
|
computed: {}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
// todo: fetch |
|
|
|
productDetail: { |
|
|
|
id: '001', |
|
|
|
imgUrl: TEMP_BANNER_IMG_URL, |
|
|
|
price: 99, |
|
|
|
num: 1, |
|
|
|
sales: 235, |
|
|
|
title: '60分钟肩颈推拿按摩', |
|
|
|
desc: '疏通经络 放松肌肉', |
|
|
|
tags: ['专业技师', '舒适环境', '深度放松'], |
|
|
|
details: '<p>这里是商品详情..............<br/>这里是商品详情..............</p>' |
|
|
|
}, |
|
|
|
orderDetail: { |
|
|
|
id: '001', |
|
|
|
orderNo: 'da123567', |
|
|
|
price: 99, |
|
|
|
payTime: '2024-12-24 18:45:23', |
|
|
|
verifyTime: '2024-12-24 18:45:23', |
|
|
|
}, |
|
|
|
id: 0, |
|
|
|
id: null, |
|
|
|
orderDetail: {}, |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(args) { |
|
|
|
this.id = args.id |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.getOrderDetail() |
|
|
|
this.fetchOrderDetail() |
|
|
|
}, |
|
|
|
onPullDownRefresh() { |
|
|
|
this.getOrderDetail() |
|
|
|
this.fetchOrderDetail() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getOrderDetail() { |
|
|
|
// todo: delete test code |
|
|
|
return |
|
|
|
this.$api('getOrderDetail', { |
|
|
|
id: this.id |
|
|
|
}, res => { |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
if (res.code == 200) { |
|
|
|
this.order = res.result |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
async fetchOrderDetail() { |
|
|
|
try { |
|
|
|
|
|
|
|
this.orderDetail = await this.$fetch('queryOrderById', { id: this.id }) |
|
|
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//复制内容 |
|
|
|
copy(content) { |
|
|
|
uni.setClipboardData({ |
|
|
|
data: content, |
|
|
|
success: () => { |
|
|
|
uni.showToast({ |
|
|
|
title: '复制成功', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|