版本1.2.3
This commit is contained in:
@@ -21,9 +21,9 @@
|
||||
<view class="text-lg text-center">{{orderItem.istate|formatStr}}</view>
|
||||
<view class="number text-xl text-center oil-main-color">¥{{orderItem.realamount|numberFormat}}</view>
|
||||
</view>
|
||||
<view class="margin-bottom-sm" @tap="copyId(orderItem.driverID,'加油司机编号')">
|
||||
加油司机编号
|
||||
<text class="fr">{{orderItem.driverID}}<text class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red">
|
||||
<view class="margin-bottom-sm" @tap="copyId(orderItem.userName,'加油司机')">
|
||||
加油司机
|
||||
<text class="fr">{{orderItem.userName}}<text class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red">
|
||||
</text></text>
|
||||
</view>
|
||||
|
||||
@@ -101,6 +101,15 @@
|
||||
</view>
|
||||
<view class="padding">
|
||||
|
||||
</view>
|
||||
<view class="padding-lg padding-top-0 padding-bottom-xl">
|
||||
<button v-show="formQr" @tap="scanQr" class="bg-main-oil margin-bottom">
|
||||
<text class="cuIcon-scan padding-right-xs"></text>
|
||||
继续加油</button>
|
||||
<button class="bg-red light margin-bottom" @tap="backHome">
|
||||
<text class="cuIcon-home padding-right-xs"></text>
|
||||
返回首页</button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -111,6 +120,7 @@
|
||||
return {
|
||||
// orderId:'',
|
||||
orderId: uni.getStorageSync('orderId'),
|
||||
formQr: uni.getStorageSync('formQr')?true:false,
|
||||
orderItem: {},
|
||||
baseURL: this.global.baseURL
|
||||
}
|
||||
@@ -118,7 +128,55 @@
|
||||
created() {
|
||||
this.getOrderDetail()
|
||||
},
|
||||
onHide(){
|
||||
this.clearStatus()
|
||||
},
|
||||
onUnload() {
|
||||
this.clearStatus()
|
||||
},
|
||||
methods: {
|
||||
clearStatus(){
|
||||
uni.removeStorageSync('formQr')
|
||||
},
|
||||
scanQr() {
|
||||
var that = this
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: function(res) {
|
||||
console.log('条码类型:' + res.scanType);
|
||||
console.log('条码内容:' + res.result);
|
||||
uni.setStorageSync('qrCode', res.result)
|
||||
uni.navigateTo({
|
||||
url: '/pages/stationDetail/stationDetail',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
},
|
||||
success: (res) => {
|
||||
console.log('chengg', res)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 方便测试
|
||||
// complete: () => {
|
||||
// uni.setStorageSync('qrCode', 'XM&1309328197641433088')
|
||||
// uni.navigateTo({
|
||||
// url: that.scanUrl,
|
||||
// fail: (err) => {
|
||||
// console.log(err)
|
||||
// },
|
||||
// success: (res) => {
|
||||
// console.log('chengg', res)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
})
|
||||
},
|
||||
backHome(){
|
||||
uni.navigateBack({
|
||||
delta:2
|
||||
})
|
||||
},
|
||||
copyId(id, name) {
|
||||
uni.setClipboardData({
|
||||
data: id,
|
||||
|
||||
Reference in New Issue
Block a user