Browse Source

feature-hub-1.0:提交代码

feature-1.0
‘‘ 3 years ago
parent
commit
d3b3abba85
  1. 9
      api/index.js
  2. 78
      pages-userInfo/extends/extends.vue
  3. 81
      pages-userInfo/inviteLog/inviteLog.vue
  4. 5
      pages-userInfo/notice/noticeDetail.vue
  5. 20
      pages.json
  6. 8
      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列表 // 查看banner列表
export function listBanner() { export function listBanner() {
return request({ return request({

78
pages-userInfo/extends/extends.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="back"> <view class="back">
<view class="back-top"></view> <!-- <view class="back-top"></view> -->
<view class="uni-radius back-con uni-shadow-sm"> <view class="uni-radius back-con uni-shadow-sm">
<view class=""> <view class="">
<view class="back-con-top"> 邀请码 </view> <view class="back-con-top"> 邀请码 </view>
@ -10,26 +10,85 @@
</view> </view>
<view class="border"></view> <view class="border"></view>
<view class=""> <view class="">
<view class="back-con-top"> 邀请链接 </view> <view class="back-con-top"> 微信邀请 </view>
<view class="inviteUrl"> <button @click="" open-type="share">点击邀请</button>
http://AFJIASD?code={{userInfo.inviteCode}}
</view> </view>
<button class="">点击复制</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>
</view> </view>
</template> </template>
<script> <script>
import {
getInviteLog
} from '@/api/userInfo.js'
export default { export default {
data() { data() {
return { return {
inviteLogList: [],
pageSize: 10,
pageNum: 1,
userInfo: {}, userInfo: {},
flag: false
} }
}, },
created() { created() {
const userInfoSync = uni.getStorageSync('userInfo') const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync 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> </script>
@ -76,4 +135,13 @@
margin-top: 19rpx; margin-top: 19rpx;
background-color: rgb(165, 165, 165); background-color: rgb(165, 165, 165);
} }
.ivOver{
width: 100%;
height:100rpx;
line-height: 100rpx;
text-align: center;
background: #fff;
font-size: 20rpx;
}
</style> </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> <template>
<view> <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"> <uni-card v-bind:title="noticeDetail.title">
<text class="uni-body">{{noticeDetail.content}}</text></br> <text class="uni-body">{{noticeDetail.content}}</text></br>
<view class="bottom"> <view class="bottom">

20
pages.json

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

8
pages/userInfo/userInfo.vue

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

Loading…
Cancel
Save