|
@@ -92,23 +92,100 @@ Page({ |
|
@@ -92,23 +92,100 @@ Page({ |
|
92
|
})
|
92
|
})
|
|
93
|
},
|
93
|
},
|
|
94
|
initImage(){
|
94
|
initImage(){
|
|
95
|
- this.setData({
|
|
|
|
96
|
- palette:{
|
95
|
+ let palette={}
|
|
|
|
96
|
+ if(this.options.act=='quanzi'){
|
|
|
|
97
|
+ let seller=this.data.seller
|
|
|
|
98
|
+ let pw=getApp().system.windowWidth-20;
|
|
|
|
99
|
+ let ph=pw/355*558;
|
|
|
|
100
|
+ if(seller.activity.length==0){
|
|
|
|
101
|
+ ph=pw/355*500;
|
|
|
|
102
|
+ }
|
|
|
|
103
|
+ let cai_jiu_bao=[]//菜酒包
|
|
|
|
104
|
+ if(seller.cate.length>0){
|
|
|
|
105
|
+ cai_jiu_bao.push(seller.cate[0])
|
|
|
|
106
|
+ }
|
|
|
|
107
|
+ cai_jiu_bao.push(seller.is_belt_wine==1?'不可带酒水':'可自带酒水');
|
|
|
|
108
|
+ if(seller.room_num>0){
|
|
|
|
109
|
+ cai_jiu_bao.push(seller.room_num+'个包间')
|
|
|
|
110
|
+ }
|
|
|
|
111
|
+ cai_jiu_bao=cai_jiu_bao.join(' | ')
|
|
|
|
112
|
+ let tags=['明星老板','湖景餐厅'];
|
|
|
|
113
|
+ tags=tags.join(' | ')
|
|
|
|
114
|
+ palette={
|
|
97
|
background: '#fff',
|
115
|
background: '#fff',
|
|
98
|
- width: getApp().system.windowWidth+'px',
|
|
|
|
99
|
- height: getApp().system.windowHeight+'px',
|
116
|
+ width: pw+'px',
|
|
|
|
117
|
+ height: ph+'px',
|
|
100
|
views: [
|
118
|
views: [
|
|
101
|
{
|
119
|
{
|
|
102
|
type:'image',
|
120
|
type:'image',
|
|
103
|
- url:'https://xt04.colorcun.com/sellerShare/Share_'+this.options.id+'.png',
|
121
|
+ url:this.data.seller.share_image+'?imageView2/1/w/750/h/500/q/100',
|
|
104
|
css:{
|
122
|
css:{
|
|
105
|
- width:getApp().system.windowWidth+'px',
|
|
|
|
106
|
- height:(480*(getApp().system.windowWidth/600))+'px',
|
123
|
+ width:710+'rpx',
|
|
|
|
124
|
+ height:470+'rpx',
|
|
107
|
mode:'aspectFill'
|
125
|
mode:'aspectFill'
|
|
108
|
}
|
126
|
}
|
|
109
|
},
|
127
|
},
|
|
110
|
{
|
128
|
{
|
|
111
|
type:'text',
|
129
|
type:'text',
|
|
|
|
130
|
+ text: this.data.seller.sellername,
|
|
|
|
131
|
+ id:'seller-name',
|
|
|
|
132
|
+ css:{
|
|
|
|
133
|
+ fontSize:'36rpx',
|
|
|
|
134
|
+ color:'#353535',
|
|
|
|
135
|
+ top:520+'rpx',
|
|
|
|
136
|
+ left:'30rpx',
|
|
|
|
137
|
+ fontWeight:'bold',
|
|
|
|
138
|
+ }
|
|
|
|
139
|
+ },
|
|
|
|
140
|
+ {
|
|
|
|
141
|
+ type:'text',
|
|
|
|
142
|
+ text: '优选餐厅',
|
|
|
|
143
|
+ css:{
|
|
|
|
144
|
+ fontSize:'20rpx',
|
|
|
|
145
|
+ color:'#ffffff',
|
|
|
|
146
|
+ top:531+'rpx',
|
|
|
|
147
|
+ left:['60rpx', 'seller-name', 1] ,
|
|
|
|
148
|
+ background:'#F57E32',
|
|
|
|
149
|
+ padding:'2rpx 8rpx',
|
|
|
|
150
|
+ lineHeight:'28rpx'
|
|
|
|
151
|
+ }
|
|
|
|
152
|
+ },
|
|
|
|
153
|
+ {
|
|
|
|
154
|
+ type:'text',
|
|
|
|
155
|
+ text: cai_jiu_bao,
|
|
|
|
156
|
+ css:{
|
|
|
|
157
|
+ fontSize:'26rpx',
|
|
|
|
158
|
+ color:'#999999',
|
|
|
|
159
|
+ top: '578rpx',
|
|
|
|
160
|
+ left: '30rpx',
|
|
|
|
161
|
+ }
|
|
|
|
162
|
+ },
|
|
|
|
163
|
+ {
|
|
|
|
164
|
+ type:'text',
|
|
|
|
165
|
+ text: tags,
|
|
|
|
166
|
+ css:{
|
|
|
|
167
|
+ fontSize:'22rpx',
|
|
|
|
168
|
+ color:'#C0A369',
|
|
|
|
169
|
+ top: '638rpx',
|
|
|
|
170
|
+ left: '42rpx',
|
|
|
|
171
|
+ background:'#FFEFDF',
|
|
|
|
172
|
+ lineHeight:'28rpx',
|
|
|
|
173
|
+ padding:'10rpx 12rpx',
|
|
|
|
174
|
+ }
|
|
|
|
175
|
+ },
|
|
|
|
176
|
+ {
|
|
|
|
177
|
+ type:'rect',
|
|
|
|
178
|
+ css:{
|
|
|
|
179
|
+ color:'#F5F5F5',
|
|
|
|
180
|
+ top:'694rpx',
|
|
|
|
181
|
+ left:'30rpx',
|
|
|
|
182
|
+ width:(pw-30)+'px',
|
|
|
|
183
|
+ height:'1px'
|
|
|
|
184
|
+ }
|
|
|
|
185
|
+ },
|
|
|
|
186
|
+ /*
|
|
|
|
187
|
+ {
|
|
|
|
188
|
+ type:'text',
|
|
112
|
text: "陕西风味面馆",
|
189
|
text: "陕西风味面馆",
|
|
113
|
css:{
|
190
|
css:{
|
|
114
|
fontSize:'14px',
|
191
|
fontSize:'14px',
|
|
@@ -130,18 +207,54 @@ Page({ |
|
@@ -130,18 +207,54 @@ Page({ |
|
130
|
height:'34px'
|
207
|
height:'34px'
|
|
131
|
}
|
208
|
}
|
|
132
|
},
|
209
|
},
|
|
|
|
210
|
+ */
|
|
133
|
{
|
211
|
{
|
|
134
|
type: 'image',
|
212
|
type: 'image',
|
|
135
|
url: this.data.qrcode,
|
213
|
url: this.data.qrcode,
|
|
136
|
css: {
|
214
|
css: {
|
|
137
|
- bottom: '48rpx',
|
|
|
|
138
|
- right: '48rpx',
|
|
|
|
139
|
- width: '192rpx',
|
|
|
|
140
|
- height: '192rpx',
|
215
|
+ bottom: '112rpx',
|
|
|
|
216
|
+ left: (pw / 2) + 'px',
|
|
|
|
217
|
+ width: '140rpx',
|
|
|
|
218
|
+ height: '140rpx',
|
|
|
|
219
|
+ align: 'center',
|
|
|
|
220
|
+ },
|
|
|
|
221
|
+ },
|
|
|
|
222
|
+ {
|
|
|
|
223
|
+ type:'text',
|
|
|
|
224
|
+ text: '长按或扫描二维码,预订、导航',
|
|
|
|
225
|
+ css:{
|
|
|
|
226
|
+ fontSize:'22rpx',
|
|
|
|
227
|
+ color:'#999999',
|
|
|
|
228
|
+ bottom: '50rpx',
|
|
|
|
229
|
+ left: (pw / 2) + 'px',
|
|
|
|
230
|
+ align: 'center',
|
|
|
|
231
|
+ }
|
|
|
|
232
|
+ },
|
|
|
|
233
|
+ ],
|
|
|
|
234
|
+ }
|
|
|
|
235
|
+ if(seller.cate.length>0){
|
|
|
|
236
|
+ //活动
|
|
|
|
237
|
+ }
|
|
|
|
238
|
+ }else{
|
|
|
|
239
|
+ palette={
|
|
|
|
240
|
+ background: '#fff',
|
|
|
|
241
|
+ width: '400rpx',
|
|
|
|
242
|
+ height: '400rpx',
|
|
|
|
243
|
+ views: [
|
|
|
|
244
|
+ {
|
|
|
|
245
|
+ type: 'image',
|
|
|
|
246
|
+ url: this.data.qrcode,
|
|
|
|
247
|
+ css: {
|
|
|
|
248
|
+ mode:'scaleToFill',
|
|
|
|
249
|
+ width: '400rpx',
|
|
|
|
250
|
+ height: '400rpx',
|
|
141
|
},
|
251
|
},
|
|
142
|
}
|
252
|
}
|
|
143
|
],
|
253
|
],
|
|
144
|
}
|
254
|
}
|
|
|
|
255
|
+ }
|
|
|
|
256
|
+ this.setData({
|
|
|
|
257
|
+ palette:palette
|
|
145
|
})
|
258
|
})
|
|
146
|
},
|
259
|
},
|
|
147
|
onImgOK(e){
|
260
|
onImgOK(e){
|
|
@@ -149,7 +262,7 @@ Page({ |
|
@@ -149,7 +262,7 @@ Page({ |
|
149
|
wx.getImageInfo({
|
262
|
wx.getImageInfo({
|
|
150
|
src:e.detail.path,
|
263
|
src:e.detail.path,
|
|
151
|
success:res=>{
|
264
|
success:res=>{
|
|
152
|
- let w=getApp().system.windowWidth
|
265
|
+ let w=getApp().system.windowWidth-24
|
|
153
|
console.log('getImageInfo',res)
|
266
|
console.log('getImageInfo',res)
|
|
154
|
this.setData({
|
267
|
this.setData({
|
|
155
|
paletteImageWidth:w,
|
268
|
paletteImageWidth:w,
|