Administrator
2021-07-02 3bdd6abf173944e460c7906f267d0a3650dffb82
首页页面路由配置跳转
4 files modified
30 ■■■■ changed files
api/mock/home.js 10 ●●●● patch | view | raw | blame | history
manifest.json 2 ●●● patch | view | raw | blame | history
pages/home/home.vue 17 ●●●● patch | view | raw | blame | history
pages/patrol/patrol.vue 1 ●●●● patch | view | raw | blame | history
api/mock/home.js
@@ -110,27 +110,27 @@
            const list = [{
                    name: '我要看',
                    img: '/static/images/home/s1.png',
                    url: ''
                    url: '../article/article'
                },
                {
                    name: '我要查',
                    img: '/static/images/home/search004.png',
                    url: ''
                    url: '../alarm_list/alarm_list'
                },
                {
                    name: '我要报',
                    img: '/static/images/home/report001.png',
                    url: ''
                    url: '../reported/reported'
                },
                {
                    name: '我要说',
                    img: '/static/images/home/s4.png',
                    url: ''
                    url: '../groupChat/groupChat'
                },
                {
                    name: '我要巡',
                    img: '/static/images/home/s6.png',
                    url: ''
                    url: '../patrol/patrol'
                },
                {
                    name: '我要办',
manifest.json
@@ -1,6 +1,6 @@
{
    "name" : "群防群控",
    "appid" : "__UNI__1A57486",
    "appid" : "__UNI__88EDF2B",
    "description" : "",
    "versionName" : "1.0.0",
    "versionCode" : "100",
pages/home/home.vue
@@ -40,7 +40,7 @@
        <view class="service-box">
            <u-grid :col="4" :border="false">
                <u-grid-item bg-color="transparent" v-for="(item, index) in serviceButton" :key="index">
                    <navigator url="" hover-class="none" class="service-item">
                    <navigator hover-class="none" class="service-item" @click="goBusinessPage(item.url,index)">
                        <image :src="item.img" mode="widthFix" class="img"></image>
                        <view class="name">{{ item.name }}</view>
                    </navigator>
@@ -113,7 +113,7 @@
        </view>
        
        <!-- 底部导航条 -->
        <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
        <u-tabbar :list="tabbar" :mid-button="false" height="50px" icon-size="40"></u-tabbar>
    </view>
</template>
@@ -189,6 +189,19 @@
            },
            handleSearchBlur() {
                this.focus = false;
            },
            //页面跳转
            goBusinessPage(url,index){
                if(index==0){
                    //我要看在tabbar
                    uni.switchTab({
                        url:url
                    })
                }else{
                    uni.navigateTo({
                        url:url
                    })
                }
            }
        }
    };
pages/patrol/patrol.vue
@@ -16,6 +16,7 @@
        onLoad: function(options) {
            //long 转换为字符串
            var code = JSON.stringify(this.$store.state.puserID.toString());
            // var code = JSON.stringify("1370564873280430082");
            this.urls = "http://s16s652780.51mypc.cn/xcxjingqingmap_patrol/xcxmap.html?snumber="+code;
        },
    }