liuyg
2022-02-23 4223c3afa90047e1809b3919b8c2fc1f37dfb830
+合并
2 files modified
84 ■■■■■ changed files
pages/grabOrders/grabOrders.vue 7 ●●●●● patch | view | raw | blame | history
pages/grabOrders/map.vue 77 ●●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrders.vue
@@ -102,6 +102,10 @@
                this.current = 1;
                this.swiperCurrent = 1;
            }
            if (options.in) {
                this.current = 0;
                this.swiperCurrent = 0;
            }
            this.getGrabOrders(this.current);
            if (options.from == "feedback") {
@@ -310,6 +314,9 @@
                            that: that,
                            fn: () => {
                                that.getGrabOrders(that.current); //重获取数据
                                // setTimeout(() => {
                                //     that.openOnce(item);
                                // }, 500)
                            }
                        }
                        that.$store.commit('useWebScoketApi', d);
pages/grabOrders/map.vue
@@ -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);