diff --git a/BagStation/pages/components/price-select-tab.vue b/BagStation/pages/components/price-select-tab.vue index 45ee9c4..f67cc67 100644 --- a/BagStation/pages/components/price-select-tab.vue +++ b/BagStation/pages/components/price-select-tab.vue @@ -952,7 +952,7 @@ // 获取渠道下价格等信息 getNewSitePrice(channelId) { this.oilSitePriceDetailsVo = [] - oilSiteApi.getNewSitePriceZp({ + oilSiteApi.getSitePriceKAByBelong({ channelId: channelId, clientBelong: "ZHONGPIN" }).then(res => { diff --git a/BagStation/pages/makeOrder/makeOrder.vue b/BagStation/pages/makeOrder/makeOrder.vue index 5a81e85..2b66c1e 100644 --- a/BagStation/pages/makeOrder/makeOrder.vue +++ b/BagStation/pages/makeOrder/makeOrder.vue @@ -148,7 +148,7 @@ clientBelong: "ZHONGPIN" } - oilSiteApi.getSiteDetails(data2).then(res => { + oilSiteApi.getSiteDetailsByKA(data2).then(res => { if (res.code == 20000) { this.siteInfo = res.data } diff --git a/BagStation/pages/routePlainMap/routePlainMap.vue b/BagStation/pages/routePlainMap/routePlainMap.vue index 75e0a10..36a9a5f 100644 --- a/BagStation/pages/routePlainMap/routePlainMap.vue +++ b/BagStation/pages/routePlainMap/routePlainMap.vue @@ -497,10 +497,10 @@ }) }, markerTap(res){ - console.log('这类似点击marker点',res) - console.log('这类似点击marker点匹配',this.coverDatas) + // console.log('这类似点击marker点',res) + // console.log('这类似点击marker点匹配',this.coverDatas) let site = this.coverDatas.filter(item=>Number(item.id.substr(0,8)) == res.detail.markerId ); - console.log('*++++++++++++++++++++++++++++++*',site) + // console.log('*++++++++++++++++++++++++++++++*',site) this.siteInfo = site[0] if(this.siteInfo){ let userLocation = uni.getStorageSync('userLocation') @@ -512,8 +512,8 @@ latitude:latitude , longitude: longitude , } - console.log('点击获取obj',obj) - oilSiteApi.getSiteDetails(obj).then(res=>{ + // console.log('点击获取obj',obj) + oilSiteApi.getSiteDetailsByKA(obj).then(res=>{ if(res.code == 20000){ console.log(res) this.oliSiteInfo = res.data diff --git a/BagStation/pages/stationDetail/stationDetail.vue b/BagStation/pages/stationDetail/stationDetail.vue index c300a29..2a471ca 100644 --- a/BagStation/pages/stationDetail/stationDetail.vue +++ b/BagStation/pages/stationDetail/stationDetail.vue @@ -211,6 +211,8 @@ } this.location = uni.getStorageSync('location') + + // console.log('option',option) if (!option.item) { let siteInfos = uni.getStorageSync('siteInfo') @@ -293,7 +295,7 @@ } let user = uni.getStorageSync('user'); if (user) { - oilSiteApi.getSiteDetails(data2).then(res => { + oilSiteApi.getSiteDetailsByKA(data2).then(res => { if (res.code == 20000) { this.siteInfo = Object.assign(item, res.data); } diff --git a/BagStation/pages/stationDetail/stieQr.vue b/BagStation/pages/stationDetail/stieQr.vue index 5e58179..d2c3706 100644 --- a/BagStation/pages/stationDetail/stieQr.vue +++ b/BagStation/pages/stationDetail/stieQr.vue @@ -283,7 +283,7 @@ ...uni.getStorageSync('location'), siteId: this.siteId } - oilSiteApi.getSiteDetails(data2).then(res => { + oilSiteApi.getSiteDetailsByKA(data2).then(res => { if (res.code == 20000) { this.siteInfo = res.data } diff --git a/BagStation/pages/stationMap/stationMap.vue b/BagStation/pages/stationMap/stationMap.vue index ca71f1f..31d3a6b 100644 --- a/BagStation/pages/stationMap/stationMap.vue +++ b/BagStation/pages/stationMap/stationMap.vue @@ -152,7 +152,7 @@ export default { ...uni.getStorageSync('location'), siteId: id } - oilSiteApi.getSiteDetails(data2).then(res => { + oilSiteApi.getSiteDetailsByKA(data2).then(res => { if (res.code == 20000) { this.siteInfo = res.data } diff --git a/api/oil-site.js b/api/oil-site.js index b02418f..8f46704 100644 --- a/api/oil-site.js +++ b/api/oil-site.js @@ -45,6 +45,14 @@ export default { data: data }) }, + // 中小客户调度管理系统 + findKASiteInfoByPage(data) { + return request({ + url: `/oil-site/oilSiteAppInfo/findKASiteInfoByPage`, + method: 'post', + data: data + }) + }, getSiteDetails(data) { return request({ url: `/${service_name}/${group_name}/getSiteDetails`, @@ -52,6 +60,14 @@ export default { data: data }) }, + // 中小企业油站详情 + getSiteDetailsByKA(data) { + return request({ + url: `/${service_name}/${group_name}/getSiteDetailsByKA`, + method: 'post', + data: data + }) + }, // 未登录查询油站 readOnlySites(data) { return request({ @@ -89,6 +105,7 @@ export default { method: 'get' }) }, + // 中品 下单 -- 获取最新油站价格、司机、加油员相关信息 getNewSitePriceZp(data) { return request({ @@ -97,6 +114,14 @@ export default { data:data }) }, + // 中小企业 + getSitePriceKAByBelong(data) { + return request({ + url: `/${service_name}/${group_name}/getSitePriceKAByBelong`, + method: 'post', + data:data + }) + }, //根据地址获取详细地址信息 getGeoByAddress(address) { return request({ diff --git a/components/three-sites.vue b/components/three-sites.vue index 56eda33..dfe771d 100644 --- a/components/three-sites.vue +++ b/components/three-sites.vue @@ -79,13 +79,14 @@ ...this.filterData, comprehensiveSort:1, zpDisable:'ENABLE', + // parentCompanyId // siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 ) // channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌)) // oilProductCode: "" // 备注:// 油号选择 ( 0# 92# 92#) } } - oilSiteApi.getSiteLists(data1).then(res => { + oilSiteApi.findKASiteInfoByPage(data1).then(res => { if (res.code == 20000) { this.siteList = res.data.list; (this.siteList.length>3)&&(this.siteList.length = 3) diff --git a/pages/index/startPage/startPage.vue b/pages/index/startPage/startPage.vue index 5bf6fdd..54fdca0 100644 --- a/pages/index/startPage/startPage.vue +++ b/pages/index/startPage/startPage.vue @@ -96,6 +96,7 @@ }) } } + // handle() interstitialAd.onClose(handle) interstitialAd.onError((err) => { console.log('onError', err) diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index cabcb15..089249a 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -72,7 +72,7 @@ --> - @@ -454,7 +454,7 @@ } }; - oilSiteApi.getSiteLists(params).then(res => { + oilSiteApi.findKASiteInfoByPage(params).then(res => { if (res.code == 20000) { this.siteList = res.data.list } @@ -462,6 +462,7 @@ }, toDetail(item) { + // console.log('siteList',this.siteList) let user = uni.getStorageSync("user"); if (!user) { uni.showModal({ @@ -477,6 +478,7 @@ }); return; } + // console.log('item',item) let itemS = encodeURIComponent(JSON.stringify(item)); uni.navigateTo({ url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}` @@ -495,7 +497,7 @@ ...uni.getStorageSync('location'), siteId: id } - oilSiteApi.getSiteDetails(data2).then(res => { + oilSiteApi.getSiteDetailsByKA(data2).then(res => { if (res.code == 20000) { this.siteInfo = res.data if (res.data.oilSiteChannelDetailsVos.length == 1 && res.data.oilSiteChannelDetailsVos[0] diff --git a/pages/tabbar/qrCenter/qrCenter.vue b/pages/tabbar/qrCenter/qrCenter.vue index 6d5d47d..7d211e8 100644 --- a/pages/tabbar/qrCenter/qrCenter.vue +++ b/pages/tabbar/qrCenter/qrCenter.vue @@ -89,7 +89,7 @@ ...uni.getStorageSync('location'), siteId: id } - oilSiteApi.getSiteDetails(data2).then(res => { + oilSiteApi.getSiteDetailsByKA(data2).then(res => { if (res.code == 20000) { this.siteInfo = res.data if (res.data.oilSiteChannelDetailsVos.length == 1 && res.data.oilSiteChannelDetailsVos[0] diff --git a/pages/tabbar/station/stationList.vue b/pages/tabbar/station/stationList.vue index 6166399..d274464 100644 --- a/pages/tabbar/station/stationList.vue +++ b/pages/tabbar/station/stationList.vue @@ -38,7 +38,7 @@ - @@ -405,18 +405,20 @@ } } - oilSiteApi.getSiteLists(parameter).then(res => { + oilSiteApi.findKASiteInfoByPage(parameter).then(res => { if (res.code == 20000) { - this.siteList = this.siteList.concat(res.data.list) + if(this.currentPage == 1) { + this.siteList = res.data.list + }else this.siteList = this.siteList.concat(res.data.list) + if (res.data.list.length < 10) { //判断接口返回数据量小于请求数据量,则表示此为最后一页 this.loadStatus = 'nomore' } else { this.currentPage++ this.loadStatus = 'load' } - } + }K }) - }, toDetail(item) { let user = uni.getStorageSync("user"); diff --git a/utils/request.js b/utils/request.js index e5f9fe2..d883f7d 100644 --- a/utils/request.js +++ b/utils/request.js @@ -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, @@ -34,6 +34,16 @@ service.interceptors.request.use( config.headers['accountSources'] = accountSources config.headers['imei'] = unionId config.headers['dataSources'] = 'MP' + + 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 + + } + + if (env === 'production') { // 生产环境,加密,不输出任何东西