Browse Source

修改数据权限错误

hella_vue3
lijuncheng 6 months ago
parent
commit
e31d10e346
  1. 6
      src/pages/index/index.vue
  2. 6
      src/store/modules/user.js

6
src/pages/index/index.vue

@ -35,12 +35,12 @@
</scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
@scroll="rightScroll">
<view class="page-view" style="margin-bottom: 200rpx;">
<view class="page-view" style="padding-bottom: 100rpx;">
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index">
<view class="item-title">
<text>{{item.name}}</text>
</view>
<view class="item-container">
<view class="item-container" >
<view class="thumb-box" v-for="(item1, index1) in item.children" :key="index1"
@click="openCheck(item1.path)">
<view class="" style="position: relative; ">
@ -108,7 +108,7 @@
uni.hideLoading()
if (res.menus.length > 0) {
var menus = res.menus.filter(item => item.name == "PDA菜单管理")
if (menus.length > 0) {
if (menus!=undefined&&menus.length > 0) {
var tab = menus[0].children.filter(res => res.visible == true)
tab.forEach(res => {
for (var i = 0; i < res.children.length; i++) {

6
src/store/modules/user.js

@ -5,6 +5,7 @@ import {
getPermissionInfo,
getTenantInfo
} from '@/api/request2'
// import picUrl from "../../static/images/profile.jpg";
const user = {
@ -81,8 +82,9 @@ const user = {
getPermissionInfo().then(res => {
res = res.data; // 读取 data 数据
const user = res.user
const avatar = (user == null || user.avatar === "" || user.avatar == null) ?
require("@/static/images/profile.jpg") : user.avatar
const avatar=""
// const avatar = (user == null || user.avatar == "" || user.avatar == null||user.avatar == undefined) ?
// picUrl: user.avatar
const nickname = (user == null || user.nickname === "" || user.nickname ==
null) ? "" : user.nickname
if (res.roles && res.roles.length > 0) {

Loading…
Cancel
Save