Commit 8c4345ab authored by youjie's avatar youjie

no message

parent 07f80a74
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="row q-col-gutter-md"> <div class="row q-col-gutter-md">
<div :class="filedWidth"> <div :class="filedWidth">
<q-select <q-select
v-model="userInfo.country" v-model="userInfo.Country"
@input="changeCountry" @input="changeCountry"
:options="countrys" :options="countrys"
emit-value emit-value
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<div :class="filedWidth"> <div :class="filedWidth">
<q-input <q-input
standout standout
v-model="userInfo.mail" v-model="userInfo.Mailbox"
label="郵箱地址" label="郵箱地址"
:rules="[(val) => /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(val) || '請輸入正確的郵箱地址']" :rules="[(val) => /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(val) || '請輸入正確的郵箱地址']"
ref="mail" ref="mail"
...@@ -574,9 +574,9 @@ export default { ...@@ -574,9 +574,9 @@ export default {
OrderDate: null,//接收产品相关信息 OrderDate: null,//接收产品相关信息
step: 1, step: 1,
userInfo: { userInfo: {
country: 0, Country: 0,
areaCode: "", areaCode: "",
mail: "", Mailbox: "",
}, },
chosenObj: {}, chosenObj: {},
countrys: [], countrys: [],
...@@ -636,8 +636,9 @@ export default { ...@@ -636,8 +636,9 @@ export default {
if(this.checkParamsHandler()){ if(this.checkParamsHandler()){
this.getCarData() this.getCarData()
} }
this.initCountry();
this.initGuestHandler(); this.initGuestHandler();
this.getUserInfoHandler()
}, },
methods: { methods: {
// 获取商品详情 // 获取商品详情
...@@ -773,7 +774,7 @@ export default { ...@@ -773,7 +774,7 @@ export default {
SurName: this.parameters.SurName, SurName: this.parameters.SurName,
Name: this.parameters.Name, Name: this.parameters.Name,
ContactNumber: this.parameters.Mobile,// 联系电话 ContactNumber: this.parameters.Mobile,// 联系电话
Mailbox: this.userInfo.mail,//邮箱 Mailbox: this.userInfo.Mailbox,//邮箱
GoodsId: this.parameters.ProductId,//商品id GoodsId: this.parameters.ProductId,//商品id
GoodsName: this.details.Name,//商品名称 GoodsName: this.details.Name,//商品名称
GoodsPic: this.details.ImageList[0],//商品图片 GoodsPic: this.details.ImageList[0],//商品图片
...@@ -782,7 +783,7 @@ export default { ...@@ -782,7 +783,7 @@ export default {
TotalPrice: this.parameters.Money,//总价格 TotalPrice: this.parameters.Money,//总价格
PreferentialPrice: 0,// 优惠总金额 PreferentialPrice: 0,// 优惠总金额
ErpOrderId: ErpOrderId,//erp订单id ErpOrderId: ErpOrderId,//erp订单id
Country: this.userInfo.country,//国家id Country: this.userInfo.Country,//国家id
PlatformTax: 0,//平台税金默认0 PlatformTax: 0,//平台税金默认0
Income: 0,//已收默认0 Income: 0,//已收默认0
Refund: 0,//退款金额默认0 Refund: 0,//退款金额默认0
...@@ -870,16 +871,30 @@ export default { ...@@ -870,16 +871,30 @@ export default {
}, },
initGuestHandler() { initGuestHandler() {
},
// 获取当前用户信息
getUserInfoHandler() {
let u = this.$user.userInfo;
if (u) {
this.apipost("GetCustomerInfo_post", { Id: u.id }, (r) => {
if (r.data.resultCode == 1) {
this.userInfo = r.data.data;
this.initCountry();
} else {
this.$user.userInfo = null;
}
});
}
}, },
// 初始化国家 // 初始化国家
initCountry() { initCountry() {
this.apipost("GetCountryInfo_post", {}, (r) => { this.apipost("GetCountryInfo_post", {}, (r) => {
if (r.data.resultCode == 1) { if (r.data.resultCode == 1) {
this.countrys = r.data.data.countList; this.countrys = r.data.data.countList;
this.userInfo.country = this.countrys[0].ID; this.userInfo.Country = this.countrys[0].ID;
this.areaCodes = r.data.data.phoneCountList; this.areaCodes = r.data.data.phoneCountList;
this.changeCountry(this.userInfo.country); this.changeCountry(this.userInfo.Country);
this.areaCodes.forEach((x) => { this.areaCodes.forEach((x) => {
let temp = this.countrys.find((y) => y.ID == x.ID); let temp = this.countrys.find((y) => y.ID == x.ID);
x.EnName = `${temp.EnName}(${x.PhoneCode})`; x.EnName = `${temp.EnName}(${x.PhoneCode})`;
......
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