zengh
2021-06-24 f3eebd2f83cd6d12e3b714ac464f8717e0272e0f
Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
6 files modified
1 files added
143 ■■■■ changed files
App.vue 2 ●●● patch | view | raw | blame | history
components/nav-bar-top/nav-bar-top.vue 60 ●●●●● patch | view | raw | blame | history
pages.json 19 ●●●●● patch | view | raw | blame | history
pages/alarm_list/alarm_list.vue 16 ●●●●● patch | view | raw | blame | history
pages/reported/reported.vue 42 ●●●● patch | view | raw | blame | history
store/actions.js 2 ●●● patch | view | raw | blame | history
store/state.js 2 ●●● patch | view | raw | blame | history
App.vue
@@ -43,7 +43,7 @@
        },
        onHide: function() {
            // console.log('App Hide')
        },
        }
    }
</script>
components/nav-bar-top/nav-bar-top.vue
New file
@@ -0,0 +1,60 @@
<template name="navBarTop">
    <!-- 自定义顶部导航栏 -->
    <view class="nav-bar-top" @click="gotoMyself()">
        <view class="nav-bar-top-left">
            <image :src="navBarImage" />
        </view>
        <view class="nav-bar-top-title">我要查</view>
    </view>
</template>
<script>
    export default{
        name:"navBarTop",
        data(){
            return{
                navBarImage:this.$store.state.avatar
            }
        },
        methods:{
            //跳转至我的页面
            gotoMyself(){
                uni.navigateTo({
                    url:'../myself/myself'
                })
            }
        }
    }
</script>
<style lang="scss">
    .nav-bar-top{
        background-color: #FFFFFF;
        height: 2.7rem;
        align-items: center;
        .nav-bar-top-left{
            // background-color: #00BFFF;
            width: 2rem;
            height: 2rem;
            margin-left: 1rem;
            border-radius: 50px;
            align-items: center;
            justify-content: center;
            image{
                width: 1.8rem;
                height: 1.8rem;
                border-radius: 50px;
            }
        }
        .nav-bar-top-title{
            font-weight: 550;
            display: flex;
            margin-left: 7rem;
        }
    }
</style>
pages.json
@@ -206,7 +206,10 @@
            "path": "pages/alarm_list/alarm_list",
            "name": "alarm_list",
            "style": {
                "navigationBarTitleText": "我要查"
                "navigationBarTitleText": "我要查",
                "app-plus":{
                    "titleNView":"false"
                }
            }
        },
        {
@@ -257,8 +260,7 @@
        }
    ],
    "globalStyle": {//将组件安装在项目的components目录下,并符合components/组件名称/组件名称.vue目录结构。可以不用引用、注册,直接在页面中使用。
        "autoscan": true,
        "onReachBottomDistance":160
        "autoscan": true
    },
    "tabBar": {
        "color": "#7a7e83",
@@ -291,12 +293,13 @@
                "text": "我要巡",
                "iconPath": "static/img/bar/patrol.png",
                "selectedIconPath": "static/img/bar/patrol-blue.png"
            },{
                "pagePath": "pages/myself/myself",
                "text": "我的",
                "iconPath": "static/tabbar/userHL.png",
                "selectedIconPath": "static/workbench/user01.png"
            }
            // ,{
            //     "pagePath": "pages/myself/myself",
            //     "text": "我的",
            //     "iconPath": "static/tabbar/userHL.png",
            //     "selectedIconPath": "static/workbench/user01.png"
            // }
        ]
    },
pages/alarm_list/alarm_list.vue
@@ -1,5 +1,14 @@
<template>
    <view class="alarm-list">
        <!-- 自定义顶部导航栏 -->
        <!-- <view class="nav-bar-top" @click="gotoMyself()">
            <view class="nav-bar-top-left">
                <image :src="navBarImage" />
            </view>
            <view class="nav-bar-top-title">我要查</view>
        </view> -->
        <navBarTop></navBarTop>
        <view class="navigation-bar">
            <view class="alarm-bar-total" :style="{color:totalColor,borderBottom:totalBoder}" @click="getAlarmListInfo(1)">全部({{totalNumber}})</view>
            <view class="alarm-bar-load" :style="{color:loadColor,borderBottom:loadBoder}" @click="getAlarmListInfo(2)">未处理({{untreatedNumber}})</view>
@@ -39,7 +48,11 @@
</template>
<script>
    import navBarTop from '../../components/nav-bar-top/nav-bar-top.vue'
    export default{
        components: {
            navBarTop
        },
        data(){
            return{
                pathUrl:"http://s16s652780.51mypc.cn/api",
@@ -209,6 +222,8 @@
</style>
<style lang="scss" scoped>
    .alarm-list,
    .nav-bar-top,
    .nav-bar-top-left,
    .alarm-list-content,
    .alarm-info,
    .alarm-id-type-status,
@@ -236,6 +251,7 @@
            letter-spacing: 1px;
            position: fixed;
            z-index: 999;
            margin-top: 2.7rem;
            
            .alarm-bar-total{
                align-items: center;
pages/reported/reported.vue
@@ -26,8 +26,8 @@
            </view>
        </view>
        <seeImgs :imgs="[]" :videos="videos" @del="delVideo" :type="'videos'"></seeImgs>
        <view class="butb" @click="upData">
            提交
        <view class="form-btn">
            <view class="butb" @click="upData">提交</view>
        </view>
    </view>
</template>
@@ -47,9 +47,7 @@
                result:'',
                place:"",
                imgs: [],
                videos: [],
                // pathUrl:'http://s16s652780.51mypc.cn/api/blade-jfpts',
                pathUrl:'http://localhost:82',
                videos: []
            }
        },
        methods: {
@@ -73,8 +71,8 @@
                    result:this.result,
                    place:this.place,
                    status:1,
                    tpaddress: '',
                    spaddress: ''
                    tpaddress:"",
                    spaddress:""
                };
                if (this.imgs.length > 0) {
                    var i = this.imgs;
@@ -142,7 +140,7 @@
                            // 循环调用uni.uploadFile ,因微信小程序只支持单文件上传
                            for (var i = 0; i < tempFilePath.length; i++) {
                                uni.uploadFile({
                                    // url: 'https://web.byisf.com/api/depl/put-depl', //仅为示例,非真实的接口地址
                                    // url: 'https://web.byisf.com/api/blade-jfpts/depl/put-depl', //仅为示例,非真实的接口地址
                                    url: 'http://web.byisf.com:82/blade-jfpts/depl/put-depl',
                                    filePath: tempFilePath[i],
                                    name: 'file',
@@ -184,7 +182,7 @@
                                mask: true
                            })
                            uni.uploadFile({
                                // url: 'https://web.byisf.com/api/depl/put-depl',
                                // url: 'https://web.byisf.com/api/blade-jfpts/depl/put-depl',
                                url: 'http://web.byisf.com:82/blade-jfpts/depl/put-depl',
                                filePath: tempFilePath,
                                name: 'file',
@@ -318,18 +316,24 @@
                margin-left: 20px;
            }
        }
        .butb {
            margin: 2rem auto;
            width: 5.2rem;
            height: 5.2rem;
            // border: 1px solid rgb(46, 118, 228);
            border-radius: 3rem;
        .form-btn{
            margin-top: 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            background-image: linear-gradient(to bottom, #3CA7F4, #4D7CEE);
            .butb {
                margin-bottom: 4.5rem;
                width: 5.2rem;
                height: 5.2rem;
                // border: 1px solid rgb(46, 118, 228);
                border-radius: 3rem;
                display: flex;
                align-items: center;
                justify-content: center;
                color: #fff;
                background-image: linear-gradient(to bottom, #3CA7F4, #4D7CEE);
            }
        }
    }
</style>
store/actions.js
@@ -47,7 +47,7 @@
                    store.commit('getUserData',res.data)
                    console.log(res.data,123542);
                    data.isit = true;
                    data.userName = res.data.real_name; //警袁姓名
                    data.userName = res.data.nick_name; //警袁姓名
                    data.userID = res.data.user_id; //警袁id
                    data.avatar = res.data.avatar; //头像
                    // data.userPhon = res.user_id;
store/state.js
@@ -9,7 +9,7 @@
    puserName: '',
    puserID: '',
    puserIphone:'',
    avatar:"",
    avatar:"../../static/logo.png",
    UserData: {},
}