From 0443dda64f29609cb817c1c8068cecaf395452a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Tue, 9 Nov 2021 18:00:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/storePoster/index.js | 23 +++++------------------ pages/distribute/storePoster/index.js | 5 ++--- pages/distribute/storePoster/index.wxml | 6 +++--- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/components/storePoster/index.js b/components/storePoster/index.js index 7c730fe..f4348d6 100644 --- a/components/storePoster/index.js +++ b/components/storePoster/index.js @@ -9,9 +9,9 @@ Component({ type: Boolean, value: false }, - isCreateQrcode: { - type: Boolean, - value: false + qrcode: { + type: String, + value: '' }, customImg: { type: String, @@ -42,9 +42,9 @@ Component({ //数据监听 observers: { - 'isCreateQrcode': function (e) { + 'qrcode': function (e) { if (e) { - this.getMaterialHomeQrcode() + this.getImageInfo(this.data.qrcode, 2) } }, 'isShow': function (e) { @@ -87,19 +87,6 @@ Component({ }, 200) }, - //获取二维码 - getMaterialHomeQrcode(){ - let params = {}; - params['page'] = 'pages/storeInfo/index'; - params['scene'] = app.getStorageByKey("userInfo").biz_id; - params['width'] = 260; - _.apiQuery.getMaterialHomeQrcode(params).then(res => { - this.getImageInfo(res.data.url, 2) - }).catch(res => { - //this.getImageInfo(this.data.defaultQrcode, 2) - }) - }, - //自定义海报 customizePoster(CTX){ diff --git a/pages/distribute/storePoster/index.js b/pages/distribute/storePoster/index.js index 1a7b825..06a9c80 100644 --- a/pages/distribute/storePoster/index.js +++ b/pages/distribute/storePoster/index.js @@ -6,7 +6,7 @@ Page({ imgUrl: _.config.imgUrl,//静态图片路径 poster: { isShow: false, - isCreateQrcode: false, + qrcode:'', customPoster:'', storName: '泉州鲤城区4s店', storaAddress:'泉州市鲤城区>', @@ -36,7 +36,7 @@ Page({ params['width'] = 260; _.apiQuery.getMaterialHomeQrcode(params).then(res => { this.setData({ - code:res.data.url, + 'poster.qrcode':res.data.url, }) }).catch(res => { @@ -101,7 +101,6 @@ Page({ title: '正在生成中...', }) that.setData({ - 'poster.isCreateQrcode':true, 'poster.customPoster':that.data.poster_full_url, }) setTimeout(function(){ diff --git a/pages/distribute/storePoster/index.wxml b/pages/distribute/storePoster/index.wxml index e54b135..18ddcfc 100644 --- a/pages/distribute/storePoster/index.wxml +++ b/pages/distribute/storePoster/index.wxml @@ -1,4 +1,4 @@ - + @@ -12,7 +12,7 @@ {{poster.storName}} {{poster.storaAddress}} - + @@ -21,4 +21,4 @@ - \ No newline at end of file + \ No newline at end of file