5 Commits

Author SHA1 Message Date
caolc
8ecd248e26 1 2023-08-30 10:09:29 +08:00
caolc
05622744a9 1 2023-08-30 10:07:17 +08:00
骆超
c995d7d373 g7加油逻辑 2023-04-07 16:45:31 +08:00
骆超
4b1602af42 g7加油逻辑 2023-04-06 15:07:13 +08:00
骆超
1ac4d50569 g7加油逻辑 2023-04-03 16:28:17 +08:00
8 changed files with 107 additions and 114 deletions

View File

@@ -75,7 +75,7 @@
// });
},
onHide: function() {
console.log('App Hide')
console.log('App Hide ')
}
}
</script>

View File

@@ -1,11 +1,11 @@
import request from '@/utils/request'
const service_name = "cloud-site-service"
const group_name = "tbOilOrder"
const service_name = "oil-site"
const group_name = "g7"
export default {
// G7订单支付状态
getPayStatus(id) {
return request({
url: `/${service_name}/${group_name}/get/${id} `,
url: `/${service_name}/${group_name}/getOrderStatus/${id} `,
method: 'get',
})
}

View File

@@ -52,6 +52,14 @@ export default{
data: data
})
},
// G7下单接口
G7Pay(data) {
return request({
url: `/${service_name}/g7/qrCodePay`,
method: 'post',
data: data
})
},
// 则一下单接口
zeyiPay(data) {
return request({

View File

@@ -1,6 +1,6 @@
{
"name" : "星油云站",
"appid" : "__UNI__EA8D131",
"appid" : "__UNI__F1ED4B9",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",

103
package-lock.json generated
View File

@@ -1,109 +1,8 @@
{
"name": "lsm_oil_site",
"version": "1.0.0",
"lockfileVersion": 2,
"lockfileVersion": 1,
"requires": true,
"packages": {
"": {
"name": "lsm_oil_site",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"axios": "^0.19.2",
"crypto-js": "4.0.0",
"js-cookie": "2.2.1",
"js-md5": "0.7.3",
"jsencrypt": "^3.0.0-rc.1",
"tki-qrcode": "^0.1.6",
"tsc": "^2.0.3",
"typescript": "^4.3.5",
"uview-ui": "^1.8.4"
}
},
"node_modules/axios": {
"version": "0.19.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
"deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410",
"dependencies": {
"follow-redirects": "1.5.10"
}
},
"node_modules/crypto-js": {
"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",
"integrity": "sha1-KQSrJnep0EKFai6i74DekuSjbcw="
},
"node_modules/debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"dependencies": {
"debug": "=3.1.0"
},
"engines": {
"node": ">=4.0"
}
},
"node_modules/js-cookie": {
"version": "2.2.1",
"resolved": "https://registry.npm.taobao.org/js-cookie/download/js-cookie-2.2.1.tgz",
"integrity": "sha1-aeEG3F1YBolFYpAqpbrsN0Tpsrg="
},
"node_modules/js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npm.taobao.org/js-md5/download/js-md5-0.7.3.tgz",
"integrity": "sha1-tPL7sLMnRV9ZjWcn447Ccs0Jw/I="
},
"node_modules/jsencrypt": {
"version": "3.0.0-rc.1",
"resolved": "https://registry.npm.taobao.org/jsencrypt/download/jsencrypt-3.0.0-rc.1.tgz",
"integrity": "sha1-DgpHRLpDzFV/tc9i/oZGvOtWGxw="
},
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node_modules/tki-qrcode": {
"version": "0.1.6",
"resolved": "https://registry.npm.taobao.org/tki-qrcode/download/tki-qrcode-0.1.6.tgz",
"integrity": "sha1-cTc9nEs/iUT6pU0+6Ziroz2X3n8="
},
"node_modules/tsc": {
"version": "2.0.3",
"resolved": "https://registry.nlark.com/tsc/download/tsc-2.0.3.tgz",
"integrity": "sha1-A3/leeO9Z6XL2qYEtDxsGZGwS+8=",
"bin": {
"tsc": "bin/tsc"
}
},
"node_modules/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=",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/uview-ui": {
"version": "1.8.4",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
"integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
}
},
"dependencies": {
"axios": {
"version": "0.19.2",

View File

@@ -120,7 +120,9 @@
if (res.indexOf('fykc') != -1 ){
url = '/pages/stationDetail/ZYSite?type=fykc'
console.log('这里是测试福佑' ,res.substring(0,7))
}else if (tag == "XM" || tag == "HT" || tag == "G7") {
}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))

View File

@@ -403,7 +403,7 @@
// this.type = 'fykc' //根据option.type 进行本地赋值
// }
if (this.qrCode) {
if (this.qrCode.substr(0, 2) == 'HT' || this.qrCode.substr(0, 2) == 'G7') {
if (this.qrCode.substr(0, 2) == 'HT' || this.qrCode.substr(0, 2) == 'G7'|| this.type === 'G7') {
this.isG7 = true
console.log('G7加油站')
}
@@ -650,6 +650,10 @@
this.SfOrder()
return
}
if (this.type === 'G7') {
this.G7Order()
return
}
if (this.type == 'fykc') {
this.FyOrder()
return
@@ -851,6 +855,87 @@
url: '/pages/stationDetail/OrderStatus?item=' + item
})
},
// g7
G7Order() {
const g7OrderInfo = {
qr_code: uni.getStorageSync('qrCode'), //类型String 必有字段 二维码 qrcode
station_id: this.siteData.siteId, //类型String 必有字段 油站id siteId
oilPriceId: this.insertResult.priceId, //类型String 必有字段 油价id priceId
driver_phone: this.siteData.customerPhone, //类型String 必有字段 油价id priceId
companyId: this.siteData.companyId, //类型String 必有字段 企业id companyId
customerId: this.siteData.customerId, //类型String 必有字段 司机id customerId
truck_no: this.carNumber,
gun_money: this.insertResult.vol, //类型String 必有字段 备注:加油升数
gun_number: this.insertResult.bar, //类型String 必有字段 备注:加油升数
deduction_mode: 1,
}
console.log("加油信息===================",this.insertResult)
console.log(g7OrderInfo)
if (!g7OrderInfo.qr_code) {
uni.showToast({
title: 'qr_code为空',
icon: 'none'
});
this.shake=null
return false
}
if (!g7OrderInfo.station_id) {
uni.showToast({
title: '请选择油站id',
icon: 'none'
});
this.shake=null
return false
}
if (!g7OrderInfo.companyId) {
uni.showToast({
title: '请选择企业id',
icon: 'none'
});
this.shake=null
return false
}
if (!g7OrderInfo.customerId) {
uni.showToast({
title: '请选择司机id',
icon: 'none'
});
this.shake=null
return false
}
if (!g7OrderInfo.gun_money) {
uni.showToast({
title: '请输入加油金额',
icon: 'none'
});
this.shake=null
return false
}
oliSiteApi.G7Pay(g7OrderInfo).then(res => {
if (res.code === 20000) {
uni.showToast({
title: '下单成功!'
});
uni.setStorageSync('orderSource', 'mpxoil')
console.log("是否是g7================",this.isG7)
if (!this.isG7) {
setTimeout(() => {
this.toDetails(res.data.orderId)
}, 400)
} else {
this.beforePay = false
setTimeout(() => {
this.orderId = res.data.orderId
console.log("queryTimer",this.orderId)
this.queryTimer()
console.log("getPayStatus",this.orderId)
this.getPayStatus(this.orderId)
}, 400)
}
this.shake=null
}
})
},
//日日顺
RrsOrder() {
const data6 = {
@@ -970,8 +1055,6 @@
companyId: this.siteData.companyId, //类型String 必有字段 备注企业id
oilsBar: this.insertResult.bar,
oilsCode: this.insertResult.oilProductCode,
version: 1,
xoilAmountGun: this.insertResult.vol,
orderMethod: "SITE_SCAN", //类型String 必有字段 备注:订单产生方式
suppleMark: 0,
orderType: "REAL_ORDER", //类型String 必有字段 备注:订单类型 ( REAL_ORDER真实订单 VIRTUAL_ORDER虚拟订单)
@@ -1225,11 +1308,12 @@
}
if (res.data.payState == 1) {
clearInterval(this.timer)
this.toDetails(res.data.payOrderId)
this.toDetails(id)
}
}
})
},
toDetails(id) {
uni.setStorageSync('orderId', id)
console.log('id', id)

View File

@@ -2,12 +2,12 @@ import axios from 'axios'
import utils from '@/utils/encode'
// const env = 'test' /* */
// const env = 'test'// 仅用于测试、
// const env = 'test'// 仅用于测试、
const env = 'production'
//42 洛超 /29 孙志华 /40 阿浩
// 测试日日顺时需要连阿浩
const testUrl = 'http://192.168.54:38080'
const testUrl = 'http://192.168.0.26:38080'
// const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new