通知功能
This commit is contained in:
parent
9125904cda
commit
653a76d3df
@ -1,7 +1,15 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import request from "@/util/request.js";
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//未读消息数字
|
||||||
|
unreadNumber: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
console.log('App Launch');
|
console.log('App Launch');
|
||||||
|
this.getTabBarNumber();
|
||||||
/**
|
/**
|
||||||
* 主页面tab标签红标显示
|
* 主页面tab标签红标显示
|
||||||
*/
|
*/
|
||||||
@ -20,6 +28,30 @@ export default {
|
|||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide');
|
console.log('App Hide');
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取tabBar数字
|
||||||
|
*/
|
||||||
|
getTabBarNumber() {
|
||||||
|
request.post("/hs/getTabBarNumber",{
|
||||||
|
userId: uni.getStorageSync("userInfo").user_id
|
||||||
|
}).then(res => {
|
||||||
|
console.log("获取tabBar数字",res);
|
||||||
|
if (res.data.unreadNumber > 0) {
|
||||||
|
uni.setTabBarBadge({
|
||||||
|
index: 3,
|
||||||
|
text: res.data.unreadNumber.toString()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.removeTabBarBadge({
|
||||||
|
index: 3
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},err => {
|
||||||
|
console.log("err",err)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
212
HSLink-app/components/uni-collapse-item/uni-collapse-item.vue
Normal file
212
HSLink-app/components/uni-collapse-item/uni-collapse-item.vue
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
<template>
|
||||||
|
<view :class="{ 'uni-collapse-cell--disabled': disabled,'uni-collapse-cell--notdisabled': !disabled, 'uni-collapse-cell--open': isOpen,'uni-collapse-cell--hide':!isOpen }"
|
||||||
|
class="uni-collapse-cell">
|
||||||
|
<view class="uni-collapse-cell__title" @click="onClick">
|
||||||
|
<image v-if="thumb" :src="thumb" class="uni-collapse-cell__title-img" />
|
||||||
|
<text class="uni-collapse-cell__title-text">{{ title }}</text>
|
||||||
|
<!-- #ifdef MP-ALIPAY -->
|
||||||
|
<view :class="{ 'uni-collapse-cell__title-arrow-active': isOpen, 'uni-collapse-cell--animation': showAnimation === true }"
|
||||||
|
class="uni-collapse-cell__title-arrow">
|
||||||
|
<uni-icons color="#bbb" size="20" type="arrowdown" />
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifndef MP-ALIPAY -->
|
||||||
|
<uni-icons :class="{ 'uni-collapse-cell__title-arrow-active': isOpen, 'uni-collapse-cell--animation': showAnimation === true }"
|
||||||
|
class="uni-collapse-cell__title-arrow" color="#bbb" size="20" type="arrowdown" />
|
||||||
|
<!-- #endif -->
|
||||||
|
</view>
|
||||||
|
<view :class="{'uni-collapse-cell__content--hide':!isOpen}" class="uni-collapse-cell__content">
|
||||||
|
<view :class="{ 'uni-collapse-cell--animation': showAnimation === true }" class="uni-collapse-cell__wrapper" :style="{'transform':isOpen?'translateY(0)':'translateY(-50%)','-webkit-transform':isOpen?'translateY(0)':'translateY(-50%)'}">
|
||||||
|
<slot />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import uniIcons from '../uni-icons/uni-icons.vue'
|
||||||
|
export default {
|
||||||
|
name: 'UniCollapseItem',
|
||||||
|
components: {
|
||||||
|
uniIcons
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
// 列表标题
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
// 唯一标识符
|
||||||
|
type: [Number, String],
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
// 是否禁用
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
showAnimation: {
|
||||||
|
// 是否显示动画
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
open: {
|
||||||
|
// 是否展开
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
thumb: {
|
||||||
|
// 缩略图
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isOpen: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
open(val) {
|
||||||
|
this.isOpen = val
|
||||||
|
}
|
||||||
|
},
|
||||||
|
inject: ['collapse'],
|
||||||
|
created() {
|
||||||
|
this.isOpen = this.open
|
||||||
|
this.nameSync = this.name ? this.name : this.collapse.childrens.length
|
||||||
|
this.collapse.childrens.push(this)
|
||||||
|
if (String(this.collapse.accordion) === 'true') {
|
||||||
|
if (this.isOpen) {
|
||||||
|
let lastEl = this.collapse.childrens[this.collapse.childrens.length - 2]
|
||||||
|
if (lastEl) {
|
||||||
|
this.collapse.childrens[this.collapse.childrens.length - 2].isOpen = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onClick() {
|
||||||
|
if (this.disabled) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (String(this.collapse.accordion) === 'true') {
|
||||||
|
this.collapse.childrens.forEach(vm => {
|
||||||
|
if (vm === this) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
vm.isOpen = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.isOpen = !this.isOpen
|
||||||
|
this.collapse.onChange && this.collapse.onChange()
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@/uni.scss';
|
||||||
|
|
||||||
|
.uni-collapse-cell {
|
||||||
|
flex-direction: column;
|
||||||
|
border-color: $uni-border-color;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.uni-collapse-cell--hover {
|
||||||
|
background-color: $uni-bg-color-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell--open {
|
||||||
|
background-color: $uni-bg-color-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell--disabled {
|
||||||
|
background-color: $uni-bg-color-hover;
|
||||||
|
// opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.uni-collapse-cell--hide {
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell--animation {
|
||||||
|
// transition: transform 0.3s ease;
|
||||||
|
transition-property: transform;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
transition-timing-function: ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__title {
|
||||||
|
padding: 12px 12px;
|
||||||
|
position: relative;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* #endif */
|
||||||
|
height: 48px;
|
||||||
|
line-height: 24px;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__title:active {
|
||||||
|
background-color: $uni-bg-color-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__title-img {
|
||||||
|
height: $uni-img-size-base;
|
||||||
|
width: $uni-img-size-base;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__title-arrow {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
transform: rotate(0deg);
|
||||||
|
transform-origin: center center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__title-arrow-active {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__title-text {
|
||||||
|
flex: 1;
|
||||||
|
font-size: $uni-font-size-base;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
white-space: nowrap;
|
||||||
|
color: inherit;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
lines: 1;
|
||||||
|
/* #endif */
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__content {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__wrapper {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-collapse-cell__content--hide {
|
||||||
|
height: 0px;
|
||||||
|
line-height: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
54
HSLink-app/components/uni-collapse/uni-collapse.vue
Normal file
54
HSLink-app/components/uni-collapse/uni-collapse.vue
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<template>
|
||||||
|
<view class="uni-collapse">
|
||||||
|
<slot />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'UniCollapse',
|
||||||
|
props: {
|
||||||
|
accordion: {
|
||||||
|
// 是否开启手风琴效果
|
||||||
|
type: [Boolean, String],
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
collapse: this
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.childrens = []
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onChange() {
|
||||||
|
let activeItem = []
|
||||||
|
this.childrens.forEach((vm, index) => {
|
||||||
|
if (vm.isOpen) {
|
||||||
|
activeItem.push(vm.nameSync)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$emit('change', activeItem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@/uni.scss';
|
||||||
|
|
||||||
|
.uni-collapse {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
flex: 1;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: $uni-bg-color;
|
||||||
|
}
|
||||||
|
</style>
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "HSLink",
|
"name" : "HSLink",
|
||||||
"appid" : "__UNI__7C9492E",
|
"appid" : "__UNI__7C9492E",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.4",
|
"versionName" : "1.0.7",
|
||||||
"versionCode" : 104,
|
"versionCode" : 107,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
|
@ -74,7 +74,21 @@
|
|||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "我",//顶部名称
|
"navigationBarTitleText": "我",//顶部名称
|
||||||
"navigationBarBackgroundColor": "#333",//顶部背景色
|
"navigationBarBackgroundColor": "#333",//顶部背景色
|
||||||
"navigationBarTextStyle": "white" //文字颜色,目前只支持white和black这两种颜色(小程序)
|
"navigationBarTextStyle": "white" ,//文字颜色,目前只支持white和black这两种颜色(小程序)
|
||||||
|
"app-plus": {
|
||||||
|
"bounce": "none", //关闭窗口回弹效果
|
||||||
|
"titleNView": {
|
||||||
|
"buttons": [ //原生标题栏按钮配置,
|
||||||
|
{
|
||||||
|
"type":"none",
|
||||||
|
"text":"通知 ",
|
||||||
|
"fontSize":"16px",
|
||||||
|
"float":"right",
|
||||||
|
"redDot" : true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
,{
|
,{
|
||||||
@ -264,6 +278,33 @@
|
|||||||
"navigationBarTextStyle": "white" //文字颜色,目前只支持white和black这两种颜色(小程序)
|
"navigationBarTextStyle": "white" //文字颜色,目前只支持white和black这两种颜色(小程序)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/login/register",
|
||||||
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"navigationBarTitleText": "用户注册",//顶部名称
|
||||||
|
"navigationBarBackgroundColor": "#333",//顶部背景色
|
||||||
|
"navigationBarTextStyle": "white" //文字颜色,目前只支持white和black这两种颜色(小程序)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/tabbar/my/register-management/register-management",
|
||||||
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"navigationBarTitleText": "注册管理",//顶部名称
|
||||||
|
"navigationBarBackgroundColor": "#333",//顶部背景色
|
||||||
|
"navigationBarTextStyle": "white" //文字颜色,目前只支持white和black这两种颜色(小程序)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/tabbar/my/notice/notice",
|
||||||
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"navigationBarTitleText": "通知",//顶部名称
|
||||||
|
"navigationBarBackgroundColor": "#333",//顶部背景色
|
||||||
|
"navigationBarTextStyle": "white" //文字颜色,目前只支持white和black这两种颜色(小程序)
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
@ -27,6 +27,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="cu-btn login-btn" @tap="doLogin">登 录</button>
|
<button class="cu-btn login-btn" @tap="doLogin">登 录</button>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="forget" @tap="forgetPassword">
|
||||||
|
忘记密码
|
||||||
|
</view>
|
||||||
|
<view class="register" @tap="register">
|
||||||
|
用户注册
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -51,14 +59,37 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.role = uni.getStorageSync("userInfo").user_type;
|
console.log(uni.getStorageSync("userInfo"))
|
||||||
this.username = uni.getStorageSync("userInfo").real_name;
|
if (uni.getStorageSync("userInfo").data !== null && uni.getStorageSync("userInfo") !== "") {
|
||||||
this.password = uni.getStorageSync("userInfo").pass_word;
|
uni.switchTab({
|
||||||
|
url: '/pages/tabbar/homepage/homepage'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.role = uni.getStorageSync("loginInfo").user_type;
|
||||||
|
this.username = uni.getStorageSync("loginInfo").real_name;
|
||||||
|
this.password = uni.getStorageSync("loginInfo").pass_word;
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getUserType();
|
this.getUserType();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 用户注册
|
||||||
|
*/
|
||||||
|
register() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/login/register"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 忘记密码
|
||||||
|
*/
|
||||||
|
forgetPassword() {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "请联系管理员重置密码"
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 获取字典项数据(用户类型)
|
* 获取字典项数据(用户类型)
|
||||||
*/
|
*/
|
||||||
@ -116,8 +147,14 @@
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '角色不匹配'
|
title: '角色不匹配'
|
||||||
})
|
})
|
||||||
|
} else if (res.data.take_effect === '0') {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '该账号注册流程正在审核'
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.setStorageSync("userInfo", res.data);
|
uni.setStorageSync("userInfo", res.data);
|
||||||
|
uni.setStorageSync("loginInfo", res.data);
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/tabbar/homepage/homepage'
|
url: '/pages/tabbar/homepage/homepage'
|
||||||
});
|
});
|
||||||
@ -144,7 +181,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
|
.bottom{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
color: #968f99;
|
||||||
|
}
|
||||||
page {
|
page {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
|
|
||||||
@ -247,11 +290,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.login-btn {
|
.login-btn {
|
||||||
margin-top: 70upx;
|
margin-top: 50upx;
|
||||||
height: 96upx;
|
height: 96upx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #797979;
|
background: #797979;
|
||||||
border-radius: 47upx;
|
|
||||||
font-size: 34upx;
|
font-size: 34upx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
208
HSLink-app/pages/login/register.vue
Normal file
208
HSLink-app/pages/login/register.vue
Normal file
@ -0,0 +1,208 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<view class="content">
|
||||||
|
<view class="role one">
|
||||||
|
<view class="left">
|
||||||
|
角色:
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<view class="login-list flex border-all">
|
||||||
|
<view class="iconfont icon-shoujihao flex"></view>
|
||||||
|
<picker @change="rolePickerChange" :value="roleIndex" :range="roleList">
|
||||||
|
<view class="picker">
|
||||||
|
{{roleIndex > -1 ? roleList[roleIndex] : ((this.role === '' || this.role === undefined) ? '请选择角色' : this.role)}}
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="mobile one">
|
||||||
|
<view class="left">
|
||||||
|
手机号:
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<input type="text" v-model="mobile" placeholder="请输入手机号"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="username one">
|
||||||
|
<view class="left">
|
||||||
|
姓名:
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<input type="text" v-model="username" placeholder="请输入姓名"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="password one">
|
||||||
|
<view class="left">
|
||||||
|
密码:
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<input type="password" v-model="password" placeholder="请输入密码"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="again-password one">
|
||||||
|
<view class="left">
|
||||||
|
确认密码:
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<input type="password" v-model="againPassword" placeholder="请确认密码"/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="button">
|
||||||
|
<button class="login-btn" @tap="register">注 册</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '@/util/request.js';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//角色列表
|
||||||
|
roleList: [],
|
||||||
|
//角色序号
|
||||||
|
roleIndex: -1,
|
||||||
|
//角色
|
||||||
|
role: '',
|
||||||
|
//手机号
|
||||||
|
mobile: '',
|
||||||
|
//账号
|
||||||
|
username: '',
|
||||||
|
//密码
|
||||||
|
password: '',
|
||||||
|
//确认密码
|
||||||
|
againPassword: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getUserType();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 注册
|
||||||
|
*/
|
||||||
|
register() {
|
||||||
|
if (this.role === '') {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请选择角色'
|
||||||
|
})
|
||||||
|
} else if (this.mobile.length !== 11) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请输入正确的手机号'
|
||||||
|
})
|
||||||
|
} else if (this.username === '') {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请输入您的姓名'
|
||||||
|
})
|
||||||
|
} else if (this.password === '') {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请输入密码'
|
||||||
|
})
|
||||||
|
} else if (this.againPassword === '') {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请确认密码'
|
||||||
|
})
|
||||||
|
} else if (this.againPassword !== this.password) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '两次密码不一致'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
request.post('/hs/register',{
|
||||||
|
type: this.role,
|
||||||
|
mobile: this.mobile,
|
||||||
|
realname: this.username,
|
||||||
|
password: this.password
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data > 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'loading',
|
||||||
|
title: '注册成功'
|
||||||
|
});
|
||||||
|
uni.setStorageSync('loginInfo',{
|
||||||
|
user_type: this.role,
|
||||||
|
real_name: this.username,
|
||||||
|
pass_word: this.password
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
});
|
||||||
|
},1000)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '该手机号或姓名已被注册'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
console.log('注册',res);
|
||||||
|
},err => {
|
||||||
|
console.log('err',err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 选择角色
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
rolePickerChange(e) {
|
||||||
|
this.roleIndex = e.detail.value;
|
||||||
|
if (this.roleIndex === -1) {
|
||||||
|
this.roleIndex = 0
|
||||||
|
}
|
||||||
|
this.role = this.roleList[this.roleIndex];
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取字典项数据(用户类型)
|
||||||
|
*/
|
||||||
|
getUserType() {
|
||||||
|
request.post("/hs/getDictionariesData",{
|
||||||
|
code: "UserType"
|
||||||
|
}).then(res => {
|
||||||
|
console.log("用户类型",res);
|
||||||
|
this.roleList = [];
|
||||||
|
res.data.forEach(item => {
|
||||||
|
if (item.dd_detail !== "管理员") {
|
||||||
|
this.roleList.push(item.dd_detail)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},err => {
|
||||||
|
console.log("err",err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.button{
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
|
.login-btn {
|
||||||
|
background: #797979;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.one .left{
|
||||||
|
width: 200rpx;
|
||||||
|
color: #8f8f8f;
|
||||||
|
}
|
||||||
|
.one .right{
|
||||||
|
color: #a7a7a7;
|
||||||
|
}
|
||||||
|
.one{
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
margin: 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.page{
|
||||||
|
}
|
||||||
|
</style>
|
@ -8,7 +8,7 @@
|
|||||||
v-model="searchStr"
|
v-model="searchStr"
|
||||||
></m-search>
|
></m-search>
|
||||||
<view class="noData" v-if="noData === true">
|
<view class="noData" v-if="noData === true">
|
||||||
<noData :custom="true"><view class="title" @tap="update()">暂无数据,点击重新加载</view></noData>
|
<noData :custom="true"><view class="title">暂无关注,打开他人主页可关注</view></noData>
|
||||||
</view>
|
</view>
|
||||||
<view class="list cu-card article dynamic" v-else-if="noData === false">
|
<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-item" style="padding:0" v-for="(item,index) in noticeListQuery" :key="index">
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
<view class="one-message" v-for="(item,index) in messageList" :key="index">
|
<view class="one-message" v-for="(item,index) in messageList" :key="index">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="header-photo">
|
<view class="header-photo">
|
||||||
{{item.real_name.slice(0,1)}}
|
<avatar :userName="item.real_name" size="50"></avatar>
|
||||||
</view>
|
</view>
|
||||||
<view class="message">
|
<view class="message">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<view class="cu-modal" :class="messageDialog ? 'show' : ''" :style="[{'margin-top': -InputBottom/2+'px'}]">
|
<view class="cu-modal" :class="messageDialog ? 'show' : ''" :style="[{'margin-top': -InputBottom/2+'px'}]">
|
||||||
<view class="cu-dialog">
|
<view class="cu-dialog">
|
||||||
<view class="cu-bar bg-white justify-end">
|
<view class="cu-bar bg-white justify-end">
|
||||||
<view class="title-content">留言</view>
|
<view class="title-content bg-white">留言</view>
|
||||||
<view class="action" @tap="hideModal">
|
<view class="action" @tap="hideModal">
|
||||||
<text class="cuIcon-close text-red"></text>
|
<text class="cuIcon-close text-red"></text>
|
||||||
</view>
|
</view>
|
||||||
@ -95,8 +95,10 @@
|
|||||||
<script>
|
<script>
|
||||||
import request from '@/util/request.js';
|
import request from '@/util/request.js';
|
||||||
import uniFav from '@/components/uni-fav/uni-fav.vue';
|
import uniFav from '@/components/uni-fav/uni-fav.vue';
|
||||||
|
import avatar from "@/pages/components/avatar/avatar.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
avatar,
|
||||||
uniFav
|
uniFav
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -319,15 +321,6 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.one-message .header-photo{
|
|
||||||
color: #1296DB;
|
|
||||||
border: 1rpx solid #1296DB;
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 76rpx;
|
|
||||||
height: 76rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 76rpx;
|
|
||||||
}
|
|
||||||
.one-message{
|
.one-message{
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
@ -67,6 +67,10 @@
|
|||||||
},
|
},
|
||||||
onBackPress() {
|
onBackPress() {
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh () {
|
||||||
|
this.getTwoLetterApp();
|
||||||
|
uni.startPullDownRefresh();
|
||||||
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: this.otherInfo.real_name
|
title: this.otherInfo.real_name
|
||||||
@ -84,15 +88,10 @@
|
|||||||
* 调整弹框高度
|
* 调整弹框高度
|
||||||
*/
|
*/
|
||||||
InputFocus(e) {
|
InputFocus(e) {
|
||||||
setTimeout(() => {
|
|
||||||
this.InputBottom = e.detail.height;
|
this.InputBottom = e.detail.height;
|
||||||
console.log(this.InputBottom)
|
|
||||||
},500)
|
|
||||||
},
|
},
|
||||||
InputBlur(e) {
|
InputBlur(e) {
|
||||||
setTimeout(() => {
|
|
||||||
this.InputBottom = 0
|
this.InputBottom = 0
|
||||||
},500)
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转到其他人的主页
|
* 跳转到其他人的主页
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<view class="cu-list menu-avatar">
|
<view class="noData" v-if="noData === true">
|
||||||
|
<noData :custom="true"><view class="title">暂无消息,打开他人主页可私信</view></noData>
|
||||||
|
</view>
|
||||||
|
<view class="cu-list menu-avatar" v-if="noData === false">
|
||||||
<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
|
<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
|
||||||
v-for="(item,index) in message"
|
v-for="(item,index) in message"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -20,7 +23,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="action">
|
<view class="action">
|
||||||
<view class="text-grey text-xs">{{item.letterList[item.letterList.length-1].letter_create_time}}</view>
|
<view class="text-grey text-xs">{{item.letterList[item.letterList.length-1].letter_create_time}}</view>
|
||||||
<view class="cu-tag round bg-grey sm">{{item.unreadNumber}}</view>
|
<view class="cu-tag round bg-grey sm" v-if="item.unreadNumber === 0">{{item.unreadNumber}}</view>
|
||||||
|
<view class="cu-tag round bg-red sm" v-if="item.unreadNumber > 0">{{item.unreadNumber}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="move">
|
<view class="move">
|
||||||
<view class="bg-red" @tap="deleteMessage">删除</view>
|
<view class="bg-red" @tap="deleteMessage">删除</view>
|
||||||
@ -33,24 +37,52 @@
|
|||||||
<script>
|
<script>
|
||||||
import request from '@/util/request.js';
|
import request from '@/util/request.js';
|
||||||
import avatar from "@/pages/components/avatar/avatar.vue";
|
import avatar from "@/pages/components/avatar/avatar.vue";
|
||||||
|
import noData from '@/components/noData/noData.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
avatar
|
avatar,
|
||||||
|
noData
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
modalName: null,
|
modalName: null,
|
||||||
message: [],
|
message: [],
|
||||||
|
//无数据
|
||||||
|
noData: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getPersonalPrivateLetter();
|
this.getPersonalPrivateLetter();
|
||||||
|
this.getTabBarNumber();
|
||||||
},
|
},
|
||||||
onPullDownRefresh () {
|
onPullDownRefresh () {
|
||||||
this.getPersonalPrivateLetter();
|
this.getPersonalPrivateLetter();
|
||||||
|
this.getTabBarNumber();
|
||||||
uni.startPullDownRefresh();
|
uni.startPullDownRefresh();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取tabBar数字
|
||||||
|
*/
|
||||||
|
getTabBarNumber() {
|
||||||
|
request.post("/hs/getTabBarNumber",{
|
||||||
|
userId: uni.getStorageSync("userInfo").user_id
|
||||||
|
}).then(res => {
|
||||||
|
console.log("获取tabBar数字",res);
|
||||||
|
if (res.data.unreadNumber > 0) {
|
||||||
|
uni.setTabBarBadge({
|
||||||
|
index: 3,
|
||||||
|
text: res.data.unreadNumber.toString()
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.removeTabBarBadge({
|
||||||
|
index: 3
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},err => {
|
||||||
|
console.log("err",err)
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转到消息页面
|
* 跳转到消息页面
|
||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
@ -78,6 +110,7 @@
|
|||||||
userId: uni.getStorageSync("userInfo").user_id,
|
userId: uni.getStorageSync("userInfo").user_id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.message = res.data;
|
this.message = res.data;
|
||||||
|
this.noData = res.data.length > 0 ? false : true;
|
||||||
this.message.forEach((item,index) => {
|
this.message.forEach((item,index) => {
|
||||||
let unreadNumber = 0;
|
let unreadNumber = 0;
|
||||||
item.letterList.forEach(i => {
|
item.letterList.forEach(i => {
|
||||||
@ -86,7 +119,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
item.unreadNumber = unreadNumber;
|
item.unreadNumber = unreadNumber;
|
||||||
|
|
||||||
});
|
});
|
||||||
this.message.forEach((item,index) => {
|
this.message.forEach((item,index) => {
|
||||||
if (item.userInfo.user_id === uni.getStorageSync("userInfo").user_id) {
|
if (item.userInfo.user_id === uni.getStorageSync("userInfo").user_id) {
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
* 提交帮助
|
* 提交帮助
|
||||||
*/
|
*/
|
||||||
answerHelp(item) {
|
answerHelp(item) {
|
||||||
if (this.answer === "") {
|
if (item.answer === "") {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: "none",
|
icon: "none",
|
||||||
title: "请输入解决方案"
|
title: "请输入解决方案"
|
||||||
|
@ -116,6 +116,7 @@
|
|||||||
icon: "loading",
|
icon: "loading",
|
||||||
title: "提交成功"
|
title: "提交成功"
|
||||||
});
|
});
|
||||||
|
this.content = "";
|
||||||
this.getHistoryHelp();
|
this.getHistoryHelp();
|
||||||
}
|
}
|
||||||
},err => {
|
},err => {
|
||||||
|
@ -36,6 +36,9 @@
|
|||||||
v-if="item.admin === 0"
|
v-if="item.admin === 0"
|
||||||
@tap="goToPage(item)">
|
@tap="goToPage(item)">
|
||||||
<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
||||||
|
<view class="cu-tag badge" v-if="item.badge > 0">
|
||||||
|
<block v-if="item.badge > 0">{{item.badge>99?'99+':item.badge}}</block>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text>{{item.name}}</text>
|
<text>{{item.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -62,6 +65,7 @@
|
|||||||
color: 'orange',
|
color: 'orange',
|
||||||
name: '收藏',
|
name: '收藏',
|
||||||
admin: 0,
|
admin: 0,
|
||||||
|
badge: 0,
|
||||||
code: 'collection'
|
code: 'collection'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -69,6 +73,7 @@
|
|||||||
color: 'yellow',
|
color: 'yellow',
|
||||||
name: '我的文章',
|
name: '我的文章',
|
||||||
admin: 0,
|
admin: 0,
|
||||||
|
badge: 0,
|
||||||
code: 'myArticle'
|
code: 'myArticle'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -76,6 +81,7 @@
|
|||||||
color: 'red',
|
color: 'red',
|
||||||
name: '编辑信息',
|
name: '编辑信息',
|
||||||
admin: 0,
|
admin: 0,
|
||||||
|
badge: 0,
|
||||||
code: 'personInfo'
|
code: 'personInfo'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -83,6 +89,7 @@
|
|||||||
color: 'olive',
|
color: 'olive',
|
||||||
name: '文章管理',
|
name: '文章管理',
|
||||||
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 0 : 1,
|
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 0 : 1,
|
||||||
|
badge: 0,
|
||||||
code: 'articleManagement'
|
code: 'articleManagement'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -90,13 +97,23 @@
|
|||||||
color: 'cyan',
|
color: 'cyan',
|
||||||
name: '人员管理',
|
name: '人员管理',
|
||||||
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 0 : 1,
|
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 0 : 1,
|
||||||
|
badge: 0,
|
||||||
code: 'peopleManagement'
|
code: 'peopleManagement'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
cuIcon: 'friendadd',
|
||||||
|
color: 'green',
|
||||||
|
name: '注册管理',
|
||||||
|
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 0 : 1,
|
||||||
|
badge: 0,
|
||||||
|
code: 'registerManagement'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
cuIcon: 'comment',
|
cuIcon: 'comment',
|
||||||
color: 'brown',
|
color: 'brown',
|
||||||
name: '帮助答复',
|
name: '帮助答复',
|
||||||
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 0 : 1,
|
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 0 : 1,
|
||||||
|
badge: 0,
|
||||||
code: 'helpAnswer'
|
code: 'helpAnswer'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -104,6 +121,7 @@
|
|||||||
color: 'purple',
|
color: 'purple',
|
||||||
name: '设置',
|
name: '设置',
|
||||||
admin: 0,
|
admin: 0,
|
||||||
|
badge: 0,
|
||||||
code: 'settings'
|
code: 'settings'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -111,16 +129,30 @@
|
|||||||
color: 'pink',
|
color: 'pink',
|
||||||
name: '帮助',
|
name: '帮助',
|
||||||
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 1 : 0,
|
admin: uni.getStorageSync("userInfo").user_type === "管理员" ? 1 : 0,
|
||||||
|
badge: 0,
|
||||||
code: 'help'
|
code: 'help'
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
userOtherInfo: {}
|
userOtherInfo: {},
|
||||||
|
//通知数量
|
||||||
|
noticeNumber: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 跳转通知页面
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
onNavigationBarButtonTap(e) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/tabbar/my/notice/notice'
|
||||||
|
})
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
|
this.getMyPageNumber();
|
||||||
|
this.getNoticeData();
|
||||||
this.userInfo = uni.getStorageSync("userInfo");
|
this.userInfo = uni.getStorageSync("userInfo");
|
||||||
let timesRun = 0;
|
let timesRun = 0;
|
||||||
let interval = setInterval(() => {
|
let interval = setInterval(() => {
|
||||||
@ -132,13 +164,65 @@
|
|||||||
}, 10000);
|
}, 10000);
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh () {
|
onPullDownRefresh () {
|
||||||
|
this.getMyPageNumber();
|
||||||
|
this.getNoticeData();
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取通知
|
||||||
|
*/
|
||||||
|
getNoticeData() {
|
||||||
|
request.post('/hs/getNoticeData',{
|
||||||
|
authorId: uni.getStorageSync("userInfo").user_id
|
||||||
|
}).then(res => {
|
||||||
|
this.noticeNumber = res.data.messageNoticeList.length + res.data.verifyNoticeList.length;
|
||||||
|
if(this.noticeNumber == 0) {
|
||||||
|
//隐藏
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
const page = pages[pages.length - 1];
|
||||||
|
const currentWebview = page.$getAppWebview();
|
||||||
|
currentWebview.hideTitleNViewButtonRedDot({
|
||||||
|
index:0
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
}else{
|
||||||
|
//显示
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
const page = pages[pages.length - 1];
|
||||||
|
const currentWebview = page.$getAppWebview();
|
||||||
|
currentWebview.showTitleNViewButtonRedDot({
|
||||||
|
index:0
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
console.log("通知",res);
|
||||||
|
},err => {
|
||||||
|
console.log("err",err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取文章管理/帮助答复的未操作数字
|
||||||
|
*/
|
||||||
|
getMyPageNumber() {
|
||||||
|
let _this = this;
|
||||||
|
request.post("/admin/getMyPageNumber",{
|
||||||
|
}).then(res => {
|
||||||
|
console.log("获取文章管理/帮助答复的未操作数字",res);
|
||||||
|
_this.cuIconList[3].badge = res.data.articleManagementNumber;
|
||||||
|
_this.cuIconList[5].badge = res.data.registerManagementNumner;
|
||||||
|
_this.cuIconList[6].badge = res.data.helpAnswerNumber;
|
||||||
|
},err => {
|
||||||
|
console.log("err",err)
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转页面
|
* 跳转页面
|
||||||
* @param {Object} pageName 页面名称
|
* @param {Object} pageName 页面名称
|
||||||
@ -180,7 +264,8 @@
|
|||||||
"help": "/pages/tabbar/my/help/help",
|
"help": "/pages/tabbar/my/help/help",
|
||||||
"articleManagement": "/pages/tabbar/my/article-management/article-management",
|
"articleManagement": "/pages/tabbar/my/article-management/article-management",
|
||||||
"peopleManagement": "/pages/tabbar/my/people-management/people-management",
|
"peopleManagement": "/pages/tabbar/my/people-management/people-management",
|
||||||
"helpAnswer": "/pages/tabbar/my/help-answer/help-answer"
|
"helpAnswer": "/pages/tabbar/my/help-answer/help-answer",
|
||||||
|
"registerManagement": "/pages/tabbar/my/register-management/register-management"
|
||||||
};
|
};
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `${FUNCTION_CODE[item.code]}`
|
url: `${FUNCTION_CODE[item.code]}`
|
||||||
|
244
HSLink-app/pages/tabbar/my/notice/notice.vue
Normal file
244
HSLink-app/pages/tabbar/my/notice/notice.vue
Normal file
@ -0,0 +1,244 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<uni-collapse>
|
||||||
|
<view class="first-number">
|
||||||
|
{{messageNoticeNumber}}
|
||||||
|
</view>
|
||||||
|
<uni-collapse-item title="留言通知" thumb="../../../../static/img/message.png">
|
||||||
|
<view class="one no" v-if="messageNoticeNumber === 0">
|
||||||
|
暂无消息通知
|
||||||
|
</view>
|
||||||
|
<view class="one" v-for="(item,index) in messageNoticeList"
|
||||||
|
:key="index"
|
||||||
|
@tap="goToDetails(item)">
|
||||||
|
<view class="top">
|
||||||
|
<text class="top-left">
|
||||||
|
{{item.real_name}}
|
||||||
|
</text>
|
||||||
|
<text class="top-right">
|
||||||
|
{{item.create_time}}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
{{item.content}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-collapse-item>
|
||||||
|
<view class="second-number">
|
||||||
|
{{verifyNoticeNumber}}
|
||||||
|
</view>
|
||||||
|
<uni-collapse-item title="文章审核" thumb="../../../../static/img/examine.png" style="margin-top: -22px;">
|
||||||
|
<view class="one no" v-if="verifyNoticeNumber === 0">
|
||||||
|
暂无审核通知
|
||||||
|
</view>
|
||||||
|
<view v-for="(item,index) in verifyNoticeList"
|
||||||
|
:key="index"
|
||||||
|
@tap="goToMyDetails(item)">
|
||||||
|
<view class="a">
|
||||||
|
<view class="left">
|
||||||
|
<view class="pass" v-if="item.result === '1'">
|
||||||
|
通过
|
||||||
|
</view>
|
||||||
|
<view class="reject" v-if="item.result === '2'">
|
||||||
|
驳回
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="right">
|
||||||
|
<view class="right-top">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
<view class="right-bottom">
|
||||||
|
{{item.release_time}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-collapse-item>
|
||||||
|
</uni-collapse>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
|
||||||
|
import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
|
||||||
|
import request from '@/util/request.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
uniCollapse,
|
||||||
|
uniCollapseItem
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//消息通知列表
|
||||||
|
messageNoticeList: [],
|
||||||
|
//审核通知列表
|
||||||
|
verifyNoticeList: [],
|
||||||
|
//消息通知数量
|
||||||
|
messageNoticeNumber: '',
|
||||||
|
//审核通知数量
|
||||||
|
verifyNoticeNumber: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getNoticeData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 判断数量是否为0
|
||||||
|
*/
|
||||||
|
clickNumber() {
|
||||||
|
console.log(1111)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 跳转详情页面
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
goToDetails(item) {
|
||||||
|
request.post('/hs/updateNoticeRead',{
|
||||||
|
type: '0',
|
||||||
|
id: item.id
|
||||||
|
}).then(res => {
|
||||||
|
console.log("消息通知已读",res)
|
||||||
|
},err => {
|
||||||
|
console.log("err",err)
|
||||||
|
})
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/tabbar/homepage/data-details?noticeId='+item.article_id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 跳转我的文章详情页面
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
goToMyDetails(item) {
|
||||||
|
request.post('/hs/updateNoticeRead',{
|
||||||
|
type: '1',
|
||||||
|
id: item.id
|
||||||
|
}).then(res => {
|
||||||
|
console.log("消息通知已读",res)
|
||||||
|
},err => {
|
||||||
|
console.log("err",err)
|
||||||
|
})
|
||||||
|
if (item.result === '1') {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/tabbar/homepage/data-details?noticeId='+item.article_id
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.setStorageSync('notice',item);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/notice-edit/notice-edit'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取通知
|
||||||
|
*/
|
||||||
|
getNoticeData() {
|
||||||
|
request.post('/hs/getNoticeData',{
|
||||||
|
authorId: uni.getStorageSync("userInfo").user_id
|
||||||
|
}).then(res => {
|
||||||
|
this.messageNoticeList = res.data.messageNoticeList;
|
||||||
|
this.messageNoticeNumber = res.data.messageNoticeList.length;
|
||||||
|
this.verifyNoticeList = res.data.verifyNoticeList;
|
||||||
|
this.verifyNoticeNumber = res.data.verifyNoticeList.length;
|
||||||
|
console.log("通知",res);
|
||||||
|
},err => {
|
||||||
|
console.log("err",err);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.no {
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.first-number{
|
||||||
|
position: absolute;
|
||||||
|
right: 96rpx;
|
||||||
|
margin-top: 28rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: red;
|
||||||
|
color: #FFFFFF;
|
||||||
|
padding: 6rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
width: 44rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.second-number{
|
||||||
|
position: relative;
|
||||||
|
left: 592rpx;
|
||||||
|
top: 26rpx;
|
||||||
|
height: 44rpx;
|
||||||
|
background: red;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 44rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 44rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.a .right-top{
|
||||||
|
width: 250px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.a .right-bottom{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #999999;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
.pass{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #39B54A;
|
||||||
|
border: 1rpx solid #39B54A;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.reject{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #f10000;
|
||||||
|
border: 1rpx solid #f10000;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.a .left{
|
||||||
|
padding: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
.a{
|
||||||
|
display: flex;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
.one, .a{
|
||||||
|
background-color: #e6e6e6;
|
||||||
|
margin: 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.one .bottom{
|
||||||
|
padding: 0 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #a3a3a3;
|
||||||
|
}
|
||||||
|
.top .top-right{
|
||||||
|
color: #A5A5A5;
|
||||||
|
}
|
||||||
|
.one .top{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
.uni-collapse, .uni-collapse-cell--open{
|
||||||
|
background-color: rgba(0,0,0,0);
|
||||||
|
}
|
||||||
|
.page{
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
@ -17,6 +17,9 @@
|
|||||||
<view class="one-right">
|
<view class="one-right">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
{{item.real_name}}
|
{{item.real_name}}
|
||||||
|
<text class="name-right">
|
||||||
|
({{item.user_type}})
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="other-info">
|
<view class="other-info">
|
||||||
<view class="other-info-left">
|
<view class="other-info-left">
|
||||||
@ -155,6 +158,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.name-right{
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
.other-info-middle{
|
.other-info-middle{
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,225 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<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 one" style="padding:0" v-for="(item,index) in peopleListQuery" :key="index" @tap="goToUserInfo(item)">
|
||||||
|
<view class="one-left-two">
|
||||||
|
<avatar :userName="item.real_name" size="50"></avatar>
|
||||||
|
<view class="one-right">
|
||||||
|
<view class="name">
|
||||||
|
{{item.real_name}}
|
||||||
|
<text class="name-right">
|
||||||
|
({{item.user_type}})
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="other-info">
|
||||||
|
<view class="other-info-right">
|
||||||
|
手机号:{{item.mobile}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="follow-flag ed" @tap.stop="passRegister(item)">
|
||||||
|
通过
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '@/util/request.js';
|
||||||
|
import mSearch from '@/components/mehaotian-search/mehaotian-search.vue';
|
||||||
|
import noData from '@/components/noData/noData.vue';
|
||||||
|
import { sortBy } from '@/static/js/public.js';
|
||||||
|
import avatar from "@/pages/components/avatar/avatar.vue";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
mSearch,
|
||||||
|
noData,
|
||||||
|
avatar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//无数据
|
||||||
|
noData: false,
|
||||||
|
//搜索关键字
|
||||||
|
searchStr: '',
|
||||||
|
//关注列表
|
||||||
|
followList: [],
|
||||||
|
flag: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 模糊查询
|
||||||
|
peopleListQuery(){
|
||||||
|
return this.followList.filter(people => {
|
||||||
|
return people.real_name.indexOf(this.searchStr) != -1;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
onPullDownRefresh () {
|
||||||
|
this.getFollowPeopleList();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getFollowPeopleList();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getFollowPeopleList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 通过注册
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
passRegister(item) {
|
||||||
|
let _this = this;
|
||||||
|
uni.showModal({
|
||||||
|
title: `注册管理`,
|
||||||
|
content: `确认通过注册?`,
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
request.post('/admin/passRegister',{
|
||||||
|
userId: item.user_id,
|
||||||
|
takeEffect: '1'
|
||||||
|
}).then(res=>{
|
||||||
|
console.log("通过注册",res);
|
||||||
|
if (res.data > 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "loading",
|
||||||
|
title: `通过注册成功`
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
_this.getFollowPeopleList();
|
||||||
|
},1000)
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: "none",
|
||||||
|
title: "服务器出小差了,请稍后再试"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
console.log("err",err);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 跳转个人主页页面
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
goToUserInfo(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/person-info-page/person-info-page?userId=${item.user_id}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取注册管理列表
|
||||||
|
*/
|
||||||
|
getFollowPeopleList() {
|
||||||
|
request.post("/admin/getRegisterManagementData",{
|
||||||
|
userId: uni.getStorageSync("userInfo").user_id
|
||||||
|
}).then(res => {
|
||||||
|
console.log("注册管理列表",res);
|
||||||
|
uni.startPullDownRefresh();
|
||||||
|
this.followList = res.data;
|
||||||
|
this.noData = this.followList.length === 0 ? true : false;
|
||||||
|
},err => {
|
||||||
|
console.log("err",err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.name-right{
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.other-info-middle{
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
|
.other-info{
|
||||||
|
display: flex;
|
||||||
|
color: #9a9a9a;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.one-right{
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
.one-left-two{
|
||||||
|
display: flex;
|
||||||
|
flex-flow: nowrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.follow-flag{
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #afafaf;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 30rpx;
|
||||||
|
padding: 6rpx 14rpx;
|
||||||
|
}
|
||||||
|
.ed{
|
||||||
|
background-color: #269FDE;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-size: 30rpx;
|
||||||
|
}
|
||||||
|
.one-right .grade{
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #909090;
|
||||||
|
}
|
||||||
|
.one-right .name{
|
||||||
|
padding-bottom: 12rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.one-right .grade-right{
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
.one-left{
|
||||||
|
font-size: 80rpx;
|
||||||
|
font-family: 'Courier New', Courier, monospace;
|
||||||
|
color: #1296DB;
|
||||||
|
border: 5rpx solid #1296DB;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 140rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 140rpx;
|
||||||
|
margin: 20rpx;
|
||||||
|
}
|
||||||
|
.one{
|
||||||
|
padding-right: 24rpx!important;
|
||||||
|
}
|
||||||
|
.one, .grade{
|
||||||
|
display: flex!important;
|
||||||
|
flex-flow: nowrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.grade .r, .grade .l{
|
||||||
|
font-size: 14rpx;
|
||||||
|
padding: 5rpx;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.grade .l{
|
||||||
|
background-color: #9DC75F;
|
||||||
|
}
|
||||||
|
.grade .r{
|
||||||
|
background-color: #2D5315;
|
||||||
|
}
|
||||||
|
</style>
|
@ -52,7 +52,7 @@
|
|||||||
content: "确认退出登录?",
|
content: "确认退出登录?",
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.setStorageSync("userInfo",{});
|
uni.setStorageSync("userInfo","");
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'loading',
|
icon: 'loading',
|
||||||
title: `退出成功`
|
title: `退出成功`
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
|
<view class="clear" @tap="clear">
|
||||||
|
重置
|
||||||
|
</view>
|
||||||
<view class="cu-item height">
|
<view class="cu-item height">
|
||||||
<view class="action">
|
<view class="action">
|
||||||
<text class="text-black">文章名称:</text>
|
<text class="text-black">文章名称:</text>
|
||||||
@ -31,7 +34,7 @@
|
|||||||
<textarea placeholder="请输入文章内容"
|
<textarea placeholder="请输入文章内容"
|
||||||
v-model="noticeInfo.content"
|
v-model="noticeInfo.content"
|
||||||
auto-height="true"
|
auto-height="true"
|
||||||
maxlength=2000
|
maxlength=8000
|
||||||
></textarea>
|
></textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -53,14 +56,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
this.noticeInfo = {
|
this.noticeInfo = {
|
||||||
title: '',
|
title: '',
|
||||||
label: '',
|
label: '',
|
||||||
content: ''
|
content: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
onPullDownRefresh () {
|
onPullDownRefresh () {
|
||||||
uni.startPullDownRefresh();
|
uni.startPullDownRefresh();
|
||||||
},
|
},
|
||||||
@ -68,6 +72,16 @@
|
|||||||
this.preservation()
|
this.preservation()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 清空
|
||||||
|
*/
|
||||||
|
clear() {
|
||||||
|
this.noticeInfo = {
|
||||||
|
title: '',
|
||||||
|
label: '',
|
||||||
|
content: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 发表
|
* 发表
|
||||||
*/
|
*/
|
||||||
@ -106,6 +120,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.clear{
|
||||||
|
position: absolute;
|
||||||
|
right: 20px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
.page{
|
.page{
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
BIN
HSLink-app/static/img/examine.png
Normal file
BIN
HSLink-app/static/img/examine.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
HSLink-app/static/img/message.png
Normal file
BIN
HSLink-app/static/img/message.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__7C9492E","name":"HSLink","version":{"name":"1.0.4","code":104},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#333","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"2.8.11","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#333","color":"#FFFFFF","selectedColor":"#f33e54","list":[{"pagePath":"pages/tabbar/homepage/homepage","iconPath":"static/img/tabbar/home.png","selectedIconPath":"static/img/tabbar/homeactive.png","text":"首页"},{"pagePath":"pages/tabbar/follow/follow","iconPath":"static/img/tabbar/guanzhu.png","selectedIconPath":"static/img/tabbar/guanzhuactive.png","text":"关注"},{"pagePath":"pages/tabbar/release/release","iconPath":"static/img/tabbar/add.png","selectedIconPath":"static/img/tabbar/addactive.png"},{"pagePath":"pages/tabbar/message/message","iconPath":"static/img/tabbar/news.png","selectedIconPath":"static/img/tabbar/newsactive.png","text":"消息"},{"pagePath":"pages/tabbar/my/my","iconPath":"static/img/tabbar/me.png","selectedIconPath":"static/img/tabbar/meactive.png","text":"我"}],"height":"50px"},"launch_path":"__uniappview.html"}}
|
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__7C9492E","name":"HSLink","version":{"name":"1.0.7","code":107},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#333","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"2.8.11","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#333","color":"#FFFFFF","selectedColor":"#f33e54","list":[{"pagePath":"pages/tabbar/homepage/homepage","iconPath":"static/img/tabbar/home.png","selectedIconPath":"static/img/tabbar/homeactive.png","text":"首页"},{"pagePath":"pages/tabbar/follow/follow","iconPath":"static/img/tabbar/guanzhu.png","selectedIconPath":"static/img/tabbar/guanzhuactive.png","text":"关注"},{"pagePath":"pages/tabbar/release/release","iconPath":"static/img/tabbar/add.png","selectedIconPath":"static/img/tabbar/addactive.png"},{"pagePath":"pages/tabbar/message/message","iconPath":"static/img/tabbar/news.png","selectedIconPath":"static/img/tabbar/newsactive.png","text":"消息"},{"pagePath":"pages/tabbar/my/my","iconPath":"static/img/tabbar/me.png","selectedIconPath":"static/img/tabbar/meactive.png","text":"我"}],"height":"50px"},"launch_path":"__uniappview.html"}}
|
BIN
HSLink-app/unpackage/dist/build/app-plus/static/img/examine.png
vendored
Normal file
BIN
HSLink-app/unpackage/dist/build/app-plus/static/img/examine.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
HSLink-app/unpackage/dist/build/app-plus/static/img/message.png
vendored
Normal file
BIN
HSLink-app/unpackage/dist/build/app-plus/static/img/message.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
File diff suppressed because one or more lines are too long
1854
HSLink-app/unpackage/dist/dev/app-plus/app-service.js
vendored
1854
HSLink-app/unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2550
HSLink-app/unpackage/dist/dev/app-plus/app-view.js
vendored
2550
HSLink-app/unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__7C9492E","name":"HSLink","version":{"name":"1.0.4","code":104},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#333","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"2.8.11","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#333","color":"#FFFFFF","selectedColor":"#f33e54","list":[{"pagePath":"pages/tabbar/homepage/homepage","iconPath":"static/img/tabbar/home.png","selectedIconPath":"static/img/tabbar/homeactive.png","text":"首页"},{"pagePath":"pages/tabbar/follow/follow","iconPath":"static/img/tabbar/guanzhu.png","selectedIconPath":"static/img/tabbar/guanzhuactive.png","text":"关注"},{"pagePath":"pages/tabbar/release/release","iconPath":"static/img/tabbar/add.png","selectedIconPath":"static/img/tabbar/addactive.png"},{"pagePath":"pages/tabbar/message/message","iconPath":"static/img/tabbar/news.png","selectedIconPath":"static/img/tabbar/newsactive.png","text":"消息"},{"pagePath":"pages/tabbar/my/my","iconPath":"static/img/tabbar/me.png","selectedIconPath":"static/img/tabbar/meactive.png","text":"我"}],"height":"50px"},"launch_path":"__uniappview.html"}}
|
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__7C9492E","name":"HSLink","version":{"name":"1.0.6","code":106},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common"},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.CALL_PHONE\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"allowsInlineMediaPlayback":true,"safearea":{"background":"#333","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"2.8.11","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"borderStyle":"rgba(0,0,0,0.4)","backgroundColor":"#333","color":"#FFFFFF","selectedColor":"#f33e54","list":[{"pagePath":"pages/tabbar/homepage/homepage","iconPath":"static/img/tabbar/home.png","selectedIconPath":"static/img/tabbar/homeactive.png","text":"首页"},{"pagePath":"pages/tabbar/follow/follow","iconPath":"static/img/tabbar/guanzhu.png","selectedIconPath":"static/img/tabbar/guanzhuactive.png","text":"关注"},{"pagePath":"pages/tabbar/release/release","iconPath":"static/img/tabbar/add.png","selectedIconPath":"static/img/tabbar/addactive.png"},{"pagePath":"pages/tabbar/message/message","iconPath":"static/img/tabbar/news.png","selectedIconPath":"static/img/tabbar/newsactive.png","text":"消息"},{"pagePath":"pages/tabbar/my/my","iconPath":"static/img/tabbar/me.png","selectedIconPath":"static/img/tabbar/meactive.png","text":"我"}],"height":"50px"},"launch_path":"__uniappview.html"}}
|
BIN
HSLink-app/unpackage/dist/dev/app-plus/static/img/examine.png
vendored
Normal file
BIN
HSLink-app/unpackage/dist/dev/app-plus/static/img/examine.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
HSLink-app/unpackage/dist/dev/app-plus/static/img/message.png
vendored
Normal file
BIN
HSLink-app/unpackage/dist/dev/app-plus/static/img/message.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
@ -1,6 +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 baseUrl = 'http://192.168.10.29:8048'; //服务器地址
|
||||||
// const baseUrl = 'http://127.0.0.1:8048'; //服务器地址
|
// const baseUrl = 'http://127.0.0.1:8048'; //服务器地址
|
||||||
|
|
||||||
const get = (url, data) => {
|
const get = (url, data) => {
|
||||||
|
@ -453,4 +453,28 @@ public class HSController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取通知数据
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/getNoticeData")
|
||||||
|
@ResponseBody
|
||||||
|
public Map<String, Object> getNoticeData(@RequestBody Map<String,Object> param){
|
||||||
|
Map<String,Object> result = hsService.getNoticeData(param);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置通知为已读
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/updateNoticeRead")
|
||||||
|
@ResponseBody
|
||||||
|
public Map<String, Object> updateNoticeRead(@RequestBody Map<String,Object> param){
|
||||||
|
Map<String,Object> result = hsService.updateNoticeRead(param);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,13 @@ public interface AdminHSMapper {
|
|||||||
*/
|
*/
|
||||||
int verifyArticle(Map<String, Object> param);
|
int verifyArticle(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核文章通知
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int verifyArticleNotice(Map<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员管理(冻结/解冻)
|
* 人员管理(冻结/解冻)
|
||||||
* @param param
|
* @param param
|
||||||
@ -59,4 +66,18 @@ public interface AdminHSMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getMyPageNumber(Map<String, Object> param);
|
Map<String, Object> getMyPageNumber(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过注册
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int passRegister(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取注册管理数据
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> getRegisterManagementData(Map<String, Object> param);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,11 @@ public interface HSLinkMapper {
|
|||||||
*/
|
*/
|
||||||
int addMessage(Map<String,Object> param);
|
int addMessage(Map<String,Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增留言通知
|
||||||
|
*/
|
||||||
|
int addMessageNotice(Map<String,Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增一篇文章
|
* 新增一篇文章
|
||||||
*/
|
*/
|
||||||
@ -301,4 +306,32 @@ public interface HSLinkMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int getTabBarUnreadNumber(Map<String, Object> param);
|
int getTabBarUnreadNumber(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取留言通知
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> getMessageNotice(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取审核通知
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> getVerifyNotice(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置留言通知为已读
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateMessageNoticeRead(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置留言通知为已读
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateVerifyNoticeRead(Map<String, Object> param);
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.qinxx.hslink.dao.AdminHSMapper">
|
<mapper namespace="com.qinxx.hslink.dao.AdminHSMapper">
|
||||||
|
|
||||||
|
<!--审核文章通知-->
|
||||||
|
<insert id="verifyArticleNotice" parameterType="map">
|
||||||
|
INSERT INTO hs_examine_notice ( id, author_id, article_id, result, create_time )
|
||||||
|
VALUES
|
||||||
|
( uuid(), (SELECT release_id FROM hs_notice WHERE id = #{articleId}), #{articleId}, #{operating}, now( ) )
|
||||||
|
</insert>
|
||||||
|
|
||||||
<!--审核文章(通过/驳回)-->
|
<!--审核文章(通过/驳回)-->
|
||||||
<update id="verifyArticle" parameterType="map">
|
<update id="verifyArticle" parameterType="map">
|
||||||
UPDATE hs_notice set is_pass = #{operating} where id = #{articleId}
|
UPDATE hs_notice set is_pass = #{operating} where id = #{articleId}
|
||||||
@ -22,6 +29,11 @@
|
|||||||
id = #{id}
|
id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!--通过注册-->
|
||||||
|
<update id="passRegister" parameterType="map">
|
||||||
|
update hs_user set take_effect = #{takeEffect} where user_id = #{userId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<!--获取待审核文章数据-->
|
<!--获取待审核文章数据-->
|
||||||
<select id="getVerifyList" parameterType="map" resultType="map">
|
<select id="getVerifyList" parameterType="map" resultType="map">
|
||||||
SELECT
|
SELECT
|
||||||
@ -51,10 +63,11 @@
|
|||||||
(SELECT count(*) from hs_follow f where f.user_id = u.user_id) followNumber,
|
(SELECT count(*) from hs_follow f where f.user_id = u.user_id) followNumber,
|
||||||
(SELECT count(*) from hs_follow f where f.follow_id = u.user_id) fansNumber
|
(SELECT count(*) from hs_follow f where f.follow_id = u.user_id) fansNumber
|
||||||
FROM hs_user u where
|
FROM hs_user u where
|
||||||
|
u.user_type != "管理员"
|
||||||
<if test="content != '' and content != null">
|
<if test="content != '' and content != null">
|
||||||
and u.real_name like CONCAT('%',#{name},'%')
|
and u.real_name like CONCAT('%',#{name},'%')
|
||||||
</if>
|
</if>
|
||||||
u.user_type != "管理员" order by u.user_type
|
and u.take_effect = "1" order by u.frozen_state
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--获取帮助答复列表-->
|
<!--获取帮助答复列表-->
|
||||||
@ -73,7 +86,13 @@
|
|||||||
<select id="getMyPageNumber" resultType="map" parameterType="map">
|
<select id="getMyPageNumber" resultType="map" parameterType="map">
|
||||||
SELECT
|
SELECT
|
||||||
( SELECT count( * ) FROM hs_notice WHERE STATUS = '1' AND is_pass = '0' AND type != "班级通知" ) articleManagementNumber,
|
( SELECT count( * ) FROM hs_notice WHERE STATUS = '1' AND is_pass = '0' AND type != "班级通知" ) articleManagementNumber,
|
||||||
( SELECT count( * ) FROM hs_help h WHERE answer_id IS NULL ) helpAnswerNumber
|
( SELECT count( * ) FROM hs_help h WHERE answer_id IS NULL ) helpAnswerNumber,
|
||||||
|
(SELECT count(*) FROM hs_user u where u.take_effect = '0' ) registerManagementNumner
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--获取注册管理数据-->
|
||||||
|
<select id="getRegisterManagementData" resultType="map" parameterType="map">
|
||||||
|
select * from hs_user where take_effect = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -167,6 +167,14 @@
|
|||||||
insert into hs_leave_message(id,notice_id,messager_id,content,create_time) VALUES (uuid(),#{noticeId},#{userId},#{content},now())
|
insert into hs_leave_message(id,notice_id,messager_id,content,create_time) VALUES (uuid(),#{noticeId},#{userId},#{content},now())
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<!--新增留言通知-->
|
||||||
|
<insert id="addMessageNotice" parameterType="map">
|
||||||
|
INSERT INTO hs_leave_message_notice ( id, article_id, author_id, commenter_id, content, create_time )
|
||||||
|
VALUES(
|
||||||
|
uuid(),#{noticeId},(select release_id from hs_notice where id = #{noticeId}),#{userId},#{content},now())
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<!--新增一篇文章-->
|
<!--新增一篇文章-->
|
||||||
<insert id="addArticle" parameterType="map">
|
<insert id="addArticle" parameterType="map">
|
||||||
insert into hs_notice (id,label,title,content,release_id,release_time,type)
|
insert into hs_notice (id,label,title,content,release_id,release_time,type)
|
||||||
@ -217,7 +225,8 @@
|
|||||||
|
|
||||||
<!--获取班级成员-->
|
<!--获取班级成员-->
|
||||||
<select id="getStudents" parameterType="map" resultType="map">
|
<select id="getStudents" parameterType="map" resultType="map">
|
||||||
select * from hs_user where class_name = (select class_name from hs_user where user_id = #{id})
|
select * from hs_user where class_name = (select class_name from hs_user where user_id = #{id} and
|
||||||
|
take_effect = "1")
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--新增班级公告-->
|
<!--新增班级公告-->
|
||||||
@ -359,6 +368,16 @@
|
|||||||
update hs_notice set read_number = #{number} where id = #{noticeId}
|
update hs_notice set read_number = #{number} where id = #{noticeId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!--设置留言通知为已读-->
|
||||||
|
<update id="updateMessageNoticeRead" parameterType="map">
|
||||||
|
update hs_leave_message_notice set is_read = '1' where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--设置审核通知为已读-->
|
||||||
|
<update id="updateVerifyNoticeRead" parameterType="map">
|
||||||
|
update hs_examine_notice set is_read = '1' where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<!--取消关注-->
|
<!--取消关注-->
|
||||||
<delete id="cancelFollow" parameterType="map">
|
<delete id="cancelFollow" parameterType="map">
|
||||||
DELETE
|
DELETE
|
||||||
@ -504,6 +523,7 @@
|
|||||||
hs_user u
|
hs_user u
|
||||||
WHERE
|
WHERE
|
||||||
u.user_id IN ( SELECT follow_id FROM hs_follow f WHERE f.user_id = #{userId} )
|
u.user_id IN ( SELECT follow_id FROM hs_follow f WHERE f.user_id = #{userId} )
|
||||||
|
and u.take_effect = "1"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--获取粉丝列表-->
|
<!--获取粉丝列表-->
|
||||||
@ -516,6 +536,7 @@
|
|||||||
hs_user u
|
hs_user u
|
||||||
WHERE
|
WHERE
|
||||||
u.user_id IN ( SELECT user_id FROM hs_follow f WHERE f.follow_id = #{userId} )
|
u.user_id IN ( SELECT user_id FROM hs_follow f WHERE f.follow_id = #{userId} )
|
||||||
|
and u.take_effect = "1"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--获取字典项数据-->
|
<!--获取字典项数据-->
|
||||||
@ -557,4 +578,30 @@
|
|||||||
where receive_id = #{userId} and already_read = '0'
|
where receive_id = #{userId} and already_read = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--获取留言通知-->
|
||||||
|
<select id="getMessageNotice" resultType="map" parameterType="map">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
hs_leave_message_notice mn
|
||||||
|
left join hs_user u on mn.commenter_id = u.user_id
|
||||||
|
WHERE
|
||||||
|
author_id = #{authorId}
|
||||||
|
AND is_delete = '0'
|
||||||
|
and is_read = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--获取审核通知-->
|
||||||
|
<select id="getVerifyNotice" resultType="map" parameterType="map">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
hs_examine_notice e left join hs_notice n
|
||||||
|
on e.article_id = n.id
|
||||||
|
WHERE
|
||||||
|
author_id = #{authorId}
|
||||||
|
AND is_delete = '0'
|
||||||
|
and is_read = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -55,4 +55,18 @@ public interface AdminHSService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getMyPageNumber(Map<String, Object> param);
|
Map<String, Object> getMyPageNumber(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过注册
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> passRegister(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取注册管理数据
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getRegisterManagementData(Map<String, Object> param);
|
||||||
}
|
}
|
||||||
|
@ -265,4 +265,18 @@ public interface HSService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getTabBarNumber(Map<String, Object> param);
|
Map<String, Object> getTabBarNumber(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取通知数据
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> getNoticeData(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置通知为已读
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> updateNoticeRead(Map<String, Object> param);
|
||||||
}
|
}
|
@ -64,6 +64,7 @@ public class AdminHSServiceImpl implements AdminHSService {
|
|||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
res = adminHSMapper.verifyArticle(param);
|
res = adminHSMapper.verifyArticle(param);
|
||||||
|
adminHSMapper.verifyArticleNotice(param);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
res = 0;
|
res = 0;
|
||||||
@ -140,4 +141,38 @@ public class AdminHSServiceImpl implements AdminHSService {
|
|||||||
result.put("success",true);
|
result.put("success",true);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过注册
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> passRegister(Map<String, Object> param) {
|
||||||
|
int res = 0;
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
try {
|
||||||
|
res = adminHSMapper.passRegister(param);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
res = 0;
|
||||||
|
}
|
||||||
|
result.put("data",res);
|
||||||
|
result.put("success",true);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取注册管理数据
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getRegisterManagementData(Map<String, Object> param) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
List<Map<String, Object>> res = adminHSMapper.getRegisterManagementData(param);
|
||||||
|
result.put("data",res);
|
||||||
|
result.put("success",true);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,6 +100,7 @@ public class HSServiceImpl implements HSService {
|
|||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
res = hsLinkMapper.addMessage(param);
|
res = hsLinkMapper.addMessage(param);
|
||||||
|
hsLinkMapper.addMessageNotice(param);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
res = 0;
|
res = 0;
|
||||||
@ -715,6 +716,48 @@ public class HSServiceImpl implements HSService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取通知数据
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getNoticeData(Map<String, Object> param) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
Map<String, Object> res = new HashMap<>();
|
||||||
|
List<Map<String, Object>> res1 = hsLinkMapper.getMessageNotice(param);
|
||||||
|
List<Map<String, Object>> res2 = hsLinkMapper.getVerifyNotice(param);
|
||||||
|
res.put("messageNoticeList",res1);
|
||||||
|
res.put("verifyNoticeList",res2);
|
||||||
|
result.put("data",res);
|
||||||
|
result.put("success",true);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置通知为已读
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> updateNoticeRead(Map<String, Object> param) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
int res = 0;
|
||||||
|
try {
|
||||||
|
if ("0".equals(param.get("type"))) {
|
||||||
|
res = hsLinkMapper.updateMessageNoticeRead(param);
|
||||||
|
} else {
|
||||||
|
res = hsLinkMapper.updateVerifyNoticeRead(param);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
res = 0;
|
||||||
|
}
|
||||||
|
result.put("data",res);
|
||||||
|
result.put("success",true);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回参数
|
* 返回参数
|
||||||
* @param flag
|
* @param flag
|
||||||
|
@ -10,6 +10,7 @@ let axios = require('axios')
|
|||||||
function toType (obj) {
|
function toType (obj) {
|
||||||
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
|
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 参数过滤函数
|
// 参数过滤函数
|
||||||
function filterNull (o) {
|
function filterNull (o) {
|
||||||
for (let key in o) {
|
for (let key in o) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user