Commit 24cb3d88 authored by ZJG's avatar ZJG

景点专车分享

parent 77ce9168
......@@ -571,8 +571,9 @@
StartDate:'',
EndDate:'',
},
scrollleft:0
scrollleft:0,
carMsgobj:'',
Up:0
}
......@@ -582,15 +583,27 @@
if (options && options.carMsg) {
//对象解码
this.carMsg = JSON.parse(decodeURIComponent(options.carMsg))
this.carMsgobj = options.carMsg;//保存原始的用于分享
console.log(this.carMsg)
this.msg.StartCityId = this.carMsg.StartCityId;
this.msg.StartCityType = this.carMsg.StartCityType;
this.msg.ArriveCityId = this.carMsg.ArriveCityId;
this.msg.ArriveCityType = this.carMsg.ArriveCityType;
if(new Date()>new Date(this.carMsg.Q_Date)){//判断分享的时间是否过期过期了 就给与今天的日期
var date1 = new Date();
let carMonth = (date1.getMonth() + 1)<10?'0'+(date1.getMonth() + 1):(date1.getMonth() + 1);
let carDays = (date1.getDate() )<10?'0'+(date1.getDate() ):(date1.getDate());
let nowtime = date1.getFullYear() + "-" + carMonth + "-" + carDays;
this.msg.Q_Date = nowtime
}else{
this.msg.Q_Date = this.carMsg.Q_Date;
}
}
this.$nextTick(function() {
this.scrollleft = 0
});
console.log(options)
this.mainColor = this.$uiConfig.mainColor;
this.gettimeList()
this.init();
......@@ -598,7 +611,46 @@
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
},
onShareTimeline() {//朋友圈
let uid = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserId
: 0;
if(uid==0){
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0
}
let SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId
: 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserSmallShopId
: 0;
}
return {
title: this.carMsg.StartCityName +'-' + this.carMsg.ArriveCityName,
query: "user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&carMsg='+this.carMsgobj,
imageUrl: '',
};
},
onShareAppMessage(res) {//朋友圈
let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
if(uid==0){
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0
}
let SmallShopId = u.SmallShopId ? u.SmallShopId : 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = u.UserSmallShopId? u.UserSmallShopId:0
}
return {
title:this.carMsg.StartCityName +'-' + this.carMsg.ArriveCityName,
path: "/pages/index/index?user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&carMsg='+this.carMsgobj+'&JumpType=17',
imageUrl:'',
};
},
methods: {
getscroll(e){
......
......@@ -168,6 +168,7 @@
cardsmoney:0,//储值卡带过来的金额
orderPopupdata:{},//离线收益的弹窗
showorder:false,//显示弹出
carMsg:'',//景点专车分享带过来的字段
};
},
components: {
......@@ -302,6 +303,9 @@
if (options && options.storeId) {
this.fxstoreId = options.storeId;
}
if (options && options.carMsg) {
this.carMsg = options.carMsg;
}
// #ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
......@@ -352,6 +356,7 @@
if (options && options.OrderId) { //代付订单id
this.OrderId = options.OrderId;
}
that.u = uni.getStorageSync("mall_UserInfo");
if (!that.u) {
that.u = {
......@@ -796,6 +801,8 @@
uni.navigateTo({ url: "/pages/ticketCoupons/details?id"+that.GoodsId});
}else if(that.JumpType == 16){//餐食详情
uni.navigateTo({ url: "/pages/restaurant/details?id"+that.GoodsId});
}else if(that.JumpType == 17){//景点专车
uni.navigateTo({ url: '/pages/guidecar/bookaCarList?carMsg='+that.carMsg})
}
}, 500);
},
......
......@@ -534,11 +534,11 @@
})
}else if(data.OrderType==2){//餐厅
uni.navigateTo({
url: '/pages/restaurant/list?Name='+data.DiningList[0].MealName,
url: '/pages/restaurant/list?Name='+data.DiningList[0].DiningName,
})
}else if(data.OrderType==3){//门票
uni.navigateTo({
url: '/pages/ticketCoupons/list?Name='+data.TicketList[0].TicketName,
url: '/pages/ticketCoupons/list?Name='+data.TicketList[0].TitekCounponName,
})
}else if(data.OrderType==4){//车
let obj = {
......
......@@ -575,11 +575,11 @@
})
}else if(data.OrderType==2){//餐厅
uni.navigateTo({
url: '/pages/restaurant/list?Name='+data.DiningList[0].MealName,
url: '/pages/restaurant/list?Name='+data.DiningList[0].DiningName,
})
}else if(data.OrderType==3){//门票
uni.navigateTo({
url: '/pages/ticketCoupons/list?Name='+data.TicketList[0].TicketName,
url: '/pages/ticketCoupons/list?Name='+data.TicketList[0].TitekCounponName,
})
}else if(data.OrderType==4){//车
let obj = {
......
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