Commit 311ed0b4 authored by 沈良进's avatar 沈良进

Merge branch 'master' of http://gitlab.oytour.com/viitto/million

parents 0b5a6f33 6e75d913
const product = {
/**
* 生成產品詳情地址
* @param {*} productInfo 產品信息(必須包含Id和ProductType)
*/
genernalUrl(productInfo) {
let t = productInfo.productType ? productInfo.productType : productInfo.ProductType;
let configId = productInfo.configId ? productInfo.configId : productInfo.ConfigId;
let url = ''
if (t && configId) {
if (t === 4) {
// 接送机,包车
url = "/detailCar/" + configId
} else if (t === 3) {
url = "/detailHotal/" + configId
} else if (t === 2) {
url = "/detailsScenicSpotTicket/" + configId
} else if (t === 1) {
url = "/detail/" + encodeURIComponent(item.id) + "/" + 0 + "/" + configId
} else if (t === 5) {
url = "/hotel/" + configId
}
} else {
throw new Error("參數不合法");
}
return url
},
};
export default product
\ No newline at end of file
...@@ -6,6 +6,7 @@ import VueCoreVideoPlayer from 'vue-core-video-players' ...@@ -6,6 +6,7 @@ import VueCoreVideoPlayer from 'vue-core-video-players'
import 'viewerjs/dist/viewer.css' import 'viewerjs/dist/viewer.css'
import user from './user' import user from './user'
import message from './message' import message from './message'
import product from './product'
import VueViewer from 'v-viewer' import VueViewer from 'v-viewer'
// import VueCoreVideoPlayer from 'vue-core-video-player' // import VueCoreVideoPlayer from 'vue-core-video-player'
Vue.prototype.$EventBus = new Vue() Vue.prototype.$EventBus = new Vue()
...@@ -13,6 +14,7 @@ Vue.use(VueCoreVideoPlayer) ...@@ -13,6 +14,7 @@ Vue.use(VueCoreVideoPlayer)
Vue.use(VueViewer) Vue.use(VueViewer)
Vue.prototype.$md5 = md5; Vue.prototype.$md5 = md5;
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$product = product
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function() { Vue.prototype.domainManager = function() {
let domainUrl = ''; let domainUrl = '';
...@@ -195,8 +197,9 @@ Vue.prototype.OpenNewUrl = function(URL) { ...@@ -195,8 +197,9 @@ Vue.prototype.OpenNewUrl = function(URL) {
//公用跳转 //公用跳转
Vue.prototype.CommonJump = function(path, obj) { Vue.prototype.CommonJump = function(path, obj) {
let p = typeof(path) == 'string' ? path : this.$product.genernalUrl(path)
this.$router.push({ this.$router.push({
path: path, path: p,
query: obj query: obj
}); });
} }
......
...@@ -162,6 +162,7 @@ export default { ...@@ -162,6 +162,7 @@ export default {
takeList:[ takeList:[
{Name:'自行取票',Id:1}, {Name:'自行取票',Id:1},
{Name:'邮寄票券',Id:2}, {Name:'邮寄票券',Id:2},
{Name:'电子券',Id:4},
], ],
MailingStateObj: null, MailingStateObj: null,
}; };
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{{ formatEnum(product.ProductType) }} {{ formatEnum(product.ProductType) }}
</div> </div>
</q-img> </q-img>
<div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height: 74px;">{{ product.Title }}</div> <div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height: 74px;" @click="CommonJump(product,{})">{{ product.Title }}</div>
<div class="text-subtitle2 text-weight-bolder text-dark q-mx-md"> <div class="text-subtitle2 text-weight-bolder text-dark q-mx-md">
<span>CNY {{moneyFormat(product.B2CPrice,2)}}</span> <span>CNY {{moneyFormat(product.B2CPrice,2)}}</span>
<span class="f12 q-ml-sm"></span> <span class="f12 q-ml-sm"></span>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
</q-img> </q-img>
<div class="q-px-md col"> <div class="q-px-md col">
<div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height:50px;">{{ product.Title }}</div> <div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height:50px;" @click="CommonJump(product,{})">{{ product.Title }}</div>
<div class="text-subtitle2 text-weight-bolder text-dark q-mx-md"> <div class="text-subtitle2 text-weight-bolder text-dark q-mx-md">
<span>CNY {{moneyFormat(product.B2CPrice,2)}}</span> <span>CNY {{moneyFormat(product.B2CPrice,2)}}</span>
<span class="f12 q-ml-sm"></span> <span class="f12 q-ml-sm"></span>
......
...@@ -733,29 +733,7 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id)) ...@@ -733,29 +733,7 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id))
// this.msg.dayNumList = arr; // this.msg.dayNumList = arr;
}, },
GotoDetails(item) { GotoDetails(item) {
if(item.productType === 4) { // 接送机,包车 this.CommonJump(item,{});
this.CommonJump(
"/detailCar/"+item.configId,
{}
);
return
}else if(item.productType === 3) { // 住宿
this.CommonJump(
"/detailHotal/"+item.configId,
{}
);
return
}else if(item.productType === 2) { // 景区门票
this.CommonJump(
"/detailsScenicSpotTicket/"+item.configId,
{}
);
return
}
this.CommonJump(
"/detail/" + encodeURIComponent(item.id) + "/" + item.tcid + "/" + item.configId,
{}
);
}, },
}, },
}; };
......
...@@ -127,9 +127,12 @@ ...@@ -127,9 +127,12 @@
<div v-if="parameters.MailingState==1" class="rounded-borders bg-blue-1 q-px-lg q-py-sm q-mt-sm"> <div v-if="parameters.MailingState==1" class="rounded-borders bg-blue-1 q-px-lg q-py-sm q-mt-sm">
自取地址:{{parameters.SelffetchAddress}} 自取地址:{{parameters.SelffetchAddress}}
</div> </div>
<div v-if="parameters.MailingState==4" class="rounded-borders bg-blue-1 q-px-lg q-py-sm q-mt-sm">
电子券
</div>
<q-separator color="grey-2" class="q-mt-md" /> <q-separator color="grey-2" class="q-mt-md" />
<div <div v-if="parameters.MailingState!=4"
class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item" class="bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
> >
<div class="text-subtitle1 q-pb-md text-weight-bold"></div> <div class="text-subtitle1 q-pb-md text-weight-bold"></div>
...@@ -171,7 +174,7 @@ ...@@ -171,7 +174,7 @@
</template> </template>
</q-input> </q-input>
</div> </div>
<div :class="filedGuestWidth"> <div :class="filedGuestWidth" v-if="parameters.MailingState==2">
<q-input <q-input
standout standout
v-model="parameters.MailingAddress" v-model="parameters.MailingAddress"
...@@ -367,6 +370,8 @@ ...@@ -367,6 +370,8 @@
Country: 0, Country: 0,
areaCode: "", areaCode: "",
Mailbox: "", Mailbox: "",
Mobile: "",
FullName: ""
}, },
countrys: [], countrys: [],
areaCodes: [], areaCodes: [],
...@@ -506,17 +511,19 @@ ...@@ -506,17 +511,19 @@
}, },
async submit() { async submit() {
this.$refs.mail.validate() this.$refs.mail.validate()
if(this.parameters.MailingState!=4){
this.$refs.SurName.validate() this.$refs.SurName.validate()
this.$refs.Name.validate() this.$refs.Name.validate()
this.$refs.Mobile.validate() this.$refs.Mobile.validate()
}
if(this.parameters.MailingState==2){ if(this.parameters.MailingState==2){
this.$refs.MailingAddress.validate() this.$refs.MailingAddress.validate()
}else{ }else{
this.parameters.MailingAddress = '' this.parameters.MailingAddress = ''
this.parameters.MailingMoney = 0
} }
console.log(this.parameters,'----')
let flag = true let flag = true
flag = await this.formValidateHandler('baseUserInfo') flag = await this.formValidateHandler('baseUserInfo')
if(!flag){ if(!flag){
...@@ -551,9 +558,9 @@ ...@@ -551,9 +558,9 @@
this.apipost( this.apipost(
"AddOrderInfo_post", "AddOrderInfo_post",
{ {
SurName: this.parameters.Name, SurName: this.parameters.Name?this.parameters.Name:this.userInfo.FullName,
Name: '', Name: '',
ContactNumber: this.parameters.Mobile,// 联系电话 ContactNumber: this.userInfo.Mobile,// 联系电话
Mailbox: this.userInfo.Mailbox,//邮箱 Mailbox: this.userInfo.Mailbox,//邮箱
GoodsId: this.parameters.CouponsId,//商品id GoodsId: this.parameters.CouponsId,//商品id
GoodsName: this.details.Name,//商品名称 GoodsName: this.details.Name,//商品名称
...@@ -626,7 +633,10 @@ ...@@ -626,7 +633,10 @@
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
this.userInfo = r.data.data; this.userInfo = r.data.data;
if(r.data.data.Moblie){ if(r.data.data.Moblie){
this.parameters.Mobile = r.data.data.Moblie if(this.parameters.MailingState!=4){
this.parameters.Mobile = r.data.data.Moblie
}
this.userInfo.Mobile = r.data.data.Moblie
} }
} else { } else {
this.$user.userInfo = null; this.$user.userInfo = null;
......
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