|
...
|
...
|
@@ -92,23 +92,100 @@ Page({ |
|
|
|
})
|
|
|
|
},
|
|
|
|
initImage(){
|
|
|
|
this.setData({
|
|
|
|
palette:{
|
|
|
|
let palette={}
|
|
|
|
if(this.options.act=='quanzi'){
|
|
|
|
let seller=this.data.seller
|
|
|
|
let pw=getApp().system.windowWidth-20;
|
|
|
|
let ph=pw/355*558;
|
|
|
|
if(seller.activity.length==0){
|
|
|
|
ph=pw/355*500;
|
|
|
|
}
|
|
|
|
let cai_jiu_bao=[]//菜酒包
|
|
|
|
if(seller.cate.length>0){
|
|
|
|
cai_jiu_bao.push(seller.cate[0])
|
|
|
|
}
|
|
|
|
cai_jiu_bao.push(seller.is_belt_wine==1?'不可带酒水':'可自带酒水');
|
|
|
|
if(seller.room_num>0){
|
|
|
|
cai_jiu_bao.push(seller.room_num+'个包间')
|
|
|
|
}
|
|
|
|
cai_jiu_bao=cai_jiu_bao.join(' | ')
|
|
|
|
let tags=['明星老板','湖景餐厅'];
|
|
|
|
tags=tags.join(' | ')
|
|
|
|
palette={
|
|
|
|
background: '#fff',
|
|
|
|
width: getApp().system.windowWidth+'px',
|
|
|
|
height: getApp().system.windowHeight+'px',
|
|
|
|
width: pw+'px',
|
|
|
|
height: ph+'px',
|
|
|
|
views: [
|
|
|
|
{
|
|
|
|
type:'image',
|
|
|
|
url:'https://xt04.colorcun.com/sellerShare/Share_'+this.options.id+'.png',
|
|
|
|
url:this.data.seller.share_image+'?imageView2/1/w/750/h/500/q/100',
|
|
|
|
css:{
|
|
|
|
width:getApp().system.windowWidth+'px',
|
|
|
|
height:(480*(getApp().system.windowWidth/600))+'px',
|
|
|
|
width:710+'rpx',
|
|
|
|
height:470+'rpx',
|
|
|
|
mode:'aspectFill'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type:'text',
|
|
|
|
text: this.data.seller.sellername,
|
|
|
|
id:'seller-name',
|
|
|
|
css:{
|
|
|
|
fontSize:'36rpx',
|
|
|
|
color:'#353535',
|
|
|
|
top:520+'rpx',
|
|
|
|
left:'30rpx',
|
|
|
|
fontWeight:'bold',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type:'text',
|
|
|
|
text: '优选餐厅',
|
|
|
|
css:{
|
|
|
|
fontSize:'20rpx',
|
|
|
|
color:'#ffffff',
|
|
|
|
top:531+'rpx',
|
|
|
|
left:['60rpx', 'seller-name', 1] ,
|
|
|
|
background:'#F57E32',
|
|
|
|
padding:'2rpx 8rpx',
|
|
|
|
lineHeight:'28rpx'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type:'text',
|
|
|
|
text: cai_jiu_bao,
|
|
|
|
css:{
|
|
|
|
fontSize:'26rpx',
|
|
|
|
color:'#999999',
|
|
|
|
top: '578rpx',
|
|
|
|
left: '30rpx',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type:'text',
|
|
|
|
text: tags,
|
|
|
|
css:{
|
|
|
|
fontSize:'22rpx',
|
|
|
|
color:'#C0A369',
|
|
|
|
top: '638rpx',
|
|
|
|
left: '42rpx',
|
|
|
|
background:'#FFEFDF',
|
|
|
|
lineHeight:'28rpx',
|
|
|
|
padding:'10rpx 12rpx',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type:'rect',
|
|
|
|
css:{
|
|
|
|
color:'#F5F5F5',
|
|
|
|
top:'694rpx',
|
|
|
|
left:'30rpx',
|
|
|
|
width:(pw-30)+'px',
|
|
|
|
height:'1px'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
/*
|
|
|
|
{
|
|
|
|
type:'text',
|
|
|
|
text: "陕西风味面馆",
|
|
|
|
css:{
|
|
|
|
fontSize:'14px',
|
|
...
|
...
|
@@ -130,18 +207,54 @@ Page({ |
|
|
|
height:'34px'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
*/
|
|
|
|
{
|
|
|
|
type: 'image',
|
|
|
|
url: this.data.qrcode,
|
|
|
|
css: {
|
|
|
|
bottom: '48rpx',
|
|
|
|
right: '48rpx',
|
|
|
|
width: '192rpx',
|
|
|
|
height: '192rpx',
|
|
|
|
bottom: '112rpx',
|
|
|
|
left: (pw / 2) + 'px',
|
|
|
|
width: '140rpx',
|
|
|
|
height: '140rpx',
|
|
|
|
align: 'center',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type:'text',
|
|
|
|
text: '长按或扫描二维码,预订、导航',
|
|
|
|
css:{
|
|
|
|
fontSize:'22rpx',
|
|
|
|
color:'#999999',
|
|
|
|
bottom: '50rpx',
|
|
|
|
left: (pw / 2) + 'px',
|
|
|
|
align: 'center',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
if(seller.cate.length>0){
|
|
|
|
//活动
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
palette={
|
|
|
|
background: '#fff',
|
|
|
|
width: '400rpx',
|
|
|
|
height: '400rpx',
|
|
|
|
views: [
|
|
|
|
{
|
|
|
|
type: 'image',
|
|
|
|
url: this.data.qrcode,
|
|
|
|
css: {
|
|
|
|
mode:'scaleToFill',
|
|
|
|
width: '400rpx',
|
|
|
|
height: '400rpx',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
palette:palette
|
|
|
|
})
|
|
|
|
},
|
|
|
|
onImgOK(e){
|
|
...
|
...
|
@@ -149,7 +262,7 @@ Page({ |
|
|
|
wx.getImageInfo({
|
|
|
|
src:e.detail.path,
|
|
|
|
success:res=>{
|
|
|
|
let w=getApp().system.windowWidth
|
|
|
|
let w=getApp().system.windowWidth-24
|
|
|
|
console.log('getImageInfo',res)
|
|
|
|
this.setData({
|
|
|
|
paletteImageWidth:w,
|
...
|
...
|
|