From 4223c3afa90047e1809b3919b8c2fc1f37dfb830 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Wed, 23 Feb 2022 16:19:10 +0800
Subject: [PATCH] +合并
---
pages/grabOrders/grabOrders.vue | 7 +++
pages/grabOrders/map.vue | 77 ++++++++++++++++++++++++--------------
2 files changed, 55 insertions(+), 29 deletions(-)
diff --git a/pages/grabOrders/grabOrders.vue b/pages/grabOrders/grabOrders.vue
index 5224d63..6e47d83 100644
--- a/pages/grabOrders/grabOrders.vue
+++ b/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);
diff --git a/pages/grabOrders/map.vue b/pages/grabOrders/map.vue
index b751654..8dc5174 100644
--- a/pages/grabOrders/map.vue
+++ b/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);
--
Gitblit v1.9.3