Merge pull request 'zj' (#48) from zj into master

Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/48
This commit is contained in:
asd 2020-10-16 09:36:28 +08:00
commit f7d4f86541
6 changed files with 590 additions and 176 deletions

View File

@ -82,6 +82,7 @@ interface Wallect {
export async function getwallect(){ export async function getwallect(){
const res = await get<Array<Wallect>>('wallect') const res = await get<Array<Wallect>>('wallect')
console.log(res) console.log(res)
return res.data
} }
/** /**
@ -253,7 +254,98 @@ export async function videodel(data:any) {
console.log(res) console.log(res)
} }
/**
*
*/
export async function accountadd(data?:any) {
const res = await post<Liveaddrule>('wallect',data);
if(res.code==0){
message.success("新增成功")
}
console.log(res)
}
interface SaleInfo{
total:number,
accountid:number,
memberid:number,
sn:string,
type:number,
typename:string,
money:string,
source:number,
remark:string,
deleted_at:string,
created_at:string,
updated_at:string,
basemoney:string
}
/**
*
* @param data
*/
export async function saleinfo(data?:any){
const res= await get<Array<SaleInfo>>('account',data)
console.log(res)
return res.data
}
/**
*
*/
export async function cashout(data?:any){
const res = await post<Liveaddrule>('withdrawal',data);
if(res.code==0){
message.success("新增成功")
}
}
/**
*
*/
interface AccountInfo{
wallectid:number,
typeid:number,
type:number,
account:number,
mname:string,
bankcode:string,
bankname:string
}
export async function getaccountinfo(data?: any){
const res=await get<AccountInfo>('wallect/'+data)
console.log(res,2333)
return {
accountid:res.data.wallectid,
type:res.data.type,
account:res.data.account,
mname:res.data.mname,
bankcode:res.data.bankcode,
bankname:res.data.bankname
}
}
/**
*
*/
export async function editaccount(data?:any){
const res=await put<Liveaddrule>('wallect/'+data);
if(res.code==0){
message.success("修改成功")
}
}
/**
*
*/
export async function deleteaccount(data:any) {
const res = await del<Liveaddrule>('wallect/'+data);
if(res.code==0){
message.success("删除成功")
}
console.log(res)
}
/** /**
* *
* @param phone * @param phone

View File

@ -0,0 +1,106 @@
<template>
<div class="reviewitem">
<div class="top">
<img src="" alt="">
<div class="name">qweqw</div>
<!-- <div class="lv">
<div class="img">
<img src="@/static/images/starred.png" alt="">
<img src="@/static/images/starred.png" alt="">
<img src="@/static/images/starred.png" alt="">
<img src="@/static/images/star.png" alt="">
<img src="@/static/images/star.png" alt="">
</div>
<div class="num">8.0</div>
</div> -->
</div>
<div class="cont">
dafjkldashfjksdhjkhfgjkdshjkfgsdhjkghjkshgjsjkhg
</div>
<div class="bottom">
<div class="date">2020-10-10</div>
<div class="reply">
回复
<span class="reply del">删除</span>
</div>
</div>
</div>
</template>
<style lang="scss" scoped>
.reviewitem{
width: 100%;
margin-bottom: 50px;
.top{
display: flex;
align-items: center;
>img{
width: 45px;
height: 45px;
border-radius: 50%;
background-color: #0f0;
}
.name{
font-size: 13px;
color: #111;
margin-left: 10px;
}
.lv{
display: flex;
align-items: center;
.img{
display: flex;
align-items: center;
>img{
width: 12px;
height: 12px;
// background-color: #0f0;
margin-left: 3px;
}
}
.num{
font-size: 11px;
color: #D12C2E;
margin-left: 3px;
}
}
}
.cont{
margin-left: 67px;
font-size: 11px;
line-height: 1.2;
}
.bottom{
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 67px;
margin-top: 25px;
.date{
font-size: 10px;
color: #999;
}
.reply{
font-size: 10px;
color: #08AE98;
}
.del{
color:#D12C2D!important;
margin-left: 28px;
}
}
}
</style>
<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
setup(){
console.log(1)
}
})
</script>

View File

@ -11,11 +11,14 @@
<div class="list"> <div class="list">
<ReviewItem></ReviewItem> <ReviewItem></ReviewItem>
<ReviewItem></ReviewItem> <ReviewItem></ReviewItem>
<ReviewItem></ReviewItem> <div class="huifu">
<ReviewItem></ReviewItem> <ReviewItemtwo></ReviewItemtwo>
<ReviewItemtwo></ReviewItemtwo>
</div> </div>
<div class="reply"> </div>
<div>
<a-textarea v-model:value="value" placeholder="Basic usage" :rows="4" /> <a-textarea v-model:value="value" placeholder="Basic usage" :rows="4" />
<div class="send">发表留言</div> <div class="send">发表留言</div>
</div> </div>
@ -75,16 +78,20 @@
} }
} }
.huifu{
margin-left: 56px;
}
} }
</style> </style>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import ReviewItem from "./ReviewItem.vue" import ReviewItem from "./ReviewItem.vue"
import ReviewItemtwo from "./ReviewItemtwo.vue"
export default defineComponent({ export default defineComponent({
components:{ components:{
ReviewItem ReviewItem,
ReviewItemtwo
}, },
serup(){ serup(){
console.log(1) console.log(1)

View File

@ -17,20 +17,20 @@
<div v-if="ifchina"> <div v-if="ifchina">
<a-radio-group <a-radio-group
name="radioGroup" name="radioGroup"
v-model="paytype"
class="accountlist" class="accountlist"
@change="onChange" @change="onChange"
:default-value="1" v-model:value="accountinfo.type"
> >
<a-radio :value="1"> <a-radio :value="4">
<img src="@/static/images/bank.png" alt="" class="icon icon1" /> <img src="@/static/images/bank.png" alt="" class="icon icon1" />
<span>银行卡</span> <span>银行卡zzz</span>
</a-radio> </a-radio>
<a-radio :value="2"> <a-radio :value="2">
<img src="@/static/images/walletzfb.png" alt="" class="icon" /> <img src="@/static/images/walletzfb.png" alt="" class="icon" />
<span>支付宝</span> <span>支付宝</span>
</a-radio> </a-radio>
<a-radio :value="3"> <a-radio :value="1">
<img src="@/static/images/walletweixin.png" alt="" class="icon" /> <img src="@/static/images/walletweixin.png" alt="" class="icon" />
<span>微信</span> <span>微信</span>
</a-radio> </a-radio>
@ -59,16 +59,17 @@
</a-radio-group> </a-radio-group>
</div> </div>
</div> </div>
<div class="cashoutmoney" v-if="paytype == 1 && ifchina"> <div class="cashoutmoney" v-if="accountinfo.type == 4 && ifchina">
<a-form >
<div> <div>
<div class="infoitem"> <div class="infoitem">
<span class="label label1">姓名</span> <span class="label label1">姓名</span>
<a-input v-model="money" class="shuru" placeholder="请输入姓名" /> <a-input v-model:value="accountinfo.mname" class="shuru" placeholder="请输入姓名" />
</div> </div>
<div class="infoitem"> <div class="infoitem">
<span class="label label1">卡号</span> <span class="label label1">卡号</span>
<a-input <a-input
v-model="money" v-model:value="accountinfo.bankcode"
class="shuru" class="shuru"
placeholder="请输入收款人储蓄卡号" placeholder="请输入收款人储蓄卡号"
/> />
@ -76,26 +77,27 @@
<div class="infoitem"> <div class="infoitem">
<span class="label label1">开户行</span> <span class="label label1">开户行</span>
<a-input <a-input
v-model="money" v-model:value="accountinfo.bankname"
class="shuru shuru1" class="shuru shuru2"
placeholder="请输入开户行" placeholder="请输入开户行"
/> />
</div> </div>
</div> </div>
</a-form>
</div> </div>
<div class="cashoutmoney" v-if="paytype == 2 && ifchina"> <div class="cashoutmoney" v-if="accountinfo.type == 2 && ifchina">
<div> <div>
<div class="infoitem"> <div class="infoitem">
<span class="label label1">帐号</span> <span class="label label1">帐号</span>
<a-input <a-input
v-model="money" v-model:value="accountinfo.account"
class="shuru" class="shuru"
placeholder="请输入支付宝账号/密码" placeholder="请输入支付宝账号/密码"
/> />
</div> </div>
</div> </div>
</div> </div>
<div class="cashoutmoney" v-if="paytype == 3 && ifchina"> <div class="cashoutmoney" v-if="accountinfo.type == 1 && ifchina">
<div class="label label1">扫码绑定</div> <div class="label label1">扫码绑定</div>
<div class="ewmbox"> <div class="ewmbox">
<img src="@/static/images/erweima.png" alt="" class="ewmpic" /> <img src="@/static/images/erweima.png" alt="" class="ewmpic" />
@ -110,12 +112,12 @@
<div> <div>
<div class="infoitem"> <div class="infoitem">
<span class="label label1">账户名</span> <span class="label label1">账户名</span>
<a-input v-model="money" class="shuru" placeholder="请输入姓名" /> <a-input v-model="accountinfo.mname" class="shuru" placeholder="请输入姓名" />
</div> </div>
<div class="infoitem"> <div class="infoitem">
<span class="label label1">银行账户</span> <span class="label label1">银行账户</span>
<a-input <a-input
v-model="money" v-model="accountinfo.bankcode"
class="shuru shuru2" class="shuru shuru2"
placeholder="请输入收款人储蓄卡号" placeholder="请输入收款人储蓄卡号"
/> />
@ -123,7 +125,7 @@
<div class="infoitem infoitem1"> <div class="infoitem infoitem1">
<div class="label label1 label2"> 银行BIC码 /swift code </div> <div class="label label1 label2"> 银行BIC码 /swift code </div>
<a-input <a-input
v-model="money" v-model="accountinfo.bankname"
class="shuru shuru1" class="shuru shuru1"
placeholder="请输入开户行" placeholder="请输入开户行"
/> />
@ -136,22 +138,24 @@
<div class="infoitem"> <div class="infoitem">
<span class="label label1">帐号</span> <span class="label label1">帐号</span>
<a-input <a-input
v-model="money" v-model:value="accountinfo.account"
class="shuru" class="shuru"
placeholder="请输入账号" placeholder="请输入账号"
/> />
</div> </div>
</div> </div>
</div> </div>
<div class="cashoutall submit">提交</div> <div class="cashoutall submit" @click="sub">提交</div>
<NavBottom class="navbottom"></NavBottom> <NavBottom class="navbottom"></NavBottom>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref } from "vue"; import { defineComponent, onMounted, ref, toRaw } from "vue";
import NavBottom from "@/components/NavBottom.vue"; import NavBottom from "@/components/NavBottom.vue";
import { accountadd, editaccount, getaccountinfo } from '@/api';
import { useRoute } from 'vue-router';
export default defineComponent({ export default defineComponent({
name: "Cashout", name: "Cashout",
components: { components: {
@ -159,9 +163,15 @@ export default defineComponent({
}, },
setup() { setup() {
const money = ref(0); const money = ref(0);
const paytype = ref(1); const paytype = ref(4);
const paytypeforign = ref(1); const paytypeforign = ref(1);
const accountinfo = ref<any>({
type: 4,
account:"",
mname: "",
bankcode: "",
bankname: "",
});
interface Changes { interface Changes {
target: { target: {
value: number; value: number;
@ -171,19 +181,42 @@ export default defineComponent({
const onChange: (e: Changes) => void = (e: Changes) => { const onChange: (e: Changes) => void = (e: Changes) => {
console.log("radio checked", e.target.value); console.log("radio checked", e.target.value);
paytype.value = e.target.value; paytype.value = e.target.value;
accountinfo.value.type=e.target.value
}; };
const onChange1: (e: Changes) => void = (e: Changes) => { const onChange1: (e: Changes) => void = (e: Changes) => {
console.log("radio checked", e.target.value); console.log("radio checked", e.target.value);
paytypeforign.value = e.target.value; paytypeforign.value = e.target.value;
}; };
const ifchina = ref(false); function sub(){
console.log(toRaw(accountinfo.value),11)
// cosnole.log(useRoute().query.id)
if(toRaw(accountinfo.value).accountid){
console.log(300)
editaccount(toRaw(accountinfo.value).accountid)
}else{
console.log(111)
accountadd(toRaw(accountinfo.value))
}
}
const ifchina = ref(true);
onMounted(async () => {
if(useRoute().query.id){
accountinfo.value=await getaccountinfo(useRoute().query.id)
// console.log(await getaccountinfo(useRoute().query.id),233)
}
// useRoute().query.id
})
return { return {
money, money,
onChange, onChange,
paytype, paytype,
ifchina, ifchina,
paytypeforign, paytypeforign,
onChange1 onChange1,
sub,
accountinfo
}; };
}, },
}); });

View File

@ -18,19 +18,43 @@
<div class="chooseitem"> <div class="chooseitem">
<div class="label">选择账户</div> <div class="label">选择账户</div>
<!-- <a-radio></a-radio> --> <!-- <a-radio></a-radio> -->
<!-- {{payinfo.type}} -->
<a-radio-group v-model:value="payinfo.type" @change="onChange">
<div class="accountlist"> <div class="accountlist">
<a-radio> <a-radio v-for="(i,j) in accountlist" :key="j" :value="j">
<div class="accountitem"> <div class="accountitem">
<div class="hostinfo"> <div class="hostinfo" v-if="i.type==4">
<div> <div>
<img src="@/static/images/bank.png" alt="" class="icon" /> <img src="@/static/images/bank.png" alt="" class="icon" />
<span class="accounttype">银行卡</span> <span class="accounttype">银行卡</span>
</div> </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>
<div class="zhanghao">账号6217 **** **** **** 175</div> <div class="zhanghao">账号6217 **** **** **** 175</div>
</div> </div>
</a-radio> </a-radio>
<a-radio>
<!-- <a-radio :value="2">
<div class="accountitem"> <div class="accountitem">
<div class="hostinfo"> <div class="hostinfo">
<div> <div>
@ -45,7 +69,7 @@
<div class="zhanghao">账号6217 **** **** **** 175</div> <div class="zhanghao">账号6217 **** **** **** 175</div>
</div> </div>
</a-radio> </a-radio>
<a-radio> <a-radio :value="1">
<div class="accountitem"> <div class="accountitem">
<div class="hostinfo"> <div class="hostinfo">
<div> <div>
@ -59,29 +83,32 @@
</div> </div>
<div class="zhanghao">账号6217 **** **** **** 175</div> <div class="zhanghao">账号6217 **** **** **** 175</div>
</div> </div>
</a-radio> </a-radio> -->
</div> </div>
</a-radio-group>
</div> </div>
<div class="cashoutmoney"> <div class="cashoutmoney">
<div class="label">提现金额</div> <div class="label">提现金额</div>
<div class="moneynum"> <div class="moneynum">
<a-input v-model="money" class="shuru" @change="moneychange" /> <a-input v-model:value="payinfo.money" class="shuru" />
<div></div> <div></div>
<div class="cashoutall">全部金额</div> <div class="cashoutall" @click="all">全部金额</div>
<div class="desc">每笔提现收取0.1%服务费最低0.1</div> <div class="desc">每笔提现收取0.1%服务费最低0.1</div>
</div> </div>
</div> </div>
<div class="ale">*您的余额只有50最低提现金额100</div> <div class="ale">*您的余额只有{{yue}}最低提现金额100</div>
</div> </div>
<div class="cashoutall submit">全部金额</div> <div class="cashoutall submit" @click="sub">立即提现</div>
<NavBottom class="navbottom"></NavBottom> <NavBottom class="navbottom"></NavBottom>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref } from "vue"; import { defineComponent, onMounted, ref, toRaw } from "vue";
import NavBottom from "@/components/NavBottom.vue"; import NavBottom from "@/components/NavBottom.vue";
import { cashout, getwallect } from '@/api';
export default defineComponent({ export default defineComponent({
name: "Cashout", name: "Cashout",
components: { components: {
@ -89,12 +116,49 @@ export default defineComponent({
}, },
setup() { setup() {
const money = ref(0); const money = ref(0);
const payinfo=ref<any>({
type:0,
money:0,
account :"",
mname:"",
bankcode:"",
bankname:"",
international:0,
typeid:0
})
const moneychange: (e: number) => void = (e: number) => { const moneychange: (e: number) => void = (e: number) => {
console.log(e); 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))
}
return { return {
money, money,
moneychange, moneychange,
payinfo,
onChange,
all,
yue,
sub,
accountlist
}; };
}, },
}); });
@ -108,6 +172,7 @@ export default defineComponent({
} }
.cashout ::v-deep(.ant-radio) { .cashout ::v-deep(.ant-radio) {
top: 43px; top: 43px;
height:13px
} }
.cashout { .cashout {
.mingxilist { .mingxilist {
@ -178,8 +243,12 @@ export default defineComponent({
.chooseitem { .chooseitem {
display: flex; display: flex;
margin-bottom: 34px; margin-bottom: 34px;
.label{
width:150px;
}
.accountlist { .accountlist {
display: flex; display: flex;
flex-wrap: wrap;
.accountitem { .accountitem {
// width: 200px; // width: 200px;
padding-bottom: 16px; padding-bottom: 16px;
@ -189,6 +258,7 @@ export default defineComponent({
border-radius: 17px; border-radius: 17px;
margin-left: 17px; margin-left: 17px;
margin-right: 46px; margin-right: 46px;
margin-bottom: 17px;
.hostinfo { .hostinfo {
display: flex; display: flex;
padding-top: 17px; padding-top: 17px;

View File

@ -16,7 +16,7 @@
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="accounts"> <div class="accounts">
<div class="left"> <div class="left" @click="listchange(1)">
<img src="@/static/images/account.png" alt="" class="pic" /> <img src="@/static/images/account.png" alt="" class="pic" />
<div class="texts"> <div class="texts">
<div>绑定用户</div> <div>绑定用户</div>
@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<div class="linecolumn"></div> <div class="linecolumn"></div>
<div class="left"> <div class="left" @click="listchange(2)">
<img src="@/static/images/money.png" alt="" class="pic" /> <img src="@/static/images/money.png" alt="" class="pic" />
<div class="texts"> <div class="texts">
<div>账户余额</div> <div>账户余额</div>
@ -43,23 +43,40 @@
<div>添加新的账户</div> <div>添加新的账户</div>
</div> </div>
</div> </div>
<div class="accountlist" v-if="ifchina && !ifmingxi">
<div class="accountitem"> <div class="accountlist" v-if="ifchina && listindex==1">
<div class="accountitem" v-for="(i,j) in accountlist" :key="j">
<div class="hostinfo"> <div class="hostinfo">
<div> <div v-if="i.type==4">
<img src="@/static/images/bank.png" alt="" class="icon" /> <img src="@/static/images/bank.png" alt="" class="icon" />
<span class="accounttype">银行卡</span> <span class="accounttype">银行卡</span>
</div> </div>
<div v-if="i.type==2">
<img
src="@/static/images/walletzfb.png"
alt=""
class="icon icon1"
/>
<span class="accounttype">支付宝</span>
</div>
<div v-if="i.type==1">
<img
src="@/static/images/walletweixin.png"
alt=""
class="icon icon1"
/>
<span class="accounttype">微信</span>
</div>
<div class="btns"> <div class="btns">
<div class="btn">修改</div> <div class="btn" @click="navto(1,i.wallectid)">修改</div>
<div class="btn1">删除</div> <div class="btn1" @click="del(i.wallectid)">删除</div>
</div> </div>
</div> </div>
<div class="zhanghao">账号6217 **** **** **** 175</div> <div class="zhanghao" v-if="i.type==4">账号 <span>{{i.bankcode}}</span></div>
<div class="zhanghao" v-else>账号 <span>{{i.account}}</span></div>
</div> </div>
<div class="accountitem"> <!-- <div class="accountitem">
<div class="hostinfo"> <div class="hostinfo">
<div> <div>
<img <img
@ -76,9 +93,9 @@
</div> </div>
</div> </div>
<div class="zhanghao">账号6217 **** **** **** 175</div> <div class="zhanghao">账号6217 **** **** **** 175</div>
</div> </div> -->
<div class="accountitem"> <!-- <div class="accountitem">
<div class="hostinfo"> <div class="hostinfo">
<div> <div>
<img <img
@ -95,10 +112,10 @@
</div> </div>
</div> </div>
<div class="zhanghao">账号6217 **** **** **** 175</div> <div class="zhanghao">账号6217 **** **** **** 175</div>
</div> -->
</div> </div>
</div> <div class="accountlist" v-if="!ifchina && listindex==1">
<div class="accountlist" v-if="!ifchina && !ifmingxi"> <!-- <div class="accountitem">
<div class="accountitem">
<div class="hostinfo"> <div class="hostinfo">
<div> <div>
<img src="@/static/images/foreignbank.png" alt="" class="icon" /> <img src="@/static/images/foreignbank.png" alt="" class="icon" />
@ -111,27 +128,47 @@
</div> </div>
</div> </div>
<div class="zhanghao">账号6217 **** **** **** 175</div> <div class="zhanghao">账号6217 **** **** **** 175</div>
</div> -->
<div class="accountitem" v-for="(i,j) in accountlist" :key="j">
<div class="hostinfo">
<div v-if="i.type==4">
<img src="@/static/images/foreignbank.png" alt="" class="icon" />
<span class="accounttype">银行卡</span>
</div> </div>
<div class="accountitem"> <div v-else>
<div class="hostinfo">
<div>
<img src="@/static/images/paypi.png" alt="" class="icon icon1" /> <img src="@/static/images/paypi.png" alt="" class="icon icon1" />
<span class="accounttype">paypal</span> <span class="accounttype">paypal</span>
</div> </div>
<div class="btns"> <div class="btns">
<div class="btn">修改</div> <div class="btn" @click="navto(1,i.wallectid)">修改</div>
<div class="btn1">删除</div> <div class="btn1" @click="del(i.wallectid)">删除</div>
</div> </div>
</div> </div>
<div class="zhanghao">账号6217 **** **** **** 175</div> <div class="zhanghao" v-if="i.type==4">账号 <span>{{i.bankcode}}</span></div>
<div class="zhanghao" v-else>账号 <span>{{i.account}}</span></div>
</div> </div>
</div> </div>
<div class="mingxilist"> <div class="mingxilist" v-if="ifchina && listindex==2">
<div class="mingxitop">
<div class="tabs"> <div class="tabs">
<div class="beforetab">明细查询</div> <span class="tabtitle">明细查询</span>
<div :class="tabindex == 0 ? 'on' : ''" @click="tabchange(0)">
全部
</div> </div>
<div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">
收入
</div>
<div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">
支出
</div>
</div>
<a-range-picker @change="onChange" class="choosedate" :placeholder="['请选择开始日期', '请选择结束日期']"/>
</div>
<div> <div>
<table class="table"> <table class="table">
<thead> <thead>
@ -143,55 +180,14 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr v-for="(i,j) in salelist" :key="j">
<td>2020-08-13 13:54</td> <td>{{i.created_at}}</td>
<td>直播收入</td> <td>{{i.typename}}</td>
<td class="moneyadd">+320</td> <td class="moneyadd moneyreverse" v-if="i.type==2">-{{i.money}}</td>
<td>查看详情</td> <td class="moneyadd " v-else>+{{i.money}}</td>
</tr>
<tr>
<td>2020-08-13 13:54</td>
<td>直播收入</td>
<td class="moneyreverse">+320</td>
<td>查看详情</td> <td>查看详情</td>
</tr> </tr>
<tr>
<td>2020-08-13 13:54</td>
<td>直播收入</td>
<td class="moneyadd">+320</td>
<td>查看详情</td>
</tr>
<tr>
<td >2020-08-13 13:54</td>
<td>直播收入</td>
<td class="moneyadd">+320</td>
<td>查看详情</td>
</tr>
<tr>
<td>2020-08-13 13:54</td>
<td>直播收入</td>
<td class="moneyadd">+320</td>
<td>查看详情</td>
</tr>
<tr>
<td>2020-08-13 13:54</td>
<td>直播收入</td>
<td class="moneyadd">+320</td>
<td>查看详情</td>
</tr>
<tr>
<td>2020-08-13 13:54</td>
<td>直播收入</td>
<td class="moneyadd">+320</td>
<td>查看详情</td>
</tr>
<tr>
<td>2020-08-13 13:54</td>
<td>直播收入</td>
<td class="moneyadd">+320</td>
<td>查看详情</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@ -201,33 +197,84 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from "vue"; import { defineComponent, onMounted, ref, toRaw } from "vue";
import NavBottom from "@/components/NavBottom.vue"; import NavBottom from "@/components/NavBottom.vue";
import router from '@/router'; import router from "@/router";
import { getwallect } from '@/api'; import { deleteaccount, getwallect, saleinfo } from "@/api";
export default defineComponent({ export default defineComponent({
name: "Wallet", name: "Wallet",
components: { components: {
NavBottom, NavBottom,
}, },
setup() { setup() {
const ifchina = false; const ifchina = true;
const ifmingxi = true; const ifmingxi = false;
getwallect() const salelist=ref<Array<any>>([])
function navto(index: number){ const accountlist =ref<Array<any>>([])
const listindex=ref<number>(1)
const state=ref<number>(0)
const dates=ref<Array<string>>(["",""])
onMounted(async () => {
salelist.value = await saleinfo();
accountlist.value=await getwallect();
});
const tabindex = ref(0);
async function tabchange(e: number): Promise<void> {
tabindex.value = e;
state.value=e
salelist.value=await saleinfo({status:e,bdate:dates.value[0],edate:dates.value[1]});
// console.log(videolist)
}
function listchange(e: number){
listindex.value=e
}
async function onChange(e: any,dateString:string){
console.log(dateString)
dates.value[0]=dateString[0]
dates.value[1]=dateString[1]
salelist.value=await saleinfo({bdate:dateString[0],edate:dateString[1],status:state.value});
}
async function del(e: number){
deleteaccount(e)
}
function navto(index: number,id?:number) {
let url = ""; let url = "";
switch (index) { switch (index) {
case 1: url = "/mine/addaccount"; break; case 1:
case 2: url = "/mine/cashout"; break;
url = "/mine/addaccount"
console.log(url)
break;
case 2:
url = "/mine/cashout";
break;
} }
if(id){
router.push({
path: url,
query:{id:id}
});
}else{
router.push({ router.push({
path: url path: url
}) });
}
} }
return { return {
ifchina, ifchina,
ifmingxi, ifmingxi,
navto navto,
tabindex,
tabchange,
salelist,
accountlist,
listchange,
listindex,
onChange,
dates,
del
}; };
}, },
}); });
@ -236,7 +283,52 @@ export default defineComponent({
.wallet ::v-deep(.ant-breadcrumb) > span:last-child { .wallet ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98; color: #08ae98;
} }
.wallet ::v-deep(.ant-calendar-picker) {
width: 271px;
height: 25px;
}
.wallet ::v-deep(.ant-calendar-range-picker-input){
height: 25px;
font-size:9px;
}
.wallet ::v-deep(.ant-calendar-date){
font-size: 12px;
}
.wallet { .wallet {
.tabs {
display: flex;
align-items: center;
flex-shrink: 0;
font-size: 13px;
font-weight: bold;
color: #111;
padding: 11px 0;
.tabtitle {
width: 60px;
margin-right: 30px;
}
> div {
margin-right: 38px;
cursor: pointer;
text-align: center;
width: 40px;
font-size:11px;
}
.on {
color: #08ae98;
position: relative;
&::before {
content: "";
display: block;
position: absolute;
bottom: -6px;
left: 8px;
width: 25px;
height: 1px;
background-color: #08ae98;
}
}
}
.mywallet { .mywallet {
width: 761px; width: 761px;
margin-right: 18px; margin-right: 18px;
@ -349,12 +441,15 @@ export default defineComponent({
.accountlist { .accountlist {
margin-top: 17px; margin-top: 17px;
display: flex; display: flex;
width:1170px;
flex-wrap: wrap;
.accountitem { .accountitem {
width: 372px; width: 372px;
height: 226px; height: 226px;
background: white; background: white;
border-radius: 17px; border-radius: 17px;
margin-left: 17px; margin-left: 17px;
margin-bottom: 17px;
.hostinfo { .hostinfo {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
@ -403,16 +498,27 @@ export default defineComponent({
font-size: 11px; font-size: 11px;
margin-top: 119px; margin-top: 119px;
margin-left: 34px; margin-left: 34px;
>span{
margin-left:15px
}
} }
} }
} }
.mingxilist { .mingxilist {
width: 1150px; width: 1150px;
height: 533px; max-height: 533px;
background: white; background: white;
border-radius: 18px; border-radius: 18px;
margin-top: 18px; margin-top: 18px;
.mingxitop {
display: flex;
justify-content: space-between;
}
.choosedate{
margin:auto 0;
margin-right: 39px;
}
.tabs { .tabs {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
@ -429,7 +535,7 @@ export default defineComponent({
} }
.table { .table {
width: 1150px; width: 1150px;
height: 365px; max-height: 365px;
text-align: center; text-align: center;
color: #343434; color: #343434;
font-size: 12px; font-size: 12px;