Commit 79627ed6 authored by 潘永坪's avatar 潘永坪

湖广会馆购票须知修改,添加联系人bug处理

parent bc2709d5
...@@ -57,16 +57,16 @@ export default { ...@@ -57,16 +57,16 @@ export default {
urlQuery:'', urlQuery:'',
showKnow:false, showKnow:false,
openTime:'09:00 - 18:00,闭馆前1小时(17:00)停止售票',//开放时间 openTime:'09:00 - 18:00,闭馆前1小时(17:00)停止售票',//开放时间
merchantId:'',//商户Id
} }
}, },
onLoad(option) { onLoad(option) {
let channelId=option.channelId||'' let channelId=option.channelId||''
let companyId=option.companyId||'' let companyId=option.companyId||''
let merchantId=option.merchantId||''
let groupId=option.groupId||'' let groupId=option.groupId||''
let groupChannelId=option.groupChannelId||'' let groupChannelId=option.groupChannelId||''
this.urlQuery=channelId+'&merchantId='+merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId this.merchantId=option.merchantId||''
this.initDetail(merchantId) this.urlQuery=channelId+'&merchantId='+this.merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId
}, },
methods: { methods: {
//---购票 //---购票
...@@ -78,25 +78,26 @@ export default { ...@@ -78,25 +78,26 @@ export default {
//---购票须知 //---购票须知
goKnow(){ goKnow(){
this.showKnow=true this.showKnow=true
this.initDetail()
}, },
//---初始化详情 //---初始化详情
initDetail(merchantId){ initDetail(){
let data={ let data={
userId:uni.getStorageSync('userId')||'', userId:uni.getStorageSync('userId')||'',
openid:uni.getStorageSync('openid')||'', openid:uni.getStorageSync('openid')||'',
id:merchantId, id:this.merchantId,
isDetail:1,//商户详情 isDetail:1,//商户详情
} }
this.$request('scenic/user/merchant/findDetailInfo',data).then((res)=>{ this.$request('scenic/user/merchant/findDetailInfo',data).then((res)=>{
if(res.code=='00'){ if(res.code=='00'){
let data=res.data.merchantTitleData let data=res.data.merchantTitleData||[]
data.forEach(item => { data.forEach(item => {
if (item.titleCode == 'scenic_base_info') { if (item.titleCode == 'scenic_base_info') {
//基本信息 //基本信息
item.merchantChildTitleData.forEach(item2=> { item.merchantChildTitleData.forEach(item2=> {
if (item2.childTitleCode == '101001') { if (item2.childTitleCode == '101001') {
//开放时间 //开放时间
this.openTime = item2.contentList.content this.openTime = item2.contentList[0].content||'09:00 - 18:00,闭馆前1小时(17:00)停止售票'
} }
}) })
} }
......
...@@ -16,26 +16,26 @@ ...@@ -16,26 +16,26 @@
<view class="editBottom"> <view class="editBottom">
<view class="bottomContent"> <view class="bottomContent">
<view> <view>
<text> <text class="bottom-title">
姓名: 姓名:
</text> </text>
<input v-model.trim="name" placeholder="请输入姓名,必填" /> <input v-model.trim="name" placeholder="请输入姓名,必填" />
</view> </view>
<view> <view>
<text> <text class="bottom-title">
身份证: 身份证:
</text> </text>
<input v-model.trim="credentialNumber" maxlength="18" placeholder="请输入身份证号码,必填" /> <input v-model.trim="credentialNumber" maxlength="18" placeholder="请输入身份证号码,必填" />
</view> </view>
<view> <view>
<text> <text class="bottom-title">
联系电话: 联系电话:
</text> </text>
<input type="number" v-model.trim="phone" maxlength="11" placeholder="用于接收行程信息" /> <input type="number" v-model.trim="phone" maxlength="11" placeholder="用于接收行程信息" />
</view> </view>
<view> <view>
<a class="complete" @click="keepSave()">完成</a> <text class="complete" @click="keepSave()">完成</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -70,6 +70,20 @@ export default { ...@@ -70,6 +70,20 @@ export default {
methods: { methods: {
//---保存 //---保存
keepSave() { keepSave() {
if(!this.name){
uni.showToast({
title:'请输入姓名',
icon:'none'
})
return
}
if(!this.credentialNumber){
uni.showToast({
title:'请输入证件号码',
icon:'none'
})
return
}
if (this.phone&&!this.$commonjs.phoneReg().test(this.phone)) { if (this.phone&&!this.$commonjs.phoneReg().test(this.phone)) {
uni.showToast({ uni.showToast({
title:'请输入正确电话号码', title:'请输入正确电话号码',
...@@ -77,6 +91,7 @@ export default { ...@@ -77,6 +91,7 @@ export default {
}) })
return return
} }
let data = { let data = {
name: this.name, //保存姓名 name: this.name, //保存姓名
phone:this.phone, //电话号码 phone:this.phone, //电话号码
...@@ -179,7 +194,7 @@ export default { ...@@ -179,7 +194,7 @@ export default {
display: flex; display: flex;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
} }
.bottomContent view text { .bottom-title{
display: inline-block; display: inline-block;
width: 140rpx; width: 140rpx;
text-align-last: justify; text-align-last: justify;
......
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