Browse Source

feature-hub-1.0: fix bug

feature-1.0
chengkun 4 years ago
parent
commit
21e4df820b
  1. 37
      pages-userInfo/inviteLog/inviteLog.vue
  2. 33
      pages-userInfo/notice/notice.vue
  3. 16
      pages-userInfo/notice/noticeDetail.vue
  4. 39
      pages-userInfo/withdraw/withdraw.vue
  5. 24
      pages-userInfo/withdraw/withdrawDetail.vue
  6. 78
      pages.json
  7. 76
      pages/profit/profit.vue
  8. 17
      pages/profit/profitEndDetails.vue
  9. 19
      pages/profit/profitEndOrder.vue
  10. 15
      pages/profit/profitInDetails.vue
  11. 23
      pages/profit/profitInOrder.vue
  12. 86
      pages/profit/profitPreDetails.vue
  13. 5
      pages/userInfo/userInfo.vue

37
pages-userInfo/inviteLog/inviteLog.vue

@ -1,8 +1,7 @@
<template> <template>
<view class="container"> <view class="container">
<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" <uni-list-item :title="item.invitedScanCode" :note="item.createTime" :thumb="item.img" thumb-size="lg" />
:note="item.createTime" :thumb="item.img" thumb-size="lg"/>
</uni-list> </uni-list>
</view> </view>
</template> </template>
@ -16,31 +15,41 @@
return { return {
inviteLogList: [], inviteLogList: [],
pageSize: 10, pageSize: 10,
pageNum: 1 pageNum: 1,
userInfo: {}
} }
}, },
created() {
const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync
this.getInviteLog();
},
// //
onPullDownRefresh() { onPullDownRefresh() {
this.showChoiceness = false this.pageNum = 1
this.inviteLogList = []
this.getInviteLog();
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
created() { //
const userInfo = uni.getStorageSync('userInfo') onReachBottom() {
const params = { if (this.inviteLogList.length > 9) {
pageSize: this.pageSize, this.pageNum += 1
pageNum: this.pageNum, this.getInviteLog();
creatorId: userInfo.id
} }
this.getInviteLog(params);
}, },
methods: { methods: {
// //
async getInviteLog(params) { async getInviteLog() {
const res = await getInviteLog(params) const res = await getInviteLog({
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: this.userInfo.id
})
console.log('res', res) console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.inviteLogList = res.data.rows this.inviteLogList.push(...res.data.rows)
console.log('inviteLogList', this.inviteLogList) console.log('inviteLogList', this.inviteLogList)
} else { } else {
uni.showModal({ uni.showModal({

33
pages-userInfo/notice/notice.vue

@ -1,8 +1,8 @@
<template> <template>
<view class="container"> <view class="container">
<uni-list border-full v-for="(item,index) in noticeList" :key="index"> <uni-list border-full v-for="(item,index) in noticeList" :key="index">
<uni-list-item showArrow clickable :title="item.title" <uni-list-item showArrow clickable :title="item.title" :note="item.createTime" :thumb="item.img"
:note="item.createTime" :thumb="item.img" thumb-size="lg" @click="targetToDetail(item.id)"/> thumb-size="lg" @click="targetToDetail(item.id)" />
</uni-list> </uni-list>
</view> </view>
</template> </template>
@ -19,26 +19,35 @@
pageNum: 1 pageNum: 1
} }
}, },
created() {
this.getNoticeList();
},
// //
onPullDownRefresh() { onPullDownRefresh() {
this.pageNum = 1
this.noticeList = []
this.getNoticeList()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
created() { //
const params = { onReachBottom() {
pageSize: this.pageSize, if (this.noticeList.length > 9) {
pageNum: this.pageNum, this.pageNum += 1
this.getNoticeList();
} }
this.getNoticeList(params);
}, },
methods: { methods: {
// //
async getNoticeList(params) { async getNoticeList() {
const res = await getNoticeList(params) const res = await getNoticeList({
console.log('res', res) pageSize: this.pageSize,
pageNum: this.pageNum,
})
//console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.noticeList = res.data.rows this.noticeList.push(...res.data.rows)
console.log('noticeList', this.noticeList) //console.log('noticeList', this.noticeList)
} else { } else {
uni.showModal({ uni.showModal({
content: '公告列表加载失败!', content: '公告列表加载失败!',

16
pages-userInfo/notice/noticeDetail.vue

@ -15,19 +15,25 @@
export default { export default {
data() { data() {
return { return {
noticeDetail:{} noticeDetail:{
id: 0,
title: '',
content: '',
img: '',
createTime: ''
}
} }
}, },
onLoad: function(option) { //optionobject onLoad: function(option) { //optionobject
this.id = option.id this.noticeDetail.id = option.id
//console.log('this.id',this.id) //console.log('this.id',this.id)
this.getNoticeDetails(option.id); this.getNoticeDetails();
}, },
methods: { methods: {
// //
async getNoticeDetails(id) { async getNoticeDetails() {
const res = await getNoticeDetails(id) const res = await getNoticeDetails(this.noticeDetail.id)
console.log('res', res) console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.noticeDetail = res.data.data this.noticeDetail = res.data.data

39
pages-userInfo/withdraw/withdraw.vue

@ -2,8 +2,8 @@
<view class="container"> <view class="container">
<uni-list border-full v-for="(item,index) in withdrawList" :key="index"> <uni-list border-full v-for="(item,index) in withdrawList" :key="index">
<uni-list-item showArrow clickable :title="'订单号:'+item.orderId" <uni-list-item showArrow clickable :title="'订单号:'+item.orderId"
:note="item.createTime+'||'+item.channel+'||'+item.status" :note="item.createTime+'||'+item.channel+'||'+item.status" :rightText="'¥'+item.amt"
:rightText="'¥'+item.amt" @click="targetToDetail(item.orderId)"/> @click="targetToDetail(item.orderId)" />
</uni-list> </uni-list>
</view> </view>
</template> </template>
@ -17,25 +17,40 @@
return { return {
withdrawList: [], withdrawList: [],
pageSize: 10, pageSize: 10,
pageNum: 1 pageNum: 1,
userInfo: {}
} }
}, },
created() { created() {
const userInfo = uni.getStorageSync('userInfo') const userInfoSync = uni.getStorageSync('userInfo')
const params = { this.userInfo = userInfoSync
pageSize: this.pageSize, this.getWithdrawList();
pageNum: this.pageNum, },
creatorId: userInfo.id //
onPullDownRefresh() {
this.pageNum = 1
this.withdrawList = []
this.getWithdrawList()
uni.stopPullDownRefresh()
},
//
onReachBottom() {
if (this.withdrawList.length > 9) {
this.pageNum += 1
this.getWithdrawList();
} }
this.getWithdrawList(params);
}, },
methods: { methods: {
// //
async getWithdrawList(param) { async getWithdrawList() {
const res = await getWithdrawList(param) const res = await getWithdrawList({
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: this.userInfo.id
})
console.log('res', res) console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.withdrawList = res.data.rows this.withdrawList.push(...res.data.rows)
} else { } else {
uni.showModal({ uni.showModal({
content: '提现记录列表数据加载失败!', content: '提现记录列表数据加载失败!',

24
pages-userInfo/withdraw/withdrawDetail.vue

@ -19,20 +19,30 @@
export default { export default {
data() { data() {
return { return {
withdrawDetailInfo:{} withdrawDetailInfo: {
orderId: '',
amt: 0,
phone: '',
bankNo: '',
channel: '',
status: '',
createTime: '',
reason: '',
achieveTime: ''
}
} }
}, },
onLoad: function(option) { //optionobject onLoad: function(option) { //optionobject
console.log(option) console.log(option)
const param = { this.withdrawDetailInfo.orderId = option.orderId
orderId: option.orderId this.getWithdrawDetails();
}
this.getWithdrawDetails(param);
}, },
methods: { methods: {
// //
async getWithdrawDetails(param) { async getWithdrawDetails() {
const res = await getWithdrawDetails(param) const res = await getWithdrawDetails({
orderId: this.withdrawDetailInfo.orderId
})
console.log('res', res) console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.withdrawDetailInfo = res.data.data this.withdrawDetailInfo = res.data.data

78
pages.json

@ -16,97 +16,77 @@
}, },
{ {
"path": "pages/index/upload/upload", "path": "pages/index/upload/upload",
"style" : "style": {
{
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{
"path": "pages/index/material/material", "path": "pages/index/material/material",
"style" : "style": {
{
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{
"path": "pages/login/login", "path": "pages/login/login",
"style" : "style": {
{
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{
"path": "pages/register/register", "path": "pages/register/register",
"style" : "style": {
{
"navigationBarTitleText": "注册", "navigationBarTitleText": "注册",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{
"path": "pages/index/banner", "path": "pages/index/banner",
"style" : "style": {
{
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{
"path": "pages/profit/profitPreDetails", "path": "pages/profit/profitPreDetails",
"style" : "style": {
{
"navigationBarTitleText": "即将入账详情", "navigationBarTitleText": "即将入账详情",
"enablePullDownRefresh": false "enablePullDownRefresh": true
} }
} }, {
,{
"path": "pages/profit/profitInDetails", "path": "pages/profit/profitInDetails",
"style" : "style": {
{
"navigationBarTitleText": "已入账详情", "navigationBarTitleText": "已入账详情",
"enablePullDownRefresh": false "enablePullDownRefresh": true
} }
} }, {
,{
"path": "pages/profit/profitInOrder", "path": "pages/profit/profitInOrder",
"style" : "style": {
{
"navigationBarTitleText": "收益结算单", "navigationBarTitleText": "收益结算单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{
"path": "pages/profit/profitEndDetails", "path": "pages/profit/profitEndDetails",
"style" : "style": {
{
"navigationBarTitleText": "转入钱包详情", "navigationBarTitleText": "转入钱包详情",
"enablePullDownRefresh": false "enablePullDownRefresh": true
} }
} }, {
,{
"path": "pages/profit/profitEndOrder", "path": "pages/profit/profitEndOrder",
"style" : "style": {
{
"navigationBarTitleText": "转入钱包结算单", "navigationBarTitleText": "转入钱包结算单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/userInfo/userInfo", "path": "pages/userInfo/userInfo",
"style" : "style": {
{
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -140,25 +120,24 @@
"path": "inviteLog/inviteLog", "path": "inviteLog/inviteLog",
"style": { "style": {
"navigationBarTitleText": "邀请记录", "navigationBarTitleText": "邀请记录",
"enablePullDownRefresh": false "enablePullDownRefresh": true
} }
}, { }, {
"path": "notice/notice", "path": "notice/notice",
"style": { "style": {
"navigationBarTitleText": "通知公告", "navigationBarTitleText": "通知公告",
"enablePullDownRefresh": false "enablePullDownRefresh": true
} }
}, },
{ {
"path": "withdraw/withdraw", "path": "withdraw/withdraw",
"style": { "style": {
"navigationBarTitleText": "提现记录", "navigationBarTitleText": "提现记录",
"enablePullDownRefresh": false "enablePullDownRefresh": true
} }
}, { }, {
"path": "notice/noticeDetail", "path": "notice/noticeDetail",
"style" : "style": {
{
"navigationBarTitleText": "公告详情", "navigationBarTitleText": "公告详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -167,8 +146,7 @@
, { , {
"path": "withdraw/withdrawDetail", "path": "withdraw/withdrawDetail",
"style" : "style": {
{
"navigationBarTitleText": "提现详情", "navigationBarTitleText": "提现详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }

76
pages/profit/profit.vue

@ -1,6 +1,7 @@
<template> <template>
<view class="container"> <view class="container">
<view class="top"> <view class="top">
<uni-notice-bar show-get-more show-icon more-text="查看更多" :text="noticeList[0].content" @getmore="getMore" />
<uni-section title="昨日收益" type="line"> <uni-section title="昨日收益" type="line">
<uni-group mode="card"> <uni-group mode="card">
<view>广告收益:{{profitInfo.yesterdayAdProfit}}</view> <view>广告收益:{{profitInfo.yesterdayAdProfit}}</view>
@ -80,6 +81,9 @@
queryFrontPreProfit, // queryFrontPreProfit, //
queryFrontInOrOutAmt, /// queryFrontInOrOutAmt, ///
} from '@/api/profit.js' } from '@/api/profit.js'
import {
getNoticeList
} from '@/api/userInfo.js'
export default { export default {
data() { data() {
return { return {
@ -100,6 +104,9 @@
inProfitInfo: {}, inProfitInfo: {},
endProfitInfo: {}, endProfitInfo: {},
userInfo: {}, userInfo: {},
noticeList: [],
pageSize: 10,
pageNum: 1
} }
}, },
// //
@ -109,24 +116,17 @@
created() { created() {
const userInfoSync = uni.getStorageSync('userInfo') const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync this.userInfo = userInfoSync
this.queryFrontProfitInfo(userInfoSync.id); this.queryFrontProfitInfo();
this.queryFrontPreDownloadAndInviteCount(userInfoSync.id) this.queryFrontPreDownloadAndInviteCount()
const paramIn = { this.queryFrontInAmt()
creatorId: userInfoSync.id, this.queryFrontEndAmt()
status: '1' this.getNoticeList()
}
this.queryFrontInAmt(paramIn)
const paramEnd = {
creatorId: userInfoSync.id,
status: '2'
}
this.queryFrontEndAmt(paramEnd)
}, },
methods: { methods: {
// //
async queryFrontProfitInfo(id) { async queryFrontProfitInfo() {
const res = await queryFrontProfitInfo(id) const res = await queryFrontProfitInfo(this.userInfo.id)
//console.log('res', res) //console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.profitInfo = res.data.data this.profitInfo = res.data.data
@ -140,8 +140,8 @@
}, },
// 广 // 广
async queryFrontPreDownloadAndInviteCount(id) { async queryFrontPreDownloadAndInviteCount() {
const res = await queryFrontPreDownloadAndInviteCount(id) const res = await queryFrontPreDownloadAndInviteCount(this.userInfo.id)
//console.log('res', res) //console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.downloadAndInviteCountInfo = res.data.data this.downloadAndInviteCountInfo = res.data.data
@ -155,9 +155,12 @@
}, },
// //
async queryFrontInAmt(param) { async queryFrontInAmt() {
const res = await queryFrontInOrOutAmt(param) const res = await queryFrontInOrOutAmt({
console.log('InAmt', res) creatorId: this.userInfo.id,
status: '1'
})
//console.log('InAmt', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.inProfitInfo = res.data.data this.inProfitInfo = res.data.data
} else { } else {
@ -169,9 +172,12 @@
}, },
// //
async queryFrontEndAmt(param) { async queryFrontEndAmt() {
const res = await queryFrontInOrOutAmt(param) const res = await queryFrontInOrOutAmt({
console.log('endAmt', res) creatorId: this.userInfo.id,
status: '2'
})
//console.log('endAmt', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.endProfitInfo = res.data.data this.endProfitInfo = res.data.data
} else { } else {
@ -182,6 +188,24 @@
} }
}, },
//
async getNoticeList() {
const res = await getNoticeList({
pageSize: this.pageSize,
pageNum: this.pageNum,
})
//console.log('res', res)
if (res.data.code === 200) {
this.noticeList = res.data.rows
//console.log('noticeList', this.noticeList)
} else {
uni.showModal({
content: '公告列表加载失败!',
showCancel: false
});
}
},
// (status:0->;1->;2->) // (status:0->;1->;2->)
linkTo(typeId, status) { linkTo(typeId, status) {
if (status === 0) { if (status === 0) {
@ -215,13 +239,19 @@
} }
}) })
} }
}, },
onClickItem(e) { onClickItem(e) {
if (this.current !== e.currentIndex) { if (this.current !== e.currentIndex) {
this.current = e.currentIndex this.current = e.currentIndex
} }
}, },
//
getMore() {
uni.navigateTo({
url: '../../pages-userInfo/notice/notice',
})
}
}, },
} }
</script> </script>

17
pages/profit/profitEndDetails.vue

@ -43,21 +43,20 @@
this.userInfo = userInfoSync this.userInfo = userInfoSync
const typeProfitId = uni.getStorageSync('typeId') const typeProfitId = uni.getStorageSync('typeId')
this.typeId = typeProfitId this.typeId = typeProfitId
const param = {
creatorId: userInfoSync.id,
type: typeProfitId
}
if (typeProfitId) { if (typeProfitId) {
this.queryFrontEndProfitAmt(param) this.queryFrontEndProfitAmt()
} else { } else {
this.queryFrontEndProfitAmt(param) this.queryFrontEndProfitAmt()
} }
}, },
methods: { methods: {
// //
async queryFrontEndProfitAmt(param) { async queryFrontEndProfitAmt() {
const res = await queryFrontEndProfitAmt(param) const res = await queryFrontEndProfitAmt({
creatorId: this.userInfo.id,
type: this.typeId
})
if (res.data.code === 200) { if (res.data.code === 200) {
this.endProfitList = res.data.data this.endProfitList = res.data.data
} else { } else {
@ -82,7 +81,7 @@
type: that.typeId type: that.typeId
} }
queryFrontEndProfitAmt(param).then(res => { queryFrontEndProfitAmt(param).then(res => {
console.log('res',res) //console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
that.endProfitList = res.data.data that.endProfitList = res.data.data
} else { } else {

19
pages/profit/profitEndOrder.vue

@ -24,21 +24,28 @@
export default { export default {
data() { data() {
return { return {
orderDetail: {
id: 0, id: 0,
orderDetail: {} orderNo: '',
platform: '',
appType: '',
type: '',
profit: 0,
walletTime: ''
}
} }
}, },
onLoad: function(option) { //optionobject onLoad: function(option) { //optionobject
this.id = option.id this.orderDetail.id = option.id
//console.log('this.id',this.id) //console.log('this.id',this.id)
this.queryFrontEndAmtDetails(option.id); this.queryFrontEndAmtDetails();
}, },
methods: { methods: {
// //
async queryFrontEndAmtDetails(id) { async queryFrontEndAmtDetails() {
const res = await queryFrontEndAmtDetails(id) const res = await queryFrontEndAmtDetails(this.orderDetail.id)
console.log('res', res) //console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.orderDetail = res.data.data this.orderDetail = res.data.data
} else { } else {

15
pages/profit/profitInDetails.vue

@ -43,21 +43,20 @@
this.userInfo = userInfoSync this.userInfo = userInfoSync
const typeProfitId = uni.getStorageSync('typeId') const typeProfitId = uni.getStorageSync('typeId')
this.typeId = typeProfitId this.typeId = typeProfitId
const param = {
creatorId: userInfoSync.id,
type: typeProfitId
}
if (typeProfitId) { if (typeProfitId) {
this.queryFrontInProfitAmt(param) this.queryFrontInProfitAmt()
} else { } else {
this.queryFrontInProfitAmt(param) this.queryFrontInProfitAmt()
} }
}, },
methods: { methods: {
// //
async queryFrontInProfitAmt(param) { async queryFrontInProfitAmt() {
const res = await queryFrontInProfitAmt(param) const res = await queryFrontInProfitAmt({
creatorId: this.userInfo.id,
type: this.typeId
})
if (res.data.code === 200) { if (res.data.code === 200) {
this.inProfitList = res.data.data this.inProfitList = res.data.data
} else { } else {

23
pages/profit/profitInOrder.vue

@ -33,21 +33,32 @@
export default { export default {
data() { data() {
return { return {
orderDetail: {
id: 0, id: 0,
orderDetail: {} orderNo: '',
platform: '',
appType: '',
type: '',
createTime: '',
profit: '',
downloadNum: 0,
confirmType: '',
confirmTime: '',
confirmStatus: ''
}
} }
}, },
onLoad: function(option) { //optionobject onLoad: function(option) { //optionobject
this.id = option.id this.orderDetail.id = option.id
//console.log('this.id',this.id) //console.log('this.id',this.id)
this.queryFrontInAmtDetails(option.id); this.queryFrontInAmtDetails();
}, },
methods: { methods: {
// //
async queryFrontInAmtDetails(id) { async queryFrontInAmtDetails() {
const res = await queryFrontInAmtDetails(id) const res = await queryFrontInAmtDetails(this.orderDetail.id)
console.log('res', res) //console.log('res', res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.orderDetail = res.data.data this.orderDetail = res.data.data
} else { } else {

86
pages/profit/profitPreDetails.vue

@ -6,18 +6,20 @@
</view> </view>
<view class="content"> <view class="content">
<view v-if="typeId === 0"> <view v-if="typeId === 0">
<uni-list border-full v-for="(item,index) in preProfitList" :key="index"> <uni-list border-full v-for="(item,index) in preProfitAdList" :key="index">
<uni-list-item :title="item.createTime+'@'+item.scanCode" <uni-list-item :title="item.createTime+'@'+item.scanCode"
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" :note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg"
:rightText="item.downloadNum+'次'" /> :rightText="item.downloadNum+'次'" />
</uni-list> </uni-list>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view>
</view> </view>
<view v-if="typeId === 1"> <view v-if="typeId === 1">
<uni-list border-full v-for="(item,index) in preProfitList" :key="index"> <uni-list border-full v-for="(item,index) in preprofitInviteList" :key="index">
<uni-list-item :title="item.createTime+'@'+item.scanCode" <uni-list-item :title="item.createTime+'@'+item.scanCode"
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" :note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg"
:rightText="item.downloadNum+'次'" /> :rightText="item.downloadNum+'次'" />
</uni-list> </uni-list>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view>
</view> </view>
</view> </view>
</view> </view>
@ -30,12 +32,16 @@
export default { export default {
data() { data() {
return { return {
preProfitList: [], preProfitAdList: [],
preprofitInviteList:[],
items: ['广告', '邀请'], items: ['广告', '邀请'],
typeId: 0, typeId: 0,
activeColor: '#007aff', activeColor: '#007aff',
styleType: 'text', styleType: 'text',
userInfo: {} userInfo: {},
pageSize: 10,
pageNum: 1,
flag: false
} }
}, },
created() { created() {
@ -43,14 +49,28 @@
this.userInfo = userInfoSync this.userInfo = userInfoSync
const typeProfitId = uni.getStorageSync('typeId') const typeProfitId = uni.getStorageSync('typeId')
this.typeId = typeProfitId this.typeId = typeProfitId
const param = {
creatorId: userInfoSync.id,
type: typeProfitId
}
if (typeProfitId) { if (typeProfitId) {
this.queryFrontPreProfit(param) this.queryFrontPreProfit()
} else { } else {
this.queryFrontPreProfit(param) this.queryFrontPreProfit()
}
},
//
onPullDownRefresh() {
this.pageNum = 1
this.preProfitList = []
this.queryFrontPreProfit()
uni.stopPullDownRefresh()
},
//
onReachBottom() {
console.log('this.preProfitList.length',this.preProfitList.length)
if (this.preProfitList.length > this.pageNum*this.pageSize-1 ) {
this.flag = false;
this.pageNum += 1
this.queryFrontPreProfit();
}else{
this.flag = true;
} }
}, },
methods: { methods: {
@ -65,11 +85,21 @@
// //
const param = { const param = {
creatorId: that.userInfo.id, creatorId: that.userInfo.id,
type: that.typeId type: that.typeId,
pageSize: that.pageSize,
pageNum: 1
} }
queryFrontPreProfit(param).then(res => { queryFrontPreProfit(param).then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
that.preProfitList = res.data.data if(this.typeId = 0){
this.preProfitAdList.push(...res.data.rows)
}else{
this.preprofitInviteList.push(...res.data.rows)
}
console.log('点击操作preProfitAdList',this.preProfitAdList)
console.log('点击操作preprofitInviteList',this.preprofitInviteList)
that.preProfitList = res.data.rows
this.flag = false;
} else { } else {
uni.showModal({ uni.showModal({
content: '即将到账列表数据加载失败!', content: '即将到账列表数据加载失败!',
@ -87,10 +117,25 @@
}, },
// //
async queryFrontPreProfit(param) { async queryFrontPreProfit() {
const res = await queryFrontPreProfit(param) const res = await queryFrontPreProfit({
creatorId: this.userInfo.id,
type: this.typeId,
pageSize: this.pageSize,
pageNum: this.pageNum
})
console.log('this.typeId1',this.typeId)
if (res.data.code === 200) { if (res.data.code === 200) {
this.preProfitList = res.data.data console.log('this.typeId2',this.typeId)
if(this.typeId === 0){
console.log('this.typeId3',this.typeId)
this.preProfitAdList.push(...res.data.rows)
}else{
console.log('this.typeId4',this.typeId)
this.preprofitInviteList.push(...res.data.rows)
}
console.log('this.preProfitAdList',this.preProfitAdList)
console.log('this.preprofitInviteList',this.preprofitInviteList)
} else { } else {
uni.showModal({ uni.showModal({
content: '即将到账列表数据加载失败!', content: '即将到账列表数据加载失败!',
@ -102,6 +147,13 @@
} }
</script> </script>
<style> <style lang="scss">
.ivOver{
width: 100%;
height:50px;
line-height: 50px;
text-align: center;
background: #fff;
font-size: 20rpx;
}
</style> </style>

5
pages/userInfo/userInfo.vue

@ -1,8 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<view class="top"> <view class="top">
<uni-notice-bar show-get-more show-icon more-text="查看更多" text="年末大礼:uni-app1.4 新增百度、支付宝小程序。插件市场重磅上线!"
@getmore="getMore" />
</view> </view>
<view class="my-message"> <view class="my-message">
<view class="left"> <view class="left">
@ -66,7 +64,7 @@
img: '' img: ''
}], }],
pageUrl: '', pageUrl: '',
userInfo: {} userInfo: {},
} }
}, },
created() { created() {
@ -93,6 +91,7 @@
.container { .container {
font-family: Franklin Gothic Medium, Arial Narrow, Arial, sans-serif; font-family: Franklin Gothic Medium, Arial Narrow, Arial, sans-serif;
} }
.my-message { .my-message {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;

Loading…
Cancel
Save