Compare commits
6 Commits
lixuan
...
736b352f8d
| Author | SHA1 | Date | |
|---|---|---|---|
| 736b352f8d | |||
|
|
953f687615 | ||
| 71e8a5c851 | |||
|
|
832f959f9b | ||
|
|
7247973c63 | ||
|
|
84613456a7 |
@@ -131,7 +131,12 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
weChatLogin(option){
|
weChatLogin(option){
|
||||||
uni.clearStorageSync()
|
let isJump = uni.getStorageSync('isJump');
|
||||||
|
|
||||||
|
uni.clearStorageSync();
|
||||||
|
if(isJump){
|
||||||
|
uni.setStorageSync('isJump',isJump)
|
||||||
|
}
|
||||||
this.refreshLocation()
|
this.refreshLocation()
|
||||||
let _that = this
|
let _that = this
|
||||||
uni.login({
|
uni.login({
|
||||||
|
|||||||
@@ -135,8 +135,8 @@
|
|||||||
uni.setStorageSync('loginOut', true)
|
uni.setStorageSync('loginOut', true)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
// url: '/BagAuth/pages/login/login'
|
url: '/BagAuth/pages/login/login'
|
||||||
url:'/BagAuth/pages/login/oldLogin'
|
// url:'/BagAuth/pages/login/oldLogin'
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="padding-top">
|
<view class="padding-top">
|
||||||
<scroll-view scroll-x class=" nav text-center">
|
<scroll-view scroll-x class=" nav text-center">
|
||||||
<view class="cu-item" v-for="(item,index) in channelList" :class="index==TabCur?'text-red cur':''" :key="item.channelId"
|
<view class="cu-item" v-for="(item,index) in channelList" :class="index==TabCur?'text-red cur':''"
|
||||||
@tap="tabSelect" :data-id="index">
|
:key="item.channelId" @tap="tabSelect" :data-id="index">
|
||||||
<image class="site-icon margin-right-sm" :src="imgURL+'site-'+item.channelCode+'.png'" mode="widthFix">
|
<image class="site-icon margin-right-sm" :src="imgURL+'site-'+item.channelCode+'.png'" mode="widthFix">
|
||||||
</image>
|
</image>
|
||||||
{{item.channelCode|channelCodeFamt}}
|
{{item.channelCode|channelCodeFamt}}
|
||||||
@@ -28,11 +28,20 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 油站特色 -->
|
<!-- 油站特色 -->
|
||||||
<view v-if="ts" class="bg-gray padding-top-sm ">
|
<view v-if="ts" class="bg-gray padding-top-sm ">
|
||||||
|
<view @click="goFinancial" style="margin-bottom: 20rpx;" class="bg-white padding ">
|
||||||
|
<view class="advertisement_body">
|
||||||
|
<view class="advertisement_body_label">车辆评估</view>
|
||||||
|
<view>评估分数+改善建议,组合报告查询8.8折</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="bg-white padding ">
|
<view class="bg-white padding ">
|
||||||
<text>油站特色</text>
|
<text>油站特色</text>
|
||||||
<view class="">
|
<view class="">
|
||||||
<text style="margin-top: 20rpx;margin-left: 0;" class="cu-tag line-yellow margin-right-xs" v-for="(itemy,index) in tagList" :key="index">{{itemy}}</text>
|
<text style="margin-top: 20rpx;margin-left: 0;" class="cu-tag line-yellow margin-right-xs"
|
||||||
<text style="margin-top: 20rpx;margin-left: 0;height: auto;line-height: 20px;" v-if="channelPrice.activitySwitch" class="cu-tag line-yellow margin-right-xs">{{channelPrice.activityContent}}</text>
|
v-for="(itemy,index) in tagList" :key="index">{{itemy}}</text>
|
||||||
|
<text style="margin-top: 20rpx;margin-left: 0;height: auto;line-height: 20px;"
|
||||||
|
v-if="channelPrice.activitySwitch"
|
||||||
|
class="cu-tag line-yellow margin-right-xs">{{channelPrice.activityContent}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -40,6 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Financial from '@/api/Financial.js'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
channelPrice: {
|
channelPrice: {
|
||||||
@@ -63,6 +73,7 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
activeChannelCode() {
|
activeChannelCode() {
|
||||||
if (this.channelList.length && this.channelList[this.TabCur]) {
|
if (this.channelList.length && this.channelList[this.TabCur]) {
|
||||||
let channelCode = this.channelList[this.TabCur].channelCode
|
let channelCode = this.channelList[this.TabCur].channelCode
|
||||||
@@ -100,6 +111,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goFinancial(){
|
||||||
|
const user = uni.getStorageSync('user');
|
||||||
|
if(user){
|
||||||
|
Financial.findHomePageReport({customerId:user.id}).then(res=>{
|
||||||
|
if(res.data){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'../../../Financial/pages/index?guide=1'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先登录!',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
tabSelect(e) {
|
tabSelect(e) {
|
||||||
this.TabCur = e.currentTarget.dataset.id;
|
this.TabCur = e.currentTarget.dataset.id;
|
||||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||||
@@ -115,7 +147,9 @@
|
|||||||
// console.log(String(value).split('.')[1].substring(2,4),String(value).split('.')[1].length,'*-*-*-*-');
|
// console.log(String(value).split('.')[1].substring(2,4),String(value).split('.')[1].length,'*-*-*-*-');
|
||||||
// console.log( Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01,'************');
|
// console.log( Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01,'************');
|
||||||
// return String(value).split('.')[1]&&String(value).split('.')[1].length>2? Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01 :Number(value).toFixed(2);
|
// return String(value).split('.')[1]&&String(value).split('.')[1].length>2? Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01 :Number(value).toFixed(2);
|
||||||
return String(value).split('.')[1]&&String(value).split('.')[1].length>2?Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`).toFixed(2) :Number(value).toFixed(2);
|
return String(value).split('.')[1] && String(value).split('.')[1].length > 2 ? Number(
|
||||||
|
`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`
|
||||||
|
).toFixed(2) : Number(value).toFixed(2);
|
||||||
} else {
|
} else {
|
||||||
return Number(value).toFixed(2)
|
return Number(value).toFixed(2)
|
||||||
}
|
}
|
||||||
@@ -162,6 +196,30 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.advertisement_body_label {
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
padding: 10rpx 35rpx 10rpx 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
border-right: 0px solid;
|
||||||
|
background-image: linear-gradient(32deg, #FF9000 70%, rgba(255, 255, 255, 0) 50%), linear-gradient(148deg, #FF9000 70%, rgba(255, 255, 255, 0) 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.advertisement_body {
|
||||||
|
width: 100%;
|
||||||
|
height: 69rpx;
|
||||||
|
background: rgba(255, 144, 0, 0.2);
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
|
opacity: 1;
|
||||||
|
color: #FF9000;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
/* justify-content: center; */
|
||||||
|
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.site-icon {
|
.site-icon {
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="seach_input_right">
|
<view class="seach_input_right">
|
||||||
<input v-model="seachValue" placeholder="请输入地址" type="text" @confirm="seachFn" />
|
<input v-model="seachValue" placeholder="请输入地址" type="text" @confirm="seachFn" />
|
||||||
|
<view @click="seachFn" class="seach_input_butten"> 搜索</view>
|
||||||
<!-- <uni-combox @input="seachFn" emptyTips="请输入内容" class="seach_input_right_input" :border="false" :candidates="candidates" placeholder="Location..."></uni-combox> -->
|
<!-- <uni-combox @input="seachFn" emptyTips="请输入内容" class="seach_input_right_input" :border="false" :candidates="candidates" placeholder="Location..."></uni-combox> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -132,6 +133,7 @@
|
|||||||
that.List = e.data
|
that.List = e.data
|
||||||
},
|
},
|
||||||
fail(e) {
|
fail(e) {
|
||||||
|
that.loding(false);
|
||||||
console.log(e, '错误')
|
console.log(e, '错误')
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -149,6 +151,14 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.seach_input_butten{
|
||||||
|
color: #FF6700;
|
||||||
|
height: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
.list_item_samall_size {
|
.list_item_samall_size {
|
||||||
color: #BBBBBB;
|
color: #BBBBBB;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@@ -199,8 +209,9 @@
|
|||||||
|
|
||||||
.seach_input_right {
|
.seach_input_right {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left: 20rpx;
|
margin:0 10rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.seach_input_left {
|
.seach_input_left {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view >
|
<view >
|
||||||
<view @touchend='touchend' @touchmove='touchmove' @touchstart='onChange'
|
<view @touchend.stop.prevent ='touchend' @touchmove.stop.prevent ='touchmove' @touchstart.stop.prevent ='onChange'
|
||||||
style="display: flex;flex-direction: column;flex-wrap: wrap;z-index: 9999999999999999999999999 !important;"
|
style="display: flex;flex-direction: column;flex-wrap: wrap;z-index: 9999999999999999999999999 !important;"
|
||||||
:style="{height:isShow.switchBar?`calc(${styles.height}rpx + ${styles.move}rpx )`: ` calc( ${styles.move}rpx + 150rpx)` }"
|
:style="{height:isShow.switchBar?`calc(${styles.height}rpx + ${styles.move}rpx )`: ` calc( ${styles.move}rpx + 150rpx)` }"
|
||||||
:class="styles.open? 'serviceStation_body' :'seleServiceStation_body' ">
|
:class="styles.open? 'serviceStation_body' :'seleServiceStation_body' ">
|
||||||
<view @click.stop="switchBar()" class="switchBar"></view>
|
<view id="switchBar" @tap.stop="switchBar()" class="switchBar"></view>
|
||||||
<view style="flex: 1; overflow: hidden; width: 100%; ">
|
<view style="flex: 1; overflow: hidden; width: 100%; ">
|
||||||
<view style="" class="information">
|
<view style="" class="information">
|
||||||
<view class="information_left">
|
<view class="information_left">
|
||||||
@@ -49,9 +49,9 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="serviceStation_footer">
|
<view class="serviceStation_footer">
|
||||||
<view @click.stop="Navigation" style="background-color: #8B583E;" class="serviceStation_footer_butten">导航
|
<view id="Navigation" @tap.stop="Navigation" style="background-color: #8B583E;" class="serviceStation_footer_butten">导航
|
||||||
</view>
|
</view>
|
||||||
<view @tap.stop="jump" style="background-color: #FF6700;" class="serviceStation_footer_butten">详情</view>
|
<view id="jump" @tap.stop="jump" style="background-color: #FF6700;" class="serviceStation_footer_butten">详情</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -139,12 +139,15 @@
|
|||||||
},
|
},
|
||||||
//开始滑动
|
//开始滑动
|
||||||
onChange(e) {
|
onChange(e) {
|
||||||
console.log('开始滑动');
|
if(e.target.id){
|
||||||
|
this[e.target.id]()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log(e.target.id,'开始滑动');
|
||||||
this.$emit('dragMap', this.details, false)
|
this.$emit('dragMap', this.details, false)
|
||||||
// 这一行为记录滑动位置代码 this.styles.Y = e.changedTouches[0].clientY + this.styles.move;
|
// 这一行为记录滑动位置代码 this.styles.Y = e.changedTouches[0].clientY + this.styles.move;
|
||||||
this.styles.open = true;
|
this.styles.open = true;
|
||||||
this.styles.Y = e.changedTouches[0].clientY;
|
this.styles.Y = e.changedTouches[0].clientY;
|
||||||
console.log(e,'onChange')
|
|
||||||
},
|
},
|
||||||
// 滑动完成
|
// 滑动完成
|
||||||
touchend(e) {
|
touchend(e) {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
var date = new Date();
|
var date = new Date();
|
||||||
var seperator1 = "-";
|
var seperator1 = "-";
|
||||||
var year = date.getFullYear();
|
var year = date.getFullYear();
|
||||||
var month = date.getMonth() + 1;
|
var month = date.getMonth() ;
|
||||||
var strDate = date.getDate();
|
var strDate = date.getDate();
|
||||||
if (month >= 1 && month <= 9) {
|
if (month >= 1 && month <= 9) {
|
||||||
month = "0" + month;
|
month = "0" + month;
|
||||||
|
|||||||
@@ -229,7 +229,8 @@
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
params: {
|
params: {
|
||||||
platenumOrVinnum: ''
|
platenumOrVinnum: '',
|
||||||
|
createSource:'XOIL-COMPANY'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
counter:0,
|
||||||
ReconfirmData: [{
|
ReconfirmData: [{
|
||||||
label: '车牌号码',
|
label: '车牌号码',
|
||||||
value: 'platenumOrVinnum',
|
value: 'platenumOrVinnum',
|
||||||
@@ -173,7 +174,8 @@
|
|||||||
lastQueryDate: seniorPage.lastQueryDate,
|
lastQueryDate: seniorPage.lastQueryDate,
|
||||||
appId: 'wx7a939c19b270cc3d',
|
appId: 'wx7a939c19b270cc3d',
|
||||||
openId: uni.getStorageSync('openid'),
|
openId: uni.getStorageSync('openid'),
|
||||||
unionId: uni.getStorageSync('unionid')
|
unionId: uni.getStorageSync('unionid'),
|
||||||
|
createSource:'XOIL-COMPANY'
|
||||||
}
|
}
|
||||||
this.$refs.Reconfirm.open()
|
this.$refs.Reconfirm.open()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -202,28 +204,53 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goEstimate() {
|
goEstimate(payRecordId) {
|
||||||
|
let that = this
|
||||||
let user = uni.getStorageSync('user');
|
let user = uni.getStorageSync('user');
|
||||||
console.log(user, 'user')
|
let data = {
|
||||||
Financial.findHomePageReport({
|
customerId: user.id,
|
||||||
customerId: user.id
|
payRecordId
|
||||||
}).then(res => {
|
}
|
||||||
if (res.data) {
|
console.log(data,'datadatadatadata')
|
||||||
console.log(res.data, 'res.data')
|
Financial.findHomePageReport(data).then(res => {
|
||||||
|
if (Boolean(Number(res.data?.isThereIsNewData))) {
|
||||||
|
this.toEstimate(res.data)
|
||||||
|
} else {
|
||||||
|
if(this.counter>=3){
|
||||||
|
uni.hideLoading();
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '很抱歉,您的车辆可能因非重载货车或长时间未在公路行驶,所以无法查询到您的车辆数据,您所支付的款项将在48小时内原路退回',
|
||||||
|
success: function (res) {
|
||||||
|
that.counter = 0
|
||||||
|
if (res.confirm) {
|
||||||
|
console.log('用户点击确定');
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},1000)
|
||||||
|
return
|
||||||
|
}else{
|
||||||
|
this.counter++;
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.goEstimate(payRecordId)
|
||||||
|
},3000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toEstimate(data){
|
||||||
|
uni.hideLoading();
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: `/Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`,
|
url: `/Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(data))}`,
|
||||||
|
success() {},
|
||||||
fail(e) {
|
fail(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title:'更新评估报告错误',
|
|
||||||
icon:'error'
|
|
||||||
})
|
|
||||||
console.log('更新评估报告错误')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
submit(e) {
|
submit(e) {
|
||||||
let that = this
|
let that = this
|
||||||
@@ -237,7 +264,13 @@
|
|||||||
success() {
|
success() {
|
||||||
that.$refs.Reconfirm.close();
|
that.$refs.Reconfirm.close();
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
that.goEstimate()
|
uni.showLoading({
|
||||||
|
title: '报告获取中',
|
||||||
|
mask:true
|
||||||
|
});
|
||||||
|
},1000)
|
||||||
|
setTimeout(()=>{
|
||||||
|
that.goEstimate(res.data.outTradeNo)
|
||||||
},2000)
|
},2000)
|
||||||
},
|
},
|
||||||
complete() {
|
complete() {
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ export default {
|
|||||||
return request({
|
return request({
|
||||||
url: `/oil-interfaces/xoilSinoiovCustomerRiskevalReport/findHomePageReport`,
|
url: `/oil-interfaces/xoilSinoiovCustomerRiskevalReport/findHomePageReport`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data,
|
||||||
|
closeShowLoading:true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取支付记录
|
//获取支付记录
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<view style="display: flex;" class="listTages">
|
<view style="display: flex;" class="listTages">
|
||||||
<view :style="{background:siteItem.siteType==1?'#FF6700':'#00c15e'}" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteType==1?'加油站':'加气站'}}</view>
|
<view :style="{background:siteItem.siteType==1?'#FF6700':'#00c15e'}" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteType==1?'加油站':'加气站'}}</view>
|
||||||
<view class="cu-tag round bg-self--dark-blue yu-tag text-xs" v-show="siteItem.ureaNumber>0">尿素</view>
|
<view class="cu-tag round bg-self--dark-blue yu-tag text-xs" v-show="siteItem.ureaNumber>0">尿素</view>
|
||||||
<view v-if="siteItem.siteLevel" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteLevel}}级</view>
|
<!-- <view v-if="siteItem.siteLevel" class=" cu-tag round bg-self--dark-yellow yu-tag text-xs">{{siteItem.siteLevel}}级</view> -->
|
||||||
<view class="cu-tag round bg-self-yellow yu-tag text-xs" :class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}</view>
|
<view class="cu-tag round bg-self-yellow yu-tag text-xs" :class="siteItem.channelCode=='XOIL'?'tag-red':''">{{siteItem.listTag|channelCodeFamt}}</view>
|
||||||
<view class="cu-tag round bg-self--dark-yellow yu-tag text-xs" v-show="first">距离最近</view>
|
<view class="cu-tag round bg-self--dark-yellow yu-tag text-xs" v-show="first">距离最近</view>
|
||||||
<view v-if="siteItem.highSpeedMark||siteItem.roadTpye" class="cu-tag round bg-self--dark-blue yu-tag text-xs" :style="{background:speedMarkColor(siteItem.highSpeedMark,siteItem.roadTpye)}">{{speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}</view>
|
<view v-if="siteItem.highSpeedMark||siteItem.roadTpye" class="cu-tag round bg-self--dark-blue yu-tag text-xs" :style="{background:speedMarkColor(siteItem.highSpeedMark,siteItem.roadTpye)}">{{speedMark(siteItem.highSpeedMark,siteItem.roadTpye)}}{{siteItem.roadName?':'+siteItem.roadName:''}}</view>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "星油",
|
"name" : "星油",
|
||||||
"appid" : "__UNI__B20D014",
|
"appid" : "__UNI__F7EF840",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
|
|||||||
85
pages/components/Advertisement.vue
Normal file
85
pages/components/Advertisement.vue
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<uni-popup :mask-click='false' ref='showAdvertisement'>
|
||||||
|
<view class="Advertisement_body">
|
||||||
|
<image style="width: 100%;height: 100%;" :src="imgURL+'groupbannerzhongp.png'" mode=""></image>
|
||||||
|
<view @click="informNext(true)" class="Advertisement_butten">
|
||||||
|
立即进入
|
||||||
|
</view>
|
||||||
|
<view @click="closeAdvertisement" class="Advertisement_closeButten">
|
||||||
|
<uni-icons color='#ffffff' type="closeempty" size="35"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
imgURL: this.global.newImgURL,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log('广告组件挂载完成');
|
||||||
|
this.showAdvertisement()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showAdvertisement() {
|
||||||
|
this.$refs.showAdvertisement.open('center')
|
||||||
|
},
|
||||||
|
closeAdvertisement() {
|
||||||
|
this.$refs.showAdvertisement.close();
|
||||||
|
this.informNext()
|
||||||
|
},
|
||||||
|
informNext(type=false) {
|
||||||
|
this.$emit('informNext',type)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.Advertisement_butten {
|
||||||
|
width: 278rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 30rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background: linear-gradient(270deg, #FDA96A 0%, #FE5048 100%);
|
||||||
|
box-shadow: 0px 3px 10px 0px rgba(178, 126, 81, 0.5);
|
||||||
|
border-radius: 103px 103px 103px 103px;
|
||||||
|
border-image: linear-gradient(90deg, rgba(255, 121.00000038743019, 94.0000019967556, 1), rgba(252.00000017881393, 158.00000578165054, 79.00000289082527, 1)) 1 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Advertisement_closeButten {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: -45px;
|
||||||
|
margin: auto;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
/* border: solid 1px #000000; */
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Advertisement_body {
|
||||||
|
width: 602rpx;
|
||||||
|
height: 690rpx;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,15 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-content">
|
<view class="page-content">
|
||||||
<image :src="yellowURL+'start.png'" width="" mode="widthFix"></image>
|
<image :src="yellowURL+'start.png'" width="" mode="widthFix"></image>
|
||||||
|
<Advertisement v-if="showAdvertisement" @informNext='goHome' ref='Advertisement'></Advertisement>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import oilSiteApi from '@/api/oil-site.js'
|
import oilSiteApi from '@/api/oil-site.js'
|
||||||
import wxCode from '@/api/wxcode.js'
|
import wxCode from '@/api/wxcode.js'
|
||||||
|
import Advertisement from '../../components/Advertisement.vue'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
Advertisement
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showAdvertisement: false,
|
||||||
|
key: '',
|
||||||
|
option: null,
|
||||||
imgURL: this.global.imgURL + 'start/',
|
imgURL: this.global.imgURL + 'start/',
|
||||||
yellowURL: this.global.yellowURL + 'xq-ad/',
|
yellowURL: this.global.yellowURL + 'xq-ad/',
|
||||||
menuList: [{
|
menuList: [{
|
||||||
@@ -44,19 +52,59 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log('mounted')
|
||||||
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
this.option = option;
|
||||||
|
this.versionUpdate()
|
||||||
|
},
|
||||||
|
onReady(option) {},
|
||||||
|
methods: {
|
||||||
|
versionUpdate() {
|
||||||
|
console.log('versionUpdate')
|
||||||
|
let that = this
|
||||||
|
const updateManager = uni.getUpdateManager();
|
||||||
|
updateManager.onCheckForUpdate(function(res) {
|
||||||
|
// 请求完新版本信息的回调
|
||||||
|
console.log('请求完新版本信息的回调', res.hasUpdate);
|
||||||
|
if (!res.hasUpdate) {
|
||||||
|
that.initFn(that.option)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
updateManager.onUpdateReady(function(res) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '更新提示',
|
||||||
|
content: '新版本已经准备好,是否重启应用?',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
console.log(res.confirm, 'res.confirm版本信息')
|
||||||
|
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||||
|
updateManager.applyUpdate();
|
||||||
|
} else {
|
||||||
|
that.initFn(that.option)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
updateManager.onUpdateFailed(function(res) {
|
||||||
|
console.log('新的版本下载失败')
|
||||||
|
// 新的版本下载失败
|
||||||
|
});
|
||||||
|
},
|
||||||
|
initFn(option) {
|
||||||
console.log(option, '启动页');
|
console.log(option, '启动页');
|
||||||
console.log(`%c 二维码进入 ${option.scene}`, 'color:red;font-size:50px')
|
console.log(`%c 二维码进入 ${option.scene}`, 'color:red;font-size:50px')
|
||||||
|
|
||||||
const token = uni.getStorageSync('Authorization')
|
const token = uni.getStorageSync('Authorization')
|
||||||
const openid = uni.getStorageSync('openid')
|
const openid = uni.getStorageSync('openid')
|
||||||
let key = ''
|
this.key = ''
|
||||||
if (token && openid) {
|
if (token && openid) {
|
||||||
key = '在线'
|
this.key = '在线'
|
||||||
} else {
|
} else {
|
||||||
key = '离线'
|
this.key = '离线'
|
||||||
}
|
}
|
||||||
if (key == '在线') {
|
if (this.key == '在线') {
|
||||||
if (!uni.getStorageSync('filterData')) {
|
if (!uni.getStorageSync('filterData')) {
|
||||||
this.getFilterData()
|
this.getFilterData()
|
||||||
} else if (uni.getStorageSync('filterData')[0].detailList.length < 2) {
|
} else if (uni.getStorageSync('filterData')[0].detailList.length < 2) {
|
||||||
@@ -67,52 +115,33 @@
|
|||||||
this.Interceptor(option.scene);
|
this.Interceptor(option.scene);
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (key == '在线') {
|
this.showAdvertisement = true
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
goHome(type) {
|
||||||
|
if(type){
|
||||||
|
uni.setStorageSync('isJump',{
|
||||||
|
page:'Financial/pages/estimate/index',
|
||||||
|
disposable:true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.key == '在线') {
|
||||||
|
console.log(type, 'typetypetypetype');
|
||||||
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/tabbar/home/home',
|
url: `/pages/tabbar/home/home`,
|
||||||
|
success() {},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
// url:'/BagStation/orderDetail/orderDetail'
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
// url: '/BagAuth/pages/login/login'
|
url: '/BagAuth/pages/login/login'
|
||||||
url:'/BagAuth/pages/login/oldLogin'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, 2000)
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onReady(option) {
|
|
||||||
const updateManager = uni.getUpdateManager();
|
|
||||||
|
|
||||||
updateManager.onCheckForUpdate(function(res) {
|
|
||||||
// 请求完新版本信息的回调
|
|
||||||
console.log('请求完新版本信息的回调', res.hasUpdate);
|
|
||||||
});
|
|
||||||
|
|
||||||
updateManager.onUpdateReady(function(res) {
|
|
||||||
uni.showModal({
|
|
||||||
title: '更新提示',
|
|
||||||
content: '新版本已经准备好,是否重启应用?',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
console.log(res.confirm,'res.confirm版本信息')
|
|
||||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|
||||||
updateManager.applyUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
updateManager.onUpdateFailed(function(res) {
|
|
||||||
// 新的版本下载失败
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
Interceptor(id) {
|
Interceptor(id) {
|
||||||
let taht = this
|
let taht = this
|
||||||
console.log(`%c 检测到参数拦截器启动`, 'color:red;font-size:50px');
|
console.log(`%c 检测到参数拦截器启动`, 'color:red;font-size:50px');
|
||||||
@@ -136,7 +165,10 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/AppletCode/pages/index/index?details=' + JSON.stringify({...res.data,qrCode: id}),
|
url: '/AppletCode/pages/index/index?details=' + JSON.stringify({
|
||||||
|
...res.data,
|
||||||
|
qrCode: id
|
||||||
|
}),
|
||||||
fail(e) {
|
fail(e) {
|
||||||
console.log(e, '跳转失败')
|
console.log(e, '跳转失败')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,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" :key='index'>
|
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray" :key='index'>
|
||||||
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
|
<image :src="item.src" style="width: 100%;height: 100%;"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@@ -188,6 +188,10 @@
|
|||||||
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',
|
||||||
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
src:'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/bannerindexs.png',
|
||||||
|
JumpPage:'Financial'
|
||||||
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
siteInfo: {},
|
siteInfo: {},
|
||||||
@@ -352,7 +356,6 @@
|
|||||||
console.log('首页 非卡力 进入')
|
console.log('首页 非卡力 进入')
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
console.log(e, '首页')
|
|
||||||
let _that = this
|
let _that = this
|
||||||
let IsOtherUser = _that.isOther
|
let IsOtherUser = _that.isOther
|
||||||
console.log(IsOtherUser, '这里是判断是否为卡力')
|
console.log(IsOtherUser, '这里是判断是否为卡力')
|
||||||
@@ -369,7 +372,17 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log('首页 非卡力 进入测试++')
|
console.log('首页 非卡力 进入测试++')
|
||||||
this.reverseGeocoder(this.location)
|
this.reverseGeocoder(this.location);
|
||||||
|
setTimeout(()=>{
|
||||||
|
let startParamsData = uni.getStorageSync('isJump')||null;
|
||||||
|
if(startParamsData){
|
||||||
|
this.shadoumeiyou(6)
|
||||||
|
if(startParamsData?.disposable){
|
||||||
|
uni.removeStorageSync('isJump');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},500)
|
||||||
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -411,17 +424,22 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
swiperClick(item,index) {
|
swiperClick(item,index) {
|
||||||
if(!item?.link) return
|
if(item?.JumpPage){
|
||||||
|
switch(item.JumpPage){
|
||||||
|
case "Financial":
|
||||||
|
this.shadoumeiyou(6)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}else if(item?.link){
|
||||||
switch (Number(index)) {
|
switch (Number(index)) {
|
||||||
// case 0:
|
|
||||||
// this.goCall()
|
|
||||||
// break;
|
|
||||||
default:
|
default:
|
||||||
console.log('item.link')
|
console.log('item.link')
|
||||||
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))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
gotoMap() {
|
gotoMap() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
getSiteListTimer:null,
|
||||||
TabCur: 0,
|
TabCur: 0,
|
||||||
TabCurUrea: 0,
|
TabCurUrea: 0,
|
||||||
UreaTabCur:0,
|
UreaTabCur:0,
|
||||||
@@ -131,7 +132,7 @@
|
|||||||
ative:'', }
|
ative:'', }
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getOrder('')
|
// this.getOrder('')
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getOrder('')
|
this.getOrder('')
|
||||||
@@ -177,6 +178,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onChangeSearch() {
|
onChangeSearch() {
|
||||||
|
console.log('%c 我闪','color:red;font-size:20px')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if(this.TabHead == 1){
|
if(this.TabHead == 1){
|
||||||
this.onSearch()
|
this.onSearch()
|
||||||
@@ -203,6 +205,9 @@
|
|||||||
this.getOrder(value)
|
this.getOrder(value)
|
||||||
},
|
},
|
||||||
getOrder(status) {
|
getOrder(status) {
|
||||||
|
clearTimeout(this.getSiteListTimer)
|
||||||
|
this.getSiteListTimer = setTimeout(()=>{
|
||||||
|
|
||||||
let postData = {
|
let postData = {
|
||||||
currentPage: this.currentPage, //类型:Number 必有字段 备注:无
|
currentPage: this.currentPage, //类型:Number 必有字段 备注:无
|
||||||
pageSize: 10, //类型:Number 必有字段 备注:无
|
pageSize: 10, //类型:Number 必有字段 备注:无
|
||||||
@@ -230,6 +235,8 @@
|
|||||||
}).finally(()=>{
|
}).finally(()=>{
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
},500)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
getSiteListTimer:null,
|
||||||
areaCodeList:[],
|
areaCodeList:[],
|
||||||
loadText:'more',
|
loadText:'more',
|
||||||
changeHs:true,
|
changeHs:true,
|
||||||
@@ -676,13 +677,21 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onInput() {
|
onInput() {
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
|
// this.currentPage = 1
|
||||||
|
// this.siteList = []
|
||||||
|
// this.getSiteList()
|
||||||
|
// }, 100)
|
||||||
|
clearTimeout(this.getSiteListTimer);
|
||||||
|
this.getSiteListTimer = setTimeout(()=>{
|
||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
this.siteList = []
|
this.siteList = []
|
||||||
this.getSiteList()
|
this.getSiteList()
|
||||||
}, 100)
|
},500);
|
||||||
},
|
},
|
||||||
onSearch() {
|
onSearch() {
|
||||||
|
clearTimeout(this.getSiteListTimer);
|
||||||
|
this.getSiteListTimer = setTimeout(()=>{
|
||||||
this.currentPage = 1
|
this.currentPage = 1
|
||||||
this.siteList = []
|
this.siteList = []
|
||||||
if(this.TabHead == 0){
|
if(this.TabHead == 0){
|
||||||
@@ -690,6 +699,8 @@
|
|||||||
}else if (this.TabHead == 1){
|
}else if (this.TabHead == 1){
|
||||||
this.getUreaList()
|
this.getUreaList()
|
||||||
}
|
}
|
||||||
|
},500)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import utils from '@/utils/encode'
|
|||||||
// const env = 'test'
|
// const env = 'test'
|
||||||
const env = 'production'
|
const env = 'production'
|
||||||
// 45
|
// 45
|
||||||
const testUrl = 'http://192.168.0.45:38080'
|
const testUrl = 'http://192.168.0.23:38080'
|
||||||
const productUrl = 'https://www.xingoil.com/adminapi'
|
// const productUrl = 'https://www.xingoil.com/adminapi'
|
||||||
|
|
||||||
// const productUrl = 'http://uat.xingoil.com/adminapi'
|
const productUrl = 'http://uat.xingoil.com/adminapi'
|
||||||
// const productUrl = 'http://192.168.0.191:38080'
|
// const productUrl = 'http://192.168.0.191:38080'
|
||||||
// const productUrl = 'http://121.196.213.68/adminapi'
|
// const productUrl = 'http://121.196.213.68/adminapi'
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
@@ -16,15 +16,21 @@ const service = axios.create({
|
|||||||
// baseURL: testUrl,
|
// baseURL: testUrl,
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
})
|
})
|
||||||
|
let closeShowLoading
|
||||||
var url = ''
|
var url = ''
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
// 拦截请求
|
// 拦截请求
|
||||||
|
closeShowLoading = config?.closeShowLoading||false;
|
||||||
|
console.log(closeShowLoading,'isLoadingisLoadingisLoading')
|
||||||
|
if(!closeShowLoading){
|
||||||
|
//判断是否自动开始请求loading
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const token = uni.getStorageSync('Authorization')
|
const token = uni.getStorageSync('Authorization')
|
||||||
const unionId = uni.getStorageSync('unionid')
|
const unionId = uni.getStorageSync('unionid')
|
||||||
const openId = uni.getStorageSync('openid')
|
const openId = uni.getStorageSync('openid')
|
||||||
@@ -65,7 +71,10 @@ service.interceptors.request.use(
|
|||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
if(!closeShowLoading){
|
||||||
|
//判断是否自动开始请求loading
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
}
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '网络超时',
|
title: '网络超时',
|
||||||
icon: "none"
|
icon: "none"
|
||||||
@@ -89,8 +98,10 @@ service.interceptors.response.use(
|
|||||||
console.log('返回', response.config.url, '返回结果未加密', res)
|
console.log('返回', response.config.url, '返回结果未加密', res)
|
||||||
// console.log('-------------------------------------------\n\n')
|
// console.log('-------------------------------------------\n\n')
|
||||||
}
|
}
|
||||||
|
if(!closeShowLoading){
|
||||||
|
//判断是否自动开始请求loading
|
||||||
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 (response.config.url.indexOf('/oil-site/oilSiteAppInfo/getSiteDetails') != -1) {
|
if (response.config.url.indexOf('/oil-site/oilSiteAppInfo/getSiteDetails') != -1) {
|
||||||
console.log('这里是getSiteDetails 拦截处')
|
console.log('这里是getSiteDetails 拦截处')
|
||||||
@@ -101,7 +112,8 @@ service.interceptors.response.use(
|
|||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
if (res.code != 20000&&res.msg!='令牌为空,不允许操作'&&res.msg!='您的ip已经更改,请重新登录'&&res.msg!='登录与操作设备不同') {
|
if (res.code != 20000 && res.msg != '令牌为空,不允许操作' && res.msg != '您的ip已经更改,请重新登录' && res.msg !=
|
||||||
|
'登录与操作设备不同') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none"
|
icon: "none"
|
||||||
@@ -119,7 +131,10 @@ service.interceptors.response.use(
|
|||||||
return res
|
return res
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
if(!closeShowLoading){
|
||||||
|
//判断是否自动开始请求loading
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
}
|
||||||
uni.getNetworkType({
|
uni.getNetworkType({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log(res.networkType);
|
console.log(res.networkType);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
overallInterceptor(callBack) {
|
overallInterceptor(callBack) {
|
||||||
uni.addInterceptor('redirectTo', {
|
uni.addInterceptor('redirectTo', {
|
||||||
invoke(e) {
|
invoke(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user