This commit is contained in:
peihaoyu 2020-09-21 18:02:14 +08:00
parent 1f38de132a
commit a90b4560aa
16 changed files with 343 additions and 553 deletions

View File

@ -63,35 +63,7 @@
"navigationBarBackgroundColor": "#333",// "navigationBarBackgroundColor": "#333",//
"navigationBarTextStyle": "white" //whiteblack "navigationBarTextStyle": "white" //whiteblack
} }
},
{
"path": "pages/release-detial/release-release/release-release",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "发图文",//
"navigationBarBackgroundColor": "#333",//
"navigationBarTextStyle": "white" //whiteblack
}
},
{
"path": "pages/release-detial/release-video/release-video",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "发视频",//
"navigationBarBackgroundColor": "#333",//
"navigationBarTextStyle": "white" //whiteblack
}
},
{
"path": "pages/release-detial/release-qa/release-qa",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "提问",//
"navigationBarBackgroundColor": "#333",//
"navigationBarTextStyle": "white" //whiteblack
}
} }
,{ ,{
"path" : "pages/tabbar/my/my-article/my-article", "path" : "pages/tabbar/my/my-article/my-article",
"style": { "style": {
@ -132,6 +104,33 @@
"navigationBarTextStyle": "white" //whiteblack "navigationBarTextStyle": "white" //whiteblack
} }
} }
,{
"path" : "pages/person-info-page/person-info-page",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "个人主页",//
"navigationBarBackgroundColor": "#333",//
"navigationBarTextStyle": "white" //whiteblack
}
}
,{
"path" : "pages/tabbar/follow/follow-list",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "关注列表",//
"navigationBarBackgroundColor": "#333",//
"navigationBarTextStyle": "white" //whiteblack
}
}
,{
"path" : "pages/tabbar/follow/fans-list",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "粉丝列表",//
"navigationBarBackgroundColor": "#333",//
"navigationBarTextStyle": "white" //whiteblack
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",

View File

@ -1,21 +0,0 @@
<template>
<view class="content">
页面 - 提问
</view>
</template>
<script>
export default {
data() {
return {};
}
};
</script>
<style>
.content {
text-align: center;
height: 400upx;
margin-top: 200upx;
}
</style>

View File

@ -1,29 +0,0 @@
<template>
<view class="content">
页面 - 发图文
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.content {
text-align: center;
height: 400upx;
margin-top: 200upx;
}
</style>

View File

@ -1,29 +0,0 @@
<template>
<view class="content">
页面 - 发视频
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style>
.content {
text-align: center;
height: 400upx;
margin-top: 200upx;
}
</style>

View File

@ -1,437 +1,168 @@
<template> <template>
<view class="content"> <view class="content">
页面 - 2 <m-search
:show="false"
placeholder="搜索"
button="none"
backgroundColor="#efecec"
v-model="searchStr"
></m-search>
<view class="noData" v-if="noData === true">
<noData :custom="true"><view class="title" @tap="update()">暂无数据,点击重新加载</view></noData>
</view>
<view class="list cu-card article dynamic" v-else-if="noData === false">
<view class="cu-item" style="padding:0" v-for="(item,index) in noticeListQuery" :key="index">
<view class="cu-list menu solid-bottom" @click="goToDetails(item)">
<view class="cu-item arrow" style="min-height: 90rpx;padding-top: 10rpx;">
<view class="action">
<view class="action">
<view class='cu-tag radius bg-orange light margin-right-xs' v-if="item.type === '校园通知'">{{item.type}}</view>
<view class='cu-tag radius bg-blue light margin-right-xs' v-if="item.type === '家长意见'">{{item.type}}</view>
<view class='cu-tag radius bg-green light margin-right-xs' v-if="item.type === '学生想法'">{{item.type}}</view>
<text class="text-black text-lg">{{item.title}}</text>
</view>
</view>
</view>
</view>
<view class="text-content" style="margin:10rpx 0 0 0;">
<text class="text-gray">文章标签</text>
<text class="">{{item.label}}</text>
</view>
<view class="text-content" style="margin:10rpx 0 0 0;">
<text class="text-gray">发表人</text>
<text class="">{{item.real_name}}</text>
<text class="cancel" @tap="cancelFollow(item)">取消关注</text>
</view>
<view class="text-content" style="margin:10rpx 0 0 0;">
<text class="text-gray">发表时间</text>
<text class="">{{item.release_time}}</text>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
export default { import request from '@/util/request.js';
data() { import mSearch from '@/components/mehaotian-search/mehaotian-search.vue';
return { import noData from '@/components/noData/noData.vue';
title: 'Hello', import { sortBy } from '@/static/js/public.js';
list: [{ export default {
"_entityName": "uap_Menu", components: {
"id": "2eb4cb5f-4e80-019e-9d46-ac1b55d010bf", mSearch,
"orderNo": 1, noData
"level": 1, },
"version": 2, data() {
"levelText": "1级菜单", return {
"name": "预警发布", //
"operationSystem": { noData: false,
"_entityName": "uap_OperationSystem", //
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b", searchStr: '',
"type": "INTERNAL", //
"version": 1, noticeList: [],
"url": "#", };
"name": "安全风险管理", },
"createUser": "admin", computed: {
"status": "ENABLE" //
}, noticeListQuery(){
"showIcon": "FALSE", return this.noticeList.filter(notice => {
"status": "ENABLE" return notice.title.indexOf(this.searchStr) != -1 || notice.type.indexOf(this.searchStr) != -1
}, { || notice.real_name.indexOf(this.searchStr) != -1
"_entityName": "uap_Menu", })
"id": "7b406372-7da6-c396-b944-4ea3ea93de23", }
"orderNo": 2,
"level": 1,
"version": 1,
"levelText": "1级菜单",
"name": "预警反馈",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "f71d90fe-a394-8104-88eb-4bb651491420",
"orderNo": 3,
"level": 1,
"version": 3,
"levelText": "1级菜单",
"name": "风险预警统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "f7dc6070-4b7a-4501-c459-c47ee54727ac",
"orderNo": 4,
"level": 1,
"version": 4,
"levelText": "1级菜单",
"name": "到岗到位人员关联",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "02c9ac9c-2acd-b03b-beb4-80701b2e6fd3",
"parent": {
"_entityName": "uap_Menu",
"id": "7b406372-7da6-c396-b944-4ea3ea93de23",
"orderNo": 2,
"level": 1,
"version": 1,
"levelText": "1级菜单",
"name": "预警反馈",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
},
"orderNo": 1,
"appButtons": "/static/early_warning_feedback.png",
"level": 2,
"appUrl": "/pages/early-warning-feedback/early-warning-feedback-management",
"version": 3,
"url": "srm_WarnFeedback.browse",
"levelText": "2级菜单",
"name": "预警反馈管理",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "66afd592-d13b-09bb-44f9-64c853302b13",
"parent": {
"_entityName": "uap_Menu",
"id": "f71d90fe-a394-8104-88eb-4bb651491420",
"orderNo": 3,
"level": 1,
"version": 3,
"levelText": "1级菜单",
"name": "风险预警统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
},
"orderNo": 1,
"level": 2,
"version": 2,
"url": "srm_WarnInfoReleaseStatistics.browse",
"levelText": "2级菜单",
"name": "安全风险预警发布统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "98118247-3b5b-9b29-cf9b-5ef67e60e174",
"parent": {
"_entityName": "uap_Menu",
"id": "2eb4cb5f-4e80-019e-9d46-ac1b55d010bf",
"orderNo": 1,
"level": 1,
"version": 2,
"levelText": "1级菜单",
"name": "预警发布",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
},
"orderNo": 1,
"appButtons": "/static/early_warning_release.png",
"level": 2,
"appUrl": "/pages/early-warning-release/early-warning-notice",
"version": 2,
"url": "srm_WarnInfo.browse",
"levelText": "2级菜单",
"name": "预警发布管理",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "9060b850-abdb-7637-6ea3-4cc0ea80b96d",
"parent": {
"_entityName": "uap_Menu",
"id": "f7dc6070-4b7a-4501-c459-c47ee54727ac",
"orderNo": 4,
"level": 1,
"version": 4,
"levelText": "1级菜单",
"name": "到岗到位人员关联",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
},
"orderNo": 1,
"level": 2,
"version": 10,
"url": "srm_PersonOnDuty.browse",
"levelText": "2级菜单",
"name": "到岗到位人员管理",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "0c706e19-e26f-3ded-174b-efc8d6fa5ee3",
"parent": {
"_entityName": "uap_Menu",
"id": "f71d90fe-a394-8104-88eb-4bb651491420",
"orderNo": 3,
"level": 1,
"version": 3,
"levelText": "1级菜单",
"name": "风险预警统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
},
"orderNo": 2,
"level": 2,
"version": 2,
"url": "srm_WarnInfoCloseLoop.browse",
"levelText": "2级菜单",
"name": "安全风险预警闭环统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "46be89dc-a558-5167-f74d-e5848019dc06",
"parent": {
"_entityName": "uap_Menu",
"id": "f71d90fe-a394-8104-88eb-4bb651491420",
"orderNo": 3,
"level": 1,
"version": 3,
"levelText": "1级菜单",
"name": "风险预警统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
},
"orderNo": 3,
"level": 2,
"version": 2,
"url": "srm_WarnInfoFutureSevenDaysPowerGridStatistics.browse",
"levelText": "2级菜单",
"name": "未来七日电网风险预警统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}, {
"_entityName": "uap_Menu",
"id": "4e0e395f-049f-4494-aa37-38f54f0bd8f4",
"parent": {
"_entityName": "uap_Menu",
"id": "f71d90fe-a394-8104-88eb-4bb651491420",
"orderNo": 3,
"level": 1,
"version": 3,
"levelText": "1级菜单",
"name": "风险预警统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
},
"orderNo": 4,
"level": 2,
"version": 2,
"url": "srm_WarnInfoFutureSevenDaysTaskStatistics.browse",
"levelText": "2级菜单",
"name": "未来七日作业风险预警统计",
"operationSystem": {
"_entityName": "uap_OperationSystem",
"id": "57b5aadb-3dac-1272-65e2-f17510151a3b",
"type": "INTERNAL",
"version": 1,
"url": "#",
"name": "安全风险管理",
"createUser": "admin",
"status": "ENABLE"
},
"showIcon": "FALSE",
"status": "ENABLE"
}],
}
},
onLoad() {
},
onLoad() {
},
onShow() {
this.getAllData();
},
onPullDownRefresh () {
this.getAllData();
},
methods: {
/**
* 更新方法
*/
update() {
this.getAllData();
}, },
mounted() { /**
console.log("data",this.list); * 取消关注
this.ergodic(); * @param {Object} item
}, */
methods: { cancelFollow(item) {
// uni.showModal({
ergodic() { title: '取消关注',
let menuList = []; content: '确认取消关注?',
this.list.forEach(item=>{ success(res) {
if (item.level === 1) { if (res.confirm) {
menuList.push({ request.post("/hs/cancelFollow",{
id: item.id, userId: uni.getStorageSync("userInfo").user_id,
menuName: item.name, followId: item.user_id
subMenuList: [] }).then(res => {
}); console.log("取消关注",res);
} if (res.data === 1) {
}); this.getAllData();
this.list.forEach(item=>{
if (item.level === 2) {
menuList.forEach(i=>{
if (i.id === item.parent.id) {
i.subMenuList.push({
menuName: item.name,
url: item.appUrl
})
} }
},err => {
console.log("err",err);
}) })
} else if (res.cancel) {
console.log("取消");
} }
}); }
console.log("menuList",menuList); })
} },
/**
* 跳转详情页面
* @param {Object} item
*/
goToDetails(item) {
uni.setStorageSync("notice",item);
uni.navigateTo({
url: '/pages/tabbar/homepage/data-details'
})
},
/**
* 获取首页数据
*/
getAllData() {
request.post('/hs/getFollowList',{
userId: uni.getStorageSync("userInfo").user_id
})
.then(res=>{
this.noticeList = res.data;
uni.startPullDownRefresh();
this.noData = this.noticeList.length === 0 ? true : false;
console.log("关注页面数据",res.data);
},err=>{
console.log("err",err);
})
} }
} }
};
</script> </script>
<style> <style scoped>
.content { .cancel{
text-align: center; float: right;
height: 400upx; margin-right: 32rpx;
margin-top: 200upx; padding: 0 5rpx;
color: red;
border: 1rpx solid red;
border-radius: 10rpx;
} }
.content {
min-height: 85vh;
padding-bottom: 100rpx;
}
.text-gray{
display: inline-block;
width: 4rem;
}
.cu-card>.cu-item{
margin: 20rpx!important;
}
</style> </style>

View File

@ -8,7 +8,7 @@
{{noticeInfo.label}} {{noticeInfo.label}}
</view> </view>
<view class="author-and-time"> <view class="author-and-time">
<view class="author"> <view class="author" @tap="goToUserInfo(noticeInfo)">
{{noticeInfo.real_name}} {{noticeInfo.real_name}}
</view> </view>
<view class="time"> <view class="time">
@ -109,6 +109,20 @@
uni.startPullDownRefresh(); uni.startPullDownRefresh();
}, },
methods: { methods: {
/**
* @param {Object} item
*/
goToUserInfo(item) {
if (item.user_id === uni.getStorageSync("userInfo").user_id) {
uni.switchTab({
url: '/pages/tabbar/my/my'
});
} else {
uni.navigateTo({
url: `/pages/person-info-page/person-info-page?userId=${item.user_id}`
})
}
},
/** /**
* 点击留言弹出输入框确定 * 点击留言弹出输入框确定
*/ */

View File

@ -28,7 +28,7 @@
<text class="text-gray">文章标签</text> <text class="text-gray">文章标签</text>
<text class="">{{item.label}}</text> <text class="">{{item.label}}</text>
</view> </view>
<view class="text-content" style="margin:10rpx 0 0 0;"> <view class="text-content" style="margin:10rpx 0 0 0;" @tap="goToUserInfo(item)">
<text class="text-gray">发表人</text> <text class="text-gray">发表人</text>
<text class="">{{item.real_name}}</text> <text class="">{{item.real_name}}</text>
</view> </view>
@ -81,6 +81,20 @@ export default {
this.getAllData(); this.getAllData();
}, },
methods: { methods: {
/**
* @param {Object} item
*/
goToUserInfo(item) {
if (item.user_id === uni.getStorageSync("userInfo").user_id) {
uni.switchTab({
url: '/pages/tabbar/my/my'
});
} else {
uni.navigateTo({
url: `/pages/person-info-page/person-info-page?userId=${item.user_id}`
})
}
},
/** /**
* 跳转详情页面 * 跳转详情页面
* @param {Object} item * @param {Object} item

View File

@ -2,7 +2,7 @@
<view class="pages"> <view class="pages">
<view class="cu-chat" id="chart-page"> <view class="cu-chat" id="chart-page">
<view class="cu-item" :class="isMy(item,'self')" v-for="(item,index) in letterList" :key="index"> <view class="cu-item" :class="isMy(item,'self')" v-for="(item,index) in letterList" :key="index">
<view class="header-photo cu-avatar radius" v-if="item.send_id !== userInfo.user_id"> <view class="header-photo cu-avatar radius" v-if="item.send_id !== userInfo.user_id" @tap="goToOther(item)">
{{messageInfo.userInfo.real_name.slice(0,1)}} {{messageInfo.userInfo.real_name.slice(0,1)}}
</view> </view>
<view class="main"> <view class="main">
@ -10,7 +10,7 @@
<text>{{item.content}}</text> <text>{{item.content}}</text>
</view> </view>
</view> </view>
<view class="header-photo cu-avatar radius" v-if="item.send_id === userInfo.user_id"> <view class="header-photo cu-avatar radius" v-if="item.send_id === userInfo.user_id" @tap="goToMy">
{{userInfo.real_name.slice(0,1)}} {{userInfo.real_name.slice(0,1)}}
</view> </view>
<view class="date">{{item.letter_create_time}}</view> <view class="date">{{item.letter_create_time}}</view>
@ -53,12 +53,16 @@
onShow() { onShow() {
this.updateRead(); this.updateRead();
this.getTwoLetterApp(); this.getTwoLetterApp();
this.interval = setInterval(() => { let timesRun = 0;
let interval = setInterval(() => {
this.getTwoLetterApp(); this.getTwoLetterApp();
} ,5000); timesRun += 1;
if(timesRun === 5){
clearInterval(interval);
}
}, 2000);
}, },
onBackPress() { onBackPress() {
clearInterval(this.interval);
}, },
onLoad() { onLoad() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
@ -67,13 +71,31 @@
}, },
watch: { watch: {
letterList() { letterList() {
console.log("messageList change");
this.$nextTick(() => { this.$nextTick(() => {
uni.pageScrollTo({scrollTop: 99999, duration: 0}); uni.pageScrollTo({scrollTop: 99999, duration: 0});
}) })
} }
}, },
methods: { methods: {
/**
* 跳转到其他人的主页
* @param {Object} item
*/
goToOther(item) {
uni.navigateTo({
url: `/pages/person-info-page/person-info-page?userId=${item.send_id}`
})
},
/**
* 跳转到我的主页
* @param {Object} item
*/
goToMy() {
uni.switchTab({
url: '/pages/tabbar/my/my'
});
},
/** /**
* 获取两个人的私信 * 获取两个人的私信
*/ */

View File

@ -28,7 +28,7 @@
<text class="text-gray">文章标签</text> <text class="text-gray">文章标签</text>
<text class="">{{item.label}}</text> <text class="">{{item.label}}</text>
</view> </view>
<view class="text-content" style="margin:10rpx 0 0 0;"> <view class="text-content" style="margin:10rpx 0 0 0;" @tap="goToUserInfo(item)">
<text class="text-gray">发表人</text> <text class="text-gray">发表人</text>
<text class="">{{item.real_name}}</text> <text class="">{{item.real_name}}</text>
</view> </view>
@ -87,6 +87,21 @@ export default {
this.getAllData(); this.getAllData();
}, },
methods: { methods: {
/**
* 跳转人员信息页面
* @param {Object} item
*/
goToUserInfo(item) {
if (item.user_id === uni.getStorageSync("userInfo").user_id) {
uni.switchTab({
url: '/pages/tabbar/my/my'
});
} else {
uni.navigateTo({
url: `/pages/person-info-page/person-info-page?userId=${item.user_id}`
})
}
},
/** /**
* 编辑页面 * 编辑页面
* @param {Object} item * @param {Object} item

View File

@ -2,17 +2,27 @@
<view class="page"> <view class="page">
<view class="top"> <view class="top">
<view class="header-photo"> <view class="header-photo">
{{userInfo.real_name.slice(0,1)}}
</view> </view>
<view class="user-info"> <view class="user-info">
<view class="name"> <view class="info-left">
姓名裴浩宇 <view class="name">
姓名{{userInfo.real_name}}
</view>
<view class="grade">
等级<text class="l">天才</text><text class="r">{{Math.floor((userInfo.integral)/1000)+1}}</text>
</view>
<view class="score">
积分{{userInfo.integral}}
</view>
</view> </view>
<view class="grade"> <view class="info-right">
等级<text class="l">博客</text><text class="r">{{Math.floor(1520/1000)+1}}</text> <view class="score" @tap="goPage('followList')">
</view> 关注{{userOtherInfo.followNumber}}
<view class="score"> </view>
积分1520 <view class="score" @tap="goPage('fansList')">
粉丝{{userOtherInfo.fansNumber}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -33,6 +43,7 @@
</template> </template>
<script> <script>
import request from '@/util/request.js';
export default { export default {
data() { data() {
return { return {
@ -70,13 +81,48 @@
name: '帮助', name: '帮助',
code: 'help' code: 'help'
}, },
] ],
userInfo: uni.getStorageSync("userInfo"),
userOtherInfo: {}
} }
}, },
onLoad() { onLoad() {
},
onPullDownRefresh () {
this.getUserInfo();
},
mounted() {
this.getUserInfo();
}, },
methods: { methods: {
/**
* 跳转页面
* @param {Object} pageName 页面名称
*/
goPage(pageName) {
const FUNCTION_CODE = {
'followList': '/pages/tabbar/follow/follow-list',
'fansList': '/pages/tabbar/follow/fans-list',
}
uni.navigateTo({
url: `${FUNCTION_CODE[pageName]}`
})
},
/**
* 获取个人信息
*/
getUserInfo() {
request.post("/hs/getPersonalInfo",{
userId: uni.getStorageSync("userInfo").user_id,
releaseId: uni.getStorageSync("userInfo").user_id
}).then(res => {
uni.startPullDownRefresh();
console.log("个人信息",res);
this.userOtherInfo = res.data.personalInfo;
},err => {
console.log("err",err);
})
},
/** /**
* 跳转页面 * 跳转页面
* @param {Object} item * @param {Object} item
@ -88,11 +134,10 @@
'personInfo': '', 'personInfo': '',
'settings': '', 'settings': '',
'help': '' 'help': ''
} };
uni.navigateTo({ uni.navigateTo({
url: `${FUNCTION_CODE[item.code]}` url: `${FUNCTION_CODE[item.code]}`
}) })
console.log(item)
} }
} }
} }
@ -115,16 +160,17 @@
background-color: #2D5315; background-color: #2D5315;
} }
.user-info view{ .user-info view{
padding: 10rpx 50rpx; padding: 10rpx 10rpx;
} }
.user-info{ .user-info{
color: #FFFFFF; color: #FFFFFF;
display: flex; display: flex;
flex-flow: column; flex-flow: nowrap;
justify-content: center; justify-content: center;
border: 1rpx solid #b0b0b0; border: 1rpx solid #b0b0b0;
border-radius: 10rpx; border-radius: 10rpx;
width: 60%; width: 70%;
font-size: 32rpx;
background-color: #ced8d8; background-color: #ced8d8;
} }
.header-photo{ .header-photo{

View File

@ -1,5 +1,6 @@
const baseUrl = 'http://106.53.113.158:8048'; //服务器地址 // const baseUrl = 'http://106.53.113.158:8048'; //服务器地址
const baseUrl = 'http://192.168.10.29:8048'; //服务器地址
const get = (url, data) => { const get = (url, data) => {
let httpDefaultOpts = { let httpDefaultOpts = {

View File

@ -0,0 +1,4 @@
package com.qinxx.hslink.controller;
public class AdminHSController {
}

View File

@ -0,0 +1,4 @@
package com.qinxx.hslink.dao;
public interface AdminHSMapper {
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qinxx.hslink.dao.AdminHSLinkMapper">
</mapper>

View File

@ -0,0 +1,4 @@
package com.qinxx.hslink.service;
public interface AdminHSService {
}

View File

@ -0,0 +1,9 @@
package com.qinxx.hslink.service.impl;
import com.qinxx.hslink.service.AdminHSService;
/**
* @author PHY
*/
public class AdminHSServiceImpl implements AdminHSService {
}