diff --git a/api/index.js b/api/index.js index 95d7cfc..8fc538f 100644 --- a/api/index.js +++ b/api/index.js @@ -74,10 +74,11 @@ export function getNoticeDetails(id) { } // 查询公告列表 -export function getNoticeList() { +export function getNoticeList(data) { return request({ url: `${serviceTitle}${prefix}/getNoticeList`, - method: 'get' + method: 'post', + data }) } diff --git a/api/userInfo.js b/api/userInfo.js index f4f3da0..56cc03d 100644 --- a/api/userInfo.js +++ b/api/userInfo.js @@ -9,24 +9,26 @@ const prefix = '/img/mini/creator' // 查询公告详情 export function getNoticeDetails(id) { return request({ - url: `${serviceTitle}${prefix}/listType/${id}`, + url: `${serviceTitle}${prefix}/getNoticeDetails/${id}`, method: 'get' }) } // 查询公告列表 -export function getNoticeList() { +export function getNoticeList(data) { return request({ url: `${serviceTitle}${prefix}/getNoticeList`, - method: 'get' + method: 'post', + data }) } // 查询邀请记录 -export function getInviteLog(creatorId) { +export function getInviteLog(data) { return request({ - url: `${serviceTitle}${prefix}/getInviteLog/${creatorId}`, - method: 'get' + url: `${serviceTitle}${prefix}/getInviteLog`, + method: 'post', + data }) } @@ -38,11 +40,12 @@ export function getAccount(creatorId) { }) } -// 查询指定艺术家提现记录列表 -export function getWithdrawList(creatorId) { +// 查询指定艺术家提现记录分页 +export function getWithdrawList(data) { return request({ - url: `${serviceTitle}${prefix}/getWithdrawList/${creatorId}`, - method: 'get' + url: `${serviceTitle}${prefix}/getWithdrawList`, + method: 'post', + data }) } diff --git a/pages-userInfo/inviteLog/inviteLog.vue b/pages-userInfo/inviteLog/inviteLog.vue index ceac680..11cdbfd 100644 --- a/pages-userInfo/inviteLog/inviteLog.vue +++ b/pages-userInfo/inviteLog/inviteLog.vue @@ -1,106 +1,56 @@ + import { + getNoticeList + } from '@/api/userInfo.js' + export default { + data() { + return { + noticeList: [], + pageSize: 10, + pageNum: 1 + } + }, + // 下拉刷新 + onPullDownRefresh() { + uni.stopPullDownRefresh() + }, + created() { + const params = { + pageSize: this.pageSize, + pageNum: this.pageNum, + } + this.getNoticeList(params); + }, + methods: { + + // 获取公告分页 + async getNoticeList(params) { + const res = await getNoticeList(params) + 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 + }); + } + }, + + targetToDetail(id) { + console.log('id', id) + if (id) { + uni.navigateTo({ + url: 'noticeDetail?id=' + id + }) + } + } + }, + } + diff --git a/pages-userInfo/notice/noticeDetail.vue b/pages-userInfo/notice/noticeDetail.vue new file mode 100644 index 0000000..f962a64 --- /dev/null +++ b/pages-userInfo/notice/noticeDetail.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/pages-userInfo/withdraw/withdraw.vue b/pages-userInfo/withdraw/withdraw.vue index 6358415..c93bda3 100644 --- a/pages-userInfo/withdraw/withdraw.vue +++ b/pages-userInfo/withdraw/withdraw.vue @@ -1,106 +1,59 @@ diff --git a/pages.json b/pages.json index c599d85..d377f73 100644 --- a/pages.json +++ b/pages.json @@ -155,7 +155,26 @@ "navigationBarTitleText": "提现记录", "enablePullDownRefresh": false } - }] + },{ + "path" : "notice/noticeDetail", + "style" : + { + "navigationBarTitleText": "公告详情", + "enablePullDownRefresh": false + } + + } + + ,{ + "path" : "withdraw/withdrawDetail", + "style" : + { + "navigationBarTitleText": "提现详情", + "enablePullDownRefresh": false + } + + } + ] }], "globalStyle": { diff --git a/pages/login/login.vue b/pages/login/login.vue index 8ccb62a..d66f4ab 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -105,7 +105,7 @@ key: 'userInfo', data: response.data.data.userInfo }) - uni.redirectTo({ + uni.switchTab({ url: '../index/index', success() { uni.showToast({