更新
This commit is contained in:
@@ -278,28 +278,35 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSiteInfo(id, item) {
|
getSiteInfo(id, item) {
|
||||||
let user = uni.getStorageSync('user');
|
// let user = uni.getStorageSync('user');
|
||||||
let data2 = {
|
let data2 = {
|
||||||
...uni.getStorageSync('location'),
|
...uni.getStorageSync('location'),
|
||||||
siteId: id,
|
siteId: id,
|
||||||
clientBelong: "BAICHUAN"
|
clientBelong: "BAICHUAN"
|
||||||
}
|
}
|
||||||
if (user) {
|
oilSiteApi.getSiteDetailsByKA(data2).then(res => {
|
||||||
oilSiteApi.getSiteDetailsByKA(data2).then(res => {
|
if (res.code == 20000) {
|
||||||
if (res.code == 20000) {
|
this.siteInfo = res.data
|
||||||
this.siteInfo = res.data
|
}else {
|
||||||
}else {
|
this.siteInfo = item
|
||||||
setTimeout(()=>{
|
}
|
||||||
uni.showToast({
|
})
|
||||||
title:res.msg,
|
// if (user) {
|
||||||
icon:'none'
|
// oilSiteApi.getSiteDetailsByKA(data2).then(res => {
|
||||||
})
|
// if (res.code == 20000) {
|
||||||
},1000)
|
// this.siteInfo = res.data
|
||||||
}
|
// }else {
|
||||||
})
|
// setTimeout(()=>{
|
||||||
} else {
|
// uni.showToast({
|
||||||
this.siteInfo = item
|
// title:res.msg,
|
||||||
}
|
// icon:'none'
|
||||||
|
// })
|
||||||
|
// },1000)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// this.siteInfo = item
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
makePay() {
|
makePay() {
|
||||||
|
|||||||
@@ -59,13 +59,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text-xxl" @tap="toManagement">
|
<view class="text-xxl" @tap="toManagement">
|
||||||
<view class="cuIcon-form">
|
<view class="cuIcon-form">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<text class="text-df">
|
<text class="text-df">
|
||||||
中交风控
|
中交风控
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
<view class="">
|
<view class="">
|
||||||
<swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular>
|
<swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular>
|
||||||
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray">
|
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray">
|
||||||
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
|
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
|
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
|
||||||
@@ -179,7 +179,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<msg-models :showAuthFrror="showAuthFrror" @hideOneModal="hideModel"></msg-models>
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -200,10 +201,9 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
swiperArray: [
|
swiperArray: [{
|
||||||
{
|
src: this.global.imgURL + 'banner-baichuan.png',
|
||||||
src:this.global.imgURL+'banner-baichuan.png',
|
link: ''
|
||||||
link:''
|
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png',
|
// src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png',
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
const openid = uni.getStorageSync('openid')
|
const openid = uni.getStorageSync('openid')
|
||||||
if (token && openid) {
|
if (token && openid) {
|
||||||
this.getAuthInfo()
|
this.getAuthInfo()
|
||||||
}
|
}
|
||||||
// else {
|
// else {
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title: '您还没有登录哦',
|
// title: '您还没有登录哦',
|
||||||
@@ -360,7 +360,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toActivity(){},
|
toActivity() {},
|
||||||
toManagement() {
|
toManagement() {
|
||||||
const user = uni.getStorageSync('user');
|
const user = uni.getStorageSync('user');
|
||||||
if (user) {
|
if (user) {
|
||||||
@@ -389,7 +389,7 @@
|
|||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
// url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
||||||
// })
|
// })
|
||||||
if(item?.JumpPage){
|
if (item?.JumpPage) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: item.JumpPage
|
url: item.JumpPage
|
||||||
})
|
})
|
||||||
@@ -426,7 +426,7 @@
|
|||||||
success: (resSec) => {
|
success: (resSec) => {
|
||||||
if (resSec.confirm) {
|
if (resSec.confirm) {
|
||||||
uni.openSetting({
|
uni.openSetting({
|
||||||
complete:() => {
|
complete: () => {
|
||||||
// this.getSiteList()
|
// this.getSiteList()
|
||||||
// this.realPosition()
|
// this.realPosition()
|
||||||
// this.refreshLocation()
|
// this.refreshLocation()
|
||||||
@@ -435,10 +435,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'获取定位失败,请稍后再试!',
|
title: '获取定位失败,请稍后再试!',
|
||||||
icon:'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -541,12 +541,25 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
showQr() {
|
showQr() {
|
||||||
// uni.navigateTo({
|
let user = uni.getStorageSync("user");
|
||||||
// url: '/BagStation/pages/stationDetail/stieQr'
|
if (!user) {
|
||||||
// })
|
uni.showToast({
|
||||||
|
title: '登录后才能出示付款码哦',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.showThreeSites = true
|
this.showThreeSites = true
|
||||||
},
|
},
|
||||||
toCards() {
|
toCards() {
|
||||||
|
let user = uni.getStorageSync("user");
|
||||||
|
if (!user) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '登录后才能获取加油卡哦',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/BagMoney/pages/oilCards/oilCards'
|
url: '/BagMoney/pages/oilCards/oilCards'
|
||||||
})
|
})
|
||||||
@@ -597,37 +610,14 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// } else {
|
// } else {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
let itemS = encodeURIComponent(JSON.stringify(item))
|
let itemS = encodeURIComponent(JSON.stringify(item))
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`
|
||||||
fail: (err) => {},
|
|
||||||
success: () => {}
|
|
||||||
})
|
})
|
||||||
// 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() {
|
getFilterData() {
|
||||||
oilSiteApi.getCheckInfo().then(res => {
|
oilSiteApi.getCheckInfo().then(res => {
|
||||||
@@ -727,11 +717,15 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
scan1() {
|
|
||||||
// 测试用
|
|
||||||
this.getScanRes('fixed_1371293944539422720')
|
|
||||||
},
|
|
||||||
openScan() {
|
openScan() {
|
||||||
|
let user = uni.getStorageSync("user");
|
||||||
|
if (!user) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '登录后才能使用扫一扫哦',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
scanType: 'qrCode',
|
scanType: 'qrCode',
|
||||||
onlyFromCamera: false,
|
onlyFromCamera: false,
|
||||||
@@ -839,4 +833,4 @@
|
|||||||
.my-icon-sm .text-sm {
|
.my-icon-sm .text-sm {
|
||||||
line-height: 1rem;
|
line-height: 1rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -469,13 +469,7 @@
|
|||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
let itemS = encodeURIComponent(JSON.stringify(item));
|
let itemS = encodeURIComponent(JSON.stringify(item));
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`
|
||||||
fail: (err) => {
|
|
||||||
// console.log(err)
|
|
||||||
},
|
|
||||||
success: () => {
|
|
||||||
// console.log('err')
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
// if (uni.getStorageSync('user')) {
|
// if (uni.getStorageSync('user')) {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
|
|||||||
@@ -2,27 +2,27 @@ import axios from 'axios'
|
|||||||
import utils from '@/utils/encode'
|
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.110.77:38080'
|
const testUrl = 'http://192.168.110.77: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,
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
})
|
})
|
||||||
var url = ''
|
var url = ''
|
||||||
|
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
// 拦截请求
|
// 拦截请求
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中...'
|
title: '加载中...'
|
||||||
})
|
})
|
||||||
const token = uni.getStorageSync('Authorization')
|
const token = uni.getStorageSync('Authorization') || " "
|
||||||
const unionId = uni.getStorageSync('unionid')
|
const unionId = uni.getStorageSync('unionid')
|
||||||
// console.log(unionId)
|
// console.log(unionId)
|
||||||
const openId = uni.getStorageSync('openid')
|
const openId = uni.getStorageSync('openid')
|
||||||
@@ -35,14 +35,17 @@ service.interceptors.request.use(
|
|||||||
config.headers['accountSources'] = accountSources
|
config.headers['accountSources'] = accountSources
|
||||||
config.headers['imei'] = unionId
|
config.headers['imei'] = unionId
|
||||||
config.headers['dataSources'] = 'MP'
|
config.headers['dataSources'] = 'MP'
|
||||||
|
|
||||||
console.log(config)
|
console.log(config)
|
||||||
|
|
||||||
if(['/oil-site/oilSiteAppInfo/findKASiteInfoByPage','/oil-site/oilSiteAppInfo/getSiteDetailsByKA','/oil-site/oilSiteAppInfo/getSitePriceKAByBelong'].includes(config.url)) {
|
if (['/oil-site/oilSiteAppInfo/findKASiteInfoByPage', '/oil-site/oilSiteAppInfo/getSiteDetailsByKA',
|
||||||
let parentCompanyId = config.baseURL === 'https://www.xingoil.com/adminapi' ? '1812649739013771264' : '1810568376122056704'
|
'/oil-site/oilSiteAppInfo/getSitePriceKAByBelong'
|
||||||
if(config.data.params) {
|
].includes(config.url)) {
|
||||||
|
let parentCompanyId = config.baseURL === 'https://www.xingoil.com/adminapi' ? '1812649739013771264' :
|
||||||
|
'1810568376122056704'
|
||||||
|
if (config.data.params) {
|
||||||
config.data.params['parentCompanyId'] = parentCompanyId
|
config.data.params['parentCompanyId'] = parentCompanyId
|
||||||
}else config.data['parentCompanyId'] = parentCompanyId
|
} else config.data['parentCompanyId'] = parentCompanyId
|
||||||
}
|
}
|
||||||
|
|
||||||
if (env === 'production') {
|
if (env === 'production') {
|
||||||
@@ -82,11 +85,12 @@ service.interceptors.response.use(
|
|||||||
const dataParam = JSON.parse(utils.decrypt(res.data))
|
const dataParam = JSON.parse(utils.decrypt(res.data))
|
||||||
res.data = JSON.stringify(dataParam) === '{}' ? null : dataParam
|
res.data = JSON.stringify(dataParam) === '{}' ? null : dataParam
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if(response.config.url.indexOf('/oil-site/oilSiteOrderInfo/getOrderQrCode') === -1){
|
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({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none"
|
icon: "none"
|
||||||
@@ -147,4 +151,4 @@ service.defaults.adapter = function(config) {
|
|||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
export default service
|
export default service
|
||||||
Reference in New Issue
Block a user