Browse Source

页面样式, 列表滚动加载

feature-1.0
helming 3 years ago
parent
commit
449f63356d
  1. 42
      pages-userInfo/extends/extends.vue
  2. 2
      pages-userInfo/withdraw/withdrawDetail.vue
  3. 41
      pages-userInfo/withdraw/withdrawLog.vue
  4. 8
      pages.json
  5. 4
      pages/index/index.vue
  6. 174
      pages/index/material/imgDetail.vue
  7. 187
      pages/index/material/material.vue
  8. 133
      pages/index/upload/upload.vue
  9. 17
      pages/profit/profit.vue
  10. 91
      pages/profit/profitEndDetails.vue
  11. 79
      pages/profit/profitInDetails.vue
  12. 83
      pages/profit/profitPreDetails.vue
  13. 6
      pages/userInfo/userInfo.vue

42
pages-userInfo/extends/extends.vue

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

2
pages-userInfo/withdraw/withdrawDetail.vue

@ -17,7 +17,7 @@
</view>
<view class="box">
<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 class="box">
<text class="title">渠道:</text>

41
pages-userInfo/withdraw/withdrawLog.vue

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

8
pages.json

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

4
pages/index/index.vue

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

174
pages/index/material/imgDetail.vue

@ -1,7 +1,13 @@
<template>
<view class="imgDetail">
<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 class="toolbar" :style="'display:'+showOrmis">
<view class="toolbarLeft" @click="$noMultipleClicks(topImg)">置顶</view>
@ -99,7 +105,7 @@
title:'修改标签成功!',
duration: 1000,
success() {
that.$refs.showRight.close();
that.$refs.showPopup.close();
that.signListSelected = [];
}
})
@ -165,7 +171,7 @@
//
changeSign(){
console.log('修改标签');
// console.log('');
//
this.$refs.showPopup.open();
},
@ -183,7 +189,7 @@
duration: 1000,
success() {
setTimeout(() => {
uni.redirectTo({
uni.reLaunch({
url: `/pages/index/material/material?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`
});
}, 1000)
@ -203,33 +209,6 @@
const res = await getImgDetails(id)
if (res.data.code === 200) {
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"){
@ -271,70 +250,87 @@
height: 100vh;
background: $uni-bg-base-color;
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
}
.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{
height: 100rpx;
width: 700rpx;
z-index: 2;
border-radius: 20rpx;
background-color: $uni-primary;
color: $uni-white;
position: absolute;
bottom: 68rpx;
left: 25rpx;
right: 25rpx;
display: flex;
justify-content: space-around;
align-items: center;
.border {
width: 1rpx;
height: 30rpx;
background-color: $uni-white;
position: relative;
z-index: 2;
}
.toolbarLeft{
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
width: 200rpx;
position: relative;
z-index: 2;
}
.toolbarMid{
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
width: 200rpx;
position: relative;
z-index: 2;
}
.toolbarRight{
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
width: 200rpx;
position: relative;
z-index: 2;
}
}
.toolbar{
height: 100rpx;
width: 700rpx;
z-index: 2;
border-radius: 20rpx;
background-color: $uni-primary;
color: $uni-white;
position: fixed;
bottom: 68rpx;
left: 25rpx;
right: 25rpx;
display: flex;
justify-content: space-around;
align-items: center;
.border {
width: 1rpx;
height: 30rpx;
background-color: $uni-white;
position: relative;
z-index: 2;
}
.toolbarLeft{
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
width: 200rpx;
position: relative;
z-index: 2;
}
.toolbarMid{
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
width: 200rpx;
position: relative;
z-index: 2;
}
.toolbarRight{
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
width: 200rpx;
position: relative;
z-index: 2;
}
}
}
.popup-modal {

187
pages/index/material/material.vue

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

133
pages/index/upload/upload.vue

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

17
pages/profit/profit.vue

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

91
pages/profit/profitEndDetails.vue

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

79
pages/profit/profitInDetails.vue

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

83
pages/profit/profitPreDetails.vue

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

6
pages/userInfo/userInfo.vue

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

Loading…
Cancel
Save