更新
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
<block slot="backText">返回</block>
|
<block slot="backText">返回</block>
|
||||||
<block slot="content">订单支付结果</block>
|
<block slot="content">订单支付结果</block>
|
||||||
</cu-custom>
|
</cu-custom>
|
||||||
<view :class="showQr ? 'bg-red' :''" >
|
<view :class="showQr ? 'bg-red' :''">
|
||||||
<view class="text-center text-bold text-xl padding-xl" >
|
<view class="text-center text-bold text-xl padding-xl">
|
||||||
{{ textstatus }}
|
{{ textstatus }}
|
||||||
<!-- 支付{{status=='success'?'成功':'失败'}} -->
|
<!-- 支付{{status=='success'?'成功':'失败'}} -->
|
||||||
</view>
|
</view>
|
||||||
@@ -20,19 +20,20 @@
|
|||||||
<view class="qr-container ">
|
<view class="qr-container ">
|
||||||
<view class="qrimg">
|
<view class="qrimg">
|
||||||
<view class="qrimg" @tap="newQrString">
|
<view class="qrimg" @tap="newQrString">
|
||||||
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx"
|
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx" background="#fff"
|
||||||
background="#fff" :foreground="foreground" :pdground="foreground" :icon="iconUrl" iconSize="40" onval
|
:foreground="foreground" :pdground="foreground" :icon="iconUrl" iconSize="40" onval
|
||||||
:usingComponents="usingComponents" showLoading />
|
:usingComponents="usingComponents" showLoading />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-center text-sm justify-center align-center flex">
|
<view class="text-center text-sm justify-center align-center flex">
|
||||||
<image src="../../static/img/YDJY.png" mode="" style="width: 60upx;height:60upx;" class="margin-right-sm"></image>
|
<image src="../../static/img/YDJY.png" mode="" style="width: 60upx;height:60upx;"
|
||||||
|
class="margin-right-sm"></image>
|
||||||
<text>壳牌</text>
|
<text>壳牌</text>
|
||||||
</view>
|
</view>
|
||||||
<div class="times">
|
<div class="times">
|
||||||
<span>{{ hour }} : {{ minutes }}</span>
|
<span>{{ hour }} : {{ minutes }}</span>
|
||||||
<span style="font-size: 38upx;margin-left: 10upx;;">{{ seconds }}s</span>
|
<span style="font-size: 38upx;margin-left: 10upx;;">{{ seconds }}s</span>
|
||||||
</div>
|
</div>
|
||||||
<view class="text-center padding-top text-sm margin-bottom">
|
<view class="text-center padding-top text-sm margin-bottom">
|
||||||
提示:该二维码每隔3分钟自动刷新一次
|
提示:该二维码每隔3分钟自动刷新一次
|
||||||
@@ -41,18 +42,19 @@
|
|||||||
<view class=" radius my-shadow solid-top margin margin-top-0">
|
<view class=" radius my-shadow solid-top margin margin-top-0">
|
||||||
<view class="bg-gray text-center padding-sm margin-bottom-sm" v-if="status=='success'">
|
<view class="bg-gray text-center padding-sm margin-bottom-sm" v-if="status=='success'">
|
||||||
请提醒加油员使用
|
请提醒加油员使用
|
||||||
<text class="oil-main-color" >“{{showtitles}}”</text>
|
<text class="oil-main-color">“{{showtitles}}”</text>
|
||||||
<!-- <text class="oil-main-color" v-else>“星油云站” 或 {{order.channelCode|channelCodeFamt}}</text> -->
|
<!-- <text class="oil-main-color" v-else>“星油云站” 或 {{order.channelCode|channelCodeFamt}}</text> -->
|
||||||
进行订单核销
|
进行订单核销
|
||||||
</view>
|
</view>
|
||||||
<view class="bg-gray text-center padding-sm margin-bottom-sm" v-if="status!='success'">
|
<view class="bg-gray text-center padding-sm margin-bottom-sm" v-if="status!='success'">
|
||||||
{{errMsg}}
|
{{errMsg}}
|
||||||
</view>
|
</view>
|
||||||
<view class="padding">
|
<view class="padding" style="padding-bottom: 200px;">
|
||||||
<view class="padding-bottom-xs margin-bottom-xs dashed-bottom">
|
<view class="padding-bottom-xs margin-bottom-xs dashed-bottom">
|
||||||
<view class="padding-tb-xs text-left" @tap="onCopy(order.orderSerialNumber)">
|
<view class="padding-tb-xs text-left" @tap="onCopy(order.orderSerialNumber)">
|
||||||
订单编号:
|
订单编号:
|
||||||
<text class="fr">{{order.orderSerialNumber?order.orderSerialNumber:''}} <text class="cuIcon-copy padding-left-xs"></text></text>
|
<text class="fr">{{order.orderSerialNumber?order.orderSerialNumber:''}} <text
|
||||||
|
class="cuIcon-copy padding-left-xs"></text></text>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -63,7 +65,8 @@
|
|||||||
<view class="padding-tb-xs text-left">
|
<view class="padding-tb-xs text-left">
|
||||||
油品油枪:
|
油品油枪:
|
||||||
<text class="fr nowrap">
|
<text class="fr nowrap">
|
||||||
{{order.oilsCode?order.oilsCode+' ':''}}&{{ order.gunName?order.gunName+'号枪': order.oilsBar?order.oilsBar+'号枪':'未选择油枪'}} </text>
|
{{order.oilsCode?order.oilsCode+' ':''}}&{{ order.gunName?order.gunName+'号枪': order.oilsBar?order.oilsBar+'号枪':'未选择油枪'}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-tb-xs text-left">
|
<view class="padding-tb-xs text-left">
|
||||||
加油升数:
|
加油升数:
|
||||||
@@ -92,16 +95,19 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="padding-tb-xs text-left">
|
<view class="padding-tb-xs text-left">
|
||||||
星油优惠:
|
星油优惠:
|
||||||
<text class="text-red fr">{{order.oilDiscountAmount>0?order.oilDiscountAmount:'xxx.x'|moneyFormat}}</text>
|
<text
|
||||||
|
class="text-red fr">{{order.oilDiscountAmount>0?order.oilDiscountAmount:'xxx.x'|moneyFormat}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-tb-xs text-left">
|
<view class="padding-tb-xs text-left">
|
||||||
优惠券:
|
优惠券:
|
||||||
<text class="text-red fr">{{order.couponDiscountAmount>0?order.couponDiscountAmount:'xxx.x'|moneyFormat}}</text>
|
<text
|
||||||
|
class="text-red fr">{{order.couponDiscountAmount>0?order.couponDiscountAmount:'xxx.x'|moneyFormat}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="padding-tb-xs text-left">
|
<view class="padding-tb-xs text-left">
|
||||||
合计:
|
合计:
|
||||||
<text class="text-red text-bold text-lg fr">{{order.realAmount>0?'¥'+order.realAmount:'xxx.x'}}</text>
|
<text
|
||||||
|
class="text-red text-bold text-lg fr">{{order.realAmount>0?'¥'+order.realAmount:'xxx.x'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="dashed-top margin-top-xs padding-top-sm">
|
<view class="dashed-top margin-top-xs padding-top-sm">
|
||||||
<view class="padding-tb-xs text-left">
|
<view class="padding-tb-xs text-left">
|
||||||
@@ -121,13 +127,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class=" fixed-bottom bg-white padding">
|
<view class=" fixed-bottom bg-white padding">
|
||||||
|
<button v-if="oilItems.listTag == '上汽联名卡' || oilItems.listTag == '集卡加油'"
|
||||||
|
class="cu-btn block lg bg-main-oil margin-bottom" @tap="refresh">刷新</button>
|
||||||
<button class="cu-btn block lg bg-main-oil" open-type="contact">联系客服</button>
|
<button class="cu-btn block lg bg-main-oil" open-type="contact">联系客服</button>
|
||||||
<button class="cu-btn block lg margin-top" @tap="backToIndex">关闭</button>
|
<button class="cu-btn block lg margin-top" @tap="backToIndex">关闭</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-top padding placeholder-hidden bg-white">
|
<!-- <view class="margin-top padding placeholder-hidden bg-white">
|
||||||
<button class="cu-btn block lg bg-main-oil" open-type="contact">联系客服</button>
|
<button class="cu-btn block lg bg-main-oil" open-type="contact">联系客服</button>
|
||||||
<button class="cu-btn block lg margin-top" @tap="backToIndex">关闭</button>
|
<button class="cu-btn block lg margin-top" @tap="backToIndex">关闭</button>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -139,23 +147,23 @@
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ThirdPartyVoucher,
|
ThirdPartyVoucher,
|
||||||
tkiQrcode
|
tkiQrcode
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
return {
|
return {
|
||||||
foreground:'#000',
|
foreground: '#000',
|
||||||
oilItem:{},
|
oilItem: {},
|
||||||
status:"",
|
status: "",
|
||||||
showtitles:"",
|
showtitles: "",
|
||||||
hour: now.getHours() < 10 ? '0' + now.getHours() : now.getHours(), //当小时为个为数时在在前加0(例:01),以下同理
|
hour: now.getHours() < 10 ? '0' + now.getHours() : now.getHours(), //当小时为个为数时在在前加0(例:01),以下同理
|
||||||
minutes: now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes(),
|
minutes: now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes(),
|
||||||
seconds: now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds(),
|
seconds: now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds(),
|
||||||
timer: null,
|
timer: null,
|
||||||
showtext:true,
|
showtext: true,
|
||||||
showQr:false,
|
showQr: false,
|
||||||
val:'',
|
val: '',
|
||||||
textstatus:'正在支付中',
|
textstatus: '正在支付中',
|
||||||
showThirdResult: false,
|
showThirdResult: false,
|
||||||
imgURL: this.global.imgURL,
|
imgURL: this.global.imgURL,
|
||||||
status: 'fail',
|
status: 'fail',
|
||||||
@@ -167,52 +175,168 @@
|
|||||||
tyPayMethod: null
|
tyPayMethod: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
let _that = this
|
||||||
|
let oilItem = uni.getStorageSync('oilItem')
|
||||||
|
this.oilItem = oilItem
|
||||||
|
this.showtitles = oilItem.listTag
|
||||||
|
if (this.timer) {
|
||||||
|
clearInterval(this.timer)
|
||||||
|
}
|
||||||
|
setInterval(() => {
|
||||||
|
this.getTime()
|
||||||
|
}, 1000) //设置定时器,时时间每隔一秒钟走一次(即每秒)
|
||||||
|
this.timeinterval = setInterval(() => {
|
||||||
|
console.log('1')
|
||||||
|
_that.getOrderQrCode()
|
||||||
|
}, 1000 * 60 * 3);
|
||||||
|
// console.log(option)
|
||||||
|
this.getOrderQrCode()
|
||||||
|
if (option.payMethod == '1' && option.status == 'success') {
|
||||||
|
if (option.status == 'success') {
|
||||||
|
this.textstatus = '支付成功'
|
||||||
|
this.status = option.status
|
||||||
|
let oilItems = this.oilItem
|
||||||
|
let _that = this
|
||||||
|
if (oilItems.listTag == '万金油') {
|
||||||
|
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/wanjinyou.mp3'
|
||||||
|
} else if (oilItems.listTag == '星油') {
|
||||||
|
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/xingyouyunzhan.mp3'
|
||||||
|
} else if (oilItems.listTag == '壳牌') {
|
||||||
|
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/qiaopainew.mp3'
|
||||||
|
} else if (oilItems.listTag == '上汽联名卡') {
|
||||||
|
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqi.mp3'
|
||||||
|
} else if (oilItems.listTag == '集卡加油') {
|
||||||
|
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqijika.mp3'
|
||||||
|
}
|
||||||
|
this.ContextAudio(this.audioUrl)
|
||||||
|
} else {
|
||||||
|
this.textstatus = '支付失败'
|
||||||
|
this.status = option.status
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (option.status == 'fail') {
|
||||||
|
this.textstatus = '支付失败'
|
||||||
|
this.status = option.status
|
||||||
|
this.errMsg = option.errMsg
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.order.payMethod && this.order.payMethod == 2) {
|
||||||
|
this.tyPayMethod = 2
|
||||||
|
this.queryOrderStatusSq()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 创建音频
|
// 创建音频
|
||||||
ContextAudio(url){
|
ContextAudio(url) {
|
||||||
this.innerAudioContext = uni.createInnerAudioContext();
|
this.innerAudioContext = uni.createInnerAudioContext();
|
||||||
this.innerAudioContext.autoplay = true;
|
this.innerAudioContext.autoplay = true;
|
||||||
this.innerAudioContext.src = url;
|
this.innerAudioContext.src = url;
|
||||||
this.innerAudioContext.onPlay(() => {
|
this.innerAudioContext.onPlay(() => {
|
||||||
console.log('开始播放');
|
console.log('开始播放');
|
||||||
});
|
});
|
||||||
this.innerAudioContext.onError((res) => {
|
this.innerAudioContext.onError((res) => {
|
||||||
console.log(res.errMsg);
|
console.log(res.errMsg);
|
||||||
console.log(res.errCode);
|
console.log(res.errCode);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTime () {
|
getTime() {
|
||||||
var date = new Date()
|
var date = new Date()
|
||||||
this.hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
this.hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
||||||
this.minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
this.minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||||
this.seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
this.seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||||
},
|
},
|
||||||
newQrString() {
|
newQrString() {
|
||||||
this.getOrderQrCode()
|
this.getOrderQrCode()
|
||||||
},
|
},
|
||||||
getOrderQrCode(){
|
getOrderQrCode() {
|
||||||
console.log('这里是获取验证码')
|
oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then((res) => {
|
||||||
console.log(this.order.orderSerialNumber)
|
if (res.code == 40000) {
|
||||||
oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then( (res)=>{
|
this.showQr = false
|
||||||
console.log(res)
|
this.showtext = true
|
||||||
if(res.code == 40000){
|
} else if (res.code == 20000) {
|
||||||
console.log('34')
|
|
||||||
this.showQr = false
|
|
||||||
this.showtext=true
|
|
||||||
}else if(res.code == 20000){
|
|
||||||
console.log('12')
|
|
||||||
this.showQr = true
|
this.showQr = true
|
||||||
this.showtext =false
|
this.showtext = false
|
||||||
this.val =res.data.codeStr
|
this.val = res.data.codeStr
|
||||||
this.foreground = this.val.indexOf('SHLFC/V1')==-1?'#000':'#1A487E';
|
this.foreground = this.val.indexOf('SHLFC/V1') == -1 ? '#000' : '#1A487E';
|
||||||
console.log(this.foreground,'foreground')
|
|
||||||
}
|
}
|
||||||
} )
|
})
|
||||||
},
|
},
|
||||||
// 三方支付结果弹窗开始
|
// 三方支付结果弹窗开始
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.showThirdResult = false
|
this.showThirdResult = false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onShowThirdResult() {
|
||||||
|
this.showThirdResult = true
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
toilApi.getOrderInfoByOrderSerialNumber(this.order.orderSerialNumber).then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
if (res.data.otherOrderStatus == 0) {
|
||||||
|
this.textstatus = '支付中'
|
||||||
|
} else if (res.data.otherOrderStatus == 1) {
|
||||||
|
this.textstatus = '支付成功'
|
||||||
|
this.status = "success"
|
||||||
|
if (this.oilItem.listTag == '万金油') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/wanjinyou.mp3'
|
||||||
|
} else if (this.oilItem.listTag == '星油') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/xingyouyunzhan.mp3'
|
||||||
|
} else if (this.oilItem.listTag == '壳牌') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/qiaopainew.mp3'
|
||||||
|
} else if (this.oilItem.listTag == '上汽联名卡') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqi.mp3'
|
||||||
|
} else if (oilItems.listTag == '集卡加油') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqijika.mp3'
|
||||||
|
}
|
||||||
|
this.ContextAudio(this.audioUrl)
|
||||||
|
} else if (res.data.otherOrderStatus == -1) {
|
||||||
|
this.textstatus = '三方支付失败,已退款'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 上汽联名卡支付状态
|
||||||
|
queryOrderStatusSq() {
|
||||||
|
toilApi.queryOrderStatusSq(this.order.orderSerialNumber).then(res => {
|
||||||
|
if (res.code == 20000) {
|
||||||
|
this.tySqRes = res.data
|
||||||
|
this.tyIntervalCount++
|
||||||
|
if (res.data.otherOrderStatus == 0) {
|
||||||
|
this.textstatus = '支付中'
|
||||||
|
} else if (res.data.otherOrderStatus == 1) {
|
||||||
|
this.textstatus = '支付成功'
|
||||||
|
this.status = "success"
|
||||||
|
if (this.oilItem.listTag == '万金油') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/wanjinyou.mp3'
|
||||||
|
} else if (this.oilItem.listTag == '星油') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/xingyouyunzhan.mp3'
|
||||||
|
} else if (this.oilItem.listTag == '壳牌') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/qiaopainew.mp3'
|
||||||
|
} else if (this.oilItem.listTag == '上汽联名卡') {
|
||||||
|
this.audioUrl =
|
||||||
|
'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqi.mp3'
|
||||||
|
}
|
||||||
|
this.ContextAudio(this.audioUrl)
|
||||||
|
} else if (res.data.otherOrderStatus == -1) {
|
||||||
|
this.textstatus = '三方支付失败,已退款'
|
||||||
|
}
|
||||||
|
// otherOrderStatus //三方支付状态 0:待通知 1:通知成功 -1:通知失败
|
||||||
|
// console.log('联名卡支付结果', res.data)
|
||||||
|
this.getThirdStatus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getThirdStatus() {
|
getThirdStatus() {
|
||||||
if (this.tyIntervalCount > 5 || this.tySqRes.otherOrderStatus != 0) {
|
if (this.tyIntervalCount > 5 || this.tySqRes.otherOrderStatus != 0) {
|
||||||
this.onShowThirdResult()
|
this.onShowThirdResult()
|
||||||
@@ -222,49 +346,6 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShowThirdResult() {
|
|
||||||
this.showThirdResult = true
|
|
||||||
},
|
|
||||||
// 上汽联名卡支付状态
|
|
||||||
queryOrderStatusSq() {
|
|
||||||
toilApi.queryOrderStatusSq(this.order.orderSerialNumber).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
if (res.code == 20000) {
|
|
||||||
this.tySqRes = res.data
|
|
||||||
this.tyIntervalCount++
|
|
||||||
if (res.code == 20000) {
|
|
||||||
console.log('进入')
|
|
||||||
this.tySqRes = res.data
|
|
||||||
this.tyIntervalCount++
|
|
||||||
if(res.data.otherOrderStatus == 0){
|
|
||||||
this.textstatus = '支付中'
|
|
||||||
}else if(res.data.otherOrderStatus == 1){
|
|
||||||
this.textstatus = '支付成功'
|
|
||||||
this.status = "success"
|
|
||||||
if(this.oilItem.listTag == '万金油'){
|
|
||||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/wanjinyou.mp3'
|
|
||||||
}else if(this.oilItem.listTag == '星油'){
|
|
||||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/xingyouyunzhan.mp3'
|
|
||||||
}else if(this.oilItem.listTag == '壳牌'){
|
|
||||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/qiaopainew.mp3'
|
|
||||||
}else if(this.oilItem.listTag == '上汽联名卡'){
|
|
||||||
this.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqi.mp3'
|
|
||||||
}
|
|
||||||
this.ContextAudio(this.audioUrl)
|
|
||||||
}else if(res.data.otherOrderStatus == -1){
|
|
||||||
this.textstatus = '三方支付失败,已退款'
|
|
||||||
}
|
|
||||||
// otherOrderStatus //三方支付状态 0:待通知 1:通知成功 -1:通知失败
|
|
||||||
// console.log('联名卡支付结果', res.data)
|
|
||||||
this.getThirdStatus()
|
|
||||||
}
|
|
||||||
// otherOrderStatus //三方支付状态 0:待通知 1:通知成功 -1:通知失败
|
|
||||||
// console.log('联名卡支付结果', res.data)
|
|
||||||
this.getThirdStatus()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 三方支付结果弹窗结束
|
// 三方支付结果弹窗结束
|
||||||
backToIndex() {
|
backToIndex() {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
@@ -284,68 +365,10 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
|
||||||
let _that = this
|
|
||||||
let oilItem = uni.getStorageSync('oilItem')
|
|
||||||
this.oilItem = oilItem
|
|
||||||
this.showtitles = oilItem.listTag
|
|
||||||
if (this.timer) {
|
|
||||||
clearInterval(this.timer)
|
|
||||||
}
|
|
||||||
setInterval(() => {
|
|
||||||
this.getTime()
|
|
||||||
},1000) //设置定时器,时时间每隔一秒钟走一次(即每秒)
|
|
||||||
this.timeinterval = setInterval(() => {
|
|
||||||
console.log('1')
|
|
||||||
_that.getOrderQrCode()
|
|
||||||
}, 1000 * 60 * 3);
|
|
||||||
// this.status = option.status
|
|
||||||
console.log('这里是op')
|
|
||||||
console.log(option)
|
|
||||||
this.getOrderQrCode()
|
|
||||||
if(option.payMethod == '1' && option.status == 'success'){
|
|
||||||
if(option.status == 'success') {
|
|
||||||
console.log('这里是支付成功')
|
|
||||||
this.textstatus = '支付成功'
|
|
||||||
this.status = option.status
|
|
||||||
console.log(this.oilItem)
|
|
||||||
let oilItems = this.oilItem
|
|
||||||
let _that = this
|
|
||||||
if(oilItems.listTag == '万金油'){
|
|
||||||
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/wanjinyou.mp3'
|
|
||||||
}else if(oilItems.listTag == '星油'){
|
|
||||||
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/xingyouyunzhan.mp3'
|
|
||||||
}else if(oilItems.listTag == '壳牌'){
|
|
||||||
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/qiaopainew.mp3'
|
|
||||||
}else if(oilItems.listTag == '上汽联名卡'){
|
|
||||||
_that.audioUrl = 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/shangqi.mp3'
|
|
||||||
}
|
|
||||||
this.ContextAudio(this.audioUrl)
|
|
||||||
}else{
|
|
||||||
console.log('这里是支付失败')
|
|
||||||
this.textstatus = '支付失败'
|
|
||||||
this.status = option.status
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if(option.status == 'fail'){
|
|
||||||
console.log('fail')
|
|
||||||
this.textstatus = '支付失败'
|
|
||||||
this.status = option.status
|
|
||||||
this.errMsg = option.errMsg
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.order.payMethod && this.order.payMethod == 2) {
|
|
||||||
console.log('这里是则一')
|
|
||||||
this.tyPayMethod = 2
|
|
||||||
this.queryOrderStatusSq()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
},
|
|
||||||
filters: {
|
filters: {
|
||||||
moneyFormath(value) {
|
moneyFormath(value) {
|
||||||
console.log(value)
|
if (value != 'xxx.x') {
|
||||||
if (value != 'xxx.x') {
|
|
||||||
let number = value.toFixed(2)
|
let number = value.toFixed(2)
|
||||||
return number
|
return number
|
||||||
} else {
|
} else {
|
||||||
@@ -355,10 +378,10 @@
|
|||||||
moneyFormat(value) {
|
moneyFormat(value) {
|
||||||
if (value != 'xxx.x') {
|
if (value != 'xxx.x') {
|
||||||
// console.log('old:',value)
|
// console.log('old:',value)
|
||||||
let realAmount =(parseInt(value * 100) / 100).toFixed(2)
|
let realAmount = (parseInt(value * 100) / 100).toFixed(2)
|
||||||
// console.log('new:',realAmount)
|
// console.log('new:',realAmount)
|
||||||
return realAmount
|
return realAmount
|
||||||
} else {
|
} else {
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -371,7 +394,7 @@
|
|||||||
case 'WJY':
|
case 'WJY':
|
||||||
return '万金油'
|
return '万金油'
|
||||||
case 'LV':
|
case 'LV':
|
||||||
return '其他'
|
return '其他'
|
||||||
case 'TY':
|
case 'TY':
|
||||||
return '团油'
|
return '团油'
|
||||||
case 'YDJY':
|
case 'YDJY':
|
||||||
@@ -379,35 +402,37 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
,
|
|
||||||
onHide() {
|
onHide() {
|
||||||
console.log('这里是hiden')
|
console.log('这里是hiden')
|
||||||
this.innerAudioContext.stop()
|
this.innerAudioContext.stop()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
console.log('这里是卸载页面')
|
console.log('这里是卸载页面')
|
||||||
this.innerAudioContext.stop()
|
this.innerAudioContext.stop()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.move-tops{
|
.move-tops {
|
||||||
transform: translateY(-17px);
|
transform: translateY(-17px);
|
||||||
}
|
}
|
||||||
.bg-red{
|
|
||||||
background-color: #FF6700;
|
.bg-red {
|
||||||
}
|
background-color: #FF6700;
|
||||||
.text-centers {
|
}
|
||||||
text-align: center;
|
|
||||||
width: 90%;
|
.text-centers {
|
||||||
margin: 0 auto;
|
text-align: center;
|
||||||
border-radius: 7px;
|
width: 90%;
|
||||||
overflow: hidden;
|
margin: 0 auto;
|
||||||
}
|
border-radius: 7px;
|
||||||
.times {
|
overflow: hidden;
|
||||||
margin-left: 250upx ;
|
}
|
||||||
|
|
||||||
|
.times {
|
||||||
|
margin-left: 250upx;
|
||||||
font-size: 60upx;
|
font-size: 60upx;
|
||||||
padding-top: 60upx;
|
padding-top: 60upx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
239
api/oil-site.js
239
api/oil-site.js
@@ -3,94 +3,94 @@ const service_name = "oil-site"
|
|||||||
const group_name = "oilSiteAppInfo"
|
const group_name = "oilSiteAppInfo"
|
||||||
const order_name = 'oilSiteOrderInfo'
|
const order_name = 'oilSiteOrderInfo'
|
||||||
export default {
|
export default {
|
||||||
getOrderDiscountInfo(data){
|
getOrderDiscountInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${order_name}/getOrderDiscountInfo`,
|
url: `/${service_name}/${order_name}/getOrderDiscountInfo`,
|
||||||
method:'post',
|
method: 'post',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gunList(data){
|
gunList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/oil-site/xoilSiteGun/gunList`,
|
url: `/oil-site/xoilSiteGun/gunList`,
|
||||||
method:'post',
|
method: 'post',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
plateNumberRecognition(data) { //车牌图文识别
|
plateNumberRecognition(data) { //车牌图文识别
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/oilSiteAppInfo/plateNumberRecognition`,
|
url: `/${service_name}/oilSiteAppInfo/plateNumberRecognition`,
|
||||||
method: 'post' ,
|
method: 'post',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initGeoHash(){
|
initGeoHash() {
|
||||||
return request({
|
return request({
|
||||||
url: `/oil-site/oilSiteInfo/initGeoHash/initGeoHash`,
|
url: `/oil-site/oilSiteInfo/initGeoHash/initGeoHash`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
timeout:50000
|
timeout: 50000
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getScanRes(data) {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/${group_name}/scanCode`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
})
|
})
|
||||||
},
|
|
||||||
getScanRes (data) {
|
|
||||||
return request({
|
|
||||||
url: `/${service_name}/${group_name}/scanCode`,
|
|
||||||
method: 'post',
|
|
||||||
data:data
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 未登录查询油站
|
// 未登录查询油站
|
||||||
readOnlySites(data) {
|
readOnlySites(data) {
|
||||||
console.log(`/${service_name}/${group_name}/findNotLoginSiteInfoByPage`,'****')
|
console.log(`/${service_name}/${group_name}/findNotLoginSiteInfoByPage`, '****')
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/findNotLoginSiteInfoByPage`,
|
url: `/${service_name}/${group_name}/findNotLoginSiteInfoByPage`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSiteList (data) {
|
getSiteList(data) {
|
||||||
// debugger
|
// debugger
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/findSiteInfoByPage`,
|
url: `/${service_name}/${group_name}/findSiteInfoByPage`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSiteDetails (data) {
|
getSiteDetails(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/getSiteDetails`,
|
url: `/${service_name}/${group_name}/getSiteDetails`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCheckInfo (data) {
|
getCheckInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/getCheckInfo`,
|
url: `/${service_name}/${group_name}/getCheckInfo`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getUserAuthInfo (data) {
|
getUserAuthInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/getUserAuthInfo`,
|
url: `/${service_name}/${group_name}/getUserAuthInfo`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 车辆认证
|
// 车辆认证
|
||||||
auth(data) {
|
auth(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/auth`,
|
url: `/${service_name}/${group_name}/auth`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//下单 -- 获取最新油站价格、司机、加油员相关信息
|
//下单 -- 获取最新油站价格、司机、加油员相关信息
|
||||||
getNewSitePrice (channelId) {
|
getNewSitePrice(channelId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${group_name}/getNewSitePrice/${channelId} `,
|
url: `/${service_name}/${group_name}/getNewSitePrice/${channelId} `,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
},// 获取订单核销码
|
}, // 获取订单核销码
|
||||||
getOrderQrCode(id) {
|
getOrderQrCode(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/${order_name}/getOrderQrCode/${id} `,
|
url: `/${service_name}/${order_name}/getOrderQrCode/${id} `,
|
||||||
@@ -101,70 +101,71 @@ export default {
|
|||||||
return request({
|
return request({
|
||||||
url: `/oil-site/oilSiteInfo/wholeStationMap`,
|
url: `/oil-site/oilSiteInfo/wholeStationMap`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data:data
|
data: data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//根据地址获取详细地址信息
|
//根据地址获取详细地址信息
|
||||||
getGeoByAddress(address) {
|
getGeoByAddress(address) {
|
||||||
return request({
|
return request({
|
||||||
url: `/oil-interfaces/gaode/getGeoByAddress`,
|
url: `/oil-interfaces/gaode/getGeoByAddress`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
address
|
address
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取指定经纬度数组范围内的油站
|
// 获取指定经纬度数组范围内的油站
|
||||||
getByPoints(points) {
|
getByPoints(points) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/oilSiteInfo/getByPoints`,
|
url: `/${service_name}/oilSiteInfo/getByPoints`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: points,
|
data: points,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 路径规划
|
// 路径规划
|
||||||
getSiteByGeoHashNew(points) {
|
getSiteByGeoHashNew(points) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/oilSiteInfo/getSiteByGeoHashNewA`,
|
url: `/${service_name}/oilSiteInfo/getSiteByGeoHashNewA`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: points,
|
data: points,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSiteByGeoHash(points) {
|
getSiteByGeoHash(points) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/oilSiteInfo/getSiteByGeoHash`,
|
url: `/${service_name}/oilSiteInfo/getSiteByGeoHash`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: points,
|
data: points,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取菜单
|
// 获取菜单
|
||||||
getConditionMenu() {
|
getConditionMenu() {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/oilSiteInfo/getConditionMenu`,
|
url: `/${service_name}/oilSiteInfo/getConditionMenu`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取附近十条油站
|
//获取附近十条油站
|
||||||
getByNearPoints(lon,lat) {
|
getByNearPoints(lon, lat) {
|
||||||
return request({
|
return request({
|
||||||
url: `/${service_name}/oilSiteInfo/getByNearPoints`,
|
url: `/${service_name}/oilSiteInfo/getByNearPoints`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
lon,
|
lon,
|
||||||
lat
|
lat
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//根据经纬度获取详情坐标
|
//根据经纬度获取详情坐标
|
||||||
getInfoBylAndL(longitude,Latitude) {
|
getInfoBylAndL(longitude, Latitude) {
|
||||||
return request({
|
return request({
|
||||||
url: `/oil-interfaces/gaode/getInfoBylAndL`,
|
url: `/oil-interfaces/gaode/getInfoBylAndL`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
longitude,
|
longitude,
|
||||||
Latitude
|
Latitude
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ export default {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getOrderInfoByOrderSerialNumber(orderSerialNumber) {
|
||||||
|
return request({
|
||||||
|
url: `/oil-finance/oilOrderInfo/getOrderInfoByOrderSerialNumber/${orderSerialNumber}`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user