feat:homeIndex
parent
6bc49a7d68
commit
2cbfc7330f
|
|
@ -25,16 +25,16 @@
|
|||
<!-- nav -->
|
||||
<view class="navBar">
|
||||
<div class="navList" v-for="(item, index) in getNavList" :key="index">
|
||||
<div @click="myNavigateTo(item.url)">
|
||||
<div class="navIcon">
|
||||
<image
|
||||
style="width: 100%; height: 100%"
|
||||
:src="item.icon"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
</div>
|
||||
<div class="navTxt">{{ item.value }}</div>
|
||||
</div>
|
||||
<div @click="myNavigateTo(item.url)">
|
||||
<div class="navIcon">
|
||||
<image
|
||||
style="width: 100%; height: 100%"
|
||||
:src="item.icon"
|
||||
mode="aspectFit"
|
||||
></image>
|
||||
</div>
|
||||
<div class="navTxt">{{ item.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
<view class="warn">
|
||||
|
|
@ -235,79 +235,79 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
getNavList() {
|
||||
const adcd = uni.getStorageSync('value').adcd
|
||||
let lever = 0
|
||||
if (adcd.endsWith('000000000')) {
|
||||
//县
|
||||
return [
|
||||
{
|
||||
value: '雨情',
|
||||
key: 1,
|
||||
icon: '../../static/tabs/xingzhuang.png',
|
||||
url:"/pages/rain/rain"
|
||||
},
|
||||
{
|
||||
value: '水情',
|
||||
key: 2,
|
||||
icon: '../../static/tabs/water.png',
|
||||
url:"/pages/water/water"
|
||||
},
|
||||
{
|
||||
value: '工情灾情',
|
||||
key: 3,
|
||||
icon: '../../static/tabs/gongqing.png',
|
||||
url:'/pages/gqzq/index'
|
||||
},
|
||||
{
|
||||
value: '信息上报',
|
||||
key: 4,
|
||||
icon: '../../static/tabs/xinxi_icon@2x.png',
|
||||
url:'/pages/xxsb/index'
|
||||
},
|
||||
{
|
||||
value: '预警',
|
||||
key: 5,
|
||||
icon: '../../static/tabs/yujing_icon@2x.png',
|
||||
url:'/pages/forewarning/forewarning'
|
||||
}
|
||||
]
|
||||
} else {
|
||||
//乡镇
|
||||
return [
|
||||
{
|
||||
value: '雨情',
|
||||
key: 1,
|
||||
icon: '../../static/tabs/xingzhuang.png',
|
||||
url:"/pages/rain/rain"
|
||||
},
|
||||
{
|
||||
value: '水情',
|
||||
key: 2,
|
||||
icon: '../../static/tabs/water.png',
|
||||
url:"/pages/water/water"
|
||||
},
|
||||
{
|
||||
value: '工情灾情',
|
||||
key: 3,
|
||||
icon: '../../static/tabs/gongqing.png',
|
||||
url:'/pages/gqzq/index'
|
||||
},
|
||||
{
|
||||
value: '调令反馈',
|
||||
key: 5,
|
||||
icon: '../../static/tabs/yujing_icon@2x.png',
|
||||
url:'/pages/orderFeedback/orderFeedback'
|
||||
},
|
||||
{
|
||||
value: '信息上报',
|
||||
key: 4,
|
||||
icon: '../../static/tabs/xinxi_icon@2x.png',
|
||||
url:'/pages/xxsb/index'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
getNavList () {
|
||||
const adcd = uni.getStorageSync('value').adcd
|
||||
let lever = 0
|
||||
if (adcd.endsWith('000000000')) {
|
||||
//县
|
||||
return [
|
||||
{
|
||||
value: '雨情',
|
||||
key: 1,
|
||||
icon: '../../static/tabs/xingzhuang2.png',
|
||||
url: '/pages/rain/rain'
|
||||
},
|
||||
{
|
||||
value: '水情',
|
||||
key: 2,
|
||||
icon: '../../static/tabs/water2.png',
|
||||
url: '/pages/water/water'
|
||||
},
|
||||
{
|
||||
value: '工情灾情',
|
||||
key: 3,
|
||||
icon: '../../static/tabs/gongqing2.png',
|
||||
url: '/pages/gqzq/index'
|
||||
},
|
||||
{
|
||||
value: '信息上报',
|
||||
key: 4,
|
||||
icon: '../../static/tabs/xinxi_icon@2x2.png',
|
||||
url: '/pages/xxsb/index'
|
||||
},
|
||||
{
|
||||
value: '预警',
|
||||
key: 5,
|
||||
icon: '../../static/tabs/yujing_icon@2x2.png',
|
||||
url: '/pages/forewarning/forewarning'
|
||||
}
|
||||
]
|
||||
} else {
|
||||
//乡镇
|
||||
return [
|
||||
{
|
||||
value: '雨情',
|
||||
key: 1,
|
||||
icon: '../../static/tabs/xingzhuang2.png',
|
||||
url: '/pages/rain/rain'
|
||||
},
|
||||
{
|
||||
value: '水情',
|
||||
key: 2,
|
||||
icon: '../../static/tabs/water2.png',
|
||||
url: '/pages/water/water'
|
||||
},
|
||||
{
|
||||
value: '工情灾情',
|
||||
key: 3,
|
||||
icon: '../../static/tabs/gongqing2.png',
|
||||
url: '/pages/gqzq/index'
|
||||
},
|
||||
{
|
||||
value: '调令反馈',
|
||||
key: 5,
|
||||
icon: '../../static/tabs/yujing_icon@2x2.png',
|
||||
url: '/pages/orderFeedback/orderFeedback'
|
||||
},
|
||||
{
|
||||
value: '信息上报',
|
||||
key: 4,
|
||||
icon: '../../static/tabs/xinxi_icon@2x2.png',
|
||||
url: '/pages/xxsb/index'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
todetail (val) {
|
||||
|
|
@ -402,12 +402,12 @@ export default {
|
|||
|
||||
this.tm = d1 + h1
|
||||
},
|
||||
|
||||
myNavigateTo (url) {
|
||||
uni.navigateTo({
|
||||
url: url // 跳转到对应路径的页面
|
||||
});
|
||||
}
|
||||
|
||||
myNavigateTo (url) {
|
||||
uni.navigateTo({
|
||||
url: url // 跳转到对应路径的页面
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad () {
|
||||
this.getSwiperList()
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Loading…
Reference in New Issue