中秋更新

This commit is contained in:
caolc
2022-09-09 14:53:48 +08:00
parent a59bf23fd7
commit 26b9d6fe85
18 changed files with 388 additions and 275 deletions

View File

@@ -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>
</swiper-item>
</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)">
</site-item>
</view>
<view class="" v-else >
<view class="" v-else>
<my-empty></my-empty>
</view>
</view>
@@ -172,6 +178,17 @@
},
data() {
return {
swiperArray: [
// {
// src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2etc.png',
// // link: 'https://h5.51etr.com/pro/onlineApply/?type=20220831103626200101811'
// },
{
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 @@
// badge: 0,
// name: '违章查询'
// },
{
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 @@
// url:'/BagStation/pages/makeOrder/payResult?status=success'
this.getSiteList();
},
mounted() {
},
mounted() {},
beforeCreate() {},
onReady() {
// this.getSiteList()
},
},
methods: {
gotoMap(){
swiperClick(item,index) {
if(!item?.link) return
switch (Number(index)) {
// case 0:
// this.goCall()
// break;
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) => {
// console.log('定位',res)
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()
// realStatus: 0 vehicleStatus: 0
@@ -541,28 +570,28 @@
// url: 'plugin://routePlan/index?key=' + this.qqMapKey + '&referer=' + referer +
// '&endPoint=' + endPoint
// })
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({
// url:'../../../BagStation/pages/routePlain/routePlain',
url:'../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
// url:'../../../BagStation/pages/overviewMap/overviewMap',
})
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({
// url:'../../../BagStation/pages/routePlain/routePlain',
url: '../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
// url:'../../../BagStation/pages/overviewMap/overviewMap',
})
} else if (index == 9) {
this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
}
@@ -571,8 +600,8 @@
// url: '/BagStation/myCars/myCars'
// })
// }
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({
// url:'../../../BagStation/pages/routePlain/routePlain',
// url:'../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
url:'../../../BagStation/pages/overviewMap/overviewMap',
})
}
else {
// url:'../../../BagStation/pages/routePlain/routePlain',
// url:'../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
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 @@
// uni.navigateTo({
// url: '/BagStation/pages/stationDetail/stieQr'
// })
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) {
// console.log(res.data.list)
@@ -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: 50px;

View File

@@ -0,0 +1,26 @@
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: ''
}
},
methods: {
},
onReady() {},
onLoad(e) {
console.log(decodeURIComponent(e.url ),'111')
this.url = JSON.parse(decodeURIComponent(e.url ));
},
}
</script>
<style>
</style>