fix: 分享链接增加customerId参数
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -102,15 +102,17 @@ export default {
|
||||
loading: true,
|
||||
error: '',
|
||||
order: null,
|
||||
orderNo: ''
|
||||
orderNo: '',
|
||||
customerId: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.orderNo) {
|
||||
if (options.orderNo && options.customerId) {
|
||||
this.orderNo = options.orderNo
|
||||
this.customerId = options.customerId
|
||||
this.loadOrder()
|
||||
} else {
|
||||
this.error = '订单号不能为空'
|
||||
this.error = '参数不完整'
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
@@ -118,7 +120,7 @@ export default {
|
||||
async loadOrder() {
|
||||
try {
|
||||
const res = await uni.request({
|
||||
url: `${getApp().globalData.apiBaseUrl}/public/orders/${this.orderNo}`,
|
||||
url: `${getApp().globalData.apiBaseUrl}/public/orders/${this.orderNo}?customerId=${this.customerId}`,
|
||||
method: 'GET'
|
||||
})
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user