版本1.3.4
This commit is contained in:
46
App.vue
46
App.vue
@@ -28,26 +28,42 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
|
||||||
console.log('App Show')
|
|
||||||
const JSESSIONID = utils.uuid()
|
const JSESSIONID = utils.uuid()
|
||||||
console.log(JSESSIONID)
|
console.log(JSESSIONID)
|
||||||
// console.log(utils.bcrypt(JSESSIONID))
|
// console.log(utils.bcrypt(JSESSIONID))
|
||||||
uni.getLocation({
|
const updateManager = uni.getUpdateManager();
|
||||||
type: 'wgs84',
|
|
||||||
success: function(res) {
|
updateManager.onCheckForUpdate(function(res) {
|
||||||
console.log('当前位置的经度:' + res.longitude);
|
// 请求完新版本信息的回调
|
||||||
console.log('当前位置的纬度:' + res.latitude);
|
console.log('请求完新版本信息的回调', res.hasUpdate);
|
||||||
uni.setStorage({
|
|
||||||
key: 'service_baseUrl',
|
|
||||||
data: 'https://www.51xingka.net/LSMOIL/',
|
|
||||||
success: function() {
|
|
||||||
console.log('缓存baseUrl成功');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
updateManager.onUpdateReady(function(res) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '更新提示',
|
||||||
|
content: '新版本已经准备好,是否重启应用?',
|
||||||
|
success(resRes) {
|
||||||
|
if (resRes.confirm) {
|
||||||
|
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||||
|
updateManager.applyUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
updateManager.onUpdateFailed(function(res) {
|
||||||
|
// 新的版本下载失败
|
||||||
|
});
|
||||||
|
uni.setStorage({
|
||||||
|
key: 'service_baseUrl',
|
||||||
|
data: 'https://www.51xingka.net/LSMOIL/',
|
||||||
|
success: function() {
|
||||||
|
// console.log('缓存baseUrl成功');
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
console.log('App Hide')
|
console.log('App Hide')
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
"subPackages" : true
|
"subPackages" : true
|
||||||
},
|
},
|
||||||
"uniStatistics" : {
|
"uniStatistics" : {
|
||||||
"enable" : true
|
"enable" : false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mp-alipay" : {
|
"mp-alipay" : {
|
||||||
|
|||||||
130
package-lock.json
generated
130
package-lock.json
generated
@@ -1,62 +1,72 @@
|
|||||||
{
|
{
|
||||||
"name": "lsm_oil_site",
|
"name": "lsm_oil_site",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": {
|
"axios": {
|
||||||
"version": "0.19.2",
|
"version": "0.19.2",
|
||||||
"resolved": "https://registry.npm.taobao.org/axios/download/axios-0.19.2.tgz",
|
"resolved": "https://registry.npm.taobao.org/axios/download/axios-0.19.2.tgz",
|
||||||
"integrity": "sha1-PqNsXYgY0NX4qKl6bTa4bNwAyyc=",
|
"integrity": "sha1-PqNsXYgY0NX4qKl6bTa4bNwAyyc=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"follow-redirects": "1.5.10"
|
"follow-redirects": "1.5.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"crypto-js": {
|
"crypto-js": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npm.taobao.org/crypto-js/download/crypto-js-4.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcrypto-js%2Fdownload%2Fcrypto-js-4.0.0.tgz",
|
"resolved": "https://registry.npm.taobao.org/crypto-js/download/crypto-js-4.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcrypto-js%2Fdownload%2Fcrypto-js-4.0.0.tgz",
|
||||||
"integrity": "sha1-KQSrJnep0EKFai6i74DekuSjbcw="
|
"integrity": "sha1-KQSrJnep0EKFai6i74DekuSjbcw="
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz",
|
"resolved": "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz",
|
||||||
"integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
|
"integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"follow-redirects": {
|
"follow-redirects": {
|
||||||
"version": "1.5.10",
|
"version": "1.5.10",
|
||||||
"resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz?cache=0&sync_timestamp=1592518530318&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.5.10.tgz",
|
"resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz?cache=0&sync_timestamp=1592518530318&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.5.10.tgz",
|
||||||
"integrity": "sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=",
|
"integrity": "sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "=3.1.0"
|
"debug": "=3.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"js-cookie": {
|
"js-cookie": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npm.taobao.org/js-cookie/download/js-cookie-2.2.1.tgz",
|
"resolved": "https://registry.npm.taobao.org/js-cookie/download/js-cookie-2.2.1.tgz",
|
||||||
"integrity": "sha1-aeEG3F1YBolFYpAqpbrsN0Tpsrg="
|
"integrity": "sha1-aeEG3F1YBolFYpAqpbrsN0Tpsrg="
|
||||||
},
|
},
|
||||||
"js-md5": {
|
"js-md5": {
|
||||||
"version": "0.7.3",
|
"version": "0.7.3",
|
||||||
"resolved": "https://registry.npm.taobao.org/js-md5/download/js-md5-0.7.3.tgz",
|
"resolved": "https://registry.npm.taobao.org/js-md5/download/js-md5-0.7.3.tgz",
|
||||||
"integrity": "sha1-tPL7sLMnRV9ZjWcn447Ccs0Jw/I="
|
"integrity": "sha1-tPL7sLMnRV9ZjWcn447Ccs0Jw/I="
|
||||||
},
|
},
|
||||||
"jsencrypt": {
|
"jsencrypt": {
|
||||||
"version": "3.0.0-rc.1",
|
"version": "3.0.0-rc.1",
|
||||||
"resolved": "https://registry.npm.taobao.org/jsencrypt/download/jsencrypt-3.0.0-rc.1.tgz",
|
"resolved": "https://registry.npm.taobao.org/jsencrypt/download/jsencrypt-3.0.0-rc.1.tgz",
|
||||||
"integrity": "sha1-DgpHRLpDzFV/tc9i/oZGvOtWGxw="
|
"integrity": "sha1-DgpHRLpDzFV/tc9i/oZGvOtWGxw="
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz",
|
"resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz",
|
||||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||||
},
|
},
|
||||||
"tki-qrcode": {
|
"tki-qrcode": {
|
||||||
"version": "0.1.6",
|
"version": "0.1.6",
|
||||||
"resolved": "https://registry.npm.taobao.org/tki-qrcode/download/tki-qrcode-0.1.6.tgz",
|
"resolved": "https://registry.npm.taobao.org/tki-qrcode/download/tki-qrcode-0.1.6.tgz",
|
||||||
"integrity": "sha1-cTc9nEs/iUT6pU0+6Ziroz2X3n8="
|
"integrity": "sha1-cTc9nEs/iUT6pU0+6Ziroz2X3n8="
|
||||||
}
|
},
|
||||||
}
|
"tsc": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.nlark.com/tsc/download/tsc-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-A3/leeO9Z6XL2qYEtDxsGZGwS+8="
|
||||||
|
},
|
||||||
|
"typescript": {
|
||||||
|
"version": "4.3.5",
|
||||||
|
"resolved": "https://registry.nlark.com/typescript/download/typescript-4.3.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftypescript%2Fdownload%2Ftypescript-4.3.5.tgz",
|
||||||
|
"integrity": "sha1-TRw3zBbok5c8RaBohrcRMjTxGfQ="
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
"js-cookie": "2.2.1",
|
"js-cookie": "2.2.1",
|
||||||
"js-md5": "0.7.3",
|
"js-md5": "0.7.3",
|
||||||
"jsencrypt": "^3.0.0-rc.1",
|
"jsencrypt": "^3.0.0-rc.1",
|
||||||
"tki-qrcode": "^0.1.6"
|
"tki-qrcode": "^0.1.6",
|
||||||
|
"tsc": "^2.0.3",
|
||||||
|
"typescript": "^4.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="cu-item radius shadow margin-bottom ">
|
<view class="cu-item radius shadow margin-bottom ">
|
||||||
<!-- <image class="pay-status" :src="baseURL+'static/img/oil-unfinished.png'" alt /> -->
|
<!-- <image class="pay-status" :src="baseURL+'static/img/oil-unfinished.png'" alt /> -->
|
||||||
<view class="cu-avatar text-sl" v-if="item.sourceType==='3'"
|
<view class="cu-avatar text-sl" v-if="item.sourceType==='3'" :style="'background-image:url('+baseURL+'static/img/order-wjy.png)'"></view>
|
||||||
:style="'background-image:url('+baseURL+'static/img/order-wjy.png)'"></view>
|
<view class="cu-avatar text-sl" v-if="item.sourceType==='4'||item.sourceType==='6'" :style="'background-image:url('+baseURL+'static/img/order-xy.png)'"></view>
|
||||||
<view class="cu-avatar text-sl" v-if="item.sourceType==='4'||item.sourceType==='6'"
|
<view class="cu-avatar text-sl" v-if="item.sourceType==='5'" :style="'background-image:url('+baseURL+'static/img/order-lv.png)'"></view>
|
||||||
:style="'background-image:url('+baseURL+'static/img/order-xy.png)'"></view>
|
|
||||||
<view class="cu-avatar text-sl" v-if="item.sourceType==='5'"
|
|
||||||
:style="'background-image:url('+baseURL+'static/img/order-lv.png)'"></view>
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class=" solid-bottom padding-bottom-sm">
|
<view class=" solid-bottom padding-bottom-sm">
|
||||||
<view class="flex-treble" @tap="copyId(item.orderID)">
|
<view class="flex-treble" @tap="copyId(item.orderID)">
|
||||||
@@ -19,18 +16,21 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class=" text-content text-df">
|
<view class=" text-content text-df">
|
||||||
{{item.oilSiteName}}
|
<text class="lin-h-2">
|
||||||
|
{{item.oilSiteName}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-sm padding-top-sm" @tap="toDetails(item.orderID)">
|
<view class="text-sm " @tap="toDetails(item.orderID)">
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<view class="details">
|
<view class="details">
|
||||||
<view class="top1 text-left">
|
<view class="top1 text-left">
|
||||||
<image class="icon icon-desc " :src="baseURL+'static/img/oil-lf.png'" alt />
|
<image class="icon icon-desc " :src="baseURL+'static/img/oil-lf.png'" alt />
|
||||||
<text class="padding-left-xs padding-right-xs" v-if="item.vol">
|
|
||||||
{{item.vol|numberFilter}}升</text>
|
<text class="padding-left-xs padding-right-sm">
|
||||||
<text>
|
|
||||||
{{item.oilName}}
|
{{item.oilName}}
|
||||||
</text>
|
</text>
|
||||||
|
<text class=" text-lg text-bold text-red " v-if="item.vol">
|
||||||
|
{{item.vol|numberFilter}} L</text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom text-left">
|
<view class="bottom text-left">
|
||||||
@@ -38,14 +38,13 @@
|
|||||||
|
|
||||||
<text class="padding-left-xs">
|
<text class="padding-left-xs">
|
||||||
{{item.createDatetime.substring(0, 10)}}
|
{{item.createDatetime.substring(0, 10)}}
|
||||||
|
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom text-left">
|
<view class="bottom text-left">
|
||||||
<image class="icon icon-desc " :src="baseURL+'static/img/mini-car.png'" alt />
|
<image class="icon icon-desc " :src="baseURL+'static/img/mini-car.png'" alt />
|
||||||
|
|
||||||
<text class="padding-left-xs">
|
<text class="padding-left-xs">
|
||||||
加油车牌: {{item.carNo}}
|
加油车牌: {{item.carNo|plateFilter}}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -56,7 +55,7 @@
|
|||||||
{{item.createDatetime.substring(0,19)}}
|
{{item.createDatetime.substring(0,19)}}
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="color-000 text-lg total-money">¥{{item.realamount|numberFilter}}</text>
|
<text class="text-red text-lg text-bold total-money">¥{{amount|numberFilter}}</text>
|
||||||
<view class="round pay-state light bg-olive bg-transparent text-center state-0" v-if="istate==0">
|
<view class="round pay-state light bg-olive bg-transparent text-center state-0" v-if="istate==0">
|
||||||
<text class="inner-istate round">{{istate|formatStr}}</text>
|
<text class="inner-istate round">{{istate|formatStr}}</text>
|
||||||
<view class="inner-border">
|
<view class="inner-border">
|
||||||
@@ -109,7 +108,7 @@
|
|||||||
console.log(this.item.istate)
|
console.log(this.item.istate)
|
||||||
switch (parseInt(this.item.istate)) {
|
switch (parseInt(this.item.istate)) {
|
||||||
// 网页版 0:待支付, 1:已支付 ,-1:支付失败 ,-2:退款,
|
// 网页版 0:待支付, 1:已支付 ,-1:支付失败 ,-2:退款,
|
||||||
//小程序 0:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
|
//小程序 1:待支付, 1:已支付 ,-1:支付失败 ,2:已取消,3:已退款
|
||||||
case 1:
|
case 1:
|
||||||
return 1
|
return 1
|
||||||
case -1:
|
case -1:
|
||||||
@@ -124,6 +123,14 @@
|
|||||||
} else {
|
} else {
|
||||||
return this.item.istate
|
return this.item.istate
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
amount(){
|
||||||
|
let orderType = uni.getStorageSync('orderType')
|
||||||
|
if (orderType == 1) {
|
||||||
|
return this.item.sitePrice*this.item.vol
|
||||||
|
}else{
|
||||||
|
return this.item.realamount
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -154,6 +161,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
|
plateFilter(value) {
|
||||||
|
if (value) {
|
||||||
|
const numBegin = value.substring(0, 2);
|
||||||
|
const numEnd = value.substring(5);
|
||||||
|
return numBegin + '***' + numEnd;
|
||||||
|
} else {
|
||||||
|
return '暂无'
|
||||||
|
}
|
||||||
|
},
|
||||||
toT(value) {
|
toT(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
return value / 1000
|
return value / 1000
|
||||||
@@ -190,6 +206,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.lin-h-2 {
|
||||||
|
line-height: 2.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
.cu-avatar {
|
.cu-avatar {
|
||||||
background-color: rgba(255, 255, 255, 0);
|
background-color: rgba(255, 255, 255, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,10 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center margin-top icon-container">
|
<view class="text-center margin-top icon-container">
|
||||||
<view class="cu-avatar xl round text-sl" v-if="orderItem.sourceType===3"
|
<view class="cu-avatar xl round text-sl" v-if="orderItem.sourceType===3" :style="'background-image:url('+baseURL+'static/img/order-wjy.png)'"></view>
|
||||||
:style="'background-image:url('+baseURL+'static/img/order-wjy.png)'"></view>
|
<view class="cu-avatar xl round text-sl" v-else-if="orderItem.sourceType===4||orderItem.sourceType===6" :style="'background-image:url('+baseURL+'static/img/order-xy.png)'"></view>
|
||||||
<view class="cu-avatar xl round text-sl" v-else-if="orderItem.sourceType===4||orderItem.sourceType===6"
|
<view class="cu-avatar xl round text-sl" v-else-if="orderItem.sourceType===5" :style="'background-image:url('+baseURL+'static/img/order-lv.png)'"></view>
|
||||||
:style="'background-image:url('+baseURL+'static/img/order-xy.png)'"></view>
|
<view class="cu-avatar xl round text-sl" v-else :style="'background-image:url('+baseURL+'static/img/order-xy.png)'"></view>
|
||||||
<view class="cu-avatar xl round text-sl" v-else-if="orderItem.sourceType===5"
|
|
||||||
:style="'background-image:url('+baseURL+'static/img/order-lv.png)'"></view>
|
|
||||||
<view class="cu-avatar xl round text-sl" v-else
|
|
||||||
:style="'background-image:url('+baseURL+'static/img/order-xy.png)'"></view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="radius margin margin-top bg-white padding-top padding">
|
<view class="radius margin margin-top bg-white padding-top padding">
|
||||||
<!-- sourceType 万金油3 老吕5 星油4/6 -->
|
<!-- sourceType 万金油3 老吕5 星油4/6 -->
|
||||||
@@ -25,38 +21,52 @@
|
|||||||
<view class="margin padding">
|
<view class="margin padding">
|
||||||
<view class="text-lg text-center" v-if="orderSource=='zy'">{{orderItem.istate|formatZyStr}}</view>
|
<view class="text-lg text-center" v-if="orderSource=='zy'">{{orderItem.istate|formatZyStr}}</view>
|
||||||
<view class="text-lg text-center" v-else>{{istate|formatStr}}</view>
|
<view class="text-lg text-center" v-else>{{istate|formatStr}}</view>
|
||||||
<view class="number text-xl text-center oil-main-color">¥{{orderItem.realamount|numberFormat}}
|
<view class="number text-xl text-center oil-main-color">¥{{displayMoney|numberFormat}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="margin-bottom-sm" @tap="copyId(orderItem.driverID,'司机编号')">
|
||||||
<view class="margin-bottom-sm" @tap="copyId(orderItem.userName,'加油司机')">
|
司机编号
|
||||||
|
<text class="fr">{{orderItem.driverID}}<text :class="orderItem.driverID?'cuIcon-copy':''" class="flex-sub padding-left-sm text-right text-lg text-red">
|
||||||
|
</text></text>
|
||||||
|
</view>
|
||||||
|
<view class="margin-bottom-sm">
|
||||||
加油司机
|
加油司机
|
||||||
<text class="fr">{{orderItem.userName}}<text
|
<view class="fr">
|
||||||
class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red">
|
<text>{{orderItem.userName|nameFilter}}</text> <text class="padding-left-sm">{{orderItem.carNo|plateFilter}}
|
||||||
</text></text>
|
</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="margin-bottom-sm" @tap="copyId(orderItem.carNo,'司机车牌')">
|
<!-- <view class="margin-bottom-sm" @tap="copyId(orderItem.carNo,'司机车牌')">
|
||||||
司机车牌
|
司机车牌
|
||||||
<text class="fr">{{orderItem.carNo}}<text
|
<text class="fr">{{orderItem.carNo?orderItem.carNo:'暂无'}}<text :class="orderItem.carNo?'cuIcon-copy':''" class="flex-sub padding-left-sm text-right text-lg text-red">
|
||||||
class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red">
|
|
||||||
</text></text>
|
</text></text>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
油枪油号
|
油枪油号
|
||||||
<text class="fr">{{orderItem.bar}}号枪{{orderItem.oilName||orderItem.oilCode}}</text>
|
<text class="fr">{{orderItem.bar}}号枪{{orderItem.oilName||orderItem.oilCode}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-bottom-sm">
|
<!-- <view class="margin-bottom-sm">
|
||||||
加油总金额
|
加油总金额
|
||||||
<text
|
<text
|
||||||
class="fr">¥{{orderItem.amount?orderItem.amount:(orderItem.xoilDiscountAmount+orderItem.realamount)|numberFormat}}</text>
|
class="fr">¥{{orderItem.amount?orderItem.amount:(orderItem.xoilDiscountAmount+orderItem.realamount)|numberFormat}}</text>
|
||||||
|
</view> -->
|
||||||
|
<view class="margin-bottom-sm">
|
||||||
|
油机单价
|
||||||
|
<text class="fr">¥{{orderItem.sitePrice||orderItem.price}} / 升</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
加油升数
|
加油升数
|
||||||
<text class="fr">{{orderItem.vol|numberFormat}} 升</text>
|
<text class="fr">{{orderItem.vol|numberFormat}} 升</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-bottom-sm" v-if="orderItem.xoilDiscountAmount">
|
<view class="margin-bottom-sm" v-if="orderSource=='mpxoil'">
|
||||||
|
油机总价
|
||||||
|
<text class="fr">¥{{displayMoney|numberFormat}}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="margin-bottom-sm" v-if="orderItem.xoilDiscountAmount">
|
||||||
星卡优惠
|
星卡优惠
|
||||||
<text class="fr">¥ {{(orderItem.xoilDiscountAmount)|numberFormat}}</text>
|
<text class="fr">¥ {{(orderItem.xoilDiscountAmount)|numberFormat}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,11 +77,11 @@
|
|||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
优惠券
|
优惠券
|
||||||
<text class="fr">{{orderItem.coupon|couponFormat}}</text>
|
<text class="fr">{{orderItem.coupon|couponFormat}}</text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="margin-bottom-sm">
|
<!-- <view class="margin-bottom-sm">
|
||||||
实扣款
|
实扣款
|
||||||
<text class="fr oil-main-color">¥ {{orderItem.realamount|numberFormat}}</text>
|
<text class="fr oil-main-color">¥ {{orderItem.realamount|numberFormat}}</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="radius bg-white margin padding ">
|
<view class="radius bg-white margin padding ">
|
||||||
|
|
||||||
@@ -93,8 +103,7 @@
|
|||||||
<view class="radius bg-white margin margin-bottom-0 padding">
|
<view class="radius bg-white margin margin-bottom-0 padding">
|
||||||
<view class="margin-bottom-sm" @tap="copyId(orderItem.orderID,'订单号')">
|
<view class="margin-bottom-sm" @tap="copyId(orderItem.orderID,'订单号')">
|
||||||
订单号
|
订单号
|
||||||
<text class=" fr">{{orderItem.orderID}}<text
|
<text class=" fr">{{orderItem.orderID}}<text class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red">
|
||||||
class="flex-sub padding-left-sm text-right cuIcon-copy text-lg text-red">
|
|
||||||
</text></text>
|
</text></text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -150,6 +159,14 @@
|
|||||||
this.clearStatus()
|
this.clearStatus()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
displayMoney(){
|
||||||
|
if(this.orderSource=='mpxoil'){
|
||||||
|
return this.orderItem.sitePrice*this.orderItem.vol
|
||||||
|
}else{
|
||||||
|
// return this.orderItem.price*this.orderItem.vol
|
||||||
|
return this.orderItem.realamount
|
||||||
|
}
|
||||||
|
},
|
||||||
istate() {
|
istate() {
|
||||||
let orderType = uni.getStorageSync('orderType')
|
let orderType = uni.getStorageSync('orderType')
|
||||||
if (orderType == 1) {
|
if (orderType == 1) {
|
||||||
@@ -243,15 +260,18 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
copyId(id, name) {
|
copyId(id, name) {
|
||||||
uni.setClipboardData({
|
if (id) {
|
||||||
data: id,
|
uni.setClipboardData({
|
||||||
success: () => {
|
data: id,
|
||||||
uni.showToast({
|
success: () => {
|
||||||
title: name + '已复制',
|
uni.showToast({
|
||||||
icon: 'none'
|
title: name + '已复制',
|
||||||
})
|
icon: 'none'
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getOrderDetail() {
|
getOrderDetail() {
|
||||||
cloudSiteApi.getSiteOrderById(this.orderId).then(res => {
|
cloudSiteApi.getSiteOrderById(this.orderId).then(res => {
|
||||||
@@ -263,6 +283,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
|
nameFilter(value) {
|
||||||
|
if (value) {
|
||||||
|
var arr = value.split('')
|
||||||
|
arr[1] = "*"
|
||||||
|
return arr.join('')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plateFilter(value) {
|
||||||
|
if (value) {
|
||||||
|
const numBegin = value.substring(0, 2);
|
||||||
|
const numEnd = value.substring(5);
|
||||||
|
return numBegin + '***' + numEnd;
|
||||||
|
}else{
|
||||||
|
return '暂无'
|
||||||
|
}
|
||||||
|
},
|
||||||
formatZyStr(value) {
|
formatZyStr(value) {
|
||||||
switch (parseInt(value)) {
|
switch (parseInt(value)) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
@@ -84,7 +84,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log(this.oilList)
|
|
||||||
this.initForm()
|
this.initForm()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -116,7 +115,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
initForm() {
|
initForm() {
|
||||||
if (this.oilList) {
|
if (this.oilList[0]) {
|
||||||
this.selected = this.oilList[0]
|
this.selected = this.oilList[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -128,21 +127,13 @@
|
|||||||
gunId: this.gunId + 1,
|
gunId: this.gunId + 1,
|
||||||
realPay: this.money.realPay
|
realPay: this.money.realPay
|
||||||
}
|
}
|
||||||
console.log('被选中的', data5)
|
|
||||||
this.$emit('confirmVol', data5)
|
this.$emit('confirmVol', data5)
|
||||||
},
|
},
|
||||||
calcMoney(e) {
|
calcMoney(e) {
|
||||||
// var vol;
|
|
||||||
// vol = e.detail.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');
|
|
||||||
// this.vol = vol
|
|
||||||
|
|
||||||
this.price = this.selected.xkPrice ? this.selected.xkPrice : this.selected.lvPrice
|
this.price = this.selected.xkPrice ? this.selected.xkPrice : this.selected.lvPrice
|
||||||
this.money.total = this.vol * this.selected.standardPrice
|
this.money.total = this.vol * this.selected.standardPrice
|
||||||
// this.money.discount = this.money.total - this.vol * (this.selected.standardPrice - this.price)
|
|
||||||
// this.money.realPay = (this.money.total - this.money.discount).toFixed(2)
|
|
||||||
this.money.discount = this.vol * (this.selected.standardPrice - this.price)
|
this.money.discount = this.vol * (this.selected.standardPrice - this.price)
|
||||||
this.money.realPay = (this.money.total - this.money.discount).toFixed(2)
|
this.money.realPay = (this.money.total - this.money.discount).toFixed(2)
|
||||||
console.log('总金额', '折扣', '实际支付')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
|
|||||||
42
pages.json
42
pages.json
@@ -36,26 +36,23 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/Auth/Auth",
|
"path": "pages/Auth/Auth",
|
||||||
"style": {}
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/test/test",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
"path": "pages/stationDetail/ZYSite",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
,{
|
|
||||||
"path" : "pages/test/test",
|
],
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
,{
|
|
||||||
"path" : "pages/stationDetail/ZYSite",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"enablePullDownRefresh": false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"subPackages": [{
|
"subPackages": [{
|
||||||
"root": "packageOrders",
|
"root": "packageOrders",
|
||||||
"pages": [{
|
"pages": [{
|
||||||
@@ -68,6 +65,9 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/orderList/dailyOrder/dailyOrder",
|
"path": "pages/orderList/dailyOrder/dailyOrder",
|
||||||
"style": {}
|
"style": {}
|
||||||
|
}, {
|
||||||
|
"path": "pages/printTicket/printTicket",
|
||||||
|
"style": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -213,8 +213,8 @@
|
|||||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
"query": "" //启动参数,在页面的onLoad函数里面得到
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"window": {// 开发者可在 app.json 配置 renderingMode 关闭同层来规避此问题。
|
"window": { // 开发者可在 app.json 配置 renderingMode 关闭同层来规避此问题。
|
||||||
"renderingMode": "seperated"
|
"renderingMode": "seperated"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -50,38 +50,12 @@
|
|||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
// let url = '/pages/station-info/scan-camera/scan-camera'
|
|
||||||
// uni.redirectTo({
|
uni.redirectTo({
|
||||||
// url: url
|
url: '../../packageOrders/pages/printTicket/printTicket'
|
||||||
// })
|
})
|
||||||
},
|
|
||||||
onReady(option) {
|
|
||||||
const updateManager = uni.getUpdateManager();
|
|
||||||
|
|
||||||
updateManager.onCheckForUpdate(function(res) {
|
|
||||||
// 请求完新版本信息的回调
|
|
||||||
console.log('请求完新版本信息的回调', res.hasUpdate);
|
|
||||||
});
|
|
||||||
|
|
||||||
updateManager.onUpdateReady(function(res) {
|
|
||||||
uni.showModal({
|
|
||||||
title: '更新提示',
|
|
||||||
content: '新版本已经准备好,是否重启应用?',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|
||||||
updateManager.applyUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
updateManager.onUpdateFailed(function(res) {
|
|
||||||
// 新的版本下载失败
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
uni.setStorageSync('orderType',null)
|
uni.setStorageSync('orderType',null)
|
||||||
// uni.preloadPage({url: "/pages/station-info/scan-camera/scan-camera"});
|
// uni.preloadPage({url: "/pages/station-info/scan-camera/scan-camera"});
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
<text class="color-000">版本号</text>
|
<text class="color-000">版本号</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="action">
|
<view class="action">
|
||||||
<text class="text-grey text-sm">1.3.3.8</text>
|
<text class="text-grey text-sm">1.3.4</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import utils from '@/utils/encode'
|
import utils from '@/utils/encode'
|
||||||
|
|
||||||
const devUrl = 'http://192.168.0.33:48080' // 测试,不加密
|
// const devUrl = 'http://192.168.0.13:48080' // 测试,不加密
|
||||||
const testUrl = 'http://192.168.0.25:48080' // 测试,加密
|
// const testUrl = 'http://192.168.0.25:48080' // 测试,加密
|
||||||
const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密
|
const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密
|
||||||
|
|
||||||
const env = process.env.NODE_ENV // 环境
|
// const env = process.env.NODE_ENV // 环境
|
||||||
// const env = 'production' // 仅用于测试
|
const env = 'production' // 仅用于测试
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: env=='production'?productionUrl:testUrl, //
|
baseURL: env=='production'?productionUrl:devUrl, //
|
||||||
// baseURL: 'http://192.168.0.33:48080', //
|
// baseURL:testUrl, //
|
||||||
// baseURL: 'https://www.51xingka.net/oilApp', //生产
|
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
})
|
})
|
||||||
var url = ''
|
var url = ''
|
||||||
@@ -42,7 +41,7 @@ service.interceptors.request.use(
|
|||||||
const data = { // 用于存储加密
|
const data = { // 用于存储加密
|
||||||
params: '' // 加密后的密文
|
params: '' // 加密后的密文
|
||||||
}
|
}
|
||||||
console.log('请求路径', config.url, '参数加密前', config.data)
|
// console.log('请求路径', config.url, '参数加密前', config.data)
|
||||||
// 要加密
|
// 要加密
|
||||||
data.params = utils.encrypt(JSON.stringify(config.data))
|
data.params = utils.encrypt(JSON.stringify(config.data))
|
||||||
config.data = data
|
config.data = data
|
||||||
@@ -76,7 +75,7 @@ service.interceptors.response.use(
|
|||||||
// 加密的数据,需要解密
|
// 加密的数据,需要解密
|
||||||
const dataParam = JSON.parse(utils.decrypt(res.data))
|
const dataParam = JSON.parse(utils.decrypt(res.data))
|
||||||
res.data = JSON.stringify(dataParam) === '{}' ? null : dataParam
|
res.data = JSON.stringify(dataParam) === '{}' ? null : dataParam
|
||||||
console.log('生产环境 请求路径', response.config.url, '解密为', res.data)
|
// console.log('生产环境 请求路径', response.config.url, '解密为', res.data)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('请求路径', response.config.url, '返回结果未加密', res)
|
console.log('请求路径', response.config.url, '返回结果未加密', res)
|
||||||
@@ -90,18 +89,6 @@ service.interceptors.response.use(
|
|||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
// if (res.code === 42011) {
|
|
||||||
// console.log(res.code)
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url: '/pages/startPage/startPage',
|
|
||||||
// success: () => {
|
|
||||||
// console.log('跳转成功')
|
|
||||||
// },
|
|
||||||
// fail: (err) => {
|
|
||||||
// console.log(err)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
if (res.msg === '您已被迫下线') {
|
if (res.msg === '您已被迫下线') {
|
||||||
outTimer = setTimeout(() => {
|
outTimer = setTimeout(() => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|||||||
Reference in New Issue
Block a user