KongDuo
xiaozhiyong 2 years ago
parent a8249b5de8
commit 4eaf549bbe
  1. 80
      App.vue
  2. 1
      BagAuth/pages/login/login.vue
  3. 19
      BagStation/pages/components/price-select-tab.vue
  4. 20
      BagStation/pages/stationDetail/stationDetail.vue
  5. 2
      utils/request.js

@ -85,75 +85,41 @@
const pages = getCurrentPages() //
const view = pages[pages.length - 1] //
if (!view) return false //
// isOverSharetrue
// const data = view.data
// if (!data.isOverShare) {
// data.isOverShare = true
view.onShareAppMessage = () => { //
return {
title: '一路油你,星油能源',
path: "/pages/index/startPage/startPage", //path
// imageUrl:'/image/onshowMessage.png' //imageUrl
path: "/pages/index/startPage/startPage",
imageUrl: 'https://xoi-support.oss-cn-hangzhou.aliyuncs.com/星油admin小程序/xxxxx.png',
}
}
if (view.route != 'pages/index/startPage/startPage' && view.route.indexOf('BagAuth') == -1) {
const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('openid')
if (token && openid) {
this.getAmount()
onlineTimer = setTimeout(() => {
if (this.loginStatus == 'offline') {
uni.clearStorageSync()
uni.showModal({
title: '需要您重新登录',
content: this.msg,
duration: '3000',
success: function(res) {
if (res.confirm) {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
},
complete: () => {
clearTimeout(onlineTimer)
}
})
}
}, 1000)
} else {
// loginTimer = setTimeout(() => {
// uni.showModal({
// title: '',
// content: '',
// duration: '3000',
// success: function(res) {
// if (res.confirm) {
// uni.redirectTo({
// url: '/BagAuth/pages/login/login'
// })
// }
// }
// })
// }, 1000)
}
let white = ['pages/index/startPage/startPage']
if(view.route === 'BagStation/pages/stationDetail/stationDetail') {
uni.removeStorageSync('refuseLogin')
}
// }
// //
let isRefuseLogin = uni.getStorageSync('refuseLogin')
if(isRefuseLogin || white.includes(view.route) || view.route.includes('BagAuth')) return
this.getAmount()
})
},
// tokenip
getAmount() {
clearTimeout(loginTimer)
// clearTimeout(loginTimer)
accountApi.getTotalOilCardInfo().then(res => {
if (res.code == 20000) {
this.loginStatus = 'online'
} else if (res.code == 42011) {
this.loginStatus = 'offline'
this.msg = res.msg
if (res.code == 42011) {
uni.showModal({
title: '需要您重新登录',
content: res.msg,
duration: '3000',
success: function(res) {
if (res.confirm) {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
}
})
}
})
},

@ -207,6 +207,7 @@
})
},
refuseLogin(){
uni.setStorageSync('refuseLogin',true)
uni.switchTab({
url: '/pages/tabbar/home/home'
})

@ -483,18 +483,19 @@
oilSite = uni.getStorageSync(''),
otherUser = uni.getStorageSync('otherUserInfo')
if(otherUser){
console.log('这里是卡里')
// console.log('')
this.isOtherUser = true
}else{
console.log('这里是非卡力')
// console.log('')
}
console.log('oilItem',oilItem)
this.showtitles = oilItem.listTag;
this.init()
},
watch: {
activeChannelCode: {
handler(newval) {
console.log('activeChannelCode')
// console.log('activeChannelCode')
this.oilBar = ''
setTimeout(async() => {
this.checkBar = (this.typeChenk())? await this.dynamic() : this.calcBar()
@ -503,7 +504,7 @@
},
priceId: {
handler(newval) {
console.log('priceId')
// console.log('priceId')
this.oilBar = ''
setTimeout(async() => {
this.checkBar = (this.typeChenk())? await this.dynamic() : this.calcBar()
@ -540,12 +541,12 @@
totalMoney() {
// // console.log('this.oilSitePriceDetailsVo[this.radio]', this.oilSitePriceDetailsVo[this.radio])
if (this.vol > 0 && this.oilSitePriceDetailsVo[this.radio]) {
console.log('+++++++++++')
console.log(this.vol)
console.log(this.oilSitePriceDetailsVo[this.radio])
console.log('+++++++++++')
// console.log('+++++++++++')
// console.log(this.vol)
// console.log(this.oilSitePriceDetailsVo[this.radio])
// console.log('+++++++++++')
let numb = this.vol * this.oilSitePriceDetailsVo[this.radio].oilSitePrice
console.log('++++++',numb)
// console.log('++++++',numb)
return this.vol * this.oilSitePriceDetailsVo[this.radio].oilSitePrice
}
},

@ -184,11 +184,11 @@
priceTab
},
onHide() {
console.log('这里是hiden')
// console.log('hiden')
this.innerAudioContext.stop()
},
onUnload() {
console.log('这里是卸载页面')
// console.log('')
this.innerAudioContext.stop()
},
data() {
@ -216,15 +216,20 @@
onHide() {
this.innerAudioContext.stop()
},
onLoad(option) {
console.log(option)
onLoad(option) {
if(option.siteId) {
this.siteId = option.siteId
this.getSiteInfo(option.siteId)
return
}
// console.log(option)
if(option.channerCode == 'TY'){
var oilItem = uni.getStorageSync('OtherSiteInfo')
console.log(oilItem)
// console.log(oilItem)
}else{
let obj = option.item,
jss= JSON.parse(obj)
console.log( '+++++++++',obj,jss,'----------')
// console.log( '+++++++++',obj,jss,'----------')
var oilItem = JSON.parse(option.item)
}
uni.setStorageSync('oilItem',oilItem)
@ -270,8 +275,7 @@
console.log('开始播放');
});
this.innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
console.log(res)
});
},
hidendialog(){

@ -12,7 +12,7 @@ const productUrl = 'http://uat.xingoil.com/adminapi'
// const productUrl = 'http://192.168.0.191:38080'
// const productUrl = 'http://121.196.213.68/adminapi'
const service = axios.create({
baseURL: env == 'production' ? productUrl : testUrl,,
baseURL: env == 'production' ? productUrl : testUrl,
// baseURL: testUrl,
timeout: 5000
})

Loading…
Cancel
Save