Commit 1cf650fe36b2d1043969cee4d9fb0900bb5f2aa1

Authored by vking
1 parent 188f0f79

haowuquan

... ... @@ -9,7 +9,11 @@ Component({
hasSellerShare:{
type:Boolean,
value:false,
}
},
seller:{
type:Object,
value:{},
},
},
/**
... ... @@ -17,8 +21,17 @@ Component({
*/
data: {
hasShow:false,
product:null,
},
lifetimes: {
attached: function () {
this.formatProduct()
},
moved: function () {
},
detached: function () {
},
},
/**
* 组件的方法列表
*/
... ... @@ -46,5 +59,25 @@ Component({
},'/pages/reserve/share')
})
},
formatProduct(){
let seller=this.data.seller
let product= {
item_code:seller.id+"",
title:seller.sellername,
desc:seller.slogan,
category_list:seller.cate,
image_list:seller.envi_image,
src_mini_program_path:'/pages/reserve/detail?id='+seller.id+'&from=haowu',
brand_info:{
name:seller.sellername,
logo:seller.seller_image,
phone:seller.seller_tel,
},
sku_list:[],
}
this.setData({
product:product,
})
},
}
})
... ...
{
"component": true,
"usingComponents": {}
"usingComponents": {
"share-button": "plugin://haowu/share-button"
}
}
\ No newline at end of file
... ...
... ... @@ -13,5 +13,11 @@
<image class="share-img qrcode"></image>
<view class="share-name">二维码</view>
</view>
<view class="share-item flex-vc" catchtap="shareDo" data-act="qrcode">
<share-button type="3" fore-color="#dd6" product="{{product}}" style="height: 100rpx;">
<image class="share-img hwq"></image>
</share-button>
<view class="share-name">好物圈</view>
</view>
</view>
</view>
... ...
... ... @@ -22,6 +22,9 @@
.share-img.qrcode{
background-image: url("http://qn.colorcun.com/reserve/share/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201906251004332.png");
}
.share-img.hwq{
background-image: url("http://qn.colorcun.com/reserve/images/hwq.png");
}
.share-name{
margin-top: 20rpx;
font-size: 30rpx;
... ... @@ -30,6 +33,6 @@
color: #353535;
}
.share-item{
min-width: 33%;
width: 33%;
min-width: 25%;
width: 25%;
}
\ No newline at end of file
... ...
... ... @@ -17,7 +17,6 @@ Page({
hasOnlineReserve:false,
activeTab:'detail',
hasFullHouse:false,//满房
product:{},
},
/**
... ... @@ -79,27 +78,10 @@ Page({
this.setData({
seller:seller,
hasOnlineReserve:seller.is_online_reserve==1,
product:this.formatProduct(res.data)
})
}
})
},
formatProduct(seller){
return {
item_code:seller.id,
title:seller.sellername,
desc:seller.slogan,
category_list:seller.cate,
image_list:seller.envi_image,
src_mini_program_path:'/pages/reserve/detail?id='+seller.id+'&from=haowu',
brand_info:{
name:seller.sellername,
logo:seller.seller_image,
phone:seller.seller_tel,
},
sku_list:[],
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ...
... ... @@ -3,7 +3,6 @@
"navigationBarTextStyle": "black",
"navigationBarTitleText":"一键订",
"usingComponents": {
"share-button": "plugin://haowu/share-button",
"formids":"/components/formids/formids",
"userinfo":"/components/userinfo/userinfo",
"userinfo-share":"/components/userinfo/share",
... ...
... ... @@ -44,7 +44,6 @@
</view>
</view>
<view class="average" wx:if="{{seller.average>0}}">¥{{seller.average}}/人</view>
<share-button type="2" fore-color="#dd6" product="{{product}}"></share-button>
</view>
<view class="ping flex-ll">
<view class="item" wx:if="{{seller.cate.length>0}}">{{seller.cate[0]}}</view>
... ... @@ -208,7 +207,7 @@
<as id="as" items="{{seller.seller_tel}}" bindclick="reservePhone">拨打电话预订</as>
<getpos bindpos="onpos" id="getpos"></getpos>
<discount id="discount" seller="{{seller}}" bindhide="discountHide" bindshow="discountShow"></discount>
<share id="share" seller_id="{{seller.id}}"></share>
<share id="share" seller_id="{{seller.id}}" seller="{{seller}}" wx:if="{{seller.id}}"></share>
</view>
<view hidden="{{activeTab!='reserve'}}" wx:if="{{seller.id}}">
<view class="olreserve bg_white">
... ...