This commit is contained in:
luyuan 2020-10-16 14:33:26 +08:00
commit b5cbd71a56
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
5 changed files with 147 additions and 268 deletions

View File

@ -98,9 +98,10 @@ interface Teacherliked {
interest: string; interest: string;
} }
export async function getteacherliked(){ export async function getteacherliked(data?:any){
const res = await get<Array<Teacherliked>>('teacherliked'); const res = await get<Array<Teacherliked>>('teacherliked',data);
console.log(res) // console.log(res)
return res.data
} }
@ -303,10 +304,27 @@ export async function saleinfo(data?:any){
/** /**
* *
*/ */
export async function cashout(data?:any){ export async function cashout(data?:any,accountinfo?:any){
// data.type=data.typeid?data.typeid:0
// if(data.type!=0){
// delete data.typeid
// }
data.type=accountinfo.type
console.log(data,'tixian')
console.log(accountinfo)
data.account=accountinfo.account
data.bankcode=accountinfo.bankcode
data.bankname=accountinfo.bankname
data.mname=accountinfo.mname
console.log(data)
const res = await post<Liveaddrule>('withdrawal',data); const res = await post<Liveaddrule>('withdrawal',data);
if(res.code==0){ if(res.code==0){
message.success("新增成功") message.success("新增成功")
}else{
message.error(res.msg)
} }
} }
/** /**
@ -355,6 +373,30 @@ export async function deleteaccount(data:any) {
console.log(res) console.log(res)
} }
/**
*
*
*/
interface TransactionInfo{
accountid:number,
memberid:number,
sn:string,
type:number,
typename:string,
money:number,
source:number,
remark:string,
deleted_at:any,
created_at:string,
updated_at:string
}
export async function transactioninfo(data?: any){
const res = await get<TransactionInfo>('account/'+data)
// console.log(res)
return res.data
}
/** /**
* *
* @param phone * @param phone

View File

@ -9,7 +9,7 @@
<div class="mingxilist"> <div class="mingxilist">
<div class="tabs"> <div class="tabs">
<div class="beforetab">提现到指定账户</div> <div class="beforetab">提现到指定账户</div>
<span class="residue">余额50</span> <span class="residue">余额{{yue}}</span>
<div class="topbtn topbtn2">提现到指定账户</div> <div class="topbtn topbtn2">提现到指定账户</div>
<div class="topbtn topbtn1">提现记录</div> <div class="topbtn topbtn1">提现记录</div>
</div> </div>
@ -97,7 +97,7 @@
<div class="desc">每笔提现收取0.1%服务费最低0.1</div> <div class="desc">每笔提现收取0.1%服务费最低0.1</div>
</div> </div>
</div> </div>
<div class="ale">*您的余额只有{{yue}}最低提现金额100</div> <div class="ale" v-if="payinfo.money<100 || payinfo.money>parseFloat(yue)">*您的余额只有{{parseFloat(yue)}}最低提现金额100</div>
</div> </div>
<div class="cashoutall submit" @click="sub">立即提现</div> <div class="cashoutall submit" @click="sub">立即提现</div>
<NavBottom class="navbottom"></NavBottom> <NavBottom class="navbottom"></NavBottom>
@ -109,6 +109,7 @@
import { defineComponent, onMounted, ref, toRaw } 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'; import { cashout, getwallect } from '@/api';
import store from '@/store';
export default defineComponent({ export default defineComponent({
name: "Cashout", name: "Cashout",
components: { components: {
@ -124,13 +125,14 @@ export default defineComponent({
bankcode:"", bankcode:"",
bankname:"", bankname:"",
international:0, 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 yue=ref<string>(store.state.userinfo.money)
const yue=ref<number>(10000)
// yue.value=store.state.userinfo.money
const accountlist =ref<Array<any>>([]) const accountlist =ref<Array<any>>([])
onMounted(async () => { onMounted(async () => {
@ -139,7 +141,7 @@ export default defineComponent({
function onChange(e: any) { function onChange(e: any) {
console.log(e.target.value); console.log(e.target.value);
payinfo.value.type=e.target.value payinfo.value.type=e.target.value
payinfo.value.typeid=toRaw(accountlist.value)[e.target.value].wallectid // payinfo.value.typeid=toRaw(accountlist.value)[e.target.value].wallectid
// payinfo.value.type=toRaw(accountlist.value)[e.target.value].wallectid // payinfo.value.type=toRaw(accountlist.value)[e.target.value].wallectid
} }
function all(){ function all(){
@ -147,7 +149,9 @@ export default defineComponent({
} }
function sub(){ function sub(){
console.log(toRaw(payinfo.value)) console.log(toRaw(payinfo.value))
// cashout(toRaw(payinfo.value)) console.log(toRaw(payinfo.value))
payinfo.value.money=Number(payinfo.value.money)
cashout(toRaw(payinfo.value),toRaw(accountlist.value)[payinfo.value.type])
} }
return { return {
@ -158,7 +162,8 @@ export default defineComponent({
all, all,
yue, yue,
sub, sub,
accountlist accountlist,
store
}; };
}, },
}); });

View File

@ -6,38 +6,41 @@
<a-breadcrumb-item href=""> Application List </a-breadcrumb-item> <a-breadcrumb-item href=""> Application List </a-breadcrumb-item>
<a-breadcrumb-item>An Application</a-breadcrumb-item> <a-breadcrumb-item>An Application</a-breadcrumb-item>
</a-breadcrumb> </a-breadcrumb>
<div class="mingxilist"> <div class="mingxilist">
<div class="tabs"> <div class="tabs">
<div class="beforetab">交易明细详情</div> <div class="beforetab">交易明细详情</div>
</div>
<div class="detail">
<div class="infoitem">
<div class="left">金额</div>
<div class="right">30.00</div>
</div> </div>
<div class="detail">
<div class="infoitem">
<div class="left">金额</div>
<div class="right">{{accountinfo.money}}</div>
</div>
<div class="infoitem"> <div class="infoitem">
<div class="left">类型</div> <div class="left">类型</div>
<div class="right">收入</div> <div class="right" v-if="accountinfo.type==1">直播收入</div>
<div class="right" v-if="accountinfo.type==2">提现</div>
<div class="right" v-if="accountinfo.type==3">后台充值</div>
</div>
<div class="infoitem">
<div class="left">流水号</div>
<div class="right">{{accountinfo.sn}}</div>
</div>
<div class="infoitem">
<div class="left">日期</div>
<div class="right">{{accountinfo.created_at}}</div>
</div>
<div class="infoitem">
<div class="left">来源</div>
<div class="right">直播收益英语三级A1教学</div>
</div>
<div class="back">返回</div>
</div> </div>
<div class="infoitem">
<div class="left">流水号</div>
<div class="right">126545654561656515616256565646556</div>
</div>
<div class="infoitem">
<div class="left">日期</div>
<div class="right">2020-08-17 14:23:20</div>
</div>
<div class="infoitem">
<div class="left">来源</div>
<div class="right">直播收益英语三级A1教学</div>
</div>
<div class="back">返回</div>
</div>
<NavBottom class="navbottom"></NavBottom> <NavBottom class="navbottom"></NavBottom>
</div> </div>
@ -45,17 +48,22 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from "vue"; import { defineComponent, onMounted, ref } from "vue";
import NavBottom from "@/components/NavBottom.vue"; import NavBottom from "@/components/NavBottom.vue";
import { transactioninfo } from '@/api';
import { useRoute } from 'vue-router';
export default defineComponent({ export default defineComponent({
name: "Transactiondetail", name: "Transactiondetail",
components: { components: {
NavBottom NavBottom
}, },
setup() { setup() {
const accountinfo=ref<any>({})
onMounted(async () => {
accountinfo.value=await transactioninfo(useRoute().query.id)
})
return { return {
accountinfo
}; };
}, },
}); });

View File

@ -20,7 +20,7 @@
<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>
<div class="num">3</div> <div class="num">{{accountlist.length}}</div>
</div> </div>
</div> </div>
<div class="linecolumn"></div> <div class="linecolumn"></div>
@ -31,8 +31,12 @@
<div class="num"> <div class="num">
<span class="moneyicon" v-if="ifchina"></span> <span class="moneyicon" v-if="ifchina"></span>
<span class="moneyicon" v-else> $ </span> <span class="moneyicon" v-else> $ </span>
880 <!-- {{store.state.userinfo.moneyValue}} -->
<span class="float">.00</span>
<!-- {{store.state.userinfo.money.split('.')[0]}}
<span class="float">{{store.state.userinfo.money.split('.')[1]?'.'+store.state.userinfo.money.split('.')[1]:''}}</span> -->
<!-- <span class="float">{{'$0'.split('.')}}</span> -->
</div> </div>
</div> </div>
</div> </div>
@ -185,7 +189,7 @@
<td>{{i.typename}}</td> <td>{{i.typename}}</td>
<td class="moneyadd moneyreverse" v-if="i.type==2">-{{i.money}}</td> <td class="moneyadd moneyreverse" v-if="i.type==2">-{{i.money}}</td>
<td class="moneyadd " v-else>+{{i.money}}</td> <td class="moneyadd " v-else>+{{i.money}}</td>
<td>查看详情</td> <td @click="navto(3,i.accountid)">查看详情{{i.accountid}}</td>
</tr> </tr>
</tbody> </tbody>
@ -200,6 +204,7 @@
import { defineComponent, onMounted, ref, toRaw } 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 store from '@/store';
import { deleteaccount, getwallect, saleinfo } from "@/api"; import { deleteaccount, getwallect, saleinfo } from "@/api";
export default defineComponent({ export default defineComponent({
name: "Wallet", name: "Wallet",
@ -214,10 +219,11 @@ export default defineComponent({
const listindex=ref<number>(1) const listindex=ref<number>(1)
const state=ref<number>(0) const state=ref<number>(0)
const dates=ref<Array<string>>(["",""]) const dates=ref<Array<string>>(["",""])
onMounted(async () => { onMounted(async () => {
salelist.value = await saleinfo(); salelist.value = await saleinfo();
accountlist.value=await getwallect(); accountlist.value=await getwallect();
console.log(store.state.userinfo)
}); });
const tabindex = ref(0); const tabindex = ref(0);
async function tabchange(e: number): Promise<void> { async function tabchange(e: number): Promise<void> {
@ -249,6 +255,8 @@ export default defineComponent({
case 2: case 2:
url = "/mine/cashout"; url = "/mine/cashout";
break; break;
case 3:
url = "/mine/transactionxq"
} }
if(id){ if(id){
router.push({ router.push({
@ -274,7 +282,8 @@ export default defineComponent({
listindex, listindex,
onChange, onChange,
dates, dates,
del del,
store
}; };
}, },
}); });

View File

@ -4,255 +4,53 @@
<div class="title">我的订阅者56</div> <div class="title">我的订阅者56</div>
<div class="sel"> <div class="sel">
<img src="@/static/images/sousuo.png" alt="" class="icon" /> <img src="@/static/images/sousuo.png" alt="" class="icon" />
<input type="text" placeholder="请输入想要搜索的学生姓名" /> <input type="text" placeholder="请输入想要搜索的学生姓名" v-model="condition.title" @keyup.enter="search(condition)"/>
</div> </div>
</div> </div>
<div class="mid"> <div class="mid">
<!-- {{teacherlikedlist}} -->
<div class="studentlist"> <div class="studentlist">
<div class="stuitem"> <div class="stuitem" v-for="(i,j) in teacherlikedlist" :key="j">
<img src="" alt="" class="photo" /> <img :src="i.img" alt="" class="photo" />
<div> <div>
<div class="info"> <div class="info">
<div class="infoitem"> <div class="infoitem">
<span class="label">姓名:</span> <span class="label">姓名:</span>
<span>asd</span> <span>{{i.name}}</span>
</div> </div>
<div class="infoitem"> <div class="infoitem">
<span class="label">姓名:</span> <span class="label">所在国家:</span>
<span>asd</span> <span>{{i.live}}</span>
</div> </div>
<div class="infoitem"> <div class="infoitem">
<span class="label">姓名:</span> <span class="label">年龄:</span>
<span>asd</span> <span>{{i.age}}</span>
</div> </div>
</div> </div>
<div class="info"> <div class="info">
<div class="infoitem"> <div class="infoitem">
<span class="label">姓名:</span> <span class="label">学生母语:</span>
<span>asd</span> <span>{{i.mtongue }}</span>
</div> </div>
<div class="infoitem"> <div class="infoitem">
<span class="label">姓名:</span> <span class="label">兴趣点:</span>
<span>asd</span> <span>{{interest}}</span>
</div> </div>
<div class="infoitem"> <div class="infoitem">
<span class="label">姓名:</span> <span class="label">语言等级:</span>
<span>asd</span> <span>asd</span>
</div> </div>
<div>参加平台直播课程总时长<span class="time">350min</span></div> <div>参加平台直播课程总时长<span class="time">{{i.longtime}}min</span></div>
</div>
</div>
</div>
<div class="stuitem">
<img src="" alt="" class="photo" />
<div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
</div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div>参加平台直播课程总时长<span class="time">350min</span></div>
</div> </div>
</div> </div>
</div> </div>
<div class="stuitem">
<img src="" alt="" class="photo" />
<div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
</div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div>参加平台直播课程总时长<span class="time">350min</span></div>
</div>
</div>
</div>
<div class="stuitem">
<img src="" alt="" class="photo" />
<div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
</div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div>参加平台直播课程总时长<span class="time">350min</span></div>
</div>
</div>
</div>
<div class="stuitem">
<img src="" alt="" class="photo" />
<div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
</div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div>参加平台直播课程总时长<span class="time">350min</span></div>
</div>
</div>
</div>
<div class="stuitem">
<img src="" alt="" class="photo" />
<div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
</div>
<div class="info">
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div class="infoitem">
<span class="label">姓名:</span>
<span>asd</span>
</div>
<div>参加平台直播课程总时长<span class="time">350min</span></div>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="pages"> <div class="pages">
@ -286,19 +84,21 @@
font-weight: bold; font-weight: bold;
} }
.sel { .sel {
width: 171px; // width: 171px;
height: 26px; height: 26px;
border: 1px solid #999; border: 1px solid #999;
display: flex; display: flex;
align-items: center; align-items: center;
// padding: 8px; // padding: 8px;
border-radius: 4px; border-radius: 4px;
padding-right:30px;
> img { > img {
width: 11px; width: 11px;
height: 11px; height: 11px;
margin-left:5px
} }
> input { > input {
width: 119px; width: 170px;
font-size: 9px; font-size: 9px;
line-height: 1; line-height: 1;
margin-left: 6px; margin-left: 6px;
@ -362,15 +162,30 @@
</style> </style>
<script lang="ts"> <script lang="ts">
import { getteacherliked } from '@/api'; import { getteacherliked } from '@/api';
import { defineComponent, ref } from "vue"; import { defineComponent, onMounted, ref } from "vue";
export default defineComponent({ export default defineComponent({
name: "Subscriber", name: "Subscriber",
components: {}, components: {},
setup() { setup() {
const page = ref(6); const page = ref(1);
getteacherliked() const teacherlikedlist =ref<Array<any>>([]);
const title=ref('')
const condition = ref<any>({
title:""
})
onMounted(async () => {
teacherlikedlist.value=await getteacherliked()
});
async function search(e:any){
teacherlikedlist.value=await getteacherliked(e)
}
return { return {
page, page,
teacherlikedlist,
condition,
title,
search
}; };
}, },
}); });