xiaozy_二维码 #2
49
App.vue
49
App.vue
@@ -58,7 +58,9 @@
|
|||||||
let custom = wx.getMenuButtonBoundingClientRect();
|
let custom = wx.getMenuButtonBoundingClientRect();
|
||||||
Vue.prototype.Custom = custom;
|
Vue.prototype.Custom = custom;
|
||||||
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
|
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
|
||||||
// #endif // #ifdef MP-ALIPAY
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef MP-ALIPAY
|
||||||
Vue.prototype.StatusBar = e.statusBarHeight;
|
Vue.prototype.StatusBar = e.statusBarHeight;
|
||||||
Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
|
Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
|
||||||
// #endif
|
// #endif
|
||||||
@@ -130,10 +132,27 @@
|
|||||||
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(!white.includes(view.route)){
|
let jumpUrl = '/BagAuth/pages/login/login'
|
||||||
this.getAmount()
|
let urlTarget = this.obtainUrlPathParameterTarget(view.$page.fullPath)
|
||||||
|
console.log('urlTarget',urlTarget)
|
||||||
|
let target = {}
|
||||||
|
if(urlTarget.q) {
|
||||||
|
let originLink = decodeURIComponent(decodeURIComponent(urlTarget.q))
|
||||||
|
target = this.obtainUrlPathParameterTarget(originLink)
|
||||||
|
target.siteId && (jumpUrl += `?scanningParams=${decodeURIComponent(urlTarget.q)}`)
|
||||||
}
|
}
|
||||||
|
// console.log('jumpUrl',jumpUrl)
|
||||||
|
if (token && openid) {
|
||||||
|
this.getAmount()
|
||||||
|
// if(!white.includes(view.route) ){
|
||||||
|
// this.getAmount()
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(target.siteId || !white.includes(view.route) ){
|
||||||
|
// this.getAmount()
|
||||||
|
// }
|
||||||
|
|
||||||
onlineTimer = setTimeout(() => {
|
onlineTimer = setTimeout(() => {
|
||||||
if (this.loginStatus == 'offline') {
|
if (this.loginStatus == 'offline') {
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync()
|
||||||
@@ -144,7 +163,7 @@
|
|||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/BagAuth/pages/login/login'
|
url: jumpUrl
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -160,6 +179,9 @@
|
|||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
target.siteId && uni.redirectTo({
|
||||||
|
url: jumpUrl
|
||||||
|
})
|
||||||
// loginTimer = setTimeout(() => {
|
// loginTimer = setTimeout(() => {
|
||||||
// uni.showModal({
|
// uni.showModal({
|
||||||
// title: '请您登录',
|
// title: '请您登录',
|
||||||
@@ -181,10 +203,26 @@
|
|||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
obtainUrlPathParameterTarget(url) {
|
||||||
|
let target = {}
|
||||||
|
if(url.includes('?')) {
|
||||||
|
let paramsText = url.split("?")[1]
|
||||||
|
let paramsArr = paramsText.split("&")
|
||||||
|
paramsArr.forEach(item => {
|
||||||
|
target[item.split('=')[0]] = item.split('=')[1]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('11target',target)
|
||||||
|
return target
|
||||||
|
},
|
||||||
|
|
||||||
// 是否token过期或ip更改
|
// 是否token过期或ip更改
|
||||||
getAmount() {
|
getAmount() {
|
||||||
clearTimeout(loginTimer)
|
clearTimeout(loginTimer)
|
||||||
accountApi.getTotalOilCardInfo().then(res => {
|
accountApi.getTotalOilCardInfo().then(res => {
|
||||||
|
console.log('res.code',res.code)
|
||||||
|
console.log(555)
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.loginStatus = 'online'
|
this.loginStatus = 'online'
|
||||||
} else if (res.code == 42011) {
|
} else if (res.code == 42011) {
|
||||||
@@ -200,6 +238,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
console.log(12388)
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
|||||||
@@ -152,22 +152,24 @@
|
|||||||
loginRes: {},
|
loginRes: {},
|
||||||
sessionKey: '',
|
sessionKey: '',
|
||||||
nickName: '',
|
nickName: '',
|
||||||
loginOut: uni.getStorageSync('loginOut') ? true : false
|
loginOut: uni.getStorageSync('loginOut') ? true : false,
|
||||||
|
scanningParams:null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(options) {
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync()
|
||||||
this.refreshLocation()
|
this.refreshLocation()
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: (loginRes) => {
|
success: (loginRes) => {
|
||||||
console.log(loginRes,'loginRes')
|
|
||||||
const code = loginRes.code
|
const code = loginRes.code
|
||||||
this.onceCode = code
|
this.onceCode = code
|
||||||
console.log(this.onceCode,'----------')
|
|
||||||
oilIdentityApi.sendCode(this.onceCode).then(res => {
|
oilIdentityApi.sendCode(this.onceCode).then(res => {
|
||||||
console.log(res,'sendCode')
|
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
|
if(options.scanningParams) {
|
||||||
|
// 用于扫码进入油站详情页面
|
||||||
|
this.scanningParams = options.scanningParams
|
||||||
|
}
|
||||||
this.sessionKey = res.data.sessionKey
|
this.sessionKey = res.data.sessionKey
|
||||||
uni.setStorageSync('openid', res.data.openId)
|
uni.setStorageSync('openid', res.data.openId)
|
||||||
uni.setStorageSync('unionid', res.data.unionId)
|
uni.setStorageSync('unionid', res.data.unionId)
|
||||||
@@ -184,7 +186,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/BagAuth/pages/login/boforeLogin/boforeLogin',
|
url: '/BagAuth/pages/login/boforeLogin/boforeLogin',
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
@@ -224,14 +225,13 @@
|
|||||||
},
|
},
|
||||||
refuseEmpower() {
|
refuseEmpower() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/BagAuth/pages/login/oldLogin'
|
url: `/BagAuth/pages/login/oldLogin?scanningParams=${this.scanningParams}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
decryptPhoneNumber(e) {
|
decryptPhoneNumber(e) {
|
||||||
// console.log(e.detail)
|
|
||||||
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
||||||
const data1 = {
|
const data1 = {
|
||||||
...e.detail,
|
...e.detail,
|
||||||
@@ -251,7 +251,6 @@
|
|||||||
bindLoginByPhone(data, url) {
|
bindLoginByPhone(data, url) {
|
||||||
if (this.count < 1) {
|
if (this.count < 1) {
|
||||||
oilIdentityApi.bindLoginByPhone(data, url).then(res => {
|
oilIdentityApi.bindLoginByPhone(data, url).then(res => {
|
||||||
console.log(res)
|
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.loginSuccess(res)
|
this.loginSuccess(res)
|
||||||
|
|
||||||
@@ -278,10 +277,15 @@
|
|||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
complete: (err) => {
|
complete: (err) => {
|
||||||
// console.log(err)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
if(this.scanningParams) {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: `/BagStation/pages/stationDetail/stationDetail?q=${this.scanningParams}`
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
// 这里有问题
|
// 这里有问题
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/tabbar/home/home'
|
url: '/pages/tabbar/home/home'
|
||||||
|
|||||||
@@ -171,7 +171,14 @@
|
|||||||
count: 0,
|
count: 0,
|
||||||
loginRes: {},
|
loginRes: {},
|
||||||
checked: false,
|
checked: false,
|
||||||
next: false
|
next: false,
|
||||||
|
scanningParams:null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
if(options.scanningParams) {
|
||||||
|
// 用于扫码进入油站详情页面
|
||||||
|
this.scanningParams = options.scanningParams
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
@@ -402,6 +409,12 @@
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
if(this.scanningParams) {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: `/BagStation/pages/stationDetail/stationDetail?q=${this.scanningParams}`
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
// 这里有问题
|
// 这里有问题
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/tabbar/home/home'
|
url: '/pages/tabbar/home/home'
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-list menu solid-bottom">
|
<view class="cu-list menu solid-bottom">
|
||||||
<view class="cu-item arrow" @tap="toDetail(order)">
|
<view class="cu-item " :class="order.zpDisable === 'DISABLE' ? '' :'arrow'" @tap="toDetail(order)">
|
||||||
油站:
|
油站:
|
||||||
<text class="fr">{{order.siteName?order.siteName:''}}</text>
|
<text class="fr">{{order.siteName?order.siteName:''}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -312,6 +312,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
|
if(item.zpDisable === 'DISABLE') return
|
||||||
var itemS = JSON.stringify(item)
|
var itemS = JSON.stringify(item)
|
||||||
uni.setStorageSync('siteInfo',itemS)
|
uni.setStorageSync('siteInfo',itemS)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -325,6 +326,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
cancelOrder() {
|
cancelOrder() {
|
||||||
|
|
||||||
orderApi.cancelOrder(this.id).then(res => {
|
orderApi.cancelOrder(this.id).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
<text class=" text-black ">加 {{itm.oilsCode}} {{itm.volume}}L 节省 <text class="text-red">
|
<text class=" text-black ">加 {{itm.oilsCode}} {{itm.volume}}L 节省 <text class="text-red">
|
||||||
¥{{itm.discountAmount}}</text></text>
|
¥{{itm.discountAmount}}</text></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-item no-border" v-if="!siteInfo.oilSiteOrderInfoVos.length">
|
<view class="cu-item no-border" v-if="siteInfo.oilSiteOrderInfoVos && !siteInfo.oilSiteOrderInfoVos.length">
|
||||||
暂无
|
暂无
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -180,20 +180,41 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
console.log('这里是hiden')
|
this.innerAudioContext && this.innerAudioContext.stop()
|
||||||
this.innerAudioContext.stop()
|
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
console.log('这里是卸载页面')
|
this.innerAudioContext && this.innerAudioContext.stop()
|
||||||
this.innerAudioContext.stop()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
// console.log('option',option)
|
||||||
|
// let userInfo = uni.getStorageSync('user')
|
||||||
|
// if(!userInfo && option.q) {
|
||||||
|
// uni.redirectTo({
|
||||||
|
// url: `/BagAuth/pages/login/login?scanningParams=${option.q}`
|
||||||
|
// })
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(option.q) {
|
||||||
|
let originLink = decodeURIComponent(option.q)
|
||||||
|
let target = this.obtainUrlPathParameterTarget(originLink)
|
||||||
|
console.log('target',target)
|
||||||
|
if(target.siteId) {
|
||||||
|
this.siteId = target.siteId
|
||||||
|
this.getSiteInfo(target.siteId)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if(!option.item){
|
if(!option.item){
|
||||||
let siteInfos = uni.getStorageSync('siteInfo')
|
let siteInfos = uni.getStorageSync('siteInfo')
|
||||||
var oilItem = JSON.parse(decodeURIComponent(siteInfos))
|
var oilItem = JSON.parse(decodeURIComponent(siteInfos))
|
||||||
}else{
|
}else{
|
||||||
var oilItem = JSON.parse(decodeURIComponent(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)
|
||||||
this.siteId = oilItem.siteId
|
this.siteId = oilItem.siteId
|
||||||
@@ -209,6 +230,17 @@
|
|||||||
this.ContextAudio(this.audioUrl)
|
this.ContextAudio(this.audioUrl)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
obtainUrlPathParameterTarget(url) {
|
||||||
|
let target = {}
|
||||||
|
if(url.includes('?')) {
|
||||||
|
let paramsText = url.split("?")[1]
|
||||||
|
let paramsArr = paramsText.split("&")
|
||||||
|
paramsArr.forEach(item => {
|
||||||
|
target[item.split('=')[0]] = item.split('=')[1]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return target
|
||||||
|
},
|
||||||
// 生成音频文件
|
// 生成音频文件
|
||||||
ContextAudio(url){
|
ContextAudio(url){
|
||||||
this.innerAudioContext = uni.createInnerAudioContext();
|
this.innerAudioContext = uni.createInnerAudioContext();
|
||||||
@@ -218,12 +250,11 @@
|
|||||||
console.log('开始播放');
|
console.log('开始播放');
|
||||||
});
|
});
|
||||||
this.innerAudioContext.onError((res) => {
|
this.innerAudioContext.onError((res) => {
|
||||||
console.log(res.errMsg);
|
console.log(res);
|
||||||
console.log(res.errCode);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backTohome(){
|
backTohome(){
|
||||||
this.innerAudioContext.stop()
|
this.innerAudioContext && this.innerAudioContext.stop()
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url:'../../../pages/tabbar/home/home'
|
url:'../../../pages/tabbar/home/home'
|
||||||
})
|
})
|
||||||
@@ -232,7 +263,7 @@
|
|||||||
this.showtitle =false
|
this.showtitle =false
|
||||||
},
|
},
|
||||||
gotoPay(){
|
gotoPay(){
|
||||||
this.innerAudioContext.stop()
|
this.innerAudioContext && this.innerAudioContext.stop()
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||||
})
|
})
|
||||||
@@ -242,32 +273,28 @@
|
|||||||
this.secondChannelCode = sec
|
this.secondChannelCode = sec
|
||||||
},
|
},
|
||||||
siteQrPay() {
|
siteQrPay() {
|
||||||
this.innerAudioContext.stop()
|
this.innerAudioContext && this.innerAudioContext.stop()
|
||||||
// let siteId =
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}`
|
url: `/BagStation/pages/stationDetail/stieQr?siteId=${this.siteId}&activeChannelCode=${this.activeChannelCode}&secondChannelCode=${this.secondChannelCode}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSiteInfo(id) {
|
getSiteInfo(id) {
|
||||||
console.log('进入获取油站信息')
|
|
||||||
let data2 = {
|
let data2 = {
|
||||||
...uni.getStorageSync('location'),
|
...uni.getStorageSync('location'),
|
||||||
siteId: id,
|
siteId: id,
|
||||||
clientBelong: "ZHONGPIN"
|
clientBelong: "ZHONGPIN"
|
||||||
}
|
}
|
||||||
oilSiteApi.getSiteDetails(data2).then(res => {
|
oilSiteApi.getSiteDetails(data2).then(res => {
|
||||||
console.log('进入获取油站信息getSiteDetails',res)
|
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.siteInfo = res.data
|
this.siteInfo = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
makePay() {
|
makePay() {
|
||||||
console.log(this.siteInfo.juli)
|
|
||||||
if(this.siteInfo.juli > 1000 ){
|
if(this.siteInfo.juli > 1000 ){
|
||||||
this.showtitle = true
|
this.showtitle = true
|
||||||
}else{
|
}else{
|
||||||
this.innerAudioContext.stop()
|
this.innerAudioContext && this.innerAudioContext.stop()
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}&activeCur=${this.activeCur}`
|
||||||
})
|
})
|
||||||
@@ -295,10 +322,11 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
goBack() {
|
goBack() {
|
||||||
this.innerAudioContext.stop()
|
// this.innerAudioContext.stop()
|
||||||
uni.navigateBack({
|
|
||||||
|
|
||||||
})
|
uni.switchTab({
|
||||||
|
url: '/pages/tabbar/home/home'
|
||||||
|
});
|
||||||
},
|
},
|
||||||
selectRadio() {
|
selectRadio() {
|
||||||
this.radio === 'A' ? this.radio = '' : this.radio = 'A'
|
this.radio === 'A' ? this.radio = '' : this.radio = 'A'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="cu-item cur padding no-mr-border site-item" :style="{height:siteItem.oilProductCodeAndPrices.length>3?'220rpx !important':listHeight?listHeight + 'rpx !important':''}">
|
<view class="cu-item cur padding no-mr-border site-item" :style="{height:siteItem.oilProductCodeAndPrices && siteItem.oilProductCodeAndPrices.length>3?'220rpx !important':listHeight?listHeight + 'rpx !important':''}">
|
||||||
<view class="cu-avatar radius lg "
|
<view class="cu-avatar radius lg "
|
||||||
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
|
:style="'background-image:url('+(siteItem.siteImages?siteItem.siteImages:defaultLogo)+');'">
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
...uni.getStorageSync('location'),
|
...uni.getStorageSync('location'),
|
||||||
...this.filterData,
|
...this.filterData,
|
||||||
comprehensiveSort:1,
|
comprehensiveSort:1,
|
||||||
|
zpDisable:'ENABLE',
|
||||||
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||||
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||||
// oilProductCode: "" // 备注:// 油号选择 ( 0# 92# 92#)
|
// oilProductCode: "" // 备注:// 油号选择 ( 0# 92# 92#)
|
||||||
|
|||||||
@@ -489,25 +489,26 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getSiteList() {
|
getSiteList() {
|
||||||
let data1 = {
|
let params = {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
params: { //类型:Object 必有字段 备注:// 筛选对象
|
params: { //类型:Object 必有字段 备注:// 筛选对象
|
||||||
clientBelong:'ZHONGPIN',
|
|
||||||
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
|
||||||
// longitude: 117.157817, // 必有字段 备注:// 当前位置经度
|
// longitude: 117.157817, // 必有字段 备注:// 当前位置经度
|
||||||
// latitude: 31.802472, // 必有字段 备注:// 当前位置维度
|
// latitude: 31.802472, // 必有字段 备注:// 当前位置维度
|
||||||
...uni.getStorageSync('location'),
|
|
||||||
...this.filterData,
|
|
||||||
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||||
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||||
// oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#)
|
// oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#)
|
||||||
comprehensiveSort:1
|
clientBelong:'ZHONGPIN',
|
||||||
|
comprehensiveSort:1,
|
||||||
|
zpDisable:'ENABLE',
|
||||||
|
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
||||||
|
...uni.getStorageSync('location'),
|
||||||
|
...this.filterData,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!uni.getStorageSync('user')) {
|
if (!uni.getStorageSync('user')) {
|
||||||
oilSiteApi.readOnlySites(data1).then(res => {
|
oilSiteApi.readOnlySites(params).then(res => {
|
||||||
this.getCount++
|
this.getCount++
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
// console.log(res.data.list)
|
// console.log(res.data.list)
|
||||||
@@ -542,10 +543,8 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log(data1,'dayindata111111111111')
|
oilSiteApi.getSiteLists(params).then(res => {
|
||||||
oilSiteApi.getSiteLists(data1).then(res => {
|
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
// console.log(res.data.list)
|
|
||||||
this.siteList = res.data.list
|
this.siteList = res.data.list
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -553,7 +552,8 @@
|
|||||||
},
|
},
|
||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
let itemS = encodeURIComponent(JSON.stringify(item))
|
let itemS = encodeURIComponent(JSON.stringify(item))
|
||||||
console.log(itemS)
|
// console.log(uni.getStorageSync('user'))
|
||||||
|
// return
|
||||||
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}`,
|
||||||
|
|||||||
@@ -384,16 +384,14 @@
|
|||||||
siteName: this.siteName,
|
siteName: this.siteName,
|
||||||
...uni.getStorageSync('location'),
|
...uni.getStorageSync('location'),
|
||||||
// ...this.filterData
|
// ...this.filterData
|
||||||
siteBrand: this.siteName ? '' : this.filterData
|
siteBrand: this.siteName ? '' : this.filterData.siteBrand, // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||||
.siteBrand, // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
channelCode: this.siteName ? '' : this.filterData.channelCode, // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||||
channelCode: this.siteName ? '' : this.filterData
|
oilProductCode: this.siteName ? '' : this.filterData.oilProductCode, // 备注:// 油号选择 ( 0# 92# 92#)
|
||||||
.channelCode, // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
|
||||||
oilProductCode: this.siteName ? '' : this.filterData
|
|
||||||
.oilProductCode, // 备注:// 油号选择 ( 0# 92# 92#)
|
|
||||||
provinceCode: this.filterData.provinceCode,
|
provinceCode: this.filterData.provinceCode,
|
||||||
cityCode: this.filterData.cityCode,
|
cityCode: this.filterData.cityCode,
|
||||||
areaCode: this.filterData.areaCode,
|
areaCode: this.filterData.areaCode,
|
||||||
distance: this.filterData.distance,
|
distance: this.filterData.distance,
|
||||||
|
zpDisable:'ENABLE',
|
||||||
comprehensiveSort: this.filterData.comprehensiveSort ? this.filterData.comprehensiveSort : 1
|
comprehensiveSort: this.filterData.comprehensiveSort ? this.filterData.comprehensiveSort : 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ 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 = 'production'
|
||||||
const testUrl = 'http://192.168.0.23:38080'
|
const testUrl = 'http://192.168.110.230: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,
|
||||||
@@ -54,8 +54,8 @@ service.interceptors.request.use(
|
|||||||
config.data = data
|
config.data = data
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
console.log('\n\n-----------------------')
|
// console.log('\n\n-----------------------')
|
||||||
console.log('参数', config.url, '参数加密前', config.data)
|
// console.log('参数', config.url, '参数加密前', config.data)
|
||||||
url = config.url
|
url = config.url
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,8 +84,8 @@ service.interceptors.response.use(
|
|||||||
// console.log('返回', response.config.url, '返回结果',res)
|
// console.log('返回', response.config.url, '返回结果',res)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('返回', response.config.url, '返回结果未加密', res)
|
// console.log('返回', response.config.url, '返回结果未加密', res)
|
||||||
console.log('-------------------------------------------\n\n')
|
// console.log('-------------------------------------------\n\n')
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
|||||||
Reference in New Issue
Block a user