From a732ecffddff3721d534614f4ca208566a1a5e7e Mon Sep 17 00:00:00 2001 From: h30830569 <30830569@qq.com> Date: Tue, 7 Jun 2022 13:09:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E5=85=B1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pageB/select_product/index.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pageB/select_product/index.vue b/src/pageB/select_product/index.vue index 478de63..acfae97 100644 --- a/src/pageB/select_product/index.vue +++ b/src/pageB/select_product/index.vue @@ -4,6 +4,7 @@ 商品信息 + @@ -103,6 +104,20 @@ } }, methods: { + //扫码 + onQR(){ + uni.scanCode({ + onlyFromCamera: true, + success: ({result})=>{ + this.keyword=result + this.searchGoods() + }, + fail:err=>{ + this.$u.toast('扫码失败,请重新扫描') + } + }); + + }, async searchGoods() { const resDate = await this.$api.get(`/v1/store/${this.id}/products`, { params: {