无等级网格版合并
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="AppHandSnapshot">
|
||||
<component v-if="refresh && isAdmin" :is="component" @change="onChange" :params="params"> </component>
|
||||
<div class="tabs" v-if="isTab && isAdmin">
|
||||
<component v-if="refresh && isGridMember" :is="component" @change="onChange" :params="params"/>
|
||||
<div class="tabs" v-if="isTab && isGridMember">
|
||||
<div class="item" @click="tabClick(index, item.component)" v-for="(item, index) in tabs" :key="index">
|
||||
<img :src="tabIndex == index ? item.activeImg : item.img" alt="" />
|
||||
<img :src="tabIndex == index ? item.activeImg : item.img" alt=""/>
|
||||
<p :class="tabIndex == index ? 'color-3267F0' : ''">{{ item.text }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!isAdmin" class="empty">
|
||||
<div v-if="!isGridMember" class="empty">
|
||||
<img src="./components/img/no-admin.png" alt="">
|
||||
<p>没有网格员权限<br />无法查看随手拍信息哦~</p>
|
||||
<p>没有网格员权限<br/>无法查看随手拍信息哦~</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -18,11 +18,11 @@
|
||||
import List from './List.vue'
|
||||
import Statistics from './Statistics.vue'
|
||||
import Set from './Set.vue'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppHandSnapshot',
|
||||
appName: '随手拍',
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: 'List',
|
||||
@@ -50,10 +50,14 @@ export default {
|
||||
// }
|
||||
],
|
||||
isTab: true,
|
||||
isAdmin: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
isGridMember() {
|
||||
return this.user.girdCheckType > 0
|
||||
}
|
||||
},
|
||||
components: {
|
||||
List,
|
||||
Statistics,
|
||||
@@ -72,20 +76,7 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.refresh = true
|
||||
})
|
||||
},
|
||||
isGirdUser() {
|
||||
this.isAdmin = false
|
||||
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (res.data.checkType != '0') {
|
||||
this.isAdmin = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.isGirdUser()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '随手拍'
|
||||
@@ -95,10 +86,10 @@ export default {
|
||||
uni.$on('showTab', () => {
|
||||
this.isTab = true
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if(!this.tabIndex) {
|
||||
if (!this.tabIndex) {
|
||||
uni.$emit('nextList')
|
||||
}
|
||||
},
|
||||
@@ -109,6 +100,7 @@ export default {
|
||||
.AppHandSnapshot {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
width: 100%;
|
||||
height: 98px;
|
||||
@@ -118,14 +110,17 @@ export default {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
|
||||
.item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 22px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
@@ -133,19 +128,23 @@ export default {
|
||||
color: #c4cad4;
|
||||
line-height: 8px;
|
||||
}
|
||||
|
||||
.color-3267F0 {
|
||||
color: #3267f0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.empty{
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
img{
|
||||
|
||||
img {
|
||||
width: 282px;
|
||||
height: 306px;
|
||||
margin: 136px auto 0;
|
||||
}
|
||||
p{
|
||||
|
||||
p {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
|
||||
Reference in New Issue
Block a user