123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <script>
- export default {
- onLaunch: function() {
- // this.init()
- console.log('App Launch')
- },
- onShow: function() {
- this.init()
- console.log('App Show')
- },
- onLoad() {
- this.init()
- },
- onHide: function() {
- console.log('App Hide')
- },
- methods: {
- init() {
- let state = this.$store.state.admin
- // console.log(state, 778)
- if (state == 0) {
- uni.setTabBarItem({
- index: 0,
- pagePath: "pages/index/index",
- text: "合同列表",
- iconPath: "/static/icon/home.png",
- selectedIconPath: "/static/icon/achome.png",
- visible: true
- })
- uni.setTabBarItem({
- index: 1,
- pagePath: "pages/acceptor/acceptor",
- text: "承兑人",
- iconPath: "/static/icon/per.png",
- selectedIconPath: "/static/icon/out.png",
- })
- uni.setTabBarItem({
- index: 2,
- pagePath: "pages/drawer/drawer",
- text: "出票人",
- iconPath: "/static/icon/acsip.png",
- selectedIconPath: "/static/icon/biao.png",
- visible: true
- })
- uni.setTabBarItem({
- index: 3,
- pagePath: "pages/supplier/supplier",
- text: "供应商",
- iconPath: "/static/icon/acsup.png",
- selectedIconPath: "/static/icon/sup.png",
- visible: false
- })
- uni.setTabBarItem({
- index: 4,
- pagePath: "pages/mine/mine",
- text: "我的",
- iconPath: "/static/icon/my.png",
- selectedIconPath: "/static/icon/acmy.png",
- visible: false
- })
- } else if (state == 1) {
- uni.setTabBarItem({
- index: 0,
- pagePath: "pages/index/index",
- text: "合同列表",
- iconPath: "/static/icon/home.png",
- selectedIconPath: "/static/icon/achome.png",
- visible: true
- })
- uni.setTabBarItem({
- index: 1,
- pagePath: "pages/acceptor/acceptor",
- text: "承兑人",
- iconPath: "/static/icon/card-2x.png",
- selectedIconPath: "/static/icon/card_active-2x.png",
- visible:false
- })
- uni.setTabBarItem({
- index: 2,
- pagePath: "pages/drawer/drawer",
- text: "出票人",
- iconPath: "/static/icon/counter-2x.png",
- selectedIconPath: "/static/icon/counter_active-2x.png",
- visible:false
- })
- uni.setTabBarItem({
- index: 3,
- pagePath: "pages/supplier/supplier",
- text: "供应商",
- iconPath: "/static/icon/record-2x.png",
- selectedIconPath: "/static/icon/record_active-2x.png",
- visible:false
- })
- uni.setTabBarItem({
- index:4,
- pagePath: "pages/mine/mine",
- text: "我的",
- iconPath: "/static/icon/my.png",
- selectedIconPath: "/static/icon/acmy.png",
- visible: true
- })
- }
- },
- }
- }
- </script>
- <style lang="scss">
- page {
- color: #1F242A;
- }
- @import 'uview-ui/theme.scss';
- @import "@/static/css/flex.scss";
- page {
- font-family: Source Han Sans CN-Medium;
- }
- .safebt{
- padding-bottom: 150rpx;
- }
- .statues_bar {
- height: var(--status-bar-height);
- width: 100%;
- }
- </style>
|