xiaozy #11
24
App.vue
24
App.vue
@@ -92,7 +92,7 @@
|
|||||||
imageUrl: 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/login-bg.png',
|
imageUrl: 'https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/login-bg.png',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(view.route)
|
// console.log(view.route)
|
||||||
clearTimeout(loginTimer)
|
clearTimeout(loginTimer)
|
||||||
clearTimeout(onlineTimer)
|
clearTimeout(onlineTimer)
|
||||||
|
|
||||||
@@ -165,16 +165,16 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
uni.getLocation({
|
// uni.getLocation({
|
||||||
type: 'wgs84',
|
// type: 'wgs84',
|
||||||
success: function(res) {
|
// success: function(res) {
|
||||||
uni.setStorageSync('location', {
|
// uni.setStorageSync('location', {
|
||||||
longitude: res.longitude + '',
|
// longitude: res.longitude + '',
|
||||||
latitude: res.latitude + ''
|
// latitude: res.latitude + ''
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
console.log('onReady')
|
// console.log('onReady')
|
||||||
const token = uni.getStorageSync('Authorization')
|
const token = uni.getStorageSync('Authorization')
|
||||||
const openid = uni.getStorageSync('openid')
|
const openid = uni.getStorageSync('openid')
|
||||||
let key = ''
|
let key = ''
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log(key)
|
// console.log(key)
|
||||||
if (key == '在线') {
|
if (key == '在线') {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,127 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="login-page bg-white">
|
<view class="login-page bg-white">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="image login-bg">
|
<view class="image login-bg">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <image :src="imgURL+'login-bg.png'" mode="widthFix"></image> -->
|
<!-- <image :src="imgURL+'login-bg.png'" mode="widthFix"></image> -->
|
||||||
<!-- <image src="../../../BagStation/static/img/LV.png" mode="widthFix"></image> -->
|
<!-- <image src="../../../BagStation/static/img/LV.png" mode="widthFix"></image> -->
|
||||||
<image src="../../../static/img/login-bg.png" mode="widthFix"></image>
|
<image src="../../../static/img/login-bg.png" mode="widthFix"></image>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<scroll-view scroll-x class=" bg-white nav padding">
|
<scroll-view scroll-x class=" bg-white nav padding">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="flex text-center padding-bottom">
|
<view class="flex text-center padding-bottom">
|
||||||
|
|
||||||
<view class="cu-item flex-sub">
|
<view class="cu-item flex-sub">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cu-item flex-sub" :class="0==TabCur?'text-red cur':''" @tap="tabSelect(0)">
|
<view class="cu-item flex-sub" :class="0==TabCur?'text-red cur':''" @tap="tabSelect(0)">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
个人账号
|
个人账号
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cu-item flex-sub">
|
<view class="cu-item flex-sub">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<!--<view class="cu-item flex-sub" :class="1==TabCur?'text-red cur':''" @tap="tabSelect(1)">
|
||||||
<!-- <view class="cu-item flex-sub" :class="1==TabCur?'text-red cur':''" @tap="tabSelect(1)">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
企业账号
|
企业账号
|
||||||
|
</view>-->
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="cu-load load-modal" v-if="loadModal">
|
<view class="cu-load load-modal" v-if="loadModal">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="gray-text">加载中...</view>
|
<view class="gray-text">加载中...</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="margin-lg flex flex-direction text-center">
|
<view class="margin-lg flex flex-direction text-center">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button class="cu-btn round bg-main-oil lg text-lg" open-type="getPhoneNumber"
|
<button class="cu-btn round bg-main-oil lg text-lg" open-type="getPhoneNumber"
|
||||||
@getphonenumber="decryptPhoneNumber">
|
@getphonenumber="decryptPhoneNumber">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<text class="cuIcon-weixin padding-right-xs"> </text>
|
<text class="cuIcon-weixin padding-right-xs"> </text>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
微信用户一键登录
|
微信用户一键登录
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
<!-- <button class="cu-btn margin-top round lg" @tap="refuseEmpower">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button class="cu-btn margin-top round lg" @tap="refuseEmpower">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
输入手机号码登录
|
输入手机号码登录
|
||||||
|
</button> -->
|
||||||
|
|
||||||
|
|
||||||
</button>
|
|
||||||
<button class="cu-btn bg-0 margin-top round text-sm" @tap="refuseLogin">
|
<button class="cu-btn bg-0 margin-top round text-sm" @tap="refuseLogin">
|
||||||
跳过
|
跳过
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<loginBottom @onCheck="checkAgree" />
|
||||||
|
|
||||||
|
|
||||||
<!-- <loginBottom :check="loginOut" /> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -131,7 +47,6 @@
|
|||||||
import loginBottom from './components/loginBottom.vue'
|
import loginBottom from './components/loginBottom.vue'
|
||||||
import oilIdentityApi from '@/api/oil-identity'
|
import oilIdentityApi from '@/api/oil-identity'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
loginBottom
|
loginBottom
|
||||||
@@ -139,6 +54,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// imgsrc:require('../../../BagStation/static/img/login-bg.png'),
|
// imgsrc:require('../../../BagStation/static/img/login-bg.png'),
|
||||||
|
checked:false,
|
||||||
userHandle: false,
|
userHandle: false,
|
||||||
TabCur: 0,
|
TabCur: 0,
|
||||||
accuntSource: false,
|
accuntSource: false,
|
||||||
@@ -157,16 +73,16 @@
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
uni.clearStorageSync()
|
uni.clearStorageSync()
|
||||||
this.refreshLocation()
|
// this.refreshLocation()
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: (loginRes) => {
|
success: (loginRes) => {
|
||||||
console.log(loginRes,'+++++++')
|
console.log(loginRes, '+++++++')
|
||||||
const code = loginRes.code
|
const code = loginRes.code
|
||||||
this.onceCode = code
|
this.onceCode = code
|
||||||
console.log(this.onceCode,'----------')
|
console.log(this.onceCode, '----------')
|
||||||
oilIdentityApi.sendCode(this.onceCode).then(res => {
|
oilIdentityApi.sendCode(this.onceCode).then(res => {
|
||||||
console.log(res,'++++++++++++++++')
|
console.log(res, '++++++++++++++++')
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
this.sessionKey = res.data.sessionKey
|
this.sessionKey = res.data.sessionKey
|
||||||
uni.setStorageSync('openid', res.data.openId)
|
uni.setStorageSync('openid', res.data.openId)
|
||||||
@@ -198,18 +114,21 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
checkAgree(val) {
|
||||||
|
this.checked = val
|
||||||
|
},
|
||||||
refuseLogin() {
|
refuseLogin() {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/tabbar/home/home'
|
url: '/pages/tabbar/home/home'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
refreshLocation() {
|
refreshLocation() {
|
||||||
uni.getLocation({
|
// uni.getLocation({
|
||||||
type: 'wgs84',
|
// type: 'wgs84',
|
||||||
success: function(res) {
|
// success: function(res) {
|
||||||
uni.setStorageSync('location', res)
|
// uni.setStorageSync('location', res)
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
autoLogin() {
|
autoLogin() {
|
||||||
// let url = 'loginCompany'
|
// let url = 'loginCompany'
|
||||||
@@ -231,6 +150,13 @@
|
|||||||
|
|
||||||
|
|
||||||
decryptPhoneNumber(e) {
|
decryptPhoneNumber(e) {
|
||||||
|
if (!this.checked) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请您阅读并同意协议',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
// console.log(e.detail)
|
// console.log(e.detail)
|
||||||
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
||||||
const data1 = {
|
const data1 = {
|
||||||
@@ -306,7 +232,8 @@
|
|||||||
height: 750rpx;
|
height: 750rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
.bg-0{
|
|
||||||
|
.bg-0 {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: #555555;
|
color: #555555;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
interstitialAd.onLoad((err) => {
|
interstitialAd.onLoad((err) => {
|
||||||
console.log('onLoad event emit', err)
|
// console.log('onLoad event emit', err)
|
||||||
})
|
})
|
||||||
interstitialAd.onError((err) => {
|
interstitialAd.onError((err) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/tabbar/home/home',
|
url: '/pages/tabbar/home/home',
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.log(err)
|
// console.log(err)
|
||||||
}
|
}
|
||||||
// url:'/BagStation/orderDetail/orderDetail'
|
// url:'/BagStation/orderDetail/orderDetail'
|
||||||
})
|
})
|
||||||
@@ -87,12 +87,12 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, 2000)
|
}, 2000)
|
||||||
console.log('onError event emit', err)
|
// console.log('onError event emit', err)
|
||||||
})
|
})
|
||||||
// 在适合的场景显示插屏广告
|
// 在适合的场景显示插屏广告
|
||||||
if (interstitialAd) {
|
if (interstitialAd) {
|
||||||
interstitialAd.show().catch((err) => {
|
interstitialAd.show().catch((err) => {
|
||||||
console.error(err)
|
// console.error(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
interstitialAd.onClose(res => {
|
interstitialAd.onClose(res => {
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/tabbar/home/home',
|
url: '/pages/tabbar/home/home',
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.log(err)
|
// console.log(err)
|
||||||
}
|
}
|
||||||
// url:'/BagStation/orderDetail/orderDetail'
|
// url:'/BagStation/orderDetail/orderDetail'
|
||||||
})
|
})
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
updateManager.onCheckForUpdate(function(res) {
|
updateManager.onCheckForUpdate(function(res) {
|
||||||
// 请求完新版本信息的回调
|
// 请求完新版本信息的回调
|
||||||
console.log('请求完新版本信息的回调', res.hasUpdate);
|
// console.log('请求完新版本信息的回调', res.hasUpdate);
|
||||||
});
|
});
|
||||||
|
|
||||||
updateManager.onUpdateReady(function(res) {
|
updateManager.onUpdateReady(function(res) {
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
value: item.id
|
value: item.id
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log(channelCodes, productCodes, siteBrands)
|
// console.log(channelCodes, productCodes, siteBrands)
|
||||||
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
this.menuList[0].detailList = this.menuList[0].detailList.concat(channelCodes)
|
||||||
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
this.menuList[1].detailList = this.menuList[1].detailList.concat(productCodes)
|
||||||
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
this.menuList[2].detailList = this.menuList[2].detailList.concat(siteBrands)
|
||||||
|
|||||||
@@ -15,9 +15,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="search-form radius" @tap="InputFocus">
|
<view class="search-form radius" @tap="InputFocus">
|
||||||
<text class="cuIcon-search"></text>
|
<text class="cuIcon-search"></text>
|
||||||
<input disabled :adjust-position="false" type="text" placeholder="搜索油站名称" confirm-type="search" />
|
<input disabled :adjust-position="false" type="text" placeholder="搜索油站名称"
|
||||||
|
confirm-type="search" />
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="">
|
<!-- <view class="">
|
||||||
阿三
|
阿三
|
||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
@@ -58,10 +59,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text-xxl" @tap="toManagement">
|
<view class="text-xxl" @tap="toManagement">
|
||||||
<view class="cuIcon-form">
|
<view class="cuIcon-form">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<text class="text-df">
|
<text class="text-df">
|
||||||
中交风控
|
中交风控
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -113,10 +114,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text-xxl" @tap="toManagement">
|
<view class="text-xxl" @tap="toManagement">
|
||||||
<view class="cuIcon-form">
|
<view class="cuIcon-form">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<text class="text-df">
|
<text class="text-df">
|
||||||
中交风控
|
中交风控
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -148,8 +149,8 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<!-- 广告图片开始 -->
|
<!-- 广告图片开始 -->
|
||||||
<view class="my-bg padding">
|
<view class="my-bg padding">
|
||||||
<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">
|
<!-- <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> -->
|
||||||
@@ -167,8 +168,8 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class=" ">
|
<view class=" ">
|
||||||
<view class="" v-if="siteList.length>0">
|
<view class="" v-if="siteList.length>0">
|
||||||
<site-item v-for="(item,index) in siteList" :key="item.id" :site-item="item" :first="index==0" :listHeight="listHeight"
|
<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)">
|
:listHeight="listHeight" class="cu-list menu-avatar cu-item" @tap="toDetail(item)">
|
||||||
</site-item>
|
</site-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
@@ -198,7 +199,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
swiperArray:[
|
swiperArray: [
|
||||||
// {
|
// {
|
||||||
// src:this.global.starUrl+'banner.png',
|
// src:this.global.starUrl+'banner.png',
|
||||||
// link:''
|
// link:''
|
||||||
@@ -208,7 +209,7 @@
|
|||||||
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
listHeight:160,
|
listHeight: 160,
|
||||||
siteInfo: {
|
siteInfo: {
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -325,16 +326,11 @@
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onTabItemTap(res){
|
onTabItemTap(res) {
|
||||||
this.showThreeSites =false
|
this.showThreeSites = false
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.reverseGeocoder(this.location)
|
this.reverseGeocoder(this.location)
|
||||||
this.refreshLocation()
|
|
||||||
|
|
||||||
// if (!uni.getStorageSync('filterData')) {
|
|
||||||
// this.getFilterData()
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.refreshLocation()
|
this.refreshLocation()
|
||||||
@@ -354,54 +350,38 @@
|
|||||||
icon: "none"
|
icon: "none"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
uni.navigateTo({
|
this.refreshLocation()
|
||||||
// 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: {
|
methods: {
|
||||||
toManagement(){
|
toManagement() {
|
||||||
const user = uni.getStorageSync('user');
|
const user = uni.getStorageSync('user');
|
||||||
if(user){
|
if (user) {
|
||||||
Financial.findHomePageReport({customerId:user.id}).then(res=>{
|
Financial.findHomePageReport({
|
||||||
if(res.data){
|
customerId: user.id
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
|
url: `../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'../../../Financial/pages/index?guide=1'
|
url: '../../../Financial/pages/index?guide=1'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请先登录!',
|
title: '请先登录!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
swiperClick(item,index) {
|
swiperClick(item, index) {
|
||||||
if(!item?.link) return
|
if (!item?.link) return
|
||||||
switch (Number(index)) {
|
uni.navigateTo({
|
||||||
// case 0:
|
url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
||||||
// this.goCall()
|
})
|
||||||
// break;
|
|
||||||
default:
|
|
||||||
console.log('item.link')
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
goToPage(url) {
|
goToPage(url) {
|
||||||
if (!url) return;
|
if (!url) return;
|
||||||
@@ -417,6 +397,35 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
refreshLocation() {
|
refreshLocation() {
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'wgs84',
|
||||||
|
success: (res) => {
|
||||||
|
uni.setStorageSync('location', res)
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
uni.getSetting({
|
||||||
|
success: (res) => {
|
||||||
|
if (!res.authSetting['scope.userLocation']) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '请您打开定位权限',
|
||||||
|
content: '用于获取您当前位置附近的油站',
|
||||||
|
confirmText: '去设置',
|
||||||
|
success: (resSec) => {
|
||||||
|
if (resSec.confirm) {
|
||||||
|
uni.openSetting({})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
this.getSiteList()
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
realPosition() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
@@ -424,9 +433,7 @@
|
|||||||
},
|
},
|
||||||
complete: () => {
|
complete: () => {
|
||||||
this.getSiteList()
|
this.getSiteList()
|
||||||
// // console.log('made')
|
|
||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
hideModel(name) {
|
hideModel(name) {
|
||||||
@@ -443,7 +450,7 @@
|
|||||||
oilSiteApi.getUserAuthInfo().then(res => {
|
oilSiteApi.getUserAuthInfo().then(res => {
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
this.getAmount()
|
this.getAmount()
|
||||||
this.getSiteList()
|
// this.getSiteList()
|
||||||
// realStatus: 0 vehicleStatus: 0
|
// realStatus: 0 vehicleStatus: 0
|
||||||
if (this.showAuthFrzen <= new Date().getTime()) {
|
if (this.showAuthFrzen <= new Date().getTime()) {
|
||||||
this.showAuthFrror = res.data.realStatus && res.data.vehicleStatus ? false :
|
this.showAuthFrror = res.data.realStatus && res.data.vehicleStatus ? false :
|
||||||
@@ -487,10 +494,11 @@
|
|||||||
// url: 'plugin://routePlan/index?key=' + this.qqMapKey + '&referer=' + referer +
|
// url: 'plugin://routePlan/index?key=' + this.qqMapKey + '&referer=' + referer +
|
||||||
// '&endPoint=' + endPoint
|
// '&endPoint=' + endPoint
|
||||||
// })
|
// })
|
||||||
uni.removeStorageSync("origins")
|
uni.removeStorageSync("origins")
|
||||||
uni.removeStorageSync("destination")
|
uni.removeStorageSync("destination")
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url:'../../../BagStation/pages/routePlain/routePlain'})
|
url: '../../../BagStation/pages/routePlain/routePlain'
|
||||||
|
})
|
||||||
} else if (index == 8) {
|
} else if (index == 8) {
|
||||||
this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
|
this.goToPage('/BagAuth/pages/agreeMent/OperationGuide')
|
||||||
}
|
}
|
||||||
@@ -523,17 +531,16 @@
|
|||||||
url: '/pages/tabbar/order/orderList/orderList'
|
url: '/pages/tabbar/order/orderList/orderList'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
filterRes(val) {
|
// filterRes(val) {
|
||||||
this.filterData = val
|
// this.filterData = val
|
||||||
this.getSiteList()
|
// this.getSiteList()
|
||||||
},
|
// },
|
||||||
|
|
||||||
getSiteList() {
|
getSiteList() {
|
||||||
let data1 = {
|
let data1 = {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
params: { //类型:Object 必有字段 备注:// 筛选对象
|
params: { //类型:Object 必有字段 备注:// 筛选对象
|
||||||
clientBelong:'BAICHUAN',
|
clientBelong: 'BAICHUAN',
|
||||||
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
sort: "juli", //类型:String 必有字段 备注:// 智能排序 ( price:价格最低 juli:距离最近 ) 默认距离排序
|
||||||
// longitude: 117.157817, // 必有字段 备注:// 当前位置经度
|
// longitude: 117.157817, // 必有字段 备注:// 当前位置经度
|
||||||
// latitude: 31.802472, // 必有字段 备注:// 当前位置维度
|
// latitude: 31.802472, // 必有字段 备注:// 当前位置维度
|
||||||
@@ -542,50 +549,25 @@
|
|||||||
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
// siteBrand: "", // 备注:// 石油品牌 ( 1-中国石油 2-中国石化 3-壳牌 4-民营 5-中海油 6-京博 7-中化石油 8-其他 )
|
||||||
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
// channelCode: "", // 备注:// 渠道编码 ( OIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油 YDJY:一点加油(壳牌))
|
||||||
// oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#)
|
// oilProductCode: "0#" // 备注:// 油号选择 ( 0# 92# 92#)
|
||||||
comprehensiveSort:1
|
comprehensiveSort: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!uni.getStorageSync('user')) {
|
if (!uni.getStorageSync('user')) {
|
||||||
oilSiteApi.readOnlySites(data1).then(res => {
|
oilSiteApi.readOnlySites(data1).then(res => {
|
||||||
this.getCount++
|
this.getCount++
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
// console.log(res.data.list)
|
|
||||||
this.siteList = res.data.list
|
this.siteList = res.data.list
|
||||||
} else {
|
} else {
|
||||||
if (this.getCount == 1) {
|
if (this.getCount == 1) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getSiteList()
|
this.getSiteList()
|
||||||
}, 1000)
|
}, 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 {
|
} else {
|
||||||
console.log(data1,'dayindata111111111111')
|
|
||||||
oilSiteApi.getSiteLists(data1).then(res => {
|
oilSiteApi.getSiteLists(data1).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
// console.log(res.data.list)
|
|
||||||
this.siteList = res.data.list
|
this.siteList = res.data.list
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -597,22 +579,18 @@
|
|||||||
if (uni.getStorageSync('user')) {
|
if (uni.getStorageSync('user')) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
url: `/BagStation/pages/stationDetail/stationDetail?item=${itemS}`,
|
||||||
fail: (err) => {
|
fail: (err) => {},
|
||||||
// console.log(err)
|
success: () => {}
|
||||||
},
|
|
||||||
success: () => {
|
|
||||||
// console.log('err')
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title:'请您登录',
|
title: '请您登录',
|
||||||
content:"登录佰川加油才可以加油 |˛˙꒳˙)♡",
|
content: "登录佰川加油才可以加油 |˛˙꒳˙)♡",
|
||||||
confirmText:'去登陆',
|
confirmText: '去登陆',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if(res.confirm){
|
if (res.confirm) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:'../../../BagAuth/pages/login/login'
|
url: '../../../BagAuth/pages/login/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user