时区搜索

This commit is contained in:
luyuan 2020-11-02 10:10:25 +08:00
parent 39fa3b0801
commit 05e2e2df34
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -51,7 +51,6 @@
size="small" size="small"
ref="select" ref="select"
show-search show-search
@change="selguojia"
:getPopupContainer=" :getPopupContainer="
(triggerNode) => triggerNode.parentNode (triggerNode) => triggerNode.parentNode
" "
@ -59,7 +58,7 @@
<a-select-option <a-select-option
v-for="(item, index) in chiveslist[0]" v-for="(item, index) in chiveslist[0]"
:key="index" :key="index"
:value="item.id" :value="item.name"
> >
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
@ -253,7 +252,7 @@
<div class="input-box time-zone-box"> <div class="input-box time-zone-box">
<div class="label">{{ lan.$t("shiqu") }}</div> <div class="label">{{ lan.$t("shiqu") }}</div>
<a-select <a-select
v-model:value="userinfo.zoneid" v-model:value="userinfo.zoneStr"
style="width: 171px" style="width: 171px"
size="small" size="small"
ref="select" ref="select"
@ -265,7 +264,7 @@
<a-select-option <a-select-option
v-for="(item, index) in zonelist" v-for="(item, index) in zonelist"
:key="index" :key="index"
:value="item.zoneid" :value="item.city + item.gmt"
> >
{{ item.city }}{{ item.gmt }} {{ item.city }}{{ item.gmt }}
</a-select-option> </a-select-option>
@ -831,6 +830,17 @@ export default defineComponent({
// uesrinfo.currency = currencylist.value[i].value; // uesrinfo.currency = currencylist.value[i].value;
// } // }
// } // }
for(const i in chiveslist.value[0]){
if(chiveslist.value[0][i].name == uesrinfo.country){
uesrinfo.countryValue = chiveslist.value[0][i].id
}
}
for(const i in zonelist.value){
if((zonelist.value[i].city + zonelist.value[i].gmt) == uesrinfo.zoneStr){
uesrinfo.zoneid = zonelist.value[i].zoneid
}
console.log(zonelist.value[i].city + zonelist.value[i].gmt, uesrinfo.zoneStr)
}
if (reg.test(userinfo.value.email)) { if (reg.test(userinfo.value.email)) {
putmember(uesrinfo); putmember(uesrinfo);
} else { } else {
@ -894,10 +904,10 @@ export default defineComponent({
// picinfo.url=res.video.url // picinfo.url=res.video.url
formData.value.img = res.video.url; formData.value.img = res.video.url;
} }
function selguojia(e: any){ // function selguojia(e: any){
userinfo.value.countryValue = e; // userinfo.value.countryValue = e;
console.log(e) // console.log(e)
} // }
return { return {
modalNode, modalNode,
@ -940,7 +950,6 @@ export default defineComponent({
showname, showname,
uploadspic, uploadspic,
lan, lan,
selguojia
}; };
}, },
}); });