Browse Source

页面样式, 列表滚动加载

feature-1.0
helming 3 years ago
parent
commit
449f63356d
  1. 34
      pages-userInfo/extends/extends.vue
  2. 2
      pages-userInfo/withdraw/withdrawDetail.vue
  3. 37
      pages-userInfo/withdraw/withdrawLog.vue
  4. 8
      pages.json
  5. 4
      pages/index/index.vue
  6. 60
      pages/index/material/imgDetail.vue
  7. 171
      pages/index/material/material.vue
  8. 85
      pages/index/upload/upload.vue
  9. 17
      pages/profit/profit.vue
  10. 79
      pages/profit/profitEndDetails.vue
  11. 77
      pages/profit/profitInDetails.vue
  12. 81
      pages/profit/profitPreDetails.vue
  13. 6
      pages/userInfo/userInfo.vue

34
pages-userInfo/extends/extends.vue

@ -17,7 +17,10 @@
<uni-list border-full v-for="(item,index) in inviteLogList" :key="index"> <uni-list border-full v-for="(item,index) in inviteLogList" :key="index">
<uni-list-item :title="item.invitedScanCode" :note="item.createTime" :thumb="item.img" thumb-size="lg" /> <uni-list-item :title="item.invitedScanCode" :note="item.createTime" :thumb="item.img" thumb-size="lg" />
</uni-list> </uni-list>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view> <!-- 显示加载中或者全部加载完成 -->
<view>
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view> </view>
</view> </view>
@ -34,7 +37,9 @@
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
userInfo: {}, userInfo: {},
flag: false flag: false,
loadStatus:'noMore', //more - loading - noMore -
isLoadMore:false, //
} }
}, },
created() { created() {
@ -65,13 +70,13 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
// //
onReachBottom() { onReachBottom() {//
if (this.inviteLogList.length > this.pageSize*this.pageNum-1) { if(!this.isLoadMore) { //
this.flag = false; this.isLoadMore=true
this.pageNum += 1 if (this.loadStatus === "more") {
this.pageNum += 1 //
this.getInviteLog(); this.getInviteLog();
}else{ }
this.flag = true;
} }
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
@ -87,6 +92,7 @@
// //
async getInviteLog() { async getInviteLog() {
let that = this; let that = this;
that.loadStatus = 'loading';
const res = await getInviteLog({ const res = await getInviteLog({
pageSize: that.pageSize, pageSize: that.pageSize,
pageNum: that.pageNum, pageNum: that.pageNum,
@ -95,12 +101,22 @@
console.log('res', res) console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
that.inviteLogList.push(...res.data.rows) that.inviteLogList.push(...res.data.rows)
console.log('inviteLogList', that.inviteLogList) if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
that.loadStatus = 'noMore'
}else{
this.loadStatus = 'more';
that.isLoadMore = false
}
} else { } else {
uni.showModal({ uni.showModal({
content: '邀请记录加载失败!', content: '邀请记录加载失败!',
showCancel: false showCancel: false
}); });
that.isLoadMore = false
if(that.page > 1){
that.page -= 1
}
} }
}, },
} }

2
pages-userInfo/withdraw/withdrawDetail.vue

@ -17,7 +17,7 @@
</view> </view>
<view class="box"> <view class="box">
<text class="title">提现金额:</text> <text class="title">提现金额:</text>
<MoneyView :character="'¥'" :size="26" :value="orderDetail.profit || 0" :color="'#0b6375'"/> <MoneyView :character="'¥'" :size="26" :value="withdrawDetailInfo.amt || 0" :color="'#0b6375'"/>
</view> </view>
<view class="box"> <view class="box">
<text class="title">渠道:</text> <text class="title">渠道:</text>

37
pages-userInfo/withdraw/withdrawLog.vue

@ -28,7 +28,10 @@
</template> </template>
</uni-list-item> </uni-list-item>
</uni-list> </uni-list>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view> <!-- 显示加载中或者全部加载完成 -->
<view>
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view> </view>
</template> </template>
@ -43,13 +46,14 @@
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
userInfo: {}, userInfo: {},
flag: false flag: false,
loadStatus:'noMore', //more - loading - noMore -
isLoadMore:false, //
} }
}, },
created() { created() {
const userInfo = uni.getStorageSync('userInfo') const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) { if (!userInfo) {
console.log('havent userInfo')
uni.showModal({ uni.showModal({
content: '艺术家账户过期,请重新登录!', content: '艺术家账户过期,请重新登录!',
showCancel: false, showCancel: false,
@ -62,7 +66,6 @@
}); });
} else { } else {
this.userInfo = userInfo; this.userInfo = userInfo;
console.log('have userInfo')
} }
this.getWithdrawList(); this.getWithdrawList();
}, },
@ -74,37 +77,47 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
// //
onReachBottom() { onReachBottom() {//
if (this.withdrawList.length > this.pageSize*this.pageNum-1) { if(!this.isLoadMore) { //
this.flag = false; this.isLoadMore=true
this.pageNum += 1 if (this.loadStatus === "more") {
this.pageNum += 1 //
this.getWithdrawList(); this.getWithdrawList();
}else{ }
this.flag = true;
} }
}, },
methods: { methods: {
// //
async getWithdrawList() { async getWithdrawList() {
let that = this; let that = this;
that.loadStatus = 'loading';
const res = await getWithdrawList({ const res = await getWithdrawList({
pageSize: that.pageSize, pageSize: that.pageSize,
pageNum: that.pageNum, pageNum: that.pageNum,
creatorId: that.userInfo.id creatorId: that.userInfo.id
}) })
console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
that.withdrawList.push(...res.data.rows) that.withdrawList.push(...res.data.rows)
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
that.loadStatus = 'noMore'
}else{
this.loadStatus = 'more';
that.isLoadMore = false
}
} else { } else {
uni.showModal({ uni.showModal({
content: '提现记录列表数据加载失败!', content: '提现记录列表数据加载失败!',
showCancel: false showCancel: false
}); });
that.isLoadMore = false
if(that.page > 1){
that.page -= 1
}
} }
}, },
targetToDetail(orderId) { targetToDetail(orderId) {
console.log('orderId', orderId)
if (orderId) { if (orderId) {
uni.navigateTo({ uni.navigateTo({
url: 'withdrawDetail?orderId=' + orderId, url: 'withdrawDetail?orderId=' + orderId,

8
pages.json

@ -4,7 +4,7 @@
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "次元Hub", "navigationBarTitleText": "次元Hub",
"enablePullDownRefresh": true, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#141b29", "navigationBarBackgroundColor": "#141b29",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
@ -13,7 +13,7 @@
"path": "pages/profit/profit", "path": "pages/profit/profit",
"style": { "style": {
"navigationBarTitleText": "收益", "navigationBarTitleText": "收益",
"enablePullDownRefresh": true, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
@ -99,7 +99,7 @@
"path": "pages/userInfo/userInfo", "path": "pages/userInfo/userInfo",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": true, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }
@ -132,7 +132,7 @@
"path": "setting/setting", "path": "setting/setting",
"style": { "style": {
"navigationBarTitleText": "系统设置", "navigationBarTitleText": "系统设置",
"enablePullDownRefresh": true "enablePullDownRefresh": false
} }
}, { }, {
"path": "notice/notice", "path": "notice/notice",

4
pages/index/index.vue

@ -182,11 +182,11 @@
}, },
// banner // banner
linkTo(item) { linkTo(item) {
if (item.id) { /*if (item.id) {
uni.navigateTo({ uni.navigateTo({
url: '../index/banner' url: '../index/banner'
}); });
} }*/
}, },
// banner // banner

60
pages/index/material/imgDetail.vue

@ -1,7 +1,13 @@
<template> <template>
<view class="imgDetail"> <view class="imgDetail">
<view class="img-view"> <view class="img-view">
<image class="main-img" :src="detailMsg.imgUrl" :style="'width:'+imgWidth+';height:'+imgHeight+';'" mode=""></image> <image
class="main-img"
:class="[1, 2, 5, 6].includes(detailMsg.typeId) ? 'img-2x2' : [4].includes(detailMsg.typeId) ? 'img-1x1' : 'img-2x3'"
:src="detailMsg.imgUrl"
mode=""
>
</image>
</view> </view>
<view class="toolbar" :style="'display:'+showOrmis"> <view class="toolbar" :style="'display:'+showOrmis">
<view class="toolbarLeft" @click="$noMultipleClicks(topImg)">置顶</view> <view class="toolbarLeft" @click="$noMultipleClicks(topImg)">置顶</view>
@ -99,7 +105,7 @@
title:'修改标签成功!', title:'修改标签成功!',
duration: 1000, duration: 1000,
success() { success() {
that.$refs.showRight.close(); that.$refs.showPopup.close();
that.signListSelected = []; that.signListSelected = [];
} }
}) })
@ -165,7 +171,7 @@
// //
changeSign(){ changeSign(){
console.log('修改标签'); // console.log('');
// //
this.$refs.showPopup.open(); this.$refs.showPopup.open();
}, },
@ -183,7 +189,7 @@
duration: 1000, duration: 1000,
success() { success() {
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.reLaunch({
url: `/pages/index/material/material?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}` url: `/pages/index/material/material?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`
}); });
}, 1000) }, 1000)
@ -203,33 +209,6 @@
const res = await getImgDetails(id) const res = await getImgDetails(id)
if (res.data.code === 200) { if (res.data.code === 200) {
this.detailMsg = res.data.data this.detailMsg = res.data.data
console.log('图片详情', this.detailMsg)
//
if(this.detailMsg.typeId === 1){
this.imgWidth = 750 + 'rpx';
this.imgHeight = 750 + 'rpx';
this.marginTop = 250 + 'rpx';
}else if(this.detailMsg.typeId === 2){
this.imgWidth = 750 + 'rpx';
this.imgHeight = 100 + '%';
this.marginTop = 0 + 'rpx';
}else if(this.detailMsg.typeId === 3){
this.imgWidth = 750 + 'rpx';
this.imgHeight = 100 + '%';
this.marginTop = 0 + 'rpx';
}else if(this.detailMsg.typeId === 4){
this.marginTop = 300 + 'rpx';
this.imgWidth = 750 + 'rpx';
this.imgHeight = 600 + 'rpx';
}else if(this.detailMsg.typeId === 5){
this.imgWidth = 750 + 'rpx';
this.imgHeight = 750 + 'rpx';
this.marginTop = 250 + 'rpx';
}else if(this.detailMsg.typeId === 6){
this.imgWidth = 750 + 'rpx';
this.imgHeight = 750 + 'rpx';
this.marginTop = 250 + 'rpx';
}
/// ///
// //
if(this.detailMsg.status === "0"){ if(this.detailMsg.status === "0"){
@ -271,6 +250,7 @@
height: 100vh; height: 100vh;
background: $uni-bg-base-color; background: $uni-bg-base-color;
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
z-index: 1; z-index: 1;
@ -279,6 +259,22 @@
.main-img { .main-img {
} }
.img-2x2 {
width: 670rpx;
height: 670rpx;
}
.img-1x1 {
width: 670rpx;
height: calc(670rpx - (670rpx / 4)) ;
}
.img-2x3 {
width: calc(100vw - 40rpx);
height: calc(100vh - 40rpx) ;
}
.toolbar{ .toolbar{
height: 100rpx; height: 100rpx;
width: 700rpx; width: 700rpx;
@ -286,7 +282,7 @@
border-radius: 20rpx; border-radius: 20rpx;
background-color: $uni-primary; background-color: $uni-primary;
color: $uni-white; color: $uni-white;
position: absolute; position: fixed;
bottom: 68rpx; bottom: 68rpx;
left: 25rpx; left: 25rpx;
right: 25rpx; right: 25rpx;

171
pages/index/material/material.vue

@ -24,10 +24,17 @@
<uni-segmented-control :current="typeCurrent" :values="typeList" :style-type="styleType" <uni-segmented-control :current="typeCurrent" :values="typeList" :style-type="styleType"
:active-color="activeColor" @clickItem="onClickType" />--> :active-color="activeColor" @clickItem="onClickType" />-->
<view class="choiceness-list"> <view class="choiceness-list">
<view class="images-box">
<image v-for="(item,index) in creatorImgList" :key='index' class="img-box" <image v-for="(item,index) in creatorImgList" :key='index' class="img-box"
:style="'width:'+imgWidth+';height:'+imgHeight" :src="item.imgUrl" @click="targetDetail(item)" :class="[1, 2, 5, 6].includes(item.typeId) ? 'img-2x2' : [4].includes(item.typeId) ? 'img-1x1' : 'img-2x3'"
:src="item.imgUrl"
@click="targetDetail(item)"
mode=""></image> mode=""></image>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view> </view>
<!-- 显示加载中或者全部加载完成 -->
<view>
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view> </view>
</view> </view>
</template> </template>
@ -40,7 +47,6 @@
data() { data() {
return { return {
statusCurrent: 0, statusCurrent: 0,
activeColor: '#007aff',
styleType: 'text', styleType: 'text',
statusList: ['待审核','审核拒绝','已上架','已下架'], statusList: ['待审核','审核拒绝','已上架','已下架'],
typeList:[], typeList:[],
@ -49,12 +55,14 @@
typeId: 1, typeId: 1,
status: 0, status: 0,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 18,
creatorImgList: [], creatorImgList: [],
userInfo: {}, userInfo: {},
imgWidth: 0, // imgWidth: 0, //
imgHeight: 0, // imgHeight: 0, //
flag: false flag: false,
loadStatus:'noMore', //more - loading - noMore -
isLoadMore:false, //
} }
}, },
onLoad(option) { onLoad(option) {
@ -89,8 +97,7 @@
console.log('have userInfo') console.log('have userInfo')
} }
this.queryListType(); this.queryListType();
this.imgWidth = 750/3-20 + 'rpx'
this.imgHeight = 750/3-20 + 'rpx'
}, },
// //
onPullDownRefresh(){ onPullDownRefresh(){
@ -101,13 +108,13 @@
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
// //
onReachBottom() { onReachBottom(e) {//
if (this.creatorImgList.length > this.pageSize*this.pageNum-1) { if(!this.isLoadMore) { //
this.flag = false; this.isLoadMore=true
this.pageNum += 1 if (this.loadStatus === "more") {
this.listTiktokImgIn() this.pageNum += 1 //
}else{ this.listTiktokImgIn();
this.flag = true; }
} }
}, },
methods: { methods: {
@ -120,14 +127,13 @@
key: 'detailId', key: 'detailId',
data: item.id, data: item.id,
success() { success() {
console.log(111111)
uni.navigateTo({ uni.navigateTo({
url: `/pages/index/material/imgDetail?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`, url: `/pages/index/material/imgDetail?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`,
success:function(){ success:function(){
console.log('跳转成功!') // console.log('!')
}, },
fail:function(){ fail:function(){
console.log('跳转失败!') // console.log('!')
} }
}) })
} }
@ -144,31 +150,15 @@
// that.typeCurrent = 0; // that.typeCurrent = 0;
// that.typeId = that.typeIdList[0]; // that.typeId = that.typeIdList[0];
// console.log('status',that.status) // console.log('status',that.status)
that.pageNum = 1;
that.loadStatus = 'loading';
that.isLoadMore = false;
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
mask: true, mask: true,
success() { success() {
// //
const param = { that.listTiktokImgIn();
creatorId: that.userInfo.id,
typeId: that.typeId,
pageSize: that.pageSize,
pageNum: that.pageNum,
status: that.status
};
listTiktokImgIn(param).then(res => {
console.log('that.typeId',that.typeId);
console.log('that.status',that.status);
if(res.data.code === 200){
that.creatorImgList.push(...res.data.rows)
//console.log('1!', that.creatorImgList);
}else {
uni.showModal({
content: "艺术家图片列表数据加载失败!",
showCancel: false,
});
}
});
}, },
complete() { complete() {
uni.hideLoading(); uni.hideLoading();
@ -181,52 +171,16 @@
that.creatorImgList = []; that.creatorImgList = [];
that.typeId = that.typeIdList[e2.currentIndex]; that.typeId = that.typeIdList[e2.currentIndex];
that.typeCurrent = e2.currentIndex; that.typeCurrent = e2.currentIndex;
that.pageNum = 1;
that.loadStatus = 'loading';
that.isLoadMore = false;
//console.log('typeId',that.typeId) //console.log('typeId',that.typeId)
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
mask: true, mask: true,
success() { success() {
// //
const param = { that.listTiktokImgIn();
creatorId: that.userInfo.id,
typeId: that.typeId,
pageSize: that.pageSize,
pageNum: that.pageNum,
status: that.status
};
listTiktokImgIn(param).then(res => {
// console.log('that.typeId',that.typeId);
// console.log('that.status',that.status);
if(res.data.code === 200){
that.creatorImgList.push(...res.data.rows)
// console.log(that.creatorImgList)
//console.log('2!', that.creatorImgList);
if(that.typeId === 1){
that.imgWidth = 750/3-20 + 'rpx'
that.imgHeight = 750/3-20 + 'rpx'
}else if(that.typeId === 2){
that.imgWidth = 750/3-30 + 'rpx'
that.imgHeight = 750/3+60 + 'rpx'
}else if(that.typeId === 3){
that.imgWidth = 750/3-30 + 'rpx'
that.imgHeight = 750/3+60 + 'rpx'
}else if(that.typeId === 4){
that.imgWidth = 750/3+100 + 'rpx'
that.imgHeight = 750/3 + 'rpx'
}else if(that.typeId === 5){
that.imgWidth = 750/3-20 + 'rpx'
that.imgHeight = 750/3-20 + 'rpx'
}else if(that.typeId === 6){
that.imgWidth = 750/3-20 + 'rpx'
that.imgHeight = 750/3-20 + 'rpx'
}
}else {
uni.showModal({
content: "艺术家图片列表数据加载失败!",
showCancel: false,
});
}
});
}, },
complete() { complete() {
uni.hideLoading(); uni.hideLoading();
@ -256,6 +210,7 @@
// //
async listTiktokImgIn() { async listTiktokImgIn() {
let that = this; let that = this;
that.loadStatus = 'loading';
const res = await listTiktokImgIn({ const res = await listTiktokImgIn({
pageNum: that.pageNum, pageNum: that.pageNum,
pageSize: that.pageSize, pageSize: that.pageSize,
@ -264,20 +219,32 @@
creatorId: that.userInfo.id creatorId: that.userInfo.id
}) })
if (res.data.code === 200) { if (res.data.code === 200) {
uni.hideLoading();
that.creatorImgList.push(...res.data.rows) that.creatorImgList.push(...res.data.rows)
console.log('creatorImgList',that.creatorImgList); // console.log('creatorImgList',that.creatorImgList);
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
that.loadStatus = 'noMore'
}else{
this.loadStatus = 'more';
that.isLoadMore = false
}
} else { } else {
uni.showModal({ uni.showModal({
content: '艺术家图片列表加载失败!', content: '艺术家图片列表加载失败!',
showCancel: false showCancel: false
}); });
that.isLoadMore = false
if(that.page > 1){
that.page -= 1
}
} }
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.choiceness { .choiceness {
width: 750rpx; width: 750rpx;
padding-top: 20rpx; padding-top: 20rpx;
@ -285,6 +252,10 @@
min-height: 100vh; min-height: 100vh;
.status-choice-comp { .status-choice-comp {
width: 670rpx;
position: fixed;
top: 0;
left: 0;
background: #1d2734; background: #1d2734;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -312,6 +283,11 @@
} }
.type-choice-comp { .type-choice-comp {
width: 710rpx;
background: $uni-bg-color;
position: fixed;
top: 68rpx;
left: 0;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
flex-wrap: nowrap; flex-wrap: nowrap;
@ -343,22 +319,43 @@
} }
.choiceness-list { .choiceness-list {
width: 670rpx;
margin: 128rpx auto;
//border: 1rpx solid blue;
.images-box {
width: 690rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
flex-direction: row; flex-direction: row;
width: 750rpx; margin-left: -10rpx;
//border: 1rpx solid blue; margin-right: -10rpx;
}
.img-box { .img-box {
margin-top: 10rpx;
margin-left: 16rpx;
//margin-right: 10rpx;
//margin:8rpx;
border-radius: 10rpx; border-radius: 10rpx;
//border: 1rpx solid red;
}
.img-2x2 {
width: calc((670rpx - 40rpx) / 3);
height: calc((670rpx - 40rpx) / 3);
margin: 10rpx;
}
.img-1x1 {
width: calc((670rpx - 20rpx) / 2);
height: calc((670rpx - 20rpx) / 2 - ((670rpx - 20rpx) / 9)) ;
margin: 10rpx;
} }
.img-2x3 {
width: calc((670rpx - 40rpx) / 3);
height: calc((670rpx - 40rpx) / 3 + ((670rpx - 40rpx) / 6)) ;
margin: 10rpx;
}
} }
} }

85
pages/index/upload/upload.vue

@ -18,7 +18,7 @@
@success="successHandler" @success="successHandler"
@fail="failHandler" @fail="failHandler"
@delete="deleteHandler" @delete="deleteHandler"
autoUpload="false" :autoUpload="false"
@select="selectHandler" @select="selectHandler"
:disabled="checkUpload"> :disabled="checkUpload">
</uni-file-picker> </uni-file-picker>
@ -31,7 +31,7 @@
<uni-data-checkbox mode="tag" multiple v-model="signListSelected" :localdata="signList" @change="selectedSign" max="3"></uni-data-checkbox> <uni-data-checkbox mode="tag" multiple v-model="signListSelected" :localdata="signList" @change="selectedSign" max="3"></uni-data-checkbox>
</view> </view>
</view> </view>
<button class="upLoadBtn" size="default" :loading="loadingFlag" @click="$noMultipleClicks(saveImg)" :disabled="checkUpload">点击上传</button> <button class="upLoadBtn" size="default" :loading="loadingFlag" @click="$noMultipleClicks(commit)" :disabled="checkUpload">点击上传</button>
</view> </view>
</template> </template>
@ -55,6 +55,7 @@
typeList:[], typeList:[],
typeIdList:[], typeIdList:[],
loadingFlag: false, loadingFlag: false,
fileList: [],
imgList:[], imgList:[],
signListSelected:[], signListSelected:[],
userInfo:{}, userInfo:{},
@ -181,17 +182,20 @@
}, },
// //
selectHandler(e){ selectHandler(e){
console.log('选择了',e) if (!e.tempFiles) {
return;
}
let that = this; let that = this;
that.fileList = [...that.fileList, ...e.tempFilePaths];
// //
if(that.uploadedNum >= 50){ if(that.uploadedNum >= 50){
uni.showModal({ uni.showModal({
content: "当日已达上传图片上限,请明日再来!", content: "当日已达上传图片上限,请明日再来!",
showCancel: false showCancel: false
}); });
return;
} }
that.uploadHandler(e.tempFilePaths) // that.uploadHandler(e.tempFilePaths)
}, },
// //
failHandler(e){ failHandler(e){
@ -201,30 +205,33 @@
deleteHandler(e){ deleteHandler(e){
console.log('文件删除',e.tempFile.url) console.log('文件删除',e.tempFile.url)
// //
const param = { let that = this;
url: e.tempFile.url that.fileList = that.fileList?.filter?.(item => {
}; item !== e.tempFile;
deleteFile(param).then(res =>{ })
if(res.data.code != 200){ },
commit() {
let that = this;
if (that.fileList.length === 0) {
uni.showModal({ uni.showModal({
content: "删除失败!", content: "请选择图片上传!",
showCancel: false showCancel: false,
}); });
return;
} }
}) that.uploadHandler(that.fileList);
}, },
// //
uploadHandler:function(e){ uploadHandler: async function(e){
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "上传中" title: "上传中"
}); });
console.log('上传文件:',e)
const tempFilePaths = e; const tempFilePaths = e;
for (var i = 0; i < tempFilePaths.length; i++) { for (var i = 0; i < tempFilePaths.length; i++) {
//const tempFile = e.tempFiles[i]; //const tempFile = e.tempFiles[i];
uni.uploadFile({ const [error, res] = await uni.uploadFile({
url: 'http://pc2zer.natappfree.cc/file/upload', url: 'http://8tiis2.natappfree.cc/file/upload',
name: 'file', name: 'file',
// url: 'http://pc2zer.natappfree.cc/file/uploadBatch', // url: 'http://pc2zer.natappfree.cc/file/uploadBatch',
// name: 'files', // name: 'files',
@ -232,28 +239,31 @@
"Content-Type": "multipart/form-data" "Content-Type": "multipart/form-data"
}, },
filePath: tempFilePaths[i], filePath: tempFilePaths[i],
success:(uploadFileRes) => { // success:(uploadFileRes) => {
uni.hideLoading(); // // uni.hideLoading();
console.log('uploadFileRes',uploadFileRes); // const back = JSON.parse(uploadFileRes.data);
const back = JSON.parse(uploadFileRes.data); // if (back.code == 200) {
console.log("back",back) // that.imgList.push(back.data);
// }
// },
// fail:() => {
// uni.hideLoading();
// uni.showModal({
// content: ""
// });
// },
// complete: function() {
// uni.hideLoading();
// }
});
const back = JSON.parse(res.data);
if (back.code == 200) { if (back.code == 200) {
that.imgList.push(back.data); that.imgList.push(back.data);
} }
//console.log('imgList',that.imgList);
},
fail:() => {
uni.hideLoading();
uni.showModal({
content: "上传失败,请联系客服!"
});
},
complete: function() {
uni.hideLoading();
}
});
} }
this.saveImg()
}, },
// //
saveImg(){ saveImg(){
@ -272,7 +282,6 @@
content: "当日已达上传图片上限,请明日再来!", content: "当日已达上传图片上限,请明日再来!",
showCancel: false showCancel: false
}); });
return;
}else{ }else{
const param = { const param = {
creatorId: that.userInfo.id, creatorId: that.userInfo.id,
@ -282,8 +291,9 @@
typeId: that.typeId typeId: that.typeId
} }
insertTiktokImg(param).then(res =>{ insertTiktokImg(param).then(res =>{
console.log('res',res) // console.log('res',res)
if(res.data.code === 200){ if(res.data.code === 200){
uni.hideLoading();
uni.showToast({ uni.showToast({
title: '上传成功!', title: '上传成功!',
duration: 2000, duration: 2000,
@ -300,6 +310,7 @@
} }
}); });
}else { }else {
uni.hideLoading();
uni.showModal({ uni.showModal({
content: "艺术家图片上传失败!", content: "艺术家图片上传失败!",
showCancel: false, showCancel: false,
@ -312,7 +323,7 @@
watch: { watch: {
typeId(newValue) { typeId(newValue) {
if (newValue === 2) { //gif if (newValue === 2) { //gif
this.fileExtname = ".gif"; this.fileExtname = "gif";
} else { } else {
this.fileExtname = "png,jpg,jpeg"; this.fileExtname = "png,jpg,jpeg";
} }

17
pages/profit/profit.vue

@ -108,7 +108,9 @@
<view class="circular"></view> <view class="circular"></view>
<view class="adver-top-text"> 广告: </view> <view class="adver-top-text"> 广告: </view>
</view> </view>
<!-- <view class="adver-mid"> 2022.06.05 2022.07.20 </view> --> <view class="adver-mid">
抖音/快手/微信均为次日结算前日ECPM价格
</view>
</view> </view>
<view class="detail-categories-item" @click="linkTo(0,1)"> <view class="detail-categories-item" @click="linkTo(0,1)">
<div class="title">曝光</div> <div class="title">曝光</div>
@ -128,6 +130,9 @@
<view class="circular"></view> <view class="circular"></view>
<view class="adver-top-text"> 广告: </view> <view class="adver-top-text"> 广告: </view>
</view> </view>
<view class="adver-mid">
抖音/快手/微信均为次日结算前日ECPM价格
</view>
</view> </view>
<view class="detail-categories-item" @click="linkTo(0,2)"> <view class="detail-categories-item" @click="linkTo(0,2)">
<div class="title">曝光</div> <div class="title">曝光</div>
@ -213,6 +218,16 @@ export default {
this.queryFrontEndAmt(); this.queryFrontEndAmt();
this.getNoticeList(); this.getNoticeList();
}, },
onShow() {
const userInfo = uni.getStorageSync('userInfo')
if (userInfo) {
this.queryFrontProfitInfo();
this.queryFrontPreDownloadAndInviteCount();
this.queryFrontInAmt();
this.queryFrontEndAmt();
this.getNoticeList();
}
},
methods: { methods: {
// //
async queryFrontProfitInfo() { async queryFrontProfitInfo() {

79
pages/profit/profitEndDetails.vue

@ -45,7 +45,6 @@
</template> </template>
</uni-list-item> </uni-list-item>
</uni-list> </uni-list>
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view>
<uni-list v-if="typeId === 1" <uni-list v-if="typeId === 1"
border-full border-full
v-for="(item, index) in endProfitInviteList" v-for="(item, index) in endProfitInviteList"
@ -81,7 +80,10 @@
</template> </template>
</uni-list-item> </uni-list-item>
</uni-list> </uni-list>
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> <!-- 显示加载中或者全部加载完成 -->
<view>
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view> </view>
</view> </view>
</template> </template>
@ -101,6 +103,8 @@ export default {
pageNum: 1, pageNum: 1,
flagAd: false, flagAd: false,
flagInvite: false, flagInvite: false,
loadStatus:'noMore', //more - loading - noMore -
isLoadMore:false, //
}; };
}, },
created() { created() {
@ -144,22 +148,12 @@ export default {
} }
}, },
// //
onReachBottom() { onReachBottom() {//
if (this.typeId === 0) { if(!this.isLoadMore) { //
if (this.endProfitAdList.length > this.pageNum * this.pageSize - 1) { this.isLoadMore=true
this.flagAd = false; if (this.loadStatus === "more") {
this.pageNum += 1; this.pageNum += 1 //
this.queryFrontEndProfitAmt();
} else {
this.flagAd = true;
}
} else {
if (this.endProfitInviteList.length > this.pageNum * this.pageSize - 1) {
this.flagInvite = false;
this.pageNum += 1;
this.queryFrontEndProfitAmt(); this.queryFrontEndProfitAmt();
} else {
this.flagInvite = true;
} }
} }
}, },
@ -167,6 +161,7 @@ export default {
// //
async queryFrontEndProfitAmt() { async queryFrontEndProfitAmt() {
let that = this; let that = this;
that.loadStatus = 'loading';
const res = await queryFrontEndProfitAmt({ const res = await queryFrontEndProfitAmt({
creatorId: that.userInfo.id, creatorId: that.userInfo.id,
type: that.typeId, type: that.typeId,
@ -174,16 +169,28 @@ export default {
pageNum: that.pageNum, pageNum: that.pageNum,
}); });
if (res.data.code === 200) { if (res.data.code === 200) {
uni.hideLoading();
if (that.typeId === 0) { if (that.typeId === 0) {
that.endProfitAdList.push(...res.data.rows); that.endProfitAdList.push(...res.data.rows);
} else { } else {
that.endProfitInviteList.push(...res.data.rows); that.endProfitInviteList.push(...res.data.rows);
} }
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
that.loadStatus = 'noMore'
}else{
this.loadStatus = 'more';
that.isLoadMore = false
}
} else { } else {
uni.showModal({ uni.showModal({
content: "转入钱包列表数据加载失败!", content: "转入钱包列表数据加载失败!",
showCancel: false, showCancel: false,
}); });
that.isLoadMore = false
if(that.page > 1){
that.page -= 1
}
} }
}, },
@ -191,6 +198,9 @@ export default {
let that = this; let that = this;
that.endProfitAdList = []; that.endProfitAdList = [];
that.endProfitInviteList = []; that.endProfitInviteList = [];
that.pageNum = 1;
that.loadStatus = 'loading';
that.isLoadMore = false;
if (that.typeId !== e.currentIndex) { if (that.typeId !== e.currentIndex) {
that.typeId = e.currentIndex; that.typeId = e.currentIndex;
uni.showLoading({ uni.showLoading({
@ -198,32 +208,7 @@ export default {
mask: true, mask: true,
success() { success() {
// //
const param = { that.queryFrontEndProfitAmt()
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() { complete() {
uni.hideLoading(); uni.hideLoading();
@ -233,7 +218,6 @@ export default {
}, },
targetToOrder(id) { targetToOrder(id) {
console.log("id", id);
if (id) { if (id) {
uni.navigateTo({ uni.navigateTo({
url: "../profit/profitEndOrder?id=" + id, url: "../profit/profitEndOrder?id=" + id,
@ -278,12 +262,15 @@ page {
<style lang="scss" scoped> <style lang="scss" scoped>
.status-choice-comp { .status-choice-comp {
width: 450rpx; width: 450rpx;
position: absolute; position: fixed;
top: 0; top: 0;
background: #1d2734; left: 0;
background: $uni-bg-base-color;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 150rpx; padding: 0 150rpx;
border-bottom: 10rpx solid $uni-bg-color;
z-index: 100;
.status-item { .status-item {
font-size: 28rpx; font-size: 28rpx;

77
pages/profit/profitInDetails.vue

@ -45,7 +45,6 @@
</template> </template>
</uni-list-item> </uni-list-item>
</uni-list> </uni-list>
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view>
<uni-list v-if="typeId === 1" <uni-list v-if="typeId === 1"
border-full border-full
v-for="(item, index) in inProfitInviteList" v-for="(item, index) in inProfitInviteList"
@ -81,7 +80,10 @@
</template> </template>
</uni-list-item> </uni-list-item>
</uni-list> </uni-list>
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> <!-- 显示加载中或者全部加载完成 -->
<view>
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view> </view>
</view> </view>
</template> </template>
@ -102,6 +104,8 @@ export default {
pageNum: 1, pageNum: 1,
flagAd: false, flagAd: false,
flagInvite: false, flagInvite: false,
loadStatus:'noMore', //more - loading - noMore -
isLoadMore:false, //
}; };
}, },
created() { created() {
@ -145,22 +149,12 @@ export default {
} }
}, },
// //
onReachBottom() { onReachBottom() {//
if (this.typeId === 0) { if(!this.isLoadMore) { //
if (this.inProfitAdList.length > this.pageNum * this.pageSize - 1) { this.isLoadMore=true
this.flagAd = false; if (this.loadStatus === "more") {
this.pageNum += 1; this.pageNum += 1 //
this.queryFrontInProfitAmt();
} else {
this.flagAd = true;
}
} else {
if (this.inProfitInviteList.length > this.pageNum * this.pageSize - 1) {
this.flagInvite = false;
this.pageNum += 1;
this.queryFrontInProfitAmt(); this.queryFrontInProfitAmt();
} else {
this.flagInvite = true;
} }
} }
}, },
@ -168,6 +162,7 @@ export default {
// //
async queryFrontInProfitAmt() { async queryFrontInProfitAmt() {
let that = this; let that = this;
that.loadStatus = 'loading';
const res = await queryFrontInProfitAmt({ const res = await queryFrontInProfitAmt({
creatorId: that.userInfo.id, creatorId: that.userInfo.id,
type: that.typeId, type: that.typeId,
@ -175,16 +170,28 @@ export default {
pageNum: that.pageNum, pageNum: that.pageNum,
}); });
if (res.data.code === 200) { if (res.data.code === 200) {
uni.hideLoading();
if (that.typeId === 0) { if (that.typeId === 0) {
that.inProfitAdList.push(...res.data.rows); that.inProfitAdList.push(...res.data.rows);
} else { } else {
that.inProfitInviteList.push(...res.data.rows); that.inProfitInviteList.push(...res.data.rows);
} }
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
that.loadStatus = 'noMore'
}else{
this.loadStatus = 'more';
that.isLoadMore = false
}
} else { } else {
uni.showModal({ uni.showModal({
content: "已入账列表数据加载失败!", content: "已入账列表数据加载失败!",
showCancel: false, showCancel: false,
}); });
that.isLoadMore = false
if(that.page > 1){
that.page -= 1
}
} }
}, },
@ -192,6 +199,9 @@ export default {
let that = this; let that = this;
that.inProfitAdList = []; that.inProfitAdList = [];
that.inProfitInviteList = []; that.inProfitInviteList = [];
that.pageNum = 1;
that.loadStatus = 'loading';
that.isLoadMore = false;
if (that.typeId !== e.currentIndex) { if (that.typeId !== e.currentIndex) {
that.typeId = e.currentIndex; that.typeId = e.currentIndex;
uni.showLoading({ uni.showLoading({
@ -199,31 +209,7 @@ export default {
mask: true, mask: true,
success() { success() {
// //
const param = { that.queryFrontInProfitAmt();
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() { complete() {
uni.hideLoading(); uni.hideLoading();
@ -279,12 +265,15 @@ page {
.status-choice-comp { .status-choice-comp {
width: 450rpx; width: 450rpx;
position: absolute; position: fixed;
top: 0; top: 0;
background: #1d2734; left: 0;
background: $uni-bg-base-color;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 150rpx; padding: 0 150rpx;
border-bottom: 10rpx solid $uni-bg-color;
z-index: 100;
.status-item { .status-item {
font-size: 28rpx; font-size: 28rpx;

81
pages/profit/profitPreDetails.vue

@ -43,7 +43,10 @@
</template> </template>
</uni-list-item> </uni-list-item>
</uni-list> </uni-list>
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view> <!-- 显示加载中或者全部加载完成 -->
<view>
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view> </view>
<view v-if="typeId === 1"> <view v-if="typeId === 1">
<uni-list <uni-list
@ -78,7 +81,10 @@
</template> </template>
</uni-list-item> </uni-list-item>
</uni-list> </uni-list>
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> <!-- 显示加载中或者全部加载完成 -->
<view>
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -100,6 +106,8 @@ export default {
pageNum: 1, pageNum: 1,
flagAd: false, flagAd: false,
flagInvite: false, flagInvite: false,
loadStatus:'noMore', //more - loading - noMore -
isLoadMore:false, //
}; };
}, },
created() { created() {
@ -143,22 +151,12 @@ export default {
} }
}, },
// //
onReachBottom() { onReachBottom() {//
if (this.typeId === 0) { if(!this.isLoadMore) { //
if (this.preProfitAdList.length > this.pageNum * this.pageSize - 1) { this.isLoadMore=true
this.flagAd = false; if (this.loadStatus === "more") {
this.pageNum += 1; this.pageNum += 1 //
this.queryFrontPreProfit();
} else {
this.flagAd = true;
}
} else {
if (this.preprofitInviteList.length > this.pageNum * this.pageSize - 1) {
this.flagInvite = false;
this.pageNum += 1;
this.queryFrontPreProfit(); this.queryFrontPreProfit();
} else {
this.flagInvite = true;
} }
} }
}, },
@ -167,6 +165,9 @@ export default {
let that = this; let that = this;
that.preProfitAdList = []; that.preProfitAdList = [];
that.preprofitInviteList = []; that.preprofitInviteList = [];
that.pageNum = 1;
that.loadStatus = 'loading';
that.isLoadMore = false;
if (that.typeId !== e.currentIndex) { if (that.typeId !== e.currentIndex) {
that.typeId = e.currentIndex; that.typeId = e.currentIndex;
uni.showLoading({ uni.showLoading({
@ -174,31 +175,7 @@ export default {
mask: true, mask: true,
success() { success() {
// //
const param = { that.queryFrontPreProfit();
creatorId: that.userInfo.id,
type: that.typeId,
pageSize: that.pageSize,
pageNum: 1,
};
queryFrontPreProfit(param).then((res) => {
if (res.data.code === 200) {
if (that.typeId === 0) {
that.preProfitAdList.push(...res.data.rows);
} else {
that.preprofitInviteList.push(...res.data.rows);
}
console.log("点击操作preProfitAdList", that.preProfitAdList);
console.log(
"点击操作preprofitInviteList",
that.preprofitInviteList
);
} else {
uni.showModal({
content: "即将到账列表数据加载失败!",
showCancel: false,
});
}
});
}, },
complete() { complete() {
uni.hideLoading(); uni.hideLoading();
@ -210,6 +187,7 @@ export default {
// //
async queryFrontPreProfit() { async queryFrontPreProfit() {
let that = this; let that = this;
that.loadStatus = 'loading';
const res = await queryFrontPreProfit({ const res = await queryFrontPreProfit({
creatorId: that.userInfo.id, creatorId: that.userInfo.id,
type: that.typeId, type: that.typeId,
@ -217,16 +195,28 @@ export default {
pageNum: that.pageNum, pageNum: that.pageNum,
}); });
if (res.data.code === 200) { if (res.data.code === 200) {
uni.hideLoading();
if (that.typeId === 0) { if (that.typeId === 0) {
that.preProfitAdList.push(...res.data.rows); that.preProfitAdList.push(...res.data.rows);
} else { } else {
that.preprofitInviteList.push(...res.data.rows); that.preprofitInviteList.push(...res.data.rows);
} }
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
that.loadStatus = 'noMore'
}else{
this.loadStatus = 'more';
that.isLoadMore = false
}
} else { } else {
uni.showModal({ uni.showModal({
content: "即将到账列表数据加载失败!", content: "即将到账列表数据加载失败!",
showCancel: false, showCancel: false,
}); });
that.isLoadMore = false
if(that.page > 1){
that.page -= 1
}
} }
}, },
setPlatform(data) { setPlatform(data) {
@ -268,12 +258,15 @@ page {
.status-choice-comp { .status-choice-comp {
width: 450rpx; width: 450rpx;
position: absolute; position: fixed;
top: 0; top: 0;
background: #1d2734; left: 0;
background: $uni-bg-base-color;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 150rpx; padding: 0 150rpx;
border-bottom: 10rpx solid $uni-bg-color;
z-index: 100;
.status-item { .status-item {
font-size: 28rpx; font-size: 28rpx;

6
pages/userInfo/userInfo.vue

@ -116,6 +116,12 @@
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getCreatorInfoFansLike(); this.getCreatorInfoFansLike();
},
onShow() {
const userInfo = uni.getStorageSync('userInfo')
if (userInfo) {
this.getCreatorInfoFansLike();
}
}, },
methods: { methods: {
change(e) { change(e) {

Loading…
Cancel
Save