|
@@ -8,6 +8,7 @@
|
|
height="30px"></u--image> -->
|
|
height="30px"></u--image> -->
|
|
</view>
|
|
</view>
|
|
<view class="row2 flex align-center">
|
|
<view class="row2 flex align-center">
|
|
|
|
+
|
|
<u--image class="flex-end" :showLoading="true" :src="headUrl" width="60px" height="60px" shape='circle'>
|
|
<u--image class="flex-end" :showLoading="true" :src="headUrl" width="60px" height="60px" shape='circle'>
|
|
</u--image>
|
|
</u--image>
|
|
<view class="right-text">
|
|
<view class="right-text">
|
|
@@ -18,7 +19,9 @@
|
|
</view>
|
|
</view>
|
|
<view @click="toLogin" class="phone" v-if="hasLogin">{{starUserphone}}</view>
|
|
<view @click="toLogin" class="phone" v-if="hasLogin">{{starUserphone}}</view>
|
|
</view>
|
|
</view>
|
|
- <view style="margin: auto;margin-right: 10px">
|
|
|
|
|
|
+ <view class='flex align-center' style="margin: auto;margin-right: 10px">
|
|
|
|
+ <u--image class='image scan' :showLoading="true" src="../../static/images/mine/saoma.png" width="20px"
|
|
|
|
+ height="20px" @click="scanCode()" v-if='hasLogin'></u--image>
|
|
<u-image @click="goDetailPage('/pages/mine/set')" style='margin-top: -6px;' class='image'
|
|
<u-image @click="goDetailPage('/pages/mine/set')" style='margin-top: -6px;' class='image'
|
|
:showLoading="true" src="@/static/images/mine/set.png" width="25px" height="25px"></u-image>
|
|
:showLoading="true" src="@/static/images/mine/set.png" width="25px" height="25px"></u-image>
|
|
</view>
|
|
</view>
|
|
@@ -196,6 +199,7 @@
|
|
driverCall: '',
|
|
driverCall: '',
|
|
isFirstSH: false,
|
|
isFirstSH: false,
|
|
driverSex: "",
|
|
driverSex: "",
|
|
|
|
+ id:'',
|
|
version: "1.1.0" //版本号
|
|
version: "1.1.0" //版本号
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -254,6 +258,7 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+
|
|
async onLoad() {
|
|
async onLoad() {
|
|
that = this
|
|
that = this
|
|
// let _status = await that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
// let _status = await that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
@@ -281,6 +286,46 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ scanCode() {
|
|
|
|
+ let _this = this;
|
|
|
|
+ uni.scanCode({
|
|
|
|
+ onlyFromCamera: true,
|
|
|
|
+ success: function(res) {
|
|
|
|
+ console.log('条码内容:' + res.result);
|
|
|
|
+ _this.id=res.result.split(',')[1]
|
|
|
|
+ console.log(_this.id)
|
|
|
|
+ _this.mobileScanOk();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ mobileScanOk() {
|
|
|
|
+ this.$request.baseRequest('get', '/publishTaskInfo/seeTask', {
|
|
|
|
+ id: this.id
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ res.data.driverCommonId=this.userInfo.id
|
|
|
|
+ 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,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 检查APP是否有新版本
|
|
// 检查APP是否有新版本
|
|
onAPPUpdate() {
|
|
onAPPUpdate() {
|
|
// true 没有新版本的时候有提示,默认:false
|
|
// true 没有新版本的时候有提示,默认:false
|
|
@@ -535,4 +580,9 @@
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
+ .scan{
|
|
|
|
+ position:relative;
|
|
|
|
+ top: -1px;
|
|
|
|
+ left: -4px;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|