zj #81

Merged
asd merged 2 commits from zj into master 2020-10-26 12:02:08 +08:00
2 changed files with 23 additions and 9 deletions

View File

@ -728,7 +728,7 @@ export async function putmember(data: any): Promise<any>{
willsay: JSON.stringify(data.willsayValue), willsay: JSON.stringify(data.willsayValue),
birthday: data.birthday, birthday: data.birthday,
zoneid: data.zoneid, zoneid: data.zoneid,
currency: parseInt(data.currency), currency: data.currency,
language: data.languageValue, language: data.languageValue,
tlanguage: data.tlanguageValue, tlanguage: data.tlanguageValue,
video: data.video, video: data.video,

View File

@ -167,7 +167,7 @@
ref="select" ref="select"
:getPopupContainer="triggerNode => triggerNode.parentNode" :getPopupContainer="triggerNode => triggerNode.parentNode"
@change="currencychange" @change="currencychange"
:defaultValue="currencyindex" v-model:value="currencyindex"
> >
<a-select-option v-for="(item, index) in currencylist" :key="index" :value="item.value"> <a-select-option v-for="(item, index) in currencylist" :key="index" :value="item.value">
{{item.name}} {{item.name}}
@ -309,9 +309,14 @@ export default defineComponent({
}]; }];
const userinfo = computed(() => {return store.state.userinfo}) const userinfo = computed(() => {return store.state.userinfo})
// //
const currencyindex=ref<string>(userinfo.value.currencyValue)
const formData = ref(toRaw(userinfo.value)); const formData = ref(toRaw(userinfo.value));
watch(userinfo,() => { watch(userinfo,() => {
formData.value = toRaw(userinfo.value); formData.value = toRaw(userinfo.value);
console.log(userinfo.value.currencyValue,"listsssss")
currencyindex.value=userinfo.value.currencyValue
console.log(currencyindex.value,"listsssss")
}) })
const modalNode = () => document.getElementsByClassName('modal-container')[0] const modalNode = () => document.getElementsByClassName('modal-container')[0]
@ -321,7 +326,8 @@ export default defineComponent({
const myquhao = ref<string>(""); const myquhao = ref<string>("");
const mynewtel = ref<string>(""); const mynewtel = ref<string>("");
const currencyindex=ref<string>("人民币¥")
const isSecondStep: Ref<boolean> = ref(false); const isSecondStep: Ref<boolean> = ref(false);
const currencylist=ref<any>([{ const currencylist=ref<any>([{
alias: "CNY", alias: "CNY",
@ -350,8 +356,10 @@ export default defineComponent({
myquhao.value = quhaolist.value[0].code myquhao.value = quhaolist.value[0].code
currencylist.value = await getcurrencys() currencylist.value = await getcurrencys()
zonelist.value=await getzonelist() zonelist.value=await getzonelist()
currencyindex.value=userinfo.value.currencyValue // currencyindex.value=userinfo.value.currencyValue
console.log(userinfo.value.currencyValue,"listsssss")
console.log(userinfo.value)
}) })
/** /**
@ -550,10 +558,16 @@ export default defineComponent({
console.log(uesrinfo) console.log(uesrinfo)
// console.log(toRaw(formData.value)); // console.log(toRaw(formData.value));
if(userinfo.value.currency==''){
if(userinfo.value.currencyValue!=''){
for(let i=0;i<currencylist.value.length;i++){
if(userinfo.value.currencyValue==currencylist.value[i].name){
userinfo.value.currency=(i+1).toString()
}
}
}
}
putmember(uesrinfo) putmember(uesrinfo)
// putmember(toRaw(formData.value)).then((res) => {
// console.log(res)
// })
} }
@ -603,7 +617,7 @@ export default defineComponent({
userinfo.value.currency=e userinfo.value.currency=e
} }
currencyindex.value=userinfo.value.currencyValue
return { return {
modalNode, modalNode,
formData, formData,