去掉法外狂徒

This commit is contained in:
李彪 2025-05-15 16:59:02 +08:00
parent db49a6f0e9
commit cb4889735b
1 changed files with 21 additions and 11 deletions

View File

@ -5,26 +5,26 @@
<image class="bg-logo" style="width: 200rpx; height: 170rpx" src="/static/adminImg/bg-logo.png"></image>
<image class="bg-hi" style="width: 130rpx; height: 50rpx" src="/static/adminImg/logo-hi.png"></image>
<view style="height: 150rpx"></view>
<view class="tip">欢迎使用,张三</view>
<view class="tip">欢迎使用,{{ userName }}</view>
<view class="desc">欢迎使用巡检管理员端</view>
<view class="card">
<view class="card-item">
<view class="item-title">区域数量 </view>
<view class="item-totel">{{ form.regionCount }} </view>
<view class="item-totel">{{ form.regionCount }} </view>
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card1.png"></image>
</view>
<view class="card-item" @click="toPageFn(1)">
<view class="item-title" >子区域数量 </view>
<view class="item-title">子区域数量 </view>
<view class="item-totel">{{ form.areaCount }} </view>
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card2.png"></image>
</view>
<view class="card-item" @click="toPageFn(2)">
<view class="item-title" >已绑定子区域数 </view>
<view class="item-title">已绑定子区域数 </view>
<view class="item-totel">{{ form.bindnfc }} </view>
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card3.png"></image>
</view>
<view class="card-item" @click="toPageFn(3)">
<view class="item-title" >未绑定子区域数 </view>
<view class="item-title">未绑定子区域数 </view>
<view class="item-totel">{{ form.noBindnfc }} </view>
<image class="card-img" style="width: 130rpx; height: 130rpx" src="/static/adminImg/card4.png"></image>
</view>
@ -37,7 +37,7 @@
</view>
</template>
<script>
import { GetHomeDataApi } from '@/api/apiAdmin'
import { GetHomeDataApi, GetUserDataApi } from '@/api/apiAdmin'
export default {
data() {
return {
@ -46,13 +46,16 @@ export default {
areaCount: 0,
bindnfc: 0,
noBindnfc: 0
}
},
userName: ''
}
},
mounted() {
uni.hideLoading() // Loading
this.getDetailFn() //
},
onLoad() {
uni.$off('reset')
uni.$on('reset', () => {
console.log('%c%s', 'color:red', 'reset')
@ -61,24 +64,31 @@ export default {
},
onShow() {
this.getDataFn()
this.getDetailFn() //
console.log('%c%s', 'color:red', 'onSHow')
},
methods: {
async getDetailFn() {
const res = await GetUserDataApi();
console.log(res, "用户数据");
//
this.userName = res.data.userName
},
//
toPageFn(type){
if(type === 1){
toPageFn(type) {
if (type === 1) {
uni.setStorageSync('search', 1)
uni.switchTab({
url: '/pages/adminNfc/index?type=1'
})
}
if(type === 2){
if (type === 2) {
uni.setStorageSync('search', 2)
uni.switchTab({
url: '/pages/adminNfc/index?type=2'
})
}
if(type === 3){
if (type === 3) {
uni.setStorageSync('search', 3)
uni.switchTab({
url: '/pages/adminNfc/index?type=3'