zengh
2022-02-25 6ba170c786c7b5024fe287c892f2d707c0c662d7
注册调整
8 files modified
1 files added
392 ■■■■ changed files
api/mock/home.js 25 ●●●●● patch | view | raw | blame | history
pages/article/article.vue 2 ●●● patch | view | raw | blame | history
pages/business/business.vue 34 ●●●●● patch | view | raw | blame | history
pages/business/businesscopy.vue 2 ●●● patch | view | raw | blame | history
pages/business/businesscopy2.vue 296 ●●●●● patch | view | raw | blame | history
pages/home/home.vue 7 ●●●●● patch | view | raw | blame | history
pages/issue/issue.vue 2 ●●● patch | view | raw | blame | history
pages/myself/myself.vue 8 ●●●● patch | view | raw | blame | history
store/state.js 16 ●●●● patch | view | raw | blame | history
api/mock/home.js
@@ -117,19 +117,24 @@
                    img: '/static/images/home/search004.png',
                    url: '../alarm_list/alarm_list'
                },
                {
                    name: '我要报',
                    img: '/static/images/home/report001.png',
                    url: '../reported/reported'
                },
                {
                    name: '我要说',
                    img: '/static/images/home/s4.png',
                    url: '../groupChat/groupChat'
                },
                // {
                //     name: '我要报',
                //     img: '/static/images/home/report001.png',
                //     url: '../reported/reported'
                // },
                // {
                //     name: '我要说',
                //     img: '/static/images/home/s4.png',
                //     url: '../groupChat/groupChat'
                // },
                {
                    name: '我参与',
                    img: '/static/images/home/jusou.png',
                    url: '../business/business'
                },
                {
                    name: '积分商城',
                    img: '/static/workbench/task8.png',
                    url: '../grabOrders/grabOrders'
                },
                // {
pages/article/article.vue
@@ -53,7 +53,7 @@
        
        <u-toast ref="uToast" />
        <!-- 底部导航条 -->
        <u-tabbar :list="tabbar" :mid-button="true"></u-tabbar>
        <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
    </view>
</template>
pages/business/business.vue
@@ -22,7 +22,7 @@
            <!-- 我的订阅 end -->
            <view class="card wrap">
                <view class="title">管理</view>
                <view class="title">保安管理</view>
                <view class="list">
                    <u-grid :col="4" :border="false">
                        <u-grid-item bg-color="transparent" v-for="(item, index) in dataTwo" :key="index">
@@ -38,7 +38,7 @@
        </view>
        <u-toast ref="uToast" />
        <!-- 底部导航条 -->
        <u-tabbar :list="tabbar" :mid-button="true"></u-tabbar>
        <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
    </view>
</template>
@@ -48,42 +48,30 @@
            return {
                tabbar: this.$store.state.tabbar,
                dataOne: [{
                    title: '群防任务',
                    title: '治安巡查',
                    img: '../../static/workbench/task1.png',
                    url: ''
                }, {
                    title: '巡逻任务',
                    title: '治安义务宣传',
                    img: '../../static/workbench/task2.png',
                    url: '/pages/patrol/patrol'
                }, {
                    title: '事件上报',
                    title: '治安防范培训',
                    img: '../../static/workbench/task3.png',
                    url: '/pages/reported/reported'
                }, {
                    title: '积分商城',
                    title: '保安管理',
                    img: '../../static/workbench/task8.png',
                    url: ''
                }, {
                    title: '通讯录',
                    img: '../../static/workbench/task4.png',
                    url: ''
                }, {
                    title: '电子证件',
                    img: '../../static/workbench/task9.png',
                    url: ''
                }],
                dataTwo: [{
                    title: '参与投票',
                    title: '电子证件',
                    img: '../../static/workbench/task9.png',
                    url: ''
                },{
                    title: '模拟考试',
                    img: '../../static/workbench/task5.png',
                    url: '/pages/voting/voteManage'
                }, {
                    title: '投票发起',
                    img: '../../static/workbench/task7.png',
                    url: '/pages/voting/vote'
                }, {
                    title: '投票排行',
                    img: '../../static/workbench/task6.png',
                    url: '/pages/voting/votRanking'
                }
                // ,{
                //     title:'模拟考试',
pages/business/businesscopy.vue
@@ -31,7 +31,7 @@
            </view>
        </view>
        <!-- 底部导航条 -->
        <u-tabbar :list="tabbar" :mid-button="true"></u-tabbar>
        <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
        
    </view>
</template>
pages/business/businesscopy2.vue
New file
@@ -0,0 +1,296 @@
<template>
    <view class="container">
        <view class="head">
            <u-navbar :is-fixed="false" :border-bottom="false" :is-back="true" back-icon-name="arrow-leftward"
                back-icon-color="#fff" back-icon-size="35" :background="{ background: '#103289' }" title="工作台"
                title-color="#fff"></u-navbar>
            <view class="head-bg"></view>
            <!-- 我的订阅 start -->
            <view class="card sub">
                <view class="title">常用工具</view>
                <view class="list">
                    <u-grid :col="4" :border="false">
                        <u-grid-item bg-color="transparent" v-for="(item, index) in dataOne" :key="index">
                            <navigator hover-class="none" class="nav-item" @click="goOnePage(item.url,index)">
                                <image :src="item.img" mode="widthFix" class="nav-item-img"></image>
                                <view class="nav-item-name">{{item.title}}</view>
                            </navigator>
                        </u-grid-item>
                    </u-grid>
                </view>
            </view>
            <!-- 我的订阅 end -->
            <view class="card wrap">
                <view class="title">管理</view>
                <view class="list">
                    <u-grid :col="4" :border="false">
                        <u-grid-item bg-color="transparent" v-for="(item, index) in dataTwo" :key="index">
                            <navigator hover-class="none" url="" class="nav-item" @click="goTwoPage(item.url,index)">
                                <image :src="item.img" mode="widthFix" class="nav-item-img"></image>
                                <view class="nav-item-name">{{item.title}}</view>
                            </navigator>
                        </u-grid-item>
                    </u-grid>
                </view>
            </view>
        </view>
        <u-toast ref="uToast" />
        <!-- 底部导航条 -->
        <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                tabbar: this.$store.state.tabbar,
                dataOne: [{
                    title: '群防任务',
                    img: '../../static/workbench/task1.png',
                    url: ''
                }, {
                    title: '巡逻任务',
                    img: '../../static/workbench/task2.png',
                    url: '/pages/patrol/patrol'
                }, {
                    title: '事件上报',
                    img: '../../static/workbench/task3.png',
                    url: '/pages/reported/reported'
                }, {
                    title: '积分商城',
                    img: '../../static/workbench/task8.png',
                    url: ''
                }, {
                    title: '通讯录',
                    img: '../../static/workbench/task4.png',
                    url: ''
                }, {
                    title: '电子证件',
                    img: '../../static/workbench/task9.png',
                    url: ''
                }],
                dataTwo: [{
                    title: '参与投票',
                    img: '../../static/workbench/task5.png',
                    url: '/pages/voting/voteManage'
                }, {
                    title: '投票发起',
                    img: '../../static/workbench/task7.png',
                    url: '/pages/voting/vote'
                }, {
                    title: '投票排行',
                    img: '../../static/workbench/task6.png',
                    url: '/pages/voting/votRanking'
                }
                // ,{
                //     title:'模拟考试',
                //     img:'../../static/workbench/exam.png',
                //     url:'/pages/exam/startexam'
                // }
                ]
            };
        },
        onLoad() {
        },
        mounted() {
            if (this.$store.state.UserData.stype != "1") {
                this.$refs.uToast.show({
                    title: '功能暂未开放',
                    type: 'warning',
                });
            }
        },
        methods: {
            //页面跳转
            goOnePage(url, index) {
                if (this.$store.state.UserData.stype != "1") {
                    this.$refs.uToast.show({
                        title: '功能暂未开放',
                        type: 'warning',
                    });
                    return;
                } else if (index == "0" || index == "3" || index == "4") {
                    this.$refs.uToast.show({
                        title: '功能研发中',
                        type: 'warning',
                    });
                    return;
                } else if (index == 5) {
                    this.getUser();
                } else {
                    uni.navigateTo({
                        url: url
                    })
                }
            },
            //获取用户信息
            getUser() {
                var that = this;
                debugger
                uni.request({
                    url: that.$store.state.BaopiAPI + '/blade-user/detail',
                    method: 'GET',
                    data: {
                        cardid: that.$store.state.UserData.cardid,
                        isDeleted:0,
                        status : 1,
                    },
                    success: (res) => {
                        if(res.statusCode == "200"){
                            var urls="http://223.82.109.183:2080/securityInfo.html?securityNumber="+res.data.data.securitynumber;
                            uni.navigateTo({
                                url: '../voting/information?url=' + urls
                            });
                        }else{
                            this.$refs.uToast.show({
                                title: '暂无证件信息',
                                type: 'warning',
                            });
                        }
                    }
                });
            },
            goTwoPage(url, index) {
                if (this.$store.state.UserData.stype != "1") {
                    this.$refs.uToast.show({
                        title: '功能暂未开放',
                        type: 'warning',
                    });
                    return;
                } else if (index == "2") {
                    this.$refs.uToast.show({
                        title: '功能研发中',
                        type: 'warning',
                    });
                    return;
                } else {
                    uni.navigateTo({
                        url: url
                    })
                }
            },
        }
    };
</script>
<style lang="scss">
    .container {
        background-color: #f7f7f7;
        min-height: 100vh;
        overflow: hidden;
    }
    .head {
        position: relative;
        top: 0;
        left: 0;
        z-index: 1;
    }
    .head-bg {
        position: absolute;
        left: 0px;
        top: 0px;
        z-index: -1;
        width: 750rpx;
        height: 270rpx;
        background: #103289;
    }
    .card {
        margin: 30rpx;
        background: #ffffff;
        border-radius: 20rpx;
        margin-top: 36rpx;
    }
    .sub {
        .title {
            padding-top: 36rpx;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 30rpx;
            font-family: Source Han Sans CN;
            font-weight: 500;
            color: #000000;
            &::before {
                content: '';
                display: block;
                width: 135rpx;
                height: 1rpx;
                background: #e4e7ed;
                margin: 0 17rpx;
            }
            &::after {
                content: '';
                display: block;
                width: 135rpx;
                height: 1rpx;
                background: #e4e7ed;
                margin: 0 17rpx;
            }
        }
    }
    .list {
        display: flex;
        flex-wrap: wrap;
        padding: 0 0 30rpx;
        .nav-item {
            width: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            font-size: 30rpx;
            font-family: Source Han Sans CN;
            font-weight: 400;
            color: #131313;
            line-height: 48rpx;
            &-img {
                width: 64rpx;
                height: 64rpx;
                margin-bottom: 20rpx;
            }
            &-name {
                font-size: 26rpx;
                font-family: PingFang SC;
                font-weight: 400;
                color: #585b61;
                opacity: 0.77;
            }
        }
    }
    .wrap {
        .title {
            padding: 36rpx 16rpx;
            display: flex;
            align-items: center;
            font-size: 32rpx;
            font-family: Source Han Sans CN;
            font-weight: 500;
            color: #000000;
            &::before {
                content: "";
                display: block;
                width: 5rpx;
                height: 36rpx;
                margin-right: 10rpx;
                background: #103289;
            }
        }
    }
</style>
pages/home/home.vue
@@ -46,12 +46,12 @@
                        <view class="name">{{ item.name }}</view>
                    </navigator>
                </u-grid-item>
                <u-grid-item bg-color="transparent" key="8">
                <!-- <u-grid-item bg-color="transparent" key="8">
                    <navigator url="/pages/service/service" hover-class="none" class="service-item">
                        <image src="/static/images/home/s8.png" mode="widthFix" class="img"></image>
                        <view class="name">更多</view>
                    </navigator>
                </u-grid-item>
                </u-grid-item> -->
            </u-grid>
        </view>
        <!-- 服务按钮 end -->
@@ -117,7 +117,7 @@
        </view>
        <u-toast ref="uToast" />
        <!-- 底部导航条 -->
        <u-tabbar :list="tabbar" :mid-button="true" height="50px" icon-size="40"></u-tabbar>
        <u-tabbar :list="tabbar" :mid-button="false" height="50px" icon-size="40"></u-tabbar>
    </view>
</template>
@@ -224,6 +224,7 @@
            },
            //页面跳转
            goBusinessPage(url,index){
                debugger
                if(index==0){
                    //我要看在tabbar
                    uni.switchTab({
pages/issue/issue.vue
@@ -41,7 +41,7 @@
            <u-button class="custom-style" type="primary" @click="inits"> 我发布</u-button>
        </view>
        <u-toast ref="uToast" />
        <u-tabbar :list="tabs" :mid-button="true"></u-tabbar>
        <u-tabbar :list="tabs" :mid-button="false"></u-tabbar>
    </view>
</template>
pages/myself/myself.vue
@@ -18,12 +18,12 @@
            </view>
        </view> 
        <view class="bomBut">
            <view class="attendance-btn">
            <!-- <view class="attendance-btn">
                <view class="attendance-info"  @click="goToAttendance()">
                    <image src="../../static/myself/clock01.png" class="attendance-image"/>
                    <view class="attendance-title">考勤打卡</view>
                </view>
            </view>
            </view> -->
            <view class="onceBut" v-for="(item, index) in inSide" :key="index" @click="openThere(item.open)">
                <view class="buts">
                    <image :src="item.imgSrc" mode=""></image>
@@ -38,7 +38,7 @@
        </uniPopup>
        <u-toast ref="uToast" />
        <!-- 底部导航条 -->
        <u-tabbar :list="tabbar" :mid-button="true"></u-tabbar>
        <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
    </view>
</template>
@@ -417,7 +417,7 @@
        .bomBut {
            width: 88%;
            margin: 0 auto;
            height: 24rem;
            height: 15rem;
            z-index: 999;
            border-radius: 2px;
            margin-top: -2.5rem;
store/state.js
@@ -32,16 +32,16 @@
            iconPath: "/static/tabbar/article.png",
            selectedIconPath: "/static/tabbar/articleH.png"
        },
        {
            pagePath: "/pages/issue/issue",
            iconPath: "/static/tabbar/addIcon.png",
            selectedIconPath: "/static/tabbar/addSelectedIcon.png",
            text: "发布",
            midButton: true,
        },
        // {
        //     pagePath: "/pages/issue/issue",
        //     iconPath: "/static/tabbar/addIcon.png",
        //     selectedIconPath: "/static/tabbar/addSelectedIcon.png",
        //     text: "发布",
        //     midButton: true,
        // },
        {
            pagePath: "/pages/business/business",
            text: "工作台",
            text: "行业圈",
            iconPath: "/static/tabbar/workbench.png",
            selectedIconPath: "/static/tabbar/workbenchH.png"
        },