From 4fabfe4dbd2eb28d07a4350597d314958cc1c281 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 09 十月 2025 11:16:43 +0800
Subject: [PATCH] 优化
---
bicycle/pages/index/index.vue | 36 +++++++++++++++++++++++++++++-------
1 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/bicycle/pages/index/index.vue b/bicycle/pages/index/index.vue
index 185873f..031da43 100644
--- a/bicycle/pages/index/index.vue
+++ b/bicycle/pages/index/index.vue
@@ -38,7 +38,7 @@
</image>
</view>
<view class="index_box_function">
- <view class="cXYC" v-for="(item, index) in functionList" :key="index" @click.stop="jump(item)">
+ <view class="cXYC" :style="{ marginTop: item.id === 5 ? '30rpx' : '' }" v-for="(item, index) in functionList" :key="index" @click.stop="jump(item)">
<button open-type="getPhoneNumber" @getphonenumber="getPhone" v-if="!userInfo.mobile"></button>
<image class="img80" :src="item.icon" mode="widthFix"></image>
<text class="f26 c3 mt10">{{item.name}}</text>
@@ -104,7 +104,7 @@
<view class="index_scancode_zw"></view>
</view>
<!-- 鑷杞�-缂寸撼鎶奸噾 -->
- <u-popup :show="show1" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
+ <u-popup :show="show1" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
@close="show1 = false">
<view class="deposit">
<view class="deposit_text">
@@ -126,7 +126,7 @@
</view>
</u-popup>
<!-- 鑷杞�-寮�閿� -->
- <u-popup :show="show5" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
+ <u-popup :show="show5" :overlay="false" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
@close="show5 = false">
<view class="loading">
<view class="loading_box">
@@ -143,7 +143,7 @@
</view>
</u-popup>
<!-- 鑷杞�-楠戣涓� -->
- <u-popup :show="show2" :overlay="false" overlayOpacity="0" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
+ <u-popup :show="show2" overlayOpacity="0" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
@close="show2 = false">
<view class="ride">
<view class="ride_head">
@@ -188,7 +188,7 @@
</view>
</u-popup>
<!-- 鑷杞�-宸茶繕杞� -->
- <u-popup :show="show6" :overlay="false" overlayOpacity="0" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
+ <u-popup :show="show6" overlayOpacity="0" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
@close="show6 = false">
<view class="ride">
<view class="ride_head">
@@ -231,7 +231,7 @@
</view>
</u-popup>
<!-- 鑷杞�-纭缁撶畻 -->
- <u-popup :show="show3" :overlay="false" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10" @close="show3 = false">
+ <u-popup :show="show3" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10" @close="show3 = false">
<template>
<view class="deposit1">
<view class="deposit_text">
@@ -251,7 +251,7 @@
<!-- 鑷杞�-纭缁撶畻寮规 -->
<u-modal :show="show7" title="鎻愮ず" content='纭缁撶畻鍚楋紵' :showCancelButton="true" cancelText="鍙栨秷" @confirm="settlement1" @cancel="show7 = false"></u-modal>
<!-- 骞垮憡 -->
- <u-popup :show="show" mode="center" :overlayStyle="{ zIndex: '99999' }" :closeOnClickOverlay="false" zIndex="99999" bgColor="transparent" :round="10" @close="show = false">
+ <u-popup :show="show" mode="center" :overlayStyle="{ zIndex: '99999' }" :closeOnClickOverlay="true" zIndex="99999" bgColor="transparent" :round="10" @close="show = false">
<view class="popupbox">
<view class="advertisement">
<image :src="info.adList[0].imgfullurl" mode="widthFix"></image>
@@ -315,6 +315,11 @@
name: '娑堣垂鏄庣粏',
icon: require('@/static/images/home_ic_mingxi@2x.png')
},
+ {
+ id: 5,
+ name: '杩愯惀涓績',
+ icon: require('@/static/icon/home_ic_mingxi.png')
+ },
],
info: {},
@@ -360,6 +365,10 @@
.then(async res => {
if (res.code === 200) {
let code = decodeURIComponent(options.scene)
+ // 鏄惁寮瑰嚭骞垮憡鍥�
+ if (res.data.adList.length > 0 && !res.data.memberRidesResponse) {
+ this.show = true
+ }
if (res.data.memberRidesResponse && res.data.memberRidesResponse.ridesType === 0 && code !== 'undefined' && res.data.rideStatus !== 2) {
let typeName = ''
if (code.substring(0, code.indexOf('-')) === 'ebike') {
@@ -715,6 +724,16 @@
uni.navigateTo({
url: '/pages/consumptionDetails/consumptionDetails'
});
+ } else if (item.id === 5) {
+ if (!this.userInfo.sysuser) {
+ uni.navigateTo({
+ url: '/pages/operationLogin/operationLogin'
+ });
+ } else {
+ uni.navigateTo({
+ url: '/pages/operationsCenter/operationsCenter'
+ });
+ }
} else if (item.id === 2) {
if (!this.userInfo.mobile) return
if (this.info.rideStatus === 1) {
@@ -1059,6 +1078,7 @@
.then(async res => {
if (res.code === 200) {
this.info = res.data
+ console.log('鏄惁寮瑰嚭骞垮憡鍥�', res.data.adList.length > 0 && !res.data.memberRidesResponse)
// 鏄惁寮瑰嚭骞垮憡鍥�
if (res.data.adList.length > 0 && !res.data.memberRidesResponse) {
this.show = true
@@ -1419,12 +1439,14 @@
display: flex;
align-items: center;
justify-content: space-between;
+ flex-wrap: wrap;
position: relative;
top: -24rpx;
text {
font-weight: 400;
}
.cXYC {
+ width: 23%;
position: relative;
button {
width: 100%;
--
Gitblit v1.9.3