xbx #60

Merged
theluyuan merged 9 commits from xbx into master 2020-10-20 17:09:35 +08:00
10 changed files with 706 additions and 150 deletions
Showing only changes of commit 90fc51641f - Show all commits

View File

@ -277,14 +277,21 @@ interface SaleInfo{
updated_at:string,
basemoney:string
}
interface SaleInfolData{
data: SaleInfo[];
code: number;
msg: string;
total: number;
}
/**
*
* @param data
*/
export async function saleinfo(data?:any){
const res= await get<Array<SaleInfo>>('account',data)
const res=await get<SaleInfolData>('account',data)
console.log(res)
return res.data
return res
}
/**
@ -309,6 +316,8 @@ export async function cashout(data?:any,accountinfo?:any){
const res = await post<Liveaddrule>('withdrawal',data);
if(res.code==0){
message.success(res.msg)
// userinfo()
store.dispatch("setUserInfo");
}else{
message.error(res.msg)
}
@ -403,8 +412,127 @@ export async function editpassword(data?:any) :Promise<void> {
}
}
/**
*
*/
interface WithDrawal{
withdrawalid:number,
memberid:number,
sn:string,
status:number,
statusname:string,
type:number,
typename:string,
money:number
sxf:number,
international:number,
account:string,
mname:string,
bankcode:string,
bankname:string,
remark:string,
deleted_at:string,
created_at:string,
updated_at:string
}
interface WithdrawlData{
data: WithDrawal[];
code: number;
msg: string;
total: number;
}
export async function withdrawal(data?:any) {
console.log(data)
const res=await get<WithdrawlData>('withdrawal',data)
// console.log(res)
return res
}
/**
*
*/
export async function withdrawlxq(data?:any){
const res=await get<WithDrawal>('withdrawal/'+data)
return res.data
}
/**
*
*/
interface CommentList{
commentid:number,
memberid:number,
cid:number,
type:number,
score:number,
content:string,
deleted_at:null,
created_at:string,
updated_at:string,
name:string,
img:string
}
interface CommentlData{
data: CommentList[];
code: number;
msg: string;
total: number;
}
interface ReplylistData{
data: CommentList[];
code: number;
msg: string;
score?:string,
total: number;
}
export async function getcommentlist(data?:any) {
console.log(data.type==2)
if(data.type==2){
const res=await get<CommentlData>('comments',data)
return res
}else{
const res=await get<ReplylistData>('comments',data)
console.log(res)
return res
}
// if(data.type==2){
// return res
// }
}
/**
*
*/
interface SendData{
type?:number,
cid?:number,
teacherid?:number,
score?:number,
content?:string
}
export async function addcomment(data?:any):Promise<void> {
const res=await post<SendData>('comments',data)
if(res.code==0){
message.success("发布成功")
}
}
/**
*
*/
export async function delreply(data?:any) {
const res = await del<Liveaddrule>('comments/'+data);
if(res.code==0){
message.success("删除成功")
}
return res
}
/**
*
* @param phone

View File

@ -1,25 +1,43 @@
<template>
<div class="reviewitem">
<div class="top">
<img src="" alt="">
<div class="name">qweqw</div>
<img :src="photo" alt="">
<div class="name">{{username}}</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 v-for="(i,j) in stars" :key="j">
<img src="@/static/images/starred.png" alt="" :key="j" v-if="i==1">
<img src="@/static/images/star.png" alt="" v-else>
</div>
</div>
<div class="num">8.0</div>
<div class="num">{{(score+'').split('.')[1]?score:score+'.0'}}</div>
</div>
<div class="all" @click="findall(replyid)" >
<span>查看所有回复</span>
<img src="@/static/images/arrowdownblue.png" alt="">
</div>
</div>
<div class="cont">
dafjkldashfjksdhjkhfgjkdshjkfgsdhjkghjkshgjsjkhg
{{content}}
</div>
<div class="bottom">
<div class="date">2020-10-10</div>
<div class="reply">回复</div>
<div class="date">{{date}}</div>
<div class="reply" @click="reply(username)">回复</div>
</div>
<div class="huifu" v-if="ifshow">
<ReviewItemtwo v-for="(i,j) in replylist.data" :key="j"
:photo="i.img"
:username="i.name"
:score="i.score"
:content="i.content"
:date="i.created_at"
:memberid="i.memberid"
:replyid="i.commentid"
@replying="reply"
@reload="refresh"
></ReviewItemtwo>
</div>
</div>
</template>
@ -30,6 +48,17 @@
.top{
display: flex;
align-items: center;
position: relative;
.all{
color: #2581D0;
font-size: 11px;
position: absolute;
right: 0;
cursor: pointer;
>img{
margin-left: 6px;
}
}
>img{
width: 57px;
height: 57px;
@ -85,14 +114,97 @@
color: #08AE98;
}
}
.huifu{
margin-left: 56px;
margin-top: 30px;
}
}
</style>
<script lang="ts">
import { defineComponent } from 'vue';
import { getcommentlist } from '@/api';
import { defineComponent, onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import ReviewItemtwo from "./ReviewItemtwo.vue"
export default defineComponent({
setup(){
console.log(1)
components:{
ReviewItemtwo
},
props:{
photo:{
type:String
},
username:{
type:String
},
score:{
type:Number,
},
content:{
type:String
},
date:{
type:String
},
memberid:{
type:Number
},
replyid:{
type:Number
}
},
setup(prop,context){
// console.log(1)
const replylist =ref({})
const reviewlist=ref({})
const videoid=ref(useRoute().query.id)
const ifshow=ref(false)
onMounted(async () => {
reviewlist.value=await getcommentlist({type:2,id:videoid.value})
})
async function refresh(e?:any){
console.log("rekload")
reviewlist.value=await getcommentlist({type:2,id:videoid.value})
replylist.value=await getcommentlist({type:3,id:e})
}
const stars=ref<Array<number>>([])
console.log(prop.score)
let score1=ref<any>(prop.score)
// console.log(score1)
if(score1.value==5){
for(let i=0;i < score1.value ; i++){
// console.log(i)
stars.value.push(1)
}
}else{
for(let i=0;i < 5 ; i++){
// console.log(i)
stars.value.push(0)
}
for(let i=0;i < score1.value ; i++){
// console.log(i)
stars.value[i]=1
}
}
function reply(e?:string){
console.log(155)
context.emit("replying",{name:e,replyid:prop.replyid,score:prop.score})
}
async function findall(e :number){
console.log("all")
replylist.value =await getcommentlist({type:3,id:e})
ifshow.value=ifshow.value==false?true:false
}
return {
stars,
reply,
findall,
replylist,
reviewlist,
refresh,
ifshow
}
}
})
</script>

View File

@ -1,27 +1,22 @@
<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> -->
<img :src="photo" alt="">
<div class="name myname" v-if="parseInt(memberid)==myid">{{username}}</div>
<div class="name" v-else>{{username}}</div>
</div>
<div class="cont">
dafjkldashfjksdhjkhfgjkdshjkfgsdhjkghjkshgjsjkhg
{{content}}
</div>
<div class="bottom">
<div class="date">2020-10-10</div>
<div class="reply">
回复
<span class="reply del">删除</span>
<div class="date">{{date}}</div>
<div class="operate">
<div class="reply" @click="reply(username)">
回复
</div>
<div class="del" @click="del(replyid)" v-if="parseInt(memberid)==myid">
删除
</div>
</div>
</div>
@ -47,6 +42,9 @@
margin-left: 10px;
}
.myname{
color: #08AE98;
}
.lv{
display: flex;
align-items: center;
@ -79,6 +77,9 @@
justify-content: space-between;
margin-left: 67px;
margin-top: 25px;
.operate{
display: flex;
}
.date{
font-size: 10px;
color: #999;
@ -96,11 +97,55 @@
}
</style>
<script lang="ts">
import { defineComponent } from 'vue';
import { delreply } from '@/api';
import store from '@/store';
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup(){
props:{
photo:{
type:String
},
username:{
type:String
},
score:{
type:Number,
},
content:{
type:String
},
date:{
type:String
},
memberid:{
type:Number
},
replyid:{
type:Number
}
},
setup(prop,context){
const myid=ref<number>(store.state.userinfo.memberid)
function reply(e?:string){
console.log(155)
context.emit("replying",{name:e,replyid:prop.replyid,score:prop.score})
}
console.log(1)
async function del(e?: number){
console.log(e)
let res=await delreply(e)
if(res.code==0){
context.emit("reload",prop.replyid)
}
console.log(res)
}
return {
reply,
myid,
del
}
}
})
</script>

View File

@ -7,20 +7,26 @@
</div>
<div class="score">8.0</div>
</div>
<div class="list" v-for="(i,j) in reviewlist.data" :key="j" >
<ReviewItem
:photo="i.img"
:username="i.name"
:score="i.score"
:content="i.content"
:date="i.created_at"
:memberid="i.memberid"
:replyid="i.commentid"
@replying="reply"
@findall="findreply"
></ReviewItem>
<div class="list">
<ReviewItem></ReviewItem>
<ReviewItem></ReviewItem>
<div class="huifu">
<ReviewItemtwo></ReviewItemtwo>
<ReviewItemtwo></ReviewItemtwo>
</div>
</div>
<div>
<a-textarea v-model:value="value" placeholder="Basic usage" :rows="4" />
<div class="send">发表留言</div>
<div class="reply">
<span v-if="uinfo.name">@{{uinfo.name}}</span>
<a-textarea v-model:value="commentval" placeholder="Basic usage" :rows="4" />
<div class="send" @click="send">发表留言</div>
</div>
</div>
</template>
@ -85,16 +91,79 @@
}
</style>
<script lang="ts">
import { defineComponent } from 'vue';
import { addcomment, getcommentlist, videodetail } from '@/api';
import store from '@/store';
import { defineComponent, onMounted, ref, toRaw } from 'vue';
import { useRoute } from 'vue-router';
import ReviewItem from "./ReviewItem.vue"
import ReviewItemtwo from "./ReviewItemtwo.vue"
export default defineComponent({
components:{
ReviewItem,
ReviewItemtwo
ReviewItem
},
serup(){
props:{
videoid:{
type:Number
}
},
setup(prop,context){
const reviewlist=ref({})
const commentval=ref<string>('')
const uinfo=ref<any>({})
const replylist =ref({})
const videoid=ref(useRoute().query.id)
onMounted(async () => {
reviewlist.value=await getcommentlist({type:2,id:videoid.value})
})
console.log(useRoute().query)
console.log(store.state.userinfo.memberid,"userifno")
interface SendData{
type?:number,
cid?:number,
teacherid?:number,
score?:number,
content?:string
}
function send(){
const data = ref<SendData>({})
data.value.type=3;
data.value.cid=uinfo.value.replyid
// data.value.teacherid=uinfo.value.memberid
// data.value.score=uinfo.value.score
data.value.content=commentval.value
console.log(data.value,2221)
addcomment(toRaw(data.value))
}
async function refresh(e?:any){
console.log("rekload")
reviewlist.value=await getcommentlist({type:2,id:videoid.value})
replylist.value=await getcommentlist({type:3,id:e})
}
const reply: (val: number) => void = (val: number) => {
console.log("收到子组件事件", val)
uinfo.value=val
}
const haslist=ref([])
const findreply: (e: any) => void = async (e: any) => {
console.log("收到子组件事件", e)
replylist.value=await getcommentlist({type:3,id:e})
}
console.log(1)
return {
commentval,
send,
reply,
uinfo,
findreply,
replylist,
haslist,
reviewlist,
refresh
}
}
})
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 306 B

View File

@ -7,71 +7,41 @@
<a-breadcrumb-item>An Application</a-breadcrumb-item>
</a-breadcrumb>
<div class="mingxilist">
<div class="tabs">
<div class="beforetab">明细查询</div>
<div class="mingxitop">
<div><span class="tabtitle">明细查询</span>
</div>
<a-range-picker @change="onChange" class="choosedate" :placeholder="['请选择开始日期', '请选择结束日期']"/>
</div>
<div>
<table class="table">
<thead>
<tr class="head">
<th>日期</th>
<th>类型</th>
<th>账户</th>
<th>提交日期</th>
<th>状态</th>
<th>金额</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<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="moneyreverse">+320</td>
<td>查看详情</td>
<tr v-for="(i,j) in withdrawallist.data" :key="j">
<td>{{i.typename}} {{i.account}}</td>
<td>{{i.created_at}}</td>
<td class="moneyadd">{{i.statusname}}</td>
<td>
<span v-if="international==1">$</span>
<span v-else></span>
{{i.money}}
</td>
<td @click="navto(3,i.withdrawalid)">查看详情</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>
<tr>
<td>2020-08-13 13:54</td>
<td>直播收入</td>
<td class="moneyadd">+320</td>
<td>查看详情</td>
</tr>
</tbody>
</table>
<div class="pages">
<a-pagination v-model:current="page" :total="withdrawallist.total" :showLessItems="true" @change="pagechange"/>
</div>
</div>
<NavBottom class="navbottom"></NavBottom>
</div>
@ -80,17 +50,67 @@
</template>
<script lang="ts">
import { defineComponent } from "vue";
import { defineComponent, onMounted, ref } from "vue";
import NavBottom from "@/components/NavBottom.vue";
import { withdrawal } from '@/api';
import router from '@/router';
export default defineComponent({
name: "Transaction",
components: {
NavBottom
},
setup() {
const withdrawallist =ref<any>({})
const dates=ref<Array<string>>(["",""])
const page = ref(1);
onMounted(async () => {
withdrawallist.value=await withdrawal()
console.log(withdrawallist.value)
})
async function onChange(e: any,dateString:string){
console.log(dateString)
dates.value[0]=dateString[0]
dates.value[1]=dateString[1]
withdrawallist.value=await withdrawal({bdate:dates.value[0],edate:dates.value[1]})
}
function navto(index: number,id?:number) {
let url = "";
switch (index) {
case 1:
url = "/mine/addaccount"
console.log(url)
break;
case 2:
url = "/mine/cashout";
break;
case 3:
url = "/mine/transactionxq"
}
if(id){
router.push({
path: url,
query:{id:id,ifwithdrawal:1}
});
}else{
router.push({
path: url
});
}
}
async function pagechange(e:any) {
console.log(e)
page.value=e
withdrawallist.value=await withdrawal({bdate:dates.value[0],edate:dates.value[1],page:e});
}
return {
withdrawallist,
onChange,
navto,
pagechange
};
},
});
@ -100,29 +120,60 @@ export default defineComponent({
color: #08ae98;
}
.transaction{
.mingxilist {
.mingxilist {
width: 1150px;
// height: 533px;
background: white;
border-radius: 18px;
margin-top: 18px;
.mingxitop {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 18px;
padding-right: 40px;
.tabtitle {
width: 60px;
margin-right: 30px;
margin-left: 40px;
font-weight: bold;
}
.tabs {
display: flex;
flex-wrap: nowrap;
padding-top: 35px;
padding-left: 40px;
}
.beforetab {
color: #121212;
align-items: center;
flex-shrink: 0;
font-size: 13px;
line-height: 35px;
font-weight: bold;
margin-right: 57px;
color: #111;
padding: 11px 0;
> 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;
}
}
}
}
}
.table {
width: 1150px;
height: 365px;
max-height: 365px;
text-align: center;
color: #343434;
font-size: 12px;
@ -154,4 +205,23 @@ export default defineComponent({
padding-bottom: 30px;
}
}
.pages {
display: flex;
justify-content: center;
margin-top: 46px;
padding-bottom: 28px;
::v-deep(.ant-pagination-next) > .ant-pagination-item-link,
::v-deep(.ant-pagination-prev) > .ant-pagination-item-link,
::v-deep(.ant-pagination-item),
::v-deep(.ant-pagination-jump-next-custom-icon),
::v-deep(.ant-pagination-jump-prev-custom-icon) {
border: 1px solid #08ae98;
}
::v-deep(.ant-pagination-item-active) a {
color: #fff;
}
::v-deep(.ant-pagination-item-active) {
background-color: #08ae98;
}
}
</style>

View File

@ -6,15 +6,15 @@
<a-breadcrumb-item href=""> Application List </a-breadcrumb-item>
<a-breadcrumb-item>An Application</a-breadcrumb-item>
</a-breadcrumb>
<div class="mingxilist">
<div class="mingxilist" v-if="query.ifwithdrawal!=1">
<div class="tabs">
<div class="beforetab">交易明细详情</div>
</div>
<div class="detail">
<div class="infoitem">
<div class="left">金额</div>
<div class="right">{{accountinfo.money}}</div>
</div>
<div class="infoitem">
<div class="left">金额</div>
<div class="right">{{accountinfo.money}}</div>
</div>
<div class="infoitem">
<div class="left">类型</div>
@ -36,34 +36,119 @@
<div class="infoitem">
<div class="left">来源</div>
<div class="right">直播收益英语三级A1教学</div>
<div class="right">{{accountinfo.remark}}</div>
</div>
<div class="back" @click="navto(1,2)">返回</div>
<div class="back">返回</div>
</div>
<NavBottom class="navbottom"></NavBottom>
</div>
<div class="mingxilist" v-if="query.ifwithdrawal==1">
<div class="tabs">
<div class="beforetab">提现记录详情</div>
</div>
<div class="detail">
<div class="infoitem">
<div class="left">提现金额</div>
<div class="right">{{accountinfo.amount}}</div>
</div>
<div class="infoitem">
<div class="left">到帐金额</div>
<div class="right">{{accountinfo.money}}</div>
</div>
<div class="infoitem">
<div class="left">手续费</div>
<div class="right">{{accountinfo.sxf}}</div>
</div>
<div class="infoitem">
<div class="left">提现状态</div>
<div class="right" >{{accountinfo.statusname}}</div>
<!-- <div class="right" v-if="accountinfo.status==1">直播收入</div>
<div class="right" v-if="accountinfo.status==2">提现</div>
<div class="right" v-if="accountinfo.status==3">后台充值</div> -->
</div>
<div class="infoitem">
<div class="left">原因描述</div>
<div class="right">{{accountinfo.remark}}</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.typename}}</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">{{accountinfo.account}}</div>
</div>
<div class="back" @click="navto(2)">返回</div>
</div>
<NavBottom class="navbottom"></NavBottom>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, onMounted, ref } from "vue";
import NavBottom from "@/components/NavBottom.vue";
import { transactioninfo } from '@/api';
import { transactioninfo, withdrawlxq } from '@/api';
import { useRoute } from 'vue-router';
import router from '@/router';
export default defineComponent({
name: "Transactiondetail",
components: {
NavBottom
},
setup() {
const accountinfo=ref<any>({})
const accountinfo=ref<any>({});
const query=ref({})
onMounted(async () => {
accountinfo.value=await transactioninfo(useRoute().query.id)
query.value=useRoute().query
if(useRoute().query.ifwithdrawal){
accountinfo.value=await withdrawlxq(useRoute().query.id)
}else{
accountinfo.value=await transactioninfo(useRoute().query.id)
}
})
function navto(index: number,id?:number) {
let url = "";
switch (index) {
case 1:
url = "/mine/wallet"
console.log(url)
break;
case 2:
url = "/mine/transaction";
break;
}
if(id){
router.push({
path: url,
query:{ifsale:id }
});
}else{
router.push({
path: url
});
}
}
return {
accountinfo
accountinfo,
query,
navto
};
},
});

View File

@ -31,7 +31,7 @@
<div class="num">
<span class="moneyicon" v-if="ifchina"></span>
<span class="moneyicon" v-else> $ </span>
<!-- {{store.state.userinfo.moneyValue}} -->
{{store.state.userinfo.moneyValue}}
<!-- {{store.state.userinfo.money.split('.')[0]}}
<span class="float">{{store.state.userinfo.money.split('.')[1]?'.'+store.state.userinfo.money.split('.')[1]:''}}</span> -->
@ -184,17 +184,20 @@
</tr>
</thead>
<tbody>
<tr v-for="(i,j) in salelist" :key="j">
<tr v-for="(i,j) in salelist.data" :key="j">
<td>{{i.created_at}}</td>
<td>{{i.typename}}</td>
<td class="moneyadd moneyreverse" v-if="i.type==2">-{{i.money}}</td>
<td class="moneyadd " v-else>+{{i.money}}</td>
<td @click="navto(3,i.accountid)">查看详情{{i.accountid}}</td>
<td @click="navto(4,i.accountid)">查看详情{{i.accountid}}</td>
</tr>
</tbody>
</table>
</div>
<div class="pages">
<a-pagination v-model:current="page" :total="salelist.total" :showLessItems="true" @change="pagechange"/>
</div>
</div>
<NavBottom class="navbottom"></NavBottom>
</div>
@ -206,6 +209,7 @@ import NavBottom from "@/components/NavBottom.vue";
import router from "@/router";
import store from '@/store';
import { deleteaccount, getwallect, saleinfo } from "@/api";
import { useRoute } from 'vue-router';
export default defineComponent({
name: "Wallet",
components: {
@ -214,13 +218,20 @@ export default defineComponent({
setup() {
const ifchina = true;
const ifmingxi = false;
const salelist=ref<Array<any>>([])
const salelist=ref<any>({})
const accountlist =ref<Array<any>>([])
const listindex=ref<number>(1)
const state=ref<number>(0)
const dates=ref<Array<string>>(["",""])
const page = ref(1);
onMounted(async () => {
console.log(useRoute().query)
listindex.value=1
if(useRoute().query.ifsale){
listindex.value=2
}else{
listindex.value=1
}
salelist.value = await saleinfo();
accountlist.value=await getwallect();
console.log(store.state.userinfo)
@ -229,7 +240,7 @@ export default defineComponent({
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]});
salelist.value=await saleinfo({status:e,bdate:dates.value[0],edate:dates.value[1],page:page.value});
// console.log(videolist)
}
function listchange(e: number){
@ -239,11 +250,16 @@ export default defineComponent({
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});
salelist.value=await saleinfo({bdate:dateString[0],edate:dateString[1],status:state.value,page:page.value});
}
async function del(e: number){
deleteaccount(e)
}
async function pagechange(e:any) {
console.log(e)
page.value=e
salelist.value=await saleinfo({status:state.value,bdate:dates.value[0],edate:dates.value[1],page:e});
}
function navto(index: number,id?:number) {
let url = "";
switch (index) {
@ -256,7 +272,10 @@ export default defineComponent({
url = "/mine/cashout";
break;
case 3:
url = "/mine/transactionxq"
url = "/mine/transaction";
break;
case 4:
url="/mine/transactionxq"
}
if(id){
router.push({
@ -283,7 +302,8 @@ export default defineComponent({
onChange,
dates,
del,
store
store,
pagechange
};
},
});
@ -516,10 +536,11 @@ export default defineComponent({
.mingxilist {
width: 1150px;
max-height: 533px;
// max-height: 533px;
background: white;
border-radius: 18px;
margin-top: 18px;
.mingxitop {
display: flex;
justify-content: space-between;
@ -574,5 +595,24 @@ export default defineComponent({
.navbottom {
margin-top: 160px;
}
.pages {
display: flex;
justify-content: center;
margin-top: 46px;
padding-bottom: 28px;
::v-deep(.ant-pagination-next) > .ant-pagination-item-link,
::v-deep(.ant-pagination-prev) > .ant-pagination-item-link,
::v-deep(.ant-pagination-item),
::v-deep(.ant-pagination-jump-next-custom-icon),
::v-deep(.ant-pagination-jump-prev-custom-icon) {
border: 1px solid #08ae98;
}
::v-deep(.ant-pagination-item-active) a {
color: #fff;
}
::v-deep(.ant-pagination-item-active) {
background-color: #08ae98;
}
}
}
</style>

View File

@ -197,7 +197,7 @@ export default defineComponent({
VideoItem,
},
setup() {
const page = ref(6);
const page = ref(1);
const tabindex = ref(4);
interface VideoList {
videoid: number;
@ -226,17 +226,19 @@ export default defineComponent({
videolist.value = res;
});
function tabchange(e: number): void {
async function tabchange(e: number) {
tabindex.value = e;
videolist.value = await getvideolist({title: input.value,page:page.value,status:e});
// console.log(videolist)
}
async function sel(){
console.log(input.value);
page.value = 1;
videolist.value = await getvideolist({title: input.value,page:page.value});
videolist.value = await getvideolist({title: input.value,page:page.value,status:tabindex.value});
}
async function pagechange() {
videolist.value = await getvideolist({title: input.value,page:page.value});
async function pagechange(e: number) {
page.value=e
videolist.value = await getvideolist({title: input.value,page:e,status:tabindex.value});
}
return {
page,

View File

@ -4,7 +4,7 @@
<VideoPlay :url="result.fileurl"></VideoPlay>
<VideoCont :videoid="result.videoid" :date="result.created_at" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
</div>
<VideoReview class="review" ></VideoReview>
<VideoReview class="review"></VideoReview>
</div>
</template>
<style lang="scss" scoped>
@ -25,7 +25,7 @@ import { defineComponent, onMounted, ref } from 'vue';
import VideoPlay from "@/components/VideoPlay.vue"
import VideoCont from "@/components/VideoCont.vue"
import VideoReview from "@/components/VideoReview.vue";
import { videodetail } from '@/api';
import { getcommentlist, videodetail } from '@/api';
import { useRoute } from 'vue-router';
export default defineComponent({
components:{
@ -37,12 +37,17 @@ export default defineComponent({
// console.log(1)
console.log(useRoute().query)
const result=ref({})
const commentlist=ref({})
const videoid=ref(useRoute().query.id)
onMounted(async () => {
result.value= await videodetail(useRoute().query.id)
// commentlist.value=await getcommentlist({type:2,id:videoid.value})
})
return {
result
result,
commentlist,
videoid
}
}