店铺二维码分享
This commit is contained in:
@@ -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){
|
||||
|
||||
|
||||
@@ -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(){
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<view class="inner30">
|
||||
<view class="inner30" wx:if="{{poster.qrcode}}">
|
||||
<view class="relative bg-fff inner10 box-shadow-000-10-10 ulib-r10 overflowhidden">
|
||||
<view bindtap="chooseImg">
|
||||
<block wx:if="{{poster_full_url==''}}">
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="mt20 relative posterFt img-fill-cover" style="background-image:url({{imgUrl}}distribute/storePosterFt.jpg?211108);">
|
||||
<view class="poster-name text-nowrap font-30 color-fff">{{poster.storName}}</view>
|
||||
<view class="poster-address text-nowrap font-24 color-fff">{{poster.storaAddress}}</view>
|
||||
<view class="poster-code"><image class="block img-160x160 ulib-r750" src="{{code}}" mode="scaleToFill" /></view>
|
||||
<view class="poster-code"><image class="block img-160x160 ulib-r750" src="{{poster.qrcode}}" mode="scaleToFill" /></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt50 pb50 fn-flex">
|
||||
@@ -21,4 +21,4 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<storePoster isShow="{{poster.isShow}}" customImg="{{poster.customPoster}}" isCreateQrcode="{{poster.isCreateQrcode}}" storName="{{poster.storName}}" storaAddress="{{poster.storaAddress}}"></storePoster>
|
||||
<storePoster isShow="{{poster.isShow}}" customImg="{{poster.customPoster}}" qrcode="{{poster.qrcode}}" storName="{{poster.storName}}" storaAddress="{{poster.storaAddress}}"></storePoster>
|
||||
Reference in New Issue
Block a user