Commit 8a1193e8 authored by 罗超's avatar 罗超

支持scene传参

parent c53b2af6
......@@ -1094,15 +1094,29 @@ export default {
},
created() {},
onLoad(option) {
if (option.tcid) {
this.delMsg.tcid = option.tcid;
}
if (option.configId) {
this.delMsg.configId = option.configId;
}
if (option.cityId) {
this.delMsg.cityId = option.cityId;
}
if(!option.scene){
if (option.tcid) {
this.delMsg.tcid = option.tcid;
}
if (option.configId) {
this.delMsg.configId = option.configId;
}
if (option.cityId) {
this.delMsg.cityId = option.cityId;
}
}else{
let t=decodeURIComponent(option.scene).split('&')
t.forEach(x=>{
let item = x.split('=')
if(item.length===2){
if(item[0]==='tcid'){
this.delMsg.tcid = item[1]
}else if(item[0]==='configId'){
this.delMsg.configId = item[1]
}
}
})
}
this.getDetails();
this.U = uni.getStorageSync("mall_UserInfo");
if (this.U) {
......@@ -1275,74 +1289,83 @@ export default {
this.delMsg,
(res) => {
if (res.resultCode == 1) {
res.data.tempImgCover = JSON.parse(res.data.imgCover);
// let tempPrice= res.data.priceList.filter(x=>x.remainNum>0)
// res.data.priceList=tempPrice
this.dataList = res.data;
this.scenicNum = 0;
//this.dataList.productRecommend=this.dataList.productRecommend.split('\n').join('&hc')
console.log(this.dataList.productRecommend);
this.dataList.dayList.forEach((x) => {
x.dayArray.forEach((y) => {
if (y.type == 2) {
this.scenicNum++;
}
if (y.type == 4 && y.childItem.useDinnerType == 1) {
this.breakfastNum++;
}
if (y.type == 4 && y.childItem.useDinnerType == 2) {
this.lunchNum++;
}
if (y.type == 4 && y.childItem.useDinnerType == 3) {
this.dinnerNum++;
}
});
});
this.currentPrice = this.dataList.currentPriceInfo;
if (this.currentPrice.remainNum == 0) {
let temp = this.dataList.priceList.find((x) => x.remainNum > 0);
if (temp) {
this.getDayInfo(temp);
}
}
this.dataList.priceList.forEach((x) => {
if (x.tcid == this.delMsg.tcid) {
this.delMsg.tcnum = x.tcnum;
}
if (x.remainNum > 0) {
this.canCreateOrder = true;
}
});
this.finishFirstLoad = true;
// #ifdef MP-ALIPAY
if (this.dataList.feature.feeInclude) {
this.dataList.feature.feeInclude = parseHtml(
this.dataList.feature.feeInclude
);
}
if (this.dataList.feature.feeNonInclude) {
this.dataList.feature.feeNonInclude = parseHtml(
this.dataList.feature.feeNonInclude
);
}
if (this.dataList.feature.importantTip) {
this.dataList.feature.importantTip = parseHtml(
this.dataList.feature.importantTip
);
}
if (this.dataList.feature.warmTip) {
this.dataList.feature.warmTip = parseHtml(
this.dataList.feature.warmTip
);
}
if (this.dataList.feature.visaRemark) {
this.dataList.feature.visaRemark = parseHtml(
this.dataList.feature.visaRemark
);
try{
res.data.tempImgCover = JSON.parse(res.data.imgCover);
// let tempPrice= res.data.priceList.filter(x=>x.remainNum>0)
// res.data.priceList=tempPrice
this.dataList = res.data;
this.scenicNum = 0;
//this.dataList.productRecommend=this.dataList.productRecommend.split('\n').join('&hc')
console.log(this.dataList.productRecommend);
this.dataList.dayList.forEach((x) => {
x.dayArray.forEach((y) => {
if (y.type == 2) {
this.scenicNum++;
}
if (y.type == 4 && y.childItem.useDinnerType == 1) {
this.breakfastNum++;
}
if (y.type == 4 && y.childItem.useDinnerType == 2) {
this.lunchNum++;
}
if (y.type == 4 && y.childItem.useDinnerType == 3) {
this.dinnerNum++;
}
});
});
this.currentPrice = this.dataList.currentPriceInfo;
if (this.currentPrice.remainNum == 0) {
let temp = this.dataList.priceList.find((x) => x.remainNum > 0);
if (temp) {
this.getDayInfo(temp);
}
}
this.dataList.priceList.forEach((x) => {
if (x.tcid == this.delMsg.tcid) {
this.delMsg.tcnum = x.tcnum;
}
if (x.remainNum > 0) {
this.canCreateOrder = true;
}
});
this.finishFirstLoad = true;
// #ifdef MP-ALIPAY
if (this.dataList.feature.feeInclude) {
this.dataList.feature.feeInclude = parseHtml(
this.dataList.feature.feeInclude
);
}
if (this.dataList.feature.feeNonInclude) {
this.dataList.feature.feeNonInclude = parseHtml(
this.dataList.feature.feeNonInclude
);
}
if (this.dataList.feature.importantTip) {
this.dataList.feature.importantTip = parseHtml(
this.dataList.feature.importantTip
);
}
if (this.dataList.feature.warmTip) {
this.dataList.feature.warmTip = parseHtml(
this.dataList.feature.warmTip
);
}
if (this.dataList.feature.visaRemark) {
this.dataList.feature.visaRemark = parseHtml(
this.dataList.feature.visaRemark
);
}
// #endif
}catch(e){
//TODO handle the exception
uni.showToast({
icon:"none",
title:'团队信息不完善,无法完成显示'
})
}
// #endif
} else {
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment