11
@ -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;
|
||||
bottom: 0;
|
||||
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>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<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="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 v-if="tabsReady">
|
||||
<u-tabs :list="tabList" :current="currentTab" @change="handleTabChange" border="false"
|
||||
active-color="#1989fa" bg-color="#f8f8f8"></u-tabs>
|
||||
@ -103,15 +103,19 @@
|
||||
<!-- <u-popup :show="show" mode="center" :round="10">
|
||||
<instructionVue @change='readChange'/>
|
||||
<u-button type="primary" text="我已知晓" :disabled="hasReaded" @click="show=false"></u-button>
|
||||
</u-popup> -->
|
||||
<Copyright/>
|
||||
</u-popup> -->
|
||||
<!-- 保持原有结构不变 -->
|
||||
<view class="copyright-fixed">
|
||||
<Copyright :footerHeight="'0'" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
get,
|
||||
post,
|
||||
post,
|
||||
del
|
||||
} from '@/utils/request';
|
||||
import {
|
||||
@ -123,7 +127,7 @@
|
||||
formatRelativeTime
|
||||
} from '@/utils/timeFormat';
|
||||
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 {
|
||||
applyType,
|
||||
@ -133,7 +137,7 @@
|
||||
export default {
|
||||
components: {
|
||||
instructionVue,
|
||||
noData,
|
||||
noData,
|
||||
Copyright
|
||||
},
|
||||
data() {
|
||||
@ -193,12 +197,14 @@
|
||||
}))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleBack() {
|
||||
// 固定跳转首页
|
||||
uni.redirectTo({ url: '/pages/mine/index' });
|
||||
methods: {
|
||||
handleBack() {
|
||||
// 固定跳转首页
|
||||
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;
|
||||
|
||||
.nav-bar {
|
||||
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;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
// font-weight: bold;
|
||||
width: 100%;
|
||||
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;
|
||||
}
|
||||
|
||||
.nav-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
// font-weight: bold;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loading-container {
|
||||
|
||||
@ -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">
|
||||
|
||||
BIN
static/imgs/footer/ai-active.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.7 KiB |
BIN
static/imgs/footer/home-active.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.3 KiB |
BIN
static/imgs/footer/mine-active.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.3 KiB |