| | |
| | | }, |
| | | methods: { |
| | | setUniAppMsg(data) { |
| | | // console.log(data) |
| | | // console.log(uni) |
| | | uni.postMessage({ |
| | | data: { |
| | | action: 'message' |
| | | } |
| | | }); |
| | | uni.getEnv(function(res) { |
| | | console.log('当前环境:' + JSON.stringify(res)); |
| | | }); |
| | | |
| | | window.parent.hBackMsg(data) |
| | | }, |
| | | openAPP(type) { |
| | | // console.log(type) |
| | |
| | | if (that.data.butCT == "beginUp") { |
| | | // 反馈 |
| | | uni.navigateTo({ |
| | | url: '/pages/grabOrders/feedback?data=' + JSON.stringify(this.data) |
| | | url: '/pages/grabOrders/feedback?data=' + JSON.stringify(this.data) + |
| | | '&other="11111"' |
| | | }); |
| | | } else if (that.data.butCT == "begin") { |
| | | // 开始任务 |
| | | this.setUniAppMsg({ |
| | | type: "begin", |
| | | data: that.data |
| | | type: "start", |
| | | data: { |
| | | id: that.data.id, |
| | | serid: that.data.serid |
| | | }, |
| | | fn: function(val) { |
| | | if(val == "success"){ |
| | | console.log("成功开启任务") |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | |
| | | } |
| | | //url解码 |
| | | this.data = this.getQueryVariable('data') || data; |
| | | if (this.data.team) { |
| | | console.log(this.data) |
| | | if (typeof this.data.team === "string") { |
| | | this.data.team = this.data.team.split(','); |
| | | } |
| | | console.log(this.data) |
| | | let lines = this.data.line |
| | | let position = lines.slice(lines.indexOf("(") + 1, lines.indexOf(",")).split(" "); |
| | | // console.log(position) |