Merge branch 'master' of http://121.196.213.68:3000/caoliancun/MP-XiaoXing into lixuan
This commit is contained in:
6
App.vue
6
App.vue
@@ -75,6 +75,7 @@
|
|||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
wx.onAppRoute(() => {
|
wx.onAppRoute(() => {
|
||||||
|
let white = ['BagStation/pages/stationDetail/stationDetail']
|
||||||
// console.log('当前页面路由发生变化 触发该事件onShareAppMessage')
|
// console.log('当前页面路由发生变化 触发该事件onShareAppMessage')
|
||||||
const pages = getCurrentPages() //获取加载的页面
|
const pages = getCurrentPages() //获取加载的页面
|
||||||
const view = pages[pages.length - 1] //获取当前页面的对象
|
const view = pages[pages.length - 1] //获取当前页面的对象
|
||||||
@@ -94,11 +95,14 @@
|
|||||||
console.log(view.route)
|
console.log(view.route)
|
||||||
clearTimeout(loginTimer)
|
clearTimeout(loginTimer)
|
||||||
clearTimeout(onlineTimer)
|
clearTimeout(onlineTimer)
|
||||||
|
|
||||||
if (view.route != 'pages/index/startPage/startPage' && view.route.indexOf('BagAuth') == -1) {
|
if (view.route != 'pages/index/startPage/startPage' && view.route.indexOf('BagAuth') == -1) {
|
||||||
const token = uni.getStorageSync('Authorization')
|
const token = uni.getStorageSync('Authorization')
|
||||||
const openid = uni.getStorageSync('openid')
|
const openid = uni.getStorageSync('openid')
|
||||||
if (token && openid) {
|
if (token && openid) {
|
||||||
this.getAmount()
|
if(!white.includes(view.route)){
|
||||||
|
this.getAmount()
|
||||||
|
}
|
||||||
onlineTimer = setTimeout(() => {
|
onlineTimer = setTimeout(() => {
|
||||||
if (this.loginStatus == 'offline') {
|
if (this.loginStatus == 'offline') {
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<view class="cu-list menu text-left">
|
<view class="cu-list menu text-left">
|
||||||
<view class="cu-item" v-for="(itemx,index) in oilSitePriceDetailsVo" :key="index" v-if="itemx.sitePrice>0">
|
<view class="cu-item" v-for="(itemx,index) in oilSitePriceDetailsVo" :key="index" v-if="itemx.sitePrice>0">
|
||||||
<label class="flex justify-between align-center flex-sub">
|
<label class="flex justify-between align-center flex-sub">
|
||||||
<radio class="round red" :class="radio=='radio' + index?'checked':''" :checked="radio==index?true:false" :value="index"></radio>
|
<radio class="round red" :class="radio=='radio' + index?'checked':''" :checked= " radio ==index?true : false" :value="index"></radio>
|
||||||
<text class="cu-tag my-tag line-red text-lg">
|
<text class="cu-tag my-tag line-red text-lg">
|
||||||
惠
|
惠
|
||||||
</text>
|
</text>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
<!-- 非团油加油输入框 -->
|
<!-- 非团油加油输入框 -->
|
||||||
<view class="margin solid radius" v-if="activeChannelCode!='TY'">
|
<view class="margin solid radius" v-if="activeChannelCode!='TY'&&radio!==null">
|
||||||
<view class=" menu cu-list ">
|
<view class=" menu cu-list ">
|
||||||
<view class="cu-item nowrap">
|
<view class="cu-item nowrap">
|
||||||
<view class="text-bold ">
|
<view class="text-bold ">
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 团油金额输入框 -->
|
<!-- 团油金额输入框 -->
|
||||||
<view class="margin solid radius" v-if="activeChannelCode=='TY'">
|
<view class="margin solid radius" v-if="activeChannelCode=='TY' && radio!==null">
|
||||||
<view class=" menu cu-list ">
|
<view class=" menu cu-list ">
|
||||||
<view class="cu-item nowrap">
|
<view class="cu-item nowrap">
|
||||||
<view class="text-bold ">
|
<view class="text-bold ">
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bg-white padding">
|
<view v-if="radio!==null" class="bg-white padding">
|
||||||
<view class="">
|
<view class="">
|
||||||
<text class="text-bold">优惠</text>
|
<text class="text-bold">优惠</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
优惠券 <text class="fr">{{'----'}}</text>
|
优惠券 <text class="fr">{{'----'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="placeholder-hidden">
|
<view class="placeholder-hidden">
|
||||||
<view class="margin cu-list pay-bar menu radius solid-top solid-bottom solid-left">
|
<view class="margin cu-list pay-bar menu radius solid-top solid-bottom solid-left">
|
||||||
<view class="cu-item ">
|
<view class="cu-item ">
|
||||||
<view class="">
|
<view class="">
|
||||||
@@ -355,7 +355,6 @@
|
|||||||
oilBarTy: '',
|
oilBarTy: '',
|
||||||
ty: {
|
ty: {
|
||||||
realMoney: ""
|
realMoney: ""
|
||||||
|
|
||||||
},
|
},
|
||||||
tyRes: {
|
tyRes: {
|
||||||
liter: '',
|
liter: '',
|
||||||
@@ -377,7 +376,7 @@
|
|||||||
plateNumbers: [],
|
plateNumbers: [],
|
||||||
showPlate: "",
|
showPlate: "",
|
||||||
showOrder: '',
|
showOrder: '',
|
||||||
radio: '',
|
radio: null,
|
||||||
imgURL: this.global.imgURL,
|
imgURL: this.global.imgURL,
|
||||||
scrollLeft: 0,
|
scrollLeft: 0,
|
||||||
checkVol: [{
|
checkVol: [{
|
||||||
@@ -407,7 +406,6 @@
|
|||||||
hot: false,
|
hot: false,
|
||||||
}],
|
}],
|
||||||
plateNumber: '',
|
plateNumber: '',
|
||||||
|
|
||||||
checkMoney:[{
|
checkMoney:[{
|
||||||
value: 100,
|
value: 100,
|
||||||
name: '100 ',
|
name: '100 ',
|
||||||
@@ -503,6 +501,15 @@
|
|||||||
}, 2)
|
}, 2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
radio:{
|
||||||
|
handler(n,o) {
|
||||||
|
console.log(n,o,'handler');
|
||||||
|
this.checkBar.forEach(item=>{
|
||||||
|
item.checked = false
|
||||||
|
});
|
||||||
|
this.oilBar = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
priceId() {
|
priceId() {
|
||||||
@@ -639,6 +646,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkInfo(){
|
checkInfo(){
|
||||||
|
console.log(this.radio)
|
||||||
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
|
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
|
||||||
if (!this.testPlateResult) {
|
if (!this.testPlateResult) {
|
||||||
this.plateNumber=''
|
this.plateNumber=''
|
||||||
@@ -648,10 +656,10 @@
|
|||||||
})
|
})
|
||||||
// return false
|
// return false
|
||||||
}
|
}
|
||||||
if (!this.oilSitePriceDetailsVo[this.radio].priceId) {
|
if (this.radio==null||!this.oilSitePriceDetailsVo[this.radio].priceId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '未选择油品'
|
title: '请选择油品'
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -797,7 +805,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMake() {
|
beforeMake() {
|
||||||
|
console.log(this.radio,'beforeMake')
|
||||||
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
|
this.tsetPlate(this.plateNumber ? this.plateNumber : this.plateNumberSel)
|
||||||
if (!this.testPlateResult) {
|
if (!this.testPlateResult) {
|
||||||
this.plateNumber=''
|
this.plateNumber=''
|
||||||
@@ -807,10 +815,10 @@
|
|||||||
})
|
})
|
||||||
// return false
|
// return false
|
||||||
}
|
}
|
||||||
if (!this.oilSitePriceDetailsVo[this.radio].priceId) {
|
if (this.radio==null||!this.oilSitePriceDetailsVo[this.radio].priceId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '未选择油品'
|
title: '请选择油品'
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -912,11 +920,14 @@
|
|||||||
this.oilSitePriceDetailsVo = []
|
this.oilSitePriceDetailsVo = []
|
||||||
oilSiteApi.getNewSitePrice(channelId).then(res => {
|
oilSiteApi.getNewSitePrice(channelId).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.radio = 0
|
|
||||||
this.plateNumbers = res.data.plateNumbers
|
this.plateNumbers = res.data.plateNumbers
|
||||||
this.oilSitePriceDetailsVo = res.data.oilSitePriceDetailsVo
|
this.oilSitePriceDetailsVo = res.data.oilSitePriceDetailsVo;
|
||||||
this.activeSitePrice = res.data.oilSitePriceDetailsVo[0].priceId
|
this.siteUserNames = res.data.siteUserNames;
|
||||||
this.siteUserNames = res.data.siteUserNames
|
if(this.oilSitePriceDetailsVo.length==1){
|
||||||
|
this.radio = 0
|
||||||
|
this.activeSitePrice = res.data.oilSitePriceDetailsVo[0].priceId
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -957,11 +968,18 @@
|
|||||||
},
|
},
|
||||||
changePrice(e) {
|
changePrice(e) {
|
||||||
this.radio = e.detail.value
|
this.radio = e.detail.value
|
||||||
console.log(e)
|
console.log(e,'changePrice')
|
||||||
this.vol =''
|
this.vol =''
|
||||||
this.activeSitePrice = this.oilSitePriceDetailsVo[this.radio].priceId
|
this.activeSitePrice = this.oilSitePriceDetailsVo[this.radio].priceId
|
||||||
this.realMoney ='--'
|
this.realMoney ='--'
|
||||||
this.xoilAmountGun = ''
|
this.xoilAmountGun = '';
|
||||||
|
Object.keys(this.tyRes).forEach(key=>{
|
||||||
|
this.tyRes[key]=''
|
||||||
|
})
|
||||||
|
Object.keys(this.ty).forEach(key=>{
|
||||||
|
this.ty[key]=''
|
||||||
|
})
|
||||||
|
this.vlom = ''
|
||||||
// // console.log(this.radio)
|
// // console.log(this.radio)
|
||||||
console.log(this.oilSitePriceDetailsVo[this.radio])
|
console.log(this.oilSitePriceDetailsVo[this.radio])
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -189,9 +189,9 @@
|
|||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if(!option.item){
|
if(!option.item){
|
||||||
let siteInfos = uni.getStorageSync('siteInfo')
|
let siteInfos = uni.getStorageSync('siteInfo')
|
||||||
var oilItem = JSON.parse(siteInfos)
|
var oilItem = JSON.parse(decodeURIComponent(siteInfos))
|
||||||
}else{
|
}else{
|
||||||
var oilItem = JSON.parse(option.item)
|
var oilItem = JSON.parse(decodeURIComponent(option.item))
|
||||||
}
|
}
|
||||||
uni.setStorageSync('oilItem',oilItem)
|
uni.setStorageSync('oilItem',oilItem)
|
||||||
this.getSiteInfo(oilItem.siteId)
|
this.getSiteInfo(oilItem.siteId)
|
||||||
|
|||||||
@@ -553,7 +553,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
let itemS = JSON.stringify(item)
|
let itemS = encodeURIComponent(JSON.stringify(item))
|
||||||
console.log(itemS)
|
console.log(itemS)
|
||||||
if (uni.getStorageSync('user')) {
|
if (uni.getStorageSync('user')) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
@@ -388,7 +388,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
let itemS = JSON.stringify(item)
|
let itemS = encodeURIComponent(JSON.stringify(item))
|
||||||
if (uni.getStorageSync('user')) {
|
if (uni.getStorageSync('user')) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import utils from '@/utils/encode'
|
|||||||
// const env = process.env.NODE_ENV
|
// const env = process.env.NODE_ENV
|
||||||
const env = 'production'/* */
|
const env = 'production'/* */
|
||||||
// const env = 'test'
|
// const env = 'test'
|
||||||
const testUrl = 'http://192.168.0.65:38080'
|
const testUrl = 'http://192.168.0.45:38080'
|
||||||
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
|
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
|
||||||
|
|
||||||
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
|
||||||
// const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: env == 'production' ? productUrl : testUrl,
|
baseURL: env == 'production' ? productUrl : testUrl,
|
||||||
// baseURL: testUrl,
|
// baseURL: testUrl,
|
||||||
|
|||||||
Reference in New Issue
Block a user