修改提现之后跳转

This commit is contained in:
luyuan 2020-11-20 16:00:12 +08:00
parent f32633c5d7
commit 5ea48cc218
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
2 changed files with 18 additions and 3 deletions

View File

@ -358,8 +358,10 @@ export async function cashout(data?: any,accountinfo?: any){
message.success(res.msg) message.success(res.msg)
// userinfo() // userinfo()
store.dispatch("setUserInfo"); store.dispatch("setUserInfo");
return true;
}else{ }else{
message.error(res.msg) message.error(res.msg)
return false;
} }
} }
/** /**
@ -394,6 +396,10 @@ export async function editaccount( id: any,data?: any){
const res=await put<Liveaddrule>('wallect/' +id ,data); const res=await put<Liveaddrule>('wallect/' +id ,data);
if(res.code==0){ if(res.code==0){
message.success("修改成功") message.success("修改成功")
router.push("/mine/wallet")
}else{
message.error(res.msg)
} }
} }
/** /**

View File

@ -113,7 +113,7 @@
<div <div
class="ale" class="ale"
v-if=" v-if="
payinfo.money < 100 || payinfo.money > parseFloat(yue) payinfo.money < parseInt(minwithdraw) || payinfo.money > parseFloat(yue)
" "
> >
*{{lan.$t('yueshu')}} {{danwei + parseFloat(yue) }}{{lan.$t('zuiditixian')}} *{{lan.$t('yueshu')}} {{danwei + parseFloat(yue) }}{{lan.$t('zuiditixian')}}
@ -139,6 +139,7 @@ export default defineComponent({
NavBottom, NavBottom,
}, },
setup() { setup() {
const lan: any = useI18n(); const lan: any = useI18n();
const money = ref(0); const money = ref(0);
const payinfo = ref<any>({ const payinfo = ref<any>({
@ -172,6 +173,7 @@ export default defineComponent({
function all() { function all() {
payinfo.value.money = yue.value; payinfo.value.money = yue.value;
} }
function sub() { function sub() {
console.log(toRaw(payinfo.value)); console.log(toRaw(payinfo.value));
@ -189,7 +191,11 @@ export default defineComponent({
cashout( cashout(
toRaw(payinfo.value), toRaw(payinfo.value),
toRaw(accountlist.value)[payinfo.value.type] toRaw(accountlist.value)[payinfo.value.type]
); ).then((res: boolean)=>{
if(res){
router.push("/mine/wallet")
}
})
} }
// cashout( // cashout(
@ -202,6 +208,8 @@ export default defineComponent({
router.push(url) router.push(url)
} }
const minwithdraw = computed(()=>store.state.seting.minwithdraw)
return { return {
money, money,
moneychange, moneychange,
@ -214,7 +222,8 @@ export default defineComponent({
store, store,
lan, lan,
navto, navto,
danwei danwei,
minwithdraw
}; };
}, },
}); });