diff --git a/app.js b/app.js index 99fcdd3..dca3e71 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest115? true : false; + data.isTest = data.isTest116? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/images/empty.png b/images/empty.png deleted file mode 100755 index 7be0cc6..0000000 Binary files a/images/empty.png and /dev/null differ diff --git a/images/empty2.png b/images/empty2.png deleted file mode 100755 index fb4ec04..0000000 Binary files a/images/empty2.png and /dev/null differ diff --git a/pages/order/components/contact/index.js b/pages/order/components/contact/index.js index 980d2a3..9699645 100644 --- a/pages/order/components/contact/index.js +++ b/pages/order/components/contact/index.js @@ -1,6 +1,7 @@ // pages/order/components/contact/index.js import userApi from "../../../../utils/https/user" import commonApi from "../../../../utils/https/common" +import util from "../../../../utils/util.js" let app = getApp() Component({ /** @@ -18,6 +19,26 @@ Component({ type:{ type:String, value:"" + }, + productNum:{ + type:Number, + value:1, + observer(nv, ov, path) { + if (nv) { + let num = nv-this.data.selectLinkman.length + this.setData({ + showNum:num + }) + } + } + }, + is_authentication:{// 是否实名,0否1是,默认实名 + type:String, + value:'' + }, + is_real_name:{// 是否是一证一票,0否1是, + type:String, + value:'' } }, @@ -29,11 +50,39 @@ Component({ linkmanList:[], showMask:false, editId:null, - isGroup:null + isGroup:null, + showManList:[], + showNum:0, + showAdd:false, + formData:{}, + types:[], + selectIndex:0, + person:{}, + personId:null, + r:[], + phone:'',//非实名时需要传的电话 }, lifetimes: { attached: function() { // 在组件实例进入页面节点树时执行 + console.log(this.properties.productNum); + console.log(this.properties.is_real_name); + // if (this.properties.is_real_name == '1') { + this.setData({ + showNum:this.properties.productNum + }) + // } + // 不实名时直接获取手机号 + if (this.properties.is_authentication) { + commonApi.user_post("uservice/user/getMyInfo",{}).then(res=>{ + if(res.code==1){ + this.setData({ + phone:res.data.mobile + }) + this.triggerEvent("setLinkman",{phone:this.data.phone}) + } + }) + } // 获取默认联系人 commonApi.user_post("token/check").then(res=>{ this.setData({ @@ -44,8 +93,11 @@ Component({ contactType:"CONTACT" }).then(res=>{ if(res.data){ + let length =[res.data].length this.setData({ - selectLinkman:[res.data] + selectLinkman:[res.data], + showNum:this.data.showNum-length, + showManList:[res.data] }) this.triggerEvent("setLinkman",[res.data]) } @@ -53,6 +105,18 @@ Component({ }) } }) + // 获取证件列表 + userApi.user_post("user/getCardTypeList", {}).then(r => { + console.log(r) + let data = []; + r.data.map(item=>{ + data.push(item.title) + }) + this.setData({ + types: r.data, + typeList:data + }) + }) }, detached: function() { // 在组件实例被从页面节点树移除时执行 @@ -61,7 +125,6 @@ Component({ pageLifetimes: { show: function() { // 页面被展示 - if(this.data.editId){ let editId = this.data.editId; userApi.user_post("user/getContactInfoById",{ @@ -117,16 +180,60 @@ Component({ * 组件的方法列表 */ methods: { + // getPhoneNumber:function(e) { + // console.log(e); + // const code = e.detail.code + // wx.request({ + // url: `https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${app.globalData.appId}&secret=${app.globalData.secret}`, + // method: 'GET', + // success:res=>{ + // if(res.statusCode!==200) return + // const access_token = res.data.access_token + // wx.request({ + // url: `https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=${access_token}`, + // method: 'POST', + // data: { + // code + // }, + // success:data=>{ + // if(data.statusCode!==200) return + // console.log(data.data.phone_info); + // debugger + // const { phoneNumber } = data.data.phone_info // 这里就是获取到的手机号 + // } + // }) + // } + // }) + // }, gotoEdit:function(e){ - this.setData({ - editId:e.currentTarget.dataset.item.id + userApi.user_post("user/getContactInfoById", { id: e.currentTarget.dataset.item.id }).then(res => { + console.log(res); + res.data.isDefault = res.data.is_default == '1' ? true : false; + res.data.username = res.data.name; + res.data.mobile = res.data.tel; + res.data.idNumber = res.data.id_number; + console.log(res.data); + this.setData({ + showMask:!this.data.showMask, + formData: res.data, + idTypeId: res.data.idcard_type, + editId:e.currentTarget.dataset.item.id, + selectIndex:this.data.types.findIndex(item=>item.type == res.data.idcard_type && item.code == res.data.document_type) + }) }) + this.showAddMask() }, showLinkman:function(){ this.setData({ showMask:!this.data.showMask }) }, + showAddMask:function(){ + this.setData({ + showAdd:!this.data.showAdd, + showMask:!this.data.showMask + }) + }, cancel:function(){ let selectLinkman = this.data.selectLinkman,linkmanList = this.data.linkmanList; linkmanList.map(linkman=>{ @@ -142,6 +249,116 @@ Component({ }) this.showLinkman() }, + selectType:function(e){ + this.setData({ + selectIndex:e.detail.value + }) + }, + // 保存 + save:function(){ + if (!this.data.formData.username){ + wx.showToast({ + title: '请输入姓名!', + icon:"none" + }) + return false; + } + if (!this.data.formData.mobile) { + wx.showToast({ + title: '请输入手机号码!', + icon: "none" + }) + return false; + } + if (!util.isTel(this.data.formData.mobile)) { + wx.showToast({ + title: '请输入正确的手机号码!', + icon: "none" + }) + return false; + } + // if (!this.data.idTypeId) { + // wx.showToast({ + // title: '请选择证件类型!', + // icon: "none" + // }) + // return false; + // } + // if (!this.data.formData.idNumber) { + // wx.showToast({ + // title: '请输入证件号!', + // icon: "none" + // }) + // return false; + // } + let data = this.data.formData; + data.idcard_type = this.data.types[this.data.selectIndex].type; + data.is_default = data.isDefault?'1':'0'; + data.document_type = this.data.types[this.data.selectIndex].code; + data.id_number = this.data.formData.idNumber; + let service ="addNewContact"; + if(this.data.editId){ + data.contactId = this.data.editId; + service = "editContactById"; + } + userApi.user_post("user/"+service,data).then(res=>{ + if(res.code==1){ + wx.showToast({ + title: '保存成功!', + icon:"success", + success:function(){ + // util.back(); + } + }) + this.setData({ + showAdd:!this.data.showAdd + }) + } + }) + }, + //取消添加出行人 + del:function(){ + this.setData({ + formData:{}, + showAdd:!this.data.showAdd + }) + }, + // 输入监听 不是双向绑定啊 绝望 + nameInput:function(e){ + var formData = this.data.formData; + formData.username = e.detail.value; + this.setData({ + formData: formData + }) + }, + idNumberInput:function(e){ + var formData = this.data.formData; + formData.idNumber = e.detail.value; + this.setData({ + formData: formData + }) + }, + telInput:function(e){ + var formData = this.data.formData; + formData.mobile = e.detail.value; + this.setData({ + formData: formData + }) + }, + phoneInput:function(e){ + this.setData({ + phone: e.detail.value + }) + this.triggerEvent("setLinkman",{phone:this.data.phone}) + }, + // 设为默认 + setAddDefault:function(e){ + var formData = this.data.formData; + formData.isDefault = e.detail.value; + this.setData({ + formData: formData + }) + }, confirm:function(){ let linkmanList = this.data.linkmanList,selectLinkman = []; linkmanList.map(linkman=>{ @@ -149,15 +366,23 @@ Component({ selectLinkman.push(linkman); } }) - if(this.properties.maxNum!=-1 && selectLinkman.length>Number(this.properties.maxNum)){ - wx.showToast({ - title: '最多只能选择'+this.properties.maxNum+"个出行人", - icon:'none' - }) - return; - } + // 需要 改成 根据父组件的购买数量 + let showNum = this.properties.productNum + // let showNum = this.data.showNum + showNum = showNum-selectLinkman.length + let showManList = this.data.showManList + showManList = [...selectLinkman] + // if(this.properties.maxNum!=-1 && selectLinkman.length>Number(this.properties.maxNum)){ + // wx.showToast({ + // title: '最多只能选择'+this.properties.maxNum+"个出行人", + // icon:'none' + // }) + // return; + // } this.setData({ - selectLinkman:selectLinkman + selectLinkman:selectLinkman, + showManList:showManList, + showNum:showNum }) this.triggerEvent("setLinkman",selectLinkman) this.showLinkman() @@ -210,17 +435,55 @@ Component({ wx.showLoading({ title: '加载中', }) - let index = e.currentTarget.dataset.index,selectLinkman = this.data.selectLinkman; + let index = e.currentTarget.dataset.index,selectLinkman = this.data.selectLinkman,showManList = this.data.showManList; selectLinkman.splice(index,1); + showManList.splice(index,1); this.triggerEvent("setLinkman",selectLinkman) this.setData({ - selectLinkman:selectLinkman + selectLinkman:selectLinkman, + showManList:showManList, + showNum:selectLinkman.length>0?this.data.showNum+1:1 }) wx.hideLoading() }, + select:function(e) { + console.log(e); + let item = e.target.dataset.item + if (this.properties.is_real_name == '1') { // 一证一票 + this.selectIt(item) + } else { + this.selectOne(item) + } + }, + // 一证一票不让他多选 + selectOne:function(e) { + console.log(e); + let item = e,linkmanList = this.data.linkmanList,num = 0 + linkmanList.map(linkman=>{ + if(linkman.selected==1){ + num++; + } + }) + console.log(num); + linkmanList.map(linkman=>{ + if(item.id==linkman.id){ + // linkman.selected = linkman.selected==1?0:1; + linkman.selected = 1 + }else { + linkman.selected = 0 + } + }) + console.log(linkmanList); + this.setData({ + linkmanList + }) + }, + // 可多选 selectIt:function(e){ - console.log(e,app.globalData.product) - let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList,num = 0,traveller_limit_num = this.properties.maxNum!=-1?this.properties.maxNum:(app.globalData.product.sku.sku_model && app.globalData.product.sku.sku_model.limit_type!=0?app.globalData.product.sku.sku_model.traveller_limit_num:-1); + console.log(e,app.globalData.product) + console.log(e); + // let item = e.currentTarget.dataset.item,linkmanList = this.data.linkmanList,num = 0,traveller_limit_num = this.properties.maxNum!=-1?this.properties.maxNum:(app.globalData.product.sku.sku_model && app.globalData.product.sku.sku_model.limit_type!=0?app.globalData.product.sku.sku_model.traveller_limit_num:-1); + let item = e,linkmanList = this.data.linkmanList,num = 0,traveller_limit_num = this.properties.maxNum!=-1?this.properties.maxNum:(app.globalData.product.sku.sku_model && app.globalData.product.sku.sku_model.limit_type!=0?app.globalData.product.sku.sku_model.traveller_limit_num:-1); // 先计算出全部选中的出行人 console.log(111) linkmanList.map(linkman=>{ diff --git a/pages/order/components/contact/index.json b/pages/order/components/contact/index.json index e8cfaaf..da13845 100644 --- a/pages/order/components/contact/index.json +++ b/pages/order/components/contact/index.json @@ -1,4 +1,6 @@ { "component": true, - "usingComponents": {} + "usingComponents": { + "add":"/pages/user/linkman/add" + } } \ No newline at end of file diff --git a/pages/order/components/contact/index.wxml b/pages/order/components/contact/index.wxml index f3a66b1..42a67e3 100644 --- a/pages/order/components/contact/index.wxml +++ b/pages/order/components/contact/index.wxml @@ -4,11 +4,20 @@ {{isGroup==1?'发起人信息':'出行人信息'}} (*预约发起后前往个人中心-团体预约订单中查看详情) - 添加 + 添加 编辑 - + + + + 手机号 + + + + + + + + + + + + + {{item.name}} + + + + + 更多> + + + + + + {{item.name}} + 手机号{{item.tel}} + {{item.title}}{{item.id_number}} + + + + + + + + + 出行人{{index+1}} + 点击填写1位出行人信息 + + + + + + + + + 出行人1 + 点击填写1位出行人信息 + + + + @@ -43,18 +94,59 @@ 取消 确定 - 添加出行人 + + 添加出行人 - + + {{item.name}} 手机号 {{item.tel}} {{item.title}}: {{item.id_number}} - + 设为默认出行人 + + + + + + + 取消 + {{editId?'编辑':'添加'}}出行人 + 保存 + + + + 姓名 + + + + 证件类型 + + + {{typeList[selectIndex]}} + + + + + + 证件号 + + + + 手机号 + + + + 设为默认 + + + + + \ No newline at end of file diff --git a/pages/order/components/contact/index.wxss b/pages/order/components/contact/index.wxss index ecbc0b4..ea9490c 100644 --- a/pages/order/components/contact/index.wxss +++ b/pages/order/components/contact/index.wxss @@ -10,11 +10,12 @@ } .contacts-list { border-top: 1rpx solid #ccc; - padding: 0 21rpx; + /* padding: 0 21rpx; */ + padding: 42rpx 20rpx 18rpx; } .contact-item { padding: 30rpx 0; - border-bottom: 1rpx solid #ccc; + /* border-bottom: 1rpx solid #ccc; */ display: flex; align-items: center; justify-content: space-between; @@ -69,6 +70,14 @@ margin-bottom: 10rpx; line-height: 90rpx; } +.btns1 { + display: flex; + justify-content: space-between; + font-size: 31rpx; + color: #000; + margin-bottom: 47.33rpx; + /* line-height: 90rpx; */ +} .add-btn { line-height: 80rpx; background: #FFFFFF; @@ -85,6 +94,13 @@ background: #F7F7F7; max-height: 50%; } +.mask-content1 { + width: 700rpx; + padding: 50rpx 20rpx 112rpx; + overflow-y: auto; + background: #F7F7F7; + max-height: 50%; +} .linkmanlist-item { background: white; margin-bottom: 24rpx; @@ -167,4 +183,68 @@ color: #333333; font-size: 30rpx; justify-content: space-between; +} + +.text1 { + display: flex; + padding: 16rpx 19.33rpx 17.33rpx 20rpx; + background: rgba(11,137,142,.06); + justify-content: space-between; + align-items: center; + font-weight: 400; + font-size: 27rpx; + color: #0B898E; + margin-bottom: 26.67rpx; + border-radius: 13rpx; +} + +.name-box { + flex-shrink: 0; + margin-right: 15.33rpx; + width: 167rpx; + height: 73rpx; + background: rgba(11,137,142,0.06); + border-radius: 11rpx; + border: 2rpx solid #0B898E; + font-weight: 400; + font-size: 29rpx; + color: #000000; + text-align: center; + line-height: 73rpx; + position: relative; +} + +.name-selected-icon { + width: 28rpx; + height: 28rpx; + position: absolute; + bottom: 0; + right: -2rpx; +} + +.tel-input { + display: flex; + padding: 40rpx 20.67rpx 38.67rpx 21.33rpx; + border-top: 1rpx solid #ccc; + font-weight: 400; + font-size: 32rpx; + color: #000000; +} + +.input-text { + margin-right: 70rpx; +} + +.more { + width: 110rpx; + height: 73rpx; + background: #F1F1F1; + border-radius: 11rpx; + font-weight: 400; + font-size: 29rpx; + color: #0B898E; + line-height: 73rpx; + text-align: center; + position: absolute; + right: 0; } \ No newline at end of file diff --git a/pages/order/orderList/index.js b/pages/order/orderList/index.js index ac9592b..5793f24 100644 --- a/pages/order/orderList/index.js +++ b/pages/order/orderList/index.js @@ -37,7 +37,8 @@ Page({ flag:options.flag, // linkmanList: app.globalData.linkmanList }) - console.log('-------------',app.globalData.list); + console.log('-------------',this.data.ticketList); + // debugger let price = 0, sku_id = [] ,postFee= 0; app.globalData.postProduct.map(item => { if (!app.globalData.kjId && !this.data.gp_id) { @@ -50,7 +51,8 @@ Page({ sku_id.push(item.sku.id) }) app.globalData.list.map(item => { - price = price + item.sku.price * item.linkmanList.length; + // price = price + item.sku.price * item.linkmanList.length; + price = price + item.sku.price * item.num; sku_id.push(item.sku.id) }) this.setData({ diff --git a/pages/order/orderList/index.wxml b/pages/order/orderList/index.wxml index 1bffe7b..aa9e7c4 100644 --- a/pages/order/orderList/index.wxml +++ b/pages/order/orderList/index.wxml @@ -42,15 +42,22 @@ {{item.sku.sku_name}} - - X{{item.linkmanList.length}} + X{{item.num}} + 出行人信息 - - 姓名:{{items.name}} - 证件号:{{items.id_number}} - 手机号:{{items.tel}} + + + + 姓名:{{items.name}} + 证件号:{{items.id_number}} + 手机号:{{items.tel}} + + + + + 手机号:{{item.phone}} diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js index 5066c8f..38c008c 100644 --- a/pages/order/scene/index.js +++ b/pages/order/scene/index.js @@ -33,6 +33,9 @@ Page({ showMask: false, price:0, is_need_idcard:1, + is_authentication:1, // 是否实名,0否1是,默认实名 + phone:'', //不实名时传的手机号 + is_real_name:1, // 是否是一证一票,0否1是, }, /** @@ -50,10 +53,13 @@ Page({ date:null, ticket_type:app.globalData.product.sku.ticket_type || 1, isCar:options.isCar, - is_need_idcard:app.globalData.product.sku.sku_model.is_need_idcard + is_need_idcard:app.globalData.product.sku.sku_model.is_need_idcard, + is_authentication:app.globalData.product.sku.sku_model.is_authentication, + is_real_name:app.globalData.product.sku.sku_model.is_real_name, }) console.log('-------',app.globalData.product.sku.sku_model.is_need_idcard); - console.log('---期票类型----',app.globalData.product.sku.ticket_type); + console.log('---是否实名----',app.globalData.product.sku.sku_model.is_authentication); + console.log('---一证一票----',app.globalData.product.sku.sku_model.is_real_name); if (!app.globalData.product) { util.back(); @@ -65,7 +71,7 @@ Page({ }) }else{ this.setData({ - productNum: app.globalData.product.num < 1 ? 1 : app.globalData.product.num + productNum: app.globalData.product.num == null ? 1 : app.globalData.product.num }) } this.setData({ @@ -127,21 +133,27 @@ Page({ }) }, setLinkman: function (e) { - let linkmanList = e.detail; - if (this.data.productNum != linkmanList.length && this.data.coupon) { - wx.showToast({ - title: '订单价格发生变化,请重新选择优惠券', - icon: 'none' + if (e.detail.phone) { + this.setData({ + phone:e.detail.phone }) - // if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) { - // this.couponCom.setNullCoupon() - // } - // app.globalData.couponInfo = null; - // this.setData({ - // coupon: null - // }) - } - let productNum = linkmanList.length == 0 ? 1 : this.data.productNum > linkmanList.length ? this.data.productNum : linkmanList.length; + }else { + console.log(e); + let linkmanList = e.detail; + if (this.data.productNum != linkmanList.length && this.data.coupon) { + wx.showToast({ + title: '订单价格发生变化,请重新选择优惠券', + icon: 'none' + }) + // if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) { + // this.couponCom.setNullCoupon() + // } + // app.globalData.couponInfo = null; + // this.setData({ + // coupon: null + // }) + } + let productNum = linkmanList.length == 0 ? 1 : this.data.productNum < linkmanList.length ? linkmanList.length : this.data.productNum; if (this.data.gp_id) { productNum = app.globalData.product.maxNum; } @@ -149,7 +161,9 @@ Page({ productNum: productNum, linkmanList: linkmanList }) - this.changePrice() + // this.changePrice() + this.totalPrice(this.data.singlePrice) + } }, add: function () { if (this.data.productNum==undefined) { @@ -190,7 +204,7 @@ Page({ }) } if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && !this.data.flag && this.data.type!='museum') { - this.couponCom.setNullCoupon() + // this.couponCom.setNullCoupon() } app.globalData.couponInfo = null; @@ -276,6 +290,13 @@ Page({ order:function() { let linkmanList = this.data.linkmanList, productNum = this.data.productNum, date = this.data.date, time = this.data.time, remark = this.data.remark, product = this.data.product; let linkmanIds = []; + if (linkmanList.length==0 && this.data.is_authentication == 1) { + wx.showToast({ + title: '请选择出行人', + icon: 'none' + }) + return + } linkmanList.map(item => { linkmanIds.push(item.id) }) @@ -291,12 +312,13 @@ Page({ use_date: date ? date.date : '', visitors: linkmanIds.join(","), remark: remark, - product_num: app.globalData.product.isGroup == 1 ? 1 : productNum + product_num: app.globalData.product.isGroup == 1 ? 1 : productNum, + phone:this.data.phone,// 不实名的时候传的手机号参数 }], originate_order_id: this.data.kjId, gp_id: app.globalData.gp_id, team_id: app.globalData.team_id, - linkmanList:this.data.linkmanList + linkmanList:this.data.is_authentication == 1?this.data.linkmanList:[] } if (app.globalData.from) { data.system_name = app.globalData.from; @@ -321,8 +343,14 @@ Page({ postData.type = 1; } if(app.globalData.list){ - app.globalData.list[app.globalData.index] = this.data.product - app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList + app.globalData.list[app.globalData.index] = this.data.product + // app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList + if (app.globalData.list[app.globalData.index].sku.sku_model.is_authentication == 0) { + app.globalData.list[app.globalData.index].phone = this.data.phone + app.globalData.list[app.globalData.index].linkmanList = [] + }else { + app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList + } } // app.globalData.linkmanList = this.data.linkmanList app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; @@ -331,8 +359,9 @@ Page({ if(app.globalData.createDate){ app.globalData.createDate.product_list.push(data.product_list[0]) }else{ - app.globalData.createDate = data + app.globalData.createDate = data } + console.log(app.globalData.createDate); app.globalData.index = app.globalData.index + 1 app.globalData.product = app.globalData.list[app.globalData.index] wx.redirectTo({ @@ -391,6 +420,20 @@ Page({ }) return } + if (linkmanList.length!=productNum && this.data.is_authentication == 1 && this.data.is_real_name == 1) { + wx.showToast({ + title: '购票数量要和出行人数量一致', + icon: 'none' + }) + return + } + if (!util.isTel(this.data.phone) &&this.data.is_authentication == 0) { + wx.showToast({ + title: '请输入正确的手机号', + icon: 'none' + }) + return + } if (!time && date && date.is_time_stock == true) { wx.showToast({ title: '请选择使用时间', @@ -405,6 +448,13 @@ Page({ }) return; } + // if (this.data.phone) { + // linkmanList.map(item => { + // linkmanIds.push(item.id) + // }) + // } + // console.log(app.globalData); + // debugger this.setData({ showMask:true }) diff --git a/pages/order/scene/index.wxml b/pages/order/scene/index.wxml index ae82641..cb558a8 100644 --- a/pages/order/scene/index.wxml +++ b/pages/order/scene/index.wxml @@ -21,7 +21,7 @@ - + @@ -64,7 +64,7 @@ {{product.product.title}}-{{product.sku.sku_name}} 出行人信息 - + 姓名: @@ -80,6 +80,12 @@ + + + 手机号: + {{phone}} + + 取消 diff --git a/pages/user/order/museumOrderInfo/index.js b/pages/user/order/museumOrderInfo/index.js index 582c3d3..a1c91a7 100644 --- a/pages/user/order/museumOrderInfo/index.js +++ b/pages/user/order/museumOrderInfo/index.js @@ -20,7 +20,9 @@ Page({ id:null, minute:"", second:"", - ids:[] + ids:[], + is_authentication:1, // 是否实名0否1是 + phone:'',// 非实名时的电话 }, /** @@ -207,8 +209,11 @@ Page({ isRefund:state.indexOf("REFUND")!=-1, info:res.data, product_model:res.data.order_product_list[0].product_model, - ids: proId.join(",") + ids: proId.join(","), + is_authentication:res.data.order_product_list[0].sku_model.is_authentication, + phone:res.data.order_product_list[0].phone }) + console.log(res.data.order_product_list[0]); this.getCodeImg() // 获取行程规划 let that = this; diff --git a/pages/user/order/museumOrderInfo/index.wxml b/pages/user/order/museumOrderInfo/index.wxml index be35fec..6fd5664 100644 --- a/pages/user/order/museumOrderInfo/index.wxml +++ b/pages/user/order/museumOrderInfo/index.wxml @@ -71,15 +71,22 @@ 出行人信息 - + - 姓名:{{item.name}} + 手机号:{{phone}} - - {{item.title}}:{{item.id_number}} - - - 手机号:{{item.tel}} + + + + + 姓名:{{item.name}} + + + {{item.title}}:{{item.id_number}} + + + 手机号:{{item.tel}} + diff --git a/pages/user/order/sceneOrderInfo/index.js b/pages/user/order/sceneOrderInfo/index.js index e16cd84..b15311c 100644 --- a/pages/user/order/sceneOrderInfo/index.js +++ b/pages/user/order/sceneOrderInfo/index.js @@ -285,6 +285,8 @@ Page({ product_model:"ticket"||res.data.order_product_list[0].product_model, ids: proId.join(",") }) + console.log(res.data); + // debugger console.log('ids',this.data.ids); this.getCodeImg() // 获取行程规划 diff --git a/pages/user/order/sceneOrderInfo/index.wxml b/pages/user/order/sceneOrderInfo/index.wxml index 4bccaf9..f80ffa2 100644 --- a/pages/user/order/sceneOrderInfo/index.wxml +++ b/pages/user/order/sceneOrderInfo/index.wxml @@ -88,20 +88,27 @@ 出行人信息 {{cxr1Text}} - - - - 姓名: {{item.name}} - - - - {{cardTypes[item.idcard_type]}}:{{item.id_number}} - - + - 手机号: {{item.tel}} - - + 手机号: {{item.phone}} + + + + + + + 姓名: {{item.name}} + + + + {{cardTypes[item.idcard_type]}}:{{item.id_number}} + + + + 手机号: {{item.tel}} + + +