|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <ay-container v-show="store.user.isLogined">
|
|
|
|
|
- <div class="chunk">
|
|
|
|
|
|
|
+ <ay-container>
|
|
|
|
|
+ <div class="chunk p-b-0">
|
|
|
<div class="center justify-between top">
|
|
<div class="center justify-between top">
|
|
|
<div class="center" @click="methods.goPerson">
|
|
<div class="center" @click="methods.goPerson">
|
|
|
<image class="personal" :src="store.user.userInfo.head_url" mode="scaleToFill" />
|
|
<image class="personal" :src="store.user.userInfo.head_url" mode="scaleToFill" />
|
|
|
- <div>
|
|
|
|
|
|
|
+ <div :class="{ 'p-color': !store.user.isLogined }">
|
|
|
<div>{{ store.user.userInfo.user_name }}</div>
|
|
<div>{{ store.user.userInfo.user_name }}</div>
|
|
|
<div class="mobile">{{ store.user.userInfo.mobileDes }}</div>
|
|
<div class="mobile">{{ store.user.userInfo.mobileDes }}</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -39,21 +39,19 @@
|
|
|
</div>
|
|
</div>
|
|
|
</ay-flowLine>
|
|
</ay-flowLine>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="center qrcode-text">
|
|
|
|
|
- <template v-if="!data.firstUnload">
|
|
|
|
|
- <template v-if="data.hasnopayfordriver">存在未支付完成订单</template>
|
|
|
|
|
- <template v-else-if="data.qrcode.expire">
|
|
|
|
|
- 二维码已失效
|
|
|
|
|
- <ay-refresh
|
|
|
|
|
- :iconSize="36"
|
|
|
|
|
- :loading="store.webapi.strategy.get_user_qrcode.ing"
|
|
|
|
|
- @refresh="methods.getQrcode"
|
|
|
|
|
- ></ay-refresh>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-else>
|
|
|
|
|
- 有效时间:
|
|
|
|
|
- <ay-countdown :seconds="data.qrcode.seconds" @ender="data.qrcode.expire = true" />
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <div class="center qrcode-text mb-spac" v-if="!data.firstUnload">
|
|
|
|
|
+ <template v-if="data.hasnopayfordriver">存在未支付完成订单</template>
|
|
|
|
|
+ <template v-else-if="data.qrcode.expire">
|
|
|
|
|
+ 二维码已失效
|
|
|
|
|
+ <ay-refresh
|
|
|
|
|
+ :iconSize="36"
|
|
|
|
|
+ :loading="store.webapi.strategy.get_user_qrcode.ing"
|
|
|
|
|
+ @refresh="methods.getQrcode"
|
|
|
|
|
+ ></ay-refresh>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ 有效时间:
|
|
|
|
|
+ <ay-countdown :seconds="data.qrcode.seconds" @ender="data.qrcode.expire = true" />
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -73,6 +71,7 @@
|
|
|
<div class="chunk m0 h-100% s-fz cars" @click="methods.truckManage">
|
|
<div class="chunk m0 h-100% s-fz cars" @click="methods.truckManage">
|
|
|
<div>
|
|
<div>
|
|
|
<div class="mb-spacd4" v-show="showcm">车辆管理</div>
|
|
<div class="mb-spacd4" v-show="showcm">车辆管理</div>
|
|
|
|
|
+ <div v-if="!store.user.isLogined">{{ config.common.nullView[0] }}</div>
|
|
|
<div v-show="store.webapi.strategy.get_truck_info.firstSuccess">
|
|
<div v-show="store.webapi.strategy.get_truck_info.firstSuccess">
|
|
|
<div class="p-color mt-spac" v-if="data.truckInfo.length === 0">添加车辆</div>
|
|
<div class="p-color mt-spac" v-if="data.truckInfo.length === 0">添加车辆</div>
|
|
|
<div v-else>
|
|
<div v-else>
|
|
@@ -96,7 +95,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="chuck list-app">
|
|
<div class="chuck list-app">
|
|
|
- <ay-sticky :top="topHeightPX" relativeTo="#stations" targetSelector="#stationTop">
|
|
|
|
|
|
|
+ <ay-sticky :top="0" relativeTo="#stations" targetSelector="#stationTop">
|
|
|
<div
|
|
<div
|
|
|
class="center justify-between sticky"
|
|
class="center justify-between sticky"
|
|
|
id="stationTop"
|
|
id="stationTop"
|
|
@@ -131,7 +130,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
|
class="center p-color"
|
|
class="center p-color"
|
|
|
- v-show="!data.firstUnload && !data.userLocation"
|
|
|
|
|
|
|
+ v-show="!data.userLocation"
|
|
|
@click="methods.getListApp({ activation: true })"
|
|
@click="methods.getListApp({ activation: true })"
|
|
|
>
|
|
>
|
|
|
查看附近加气站
|
|
查看附近加气站
|
|
@@ -158,7 +157,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</uni-popup-dialog>
|
|
</uni-popup-dialog>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
-
|
|
|
|
|
|
|
+ <!-- 城市列表抽屉 -->
|
|
|
<ay-drawer
|
|
<ay-drawer
|
|
|
ref="drawer"
|
|
ref="drawer"
|
|
|
mode="right"
|
|
mode="right"
|
|
@@ -204,6 +203,15 @@ const staticData = {
|
|
|
indexedListWatcher: null,
|
|
indexedListWatcher: null,
|
|
|
/** 页面滚动距离 */
|
|
/** 页面滚动距离 */
|
|
|
scrollTop: 0,
|
|
scrollTop: 0,
|
|
|
|
|
+ /** 需要登录的方法名 */
|
|
|
|
|
+ IdentityMethods: [
|
|
|
|
|
+ 'goPerson',
|
|
|
|
|
+ 'scanCode',
|
|
|
|
|
+ 'getQrcode',
|
|
|
|
|
+ 'goAccount',
|
|
|
|
|
+ 'truckManage',
|
|
|
|
|
+ 'goPage',
|
|
|
|
|
+ ] as (keyof typeof methods)[],
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const data = ay.initData({
|
|
const data = ay.initData({
|
|
@@ -630,6 +638,34 @@ const methods = ay.initMethods(
|
|
|
{
|
|
{
|
|
|
scanCode: { showLoading: true },
|
|
scanCode: { showLoading: true },
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ ba(methodName) {
|
|
|
|
|
+ // console.log(k)
|
|
|
|
|
+ // 需要登录的功能
|
|
|
|
|
+ if (staticData.IdentityMethods.includes(methodName)) {
|
|
|
|
|
+ // 未登录
|
|
|
|
|
+ if (!store.user.isLogined) {
|
|
|
|
|
+ if (methodName === 'goPerson') {
|
|
|
|
|
+ return true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ func.native
|
|
|
|
|
+ .showModal({
|
|
|
|
|
+ title: '请先登录账号',
|
|
|
|
|
+ confirmText: '同意',
|
|
|
|
|
+ cancelText: '再看看',
|
|
|
|
|
+ showCancel: true,
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ ay.goLogin()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
)
|
|
)
|
|
|
ay.entrance(
|
|
ay.entrance(
|
|
|
async (args) => {
|
|
async (args) => {
|
|
@@ -659,10 +695,15 @@ ay.entrance(
|
|
|
.catch()
|
|
.catch()
|
|
|
|
|
|
|
|
// #endif
|
|
// #endif
|
|
|
- methods.initWS()
|
|
|
|
|
methods.getCityList()
|
|
methods.getCityList()
|
|
|
data.station.curCity = uni.getStorageSync(staticData.cctkn) || staticData.defCity
|
|
data.station.curCity = uni.getStorageSync(staticData.cctkn) || staticData.defCity
|
|
|
methods.getListApp({ cras: args.cras })
|
|
methods.getListApp({ cras: args.cras })
|
|
|
|
|
+ if (!store.user.isLogined) {
|
|
|
|
|
+ // data.hasnopayfordriver = false
|
|
|
|
|
+ // data.firstUnload = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ methods.initWS()
|
|
|
await init()
|
|
await init()
|
|
|
// 无未支付订单
|
|
// 无未支付订单
|
|
|
if (!data.hasnopayfordriver) {
|
|
if (!data.hasnopayfordriver) {
|
|
@@ -681,9 +722,9 @@ ay.entrance(
|
|
|
// init()
|
|
// init()
|
|
|
// }
|
|
// }
|
|
|
}
|
|
}
|
|
|
- if (args.loadType === enums.LoadType.onShow) {
|
|
|
|
|
- init()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (args.loadType === enums.LoadType.onShow) {
|
|
|
|
|
+ // init()
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
addLoadTypes: [enums.LoadType.onShow],
|
|
addLoadTypes: [enums.LoadType.onShow],
|