@ -15,7 +15,8 @@
< / view >
< view class = "search-form radius" @tap ="InputFocus" >
< text class = "cuIcon-search" > < / text >
< input disabled :adjust-position ="false" type = "text" placeholder = "搜索油站名称" confirm -type = " search " > < / input >
< input disabled :adjust-position ="false" type = "text" placeholder = "搜索油站名称"
confirm - type = "search" > < / input >
< / view >
<!-- < view class = "" @ tap = 'gotoMap' >
< image src = "../../../static/img/dt.png" mode = "widthFix" style = "width: 27px;height: 27px;" > < / image >
@ -109,12 +110,13 @@
<!-- 宫格菜单开始 -- >
< view class = "bg-white padding pagestartthree" >
< view class = "grid col-5 text-center " >
< view class = "text-xxl " v-for ="(item,index) in cuIconList" @tap="shadoumeiyou(index)" :key="index" :class="index<5?'margin-bottom':''" >
< view class = "text-xxl " v -for = " ( item , index ) in cuIconList " @tap ="shadoumeiyou(index)" :key ="index"
: class = "index<5?'margin-bottom':''" >
<!-- < view : class = "['cuIcon-'+item.icon,'text-' +item.color]" >
< / view > -- >
< view class = "text-center" >
< view class = "my-icon-sm" >
< image : src = "item.iconUrl?imgURL +item.iconUrl:item.local" mode = "widthFix" > < / image >
< image : src = "item.iconUrl?imgURL +item.iconUrl:item.local" mode = "widthFix" > < / image >
< / view >
< view class = "text-sm" >
< text class = "text-sm color-333" >
@ -131,8 +133,12 @@
< / view >
<!-- 广告图片开始 -- >
< view class = " padding" style = " background-color: #f1f1f1;" >
< view class = "" @tap ="goCall" >
< image :src ="yellowURL+'ad-1.png'" style = "width: 100%;" mode = "widthFix" > < / image >
< view class = "" >
< swiper autoplay interval = '5000' style = "width: 100%;height: 204rpx;" class = "swiper" circular >
< swiper -item @click ="swiperClick(item,index)" v-for ="(item,index) in swiperArray" >
< image :src ="item.src" style = "width: 100%;" mode = "widthFix" > < / image >
< / s w i p e r - i t e m >
< / swiper >
< / view >
< / view >
<!-- 筛选开始 -- >
@ -142,11 +148,11 @@
< / view > -- >
< view class = " " >
< view class = "" v-if ="siteList.length>0" >
< site -item v -for = " ( item , index ) in siteList " :key ="item.id" :site-item ="item" :first ="index==0" class = "cu-list menu-avatar cu-item"
@ tap = "toDetail(item)" >
< site -item v -for = " ( item , index ) in siteList " :key ="item.id" :site-item ="item" :first ="index==0"
class = "cu-list menu-avatar cu-item" @ tap = "toDetail(item)" >
< / s i t e - i t e m >
< / view >
< view class = "" v -else >
< view class = "" v -else>
< my -empty > < / m y - e m p t y >
< / view >
< / view >
@ -172,6 +178,17 @@
} ,
data ( ) {
return {
swiperArray : [
/ / {
/ / s r c : ' h t t p s : / / x o i l - p u b l i c . o s s - c n - b e i j i n g . a l i y u n c s . c o m / W M P - I M G / b a n n e r - 2 e t c . p n g ' ,
/ / / / l i n k : ' h t t p s : / / h 5 . 5 1 e t r . c o m / p r o / o n l i n e A p p l y / ? t y p e = 2 0 2 2 0 8 3 1 1 0 3 6 2 6 2 0 0 1 0 1 8 1 1 '
/ / } ,
{
src : 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png' ,
link : 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
} ,
] ,
siteInfo : { } ,
yellowURL : this . global . yellowURL + 'xq-ad/' ,
siteId : '' ,
@ -277,7 +294,7 @@
/ / b a d g e : 0 ,
/ / n a m e : ' 违 章 查 询 '
/ / } ,
{
iconUrl : 'icon-9.png' ,
color : 'purple' ,
@ -296,63 +313,63 @@
} ;
} ,
created ( ) { } ,
onReady ( ) {
onReady ( ) {
let _that = this
let IsOtherUser = _that . isOther
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是onShow' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是onShow' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
console . log ( '首页 卡力 进入' )
uni . showToast ( {
title : '卡力用户只支持跳转登录' ,
icon : 'none'
title : '卡力用户只支持跳转登录' ,
icon : 'none'
} )
uni . reLaunc ( {
url : '../../../BagAuth/pages/login/login'
} )
url : '../../../BagAuth/pages/login/login'
} )
return
}
}
console . log ( '首页 非卡力 进入' )
} ,
onShow ( ) {
this . refreshLocation ( )
let _that = this
let IsOtherUser = _that . isOther
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是onShow' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是onShow' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
console . log ( '首页 卡力 进入' )
uni . showToast ( {
title : '卡力用户只支持跳转登录' ,
icon : 'none'
title : '卡力用户只支持跳转登录' ,
icon : 'none'
} )
uni . reLaunc ( {
url : '../../../BagAuth/pages/login/login'
} )
url : '../../../BagAuth/pages/login/login'
} )
return
}
}
console . log ( '首页 非卡力 进入' )
} ,
onLoad ( e ) {
console . log ( e , '首页' )
console . log ( e , '首页' )
let _that = this
let IsOtherUser = _that . isOther
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是onLoad' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是onLoad' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
console . log ( '首页 卡力 进入' )
uni . showToast ( {
title : '卡力用户只支持跳转登录' ,
icon : 'none'
title : '卡力用户只支持跳转登录' ,
icon : 'none'
} )
uni . navigateTo ( {
url : '../../../BagAuth/pages/login/login'
url : '../../../BagAuth/pages/login/login'
} )
return
}
}
console . log ( '首页 非卡力 进入测试++' )
this . reverseGeocoder ( this . location )
} ,
onPullDownRefresh ( ) {
this . refreshLocation ( )
@ -386,16 +403,28 @@
/ / u r l : ' / B a g S t a t i o n / p a g e s / m a k e O r d e r / p a y R e s u l t ? s t a t u s = s u c c e s s '
this . getSiteList ( ) ;
} ,
mounted ( ) {
} ,
mounted ( ) { } ,
beforeCreate ( ) { } ,
onReady ( ) {
/ / t h i s . g e t S i t e L i s t ( )
} ,
} ,
methods : {
gotoMap ( ) {
swiperClick ( item , index ) {
if ( ! item ? . link ) return
switch ( Number ( index ) ) {
/ / c a s e 0 :
/ / t h i s . g o C a l l ( )
/ / b r e a k ;
default :
console . log ( 'item.link' )
uni . navigateTo ( {
url : '/pages/tabbar/home/link?url=' + encodeURIComponent ( JSON . stringify ( item . link ) )
} )
}
} ,
gotoMap ( ) {
uni . navigateTo ( {
url : '/BagStation/pages/allMap/allMap'
url : '/BagStation/pages/allMap/allMap'
} )
} ,
goToPage ( url ) {
@ -444,7 +473,7 @@
success : function ( res ) {
uni . setStorageSync ( 'location' , res )
} ,
complete : ( res ) => {
complete : ( res ) => {
/ / c o n s o l e . l o g ( ' 定 位 ' , r e s )
this . getSiteList ( )
var msgTip = ''
@ -479,18 +508,18 @@
if ( res . code === 20000 ) {
let _that = this
let IsOtherUser = _that . isOther
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是getUserAuthInfo' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是getUserAuthInfo' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
uni . showToast ( {
title : '卡力用户只支持跳转登录' ,
icon : 'none'
title : '卡力用户只支持跳转登录' ,
icon : 'none'
} )
uni . reLaunch ( {
url : '../../../BagAuth/pages/login/login'
} )
url : '../../../BagAuth/pages/login/login'
} )
return
}
}
this . getAmount ( )
this . getSiteList ( )
/ / r e a l S t a t u s : 0 v e h i c l e S t a t u s : 0
@ -541,28 +570,28 @@
/ / u r l : ' p l u g i n : / / r o u t e P l a n / i n d e x ? k e y = ' + t h i s . q q M a p K e y + ' & r e f e r e r = ' + r e f e r e r +
/ / ' & e n d P o i n t = ' + e n d P o i n t
/ / } )
if ( ! uni . getStorageSync ( 'user' ) ) {
uni . showModal ( {
title : '请您登录' ,
content : "登录星油加油才可以加油 |˛˙꒳ ˙)♡" ,
confirmText : '去登陆' ,
success : ( res ) => {
if ( res . confirm ) {
uni . reLaunch ( {
url : '../../../BagAuth/pages/login/login'
} )
}
}
} )
return
}
uni . removeStorageSync ( "origins" )
uni . removeStorageSync ( "destination" )
wx . navigateTo ( {
/ / u r l : ' . . / . . / . . / B a g S t a t i o n / p a g e s / r o u t e P l a i n / r o u t e P l a i n ' ,
url : '../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
/ / u r l : ' . . / . . / . . / B a g S t a t i o n / p a g e s / o v e r v i e w M a p / o v e r v i e w M a p ' ,
} )
if ( ! uni . getStorageSync ( 'user' ) ) {
uni . showModal ( {
title : '请您登录' ,
content : "登录星油加油才可以加油 |˛˙꒳ ˙)♡" ,
confirmText : '去登陆' ,
success : ( res ) => {
if ( res . confirm ) {
uni . reLaunch ( {
url : '../../../BagAuth/pages/login/login'
} )
}
}
} )
return
}
uni . removeStorageSync ( "origins" )
uni . removeStorageSync ( "destination" )
wx . navigateTo ( {
/ / u r l : ' . . / . . / . . / B a g S t a t i o n / p a g e s / r o u t e P l a i n / r o u t e P l a i n ' ,
url : '../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
/ / u r l : ' . . / . . / . . / B a g S t a t i o n / p a g e s / o v e r v i e w M a p / o v e r v i e w M a p ' ,
} )
} else if ( index == 9 ) {
this . goToPage ( '/BagAuth/pages/agreeMent/OperationGuide' )
}
@ -571,8 +600,8 @@
/ / u r l : ' / B a g S t a t i o n / m y C a r s / m y C a r s '
/ / } )
/ / }
else if ( index == 2 ) {
if ( ! uni . getStorageSync ( 'user' ) ) {
else if ( index == 2 ) {
if ( ! uni . getStorageSync ( 'user' ) ) {
uni . showModal ( {
title : '请您登录' ,
content : "登录星油加油才可以加油 |˛˙꒳ ˙)♡" ,
@ -588,12 +617,13 @@
return
}
wx . navigateTo ( {
/ / u r l : ' . . / . . / . . / B a g S t a t i o n / p a g e s / r o u t e P l a i n / r o u t e P l a i n ' ,
/ / u r l : ' . . / . . / . . / B a g S t a t i o n / p a g e s / n e w R o u t e P l a n n i n g / n e w R o u t e P l a n n i n g '
url : '../../../BagStation/pages/overviewMap/overviewMap' ,
} )
}
else {
/ / u r l : ' . . / . . / . . / B a g S t a t i o n / p a g e s / r o u t e P l a i n / r o u t e P l a i n ' ,
/ / u r l : ' . . / . . / . . / B a g S t a t i o n / p a g e s / n e w R o u t e P l a n n i n g / n e w R o u t e P l a n n i n g '
url : '../../../BagStation/pages/overviewMap/overviewMap' ,
} )
} else if ( index == 7 ) {
this . swiperClick ( this . swiperArray [ 0 ] , 1 )
} else {
uni . showToast ( {
title : '功能暂无' ,
icon : 'none'
@ -606,7 +636,7 @@
/ / u n i . n a v i g a t e T o ( {
/ / u r l : ' / B a g S t a t i o n / p a g e s / s t a t i o n D e t a i l / s t i e Q r '
/ / } )
if ( ! uni . getStorageSync ( 'user' ) ) {
if ( ! uni . getStorageSync ( 'user' ) ) {
uni . showModal ( {
title : '请您登录' ,
content : "登录星油加油才可以加油 |˛˙꒳ ˙)♡" ,
@ -660,18 +690,18 @@
oilSiteApi . readOnlySites ( data1 ) . then ( res => {
let _that = this
let IsOtherUser = _that . isOther
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是readOnlySites' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
console . log ( IsOtherUser , '这里是判断是否为卡力' )
console . log ( '这里是readOnlySites' , IsOtherUser , '++++++' )
if ( IsOtherUser ) {
uni . showToast ( {
title : '卡力用户只支持跳转登录' ,
icon : 'none'
title : '卡力用户只支持跳转登录' ,
icon : 'none'
} )
uni . reLaunc ( {
url : '../../../BagAuth/pages/login/login'
} )
url : '../../../BagAuth/pages/login/login'
} )
return
}
}
this . getCount ++
if ( res . code == 20000 ) {
/ / c o n s o l e . l o g ( r e s . d a t a . l i s t )
@ -717,10 +747,10 @@
toDetail ( item ) {
console . log ( item )
let itemS = JSON . stringify ( item )
console . log ( '进入油站详情items' , itemS )
console . log ( '进入油站详情items' , itemS )
if ( uni . getStorageSync ( 'user' ) ) {
if ( item . channelCode === 'TY' ) {
uni . setStorageSync ( 'OtherSiteInfo' , item )
if ( item . channelCode === 'TY' ) {
uni . setStorageSync ( 'OtherSiteInfo' , item )
uni . navigateTo ( {
url : ` /BagStation/pages/stationDetail/stationDetail?channerCode= ${ item . channelCode } ` ,
fail : ( err ) => {
@ -896,9 +926,10 @@
< / script >
< style scoped >
. showBtn {
. showBtn {
padding - right : 3 % ;
}
. bottom - bar {
position : relative ;
padding - top : 50 px ;