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:
@@ -216,9 +216,10 @@ export default {
|
||||
uni.showToast({ title: '打印功能开发中', icon: 'none' })
|
||||
},
|
||||
shareOrder() {
|
||||
// 构建分享链接
|
||||
// 构建分享链接(包含订单号和客户ID)
|
||||
const baseUrl = getApp().globalData.h5BaseUrl || 'https://你的域名'
|
||||
const shareUrl = `${baseUrl}/#/pages/share/order?orderNo=${this.order.orderNo}`
|
||||
const customerId = this.order.customerId || ''
|
||||
const shareUrl = `${baseUrl}/#/pages/share/order?orderNo=${this.order.orderNo}&customerId=${customerId}`
|
||||
|
||||
// 复制链接到剪贴板
|
||||
uni.setClipboardData({
|
||||
|
||||
@@ -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