更新
This commit is contained in:
2
App.vue
2
App.vue
@@ -81,7 +81,7 @@
|
||||
onShareAppMessage(e) {
|
||||
let that = this
|
||||
wx.onAppRoute((res) => {
|
||||
console.log(res, '当前页面路由发生变化 触发该事件onShareAppMessage');
|
||||
// console.log(res, '当前页面路由发生变化 触发该事件onShareAppMessage');
|
||||
const pages = getCurrentPages() //获取加载的页面
|
||||
const view = pages[pages.length - 1] //获取当前页面的对象
|
||||
if (!view) return false //如果不存在页面对象 则返回
|
||||
|
||||
@@ -104,13 +104,13 @@
|
||||
this.otherUser = true
|
||||
uni.clearStorageSync()
|
||||
this.weChatLogin(option)
|
||||
console.log('当前为卡力用户')
|
||||
// console.log('当前为卡力用户')
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
let IsOtherUser = uni.getStorageSync('isOther')
|
||||
console.log('这里是onload',IsOtherUser)
|
||||
// console.log('这里是onload',IsOtherUser)
|
||||
if(IsOtherUser){
|
||||
uni.showToast({
|
||||
title:'卡力用户仅支持跳转登录',
|
||||
@@ -121,13 +121,13 @@
|
||||
} else{
|
||||
this.weChatLogin()
|
||||
}
|
||||
console.log('小程序跳转参数接收onLoad----')
|
||||
console.log('姓名:',option.driverName)
|
||||
console.log('公司ID:',option.companyId)
|
||||
console.log('车牌号:',option.plateNumber)
|
||||
console.log('油站Id:',option.siteId)
|
||||
console.log('--------------------------')
|
||||
console.log('这里是登录')
|
||||
// console.log('小程序跳转参数接收onLoad----')
|
||||
// console.log('姓名:',option.driverName)
|
||||
// console.log('公司ID:',option.companyId)
|
||||
// console.log('车牌号:',option.plateNumber)
|
||||
// console.log('油站Id:',option.siteId)
|
||||
// console.log('--------------------------')
|
||||
// console.log('这里是登录')
|
||||
},
|
||||
methods: {
|
||||
weChatLogin(option){
|
||||
|
||||
@@ -353,9 +353,9 @@
|
||||
},
|
||||
moneyFormat(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log('old:',value)
|
||||
// console.log('old:',value)
|
||||
let realAmount =(parseInt(value * 100) / 100).toFixed(2)
|
||||
console.log('new:',realAmount)
|
||||
// console.log('new:',realAmount)
|
||||
return realAmount
|
||||
} else {
|
||||
return value
|
||||
|
||||
@@ -156,9 +156,9 @@
|
||||
},
|
||||
moneyFormat(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log('old:', value)
|
||||
// console.log('old:', value)
|
||||
let realAmount = Math.floor(value * 100) / 100
|
||||
console.log('new:', realAmount)
|
||||
// console.log('new:', realAmount)
|
||||
// return realAmount
|
||||
return Number(value).toFixed(2)
|
||||
} else {
|
||||
|
||||
@@ -354,9 +354,9 @@
|
||||
},
|
||||
moneyFormat(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log('old:',value)
|
||||
// console.log('old:',value)
|
||||
let realAmount =(parseInt(value * 100) / 100).toFixed(2)
|
||||
console.log('new:',realAmount)
|
||||
// console.log('new:',realAmount)
|
||||
return realAmount
|
||||
} else {
|
||||
return value
|
||||
|
||||
@@ -651,7 +651,7 @@
|
||||
})
|
||||
},
|
||||
getFilterData(v, c) { //v:油站油品 c:油站渠道
|
||||
console.log('111111111111111111111111111111111111111111111111111111111111111')
|
||||
// console.log('111111111111111111111111111111111111111111111111111111111111111')
|
||||
oilSiteApi.getCheckInfo().then(res => {
|
||||
if (res.code == 20000) {
|
||||
let channelCodes = []
|
||||
|
||||
@@ -207,9 +207,9 @@
|
||||
},
|
||||
numberFilter(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log('old:',value)
|
||||
// console.log('old:',value)
|
||||
let realAmount =(Math.round(value * 100) / 100).toFixed(2)
|
||||
console.log('new:',realAmount)
|
||||
// console.log('new:',realAmount)
|
||||
return realAmount
|
||||
} else {
|
||||
// console.log('old:',value)
|
||||
|
||||
@@ -210,9 +210,9 @@
|
||||
},
|
||||
numberFilter(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log('old:',value)
|
||||
// console.log('old:',value)
|
||||
let realAmount =(Math.round(value * 100) / 100).toFixed(2)
|
||||
console.log('new:',realAmount)
|
||||
// console.log('new:',realAmount)
|
||||
return realAmount
|
||||
} else {
|
||||
return value
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
query.select('.activity-cu').boundingClientRect(data => {undefined
|
||||
|
||||
console.log(data,'1111111111111111111')
|
||||
// console.log(data,'1111111111111111111')
|
||||
if(data){
|
||||
this.mHeight = this.mHeight + data.height*2
|
||||
}
|
||||
@@ -108,7 +108,7 @@
|
||||
}
|
||||
},
|
||||
speedMark(val,data){
|
||||
console.log(val,data,'qqqqqqqqqqqqqqqqqqqqqq')
|
||||
// console.log(val,data,'qqqqqqqqqqqqqqqqqqqqqq')
|
||||
if(val == 0){
|
||||
if(data == '0'){
|
||||
return '普通'
|
||||
@@ -127,7 +127,7 @@
|
||||
},
|
||||
filters: {
|
||||
channelCodeFamt(value) {
|
||||
console.log(value)
|
||||
// console.log(value)
|
||||
if (value == null || value == '' ) {
|
||||
return '未知'
|
||||
// 渠道编码 ( XOIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('mounted')
|
||||
// console.log('mounted')
|
||||
},
|
||||
onLoad(option) {
|
||||
this.option = option;
|
||||
@@ -62,7 +62,7 @@
|
||||
onReady(option) {},
|
||||
methods: {
|
||||
versionUpdate() {
|
||||
console.log('versionUpdate')
|
||||
// console.log('versionUpdate')
|
||||
let that = this
|
||||
const updateManager = uni.getUpdateManager();
|
||||
updateManager.onCheckForUpdate(function(res) {
|
||||
@@ -94,8 +94,8 @@
|
||||
});
|
||||
},
|
||||
initFn(option) {
|
||||
console.log(option, '启动页');
|
||||
console.log(`%c 二维码进入 ${option.scene}`, 'color:red;font-size:50px')
|
||||
// console.log(option, '启动页');
|
||||
// console.log(`%c 二维码进入 ${option.scene}`, 'color:red;font-size:50px')
|
||||
const token = uni.getStorageSync('Authorization')
|
||||
const openid = uni.getStorageSync('openid')
|
||||
this.key = ''
|
||||
|
||||
@@ -358,8 +358,8 @@
|
||||
onLoad(e) {
|
||||
let _that = this
|
||||
let IsOtherUser = _that.isOther
|
||||
console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
console.log('这里是onLoad', IsOtherUser, '++++++')
|
||||
// console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
// console.log('这里是onLoad', IsOtherUser, '++++++')
|
||||
if (IsOtherUser) {
|
||||
console.log('首页 卡力 进入')
|
||||
uni.showToast({
|
||||
@@ -371,7 +371,7 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
console.log('首页 非卡力 进入测试++')
|
||||
// console.log('首页 非卡力 进入测试++')
|
||||
this.reverseGeocoder(this.location);
|
||||
setTimeout(()=>{
|
||||
let startParamsData = uni.getStorageSync('isJump')||null;
|
||||
@@ -527,8 +527,8 @@
|
||||
if (res.code === 20000) {
|
||||
let _that = this
|
||||
let IsOtherUser = _that.isOther
|
||||
console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
console.log('这里是getUserAuthInfo', IsOtherUser, '++++++')
|
||||
// console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||
// console.log('这里是getUserAuthInfo', IsOtherUser, '++++++')
|
||||
if (IsOtherUser) {
|
||||
uni.showToast({
|
||||
title: '卡力用户只支持跳转登录',
|
||||
@@ -785,9 +785,7 @@
|
||||
}
|
||||
},
|
||||
toDetail(item) {
|
||||
console.log(item)
|
||||
let itemS = JSON.stringify(item)
|
||||
console.log('进入油站详情items', itemS)
|
||||
if (uni.getStorageSync('user')) {
|
||||
if (item.channelCode === 'TY') {
|
||||
uni.setStorageSync('OtherSiteInfo', item)
|
||||
|
||||
@@ -245,9 +245,9 @@
|
||||
onLoad() {
|
||||
if (!uni.getStorageSync('filterDatas')) {
|
||||
this.getFilterData()
|
||||
console.log('dhgiuhihqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq')
|
||||
// console.log('dhgiuhihqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq')
|
||||
} else{
|
||||
console.log('dhgiuhihiiiiiiiiiiiiiiiiiiiiiiiiiiiii')
|
||||
// console.log('dhgiuhihiiiiiiiiiiiiiiiiiiiiiiiiiiiii')
|
||||
}
|
||||
this.findPriceDetails()
|
||||
if (uni.getStorageSync('productCodeList')) {
|
||||
@@ -343,6 +343,7 @@
|
||||
}
|
||||
},
|
||||
ureaToDetail(list){
|
||||
|
||||
let itemS = JSON.stringify(list)
|
||||
if (uni.getStorageSync('user')) {
|
||||
uni.navigateTo({
|
||||
@@ -606,9 +607,10 @@
|
||||
|
||||
// },
|
||||
toDetail(item) {
|
||||
console.log(item)
|
||||
console.log('这里是进入前')
|
||||
// console.log(item)
|
||||
// console.log('这里是进入前')
|
||||
let itemS = JSON.stringify(item)
|
||||
|
||||
if (uni.getStorageSync('user')) {
|
||||
if(item.channelCode==='TY'){
|
||||
uni.setStorageSync('OtherSiteInfo',item)
|
||||
|
||||
@@ -3,16 +3,16 @@ import utils from '@/utils/encode'
|
||||
// const env = process.env.NODE_ENV
|
||||
// const env = 'production'/* */
|
||||
// const env = 'test'
|
||||
const env = 'production'
|
||||
const env = 'test'
|
||||
// 45
|
||||
const testUrl = 'http://192.168.0.23:38080'
|
||||
const testUrl = 'http://192.168.110.230:38080'
|
||||
// const productUrl = 'https://www.xingoil.com/adminapi'
|
||||
|
||||
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
|
||||
})
|
||||
@@ -22,7 +22,7 @@ service.interceptors.request.use(
|
||||
config => {
|
||||
// 拦截请求
|
||||
closeShowLoading = config?.closeShowLoading||false;
|
||||
console.log(closeShowLoading,'isLoadingisLoadingisLoading')
|
||||
// console.log(closeShowLoading,'isLoadingisLoadingisLoading')
|
||||
if(!closeShowLoading){
|
||||
//判断是否自动开始请求loading
|
||||
uni.showLoading({
|
||||
@@ -44,7 +44,7 @@ service.interceptors.request.use(
|
||||
config.headers['dataSources'] = 'MP'
|
||||
|
||||
if (env === 'production') {
|
||||
console.log("这里是生产")
|
||||
// console.log("这里是生产")
|
||||
// 生产环境,加密,不输出任何东西
|
||||
// 设置jsessionid和token
|
||||
const JSESSIONID = utils.uuid()
|
||||
@@ -58,13 +58,13 @@ service.interceptors.request.use(
|
||||
}
|
||||
// 要加密
|
||||
data.params = utils.encrypt(JSON.stringify(config.data))
|
||||
console.log('参数', config.url, '参数加密前', config.data, '加密:', data)
|
||||
// console.log('参数', config.url, '参数加密前', config.data, '加密:', data)
|
||||
config.data = data
|
||||
// }
|
||||
} else {
|
||||
console.log("这里是测试")
|
||||
console.log('\n\n-----------------------')
|
||||
console.log('参数', config.url, '参数加密前', config.data)
|
||||
// console.log("这里是测试")
|
||||
// console.log('\n\n-----------------------')
|
||||
// console.log('参数', config.url, '参数加密前', config.data)
|
||||
url = config.url
|
||||
}
|
||||
|
||||
@@ -91,11 +91,11 @@ service.interceptors.response.use(
|
||||
// 加密的数据,需要解密
|
||||
const dataParam = JSON.parse(utils.decrypt(res.data))
|
||||
res.data = JSON.stringify(dataParam) === '{}' ? null : dataParam
|
||||
console.log(res.data)
|
||||
// console.log(res.data)
|
||||
// console.log('返回', response.config.url, '返回结果',res)
|
||||
}
|
||||
} else {
|
||||
console.log('返回', response.config.url, '返回结果未加密', res)
|
||||
// console.log('返回', response.config.url, '返回结果未加密', res)
|
||||
// console.log('-------------------------------------------\n\n')
|
||||
}
|
||||
if(!closeShowLoading){
|
||||
@@ -104,7 +104,7 @@ service.interceptors.response.use(
|
||||
}
|
||||
if (response.config.url.indexOf('/oil-site/oilSiteOrderInfo/getOrderQrCode') === -1) {
|
||||
if (response.config.url.indexOf('/oil-site/oilSiteAppInfo/getSiteDetails') != -1) {
|
||||
console.log('这里是getSiteDetails 拦截处')
|
||||
// console.log('这里是getSiteDetails 拦截处')
|
||||
// if (res.code != 20000&&res.msg!='令牌为空,不允许操作'&&res.msg!='您的ip已经更改,请重新登录'&&res.msg!='登录与操作设备不同') {
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
|
||||
Reference in New Issue
Block a user