Commit c21784bf authored by youjie's avatar youjie

线路支付

parent 02ed8eee
<style>
<style scoped>
@import url("@/asset/css/flex.css");
.jz_Reserve {
padding-bottom: 180rpx;
background-color: #fff;
......@@ -99,7 +100,7 @@
}
.jz_form {
margin-top: 60rpx;
margin-top: 40rpx;
padding: 0 45rpx;
}
......@@ -123,6 +124,7 @@
margin-right: 60rpx;
flex-shrink: 0;
width: 115rpx;
text-align: right;
}
.jz_form .form-items .val {
......@@ -267,6 +269,21 @@
margin: 25rpx;
padding: 20rpx;
}
.visaProduct_rColor{
color: #FF3166;
}
.visaProductTitle{
font-weight: 800;
font-size: 32rpx;
}
.visaProductTextR{
font-size: 20rpx;
margin-left: 24rpx;
}
.visaProductTextL{
font-size: 35rpx;
font-weight: bold;
}
</style>
<template>
......@@ -301,26 +318,38 @@
<img src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zuanshi.png" />即时确认:本产品付款后可快速确认,放心期待您的旅行
</view>
</view>
<view class="column jz_form">
<view class="form-items">
<view class="label"></view>
<view class="val">
<input type="text" v-model="orderMsg.SurName" placeholder="请输入姓" />
<!-- #ifdef MP-DI -->
<view class="column jz_form">
<view class="row" style="margin-bottom: 40rpx;">
<view class="visaProduct_rColor visaProductTextL">*</view>
<view class="visaProductTitle">联系信息</view>
</view>
</view>
<view class="form-items">
<view class="label"></view>
<view class="val">
<input type="text" v-model="customer.name" placeholder="请输入名" />
<view class="form-items">
<view class="label"></view>
<view class="val">
<input type="text" v-model="customer.SurName" placeholder="输入姓" />
</view>
</view>
</view>
<view class="form-items">
<view class="label">联系电话</view>
<view class="val">
<input type="text" v-model="customer.contactNumber" placeholder="输入电话号码" />
<view class="form-items">
<view class="label"></view>
<view class="val">
<input type="text" v-model="customer.name" placeholder="输入名" />
</view>
</view>
<view class="form-items">
<view class="label">联系电话</view>
<view class="val">
<input type="text" v-model="customer.contactNumber" placeholder="输入电话号码" />
</view>
</view>
<view class="form-items">
<view class="label">邮箱地址</view>
<view class="val">
<input type="text" v-model="customer.Mailbox" placeholder="输入邮箱地址" />
</view>
</view>
</view>
</view>
<!-- #endif -->
<view>
<textarea class="jz_TextArea" placeholder="请输入备注信息" v-model="Remarks"></textarea>
</view>
......@@ -575,7 +604,11 @@
this.activeStyle = `background:${this.mainColor};`;
},
onLoad(option) {
this.customer = uni.getStorageSync("b2b_user");
this.customer = {
SurName: '',
Mailbox: '',
...uni.getStorageSync("b2b_user")
};
if (option.currentPriceInfo) {
this.currentPriceInfo = JSON.parse(
decodeURIComponent(option.currentPriceInfo)
......@@ -633,10 +666,10 @@
}
let startCityName = this.realCurrentPriceInfo.priceUnion && this.realCurrentPriceInfo.priceUnion.startCityName?this.realCurrentPriceInfo.priceUnion.startCityName:this.currentPriceInfo.startCityName
let msg = {
SurName: '',
SurName: this.customer.SurName,
Name: this.customer.name,
ContactNumber: this.customer.contactNumber,
Mailbox: '',
Mailbox: this.customer.Mailbox,
GoodsId: this.currentPriceInfo.tcid,
GoodsName: this.currentPriceInfo.title,
GoodsPic: this.currentPriceInfo.CoverImg? this.currentPriceInfo.CoverImg : '',
......@@ -653,7 +686,7 @@
};
this.apipost("AddOrderInfo_post", msg, (res) => {
if (res.resultCode == 1) {
this.orderInfo = res.data
this.orderInfo =JSON.parse(res.data)
console.log(this.orderInfo,'----orderInfo');
uni.showToast({
icon: 'none',
......@@ -957,8 +990,40 @@
this.GuestList.push(obj);
}
},
validate(){
let email = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/
let msg = ''
if(this.customer.SurName==''||!this.customer.SurName){
msg = '请输入姓'
} else if(this.customer.name==''||!this.customer.name){
msg = '请输入名'
} else if(this.customer.contactNumber==''||!this.customer.name){
msg = '请输入联系电话'
} else if(this.customer.contactNumber&&this.customer.contactNumber.length!=11){
msg = '请输入正确的电话号码'
}else if(this.customer.Mailbox==''||!this.customer.Mailbox){
uni.showToast({
title: `请输入邮箱地址`,
icon: "none",
});
}else if (!email.test(this.customer.Mailbox)) {
uni.showToast({
title: `请输入正确的邮箱地址`,
icon: "none",
});
}
return msg
},
//去支付
goPay() {
const error = this.validate()
if(error!=''){
uni.showToast({
icon:'none',
title:error
})
return
}
this.submit = true;
this.userInfo = uni.getStorageSync("mall_UserInfo");
this.basedataObj = uni.getStorageSync("basedata").mall;
......
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