|
...
|
...
|
@@ -8,14 +8,18 @@ Page({ |
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
|
|
|
|
seller:{},
|
|
|
|
paletteImageSrc:'',
|
|
|
|
palette:null,
|
|
|
|
hasLoadData:false,
|
|
|
|
act:'',
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad: function (options) {
|
|
|
|
|
|
|
|
this.options=options;
|
|
|
|
this.GetSellerDetail();
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -59,11 +63,87 @@ Page({ |
|
|
|
onReachBottom: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
GetSellerDetail(){
|
|
|
|
let options=this.options
|
|
|
|
App.Customer.GetSellerDetail({
|
|
|
|
sid:options.id,
|
|
|
|
}).then(async res=>{
|
|
|
|
if(res.ret==200){
|
|
|
|
let seller=res.data
|
|
|
|
console.log('App',App)
|
|
|
|
let qrcode=await App.Other.generate_qrcode({
|
|
|
|
tpl_id: 25415,
|
|
|
|
code_type: 'wxcode',
|
|
|
|
'param_value[0]':80
|
|
|
|
});
|
|
|
|
this.setData({
|
|
|
|
seller:seller,
|
|
|
|
qrcode:qrcode.data,
|
|
|
|
hasLoadData:true,
|
|
|
|
})
|
|
|
|
setTimeout(()=>{
|
|
|
|
this.initImage()
|
|
|
|
},0);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
initImage(){
|
|
|
|
this.setData({
|
|
|
|
palette:{
|
|
|
|
background: '#fff',
|
|
|
|
width: getApp().system.windowWidth+'px',
|
|
|
|
height: getApp().system.windowHeight+'px',
|
|
|
|
views: [
|
|
|
|
{
|
|
|
|
type:'image',
|
|
|
|
url:'https://xt04.colorcun.com/sellerShare/Share_'+this.options.id+'.png',
|
|
|
|
css:{
|
|
|
|
width:getApp().system.windowWidth+'px',
|
|
|
|
height:(480*(getApp().system.windowWidth/600))+'px',
|
|
|
|
mode:'aspectFill'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type:'text',
|
|
|
|
text: "陕西风味面馆",
|
|
|
|
css:{
|
|
|
|
fontSize:'14px',
|
|
|
|
color:'#f00',
|
|
|
|
background:'#ff0',
|
|
|
|
padding:'8px 20px',
|
|
|
|
top:(480*(getApp().system.windowWidth/600)+20)+'px',
|
|
|
|
left:'16px',
|
|
|
|
lineHeight:'18px'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type:'rect',
|
|
|
|
css:{
|
|
|
|
color:'rgba(0,0,0,0.5)',
|
|
|
|
top:(480*(getApp().system.windowWidth/600)+12)+'px',
|
|
|
|
left:'0px',
|
|
|
|
width:'320px',
|
|
|
|
height:'34px'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'image',
|
|
|
|
url: this.data.qrcode,
|
|
|
|
css: {
|
|
|
|
bottom: '48rpx',
|
|
|
|
right: '48rpx',
|
|
|
|
width: '192rpx',
|
|
|
|
height: '192rpx',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
],
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
onImgOK(e){
|
|
|
|
console.log('onImgOK',e.detail.path)
|
|
|
|
this.setData({
|
|
|
|
paletteImageSrc:e.detail.path
|
|
|
|
paletteImageSrc:e.detail.path,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|