|
...
|
...
|
@@ -42,6 +42,9 @@ Page({ |
|
|
|
certificate:'',
|
|
|
|
dataStr:Date.now()*1/1000,
|
|
|
|
swich_phone:'0',
|
|
|
|
is_comments:'0',
|
|
|
|
is_user_comments:false,
|
|
|
|
cusdem:'',//备注 传参给意见反馈
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
...
|
...
|
@@ -64,7 +67,6 @@ Page({ |
|
|
|
"statReachBottom": true,
|
|
|
|
"lauchOpts": options, //渠道分析
|
|
|
|
});
|
|
|
|
this.getDetail();
|
|
|
|
},
|
|
|
|
// 点击了解更多会员优惠政策
|
|
|
|
gotoFavourableList(){
|
|
...
|
...
|
@@ -77,7 +79,40 @@ Page({ |
|
|
|
wx.navigateTo({
|
|
|
|
url
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 去评价
|
|
|
|
evaluateFun(){
|
|
|
|
let coupon_data_comments=this.data.marketing.coupon_data_comments;//赠送优惠券的列表
|
|
|
|
let coupon=this.data.marketing.is_comments_coupon;//评价赠送优惠券
|
|
|
|
let couponId,price,use;
|
|
|
|
if(coupon && coupon_data_comments && coupon_data_comments.length>0){
|
|
|
|
let obj=coupon_data_comments[0];
|
|
|
|
console.log('填写意见获取的券的信息',obj);
|
|
|
|
couponId=obj.id;
|
|
|
|
price=obj.price;
|
|
|
|
use=JSON.stringify(obj.use)
|
|
|
|
}
|
|
|
|
let record={
|
|
|
|
date:this.data.seller.date,
|
|
|
|
tablesText:this.data.seller.tablesText,
|
|
|
|
tableNum:this.data.detail.actual_pum?this.data.detail.actual_pum:this.data.tableNum,
|
|
|
|
cusdem:this.data.cusdem,
|
|
|
|
}
|
|
|
|
let url=util.http_build_query({
|
|
|
|
sellerName:this.data.seller.name,
|
|
|
|
record:JSON.stringify(record),
|
|
|
|
sellerid:this.data.seller.sid,
|
|
|
|
oid:this.data.detail.id,
|
|
|
|
types:'1',
|
|
|
|
coupon:coupon || '',
|
|
|
|
couponId:couponId || '',
|
|
|
|
price:price || '',
|
|
|
|
use:use || '',
|
|
|
|
},'/pages/pinglun/createOpinion')
|
|
|
|
wx.navigateTo({
|
|
|
|
url
|
|
|
|
})
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
...
|
...
|
@@ -91,6 +126,7 @@ Page({ |
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow: function () {
|
|
|
|
this.getDetail()
|
|
|
|
},
|
|
|
|
cli() {
|
|
|
|
if(this.data.staffinfo.wechat){
|
|
...
|
...
|
@@ -152,6 +188,8 @@ Page({ |
|
|
|
this.setData({
|
|
|
|
detail: this.formatDatail(reserev, dateSmart),
|
|
|
|
tableNum,
|
|
|
|
is_user_comments:res.data.is_user_comments,
|
|
|
|
cusdem:res.data.cusdem,
|
|
|
|
seller: {
|
|
|
|
name: reserev.seller.sellername,
|
|
|
|
sid:reserev.sid,
|
|
...
|
...
|
@@ -274,15 +312,17 @@ Page({ |
|
|
|
let data=res.data
|
|
|
|
console.log('data',data);
|
|
|
|
let coupon_dataList=[]
|
|
|
|
let home,chef,marketing,reserve,swich_phone,signboard,store,homeColor,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse;
|
|
|
|
let home,chef,marketing,reserve,swich_phone,is_comments,signboard,store,homeColor,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse;
|
|
|
|
chef = util.determine(data.chef);
|
|
|
|
reserve = util.determine(data.reserve);
|
|
|
|
swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:'';
|
|
|
|
marketing = util.determine(data.marketing);
|
|
|
|
signboard = util.determine(data.signboard);
|
|
|
|
store = util.determine(data.store);
|
|
|
|
home = util.determine(data.home);
|
|
|
|
let coupon=marketing?util.determine(marketing.coupon_data):''
|
|
|
|
swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:'';
|
|
|
|
is_comments = marketing && marketing.is_comments?marketing.is_comments:'';
|
|
|
|
let coupon=marketing?util.determine(marketing.coupon_data):'';
|
|
|
|
marketing.coupon_data_comments=(marketing && is_comments=='1' && marketing.is_comments_coupon=='1')?util.determine(marketing.coupon_data_comments):'';
|
|
|
|
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
|
|
|
|
if(coupon && util.getType(coupon)=='object'){
|
|
|
|
coupon.stringifyUse=JSON.stringify(coupon.use)
|
|
...
|
...
|
@@ -318,7 +358,8 @@ Page({ |
|
|
|
stringifyUse,
|
|
|
|
coupon,
|
|
|
|
coupon_dataList,
|
|
|
|
swich_phone
|
|
|
|
swich_phone,
|
|
|
|
is_comments,
|
|
|
|
}
|
|
|
|
console.log('获取数据', {...obj});
|
|
|
|
if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){
|
|
...
|
...
|
@@ -363,6 +404,7 @@ Page({ |
|
|
|
priceInfo,
|
|
|
|
scoreInfo,
|
|
|
|
swich_phone,
|
|
|
|
is_comments,
|
|
|
|
})
|
|
|
|
if (home && home.red == '1' && home.green == '67' && home.blue == '163') {
|
|
|
|
this.setData({
|
...
|
...
|
|