Commit 8c4345ab authored by youjie's avatar youjie

no message

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