From 037d45e256d8d47d8227dfc1ef407285e7b7cf4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com> Date: Wed, 29 Sep 2021 19:47:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E5=95=86=E5=AE=B6=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E6=89=AB=E7=A0=81=E6=A0=B8=E9=94=80=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E5=92=8C=E8=87=AA=E6=8F=90=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/business/center/center.vue | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pages/business/center/center.vue b/pages/business/center/center.vue index b05c7f1..c57f5ac 100644 --- a/pages/business/center/center.vue +++ b/pages/business/center/center.vue @@ -166,6 +166,10 @@ url += `&rand=${result.rand}`; url += `&time=${result.time}`; this.$url(url); + }else if(result.u_id && result.a_id){ + this.activityJoin(result); + }else if(result.u_id && result.no){ + this.orderSelf(result); } }else{ this.$msg('不是有效的支付码'); @@ -185,6 +189,35 @@ new_data = str; } return new_data; + }, + // 核销活动 + activityJoin(result){ + this.$http.post({ + api: 'api/supplier/activity/join', + data: { + user_id: result.u_id, + activity_id: result.a_id + }, + header: { + token: this.token + } + }).then(res => { + this.$msg(res.data.message || '核销失败'); + }) + }, + // 自提 + orderSelf(result){ + this.$http.post({ + api: `api/supplier/order/self/${result.no}`, + data: { + user_id: result.u_id + }, + header: { + token: this.token + } + }).then(res => { + this.$msg(res.data.message || '自提核销成功'); + }) } } }