This commit is contained in:
2026-03-20 16:40:16 +08:00
parent deb949600b
commit 230bb76f63
23 changed files with 9306 additions and 637 deletions

View File

@ -1,5 +1,8 @@
<template>
<view class="home-page">
<!-- 微信复制弹窗 -->
<WeChatCopyModal ref="wechatCopyModal" />
<scroll-view class="homeContainer" scroll-y :show-scrollbar="false" :enhanced="true">
<view class="swiperWrapper">
<swiper indicator-dots="true" autoplay="true" interval="3000" duration="500" circular="true"
@ -9,12 +12,9 @@
</swiper-item>
</swiper>
<view class="userInfoWrapper">
<view class="userInfo" @click="handleUserInfo">
<image class="avatar-img"
:src="userInfo.avatar ? userInfo.avatar : `${imgPrefix}defaultHeadImg.png`"
mode="aspectFill" />
<view class="userContent">
<view class="userInfoWrapper">
<view class="userInfo" @click="handleUserInfo">
<view class="userContent">
<view class="userName">
{{ userInfo.username ? userInfo.username : "嗨,你好呀" }}
</view>
@ -62,12 +62,12 @@
</view>
</view>
<view class="line" />
<view class="itemWrapper" @click="toDogTraining">
<text class="titlWrapper">狗狗训练</text>
<view class="content">上门服务</view>
<view class="tips">上门训犬寄养喂猫遛狗</view>
<view class="itemWrapper" @click="toPublicBenefit" >
<text class="titlWrapper">关爱宠物,传递恩情</text>
<view class="content">公益助理</view>
<view class="tips">帮我找个家</view>
<view class="itemImg">
<image class="menu-img-sm" :src="`${imgPrefix}home-dogTraining.png`" mode="aspectFill" />
<image class="menu-img-sm" :src="`${imgPrefix}h-public.png`" mode="aspectFill" />
</view>
</view>
</view>
@ -99,12 +99,12 @@
</view>
<view class="thirdMenu">
<view class="itemWrapper" @click="toPublicBenefit">
<view class="itemWrapper" @click="toDogTraining">
<view>
<view class="title">公益助力</view>
<view class="tips">帮我找个家</view>
<view class="title">上门服务</view>
<view class="tips">邀请好友得好礼</view>
</view>
<image class="third-icon" :src="`${imgPrefix}home-publicBenefit.png`" mode="aspectFill" />
<image class="third-icon" :src="`${imgPrefix}h-door.png`" mode="aspectFill" />
</view>
<view class="itemWrapper" @click="toJoin">
<view>
@ -136,15 +136,18 @@
<script>
import {
imgPrefix,
jumpToWeChat,
showLoginConfirmModal
} from "@/utils/common";
import {
userWllet
} from "../../../api/login";
import WeChatCopyModal from "@/components/WeChatCopyModal.vue";
export default {
name: "HomePage",
components: {
WeChatCopyModal
},
data() {
return {
imgPrefix,
@ -245,9 +248,15 @@ export default {
});
},
toDogTraining() {
uni.navigateTo({
url: '/pageHome/service/index'
});
uni.showToast({
title: '暂未开放',
icon: 'none',
duration: 2000
});
return;
// uni.navigateTo({
// url: '/pageHome/service/index'
// });
},
// 我的钱包
buyService() {
@ -343,10 +352,14 @@ export default {
});
},
// 跳转微信客服 - 使用自定义弹窗
jumpToWeChat() {
this.checkTokenAndExecute(() => {
jumpToWeChat();
});
if (this.$refs.wechatCopyModal) {
this.$refs.wechatCopyModal.show({
title: '请添加客服号',
weChatCode: 'Wagoo2025'
});
}
},
},
};
@ -358,18 +371,12 @@ export default {
background-color: #ffecf3;
}
.homeContainer {
height: calc(100vh - #{$app_tabbar_height + 36});
background-color: #ffecf3;
overflow: scroll;
.homeContainer {
height: calc(100vh - #{$app_tabbar_height + 36});
background-color: #ffecf3;
overflow: scroll;
.avatar-img {
width: 92rpx;
height: 92rpx;
border-radius: 50%;
}
.menu-img-lg {
.menu-img-lg {
width: 160rpx;
height: 160rpx;
}
@ -383,7 +390,7 @@ export default {
.third-icon,
.service-icon {
width: 96rpx;
height: 96rpx;
height: 120rpx;
}
.service-icon {
@ -735,6 +742,7 @@ export default {
}
}
}
}
.flexClass {