Browse Source

feature-hub-1.0:提交代码

feature-1.0
‘‘ 3 years ago
parent
commit
d3b3abba85
  1. 9
      api/index.js
  2. 80
      pages-userInfo/extends/extends.vue
  3. 81
      pages-userInfo/inviteLog/inviteLog.vue
  4. 5
      pages-userInfo/notice/noticeDetail.vue
  5. 22
      pages.json
  6. 10
      pages/userInfo/userInfo.vue

9
api/index.js

@ -14,6 +14,15 @@ export function login(data) {
})
}
// 艺术家登出
export function logout(data) {
return request({
url: `${serviceTitle}${prefix}/logout`,
method: 'post',
data
})
}
// 查看banner列表
export function listBanner() {
return request({

80
pages-userInfo/extends/extends.vue

@ -1,6 +1,6 @@
<template>
<view class="back">
<view class="back-top"></view>
<!-- <view class="back-top"></view> -->
<view class="uni-radius back-con uni-shadow-sm">
<view class="">
<view class="back-con-top"> 邀请码 </view>
@ -10,26 +10,85 @@
</view>
<view class="border"></view>
<view class="">
<view class="back-con-top"> 邀请链接 </view>
<view class="inviteUrl">
http://AFJIASD?code={{userInfo.inviteCode}}
</view>
<button class="">点击复制</button>
<view class="back-con-top"> 微信邀请 </view>
<button @click="" open-type="share">点击邀请</button>
</view>
</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>
</view>
</view>
</template>
<script>
import {
getInviteLog
} from '@/api/userInfo.js'
export default {
data() {
return {
inviteLogList: [],
pageSize: 10,
pageNum: 1,
userInfo: {},
flag: false
}
},
created() {
const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync
this.getInviteLog();
},
//
onPullDownRefresh() {
this.pageNum = 1
this.inviteLogList = []
this.getInviteLog();
uni.stopPullDownRefresh()
},
//
onReachBottom() {
if (this.inviteLogList.length > this.pageSize*this.pageNum-1) {
this.flag = false;
this.pageNum += 1
this.getInviteLog();
}else{
this.flag = true;
}
},
onShareAppMessage(res) {
if (res.from === 'button') {//
console.log(res.target)
}
return {
title: '邀请更多',
path: '/pages/register/register',
}
},
methods:{
//
async getInviteLog() {
const res = await getInviteLog({
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: this.userInfo.id
})
console.log('res', res)
if (res.data.code === 200) {
this.inviteLogList.push(...res.data.rows)
console.log('inviteLogList', this.inviteLogList)
} else {
uni.showModal({
content: '邀请记录加载失败!',
showCancel: false
});
}
},
}
}
</script>
@ -76,4 +135,13 @@
margin-top: 19rpx;
background-color: rgb(165, 165, 165);
}
.ivOver{
width: 100%;
height:100rpx;
line-height: 100rpx;
text-align: center;
background: #fff;
font-size: 20rpx;
}
</style>

81
pages-userInfo/inviteLog/inviteLog.vue

@ -1,81 +0,0 @@
<template>
<view class="container">
<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>
</view>
</template>
<script>
import {
getInviteLog
} from '@/api/userInfo.js'
export default {
data() {
return {
inviteLogList: [],
pageSize: 10,
pageNum: 1,
userInfo: {},
flag: false
}
},
created() {
const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync
this.getInviteLog();
},
//
onPullDownRefresh() {
this.pageNum = 1
this.inviteLogList = []
this.getInviteLog();
uni.stopPullDownRefresh()
},
//
onReachBottom() {
if (this.inviteLogList.length > this.pageSize*this.pageNum-1) {
this.flag = false;
this.pageNum += 1
this.getInviteLog();
}else{
this.flag = true;
}
},
methods: {
//
async getInviteLog() {
const res = await getInviteLog({
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: this.userInfo.id
})
console.log('res', res)
if (res.data.code === 200) {
this.inviteLogList.push(...res.data.rows)
console.log('inviteLogList', this.inviteLogList)
} else {
uni.showModal({
content: '邀请记录加载失败!',
showCancel: false
});
}
},
},
}
</script>
<style lang="scss">
.ivOver{
width: 100%;
height:100rpx;
line-height: 100rpx;
text-align: center;
background: #fff;
font-size: 20rpx;
}
</style>

5
pages-userInfo/notice/noticeDetail.vue

@ -1,10 +1,5 @@
<template>
<view>
<!-- <view>id:{{noticeDetail.id}}</view>
<view>标题:{{noticeDetail.title}}</view>
<view>内容:{{noticeDetail.content}}</view>
<view>图片:{{noticeDetail.img}}</view>
<view>创建时间:{{noticeDetail.createTime}}</view> -->
<uni-card v-bind:title="noticeDetail.title">
<text class="uni-body">{{noticeDetail.content}}</text></br>
<view class="bottom">

22
pages.json

@ -124,9 +124,9 @@
}
},
{
"path": "inviteLog/inviteLog",
"path": "setting/setting",
"style": {
"navigationBarTitleText": "邀请记录",
"navigationBarTitleText": "系统设置",
"enablePullDownRefresh": true
}
}, {
@ -158,7 +158,23 @@
"enablePullDownRefresh": false
}
}
},
{
"path": "setting/compoSign",
"style": {
"navigationBarTitleText": "艺术家合作协议",
"enablePullDownRefresh": false
}
},
{
"path": "setting/secretSign",
"style": {
"navigationBarTitleText": "艺术家隐私协议",
"enablePullDownRefresh": false
}
}
]
}],

10
pages/userInfo/userInfo.vue

@ -51,11 +51,7 @@
url: '/pages-userInfo/extends/extends',
title: '邀请他人',
img: '/static/iconInvite.png'
}, {
url: '/pages-userInfo/inviteLog/inviteLog',
title: '邀请记录',
img: '/static/iconInviteLog.png'
}, {
}, {
url: '/pages-userInfo/notice/notice',
title: '通知公告',
img: '/static/iconNotice.png'
@ -63,6 +59,10 @@
url: '/pages-userInfo/withdraw/withdraw',
title: '提现记录',
img: '/static/iconWithdraw.png'
},{
url: '/pages-userInfo/setting/setting',
title: '系统设置',
img: '/static/iconInviteLog.png'
}],
pageUrl: '',
userInfo: {},

Loading…
Cancel
Save