This commit is contained in:
qiuyuan 2025-08-11 08:16:45 +08:00
parent a4e47cde15
commit f8b3520e5d
11 changed files with 716 additions and 639 deletions

View File

@ -1,39 +1,47 @@
<template> <template>
<view class="bottom-nav"> <view class="bottom-nav">
<view class="nav-item" @click="navigateTo('index')"> <view class="nav-item" @click="navigateTo('index')">
<image src="/static/imgs/footer/home.png" mode="aspectFit"></image> <image :src="activeTab === 'index' ? '/static/imgs/footer/home-active.png' : '/static/imgs/footer/home.png'"
<text>首页</text> mode="aspectFit"></image>
<text :class="{active: activeTab === 'index'}">首页</text>
</view> </view>
<!-- <view class="nav-item" @click="navigateTo('neighbor')">
<image src="/static/imgs/footer/service.png" mode="aspectFit"></image>
<text>服务中心</text>
</view> -->
<view class="nav-item" @click="navigateTo('chat')"> <view class="nav-item" @click="navigateTo('chat')">
<image src="/static/imgs/footer/ai.png" mode="aspectFit" ></image> <image :src="activeTab === 'chat' ? '/static/imgs/footer/ai-active.png' : '/static/imgs/footer/ai.png'"
<text>在线问答</text> mode="aspectFit"></image>
<text :class="{active: activeTab === 'chat'}">AI助手</text>
</view> </view>
<!-- <view class="nav-item" @click="navigateTo('service')">
<image src="/static/imgs/footer/chat.png" mode="aspectFit"></image>
<text>邻里圈</text>
</view> -->
<view class="nav-item" @click="navigateTo('mine')"> <view class="nav-item" @click="navigateTo('mine')">
<image src="/static/imgs/footer/mine.png" mode="aspectFit"></image> <image :src="activeTab === 'mine' ? '/static/imgs/footer/mine-active.png' : '/static/imgs/footer/mine.png'"
<text>我的</text> mode="aspectFit"></image>
<text :class="{active: activeTab === 'mine'}">我的</text>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() {
return {
activeTab: 'index' //
}
},
created() {
//
const pages = getCurrentPages();
if (pages.length) {
const currentPage = pages[pages.length - 1].route;
this.activeTab = currentPage.split('/')[1] || 'index';
}
},
methods: { methods: {
navigateTo(page) { navigateTo(page) {
this.activeTab = page;
uni.redirectTo({ uni.redirectTo({
url: `/pages/${page}/index`, url: `/pages/${page}/index`,
success: () => {}, success: () => {},
fail: () => {}, fail: () => {},
complete: () => {} complete: () => {}
}); });
console.log(page)
} }
} }
}; };
@ -46,13 +54,14 @@
align-items: center; align-items: center;
background-color: #f8f8f8; background-color: #f8f8f8;
position: fixed; position: fixed;
// padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); bottom: 0;
bottom: 0; padding-bottom: 40rpx;
padding-bottom:40rpx;
left: 0; left: 0;
right: 0; right: 0;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1); box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
z-index: 999; z-index: 999;
height: 100rpx;
padding-top: 10rpx;
.nav-item { .nav-item {
display: flex; display: flex;
@ -69,6 +78,10 @@
height: 46rpx; height: 46rpx;
margin: 12rpx 0 6rpx 0; margin: 12rpx 0 6rpx 0;
} }
.active {
color: #5b9cf8; //
}
} }
} }
</style> </style>

View File

@ -1,29 +1,39 @@
<template> <template>
<view class="copyright-section"> <view class="copyright-section" :style="{bottom: footerHeight}">
<view class="copyright-content"> <view class="copyright-content">
<text style="color: #ddd;padding-right: 20rpx;"></text> <text style="color: #ddd;padding-right: 20rpx;"></text>
<image src="/static/imgs/index/logo.png" class="logo" mode="aspectFit"></image> <image src="/static/imgs/index/logo.png" class="logo" mode="aspectFit"></image>
<!-- <view class="divider"></view> -->
<text class="copyright-text"> <text class="copyright-text">
提供技术支持 提供技术支持
</text> </text>
<text style="color: #ddd;padding-left: 20rpx;"></text> <text style="color: #ddd;padding-left: 20rpx;"></text>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
name: 'gx-copyright' name: 'gx-copyright',
props: {
footerHeight: {
type: String,
default: '130rpx' // footer
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.copyright-section { .copyright-section {
position: fixed;
left: 0;
right: 0;
bottom: 0;
width: 100%; width: 100%;
padding: 30rpx 0; padding: 20rpx 0;
// background-color: #f8faff; background-color:transparent;
opacity: 0.6;
// z-index: 90; /* footer */
.copyright-content { .copyright-content {
display: flex; display: flex;
@ -36,17 +46,10 @@ export default {
margin-right: 0rpx; margin-right: 0rpx;
} }
.divider {
width: 1rpx;
height: 30rpx;
background-color: #ddd;
margin: 0 20rpx;
}
.copyright-text { .copyright-text {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
padding-left: 20rpx; padding-left: 20rpx;
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,14 @@
<template> <template>
<view class="container"> <view class="container">
<!-- 自定义导航栏 --> <!-- 自定义导航栏 -->
<view class="nav-bar"> <view class="nav-bar">
<view class="nav-left" @click="handleBack"> <view class="nav-left" @click="handleBack">
<u-icon name="arrow-left" size="44"></u-icon> <u-icon name="arrow-left" size="44"></u-icon>
<!-- <text>返回</text> --> <!-- <text>返回</text> -->
</view> </view>
<text class="nav-title">近山社区</text> <text class="nav-title">近山社区</text>
</view> </view>
<view v-if="tabsReady"> <view v-if="tabsReady">
<u-tabs :list="tabList" :current="currentTab" @change="handleTabChange" border="false" <u-tabs :list="tabList" :current="currentTab" @change="handleTabChange" border="false"
active-color="#1989fa" bg-color="#f8f8f8"></u-tabs> active-color="#1989fa" bg-color="#f8f8f8"></u-tabs>
@ -103,15 +103,19 @@
<!-- <u-popup :show="show" mode="center" :round="10"> <!-- <u-popup :show="show" mode="center" :round="10">
<instructionVue @change='readChange'/> <instructionVue @change='readChange'/>
<u-button type="primary" text="我已知晓" :disabled="hasReaded" @click="show=false"></u-button> <u-button type="primary" text="我已知晓" :disabled="hasReaded" @click="show=false"></u-button>
</u-popup> --> </u-popup> -->
<Copyright/> <!-- 保持原有结构不变 -->
<view class="copyright-fixed">
<Copyright :footerHeight="'0'" />
</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
get, get,
post, post,
del del
} from '@/utils/request'; } from '@/utils/request';
import { import {
@ -123,7 +127,7 @@
formatRelativeTime formatRelativeTime
} from '@/utils/timeFormat'; } from '@/utils/timeFormat';
import instructionVue from '../../components/instruction.vue'; import instructionVue from '../../components/instruction.vue';
import noData from '../../components/noData.vue' import noData from '../../components/noData.vue'
import Copyright from '@/components/gx-copyright.vue'; import Copyright from '@/components/gx-copyright.vue';
import { import {
applyType, applyType,
@ -133,7 +137,7 @@
export default { export default {
components: { components: {
instructionVue, instructionVue,
noData, noData,
Copyright Copyright
}, },
data() { data() {
@ -193,12 +197,14 @@
})) }))
} }
}, },
methods: { methods: {
handleBack() { handleBack() {
// //
uni.redirectTo({ url: '/pages/mine/index' }); uni.redirectTo({
url: '/pages/mine/index'
});
}, },
formatName(value){ formatName(value) {
return thingThemes.getName(value) return thingThemes.getName(value)
}, },
handleTabChange(index) { handleTabChange(index) {
@ -369,30 +375,42 @@
$tag-radius: 8rpx; $tag-radius: 8rpx;
.container { .container {
position: relative; //
min-height: 100vh;
padding-bottom: 120rpx; // copyright
box-sizing: border-box; // padding
padding: 0; padding: 0;
min-height: 100vh; min-height: 100vh;
background-color: $bg-color; background-color: $bg-color;
.nav-bar { .copyright-fixed {
display: flex; position: fixed;
align-items: center; bottom: 0;
padding: 15px; left: 0;
// background-color: #fff; right: 0;
border-bottom: 1px solid #f5f5f5; z-index: 10; /* 防止被其他元素遮挡 */
margin-top: 84rpx; }
}
.nav-bar {
.nav-left { display: flex;
display: flex; align-items: center;
align-items: center; padding: 15px;
margin-right: 10px; // background-color: #fff;
} border-bottom: 1px solid #f5f5f5;
margin-top: 84rpx;
.nav-title { }
flex: 1;
text-align: center; .nav-left {
// font-weight: bold; display: flex;
width: 100%; align-items: center;
margin-right: 10px;
}
.nav-title {
flex: 1;
text-align: center;
// font-weight: bold;
width: 100%;
} }
.loading-container { .loading-container {

View File

@ -34,13 +34,13 @@
</view> </view>
</view> </view>
<!-- 修改用户信息弹窗 --> <!-- 修改用户信息弹窗 -->
<u-modal :show="showEditModal" :title="isLogin ? '修改用户信息' : '微信授权登录'" :show-confirm-button="isLogin" <u-modal :show="showEditModal" :title="isLogin ? '修改用户信息' : '微信授权手机号'" :show-confirm-button="isLogin"
:show-cancel-button="isLogin" @confirm="handleSubmit" @cancel="handleCancel" confirm-color="#2979ff" :show-cancel-button="isLogin" @confirm="handleSubmit" @cancel="handleCancel" confirm-color="#2979ff"
cancel-color="#606266"> cancel-color="#606266">
<view class="modal-content"> <view class="modal-content">
<!-- 未登录时显示授权按钮 --> <!-- 未登录时显示授权按钮 -->
<view v-if="!isLogin" class="auth-section"> <view v-if="!isLogin" class="auth-section">
<view class="auth-title">请先登录以使用完整功能</view> <view class="auth-title">请先授权手机号以使用完整功能</view>
<button v-if="!showPhoneButton" class="auth-button" open-type="getUserInfo" <button v-if="!showPhoneButton" class="auth-button" open-type="getUserInfo"
@getuserinfo="onGetUserInfo"> @getuserinfo="onGetUserInfo">
<image class="wechat-icon" src="/static/imgs/wechat.png"></image> <image class="wechat-icon" src="/static/imgs/wechat.png"></image>
@ -51,7 +51,7 @@
<image class="phone-icon" src="/static/imgs/phone.png"></image> <image class="phone-icon" src="/static/imgs/phone.png"></image>
授权获取手机号 授权获取手机号
</button> </button>
<view class="auth-tip">登录即表示同意用户协议隐私政策</view> <view class="auth-tip">授权即表示同意用户协议隐私政策</view>
</view> </view>
<!-- 已登录时显示编辑表单 --> <!-- 已登录时显示编辑表单 -->
<view v-else class="edit-section"> <view v-else class="edit-section">

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB