中小
xiaozhiyong 8 months ago
parent d157b3928d
commit adb1b01445
  1. 29
      BagStation/pages/stationDetail/stationDetail.vue
  2. 62
      pages/tabbar/home/home.vue
  3. 8
      pages/tabbar/station/stationList.vue
  4. 16
      utils/request.js

@ -278,28 +278,35 @@
})
},
getSiteInfo(id, item) {
let user = uni.getStorageSync('user');
// let user = uni.getStorageSync('user');
let data2 = {
...uni.getStorageSync('location'),
siteId: id,
clientBelong: "BAICHUAN"
}
if (user) {
oilSiteApi.getSiteDetailsByKA(data2).then(res => {
if (res.code == 20000) {
this.siteInfo = res.data
}else {
setTimeout(()=>{
uni.showToast({
title:res.msg,
icon:'none'
})
},1000)
}
})
}else {
this.siteInfo = item
}
})
// if (user) {
// oilSiteApi.getSiteDetailsByKA(data2).then(res => {
// if (res.code == 20000) {
// this.siteInfo = res.data
// }else {
// setTimeout(()=>{
// uni.showToast({
// title:res.msg,
// icon:'none'
// })
// },1000)
// }
// })
// } else {
// this.siteInfo = item
// }
},
makePay() {

@ -179,7 +179,8 @@
</view>
</view>
<msg-models :showAuthFrror="showAuthFrror" @hideOneModal="hideModel"></msg-models>
<three-sites v-if="showThreeSites" @hideOneModal="showThreeSites=false" :showThreeSites="showThreeSites"></three-sites>
<three-sites v-if="showThreeSites" @hideOneModal="showThreeSites=false"
:showThreeSites="showThreeSites"></three-sites>
</view>
</template>
@ -200,8 +201,7 @@
},
data() {
return {
swiperArray: [
{
swiperArray: [{
src: this.global.imgURL + 'banner-baichuan.png',
link: ''
},
@ -541,12 +541,25 @@
},
showQr() {
// uni.navigateTo({
// url: '/BagStation/pages/stationDetail/stieQr'
// })
let user = uni.getStorageSync("user");
if (!user) {
uni.showToast({
title: '登录后才能出示付款码哦',
icon: 'none'
})
return
}
this.showThreeSites = true
},
toCards() {
let user = uni.getStorageSync("user");
if (!user) {
uni.showToast({
title: '登录后才能获取加油卡哦',
icon: 'none'
})
return
}
uni.navigateTo({
url: '/BagMoney/pages/oilCards/oilCards'
})
@ -603,31 +616,8 @@
toDetail(item) {
let itemS = encodeURIComponent(JSON.stringify(item))
uni.navigateTo({
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
fail: (err) => {},
success: () => {}
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`
})
// console.log(itemS)
// if (uni.getStorageSync('user')) {
// uni.navigateTo({
// url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
// fail: (err) => {},
// success: () => {}
// })
// } else {
// uni.showModal({
// title: '',
// content: " |˛˙˙)",
// confirmText: '',
// success: (res) => {
// if (res.confirm) {
// uni.reLaunch({
// url: '../../../BagAuth/pages/login/login?loginType=true'
// })
// }
// }
// })
// }
},
getFilterData() {
oilSiteApi.getCheckInfo().then(res => {
@ -727,11 +717,15 @@
}
})
},
scan1() {
//
this.getScanRes('fixed_1371293944539422720')
},
openScan() {
let user = uni.getStorageSync("user");
if (!user) {
uni.showToast({
title: '登录后才能使用扫一扫哦',
icon: 'none'
})
return
}
uni.scanCode({
scanType: 'qrCode',
onlyFromCamera: false,

@ -469,13 +469,7 @@
toDetail(item) {
let itemS = encodeURIComponent(JSON.stringify(item));
uni.navigateTo({
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
fail: (err) => {
// console.log(err)
},
success: () => {
// console.log('err')
}
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`
})
// if (uni.getStorageSync('user')) {
// uni.navigateTo({

@ -7,8 +7,8 @@ const env = 'production'/* */
const testUrl = 'http://192.168.110.77:38080'
// const productUrl = 'http://121.196.213.68/adminapi' //预生产
// const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
const productUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
// const productUrl = 'http://uat.xingoil.com/adminapi' // 生产,加密 new
const service = axios.create({
baseURL: env == 'production' ? productUrl : testUrl,
// baseURL: testUrl,
@ -22,7 +22,7 @@ service.interceptors.request.use(
uni.showLoading({
title: '加载中...'
})
const token = uni.getStorageSync('Authorization')
const token = uni.getStorageSync('Authorization') || " "
const unionId = uni.getStorageSync('unionid')
// console.log(unionId)
const openId = uni.getStorageSync('openid')
@ -38,8 +38,11 @@ service.interceptors.request.use(
console.log(config)
if(['/oil-site/oilSiteAppInfo/findKASiteInfoByPage','/oil-site/oilSiteAppInfo/getSiteDetailsByKA','/oil-site/oilSiteAppInfo/getSitePriceKAByBelong'].includes(config.url)) {
let parentCompanyId = config.baseURL === 'https://www.xingoil.com/adminapi' ? '1812649739013771264' : '1810568376122056704'
if (['/oil-site/oilSiteAppInfo/findKASiteInfoByPage', '/oil-site/oilSiteAppInfo/getSiteDetailsByKA',
'/oil-site/oilSiteAppInfo/getSitePriceKAByBelong'
].includes(config.url)) {
let parentCompanyId = config.baseURL === 'https://www.xingoil.com/adminapi' ? '1812649739013771264' :
'1810568376122056704'
if (config.data.params) {
config.data.params['parentCompanyId'] = parentCompanyId
} else config.data['parentCompanyId'] = parentCompanyId
@ -86,7 +89,8 @@ service.interceptors.response.use(
uni.hideLoading()
if (response.config.url.indexOf('/oil-site/oilSiteOrderInfo/getOrderQrCode') === -1) {
if (res.code != 20000 && res.msg != '令牌为空,不允许操作' && res.msg != '您的ip已经更改,请重新登录' && res.msg != '登录与操作设备不同' && res.msg != '用户未登录只可查询前两页油站信息') {
if (res.code != 20000 && res.msg != '令牌为空,不允许操作' && res.msg != '您的ip已经更改,请重新登录' && res.msg !=
'登录与操作设备不同' && res.msg != '用户未登录只可查询前两页油站信息') {
uni.showToast({
title: res.msg,
icon: "none"

Loading…
Cancel
Save