shuishen
2022-02-23 73abcdf65086094ac2dac23c0ca86a0e9c747706
Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
5 files modified
162 ■■■■■ changed files
manifest.json 22 ●●●● patch | view | raw | blame | history
pages/grabOrders/feedback.vue 16 ●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrders.vue 15 ●●●●● patch | view | raw | blame | history
pages/grabOrders/map.vue 99 ●●●●● patch | view | raw | blame | history
store/websocket.js 10 ●●●● patch | view | raw | blame | history
manifest.json
@@ -1,6 +1,6 @@
{
    "name" : "洪城义警",
    "appid" : "__UNI__C5320D4",
    "appid" : "__UNI__1A57486",
    "description" : "",
    "versionName" : "1.0.0",
    "versionCode" : "100",
@@ -23,7 +23,8 @@
        "modules" : {
            "VideoPlayer" : {},
            "LivePusher" : {},
            "Geolocation" : {}
            "Geolocation" : {},
            "Maps" : {}
        },
        /* 应用发布信息 */
        "distribute" : {
@@ -32,6 +33,10 @@
                "permissions" : [
                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
@@ -54,10 +59,17 @@
            /* SDK配置 */
            "sdkConfigs" : {
                "ad" : {},
                "maps" : {},
                "maps" : {
                    "amap" : {
                        "appkey_ios" : "143663af7c571b4d89fa1ec34506ca02",
                        "appkey_android" : "143663af7c571b4d89fa1ec34506ca02"
                    }
                },
                "geolocation" : {
                    "system" : {
                        "__platform__" : [ "ios", "android" ]
                    "amap" : {
                        "__platform__" : [ "android" ],
                        "appkey_ios" : "143663af7c571b4d89fa1ec34506ca02",
                        "appkey_android" : "143663af7c571b4d89fa1ec34506ca02"
                    }
                }
            },
pages/grabOrders/feedback.vue
@@ -43,7 +43,7 @@
            </view>
            <view class="butb">
                <!-- custom-style -->
                <u-button class="submits" type="primary" @click="upData">我反馈</u-button>
                <button class="submits" type="primary" @click="upData">我反馈</button>
            </view>
        </view>
    </view>
@@ -63,6 +63,14 @@
                videos: [],
                data: {}
            }
        },
        onBackPress(e) {
            console.log("监听返回按钮事件1", e);
            uni.redirectTo({
                url: "/pages/grabOrders/grabOrders"
            })
            // 此处一定姚要return为true,否则页面不会返回到指定路径
            return true;
        },
        methods: {
            onLoad: function(option) {
@@ -87,7 +95,7 @@
                    //TODO handle the exception
                }
                // console.log(b);
                console.log(b,"bbbbbbbb")
                console.log(b, "bbbbbbbb")
                this.data = b;
            },
            upData() {
@@ -378,7 +386,7 @@
        // line-height: 86rpx;
        box-sizing: border-box;
        border-radius: 15rpx;
        background-color: #103289;
        background-color: #103289 !important;
        color: #ffffff;
        &::after {
@@ -397,7 +405,7 @@
            color: #ffffff;
        }
    }
    // .main{
    //     border: 1px solid transparent;
    // }
pages/grabOrders/grabOrders.vue
@@ -62,6 +62,14 @@
                useHeight: "100%",
            };
        },
        onBackPress(e) {
            console.log("监听返回按钮事件2", e);
            uni.switchTab({
                url: "/pages/home/home"
            })
            // 此处一定姚要return为true,否则页面不会返回到指定路径
            return true;
        },
        watch: {
            current() {
                // console.log(this.current)
@@ -93,6 +101,10 @@
            } else {
                this.current = 1;
                this.swiperCurrent = 1;
            }
            if (options.in) {
                this.current = 0;
                this.swiperCurrent = 0;
            }
            this.getGrabOrders(this.current);
@@ -302,6 +314,9 @@
                            that: that,
                            fn: () => {
                                that.getGrabOrders(that.current); //重获取数据
                                // setTimeout(() => {
                                //     that.openOnce(item);
                                // }, 500)
                            }
                        }
                        that.$store.commit('useWebScoketApi', d);
pages/grabOrders/map.vue
@@ -128,7 +128,7 @@
                    backgroundColor: "#FFF",
                },
                bye: true,
                types: '',//android?
                types: '', //android?
            }
        },
        methods: {
@@ -174,24 +174,29 @@
                                // url: "http://2
                                // myid:111
                                //myName:222
                                that.ourData.rtype = 2;
                                that.ourData.type = 2;
                                that.ourData.buttype = 0;
                                that.ourData.butCT = "begin";
                                if (that.ourData.num == 0) {
                                    that.ourData.iscation = "1";
                                    that.ourData.serid += that.ourData.myid + ',';
                                    that.ourData.captain = that.ourData.myName;
                                } else {
                                    that.ourData.iscation = "0";
                                    that.ourData.serid += that.ourData.myid + ',';
                                    that.ourData.team += ',' + that.ourData.myid;
                                }
                                that.ourData.butCT = "begin";
                                // that.ourData.rtype = 2;
                                // that.ourData.type = 2;
                                // that.ourData.buttype = 0;
                                // that.ourData.butCT = "begin";
                                // if (that.ourData.num == 0) {
                                //     that.ourData.iscation = "1";
                                //     that.ourData.serid += that.ourData.myid + ',';
                                //     that.ourData.captain = that.ourData.myName;
                                // } else {
                                //     that.ourData.iscation = "0";
                                //     that.ourData.serid += that.ourData.myid + ',';
                                //     that.ourData.team += ',' + that.ourData.myid;
                                // }
                                // that.ourData.butCT = "begin";
                                uni.showToast({
                                    title: res.data.msg,
                                    duration: 2000,
                                });
                                setTimeout(function() {
                                    uni.redirectTo({
                                        url: "/pages/grabOrders/grabOrders?in=true"
                                    })
                                }, 2200)
                            }
                        },
                        complete() {
@@ -238,22 +243,36 @@
                            type = 'start',
                            url = that.$store.state.piAPI + "taskqd/startTask?" +
                            `rid=${rid}&serid=${serid}&type=${type}`;
                        uni.request({
                            url: url,
                            method: "get",
                            // header: {
                            //     "content-type": "application/json",
                            // },
                            success(res) {
                                // that.timeBegin(1);
                                // that.ourData.butCT = "beginUp";
                                // that.ourData.rtype = '0';
                                // that.ourData.type = "0";
                            },
                            complete() {
                                that.showIn = false;
                        // uni.request({
                        //     url: url,
                        //     method: "get",
                        //     // header: {
                        //     //     "content-type": "application/json",
                        //     // },
                        //     success(res) {
                        //         // that.timeBegin(1);
                        //         // that.ourData.butCT = "beginUp";
                        //         // that.ourData.rtype = '0';
                        //         // that.ourData.type = "0";
                        //     },
                        //     complete() {
                        //         that.showIn = false;
                        //     }
                        // })
                        let d = {
                            rid:rid,
                            serid: serid,
                            type: type,
                            // data: JSON.stringify(item),
                            that: that,
                            fn: () => {
                                that.getGrabOrders(that.current); //重获取数据
                                // setTimeout(() => {
                                //     that.openOnce(item);
                                // }, 500)
                            }
                        })
                        }
                        that.$store.commit('useWebScoketApi', d);
                        // axios.get(url).then((res) => {
                        //     // console.log(res);
@@ -760,16 +779,16 @@
                    longitude: +ins[0]
                })
            }
            setTimeout(() => {
                this.mypolylines[0] = { //指定一系列坐标点,从数组第一项连线至最后一项
                    points: ourline,
                    color: "#FE0000", //线的颜色
                    width: 4, //线的宽度
                    dottedLine: false, //是否虚线
                    arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
                }
                console.log(this.mypolylines)
            }, 1000)
            // setTimeout(() => {
            this.mypolylines[0] = { //指定一系列坐标点,从数组第一项连线至最后一项
                points: ourline,
                color: "#FE0000", //线的颜色
                width: 10, //线的宽度
                dottedLine: false, //是否虚线
                arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
            }
            console.log(this.mypolylines)
            // }, 1000)
            this.showWindow();
            // this.getLocationInfo(data);
            if (data.butCT == "beginUp" && data.buttype == 0) {
store/websocket.js
@@ -79,6 +79,10 @@
                        serid: uni.getStorageSync("ids") || $store.state.puserID,
                        type: 0,
                    };
                let routes = getCurrentPages(); //获取当前页面栈
                let curRoute = routes[routes.length - 1].route; //获取当前页面的路由
                // console.log(curRoute)
                // return
                uni.request({
                    url: $store.state.piAPI + "taskqd/selectLi",
                    method: "POST",
@@ -101,9 +105,11 @@
                                    isOn: true
                                });
                                console.log(val)
                                if (types == "android") {
                                if (types == "android", curRoute != "pages/grabOrders/map") {
                                    uni.navigateTo({
                                        url: "/pages/grabOrders/map?data=" + JSON.stringify(val),
                                        url: "/pages/grabOrders/map?data=" + JSON.stringify(
                                            val),
                                    });
                                    return
                                }