修改提现之后跳转

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)
// userinfo()
store.dispatch("setUserInfo");
return true;
}else{
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);
if(res.code==0){
message.success("修改成功")
router.push("/mine/wallet")
}else{
message.error(res.msg)
}
}
/**

View File

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