caolc 3 years ago
parent 88f47d0873
commit d97f8a59e9
  1. 64
      pages/stationDetail/ZYSite.vue
  2. 6
      utils/request.js

@ -105,11 +105,11 @@
name="input" /> --> name="input" /> -->
<view style="flex-grow: 1; display: flex;" @tap="showModel='show'"> <view style="flex-grow: 1; display: flex;" @tap="showModel='show'">
<view v-if="hz(carNumber.charAt(0))" class="sign"> <view v-if="hz( String(carNumber).charAt(0))" class="sign">
<text v-if="carNumber">{{carNumber.charAt(0)||''}}</text> <text v-if="carNumber">{{String(carNumber).charAt(0)||''}}</text>
<uni-icons color="#ffffff" type="forward" size="15"></uni-icons> <uni-icons color="#ffffff" type="forward" size="15"></uni-icons>
</view> </view>
<view class="flexcenter">{{carNumber.substr(1,6)||'请输入车牌号'}}</view> <view class="flexcenter">{{String(carNumber).substr(1,6)||'请输入车牌号'}}</view>
</view> </view>
<!-- <text class="cuIcon-roundclosefill text-gray"></text> --> <!-- <text class="cuIcon-roundclosefill text-gray"></text> -->
@ -1026,8 +1026,62 @@
this.shake=null this.shake=null
return false return false
} }
let location = uni.getStorageSync('location')||{longitude:'',latitude:''};
// if(!location){
// let locationChenk = true
// let that = this
// uni.getLocation({
// type: 'gcj02',
// success: function(res) {
// uni.setStorage({
// key:'location',
// data:res
// })
// },
// fail(e) {
// locationChenk = false
// },
// });
// if(!locationChenk){
// uni.showToast({
// title:'',
// icon:'error'
// })
// }
// console.log(location,'**************************************************')
// return
// }
// uni.getLocation({
// type: 'gcj02',
// success: function(res) {
// uni.setStorage({
// key:'location',
// data:res
// })
// },
// fail(e) {
// uni.showModal({
// title:'',
// content:'?',
// success:function(e){
// wx.openSetting({
// success:function(e){
// if (res.authSetting['scope.userLocation']){
// console.log('******')
// }
// },
// fail:function(e){
// console.log(e,'//////')
// }
// })
// }
// })
// },
// });
// return
//
console.log(data6, 'data6+++++') console.log(data6, 'data6+++++')
oliSiteApi.xoilPay(data6).then(res => { oliSiteApi.xoilPay(Object.assign(data6,{longitude:location.longitude,latitude:location.latitude})).then(res => {
console.log(res) console.log(res)
if (res.code === 20000) { if (res.code === 20000) {
uni.showToast({ uni.showToast({
@ -1205,7 +1259,7 @@
oilsStationId: uni.getStorageSync('oilSiteId') //String id oilsStationId: uni.getStorageSync('oilSiteId') //String id
} }
// } // }
console.log(obj) console.log(obj,'**************');
oliSiteApi.verifyQrCode(obj).then(res => { oliSiteApi.verifyQrCode(obj).then(res => {
if (res.code === 20000) { if (res.code === 20000) {
this.siteData = res.data this.siteData = res.data

@ -1,15 +1,15 @@
import axios from 'axios' import axios from 'axios'
import utils from '@/utils/encode' import utils from '@/utils/encode'
// const env = 'production' /* */ const env = 'production' /* */
const env = 'test'// 仅用于测试、 // const env = 'test'// 仅用于测试、
// const env = 'production' // const env = 'production'
//42 洛超 /29 孙志华 /40 阿浩 //42 洛超 /29 孙志华 /40 阿浩
// 测试日日顺时需要连阿浩 // 测试日日顺时需要连阿浩
const testUrl = 'http://192.168.0.31:38080' const testUrl = 'http://192.168.0.31:38080'
// const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old // const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
// const productionUrl = 'http://121.196.213.68/adminapi' //预生产 // const productionUrl = 'http://121.196.213.68/adminapi' //预生产
// const env = process.env.NODE_ENV // 环境 // const env = process.env.NODE_ENV // 环境
const service = axios.create({ const service = axios.create({

Loading…
Cancel
Save