|
@@ -3,7 +3,7 @@
|
|
|
<view class="top-nav">
|
|
|
<view class="l">
|
|
|
<block v-if="isLogin">
|
|
|
- <image class="user-img" src="../../static/user.png"></image>
|
|
|
+ <image class="user-img" src="../../static/user.png" @click="toAccount"></image>
|
|
|
<view class="l-r">
|
|
|
<text class="u-name">{{userName}}</text>
|
|
|
<text class="c-name" v-if="customerId!=='1'">{{companyName}}</text>
|
|
@@ -24,8 +24,7 @@
|
|
|
<text class="title">场站管理系统</text>
|
|
|
</view>
|
|
|
<view class="item-box">
|
|
|
- <view class="item" hover-class="hover-class"
|
|
|
- v-for="(indexItem,index) in indexItemList" :key="index"
|
|
|
+ <view class="item" hover-class="hover-class" v-for="(indexItem,index) in indexItemList" :key="index"
|
|
|
@click="navTo(indexItem)" v-show="indexItem.show">
|
|
|
<image class="icon" :src="indexItem.icon"></image>
|
|
|
<view class="text">
|
|
@@ -51,7 +50,7 @@
|
|
|
isLogin: false, //是否登录状态
|
|
|
userName: '',
|
|
|
companyName: '',
|
|
|
- customerId:'',
|
|
|
+ customerId: '',
|
|
|
qrcoderlc: '../../static/qrcode.png',
|
|
|
indexItemList: []
|
|
|
}
|
|
@@ -64,88 +63,93 @@
|
|
|
return true;
|
|
|
},
|
|
|
methods: {
|
|
|
- setList(){
|
|
|
- this.indexItemList=[
|
|
|
- {
|
|
|
- auth: false,
|
|
|
- icon: '../../static/home-icon-01.png',
|
|
|
- text: '企业注册',
|
|
|
- url: '/pages/enterprise-reg/enterprise-reg',
|
|
|
- show:uni.getStorageSync('info')?false:true
|
|
|
- },
|
|
|
- {
|
|
|
- auth: true,
|
|
|
- icon: '../../static/home-icon-02.png',
|
|
|
- text: '业务录入',
|
|
|
- url: '/pages/business-entering/business-entering',
|
|
|
- show: uni.getStorageSync('perList').indexOf('tb-business-add')!==-1
|
|
|
- },
|
|
|
- {
|
|
|
- auth: true,
|
|
|
- icon: '../../static/home-icon-03.png',
|
|
|
- text: '业务订单',
|
|
|
- url: '/pages/business-order/business-order',
|
|
|
- show:true
|
|
|
- },
|
|
|
- {
|
|
|
- auth: true,
|
|
|
- icon: '../../static/home-icon-04.png',
|
|
|
- text: '企业管理',
|
|
|
- url: '/pages/customer-management/customer-list',
|
|
|
- show:true
|
|
|
- },
|
|
|
- {
|
|
|
- auth: true,
|
|
|
- icon: '../../static/home-icon-05.png',
|
|
|
- text: '出入记录',
|
|
|
- url: '/pages/inout-record/inout-record',
|
|
|
- show:true
|
|
|
- },
|
|
|
- {
|
|
|
- auth: true,
|
|
|
- icon: '../../static/home-icon-07.jpg',
|
|
|
- text: '申报信息录入',
|
|
|
- url: '/pages/declare/add',
|
|
|
- show:true
|
|
|
- },
|
|
|
- {
|
|
|
- auth: true,
|
|
|
- icon: '../../static/home-icon-06.jpg',
|
|
|
- text: '消杀申报',
|
|
|
- url: '/pages/disinfect/addDisinfect',
|
|
|
- show:true
|
|
|
- },
|
|
|
- {
|
|
|
- auth: true,
|
|
|
- icon: '../../static/home-icon-06.jpg',
|
|
|
- text: '账户充值',
|
|
|
- url: '/pages/account/index',
|
|
|
- show:true
|
|
|
- },
|
|
|
-
|
|
|
- ]
|
|
|
+ setList() {
|
|
|
+ this.indexItemList = [{
|
|
|
+ auth: false,
|
|
|
+ icon: '../../static/home-icon-01.png',
|
|
|
+ text: '企业注册',
|
|
|
+ url: '/pages/enterprise-reg/enterprise-reg',
|
|
|
+ show: uni.getStorageSync('info') ? false : true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ auth: false,
|
|
|
+ icon: '../../static/home-icon-07.jpg',
|
|
|
+ text: '申报录入',
|
|
|
+ url: '/pages/declare/add',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ auth: false,
|
|
|
+ icon: '../../static/home-icon-06.jpg',
|
|
|
+ text: '消杀申报',
|
|
|
+ url: '/pages/disinfect/addDisinfect',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ auth: true,
|
|
|
+ icon: '../../static/home-icon-02.png',
|
|
|
+ text: '业务录入',
|
|
|
+ url: '/pages/business-entering/business-entering',
|
|
|
+ show: uni.getStorageSync('perList').indexOf('tb-business-add') !== -1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ auth: true,
|
|
|
+ icon: '../../static/home-icon-03.png',
|
|
|
+ text: '业务订单',
|
|
|
+ url: '/pages/business-order/business-order',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ auth: true,
|
|
|
+ icon: '../../static/home-icon-04.png',
|
|
|
+ text: '企业管理',
|
|
|
+ url: '/pages/customer-management/customer-list',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ auth: true,
|
|
|
+ icon: '../../static/home-icon-05.png',
|
|
|
+ text: '出入记录',
|
|
|
+ url: '/pages/inout-record/inout-record',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // auth: true,
|
|
|
+ // icon: '../../static/home-icon-06.jpg',
|
|
|
+ // text: '账户充值',
|
|
|
+ // url: '/pages/account/index',
|
|
|
+ // show:true
|
|
|
+ // },
|
|
|
+
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ toAccount() {
|
|
|
+ if (this.customerId !== '1') {
|
|
|
+ this.$common.to('/pages/account/index')
|
|
|
+ }
|
|
|
},
|
|
|
getStoreInfo() {
|
|
|
let info = uni.getStorageSync('info');
|
|
|
- if(info){
|
|
|
- this.isLogin=true;
|
|
|
- this.userName=info.name;
|
|
|
- this.customerId=info.customerId;
|
|
|
+ if (info) {
|
|
|
+ this.isLogin = true;
|
|
|
+ this.userName = info.name;
|
|
|
+ this.customerId = info.customerId;
|
|
|
}
|
|
|
},
|
|
|
- toLogin(){
|
|
|
- this.$common.to('/pages/login/login')
|
|
|
+ toLogin() {
|
|
|
+ this.$common.to('/pages/login/login')
|
|
|
},
|
|
|
- exitFn(){
|
|
|
+ exitFn() {
|
|
|
uni.removeStorageSync('token')
|
|
|
uni.removeStorageSync('info')
|
|
|
- this.isLogin=false;
|
|
|
+ this.isLogin = false;
|
|
|
this.setList();
|
|
|
},
|
|
|
navTo(item) {
|
|
|
let auth = item.auth;
|
|
|
let token = uni.getStorageSync('token');
|
|
|
- if (!auth||token) {
|
|
|
+ if (!auth || token) {
|
|
|
this.$common.to(item.url)
|
|
|
} else {
|
|
|
this.$common.to('/pages/login/login')
|