更新
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// newImgURL: require('start'),
|
||||
|
||||
imgURL: this.global.imgURL + 'start/',
|
||||
menuList: [{
|
||||
title: '渠道',
|
||||
@@ -44,27 +44,24 @@
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
let taht = this
|
||||
|
||||
const updateManager = uni.getUpdateManager();
|
||||
updateManager.onCheckForUpdate(function(res) {
|
||||
// 请求完新版本信息的回调
|
||||
updateManager.onCheckForUpdate((res) => {
|
||||
console.log('请求完新版本信息的回调', res.hasUpdate);
|
||||
if (!res.hasUpdate) {
|
||||
taht.initFn(option)
|
||||
this.initFn(option)
|
||||
}
|
||||
});
|
||||
|
||||
updateManager.onUpdateReady(function(res) {
|
||||
updateManager.onUpdateReady((res) => {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
console.log(res.confirm, 'res.confirm版本信息')
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate();
|
||||
} else {
|
||||
taht.initFn(option)
|
||||
this.initFn(option)
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -72,86 +69,46 @@
|
||||
|
||||
updateManager.onUpdateFailed(function(res) {
|
||||
console.log('新的版本下载失败')
|
||||
// 新的版本下载失败
|
||||
});
|
||||
},
|
||||
onReady(option) {},
|
||||
|
||||
methods: {
|
||||
initFn(option) {
|
||||
const token = uni.getStorageSync('Authorization')
|
||||
const openid = uni.getStorageSync('openid')
|
||||
let key = ''
|
||||
if (token && openid) {
|
||||
key = '在线'
|
||||
} else {
|
||||
key = '离线'
|
||||
}
|
||||
// 在页面中定义插屏广告
|
||||
let interstitialAd = null
|
||||
|
||||
// 在页面onLoad回调事件中创建插屏广告实例
|
||||
let openid = uni.getStorageSync('openid')
|
||||
let token = uni.getStorageSync('Authorization')
|
||||
|
||||
if (wx.createInterstitialAd) {
|
||||
interstitialAd = wx.createInterstitialAd({
|
||||
adUnitId: 'adunit-a7faf57adeed211f'
|
||||
adUnitId: 'adunit-063722d8f7b2b65e'
|
||||
})
|
||||
}
|
||||
interstitialAd.onLoad((err) => {
|
||||
console.log('onLoad event emit', err)
|
||||
})
|
||||
interstitialAd.onError((err) => {
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
// url:'/BagStation/orderDetail/orderDetail'
|
||||
})
|
||||
// if (key == '在线') {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/tabbar/home/home',
|
||||
// fail: (err) => {
|
||||
// console.log(err)
|
||||
// }
|
||||
// // url:'/BagStation/orderDetail/orderDetail'
|
||||
// })
|
||||
// } else {
|
||||
// uni.redirectTo({
|
||||
// url: '/BagAuth/pages/login/login'
|
||||
// })
|
||||
// }
|
||||
}, 2000)
|
||||
console.log('onError event emit', err)
|
||||
})
|
||||
// 在适合的场景显示插屏广告
|
||||
if (interstitialAd) {
|
||||
interstitialAd.show().catch((err) => {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
interstitialAd.onClose(res => {
|
||||
setTimeout(() => {
|
||||
if (key == '在线') {
|
||||
let handle = () => {
|
||||
if (token && openid) {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home',
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
// url:'/BagStation/orderDetail/orderDetail'
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/BagAuth/pages/login/login'
|
||||
})
|
||||
}
|
||||
}, 2000)
|
||||
})
|
||||
}
|
||||
interstitialAd.onClose(handle)
|
||||
interstitialAd.onError((err) => {
|
||||
console.log('onError', err)
|
||||
handle()
|
||||
})
|
||||
}
|
||||
if (interstitialAd) {
|
||||
interstitialAd.show().catch((err) => {
|
||||
console.error('show catch', err)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
getFilterData() {
|
||||
console.log('在线')
|
||||
oilSiteApi.getCheckInfo().then(res => {
|
||||
if (res.code == 20000) {
|
||||
console.log('接口返回正常')
|
||||
let channelCodes = []
|
||||
res.data.channelCodes.map(item => {
|
||||
channelCodes.push({
|
||||
@@ -173,13 +130,10 @@
|
||||
value: item.id
|
||||
})
|
||||
})
|
||||
console.log(channelCodes, productCodes, siteBrands)
|
||||
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
||||
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
||||
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
||||
uni.setStorageSync('filterData', this.menuList);
|
||||
console.log('存入', this.menuList)
|
||||
// this.$refs.slFilter.resetMenuList(this.menuList)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -18,41 +18,31 @@
|
||||
<input disabled :adjust-position="false" type="text" placeholder="搜索油站名称"
|
||||
confirm-type="search" />
|
||||
</view>
|
||||
<!-- <view class="">
|
||||
阿三
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 红色背景四个 -->
|
||||
|
||||
<view class="bg-blue padding pagestarttwo">
|
||||
<view class="grid col-4 text-center ">
|
||||
<view class="text-xxl" @tap="openScan">
|
||||
<view class="cuIcon-scan">
|
||||
</view>
|
||||
<view class="cuIcon-scan"></view>
|
||||
<text class="text-df">
|
||||
扫一扫
|
||||
</text>
|
||||
</view>
|
||||
<view class="text-xxl" @tap="showQr">
|
||||
<view class="cuIcon-qr_code">
|
||||
|
||||
</view>
|
||||
<view class="cuIcon-qr_code"></view>
|
||||
<text class="text-df">
|
||||
付款码
|
||||
</text>
|
||||
</view>
|
||||
<view class="text-xxl" @tap="toCards">
|
||||
<view class="cuIcon-vipcard">
|
||||
|
||||
</view>
|
||||
<view class="cuIcon-vipcard"></view>
|
||||
<text class="text-df">
|
||||
加油卡
|
||||
</text>
|
||||
</view>
|
||||
<view class="text-xxl" @tap="toOrders">
|
||||
<view class="cuIcon-form">
|
||||
|
||||
</view>
|
||||
<view class="cuIcon-form"></view>
|
||||
<text class="text-df">
|
||||
订单中心
|
||||
</text>
|
||||
@@ -60,79 +50,34 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="placeholder-hidden">
|
||||
|
||||
<view class="bg-blue pagestart">
|
||||
<view class="cu-bar search">
|
||||
<view class="text-xxl margin-left text-center bg-blue">
|
||||
<!-- <view class="cuIcon-scan"></view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- 红色背景四个 -->
|
||||
<view class="bg-blue padding pagestarttwo">
|
||||
<view class="grid col-4 text-center ">
|
||||
<view class="text-xxl">
|
||||
<view class="cuIcon-scan">
|
||||
</view>
|
||||
<text class="text-df">
|
||||
扫一扫
|
||||
</text>
|
||||
</view>
|
||||
<view class="text-xxl">
|
||||
<view class="cuIcon-qr_code">
|
||||
|
||||
</view>
|
||||
<text class="text-df">
|
||||
付款码
|
||||
</text>
|
||||
</view>
|
||||
<view class="text-xxl">
|
||||
<view class="cuIcon-vipcard">
|
||||
|
||||
</view>
|
||||
<text class="text-df">
|
||||
加油卡
|
||||
</text>
|
||||
</view>
|
||||
<view class="text-xxl">
|
||||
<view class="cuIcon-form">
|
||||
|
||||
</view>
|
||||
<text class="text-df">
|
||||
订单中心
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 广告图片开始 -->
|
||||
<view class="my-bg padding">
|
||||
<view class="">
|
||||
<swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular >
|
||||
<view>
|
||||
<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>
|
||||
<image :src="item.src" style="width: 100%;" mode="widthFix"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<ad unit-id="adunit-6dedd3908aa1c78c" ad-intervals="30" binderror="adError"></ad>
|
||||
</swiper-item>
|
||||
<!-- <swiper-item>
|
||||
<ad unit-id="adunit-fae65289bc72095d" ad-intervals="30"></ad>
|
||||
</swiper-item> -->
|
||||
</swiper>
|
||||
<!-- <image :src="starUrl+'banner.png'" style="width: 100%;" mode="widthFix"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 筛选开始 -->
|
||||
<view class="screentop bg-white padding-top " @tap="scrollScreen">
|
||||
<!-- <view class="">
|
||||
<!-- <view>
|
||||
<sl-filter @result="filterRes" reflexTitle ref="slFilter" :menuList="menuList"></sl-filter>
|
||||
</view> -->
|
||||
<view class=" ">
|
||||
<view class="" v-if="siteList.length>0">
|
||||
<site-item :location='location' v-for="(item,index) in siteList" :key="item.id" :site-item="item" :first="index==0"
|
||||
:listHeight="listHeight" class="cu-list menu-avatar cu-item" @tap="toDetail(item)">
|
||||
<view>
|
||||
<view v-if="siteList.length>0">
|
||||
<site-item :location='location' v-for="(item,index) in siteList" :key="item.id" :site-item="item"
|
||||
:first="index==0" :listHeight="listHeight" class="cu-list menu-avatar cu-item"
|
||||
@tap="toDetail(item)">
|
||||
</site-item>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view v-else>
|
||||
<my-empty></my-empty>
|
||||
</view>
|
||||
</view>
|
||||
@@ -159,21 +104,15 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
location:null,
|
||||
swiperArray: [
|
||||
{
|
||||
src:this.global.imgURL+'banner-zhongpin.png',
|
||||
link:''
|
||||
location: null,
|
||||
swiperArray: [{
|
||||
src: this.global.imgURL + 'banner-zhongpin.png',
|
||||
link: ''
|
||||
},
|
||||
// {
|
||||
// src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/banner_baichuan.png',
|
||||
// JumpPage: '/Activity/pages/index/index'
|
||||
// },
|
||||
|
||||
// {
|
||||
// src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png',
|
||||
// link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
||||
// },
|
||||
],
|
||||
listHeight: 160,
|
||||
siteInfo: {
|
||||
@@ -292,24 +231,20 @@
|
||||
]
|
||||
};
|
||||
},
|
||||
onTabItemTap(res) {
|
||||
this.showThreeSites = false
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.reverseGeocoder(this.location)
|
||||
// if (!uni.getStorageSync('filterData')) {
|
||||
// this.getFilterData()
|
||||
// }
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
this.refreshLocation()
|
||||
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh()
|
||||
}, 800);
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.location = uni.getStorageSync('location')
|
||||
this.location = uni.getStorageSync('location')
|
||||
const token = uni.getStorageSync('Authorization')
|
||||
const openid = uni.getStorageSync('openid')
|
||||
if (token && openid) {
|
||||
@@ -321,22 +256,10 @@
|
||||
})
|
||||
}
|
||||
this.refreshLocation();
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: `/BagStation/orderDetail/orderDetail?id=XOILAWMP202107070000025117`
|
||||
// })
|
||||
// uni.redirectTo({
|
||||
// url:'/BagStation/pages/makeOrder/makeOrder'
|
||||
// // url:'/BagStation/pages/makeOrder/payResult?status=success'
|
||||
// })
|
||||
// url:'/BagStation/pages/makeOrder/payResult?status=success'
|
||||
},
|
||||
beforeCreate() {},
|
||||
onReady() {
|
||||
// this.getSiteList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
toManagement() {
|
||||
const user = uni.getStorageSync('user');
|
||||
if (user) {
|
||||
@@ -360,30 +283,22 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
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))
|
||||
// })
|
||||
// }
|
||||
if(item?.JumpPage){
|
||||
if (item?.JumpPage) {
|
||||
uni.navigateTo({
|
||||
url: item.JumpPage
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
goToPage(url) {
|
||||
if (!url) return;
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
|
||||
getAmount() {
|
||||
accountApi.getTotalOilCardInfo().then(res => {
|
||||
if (res.code == 20000) {
|
||||
@@ -391,6 +306,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
refreshLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
@@ -420,22 +336,20 @@
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
hideModel(name) {
|
||||
if (name == 'auth') {
|
||||
this.showAuthFrror = false
|
||||
if (this.showAuthFrzen <= new Date().getTime()) {
|
||||
// 一小时后再提示
|
||||
uni.setStorageSync('showAuthFrzen', new Date().getTime() + 10 * 1000)
|
||||
// uni.setStorageSync('showAuthFrzen', new Date().getTime() + 1 * 60 * 60 * 1000)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getAuthInfo() {
|
||||
oilSiteApi.getUserAuthInfo().then(res => {
|
||||
if (res.code === 20000) {
|
||||
this.getAmount()
|
||||
// this.getSiteList()
|
||||
// realStatus: 0 vehicleStatus: 0
|
||||
if (this.showAuthFrzen <= new Date().getTime()) {
|
||||
this.showAuthFrror = res.data.realStatus && res.data.vehicleStatus ? false :
|
||||
true
|
||||
@@ -443,78 +357,34 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
goCall() {
|
||||
return
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: '4008-56-5355'
|
||||
})
|
||||
},
|
||||
|
||||
reverseGeocoder(location) {
|
||||
this.selLocation = location
|
||||
this.$qqmapsdk.reverseGeocoder({
|
||||
location: location,
|
||||
success: (res) => {
|
||||
// console.log(res)
|
||||
this.locationName = res.result.address_component.city
|
||||
},
|
||||
fail: (res) => {
|
||||
// console.log(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
shadoumeiyou(index) {
|
||||
if (index == 0) {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/station/stationList'
|
||||
})
|
||||
} else if (index == 1) {
|
||||
const referer = '星油云'; //调用插件的app的名称
|
||||
// const endPoint = JSON.stringify({
|
||||
// name: '油站',
|
||||
// latitude: 39.89631551,
|
||||
// longitude: 116.323459711
|
||||
// });
|
||||
// wx.navigateTo({
|
||||
// url: 'plugin://routePlan/index?key=' + this.qqMapKey + '&referer=' + referer +
|
||||
// '&endPoint=' + endPoint
|
||||
// })
|
||||
uni.removeStorageSync("origins")
|
||||
uni.removeStorageSync("destination")
|
||||
wx.navigateTo({
|
||||
url: '../../../BagStation/pages/routePlain/routePlain'
|
||||
})
|
||||
} else if (index == 8) {
|
||||
this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
|
||||
}
|
||||
// else if(index==8){
|
||||
// uni.navigateTo({
|
||||
// url: '/BagStation/myCars/myCars'
|
||||
// })
|
||||
// }
|
||||
else {
|
||||
uni.showToast({
|
||||
title: '功能暂无',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
showQr() {
|
||||
// uni.navigateTo({
|
||||
// url: '/BagStation/pages/stationDetail/stieQr'
|
||||
// })
|
||||
this.showThreeSites = true
|
||||
},
|
||||
|
||||
toCards() {
|
||||
uni.navigateTo({
|
||||
url: '/BagMoney/pages/oilCards/oilCards'
|
||||
})
|
||||
},
|
||||
|
||||
toOrders() {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/order/orderList/orderList'
|
||||
})
|
||||
},
|
||||
|
||||
filterRes(val) {
|
||||
this.filterData = val
|
||||
this.getSiteList()
|
||||
@@ -536,9 +406,9 @@
|
||||
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
||||
...uni.getStorageSync('location'),
|
||||
...this.filterData,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if (!uni.getStorageSync('user')) {
|
||||
oilSiteApi.readOnlySites(params).then(res => {
|
||||
this.getCount++
|
||||
@@ -559,158 +429,27 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
oilSiteApi[uni.getStorageSync('user')?'getSiteLists':'getSiteLists'](params).then(res=>{
|
||||
oilSiteApi[uni.getStorageSync('user') ? 'getSiteLists' : 'getSiteLists'](params).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.siteList = res.data.list
|
||||
}
|
||||
})
|
||||
/* caolc 禁用
|
||||
别人写的有毛病
|
||||
if (!uni.getStorageSync('user')) {
|
||||
oilSiteApi.readOnlySites(params).then(res => {
|
||||
this.getCount++
|
||||
if (res.code == 20000) {
|
||||
// console.log(res.data.list)
|
||||
this.siteList = res.data.list
|
||||
} else {
|
||||
if (this.getCount == 1) {
|
||||
setTimeout(() => {
|
||||
this.getSiteList()
|
||||
}, 1000)
|
||||
|
||||
|
||||
} else {
|
||||
uni.getSetting({
|
||||
success: (resSet) => {
|
||||
if (resSet.authSetting['scope.address'] == false) {
|
||||
uni.showMode({
|
||||
title: '请您打开定位权限',
|
||||
content: '用于获取您当前位置附近的油站',
|
||||
confirmText: '去设置',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.openSetting({
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
oilSiteApi.getSiteLists(params).then(res => {
|
||||
if (res.code == 20000) {
|
||||
this.siteList = res.data.list
|
||||
}
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
},
|
||||
|
||||
toDetail(item) {
|
||||
let itemS = encodeURIComponent(JSON.stringify(item));
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||
fail: (err) => {},
|
||||
success: () => {}
|
||||
})
|
||||
// console.log(uni.getStorageSync('user'))
|
||||
// return
|
||||
/*
|
||||
if (uni.getStorageSync('user')) {
|
||||
uni.navigateTo({
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||
fail: (err) => {
|
||||
// console.log(err)
|
||||
},
|
||||
success: () => {
|
||||
// console.log('err')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '请您登录',
|
||||
content: "登录小星加油才可以加油 |˛˙꒳˙)♡",
|
||||
confirmText: '去登陆',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.reLaunch({
|
||||
url: '../../../BagAuth/pages/login/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
},
|
||||
getFilterData() {
|
||||
oilSiteApi.getCheckInfo().then(res => {
|
||||
if (res.code == 20000) {
|
||||
let channelCodes = []
|
||||
res.data.channelCodes.map(item => {
|
||||
channelCodes.push({
|
||||
title: item.name,
|
||||
value: item.id
|
||||
})
|
||||
})
|
||||
let productCodes = []
|
||||
res.data.productCodes.map(item => {
|
||||
productCodes.push({
|
||||
title: item.name,
|
||||
value: item.id
|
||||
})
|
||||
})
|
||||
let siteBrands = []
|
||||
res.data.siteBrands.map(item => {
|
||||
siteBrands.push({
|
||||
title: item.name,
|
||||
value: item.id
|
||||
})
|
||||
})
|
||||
// console.log(channelCodes, productCodes, siteBrands)
|
||||
this.menuList[0].detailList.concat(channelCodes)
|
||||
this.menuList[1].detailList.concat(productCodes)
|
||||
this.menuList[2].detailList.concat(siteBrands)
|
||||
uni.setStorageSync('filterData', this.menuList)
|
||||
// this.$refs.slFilter.resetMenuList(this.menuList)
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelected(res) {
|
||||
// console.log(res)
|
||||
},
|
||||
dateChange(d) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: d
|
||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
InputFocus(e) {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/station/stationList'
|
||||
})
|
||||
},
|
||||
InputBlur(e) {
|
||||
this.InputBottom = 0
|
||||
},
|
||||
nameSelect(value, item) {
|
||||
this.title2 = item.text
|
||||
// console.log(item)
|
||||
},
|
||||
typeSelect(value, item) {
|
||||
// console.log(item)
|
||||
this.title1 = item.text
|
||||
},
|
||||
optionSelect(value, item) {
|
||||
// console.log(item)
|
||||
this.title3 = item.text
|
||||
},
|
||||
// 扫码逻辑开始
|
||||
|
||||
getSiteInfo(id) {
|
||||
let data2 = {
|
||||
...uni.getStorageSync('location'),
|
||||
@@ -735,6 +474,7 @@
|
||||
url: `/BagStation/pages/makeOrder/makeOrder?siteId=${this.siteId}`
|
||||
})
|
||||
},
|
||||
|
||||
getScanRes(code) {
|
||||
let data2 = {
|
||||
qrCode: code
|
||||
@@ -746,16 +486,13 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
scan1() {
|
||||
// 测试用
|
||||
this.getScanRes('fixed_1371293944539422720')
|
||||
},
|
||||
|
||||
openScan() {
|
||||
uni.scanCode({
|
||||
scanType: 'qrCode',
|
||||
onlyFromCamera: false,
|
||||
success: (res) => {
|
||||
console.log(res.result)
|
||||
|
||||
this.getScanRes(res.result)
|
||||
},
|
||||
fail: (err) => {
|
||||
@@ -765,9 +502,8 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
//结束
|
||||
|
||||
scrollScreen() {
|
||||
// console.log('吸顶判断')
|
||||
uni.createSelectorQuery().selectViewport().scrollOffset(res => {
|
||||
let view = uni.createSelectorQuery().in(this).select(".screentop");
|
||||
let cuBar = uni.createSelectorQuery().in(this).select(".cu-bar");
|
||||
@@ -782,7 +518,65 @@
|
||||
}).exec();
|
||||
}).exec();
|
||||
}).exec();
|
||||
}
|
||||
},
|
||||
|
||||
adError(err) {
|
||||
console.log('add err', err)
|
||||
},
|
||||
// shadoumeiyou(index) {
|
||||
// if (index == 0) {
|
||||
// uni.switchTab({
|
||||
// url: '/pages/tabbar/station/stationList'
|
||||
// })
|
||||
// } else if (index == 1) {
|
||||
// const referer = '星油云'; //调用插件的app的名称
|
||||
// uni.removeStorageSync("origins")
|
||||
// uni.removeStorageSync("destination")
|
||||
// wx.navigateTo({
|
||||
// url: '../../../BagStation/pages/routePlain/routePlain'
|
||||
// })
|
||||
// } else if (index == 8) {
|
||||
// this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
|
||||
// }
|
||||
// else {
|
||||
// uni.showToast({
|
||||
// title: '功能暂无',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
|
||||
// getFilterData() {
|
||||
// oilSiteApi.getCheckInfo().then(res => {
|
||||
// if (res.code == 20000) {
|
||||
// let channelCodes = []
|
||||
// res.data.channelCodes.map(item => {
|
||||
// channelCodes.push({
|
||||
// title: item.name,
|
||||
// value: item.id
|
||||
// })
|
||||
// })
|
||||
// let productCodes = []
|
||||
// res.data.productCodes.map(item => {
|
||||
// productCodes.push({
|
||||
// title: item.name,
|
||||
// value: item.id
|
||||
// })
|
||||
// })
|
||||
// let siteBrands = []
|
||||
// res.data.siteBrands.map(item => {
|
||||
// siteBrands.push({
|
||||
// title: item.name,
|
||||
// value: item.id
|
||||
// })
|
||||
// })
|
||||
// this.menuList[0].detailList.concat(channelCodes)
|
||||
// this.menuList[1].detailList.concat(productCodes)
|
||||
// this.menuList[2].detailList.concat(siteBrands)
|
||||
// uni.setStorageSync('filterData', this.menuList)
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -843,10 +637,6 @@
|
||||
}
|
||||
|
||||
|
||||
.placeholder-hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.my-icon-sm {
|
||||
display: inline-block;
|
||||
width: 70upx;
|
||||
@@ -858,4 +648,4 @@
|
||||
.my-icon-sm .text-sm {
|
||||
line-height: 1rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user