Commit c41add9f authored by 沈良进's avatar 沈良进

首页,个人中心页优化

parent 7c83e4aa
...@@ -55,6 +55,7 @@ export default { ...@@ -55,6 +55,7 @@ export default {
}, },
watch: { watch: {
value: function() { value: function() {
console.log('switch change', this.value)
this.inputSelect = this.value this.inputSelect = this.value
} }
}, },
......
<<<<<<< HEAD
=======
>>>>>>> c020ad40be0c4ddc009c7e515bf5c6c1ac25638c
<style scoped> <style scoped>
.header-box { .header-box {
max-width: 1200px; max-width: 1200px;
...@@ -107,6 +103,9 @@ ...@@ -107,6 +103,9 @@
.address-btn { .address-btn {
margin: 0 10px 0 44px; margin: 0 10px 0 44px;
} }
.address-btn:hover {
background: #F5F5F5;
}
.all-type { .all-type {
margin-left: 10px; margin-left: 10px;
} }
...@@ -162,6 +161,10 @@ ...@@ -162,6 +161,10 @@
.category-btn { .category-btn {
width: 100px; width: 100px;
} }
.category-icon {
width: 16px;
height: 16px;
}
</style> </style>
<template> <template>
<div> <div>
...@@ -286,6 +289,7 @@ ...@@ -286,6 +289,7 @@
:key="i" :key="i"
v-for="(x, i) in dataList.CategoryList" v-for="(x, i) in dataList.CategoryList"
> >
<img class="category-icon" :src="require(`../../assets/img/home/${['guanguang','jindian','hotel','car'][i]}.png`)"/>
{{ x.CategoryName }} {{ x.CategoryName }}
</div> </div>
</div> </div>
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
min-height: 40px; min-height: 40px;
} }
.title { .title {
margin-top: 20px;
margin-bottom: 10px; margin-bottom: 10px;
margin-left: 10px; margin-left: 10px;
} }
...@@ -113,7 +112,7 @@ ...@@ -113,7 +112,7 @@
<div class="f22 bold">{{form.Id ? '编辑': '添加'}}邮寄地址</div> <div class="f22 bold">{{form.Id ? '编辑': '添加'}}邮寄地址</div>
<form @submit.prevent.stop="submit" class="q-gutter-md"> <form @submit.prevent.stop="submit" class="q-gutter-md">
<div> <div>
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'"> <div class="q-mt-xl" :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col"> <div class="col">
<div class="title">全名</div> <div class="title">全名</div>
<q-input <q-input
...@@ -171,6 +170,7 @@ ...@@ -171,6 +170,7 @@
v-model="form.Mobile" v-model="form.Mobile"
outlined outlined
:rules="[(val) => !!val || '请输入手機號碼']" :rules="[(val) => !!val || '请输入手機號碼']"
mask="#" reverse-fill-mask
> >
<template v-slot:prepend> <template v-slot:prepend>
<div class="text-subtitle2"> <div class="text-subtitle2">
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
placeholder="城市" placeholder="城市"
v-model="form.CityName" v-model="form.CityName"
outlined outlined
:rules="[(val) => !!val || '请输入電話(首次需驗證)']" :rules="[(val) => !!val || '请输入城市']"
></q-input> ></q-input>
</div> </div>
</div> </div>
...@@ -205,6 +205,7 @@ ...@@ -205,6 +205,7 @@
<div class="col"> <div class="col">
<div class="title">郵政編碼</div> <div class="title">郵政編碼</div>
<q-input <q-input
mask="#" reverse-fill-mask
ref="PostalCode" ref="PostalCode"
class="form-item" class="form-item"
placeholder="郵政編碼" placeholder="郵政編碼"
...@@ -214,8 +215,8 @@ ...@@ -214,8 +215,8 @@
></q-input> ></q-input>
</div> </div>
</div> </div>
<div class="flex items-center q-my-sm"> <div class="flex items-center q-mb-lg">
<BaseSwitch v-model="form.IsDefault"></BaseSwitch <BaseSwitch ref="switch" v-model="form.IsDefault" :value="form.IsDefault"></BaseSwitch
><span class="q-ml-sm">保存為默認地址</span></div> ><span class="q-ml-sm">保存為默認地址</span></div>
<div> <div>
<q-btn color="primary" type="submit" unelevated label="保存" /> <q-btn color="primary" type="submit" unelevated label="保存" />
...@@ -353,6 +354,11 @@ export default { ...@@ -353,6 +354,11 @@ export default {
this.form = {...item}; this.form = {...item};
this.form.AreaCode = Number(this.form.AreaCode) this.form.AreaCode = Number(this.form.AreaCode)
this.form.IsDefault = this.form.IsDefault === 1 this.form.IsDefault = this.form.IsDefault === 1
this.$nextTick(() => {
this.$refs.switch.inputSelect = this.form.IsDefault
})
console.log('this.form.IsDefault', this.form.IsDefault)
this.isShowDialog = true; this.isShowDialog = true;
}, },
deleteUser(item) { deleteUser(item) {
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<q-btn color="primary" class="q-mt-sm" @click="removeAccount">删除您的帐户及个人数据</q-btn> <q-btn color="primary" class="q-mt-sm" @click="removeAccount">删除您的帐户及个人数据</q-btn>
</div> </div>
</div> </div>
<q-dialog content-style="width: 900px" v-model="showRemove"> <q-dialog v-model="showRemove">
<removeAccount></removeAccount> <removeAccount></removeAccount>
</q-dialog> </q-dialog>
</div> </div>
...@@ -272,6 +272,10 @@ export default { ...@@ -272,6 +272,10 @@ export default {
this.form, this.form,
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.form= {
OldPassword: "",
NewPassword: "",
}
// this.$notify(res.data.message); // this.$notify(res.data.message);
this.$q.notify({ this.$q.notify({
type: "positive", type: "positive",
......
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
Appellation: "", Appellation: "",
EnName: "", EnName: "",
EnSurname: "", EnSurname: "",
Country: "", Country: undefined,
Moblie: "", Moblie: "",
}, },
model: "", model: "",
...@@ -297,6 +297,12 @@ export default { ...@@ -297,6 +297,12 @@ export default {
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.form = res.data.data; this.form = res.data.data;
if(!this.form.Country) {
this.form.Country = undefined
}
if(!this.form.Appellation) {
this.form.Appellation = undefined
}
if (this.phoneCountList.length) { if (this.phoneCountList.length) {
this.changeCountry(this.form.Country); this.changeCountry(this.form.Country);
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
width: 900px; width: 900px;
} }
.title { .title {
margin: 20px 10px 10px 10px; margin: 0 10px 10px 10px;
} }
.card { .card {
margin: 10px; margin: 10px;
...@@ -39,10 +39,8 @@ ...@@ -39,10 +39,8 @@
::v-deep .q-field__marginal { ::v-deep .q-field__marginal {
height: 40px; height: 40px;
} }
.title { ::v-deep .q-field--auto-height .q-field__native {
margin-top: 20px; min-height: 40px;
margin-bottom: 10px;
margin-left: 10px;
} }
.phone { .phone {
margin-left: 100px; margin-left: 100px;
...@@ -77,6 +75,7 @@ ...@@ -77,6 +75,7 @@
.card-info { .card-info {
height: 20px; height: 20px;
padding: 0 4px; padding: 0 4px;
margin: 0 0 20px 0;
background: #dddddd; background: #dddddd;
border-radius: 8px; border-radius: 8px;
} }
...@@ -87,8 +86,8 @@ ...@@ -87,8 +86,8 @@
<div class="card" v-for="item in pageData" :key="item.id"> <div class="card" v-for="item in pageData" :key="item.id">
<div class="flex card-title justify-between"> <div class="flex card-title justify-between">
<div class="flex"> <div class="flex">
<span>{{ item.Name }}</span> <span>{{item.SurName}} {{ item.Name }}</span>
<span v-if="$q.platform.is.desktop" class="phone">手機號:{{ item.Mobile }}</span> <span v-if="$q.platform.is.desktop" class="phone">手機號:+{{ item.AreaCode }} {{ item.Mobile }}</span>
</div> </div>
<span> <span>
<span class="user-edit" @click="editUser(item)">编辑</span> <span class="user-edit" @click="editUser(item)">编辑</span>
...@@ -97,18 +96,18 @@ ...@@ -97,18 +96,18 @@
> >
</span> </span>
</div> </div>
<div class="q-pa-sm"> <div class="q-pa-sm q-ml-sm">
<span class="q-ml-sm" v-if="$q.platform.is.mobile">手機號:{{ item.Mobile }}</span> <span v-if="$q.platform.is.mobile">手機號:{{ item.Mobile }}</span>
<div class="q-pa-sm full-width" <div :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col-6 q-py-sm"
:class="{ 'border-b': index < item.CardList.length - 1 }" :class="{ 'border-b': index < item.CardList.length - 1 }"
v-for="(el, index) in item.CardList" v-for="(el, index) in item.CardList"
:key="index" :key="index"
> >
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'"> <div>{{ el.TypeName }}:{{ el.CardNo }}</div>
<div class="col-6">{{ el.TypeName }}</div>
<div class="col-6" :class="$q.platform.is.mobile ? 'q-mt-xs': ''">{{ el.CardNo }}</div>
</div>
</div> </div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -144,7 +143,7 @@ ...@@ -144,7 +143,7 @@
<form @submit.prevent.stop="submit" class="q-gutter-md"> <form @submit.prevent.stop="submit" class="q-gutter-md">
<div> <div>
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'"> <div :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col"> <div class="col q-mt-md">
<div class="title"></div> <div class="title"></div>
<q-input <q-input
class="form-item" class="form-item"
...@@ -167,23 +166,23 @@ ...@@ -167,23 +166,23 @@
</div> </div>
<div :class="$q.platform.is.desktop ? 'row': 'culmuns'"> <div :class="$q.platform.is.desktop ? 'row': 'culmuns'">
<div class="col"> <div class="col">
<div class="title">姓氏(需與旅遊證件一致</div> <div class="title">姓氏(请输入英文字母</div>
<q-input <q-input
class="form-item" class="form-item"
v-model="form.EnName" v-model="form.EnName"
outlined outlined
ref="EnName" ref="EnName"
:rules="[(val) => !!val || '请输入姓氏(需與旅遊證件一致)']" :rules="[(val) => !!val || '请输入姓氏(请输入英文字母)']"
></q-input> ></q-input>
</div> </div>
<div class="col"> <div class="col">
<div class="title">名字(需與旅遊證件一致</div> <div class="title">名字(请输入英文字母</div>
<q-input <q-input
ref="EnSurName" ref="EnSurName"
class="form-item" class="form-item"
v-model="form.EnSurName" v-model="form.EnSurName"
outlined outlined
:rules="[(val) => !!val || '请输入名字(需與旅遊證件一致)']" :rules="[(val) => !!val || '请输入名字(请输入英文字母)']"
></q-input> ></q-input>
</div> </div>
</div> </div>
......
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