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>
<view class="bottom-nav">
<view class="nav-item" @click="navigateTo('index')">
<image src="/static/imgs/footer/home.png" mode="aspectFit"></image>
<text>首页</text>
<image :src="activeTab === 'index' ? '/static/imgs/footer/home-active.png' : '/static/imgs/footer/home.png'"
mode="aspectFit"></image>
<text :class="{active: activeTab === 'index'}">首页</text>
</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')">
<image src="/static/imgs/footer/ai.png" mode="aspectFit" ></image>
<text>在线问答</text>
<image :src="activeTab === 'chat' ? '/static/imgs/footer/ai-active.png' : '/static/imgs/footer/ai.png'"
mode="aspectFit"></image>
<text :class="{active: activeTab === 'chat'}">AI助手</text>
</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')">
<image src="/static/imgs/footer/mine.png" mode="aspectFit"></image>
<text>我的</text>
<image :src="activeTab === 'mine' ? '/static/imgs/footer/mine-active.png' : '/static/imgs/footer/mine.png'"
mode="aspectFit"></image>
<text :class="{active: activeTab === 'mine'}">我的</text>
</view>
</view>
</template>
<script>
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: {
navigateTo(page) {
this.activeTab = page;
uni.redirectTo({
url: `/pages/${page}/index`,
success: () => {},
fail: () => {},
complete: () => {}
});
console.log(page)
}
}
};
@ -46,13 +54,14 @@
align-items: center;
background-color: #f8f8f8;
position: fixed;
// padding-bottom: calc(0rpx + env(safe-area-inset-bottom));
bottom: 0;
padding-bottom:40rpx;
padding-bottom: 40rpx;
left: 0;
right: 0;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
z-index: 999;
height: 100rpx;
padding-top: 10rpx;
.nav-item {
display: flex;
@ -69,6 +78,10 @@
height: 46rpx;
margin: 12rpx 0 6rpx 0;
}
.active {
color: #5b9cf8; //
}
}
}
</style>

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -34,13 +34,13 @@
</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"
cancel-color="#606266">
<view class="modal-content">
<!-- 未登录时显示授权按钮 -->
<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"
@getuserinfo="onGetUserInfo">
<image class="wechat-icon" src="/static/imgs/wechat.png"></image>
@ -51,7 +51,7 @@
<image class="phone-icon" src="/static/imgs/phone.png"></image>
授权获取手机号
</button>
<view class="auth-tip">登录即表示同意用户协议隐私政策</view>
<view class="auth-tip">授权即表示同意用户协议隐私政策</view>
</view>
<!-- 已登录时显示编辑表单 -->
<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