Browse Source

团队预约详情页id修改

master
nige 3 years ago
parent
commit
68dfb6019f
  1. 2
      app.js
  2. 57
      pages/info/groupOrderInfo/index.js

2
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx" unique_key: "wechatxcx"
}).then(res => { }).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest71? true : false; data.isTest = data.isTest72? true : false;
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {
// 获取ui配置文件 // 获取ui配置文件

57
pages/info/groupOrderInfo/index.js

@ -14,7 +14,8 @@ Page({
restTime:null, restTime:null,
countdown:0, countdown:0,
codeImg:null, codeImg:null,
showShareMask:false showShareMask:false,
from:null
}, },
/** /**
@ -22,25 +23,26 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
id:options.id id:options.id,
from:options.from
}) })
// 获取二维码 // 获取二维码
commonApi.user_post("team_order/get_qrcode",{ // commonApi.user_post("team_order/get_qrcode",{
url:'https://m.cloud.sz-trip.com/TeamForm?team_id='+this.data.id // url:'https://m.cloud.sz-trip.com/TeamForm?team_id='+this.data.id
}).then(res=>{ // }).then(res=>{
this.setData({ // this.setData({
codeImg:res.data // codeImg:res.data
}) // })
}) // })
if(options.from=='order'){ // if(options.from=='order'){
wx.showModal({ // wx.showModal({
title:"提示", // title:"提示",
content:"团体预约发起后请前往个人中心团体预约订单中查看订单详情和组团详情。", // content:"团体预约发起后请前往个人中心团体预约订单中查看订单详情和组团详情。",
success:function(){ // success:function(){
} // }
}) // })
} // }
}, },
showShare(){ showShare(){
this.setData({ this.setData({
@ -107,7 +109,24 @@ Page({
} }
}) })
}, },
getQrcode(id){
commonApi.user_post("team_order/get_qrcode",{
url:'https://m.cloud.sz-trip.com/TeamForm?team_id='+id
}).then(res=>{
this.setData({
codeImg:res.data
})
})
if(this.data.from=='order'){
wx.showModal({
title:"提示",
content:"团体预约发起后请前往个人中心团体预约订单中查看订单详情和组团详情。",
success:function(){
}
})
}
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
@ -123,6 +142,7 @@ Page({
order_id:this.data.id order_id:this.data.id
}).then(res=>{ }).then(res=>{
if(res.code==1){ if(res.code==1){
this.getQrcode(res.data.list.id)
res.data.list.order_info = res.data.list.order_info?JSON.parse(res.data.list.order_info):null; res.data.list.order_info = res.data.list.order_info?JSON.parse(res.data.list.order_info):null;
res.data.list.members.reverse() res.data.list.members.reverse()
this.setData({ this.setData({
@ -141,6 +161,7 @@ Page({
} }
}) })
}, },
setTime(){ setTime(){
if(this.data.countdown && this.data.countdown>0){ if(this.data.countdown && this.data.countdown>0){

Loading…
Cancel
Save