Compare commits
1 Commits
zyj
...
xiaozy_星油统
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a2a1d79c9 |
@@ -450,6 +450,7 @@
|
||||
this.changeChannel.username = this.loginUser.userPhone
|
||||
uni.setStorageSync('channelId', items.channelId)
|
||||
oilIdentityApi.changeChannelLogin(this.changeChannel).then((res) => {
|
||||
|
||||
if (res.code == 20000) {
|
||||
uni.setStorageSync('siteOli', items.otherSiteName)
|
||||
this.accountName = items.otherSiteName
|
||||
@@ -462,7 +463,9 @@
|
||||
uni.setStorageSync('loginUser', {
|
||||
id: res.data.authTokenDTO.loginUser.id,
|
||||
name: res.data.authTokenDTO.loginUser.name,
|
||||
userPhone: res.data.authTokenDTO.loginUser.userPhone
|
||||
userPhone: res.data.authTokenDTO.loginUser.userPhone,
|
||||
channelCode: items.channelCode,
|
||||
secondChannelCode: items.secondChannelCode
|
||||
})
|
||||
this.getSiteInfo(res.data.authTokenDTO.loginUser.channelId)
|
||||
this.getUserInfo(id)
|
||||
|
||||
@@ -199,9 +199,9 @@
|
||||
unionId: uni.getStorageSync('unionid'),
|
||||
openId: uni.getStorageSync('openid')
|
||||
}
|
||||
console.log(data, '这里是自动登录data')
|
||||
// console.log(data, '这里是自动登录data')
|
||||
oilIdentityApi.loginPersonal(data).then(res => { //微信自动登录
|
||||
console.log(res, '这里是自动登录res')
|
||||
// console.log(res, '这里是自动登录res')
|
||||
if (res.data.authTokenDTO.loginFlag == true) {
|
||||
this.setStored(res)
|
||||
}
|
||||
@@ -227,21 +227,21 @@
|
||||
key: 'Authorization',
|
||||
data: res.data.authTokenDTO.accessToken,
|
||||
success: () => {
|
||||
console.log('Authorization成功', res.data.authTokenDTO.accessToken)
|
||||
// console.log('Authorization成功', res.data.authTokenDTO.accessToken)
|
||||
}
|
||||
})
|
||||
uni.setStorage({
|
||||
key: 'device',
|
||||
data: openId,
|
||||
success: () => {
|
||||
console.log('deviceopenid', openId)
|
||||
// console.log('deviceopenid', openId)
|
||||
}
|
||||
})
|
||||
uni.setStorage({
|
||||
key: 'unionId',
|
||||
data: unionId,
|
||||
success: () => {
|
||||
console.log('deviceunionId', unionId)
|
||||
// console.log('deviceunionId', unionId)
|
||||
}
|
||||
})
|
||||
uni.setStorageSync('userMenu', res.data.authTokenDTO.loginUser.roleMenus) //获取权限菜单列表
|
||||
@@ -251,9 +251,9 @@
|
||||
userPhone: res.data.authTokenDTO.loginUser.userPhone
|
||||
})
|
||||
//根据获取手机号 获取其号下的油站信息
|
||||
console.log('这里是获取手机号登录')
|
||||
// console.log('这里是获取手机号登录')
|
||||
oliUserApi.getByPhone(phone).then((res) => {
|
||||
console.log('这里是获取手机号登录', res)
|
||||
// console.log('这里是获取手机号登录', res)
|
||||
if (res.code == 20000) {
|
||||
uni.setStorageSync('oliList', res.data) //本地存储当前用户其下有多少油站,用于用户登录进入时选择进入油站
|
||||
// 获取信息存储本地
|
||||
@@ -266,7 +266,7 @@
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
// console.log(err)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -342,8 +342,8 @@
|
||||
getUserInfo({
|
||||
detail
|
||||
}) {
|
||||
console.log('三方登录只演示登录api能力,暂未关联云端数据');
|
||||
console.log('detail', detail)
|
||||
// console.log('三方登录只演示登录api能力,暂未关联云端数据');
|
||||
// console.log('detail', detail)
|
||||
if (detail.userInfo) {
|
||||
this.loginLocal(detail.userInfo.nickName);
|
||||
} else {
|
||||
@@ -369,10 +369,10 @@
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
success: () => {
|
||||
console.log('success')
|
||||
// console.log('success')
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
// console.log(err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -210,16 +210,6 @@
|
||||
}
|
||||
},
|
||||
checkOli(n) {
|
||||
|
||||
if (!this.checked) {
|
||||
this.$refs.popup.open('center')
|
||||
return
|
||||
}
|
||||
this.checkType = n
|
||||
if (n == 0) {
|
||||
this.loginRandom()
|
||||
//console.log('这里是验证码登录')
|
||||
} else {
|
||||
if (!this.auth.phone) {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
@@ -227,6 +217,15 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.checkType = n
|
||||
if (n == 0) {
|
||||
if (!this.checked) {
|
||||
this.$refs.popup.open('center')
|
||||
return
|
||||
}
|
||||
this.loginRandom()
|
||||
} else {
|
||||
if (!this.auth.password) {
|
||||
uni.showToast({
|
||||
title: '请输入密码',
|
||||
@@ -234,6 +233,10 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.checked) {
|
||||
this.$refs.popup.open('center')
|
||||
return
|
||||
}
|
||||
this.loginPwd()
|
||||
}
|
||||
},
|
||||
|
||||
@@ -105,12 +105,22 @@
|
||||
scanType: 'qrCode',
|
||||
onlyFromCamera: false,
|
||||
success: (resResult) => {
|
||||
console.log('%c 扫码结果↓','color:red;font-size:30px')
|
||||
console.log(resResult)
|
||||
// innerAudioContext.play()
|
||||
console.log('play滴~')
|
||||
let res = resResult.result
|
||||
console.log(res)
|
||||
let loginUser = uni.getStorageSync('loginUser')
|
||||
if (res.substring(0, 6) == 'XOILUC' && (loginUser.channelCode !== 'XOIL' || loginUser
|
||||
.secondChannelCode)) {
|
||||
uni.showModal({
|
||||
content: '该油站不支持付款码支付',
|
||||
showCancel:false,
|
||||
complete:res => {
|
||||
if(res.confirm) {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
uni.setStorageSync('qrCode', res)
|
||||
this.once = true
|
||||
let url = ''
|
||||
@@ -119,19 +129,21 @@
|
||||
// 老星油 XM , HT G7 , 则一 ZEYI , 新星油 XOIL new则一 XINGYOU
|
||||
if (res.indexOf('fykc') != -1) {
|
||||
url = '/pages/stationDetail/ZYSite?type=fykc'
|
||||
console.log('这里是测试福佑' ,res.substring(0,7))
|
||||
// console.log('这里是测试福佑', res.substring(0, 7))
|
||||
} else if (tag == "SP") {
|
||||
url = '/pages/stationDetail/ZYSite?type=G7'
|
||||
} else if (tag == "XM" || tag == "HT" || tag == "G7") {
|
||||
url = '/pages/stationDetail/stationDetail?type=G7'
|
||||
} else if (res.indexOf('ZEYI') != -1) {
|
||||
console.log('这里是测试则一sss' ,res.substring(0,7))
|
||||
// console.log('这里是测试则一sss', res.substring(0, 7))
|
||||
url = '/pages/stationDetail/ZYSite?type=ZEYI'
|
||||
} else if (res.substring(0, 4) == 'XING' || res.substring(0, 4) == 'XOIL' ) {
|
||||
console.log('这里是测试XING' ,res.substring(0,7))
|
||||
} else if (res.substring(0, 4) == 'XING' || res.substring(0, 4) == 'XOIL' || res.substring(
|
||||
0, 6) == 'XOILUC') {
|
||||
|
||||
// console.log('这里是测试XING', res.substring(0, 7))
|
||||
url = '/pages/stationDetail/ZYSite?type=xoli'
|
||||
} else if (res.substring(0, 8) == 'SHUNFENG') {
|
||||
console.log('这里是顺丰')
|
||||
// console.log('这里是顺丰')
|
||||
url = '/pages/stationDetail/ZYSite?type=shunfeng'
|
||||
} else if (res.substring(0, 4) == 'RIRI') {
|
||||
url = '/pages/stationDetail/ZYSite?type=RIRISHUN'
|
||||
@@ -143,21 +155,15 @@
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
})
|
||||
uni.navigateBack({})
|
||||
}, 800)
|
||||
return false;
|
||||
}
|
||||
console.log(tag)
|
||||
// return
|
||||
// console.log(tag)
|
||||
uni.redirectTo({
|
||||
// url: `/pages/stationDetail/stationDetail`,
|
||||
url: url,
|
||||
fail: (err) => {
|
||||
// console.log(err)
|
||||
},
|
||||
success: (res) => {
|
||||
// console.log('chengg', res)
|
||||
}
|
||||
url: url
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
<!-- 顶部填充区域 -->
|
||||
<view class="fill"></view>
|
||||
<!-- 油站位置卡片 -->
|
||||
<view style="margin-top: 10rpx;" class=" serviceStation my-cell margin-left margin-right padding-top padding-bottom radius shadow ">
|
||||
<view style="margin-top: 10rpx;"
|
||||
class=" serviceStation my-cell margin-left margin-right padding-top padding-bottom radius shadow ">
|
||||
<view style="padding-bottom: 25rpx;" class="strong padding-bottom-xs">{{siteData.siteName}}</view>
|
||||
<view class=" textEllipsis font-12 color-999">
|
||||
<uni-icons color="#666666" type="location-filled" size="15"></uni-icons>
|
||||
@@ -53,12 +54,16 @@
|
||||
<view class="newdirvercard">
|
||||
<view class="newdirvercard_left">
|
||||
<view style="flex-shrink: 1;">
|
||||
<view style="height: 119rpx; width: 119rpx;overflow: hidden;" v-if="siteData.headUrl" class="cu-avatar round lg" :style="'background-image:url('+siteData.headUrl+');'"></view>
|
||||
<view style="height: 119rpx; width: 119rpx;overflow: hidden;" v-else class="cu-avatar round lg">星</view>
|
||||
<view style="height: 119rpx; width: 119rpx;overflow: hidden;" v-if="siteData.headUrl"
|
||||
class="cu-avatar round lg" :style="'background-image:url('+siteData.headUrl+');'"></view>
|
||||
<view style="height: 119rpx; width: 119rpx;overflow: hidden;" v-else class="cu-avatar round lg">
|
||||
星</view>
|
||||
</view>
|
||||
<view class="newdirvercard_name ">
|
||||
<view class="newdirvercard_name_text ">{{ type=='RIRISHUN'? '日日顺司机': type=='shunfeng'?'顺丰司机': siteData.customerName}}</view>
|
||||
<view class="newdirvercard_name_phone ">{{ type=='RIRISHUN'? '保密': type=='shunfeng'?'保密': siteData.customerPhone}}</view>
|
||||
<view class="newdirvercard_name_text ">
|
||||
{{ type=='RIRISHUN'? '日日顺司机': type=='shunfeng'?'顺丰司机': siteData.customerName}}</view>
|
||||
<view class="newdirvercard_name_phone ">
|
||||
{{ type=='RIRISHUN'? '保密': type=='shunfeng'?'保密': siteData.customerPhone}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="newdirvercard_right">
|
||||
@@ -124,11 +129,8 @@
|
||||
<view class="bg-white padding padding-bottom-sm">
|
||||
<!-- 油品类型 v-for siteData.oilSitePriceDetailsVos -->
|
||||
<view style="width: 100%;display: flex;flex-wrap: wrap; margin-bottom: 28rpx;">
|
||||
<view
|
||||
style="margin-right: 15rpx;"
|
||||
v-for="(item,index) in siteData.oilSitePriceDetailsVos"
|
||||
:key="item.priceId"
|
||||
@tap="oilNameSel(item)"
|
||||
<view style="margin-right: 15rpx;" v-for="(item,index) in siteData.oilSitePriceDetailsVos"
|
||||
:key="item.priceId" @tap="oilNameSel(item)"
|
||||
:class="insertResult.oilProductCode===item.oilProductCode?'selecardoil':'cardoil'"
|
||||
class="strong padding-right-xs font-16 cardoil">
|
||||
{{item.oilProductCode}}
|
||||
@@ -147,7 +149,8 @@
|
||||
v-if="(insertResult.sitePrice -1+1)>0">¥{{(insertResult.sitePrice -1+1)|numberFilter}}/{{siteData.siteType|company}}</text>
|
||||
<text class="text-blod oil-main-color" v-else>无价格</text>
|
||||
</text>
|
||||
<text class="s-rich">市场价¥{{insertResult.oilSitePrice|numberFilter}}/{{siteData.siteType|company}}</text>
|
||||
<text
|
||||
class="s-rich">市场价¥{{insertResult.oilSitePrice|numberFilter}}/{{siteData.siteType|company}}</text>
|
||||
</view>
|
||||
|
||||
<view class="padding-top-xs" v-else>
|
||||
@@ -169,7 +172,8 @@
|
||||
<text class="text-blod oil-main-color" v-else>无价格</text>
|
||||
</text>
|
||||
<text style="margin-left: 75rpx; color: #222222;font-weight: bold;">油站价格:¥
|
||||
<text v-if="insertResult.oilSitePrice">{{insertResult.oilSitePrice}}/{{siteData.siteType|company }}</text>
|
||||
<text
|
||||
v-if="insertResult.oilSitePrice">{{insertResult.oilSitePrice}}/{{siteData.siteType|company }}</text>
|
||||
<text class="text-blod oil-main-color" v-else>无价格</text>
|
||||
</text>
|
||||
</view>
|
||||
@@ -190,8 +194,11 @@
|
||||
<view class="padding padding-bottom-0 padding-top-xs bg-white">
|
||||
<view style="color: #333333;font-size: 30rpx;" class="padding-bottom-sm text-lg">枪号选择:</view>
|
||||
<view class="grid col-5 justify-start">
|
||||
<view style="width: calc(100% / 4);" class="padding-xs" v-for="(item,index) in ColorList" :key="index">
|
||||
<button @tap="gunIdSel(index)" :style="{width: '100%',color:insertResult.bar===index+1?'':'#333333'}" class="cu-btn"
|
||||
<view style="width: calc(100% / 4);" class="padding-xs" v-for="(item,index) in ColorList"
|
||||
:key="index">
|
||||
<button @tap="gunIdSel(index)"
|
||||
:style="{width: '100%',color:insertResult.bar===index+1?'':'#333333'}"
|
||||
class="cu-btn"
|
||||
:class="[insertResult.bar===index+1?'bg-main-oil':'line-gray']">{{index+1}}</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -207,13 +214,16 @@
|
||||
</view>
|
||||
<view class="cu-form-group" v-else>
|
||||
<view class="title newtitle"> {{siteData.siteType=='2'?'加气升数':'加油金额'}}</view>
|
||||
<input class="newtitle" :placeholder="`请输入${siteData.siteType=='2'?'加气升数':'加油金额'}`" @input="checkNumber" type="digit" @blur="getMoney"
|
||||
v-model="insertResult.vol" name="input" />
|
||||
<input class="newtitle" :placeholder="`请输入${siteData.siteType=='2'?'加气升数':'加油金额'}`"
|
||||
@input="checkNumber" type="digit" @blur="getMoney" v-model="insertResult.vol"
|
||||
name="input" />
|
||||
<view style="width: 170rpx;text-align: end;" class="textEllipsis">
|
||||
<text class="">
|
||||
<!-- 约 {{ vlom? vlom:'xxx.x' }} L clc 注销 -->
|
||||
<text v-if="siteData.siteType!='2'">{{vlom?'约' + ( (Math.round(vlom*100)/100).toFixed(2) ) + (siteData.siteType=='2'?'元':'L'):''}}</text>
|
||||
<text v-if="siteData.siteType=='2'">{{vlom?'约' + ( insertResult.vDoMoney ? insertResult.vDoMoney+insertResult.discountMoney:'') + (siteData.siteType=='2'?'元':'L'):''}}</text>
|
||||
<text
|
||||
v-if="siteData.siteType!='2'">{{vlom?'约' + ( (Math.round(vlom*100)/100).toFixed(2) ) + (siteData.siteType=='2'?'元':'L'):''}}</text>
|
||||
<text
|
||||
v-if="siteData.siteType=='2'">{{vlom?'约' + ( insertResult.vDoMoney ? insertResult.vDoMoney+insertResult.discountMoney:'') + (siteData.siteType=='2'?'元':'L'):''}}</text>
|
||||
<!-- {{vlom?'约' + ( (Math.round(vlom*100)/100).toFixed(2) ) + 'L':''}} -->
|
||||
</text>
|
||||
</view>
|
||||
@@ -231,7 +241,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button :disabled="shake!==null" class="margin round bg-main-oil" @tap="charge"> {{shake==null?'立即下单':'下单中'}}</button>
|
||||
<button :disabled="shake!==null" class="margin round bg-main-oil" @tap="charge">
|
||||
{{shake==null?'立即下单':'下单中'}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class v-show="!beforePay&&isG7">
|
||||
@@ -378,34 +389,34 @@
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option) //接收option.type
|
||||
// // console.log(option) //接收option.type
|
||||
if (option.user == 'kl') {
|
||||
let code = uni.getStorageSync('qrCode'),
|
||||
orderId = code.slice(0, -3)
|
||||
this.qrCode = orderId
|
||||
this.isOtherUser = true
|
||||
console.log('这里是onload', 'CODE', code, '++++', orderId, '------', 'END')
|
||||
console.log(this.qrCode)
|
||||
// // console.log('这里是onload', 'CODE', code, '++++', orderId, '------', 'END')
|
||||
// // console.log(this.qrCode)
|
||||
}
|
||||
// if(option.type =='RIRISHUN'){
|
||||
// console.log('这里是日日顺')
|
||||
// // console.log('这里是日日顺')
|
||||
this.type = option.type //根据option.type 进行本地赋值
|
||||
// }if(option.type =='zeyi'){
|
||||
// console.log('这里是日日顺')
|
||||
// // console.log('这里是日日顺')
|
||||
// this.type = 'zeyi' //根据option.type 进行本地赋值
|
||||
// }
|
||||
// if(option.type =='shunfeng'){
|
||||
// console.log('这里是顺丰')
|
||||
// // console.log('这里是顺丰')
|
||||
// this.type = 'shunfeng' //根据option.type 进行本地赋值
|
||||
// }
|
||||
// if(option.type =='fykc'){
|
||||
// console.log('这里是福佑')
|
||||
// // console.log('这里是福佑')
|
||||
// this.type = 'fykc' //根据option.type 进行本地赋值
|
||||
// }
|
||||
if (this.qrCode) {
|
||||
if (this.qrCode.substr(0, 2) == 'HT' || this.qrCode.substr(0, 2) == 'G7' || this.type === 'G7') {
|
||||
this.isG7 = true
|
||||
console.log('G7加油站')
|
||||
// // console.log('G7加油站')
|
||||
}
|
||||
}
|
||||
this.verifyQrCode()
|
||||
@@ -419,7 +430,7 @@
|
||||
watch: {
|
||||
oilTypeList: {
|
||||
handler(newVal, oldVal) {
|
||||
console.log('深度监听', newVal, oldVal)
|
||||
// // console.log('深度监听', newVal, oldVal)
|
||||
this.oilTypeList = newVal
|
||||
if (!this.insertResult.oilCode) {
|
||||
this.initForm()
|
||||
@@ -431,11 +442,11 @@
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(newVal, oldVal) {
|
||||
console.log(newVal)
|
||||
console.log(oldVal)
|
||||
// // console.log(newVal)
|
||||
// // console.log(oldVal)
|
||||
this.selected = newVal
|
||||
if (newVal) {
|
||||
console.log('selected发生变化')
|
||||
// // console.log('selected发生变化')
|
||||
// oilSitePrice 市场价格 sitePrice 实际加油价格
|
||||
if (this.selected.oilSitePrice) {
|
||||
this.insertResult.oilSitePrice = this.selected.oilSitePrice
|
||||
@@ -446,8 +457,8 @@
|
||||
this.insertResult.sitePrice = this.selected.sitePrice
|
||||
this.insertResult.oilProductCode = this.selected.oilProductCode
|
||||
if (this.type != undefined) {
|
||||
console.log(this.type)
|
||||
console.log('changeMoney')
|
||||
// // console.log(this.type)
|
||||
// // console.log('changeMoney')
|
||||
this.changeMoney()
|
||||
}
|
||||
|
||||
@@ -468,7 +479,7 @@
|
||||
methods: {
|
||||
hz(e) {
|
||||
// carNumber.length>0
|
||||
// console.log(new RegExp("[\u4E00-\u9FA5]+").test(e),'*-*-*-*-*-*')
|
||||
// // console.log(new RegExp("[\u4E00-\u9FA5]+").test(e),'*-*-*-*-*-*')
|
||||
return new RegExp("[\u4E00-\u9FA5]+").test(e)
|
||||
},
|
||||
checkNumber(e) {
|
||||
@@ -478,18 +489,18 @@
|
||||
})
|
||||
},
|
||||
changeBar(item, i) {
|
||||
console.log(item)
|
||||
// // console.log(item)
|
||||
this.activeSitePrice = item.priceId
|
||||
this.curIndex = i
|
||||
this.selected = {
|
||||
...item
|
||||
}
|
||||
// this.insertResult.sitePrice = this.statOil.sitePrice
|
||||
// console.log(this.statOil)
|
||||
// // console.log(this.statOil)
|
||||
if (this.insertResult.vol) {
|
||||
this.getMoney(this.InputNumber)
|
||||
}
|
||||
// console.log('选择你/n', this.selected, '/n')
|
||||
// // console.log('选择你/n', this.selected, '/n')
|
||||
},
|
||||
isNumber(value) { // 判断是否为正常数字
|
||||
const regPos = /^\d+(\.\d+)?$/; //非负浮点数
|
||||
@@ -504,7 +515,7 @@
|
||||
}
|
||||
},
|
||||
getMoney(e) {
|
||||
console.log(e)
|
||||
// // console.log(e)
|
||||
if (e.detail.value == '') {
|
||||
// uni.showToast({
|
||||
// title: '请输入金额',
|
||||
@@ -524,7 +535,7 @@
|
||||
if (this.siteData.oilCardNature == 1) {
|
||||
var uerTyps = '0' // 0是个人 1是企业
|
||||
} else {
|
||||
console.log('当前为企业')
|
||||
// // console.log('当前为企业')
|
||||
var uerTyps = '1' // 0是个人 1是企业
|
||||
}
|
||||
if (this.type == 'ZEYI' || this.type == 'RIRISHUN') {
|
||||
@@ -576,8 +587,8 @@
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
// sourceType: ['album'], //从相册选择
|
||||
success: function(res) {
|
||||
console.log(res)
|
||||
console.log('进入1')
|
||||
// // console.log(res)
|
||||
// // console.log('进入1')
|
||||
const JSESSIONID = utils.uuid()
|
||||
uni.uploadFile({
|
||||
url: 'https://www.xingoil.com/adminapi/oil-oss/obejct/uploadFile',
|
||||
@@ -598,8 +609,8 @@
|
||||
'token': utils.md5Salt(JSESSIONID)
|
||||
},
|
||||
success(e) {
|
||||
console.log('进入2')
|
||||
console.log(e)
|
||||
// // console.log('进入2')
|
||||
// // console.log(e)
|
||||
let obj = JSON.parse(e.data),
|
||||
url = obj.data.publicUrl
|
||||
if (type == 'car') {
|
||||
@@ -608,17 +619,17 @@
|
||||
plateNumberImage: obj.data.publicUrl
|
||||
}
|
||||
_that.PlateNumberImages = url
|
||||
console.log('这里是司机车牌', url)
|
||||
// // console.log('这里是司机车牌', url)
|
||||
_that.isPlateNumber = false
|
||||
oliSiteApi.plateNumberRecognition(data).then((res) => {
|
||||
let obj = JSON.parse(res.data)
|
||||
console.log(obj.NUMBER)
|
||||
// // console.log(obj.NUMBER)
|
||||
_that.carNumber = obj.NUMBER
|
||||
})
|
||||
} else {
|
||||
_that.refuellerImages = url
|
||||
_that.isUefueller = false
|
||||
console.log('这里是油站图片', _that.refuellerImages, url)
|
||||
// // console.log('这里是油站图片', _that.refuellerImages, url)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -637,10 +648,10 @@
|
||||
clearTimeout(this.shake)
|
||||
this.shake = setTimeout(() => {
|
||||
this.tsetPlate()
|
||||
console.log(this.plateText)
|
||||
console.log(this.plateNo)
|
||||
console.log(this.carNumber)
|
||||
console.log(this.testResult)
|
||||
// // console.log(this.plateText)
|
||||
// // console.log(this.plateNo)
|
||||
// // console.log(this.carNumber)
|
||||
// // console.log(this.testResult)
|
||||
if ((this.insertResult.sitePrice - 1 + 1) > 0) {
|
||||
if (this.type == 'RIRISHUN') { //根据type值判断是否为日日顺
|
||||
this.RrsOrder()
|
||||
@@ -694,7 +705,7 @@
|
||||
version: 1, //类型:Number 必有字段 备注:版本号
|
||||
xoilAmountGun: this.insertResult.vol, //类型:String 必有字段 备注:加油升数
|
||||
}
|
||||
console.log(data6)
|
||||
// console.log(data6)
|
||||
if (!data6.qrCode) {
|
||||
uni.showToast({
|
||||
title: 'qrCode为空',
|
||||
@@ -741,7 +752,7 @@
|
||||
title: '下单成功!'
|
||||
});
|
||||
// uni.setStorageSync('orderInfo',data6)
|
||||
// console.log(res.data.orderId)
|
||||
// // console.log(res.data.orderId)
|
||||
// let orderId = res.data.orderId
|
||||
// this.checkSf(res.data.orderId)
|
||||
// this.gotoOrderStatus(res.data)
|
||||
@@ -778,7 +789,7 @@
|
||||
version: 1, //类型:Number 必有字段 备注:版本号
|
||||
xoilAmountGun: this.insertResult.vol, //类型:String 必有字段 备注:加油升数
|
||||
}
|
||||
console.log(data6)
|
||||
// console.log(data6)
|
||||
if (!data6.qrCode) {
|
||||
uni.showToast({
|
||||
title: 'qrCode为空',
|
||||
@@ -825,7 +836,7 @@
|
||||
title: '下单成功!'
|
||||
});
|
||||
uni.setStorageSync('orderInfo', data6)
|
||||
console.log(res.data.orderId)
|
||||
// // console.log(res.data.orderId)
|
||||
let orderId = res.data.orderId
|
||||
// this.checkSf(res.data.orderId)
|
||||
this.gotoOrderStatus(res.data)
|
||||
@@ -869,8 +880,8 @@
|
||||
gun_number: this.insertResult.bar, //类型:String 必有字段 备注:加油升数
|
||||
deduction_mode: 1,
|
||||
}
|
||||
console.log("加油信息===================",this.insertResult)
|
||||
console.log(g7OrderInfo)
|
||||
// console.log("加油信息===================",this.insertResult)
|
||||
// console.log(g7OrderInfo)
|
||||
if (!g7OrderInfo.qr_code) {
|
||||
uni.showToast({
|
||||
title: 'qr_code为空',
|
||||
@@ -917,7 +928,7 @@
|
||||
title: '下单成功!'
|
||||
});
|
||||
uni.setStorageSync('orderSource', 'mpxoil')
|
||||
console.log("是否是g7================",this.isG7)
|
||||
// console.log("是否是g7================",this.isG7)
|
||||
if (!this.isG7) {
|
||||
setTimeout(() => {
|
||||
this.toDetails(res.data.orderId)
|
||||
@@ -926,9 +937,9 @@
|
||||
this.beforePay = false
|
||||
setTimeout(() => {
|
||||
this.orderId = res.data.orderId
|
||||
console.log("queryTimer",this.orderId)
|
||||
// console.log("queryTimer",this.orderId)
|
||||
this.queryTimer()
|
||||
console.log("getPayStatus",this.orderId)
|
||||
// console.log("getPayStatus",this.orderId)
|
||||
this.getPayStatus(this.orderId)
|
||||
}, 400)
|
||||
}
|
||||
@@ -1115,7 +1126,10 @@
|
||||
this.shake = null
|
||||
return false
|
||||
}
|
||||
let location = uni.getStorageSync('location')||{longitude:'',latitude:''};
|
||||
let location = uni.getStorageSync('location') || {
|
||||
longitude: '',
|
||||
latitude: ''
|
||||
};
|
||||
// if(!location){
|
||||
// let locationChenk = true
|
||||
// let that = this
|
||||
@@ -1137,7 +1151,7 @@
|
||||
// icon:'error'
|
||||
// })
|
||||
// }
|
||||
// console.log(location,'**************************************************')
|
||||
// // console.log(location,'**************************************************')
|
||||
// return
|
||||
// }
|
||||
// uni.getLocation({
|
||||
@@ -1156,11 +1170,11 @@
|
||||
// wx.openSetting({
|
||||
// success:function(e){
|
||||
// if (res.authSetting['scope.userLocation']){
|
||||
// console.log('******')
|
||||
// // console.log('******')
|
||||
// }
|
||||
// },
|
||||
// fail:function(e){
|
||||
// console.log(e,'//////')
|
||||
// // console.log(e,'//////')
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
@@ -1169,9 +1183,12 @@
|
||||
// });
|
||||
// return
|
||||
//
|
||||
console.log(data6, 'data6+++++')
|
||||
oliSiteApi.xoilPay(Object.assign(data6,{longitude:location.longitude,latitude:location.latitude})).then(res => {
|
||||
console.log(res)
|
||||
// console.log(data6, 'data6+++++')
|
||||
oliSiteApi.xoilPay(Object.assign(data6, {
|
||||
longitude: location.longitude,
|
||||
latitude: location.latitude
|
||||
})).then(res => {
|
||||
// console.log(res)
|
||||
if (res.code === 20000) {
|
||||
uni.showToast({
|
||||
title: '下单成功!'
|
||||
@@ -1294,7 +1311,7 @@
|
||||
},
|
||||
getPayStatus(id) {
|
||||
// 获取订单支付状态
|
||||
console.log('获取支付状态', id)
|
||||
// console.log('获取支付状态', id)
|
||||
g7Api.getPayStatus(id).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.payState = res.data.payState
|
||||
@@ -1316,7 +1333,7 @@
|
||||
|
||||
toDetails(id) {
|
||||
uni.setStorageSync('orderId', id)
|
||||
console.log('id', id)
|
||||
// console.log('id', id)
|
||||
uni.redirectTo({
|
||||
url: '/packageOrders/pages/orderList/OrderDetail/OrderDetail'
|
||||
})
|
||||
@@ -1326,22 +1343,22 @@
|
||||
this.insertResult.bar = index + 1
|
||||
},
|
||||
oilNameSel(item) {
|
||||
console.log(item, 'item')
|
||||
// console.log(item, 'item')
|
||||
this.selected = {
|
||||
...item
|
||||
}
|
||||
this.activeSitePrice = item.priceId
|
||||
console.log('选择你/n', this.selected, '/n')
|
||||
// console.log('选择你/n', this.selected, '/n')
|
||||
},
|
||||
initForm() {
|
||||
if (!this.insertResult.realPrice) {
|
||||
this.selected = this.siteData.oilSitePriceDetailsVos[0]
|
||||
}
|
||||
this.insertResult.bar = 1
|
||||
console.log(this.selected)
|
||||
// console.log(this.selected)
|
||||
},
|
||||
verifyQrCode() {
|
||||
console.log(this.zyInfo)
|
||||
// console.log(this.zyInfo)
|
||||
// if(this.zyInfo.oilsStationId !=undefined){
|
||||
// let obj={
|
||||
// qrCode: this.zyInfo.qrCode, //类型:String 必有字段 备注:二维码字符串
|
||||
@@ -1353,7 +1370,7 @@
|
||||
oilsStationId: uni.getStorageSync('oilSiteId') //类型:String 必有字段 备注:加油站id
|
||||
}
|
||||
// }
|
||||
console.log(obj,'**************');
|
||||
// console.log(obj,'**************');
|
||||
oliSiteApi.verifyQrCode(obj).then(res => {
|
||||
if (res.code === 20000) {
|
||||
this.siteData = res.data
|
||||
@@ -1379,7 +1396,7 @@
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
// uni.navigateBack()
|
||||
}, 800)
|
||||
}
|
||||
})
|
||||
@@ -1392,8 +1409,8 @@
|
||||
// this.insertResult.discountMoney = this.insertResult.vol * (this.selected.oilSitePrice - this.insertResult
|
||||
// .sitePrice)
|
||||
// this.insertResult.vDoMoney = this.insertResult.vol * this.selected.sitePrice
|
||||
console.log('%c look me ↓','font-size:50px;color:green')
|
||||
console.log(this.insertResult.vMoney,this.insertResult,this.selected)
|
||||
// console.log('%c look me ↓','font-size:50px;color:green')
|
||||
// console.log(this.insertResult.vMoney,this.insertResult,this.selected)
|
||||
if (this.insertResult.vol !== '') {
|
||||
this.getMoney({
|
||||
detail: {
|
||||
@@ -1403,7 +1420,7 @@
|
||||
}
|
||||
},
|
||||
calcMoney(e) {
|
||||
// console.log(e)
|
||||
// // console.log(e)
|
||||
if (this.changTypes = 1) {
|
||||
let rrs = e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]; // 处理输入油升数 只保留小数点后两位
|
||||
this.$nextTick(() => { //重新赋值给input
|
||||
@@ -1419,7 +1436,7 @@
|
||||
queryTimer() {
|
||||
var count = 5
|
||||
this.timer = setInterval(() => {
|
||||
console.log('查询次', count)
|
||||
// console.log('查询次', count)
|
||||
count--
|
||||
this.getPayStatus(this.orderId)
|
||||
}, 5000);
|
||||
@@ -1501,7 +1518,7 @@
|
||||
}
|
||||
},
|
||||
moneyVolm(value) {
|
||||
console.log(value, '++awdad+++++++-')
|
||||
// console.log(value, '++awdad+++++++-')
|
||||
if (value != 'xxx.x') {
|
||||
return Math.round(value * 100) / 100;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user