5 changed files with 873 additions and 518 deletions
@ -1,185 +1,298 @@ |
|||||
<template> |
<template> |
||||
<view> |
<view> |
||||
<view class="uni-padding-wrap uni-common-mt"> |
<view class="uni-padding-wrap uni-common-mt"> |
||||
<uni-segmented-control :current="typeId" :values="items" :style-type="styleType" :active-color="activeColor" |
<uni-segmented-control |
||||
@clickItem="onClickItem" /> |
:current="typeId" |
||||
</view> |
:values="items" |
||||
<view class="content"> |
:style-type="styleType" |
||||
<view v-if="typeId === 0"> |
:active-color="activeColor" |
||||
<uni-list border-full v-for="(item,index) in endProfitAdList" :key="index"> |
@clickItem="onClickItem" |
||||
<uni-list-item showArrow clickable :title="item.walletTime+'@'+item.scanCode" |
/> |
||||
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" |
</view> |
||||
:rightText="'¥'+item.profit" @click="targetToOrder(item.id)" /> |
<view class="content"> |
||||
</uni-list> |
<view v-if="typeId === 0"> |
||||
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view> |
<uni-list |
||||
</view> |
border-full |
||||
<view v-if="typeId === 1"> |
v-for="(item, index) in endProfitAdList" |
||||
<uni-list border-full v-for="(item,index) in endProfitInviteList" :key="index"> |
:key="index" |
||||
<uni-list-item showArrow clickable :title="item.walletTime+'@'+item.scanCode" |
> |
||||
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" |
<uni-list-item |
||||
:rightText="'¥'+item.profit" @click="targetToOrder(item.id)" /> |
showArrow |
||||
</uni-list> |
clickable |
||||
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> |
:title="item.walletTime + '@' + item.scanCode" |
||||
</view> |
:note="item.appType + '&' + item.platform + '&' + item.type" |
||||
</view> |
:thumb="item.url" |
||||
</view> |
thumb-size="lg" |
||||
|
:rightText="'¥' + item.profit" |
||||
|
@click="targetToOrder(item.id)" |
||||
|
> |
||||
|
<template v-slot:body> |
||||
|
<view class="box"> |
||||
|
<view class="uni-list-item__content-title">{{ |
||||
|
item.createTime + "@" + item.scanCode |
||||
|
}}</view> |
||||
|
<view class="box-bot"> |
||||
|
<view> |
||||
|
{{ setAppType(item.appType) }} |
||||
|
</view> |
||||
|
<view> |
||||
|
{{ setPlatform(item.platform) }} |
||||
|
</view> |
||||
|
<view style="color: #4d6aff"> |
||||
|
{{ item.confirmStatus == 0 ? "待确认" : "已确认" }} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
</uni-list-item> |
||||
|
</uni-list> |
||||
|
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view> |
||||
|
</view> |
||||
|
<view v-if="typeId === 1"> |
||||
|
<uni-list |
||||
|
border-full |
||||
|
v-for="(item, index) in endProfitInviteList" |
||||
|
:key="index" |
||||
|
> |
||||
|
<uni-list-item |
||||
|
showArrow |
||||
|
clickable |
||||
|
:title="item.walletTime + '@' + item.scanCode" |
||||
|
:note="item.appType + '&' + item.platform + '&' + item.type" |
||||
|
:thumb="item.url" |
||||
|
thumb-size="lg" |
||||
|
:rightText="'¥' + item.profit" |
||||
|
@click="targetToOrder(item.id)" |
||||
|
> |
||||
|
<template v-slot:body> |
||||
|
<view class="box"> |
||||
|
<view class="uni-list-item__content-title">{{ |
||||
|
item.createTime + "@" + item.scanCode |
||||
|
}}</view> |
||||
|
<view class="box-bot"> |
||||
|
<view> |
||||
|
{{ setAppType(item.appType) }} |
||||
|
</view> |
||||
|
<view> |
||||
|
{{ setPlatform(item.platform) }} |
||||
|
</view> |
||||
|
<view style="color: #4d6aff"> |
||||
|
{{ item.confirmStatus == 0 ? "待确认" : "已确认" }} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
</uni-list-item> |
||||
|
</uni-list> |
||||
|
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { |
import { queryFrontEndProfitAmt } from "@/api/profit.js"; |
||||
queryFrontEndProfitAmt |
export default { |
||||
} from '@/api/profit.js' |
data() { |
||||
export default { |
return { |
||||
data() { |
items: ["广告", "邀请"], |
||||
return { |
typeId: 0, |
||||
items: ['广告', '邀请'], |
activeColor: "#007aff", |
||||
typeId: 0, |
styleType: "text", |
||||
activeColor: '#007aff', |
endProfitAdList: [], |
||||
styleType: 'text', |
endProfitInviteList: [], |
||||
endProfitAdList: [], |
userInfo: {}, |
||||
endProfitInviteList: [], |
pageSize: 10, |
||||
userInfo: {}, |
pageNum: 1, |
||||
pageSize: 10, |
flagAd: false, |
||||
pageNum: 1, |
flagInvite: false, |
||||
flagAd: false, |
}; |
||||
flagInvite: false |
}, |
||||
} |
created() { |
||||
}, |
const userInfoSync = uni.getStorageSync("userInfo"); |
||||
created() { |
this.userInfo = userInfoSync; |
||||
const userInfoSync = uni.getStorageSync('userInfo') |
const typeProfitId = uni.getStorageSync("typeId"); |
||||
this.userInfo = userInfoSync |
this.typeId = typeProfitId; |
||||
const typeProfitId = uni.getStorageSync('typeId') |
if (typeProfitId) { |
||||
this.typeId = typeProfitId |
this.queryFrontEndProfitAmt(); |
||||
if (typeProfitId) { |
} else { |
||||
this.queryFrontEndProfitAmt() |
this.queryFrontEndProfitAmt(); |
||||
} else { |
} |
||||
this.queryFrontEndProfitAmt() |
}, |
||||
} |
// 下拉刷新 |
||||
}, |
onPullDownRefresh() { |
||||
// 下拉刷新 |
if (this.typeId === 0) { |
||||
onPullDownRefresh() { |
this.pageNum = 1; |
||||
if(this.typeId === 0){ |
this.endProfitAdList = []; |
||||
this.pageNum = 1 |
this.queryFrontEndProfitAmt(); |
||||
this.endProfitAdList = [] |
uni.stopPullDownRefresh(); |
||||
this.queryFrontEndProfitAmt() |
} else { |
||||
uni.stopPullDownRefresh() |
this.pageNum = 1; |
||||
}else{ |
this.endProfitInviteList = []; |
||||
this.pageNum = 1 |
this.queryFrontEndProfitAmt(); |
||||
this.endProfitInviteList = [] |
uni.stopPullDownRefresh(); |
||||
this.queryFrontEndProfitAmt() |
} |
||||
uni.stopPullDownRefresh() |
}, |
||||
} |
// 上划加载更多 |
||||
}, |
onReachBottom() { |
||||
// 上划加载更多 |
if (this.typeId === 0) { |
||||
onReachBottom() { |
if (this.endProfitAdList.length > this.pageNum * this.pageSize - 1) { |
||||
if(this.typeId === 0){ |
this.flagAd = false; |
||||
if (this.endProfitAdList.length > this.pageNum*this.pageSize-1 ) { |
this.pageNum += 1; |
||||
this.flagAd = false; |
this.queryFrontEndProfitAmt(); |
||||
this.pageNum += 1 |
} else { |
||||
this.queryFrontEndProfitAmt(); |
this.flagAd = true; |
||||
}else{ |
} |
||||
this.flagAd = true; |
} else { |
||||
} |
if (this.endProfitInviteList.length > this.pageNum * this.pageSize - 1) { |
||||
}else{ |
this.flagInvite = false; |
||||
if (this.endProfitInviteList.length > this.pageNum*this.pageSize-1 ) { |
this.pageNum += 1; |
||||
this.flagInvite = false; |
this.queryFrontEndProfitAmt(); |
||||
this.pageNum += 1 |
} else { |
||||
this.queryFrontEndProfitAmt(); |
this.flagInvite = true; |
||||
}else{ |
} |
||||
this.flagInvite = true; |
} |
||||
} |
}, |
||||
} |
methods: { |
||||
|
// 查询指定艺术家转入钱包收益列表 |
||||
|
async queryFrontEndProfitAmt() { |
||||
|
const res = await queryFrontEndProfitAmt({ |
||||
|
creatorId: this.userInfo.id, |
||||
|
type: this.typeId, |
||||
|
pageSize: this.pageSize, |
||||
|
pageNum: this.pageNum, |
||||
|
}); |
||||
|
if (res.data.code === 200) { |
||||
|
if (this.typeId === 0) { |
||||
|
this.endProfitAdList.push(...res.data.rows); |
||||
|
} else { |
||||
|
this.endProfitInviteList.push(...res.data.rows); |
||||
|
} |
||||
|
} else { |
||||
|
uni.showModal({ |
||||
|
content: "转入钱包列表数据加载失败!", |
||||
|
showCancel: false, |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
}, |
onClickItem(e) { |
||||
methods: { |
let that = this; |
||||
|
that.endProfitAdList = []; |
||||
|
that.endProfitInviteList = []; |
||||
|
if (that.typeId !== e.currentIndex) { |
||||
|
that.typeId = e.currentIndex; |
||||
|
uni.showLoading({ |
||||
|
title: "加载中", |
||||
|
mask: true, |
||||
|
success() { |
||||
|
// 查询指定艺术家转入钱包收益列表 |
||||
|
const param = { |
||||
|
creatorId: that.userInfo.id, |
||||
|
type: that.typeId, |
||||
|
pageSize: that.pageSize, |
||||
|
pageNum: 1, |
||||
|
}; |
||||
|
queryFrontEndProfitAmt(param).then((res) => { |
||||
|
//console.log('res', res) |
||||
|
if (res.data.code === 200) { |
||||
|
if (that.typeId === 0) { |
||||
|
that.endProfitAdList.push(...res.data.rows); |
||||
|
} else { |
||||
|
that.endProfitInviteList.push(...res.data.rows); |
||||
|
} |
||||
|
console.log("点击操作endProfitAdList", that.endProfitAdList); |
||||
|
console.log( |
||||
|
"点击操作endProfitInviteList", |
||||
|
that.endProfitInviteList |
||||
|
); |
||||
|
} else { |
||||
|
uni.showModal({ |
||||
|
content: "转入钱包列表数据加载失败!", |
||||
|
showCancel: false, |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
complete() { |
||||
|
uni.hideLoading(); |
||||
|
}, |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
// 查询指定艺术家转入钱包收益列表 |
targetToOrder(id) { |
||||
async queryFrontEndProfitAmt() { |
console.log("id", id); |
||||
const res = await queryFrontEndProfitAmt({ |
if (id) { |
||||
creatorId: this.userInfo.id, |
uni.navigateTo({ |
||||
type: this.typeId, |
url: "../profit/profitEndOrder?id=" + id, |
||||
pageSize: this.pageSize, |
}); |
||||
pageNum: this.pageNum |
} |
||||
}) |
}, |
||||
if (res.data.code === 200) { |
setPlatform(data) { |
||||
if(this.typeId === 0){ |
if (data == "0") { |
||||
this.endProfitAdList.push(...res.data.rows) |
return "抖音"; |
||||
}else{ |
} else if (data == "1") { |
||||
this.endProfitInviteList.push(...res.data.rows) |
return "快手"; |
||||
} |
} else if (data == "2") { |
||||
} else { |
return "微信"; |
||||
uni.showModal({ |
} else if (data == "3") { |
||||
content: '转入钱包列表数据加载失败!', |
return "uniapp"; |
||||
showCancel: false |
} |
||||
}); |
}, |
||||
} |
setAppType(data) { |
||||
}, |
if (data == "0") { |
||||
|
return "次元壁纸"; |
||||
onClickItem(e) { |
} |
||||
let that = this |
}, |
||||
that.endProfitAdList = [] |
setType(data) { |
||||
that.endProfitInviteList = [] |
if (data == "0") { |
||||
if (that.typeId !== e.currentIndex) { |
return "广告浏览"; |
||||
that.typeId = e.currentIndex |
} else if (data == "1") { |
||||
uni.showLoading({ |
return "邀请"; |
||||
title: '加载中', |
} else if (data == "2") { |
||||
mask: true, |
return "会员"; |
||||
success() { |
} |
||||
// 查询指定艺术家转入钱包收益列表 |
}, |
||||
const param = { |
}, |
||||
creatorId: that.userInfo.id, |
}; |
||||
type: that.typeId, |
|
||||
pageSize: that.pageSize, |
|
||||
pageNum: 1 |
|
||||
} |
|
||||
queryFrontEndProfitAmt(param).then(res => { |
|
||||
//console.log('res', res) |
|
||||
if (res.data.code === 200) { |
|
||||
if(that.typeId === 0){ |
|
||||
that.endProfitAdList.push(...res.data.rows) |
|
||||
}else{ |
|
||||
that.endProfitInviteList.push(...res.data.rows) |
|
||||
} |
|
||||
console.log('点击操作endProfitAdList',that.endProfitAdList) |
|
||||
console.log('点击操作endProfitInviteList',that.endProfitInviteList) |
|
||||
} else { |
|
||||
uni.showModal({ |
|
||||
content: '转入钱包列表数据加载失败!', |
|
||||
showCancel: false |
|
||||
}); |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
complete() { |
|
||||
uni.hideLoading(); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
targetToOrder(id) { |
|
||||
console.log('id', id) |
|
||||
if (id) { |
|
||||
uni.navigateTo({ |
|
||||
url: '../profit/profitEndOrder?id=' + id |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"> |
||||
.uni-list-item__icon-img{ |
.uni-list-item__icon-img { |
||||
border-radius: 8px; |
border-radius: 8px; |
||||
} |
} |
||||
.ivOver{ |
.ivOver { |
||||
width: 100%; |
width: 100%; |
||||
height:50px; |
height: 50px; |
||||
line-height: 50px; |
line-height: 50px; |
||||
text-align: center; |
text-align: center; |
||||
background: #fff; |
background: #fff; |
||||
font-size: 20rpx; |
font-size: 20rpx; |
||||
} |
} |
||||
|
.box { |
||||
|
display: flex; |
||||
|
padding-right: 8px; |
||||
|
flex: 1; |
||||
|
color: #3b4144; |
||||
|
flex-direction: column; |
||||
|
justify-content: center; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
.box-bot { |
||||
|
display: flex; |
||||
|
margin-top: 5px; |
||||
|
} |
||||
|
.box-bot view { |
||||
|
border-radius: 3px; |
||||
|
border: 1px solid #4d6aff; |
||||
|
padding: 2px 5px; |
||||
|
margin-right: 5px; |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
.uni-list-item__content-title { |
||||
|
font-size: 14px; |
||||
|
color: #3b4144; |
||||
|
overflow: hidden; |
||||
|
} |
||||
</style> |
</style> |
||||
|
|||||
@ -1,184 +1,297 @@ |
|||||
<template> |
<template> |
||||
<view> |
<view> |
||||
<view class="uni-padding-wrap uni-common-mt"> |
<view class="uni-padding-wrap uni-common-mt"> |
||||
<uni-segmented-control :current="typeId" :values="items" :style-type="styleType" :active-color="activeColor" |
<uni-segmented-control |
||||
@clickItem="onClickItem" /> |
:current="typeId" |
||||
</view> |
:values="items" |
||||
<view class="content"> |
:style-type="styleType" |
||||
<view v-if="typeId === 0"> |
:active-color="activeColor" |
||||
<uni-list border-full v-for="(item,index) in inProfitAdList" :key="index"> |
@clickItem="onClickItem" |
||||
<uni-list-item showArrow clickable :title="item.createTime+'@'+item.scanCode" |
/> |
||||
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" |
</view> |
||||
:rightText="'¥'+item.profit" @click="targetToOrder(item.id)" /> |
<view class="content"> |
||||
</uni-list> |
<view v-if="typeId === 0"> |
||||
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view> |
<uni-list |
||||
</view> |
border-full |
||||
<view v-if="typeId === 1"> |
v-for="(item, index) in inProfitAdList" |
||||
<uni-list border-full v-for="(item,index) in inProfitInviteList" :key="index"> |
:key="index" |
||||
<uni-list-item showArrow clickable :title="item.createTime+'@'+item.scanCode" |
> |
||||
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" |
<uni-list-item |
||||
:rightText="'¥'+item.profit" @click="targetToOrder(item.id)" /> |
showArrow |
||||
</uni-list> |
clickable |
||||
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> |
:title="item.createTime + '@' + item.scanCode" |
||||
</view> |
:note="item.appType + '&' + item.platform + '&' + item.type" |
||||
</view> |
:thumb="item.url" |
||||
</view> |
thumb-size="lg" |
||||
|
:rightText="'¥' + item.profit" |
||||
|
@click="targetToOrder(item.id)" |
||||
|
> |
||||
|
<template v-slot:body> |
||||
|
<view class="box"> |
||||
|
<view class="uni-list-item__content-title">{{ |
||||
|
item.createTime + "@" + item.scanCode |
||||
|
}}</view> |
||||
|
<view class="box-bot"> |
||||
|
<view> |
||||
|
{{ setAppType(item.appType) }} |
||||
|
</view> |
||||
|
<view> |
||||
|
{{ setPlatform(item.platform) }} |
||||
|
</view> |
||||
|
<view style="color: #4d6aff"> |
||||
|
{{ item.confirmStatus == 0 ? "待确认" : "已确认" }} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
</uni-list-item> |
||||
|
</uni-list> |
||||
|
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view> |
||||
|
</view> |
||||
|
<view v-if="typeId === 1"> |
||||
|
<uni-list |
||||
|
border-full |
||||
|
v-for="(item, index) in inProfitInviteList" |
||||
|
:key="index" |
||||
|
> |
||||
|
<uni-list-item |
||||
|
showArrow |
||||
|
clickable |
||||
|
:title="item.createTime + '@' + item.scanCode" |
||||
|
:note="item.appType + '&' + item.platform + '&' + item.type" |
||||
|
:thumb="item.url" |
||||
|
thumb-size="lg" |
||||
|
:rightText="'¥' + item.profit" |
||||
|
@click="targetToOrder(item.id)" |
||||
|
> |
||||
|
<template v-slot:body> |
||||
|
<view class="box"> |
||||
|
<view class="uni-list-item__content-title">{{ |
||||
|
item.createTime + "@" + item.scanCode |
||||
|
}}</view> |
||||
|
<view class="box-bot"> |
||||
|
<view> |
||||
|
{{ setAppType(item.appType) }} |
||||
|
</view> |
||||
|
<view> |
||||
|
{{ setPlatform(item.platform) }} |
||||
|
</view> |
||||
|
<view style="color: #4d6aff"> |
||||
|
{{ item.confirmStatus == 0 ? "待确认" : "已确认" }} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
</uni-list-item> |
||||
|
</uni-list> |
||||
|
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { |
import { queryFrontInProfitAmt } from "@/api/profit.js"; |
||||
queryFrontInProfitAmt |
export default { |
||||
} from '@/api/profit.js' |
data() { |
||||
export default { |
return { |
||||
data() { |
items: ["广告", "邀请"], |
||||
return { |
typeId: 0, |
||||
items: ['广告', '邀请'], |
activeColor: "#007aff", |
||||
typeId: 0, |
styleType: "text", |
||||
activeColor: '#007aff', |
inProfitAdList: [], |
||||
styleType: 'text', |
inProfitInviteList: [], |
||||
inProfitAdList: [], |
userInfo: {}, |
||||
inProfitInviteList: [], |
pageSize: 10, |
||||
userInfo: {}, |
pageNum: 1, |
||||
pageSize: 10, |
flagAd: false, |
||||
pageNum: 1, |
flagInvite: false, |
||||
flagAd: false, |
}; |
||||
flagInvite: false |
}, |
||||
} |
created() { |
||||
}, |
const userInfoSync = uni.getStorageSync("userInfo"); |
||||
created() { |
this.userInfo = userInfoSync; |
||||
const userInfoSync = uni.getStorageSync('userInfo') |
const typeProfitId = uni.getStorageSync("typeId"); |
||||
this.userInfo = userInfoSync |
this.typeId = typeProfitId; |
||||
const typeProfitId = uni.getStorageSync('typeId') |
if (typeProfitId) { |
||||
this.typeId = typeProfitId |
this.queryFrontInProfitAmt(); |
||||
if (typeProfitId) { |
} else { |
||||
this.queryFrontInProfitAmt() |
this.queryFrontInProfitAmt(); |
||||
} else { |
} |
||||
this.queryFrontInProfitAmt() |
}, |
||||
} |
// 下拉刷新 |
||||
}, |
onPullDownRefresh() { |
||||
// 下拉刷新 |
if (this.typeId === 0) { |
||||
onPullDownRefresh() { |
this.pageNum = 1; |
||||
if(this.typeId === 0){ |
this.inProfitAdList = []; |
||||
this.pageNum = 1 |
this.queryFrontInProfitAmt(); |
||||
this.inProfitAdList = [] |
uni.stopPullDownRefresh(); |
||||
this.queryFrontInProfitAmt() |
} else { |
||||
uni.stopPullDownRefresh() |
this.pageNum = 1; |
||||
}else{ |
this.inProfitInviteList = []; |
||||
this.pageNum = 1 |
this.queryFrontInProfitAmt(); |
||||
this.inProfitInviteList = [] |
uni.stopPullDownRefresh(); |
||||
this.queryFrontInProfitAmt() |
} |
||||
uni.stopPullDownRefresh() |
}, |
||||
} |
// 上划加载更多 |
||||
}, |
onReachBottom() { |
||||
// 上划加载更多 |
if (this.typeId === 0) { |
||||
onReachBottom() { |
if (this.inProfitAdList.length > this.pageNum * this.pageSize - 1) { |
||||
if(this.typeId === 0){ |
this.flagAd = false; |
||||
if (this.inProfitAdList.length > this.pageNum*this.pageSize-1 ) { |
this.pageNum += 1; |
||||
this.flagAd = false; |
this.queryFrontInProfitAmt(); |
||||
this.pageNum += 1 |
} else { |
||||
this.queryFrontInProfitAmt(); |
this.flagAd = true; |
||||
}else{ |
} |
||||
this.flagAd = true; |
} else { |
||||
} |
if (this.inProfitInviteList.length > this.pageNum * this.pageSize - 1) { |
||||
}else{ |
this.flagInvite = false; |
||||
if (this.inProfitInviteList.length > this.pageNum*this.pageSize-1 ) { |
this.pageNum += 1; |
||||
this.flagInvite = false; |
this.queryFrontInProfitAmt(); |
||||
this.pageNum += 1 |
} else { |
||||
this.queryFrontInProfitAmt(); |
this.flagInvite = true; |
||||
}else{ |
} |
||||
this.flagInvite = true; |
} |
||||
} |
}, |
||||
} |
methods: { |
||||
|
// 查询指定艺术家已入账收益列表 |
||||
|
async queryFrontInProfitAmt() { |
||||
|
const res = await queryFrontInProfitAmt({ |
||||
|
creatorId: this.userInfo.id, |
||||
|
type: this.typeId, |
||||
|
pageSize: this.pageSize, |
||||
|
pageNum: this.pageNum, |
||||
|
}); |
||||
|
if (res.data.code === 200) { |
||||
|
if (this.typeId === 0) { |
||||
|
this.inProfitAdList.push(...res.data.rows); |
||||
|
} else { |
||||
|
this.inProfitInviteList.push(...res.data.rows); |
||||
|
} |
||||
|
} else { |
||||
|
uni.showModal({ |
||||
|
content: "已入账列表数据加载失败!", |
||||
|
showCancel: false, |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
}, |
onClickItem(e) { |
||||
methods: { |
let that = this; |
||||
|
that.inProfitAdList = []; |
||||
|
that.inProfitInviteList = []; |
||||
|
if (that.typeId !== e.currentIndex) { |
||||
|
that.typeId = e.currentIndex; |
||||
|
uni.showLoading({ |
||||
|
title: "加载中", |
||||
|
mask: true, |
||||
|
success() { |
||||
|
// 查询指定艺术家已入账收益列表 |
||||
|
const param = { |
||||
|
creatorId: that.userInfo.id, |
||||
|
type: that.typeId, |
||||
|
pageSize: that.pageSize, |
||||
|
pageNum: 1, |
||||
|
}; |
||||
|
queryFrontInProfitAmt(param).then((res) => { |
||||
|
if (res.data.code === 200) { |
||||
|
if (that.typeId === 0) { |
||||
|
that.inProfitAdList.push(...res.data.rows); |
||||
|
} else { |
||||
|
that.inProfitInviteList.push(...res.data.rows); |
||||
|
} |
||||
|
console.log("点击操作inProfitAdList", that.inProfitAdList); |
||||
|
console.log( |
||||
|
"点击操作inProfitInviteList", |
||||
|
that.inProfitInviteList |
||||
|
); |
||||
|
} else { |
||||
|
uni.showModal({ |
||||
|
content: "已入账列表数据加载失败!", |
||||
|
showCancel: false, |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
complete() { |
||||
|
uni.hideLoading(); |
||||
|
}, |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
// 查询指定艺术家已入账收益列表 |
targetToOrder(id) { |
||||
async queryFrontInProfitAmt() { |
console.log("id", id); |
||||
const res = await queryFrontInProfitAmt({ |
if (id) { |
||||
creatorId: this.userInfo.id, |
uni.navigateTo({ |
||||
type: this.typeId, |
url: "../profit/profitInOrder?id=" + id, |
||||
pageSize: this.pageSize, |
}); |
||||
pageNum: this.pageNum |
} |
||||
}) |
}, |
||||
if (res.data.code === 200) { |
setPlatform(data) { |
||||
if(this.typeId === 0){ |
if (data == "0") { |
||||
this.inProfitAdList.push(...res.data.rows) |
return "抖音"; |
||||
}else{ |
} else if (data == "1") { |
||||
this.inProfitInviteList.push(...res.data.rows) |
return "快手"; |
||||
} |
} else if (data == "2") { |
||||
} else { |
return "微信"; |
||||
uni.showModal({ |
} else if (data == "3") { |
||||
content: '已入账列表数据加载失败!', |
return "uniapp"; |
||||
showCancel: false |
} |
||||
}); |
}, |
||||
} |
setAppType(data) { |
||||
}, |
if (data == "0") { |
||||
|
return "次元壁纸"; |
||||
onClickItem(e) { |
} |
||||
let that = this |
}, |
||||
that.inProfitAdList = [] |
setType(data) { |
||||
that.inProfitInviteList = [] |
if (data == "0") { |
||||
if (that.typeId !== e.currentIndex) { |
return "广告浏览"; |
||||
that.typeId = e.currentIndex |
} else if (data == "1") { |
||||
uni.showLoading({ |
return "邀请"; |
||||
title: '加载中', |
} else if (data == "2") { |
||||
mask: true, |
return "会员"; |
||||
success() { |
} |
||||
// 查询指定艺术家已入账收益列表 |
}, |
||||
const param = { |
}, |
||||
creatorId: that.userInfo.id, |
}; |
||||
type: that.typeId, |
|
||||
pageSize: that.pageSize, |
|
||||
pageNum: 1 |
|
||||
} |
|
||||
queryFrontInProfitAmt(param).then(res => { |
|
||||
if (res.data.code === 200) { |
|
||||
if(that.typeId === 0){ |
|
||||
that.inProfitAdList.push(...res.data.rows) |
|
||||
}else{ |
|
||||
that.inProfitInviteList.push(...res.data.rows) |
|
||||
} |
|
||||
console.log('点击操作inProfitAdList',that.inProfitAdList) |
|
||||
console.log('点击操作inProfitInviteList',that.inProfitInviteList) |
|
||||
} else { |
|
||||
uni.showModal({ |
|
||||
content: '已入账列表数据加载失败!', |
|
||||
showCancel: false |
|
||||
}); |
|
||||
} |
|
||||
}) |
|
||||
}, |
|
||||
complete() { |
|
||||
uni.hideLoading(); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
targetToOrder(id) { |
|
||||
console.log('id', id) |
|
||||
if (id) { |
|
||||
uni.navigateTo({ |
|
||||
url: '../profit/profitInOrder?id=' + id |
|
||||
}) |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"> |
||||
.uni-list-item__icon-img{ |
.uni-list-item__icon-img { |
||||
border-radius: 8px; |
border-radius: 8px; |
||||
} |
} |
||||
.ivOver { |
.ivOver { |
||||
width: 100%; |
width: 100%; |
||||
height: 50px; |
height: 50px; |
||||
line-height: 50px; |
line-height: 50px; |
||||
text-align: center; |
text-align: center; |
||||
background: #fff; |
background: #fff; |
||||
font-size: 20rpx; |
font-size: 20rpx; |
||||
} |
} |
||||
|
.box { |
||||
|
display: flex; |
||||
|
padding-right: 8px; |
||||
|
flex: 1; |
||||
|
color: #3b4144; |
||||
|
flex-direction: column; |
||||
|
justify-content: center; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
.box-bot { |
||||
|
display: flex; |
||||
|
margin-top: 5px; |
||||
|
} |
||||
|
.box-bot view { |
||||
|
border-radius: 3px; |
||||
|
border: 1px solid #4d6aff; |
||||
|
padding: 2px 5px; |
||||
|
margin-right: 5px; |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
.uni-list-item__content-title { |
||||
|
font-size: 14px; |
||||
|
color: #3b4144; |
||||
|
overflow: hidden; |
||||
|
} |
||||
</style> |
</style> |
||||
|
|||||
@ -1,179 +1,282 @@ |
|||||
<template> |
<template> |
||||
<view> |
<view> |
||||
<view class="uni-padding-wrap uni-common-mt"> |
<view class="uni-padding-wrap uni-common-mt"> |
||||
<uni-segmented-control :current="typeId" :values="items" :style-type="styleType" :active-color="activeColor" |
<uni-segmented-control |
||||
@clickItem="onClickItem" /> |
:current="typeId" |
||||
</view> |
:values="items" |
||||
<view class="content"> |
:style-type="styleType" |
||||
<view v-if="typeId === 0"> |
:active-color="activeColor" |
||||
<uni-list border-full v-for="(item,index) in preProfitAdList" :key="index"> |
@clickItem="onClickItem" |
||||
|
/> |
||||
<uni-list-item :title="item.createTime+'@'+item.scanCode" |
</view> |
||||
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" |
<view class="content"> |
||||
:rightText="item.downloadNum+'次'" > |
<view v-if="typeId === 0"> |
||||
<template v-slot:body> |
<uni-list |
||||
<text class="slot-box slot-text">自定义插槽</text> |
border-full |
||||
</template> |
v-for="(item, index) in preProfitAdList" |
||||
</uni-list-item> |
:key="index" |
||||
</uni-list> |
> |
||||
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view> |
<uni-list-item |
||||
</view> |
:title="item.createTime + '@' + item.scanCode" |
||||
<view v-if="typeId === 1"> |
:note="item.appType + '&' + item.platform + '&' + item.type" |
||||
<uni-list border-full v-for="(item,index) in preprofitInviteList" :key="index"> |
:thumb="item.url" |
||||
<uni-list-item :title="item.createTime+'@'+item.scanCode" |
thumb-size="lg" |
||||
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" |
:rightText="item.downloadNum + '次'" |
||||
:rightText="item.downloadNum+'次'" /> |
> |
||||
</uni-list> |
<template v-slot:body> |
||||
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> |
<view class="box"> |
||||
</view> |
<view class="uni-list-item__content-title">{{ |
||||
</view> |
item.createTime + "@" + item.scanCode |
||||
</view> |
}}</view> |
||||
|
<view class="box-bot"> |
||||
|
<view> |
||||
|
{{ setAppType(item.appType) }} |
||||
|
</view> |
||||
|
<view> |
||||
|
{{ setPlatform(item.platform) }} |
||||
|
</view> |
||||
|
<view style="color: #4d6aff"> |
||||
|
{{ item.confirmStatus == 0 ? "待确认" : "已确认" }} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
</uni-list-item> |
||||
|
</uni-list> |
||||
|
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view> |
||||
|
</view> |
||||
|
<view v-if="typeId === 1"> |
||||
|
<uni-list |
||||
|
border-full |
||||
|
v-for="(item, index) in preprofitInviteList" |
||||
|
:key="index" |
||||
|
> |
||||
|
<uni-list-item |
||||
|
:title="item.createTime + '@' + item.scanCode" |
||||
|
:note="item.appType + '&' + item.platform + '&' + item.type" |
||||
|
:thumb="item.url" |
||||
|
thumb-size="lg" |
||||
|
:rightText="item.downloadNum + '次'" |
||||
|
> |
||||
|
<template v-slot:body> |
||||
|
<view class="box"> |
||||
|
<view class="uni-list-item__content-title">{{ |
||||
|
item.createTime + "@" + item.scanCode |
||||
|
}}</view> |
||||
|
<view class="box-bot"> |
||||
|
<view> |
||||
|
{{ setAppType(item.appType) }} |
||||
|
</view> |
||||
|
<view> |
||||
|
{{ setPlatform(item.platform) }} |
||||
|
</view> |
||||
|
<view style="color: #4d6aff"> |
||||
|
{{ item.confirmStatus == 0 ? "待确认" : "已确认" }} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
</uni-list-item> |
||||
|
</uni-list> |
||||
|
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { |
import { queryFrontPreProfit } from "@/api/profit.js"; |
||||
queryFrontPreProfit |
export default { |
||||
} from '@/api/profit.js' |
data() { |
||||
export default { |
return { |
||||
data() { |
preProfitAdList: [], |
||||
return { |
preprofitInviteList: [], |
||||
preProfitAdList: [], |
items: ["广告", "邀请"], |
||||
preprofitInviteList:[], |
typeId: 0, |
||||
items: ['广告', '邀请'], |
activeColor: "#007aff", |
||||
typeId: 0, |
styleType: "text", |
||||
activeColor: '#007aff', |
userInfo: {}, |
||||
styleType: 'text', |
pageSize: 10, |
||||
userInfo: {}, |
pageNum: 1, |
||||
pageSize: 10, |
flagAd: false, |
||||
pageNum: 1, |
flagInvite: false, |
||||
flagAd: false, |
}; |
||||
flagInvite: false |
}, |
||||
} |
created() { |
||||
}, |
const userInfoSync = uni.getStorageSync("userInfo"); |
||||
created() { |
this.userInfo = userInfoSync; |
||||
const userInfoSync = uni.getStorageSync('userInfo') |
const typeProfitId = uni.getStorageSync("typeId"); |
||||
this.userInfo = userInfoSync |
this.typeId = typeProfitId; |
||||
const typeProfitId = uni.getStorageSync('typeId') |
if (typeProfitId) { |
||||
this.typeId = typeProfitId |
this.queryFrontPreProfit(); |
||||
if (typeProfitId) { |
} else { |
||||
this.queryFrontPreProfit() |
this.queryFrontPreProfit(); |
||||
} else { |
} |
||||
this.queryFrontPreProfit() |
}, |
||||
} |
// 下拉刷新 |
||||
}, |
onPullDownRefresh() { |
||||
// 下拉刷新 |
if (this.typeId === 0) { |
||||
onPullDownRefresh() { |
this.pageNum = 1; |
||||
if(this.typeId === 0){ |
this.preProfitAdList = []; |
||||
this.pageNum = 1 |
this.queryFrontPreProfit(); |
||||
this.preProfitAdList = [] |
uni.stopPullDownRefresh(); |
||||
this.queryFrontPreProfit() |
} else { |
||||
uni.stopPullDownRefresh() |
this.pageNum = 1; |
||||
}else{ |
this.preprofitInviteList = []; |
||||
this.pageNum = 1 |
this.queryFrontPreProfit(); |
||||
this.preprofitInviteList = [] |
uni.stopPullDownRefresh(); |
||||
this.queryFrontPreProfit() |
} |
||||
uni.stopPullDownRefresh() |
}, |
||||
} |
// 上划加载更多 |
||||
}, |
onReachBottom() { |
||||
// 上划加载更多 |
if (this.typeId === 0) { |
||||
onReachBottom() { |
if (this.preProfitAdList.length > this.pageNum * this.pageSize - 1) { |
||||
if(this.typeId === 0){ |
this.flagAd = false; |
||||
if (this.preProfitAdList.length > this.pageNum*this.pageSize-1 ) { |
this.pageNum += 1; |
||||
this.flagAd = false; |
this.queryFrontPreProfit(); |
||||
this.pageNum += 1 |
} else { |
||||
this.queryFrontPreProfit(); |
this.flagAd = true; |
||||
}else{ |
} |
||||
this.flagAd = true; |
} else { |
||||
} |
if (this.preprofitInviteList.length > this.pageNum * this.pageSize - 1) { |
||||
}else{ |
this.flagInvite = false; |
||||
if (this.preprofitInviteList.length > this.pageNum*this.pageSize-1 ) { |
this.pageNum += 1; |
||||
this.flagInvite = false; |
this.queryFrontPreProfit(); |
||||
this.pageNum += 1 |
} else { |
||||
this.queryFrontPreProfit(); |
this.flagInvite = true; |
||||
}else{ |
} |
||||
this.flagInvite = true; |
} |
||||
} |
}, |
||||
} |
methods: { |
||||
|
onClickItem(e) { |
||||
}, |
let that = this; |
||||
methods: { |
that.preProfitAdList = []; |
||||
onClickItem(e) { |
that.preprofitInviteList = []; |
||||
let that = this |
if (that.typeId !== e.currentIndex) { |
||||
that.preProfitAdList = [] |
that.typeId = e.currentIndex; |
||||
that.preprofitInviteList = [] |
uni.showLoading({ |
||||
if (that.typeId !== e.currentIndex) { |
title: "加载中", |
||||
that.typeId = e.currentIndex |
mask: true, |
||||
uni.showLoading({ |
success() { |
||||
title: '加载中', |
// 查询即将入账邀请收益列表 |
||||
mask: true, |
const param = { |
||||
success() { |
creatorId: that.userInfo.id, |
||||
// 查询即将入账邀请收益列表 |
type: that.typeId, |
||||
const param = { |
pageSize: that.pageSize, |
||||
creatorId: that.userInfo.id, |
pageNum: 1, |
||||
type: that.typeId, |
}; |
||||
pageSize: that.pageSize, |
queryFrontPreProfit(param).then((res) => { |
||||
pageNum: 1 |
if (res.data.code === 200) { |
||||
} |
if (that.typeId === 0) { |
||||
queryFrontPreProfit(param).then(res => { |
that.preProfitAdList.push(...res.data.rows); |
||||
if (res.data.code === 200) { |
} else { |
||||
if(that.typeId === 0){ |
that.preprofitInviteList.push(...res.data.rows); |
||||
that.preProfitAdList.push(...res.data.rows) |
} |
||||
}else{ |
console.log("点击操作preProfitAdList", that.preProfitAdList); |
||||
that.preprofitInviteList.push(...res.data.rows) |
console.log( |
||||
} |
"点击操作preprofitInviteList", |
||||
console.log('点击操作preProfitAdList',that.preProfitAdList) |
that.preprofitInviteList |
||||
console.log('点击操作preprofitInviteList',that.preprofitInviteList) |
); |
||||
} else { |
} else { |
||||
uni.showModal({ |
uni.showModal({ |
||||
content: '即将到账列表数据加载失败!', |
content: "即将到账列表数据加载失败!", |
||||
showCancel: false |
showCancel: false, |
||||
}); |
}); |
||||
} |
} |
||||
}) |
}); |
||||
}, |
}, |
||||
complete() { |
complete() { |
||||
uni.hideLoading(); |
uni.hideLoading(); |
||||
} |
}, |
||||
}); |
}); |
||||
|
} |
||||
} |
}, |
||||
}, |
|
||||
|
|
||||
// 查询即将入账邀请收益列表 |
// 查询即将入账邀请收益列表 |
||||
async queryFrontPreProfit() { |
async queryFrontPreProfit() { |
||||
const res = await queryFrontPreProfit({ |
const res = await queryFrontPreProfit({ |
||||
creatorId: this.userInfo.id, |
creatorId: this.userInfo.id, |
||||
type: this.typeId, |
type: this.typeId, |
||||
pageSize: this.pageSize, |
pageSize: this.pageSize, |
||||
pageNum: this.pageNum |
pageNum: this.pageNum, |
||||
}) |
}); |
||||
if (res.data.code === 200) { |
if (res.data.code === 200) { |
||||
if(this.typeId === 0){ |
if (this.typeId === 0) { |
||||
this.preProfitAdList.push(...res.data.rows) |
this.preProfitAdList.push(...res.data.rows); |
||||
}else{ |
} else { |
||||
this.preprofitInviteList.push(...res.data.rows) |
this.preprofitInviteList.push(...res.data.rows); |
||||
} |
} |
||||
} else { |
} else { |
||||
uni.showModal({ |
uni.showModal({ |
||||
content: '即将到账列表数据加载失败!', |
content: "即将到账列表数据加载失败!", |
||||
showCancel: false |
showCancel: false, |
||||
}); |
}); |
||||
} |
} |
||||
}, |
}, |
||||
} |
setPlatform(data) { |
||||
} |
if (data == "0") { |
||||
|
return "抖音"; |
||||
|
} else if (data == "1") { |
||||
|
return "快手"; |
||||
|
} else if (data == "2") { |
||||
|
return "微信"; |
||||
|
} else if (data == "3") { |
||||
|
return "uniapp"; |
||||
|
} |
||||
|
}, |
||||
|
setAppType(data) { |
||||
|
if (data == "0") { |
||||
|
return "次元壁纸"; |
||||
|
} |
||||
|
}, |
||||
|
setType(data) { |
||||
|
if (data == "0") { |
||||
|
return "广告浏览"; |
||||
|
} else if (data == "1") { |
||||
|
return "邀请"; |
||||
|
} else if (data == "2") { |
||||
|
return "会员"; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss"> |
<style lang="scss"> |
||||
.uni-list-item__icon-img{ |
.uni-list-item__icon-img { |
||||
border-radius: 8px; |
border-radius: 8px; |
||||
} |
} |
||||
.ivOver{ |
.ivOver { |
||||
width: 100%; |
width: 100%; |
||||
height:50px; |
height: 50px; |
||||
line-height: 50px; |
line-height: 50px; |
||||
text-align: center; |
text-align: center; |
||||
background: #fff; |
background: #fff; |
||||
font-size: 20rpx; |
font-size: 20rpx; |
||||
} |
} |
||||
|
.box { |
||||
|
display: flex; |
||||
|
padding-right: 8px; |
||||
|
flex: 1; |
||||
|
color: #3b4144; |
||||
|
flex-direction: column; |
||||
|
justify-content: center; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
.box-bot { |
||||
|
display: flex; |
||||
|
margin-top: 5px; |
||||
|
} |
||||
|
.box-bot view { |
||||
|
border-radius: 3px; |
||||
|
border: 1px solid #4d6aff; |
||||
|
padding: 2px 5px; |
||||
|
margin-right: 5px; |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
.uni-list-item__content-title { |
||||
|
font-size: 14px; |
||||
|
color: #3b4144; |
||||
|
overflow: hidden; |
||||
|
} |
||||
</style> |
</style> |
||||
|
|||||
Loading…
Reference in new issue