核销页(扫码+手动输入码)缺失参数bug
This commit is contained in:
parent
c51f20a320
commit
811a72cf34
|
|
@ -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({
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue