核销页(扫码+手动输入码)缺失参数bug

This commit is contained in:
BAKEYi 2026-06-03 16:37:31 +08:00
parent c51f20a320
commit 811a72cf34
3 changed files with 9 additions and 1 deletions

View File

@ -76,6 +76,7 @@ export default {
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
res.data.server_code = this.code;
// detail // detail
const orderDataStr = encodeURIComponent(JSON.stringify(res.data)); const orderDataStr = encodeURIComponent(JSON.stringify(res.data));
uni.navigateTo({ uni.navigateTo({

View File

@ -73,6 +73,8 @@ export default {
statusBarHeight: 44, statusBarHeight: 44,
orderData: { orderData: {
orderId: '', orderId: '',
orderType: '', //
serverCode: '', //
customerName: '', customerName: '',
customerPhone: '', customerPhone: '',
goodsImg: '', goodsImg: '',
@ -111,6 +113,8 @@ export default {
mapOrderData(data) { mapOrderData(data) {
this.orderData = { this.orderData = {
orderId: data.order_id || '', orderId: data.order_id || '',
orderType: data.order_type || '', //
serverCode: data.server_code || '', //
customerName: data.user_name || '--', customerName: data.user_name || '--',
customerPhone: data.user_phone || '--', customerPhone: data.user_phone || '--',
goodsImg: data.order_photo || 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/default_goods.png', goodsImg: data.order_photo || 'https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/default_goods.png',
@ -154,7 +158,9 @@ export default {
// //
request.post('/sj/poster/useOrderServerCode', { request.post('/sj/poster/useOrderServerCode', {
id: this.orderData.orderId id: this.orderData.orderId,
order_type: this.orderData.orderType,
server_code: this.orderData.serverCode
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code === 200) { if (res.code === 200) {

View File

@ -87,6 +87,7 @@ export default {
uni.hideLoading(); uni.hideLoading();
if (result.code === 200 && result.data) { if (result.code === 200 && result.data) {
result.data.server_code = code;
uni.showToast({ title: '扫码成功!', icon: 'none' }); uni.showToast({ title: '扫码成功!', icon: 'none' });
const orderDataStr = encodeURIComponent(JSON.stringify(result.data)); const orderDataStr = encodeURIComponent(JSON.stringify(result.data));
uni.navigateTo({ uni.navigateTo({