星油云站更新
This commit is contained in:
@@ -40,10 +40,10 @@
|
||||
</view>
|
||||
|
||||
<view class="text-right flex-sub oil-main-color">
|
||||
<text v-if="!showData.realPay">
|
||||
<text v-if="!showData.price">
|
||||
未指定
|
||||
</text>
|
||||
<text v-else>¥{{showData.realPay}}</text>
|
||||
<text v-else>¥{{showData.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex padding-left padding-right">
|
||||
@@ -58,10 +58,10 @@
|
||||
|
||||
|
||||
<text class="text-right flex-sub">
|
||||
<text v-if="!showData.vol">
|
||||
<text v-if="!showData.volume">
|
||||
未指定
|
||||
</text>
|
||||
<text v-else>{{showData.vol}}L</text>
|
||||
<text v-else>{{showData.volume}}L</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -92,6 +92,7 @@
|
||||
import OrderOilForm from '@/packageQr/components/OrderOil.vue'
|
||||
// 引入二维码库
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
import OliSiteApi from '@/api/oli-site.js'
|
||||
import tkiQrcode from "@/packageQr/components/tki-qrcode/tki-qrcode.vue" //二维码生成器
|
||||
|
||||
export default {
|
||||
@@ -121,14 +122,16 @@
|
||||
showData: {
|
||||
vol: '',
|
||||
realPay: ''
|
||||
}
|
||||
|
||||
},
|
||||
channelId : uni.getStorageSync('channelId'),
|
||||
siteInfo : {},
|
||||
userInfo : uni.getStorageSync('loginUser'),
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.oilSiteName = uni.getStorageSync('oilSiteName')
|
||||
this.getDefaultQr()
|
||||
this.getSiteInfo()
|
||||
this.oilSiteName = uni.getStorageSync('oilSiteName')
|
||||
|
||||
// this.getDesignatedQr/()
|
||||
console.log('oilDate', this.oilDate)
|
||||
},
|
||||
@@ -143,22 +146,26 @@
|
||||
}
|
||||
},
|
||||
getSiteInfo() {
|
||||
cloudSiteApi.getSiteDetail().then(res => {
|
||||
console.log('...', res)
|
||||
OliSiteApi.getSiteDetail(this.channelId).then(res => {
|
||||
console.log('这里是获取油站信息处', res)
|
||||
if (res.code === 20000) {
|
||||
this.site = res.data.site
|
||||
this.siteInfo = res.data.site
|
||||
this.oilList = res.data.oil
|
||||
uni.setStorage({
|
||||
key: 'oilSite',
|
||||
data: res.data.site
|
||||
})
|
||||
uni.setStorageSync('oilSite',res.data.site)
|
||||
this.getDefaultQr()
|
||||
}
|
||||
})
|
||||
},
|
||||
getDefaultQr() {
|
||||
cloudSiteApi.getSiteQrCode().then(res => {
|
||||
let data = {
|
||||
channelId:this.channelId,
|
||||
siteName:this.siteInfo.siteName,
|
||||
staffId:this.userInfo.id
|
||||
}
|
||||
OliSiteApi.getOilSiteCollectQrCode(data).then(res => {
|
||||
console.log( '这里是返回二维码的地方',res)
|
||||
if (res.code === 20000) {
|
||||
this.val = res.data
|
||||
this.val = res.data.codeStr
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -167,10 +174,12 @@
|
||||
...this.oilDate,
|
||||
...data
|
||||
}
|
||||
this.showData = data
|
||||
cloudSiteApi.getDesignatedSiteQrCode(data6).then(res => {
|
||||
console.log(data)
|
||||
this.showData = data.refuelDetail
|
||||
OliSiteApi.getOilSiteCollectQrCode(data6).then(res => {
|
||||
if (res.code === 20000) {
|
||||
this.val = res.data
|
||||
console.log(res)
|
||||
this.val = res.data.codeStr
|
||||
this.hideModal()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user