钱包 获取成功id
This commit is contained in:
@@ -18,23 +18,43 @@
|
||||
<div class="chooseitem">
|
||||
<div class="label">选择账户</div>
|
||||
<!-- <a-radio></a-radio> -->
|
||||
{{payinfo.type}}
|
||||
<!-- {{payinfo.type}} -->
|
||||
<a-radio-group v-model:value="payinfo.type" @change="onChange">
|
||||
<div class="accountlist">
|
||||
<a-radio :value="4">
|
||||
<a-radio v-for="(i,j) in accountlist" :key="j" :value="j">
|
||||
<div class="accountitem">
|
||||
<div class="hostinfo">
|
||||
<div class="hostinfo" v-if="i.type==4">
|
||||
<div>
|
||||
<img src="@/static/images/bank.png" alt="" class="icon" />
|
||||
<span class="accounttype">银行卡</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hostinfo" v-if="i.type==2">
|
||||
<div>
|
||||
<img
|
||||
src="@/static/images/walletzfb.png"
|
||||
alt=""
|
||||
class="icon icon1"
|
||||
/>
|
||||
<span class="accounttype">支付宝</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hostinfo" v-if="i.type==1">
|
||||
<div>
|
||||
<img
|
||||
src="@/static/images/walletweixin.png"
|
||||
alt=""
|
||||
class="icon icon1"
|
||||
/>
|
||||
<span class="accounttype">微信</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zhanghao">账号:6217 **** **** **** 175</div>
|
||||
</div>
|
||||
</a-radio>
|
||||
|
||||
|
||||
<a-radio :value="2">
|
||||
<!-- <a-radio :value="2">
|
||||
<div class="accountitem">
|
||||
<div class="hostinfo">
|
||||
<div>
|
||||
@@ -63,7 +83,7 @@
|
||||
</div>
|
||||
<div class="zhanghao">账号:6217 **** **** **** 175</div>
|
||||
</div>
|
||||
</a-radio>
|
||||
</a-radio> -->
|
||||
</div>
|
||||
</a-radio-group>
|
||||
|
||||
@@ -86,9 +106,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, toRaw } from "vue";
|
||||
import { defineComponent, onMounted, ref, toRaw } from "vue";
|
||||
import NavBottom from "@/components/NavBottom.vue";
|
||||
import { cashout } from '@/api';
|
||||
import { cashout, getwallect } from '@/api';
|
||||
export default defineComponent({
|
||||
name: "Cashout",
|
||||
components: {
|
||||
@@ -97,29 +117,37 @@ export default defineComponent({
|
||||
setup() {
|
||||
const money = ref(0);
|
||||
const payinfo=ref<any>({
|
||||
type:4,
|
||||
type:0,
|
||||
money:0,
|
||||
account :"",
|
||||
mname:"",
|
||||
bankcode:"",
|
||||
bankname:"",
|
||||
international:0
|
||||
international:0,
|
||||
typeid:0
|
||||
|
||||
})
|
||||
const moneychange: (e: number) => void = (e: number) => {
|
||||
console.log(e);
|
||||
};
|
||||
const yue=ref<number>(105)
|
||||
const accountlist =ref<Array<any>>([])
|
||||
|
||||
onMounted(async () => {
|
||||
accountlist.value=await getwallect();
|
||||
});
|
||||
function onChange(e: any) {
|
||||
console.log(e.target.value);
|
||||
payinfo.value.type=e.target.value
|
||||
payinfo.value.typeid=toRaw(accountlist.value)[e.target.value].wallectid
|
||||
// payinfo.value.type=toRaw(accountlist.value)[e.target.value].wallectid
|
||||
}
|
||||
function all(){
|
||||
payinfo.value.money=yue.value
|
||||
}
|
||||
function sub(){
|
||||
console.log(toRaw(payinfo.value))
|
||||
cashout(toRaw(payinfo.value))
|
||||
// cashout(toRaw(payinfo.value))
|
||||
|
||||
}
|
||||
return {
|
||||
@@ -129,7 +157,8 @@ export default defineComponent({
|
||||
onChange,
|
||||
all,
|
||||
yue,
|
||||
sub
|
||||
sub,
|
||||
accountlist
|
||||
};
|
||||
},
|
||||
});
|
||||
@@ -214,8 +243,12 @@ export default defineComponent({
|
||||
.chooseitem {
|
||||
display: flex;
|
||||
margin-bottom: 34px;
|
||||
.label{
|
||||
width:150px;
|
||||
}
|
||||
.accountlist {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.accountitem {
|
||||
// width: 200px;
|
||||
padding-bottom: 16px;
|
||||
@@ -225,6 +258,7 @@ export default defineComponent({
|
||||
border-radius: 17px;
|
||||
margin-left: 17px;
|
||||
margin-right: 46px;
|
||||
margin-bottom: 17px;
|
||||
.hostinfo {
|
||||
display: flex;
|
||||
padding-top: 17px;
|
||||
|
||||
Reference in New Issue
Block a user