|
@@ -289,7 +289,7 @@
|
|
|
scanCode() {
|
|
|
let _this = this;
|
|
|
uni.scanCode({
|
|
|
- onlyFromCamera: true,
|
|
|
+ onlyFromCamera: false,
|
|
|
success: function(res) {
|
|
|
console.log('条码内容:' + res.result);
|
|
|
_this.id=res.result.split(',')[1]
|
|
@@ -299,34 +299,36 @@
|
|
|
});
|
|
|
},
|
|
|
mobileScanOk() {
|
|
|
-
|
|
|
- this.$request.baseRequest('get', '/publishTaskInfo/seeTask', {
|
|
|
- id: this.id
|
|
|
- }).then(res => {
|
|
|
- res.data.driverCommonId=this.userInfo.id
|
|
|
- res.data.driverName=uni.getStorageSync("firstAuthentication").driverName
|
|
|
- res.data.driverPhone=uni.getStorageSync("firstAuthentication").driverPhone
|
|
|
- this.$request.baseRequest('post', '/publishTaskInfo/api/addOrder ', res.data).then(res => {
|
|
|
- console.log(res)
|
|
|
- if (res.code == 200) {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- message: "抢单成功!",
|
|
|
- complete() {
|
|
|
- uni.switchTab({
|
|
|
- url: "/pages/order/index"
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ uni.$u.route('/pages/goodSource/shippingDetails', {
|
|
|
+ id: this.id,
|
|
|
+ });
|
|
|
+ // this.$request.baseRequest('get', '/publishTaskInfo/seeTask', {
|
|
|
+ // id: this.id
|
|
|
+ // }).then(res => {
|
|
|
+ // res.data.driverCommonId=this.userInfo.id
|
|
|
+ // res.data.driverName=uni.getStorageSync("firstAuthentication").driverName
|
|
|
+ // res.data.driverPhone=uni.getStorageSync("firstAuthentication").driverPhone
|
|
|
+ // this.$request.baseRequest('post', '/publishTaskInfo/api/addOrder ', res.data).then(res => {
|
|
|
+ // console.log(res)
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.$refs.uToast.show({
|
|
|
+ // type: 'success',
|
|
|
+ // message: "抢单成功!",
|
|
|
+ // complete() {
|
|
|
+ // uni.switchTab({
|
|
|
+ // url: "/pages/order/index"
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
|
|
|
- } else {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: res.message,
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+ // } else {
|
|
|
+ // this.$refs.uToast.show({
|
|
|
+ // type: 'error',
|
|
|
+ // message: res.message,
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
},
|
|
|
// 检查APP是否有新版本
|
|
|
onAPPUpdate() {
|