Initial commit

This commit is contained in:
jackyu66git
2026-03-23 11:52:05 +08:00
commit c3c9db3151
267 changed files with 24984 additions and 0 deletions
+789
View File
@@ -0,0 +1,789 @@
<template>
<view class="content">
<view class="banner">
<view style="width: 750rpx;margin-top: 18px;"></view>
<myNav title="愈心谷" bgColor="nonoe" titleColor="#D1502B" :isJcenter="true" :backIcon="false" :backHome="false"
:flex="false"></myNav>
<view style="width: 670rpx;height: 296rpx;margin-top: 20px;">
<uni-swiper-dot :info="banners" mode="default" :current="current" :dots-styles="dotsStyles">
<swiper class="swiper" @change="change" next-margin="-90rpx" style="width: 670rpx;height: 296rpx;">
<swiper-item v-for="(item,index) in banners" :key="index">
<view class="swiper-item uni-bg-red" style="width: 670rpx;height: 256rpx;">
<image :src="item.bannerImage" mode="widthFix"
style="width: 670rpx;border-radius: 10rpx;"
@click="showBanner(item)">
</image>
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
</view>
<view
style="width: 670rpx;display: flex;justify-content: space-between;align-items: center;margin-top: 20rpx;">
<!-- 左边部分 -->
<view style="width: 324rpx;height: 168rpx;border-radius: 10rpx;
background: linear-gradient(180deg, #FFE6DF 2%, #FCF3EA 100%);
box-sizing: border-box;
display: flex;
" @click="toTestList">
<view style="display: flex;flex-direction: column;margin-top: 26rpx;">
<text style="margin-left: 26rpx;color: #614D49;
font-family: SourceHanSansBold;font-variation-settings: 'opsz' auto;
font-size: 30rpx;
line-height: normal;
letter-spacing: 0px;">
心理测评
</text>
<text style="margin-left: 26rpx;color: #B88973;
font-family: SourceHanSans;ont-variation-settings: 'opsz' auto;
font-size: 24rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0px;">
探寻自我
</text>
</view>
<image src="/static/n-main/left.png"
style="margin-top:50rpx;width: 90rpx;margin-left: 70rpx;height: 90rpx;"></image>
</view>
<!-- 右边部分 -->
<view style="width: 324rpx;height: 168rpx;border-radius: 10rpx;
background: linear-gradient(180deg, #FFE6DF 2%, #FCF3EA 100%);
box-sizing: border-box;
display: flex;
" @click="toZxList">
<view style="display: flex;flex-direction: column;margin-top: 26rpx;">
<text style="margin-left: 26rpx;color: #614D49;
font-family: SourceHanSansBold;font-variation-settings: 'opsz' auto;
font-size: 30rpx;
line-height: normal;
letter-spacing: 0px;">
心理咨询
</text>
<text style="margin-left: 26rpx;color: #B88973;
font-family: SourceHanSans;ont-variation-settings: 'opsz' auto;
font-size: 24rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0px;">
严选咨询师
</text>
</view>
<image src="/static/n-main/right.png"
style="margin-top:58rpx;width: 82rpx;margin-left: 70rpx;height: 82rpx;"></image>
</view>
</view>
</view>
<view
style="width: 750rpx;border-radius: 32rpx 32rpx 0rpx 0rpx;margin-top: 60rpx;
opacity: 1;<!-- background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #FFF4C7 100%); -->display: flex;flex-direction: column;">
<view style="display: flex;margin-top: 16rpx;margin-left: 40rpx; align-items: center;">
<text style="margin-left: 8rpx;color: #614D49;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 32rpx;
line-height: normal;
letter-spacing: 0px;">
艺术疗愈
</text>
<view style="display: flex;margin-left: 442rpx;align-items: center;" @click="toHealingView">
<text style="color: #9B918C;
font-family: SourceHanSans;ont-variation-settings: 'opsz' auto;
font-size: 24rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0px;">
更多
</text>
<image src="/static/n-main/to-right.png" style="width: 12rpx;height: 20rpx; margin-left: 10rpx;"></image>
</view>
</view>
</view>
<view style="width: 750rpx;display: flex;flex-direction: column;align-items: center;
display: flex; border-radius: 32rpx;">
<view style="width: 670rpx;margin-top: 6rpx;display: flex;align-items: center;justify-content: space-between;">
</view>
<view v-for="(item,index) in newHealingList" :key="index"
style="width: 750rpx;height: 196rpx;background-color: #fff;margin-top: 14rpx;display: flex;flex-direction: column; align-items: center;justify-content: center;">
<view style="width: 670rpx;display: flex;flex-direction: row; align-items: center;justify-content:space-between;" @click="toHealingDetail(item)">
<text style="color: #614D49;
width: 350rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 28rpx;
line-height: normal;
letter-spacing: 0px;">
{{item.title}}
</text>
<image :src="item.showImage" style="width: 200rpx;height: 156rpx;border-radius: 10rpx;"></image>
</view>
</view>
<view v-if="newHealingList.length==0" >
<text style="color: #9B918C;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 28rpx;
line-height: normal;
letter-spacing: 0px;">暂无疗愈内容</text>
</view>
</view>
<view
style="width: 750rpx;border-radius: 32rpx 32rpx 0rpx 0rpx;margin-top: 20rpx;
opacity: 1;<!-- background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #FFF4C7 100%); -->display: flex;flex-direction: column;">
<view style="display: flex;margin-top: 16rpx;margin-left: 40rpx; align-items: center;">
<text style="margin-left: 8rpx;color: #614D49;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 32rpx;
line-height: normal;
letter-spacing: 0px;">
活动中心
</text>
<view style="display: flex;margin-left: 442rpx;align-items: center;" @click="toActiveView">
<text style="color: #9B918C;
font-family: SourceHanSans;ont-variation-settings: 'opsz' auto;
font-size: 24rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0px;">
更多
</text>
<image src="/static/n-main/to-right.png" style="width: 12rpx;height: 20rpx; margin-left: 10rpx;"></image>
</view>
</view>
</view>
<view style="width: 750rpx;display: flex;flex-direction: column;align-items: center;
display: flex;background-color: transparent;border-radius: 32rpx;">
<view style="width: 670rpx;margin-top: 10rpx;display: flex;align-items: center;justify-content: space-between;">
</view>
<view v-for="(item,index) in newActivityList" :key="index"
style="width: 670rpx; height: 300rpx;background-color: #fff;border-radius: 10rpx; margin-top: 14rpx;display: flex;flex-direction: column; align-items: flex-start;justify-content: flex-start;">
<image :src="item.showImage" style="width: 670rpx;height: 220rpx;border-top-right-radius: 10rpx;border-top-left-radius: 10rpx;" @click="toActiveDetail(item)"></image>
<view style="display: flex;flex-direction: column;margin-left: 20rpx;">
<text style="color: #614D49;
width: 670rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
margin-top: 20rpx;
font-size: 28rpx;
font-weight: 400;
line-height: normal;
letter-spacing: 0px;">
{{item.title}}
</text>
</view>
</view>
<view v-if="newActivityList.length==0" >
<text style="color: #9B918C;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 28rpx;
line-height: normal;
letter-spacing: 0px;">暂无活动内容</text>
</view>
</view>
<view
style="width: 750rpx;border-radius: 32rpx 32rpx 0rpx 0rpx;margin-top: 20rpx;
opacity: 1;<!-- background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #FFF4C7 100%); -->display: flex;flex-direction: column;">
<view style="display: flex;margin-top: 16rpx;margin-left: 40rpx;align-items: center;">
<text style="margin-left: 8rpx;color: #614D49;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 32rpx;
line-height: normal;
letter-spacing: 0px;">
经典必测
</text>
<view style="display: flex;margin-left: 442rpx;align-items: center;" @click="toTestList">
<text style="color: #9B918C;
font-family: SourceHanSans;ont-variation-settings: 'opsz' auto;
font-size: 24rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0px;">
更多
</text>
<image src="/static/n-main/to-right.png" style="width: 12rpx;height: 20rpx; margin-left: 10rpx;"></image>
</view>
</view>
</view>
<view style="width: 670rpx;margin-left: 40rpx; display: flex;flex-direction: column;align-items: center;
display: flex;background-color: transparent;border-radius: 32rpx;">
<view style="width: 670rpx;margin-top: 6rpx;display: flex;align-items: center;justify-content: space-between;">
</view>
<!-- 个人测评 -->
<view v-for="(item,index) in testList" :key="index"
style="width: 650rpx;background-color: #fff;border-radius: 10rpx; padding: 20rpx; margin-top: 14rpx;display: flex;align-items: center;justify-content: space-between;">
<view style="display: flex;">
<image :src="item.testPic" style="width: 140rpx;height: 140rpx;border-radius: 10rpx;"></image>
<view style="display: flex;flex-direction: column;margin-left: 20rpx;">
<text style="color: #614D49;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 28rpx;
line-height: normal;
letter-spacing: 0px;">
{{item.testName}}
</text>
<view style="margin-top: 8rpx;display: flex;align-items: center;">
<view style="width: fit-content;margin-left: 10rpx;
border-radius: 32rpx;
display: flex;
text-align: center;
justify-content: center;
padding-top: 4rpx;
padding-bottom: 4rpx;
padding-left: 10rpx;
padding-right: 10rpx;
border: 1px solid #EA8D7A;">
<text style="color: #F37155;
font-family: SourceHanSans;ont-variation-settings: 'opsz' auto;
font-size: 20rpx;
font-weight: normal;
letter-spacing: 0px;">
{{item.showNum}}人已测
</text>
</view>
</view>
<text style="color: #9B918C;margin-top: 26rpx;
font-family: SourceHanSans;ont-variation-settings: 'opsz' auto;
font-size: 20rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0px;">
{{item.subTitle}}
</text>
</view>
</view>
<view @click="goTest(item)" style="width:fit-content;
height: fit-content;
border-radius: 2002rpx;
opacity: 1;
display: flex;
padding: 8rpx 40rpx;justify-content: center;align-items: center;
background: linear-gradient(180deg, #E84B2A 0%, #FF846A 100%);">
<text style="color: #FFFFFF;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 28rpx;
line-height: normal;
letter-spacing: 0px;">
测评
</text>
</view>
</view>
<view v-if="testList.length==0" >
<text style="color: #9B918C;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 28rpx;
line-height: normal;
letter-spacing: 0px;">
暂无测评信息
</text>
</view>
</view>
<view
style="width: 750rpx;border-radius: 32rpx 32rpx 0rpx 0rpx;margin-top: 20rpx;
opacity: 1;<!-- background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #FFF4C7 100%); -->display: flex;flex-direction: column;">
<view style="display: flex;margin-top: 16rpx;margin-left: 40rpx; align-items: center;">
<text style="margin-left: 8rpx;color: #614D49;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 32rpx;
line-height: normal;
letter-spacing: 0px;">
咨询推荐
</text>
<view style="display: flex;margin-left: 442rpx;align-items: center;" @click="toZxList">
<text style="color: #9B918C;
font-family: SourceHanSans;ont-variation-settings: 'opsz' auto;
font-size: 24rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0px;">
更多
</text>
<image src="/static/n-main/to-right.png" style="width: 12rpx;height: 20rpx; margin-left: 10rpx;"></image>
</view>
</view>
</view>
<view style="width: 750rpx;display: flex;flex-direction: column;align-items: center;
display: flex;background-color: transparent;
padding-bottom: 15rpx;border-radius: 10rpx;">
<view style="width: 670rpx;margin-top: 6rpx;display: flex;align-items: center;justify-content: space-between;">
</view>
<view class="show-card" v-for="(item,index) in consultList" :key="index" @click="toDetail(item)">
<view style="position: relative;height: 204rpx;">
<image :src="item.avatar" style="width: 156rpx;height: 204rpx;border-radius: 10rpx;"></image>
</view>
<view style="position: relative; display: flex;flex-direction: column;margin-left: 20rpx;width: 452rpx;
justify-content: space-between">
<view style="display: flex;flex-direction: column; gap: 4rpx;">
<text class="show-name">
{{item.name}}
</text>
<view style="display: flex;height: 28rpx;" v-if="item.tags&&item.tags.length==1">
<view class="tag">
<text class="tag-text">{{item.tags[0]}}</text>
</view>
</view>
<view style="display: flex;height: 28rpx;" v-if="item.tags&&item.tags.length==2">
<view class="tag">
<text class="tag-text">{{item.tags[0]}}</text>
</view>
<view class="tag" style="margin-left:20rpx;">
<text class="tag-text">{{item.tags[1]}}</text>
</view>
</view>
<view style="display: flex;height: 28rpx;" v-if="item.tags&&item.tags.length==3">
<view class="tag">
<text class="tag-text">{{item.tags[0]}}</text>
</view>
<view class="tag" style="margin-left:20rpx;">
<text class="tag-text">{{item.tags[1]}}</text>
</view>
<view class="tag" style="margin-left:20rpx;">
<text class="tag-text">{{item.tags[2]}}</text>
</view>
</view>
<view style="display: flex;height: 28rpx;" v-if="item.tags&&item.tags.length>=4">
<view class="tag">
<text class="tag-text">{{item.tags[0]}}</text>
</view>
<view class="tag" style="margin-left:20rpx;">
<text class="tag-text">{{item.tags[1]}}</text>
</view>
<view class="tag" style="margin-left:20rpx;">
<text class="tag-text">{{item.tags[2]}}</text>
</view>
<view class="tag" style="margin-left:20rpx;">
<text class="tag-text">{{item.tags[3]}}</text>
</view>
</view>
<text class="show-introduce" >
{{item.introduction}}
</text>
<!-- <text class="show-introduce">
擅长:婚姻家庭/情绪管理/个人成长从业15年·咨询经验3300+小小时
</text> -->
</view>
<view style="position: absolute; right: 10rpx; bottom: -10rpx; display: flex;justify-content: flex-end;align-items: baseline;">
<view>
<text class="momey-text">
¥ {{item.price/100}}
</text>
<text class="unit-text">
/
</text>
</view>
</view>
</view>
</view>
<view v-if="consultList.length==0" >
<text style="color: #9B918C;
font-family: SourceHanSansBold;ont-variation-settings: 'opsz' auto;
font-size: 28rpx;
line-height: normal;
letter-spacing: 0px;">
暂无推荐信息
</text>
</view>
</view>
<web-view v-if="showWebView" :src="externalUrl"></web-view>
</view>
</template>
<script setup>
import myNav from '@/components/my-nav.vue'
import {
urls
} from '@/util/apiUrl.js'
import dohttp from '@/util/requestConfig.js'
const banners = ref([])
const testList = ref([])
const consultList = ref([])
const newHealingList = ref([])
const newActivityList = ref([])
const showWebView = ref(false)
const externalUrl = ref()
const dotsStyles = ref({
backgroundColor: 'rgba(96, 98, 113, 1)',
border: '1px rgba(96, 98, 113, 1) solid',
color: '#fff',
selectedBackgroundColor: 'rgba(231, 86, 55, 1)',
selectedBorder: '1px rgba(231, 86, 55, 1) solid'
})
const current = ref(0)
const change = (e) => {
current.value = e.detail.current
}
const showBanner = (item) => {
if (item.jumpType == 1) {
uni.navigateTo({
"url": "/pages/show-banner/show-banner?url=" + item.clickUrl,
"animationType": "pop-in"
})
} else {
uni.showModal({
title: '跳转异常',
content: '该banner跳转方式不正确,请稍后再试',
showCancel: false,
success: function(res) {
if (res.confirm) {
}
}
})
}
}
const onShareAppMessage = () => {
return {
title: '快来体验一下吧~',
path: '/pages/index/index', // 分享的路径
};
};
const onShareTimeline = () => {
return {
title: '快来体验一下吧~',
query: 'id=1', // 分享路径的参数
};
};
onLoad(() => {
})
onMounted(() => {
getBanner()
getPsychicTest()
getConsult()
getNewsHealingPage()
getNewActivityPage()
})
const getNewsHealingPage = ()=> {
const param = ref({
type: 1,
pageNo: 1,
pageSize: 100,
showMain: 1
})
dohttp.get(urls.newPageUrl, param.value).then((result) => {
newHealingList.value = result.list
})
}
const getNewActivityPage = ()=> {
const param = ref({
type: 2,
pageNo: 1,
pageSize: 100,
showMain: 1
})
dohttp.get(urls.newPageUrl, param.value).then((result) => {
newActivityList.value = result.list
})
}
const toTuTest=()=>{
const externalUrl = 'https://cps.jsbr.org.cn/login.html';
uni.navigateTo({
url: `/pages/webview-page/webview-page?url=${encodeURIComponent(externalUrl)}`
});
}
const toHealingDetail=(item)=>{
dohttp.navigateTo("/pages/healing-detail/healing-detail?id=" + item.id)
}
const toActiveDetail=(item)=>{
dohttp.navigateTo("/pages/healing-detail/active-detail?id=" + item.id)
}
const goTest = (item) => {
dohttp.navigateTo("/pages/test-detail/test-detail?id=" + item.id)
}
const toDetail=(item)=>{
dohttp.navigateTo("/pages/consult-detail/consult-detail?id=" + item.id)
}
const getConsult = ()=> {
const param = ref({
businessScope: "",
pageNo: 1,
pageSize: 100,
isTop: 1
})
dohttp.get(urls.doctorInfopage, param.value).then((result) => {
for (let i = 0; i < result.list.length; i++) {
if (result.list[i].consultationMethod) {
result.list[i].tags = result.list[i].tags.split(",")
}
}
consultList.value = result.list
})
}
const getBanner = () => {
dohttp.post(urls.getBanner).then((result) => {
banners.value = result
})
}
const getPsychicTest = () => {
dohttp.post(urls.getPsychicListTest +'?showMain=1').then((result) => {
console.log("getPsychicTestgetPsychicTestgetPsychicTest", result)
if (result) {
result.forEach((ele) => {
if (ele.totalNum && Number(ele.totalNum) >= 10000) {
ele.showNum = (Number(ele.totalNum) / 10000).toFixed(1) + "W"
} else {
ele.showNum = ele.totalNum
}
})
}
testList.value = result
})
}
const toTestList = () => {
uni.switchTab({
"url": "/pages/test-list/test-list",
"animationType": "pop-in"
})
}
const toActiveView = ()=> {
uni.navigateTo({
"url": "/pages/healing/active-list",
"animationType": "pop-in"
})
}
const toHealingView = ()=> {
uni.navigateTo({
"url": "/pages/healing/healing-list",
"animationType": "pop-in"
})
}
const toZxList = (params) => {
if (params) {
uni.setStorageSync("zxcode", params)
}
uni.switchTab({
"url": "/pages/consult/consult",
"animationType": "pop-in"
})
}
</script>
<style scoped>
.content {
width: 100vw;
background-color: #F9F6F5;
display: flex;
flex-direction: column;
overflow-y: auto;
}
.banner {
background-image: url('https://miniapp.yuxingu.com.cn/yxg-mp/pic/botton.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
width: 750rpx;
height: 660rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.choce-view {
display: flex;
justify-content: center;
margin-top: 20rpx;
}
.choce-view-inner {
display: flex;
justify-content: center;
width: 696rpx;
justify-content: space-between;
}
.choice-inner-left {
width: 340rpx;
height: 190rpx;
background-image: url('https://miniapp.yuxingu.com.cn/yxg-mp/pic/main_left.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: flex;
}
.choice-inner-right {
width: 340rpx;
height: 190rpx;
background-image: url('https://miniapp.yuxingu.com.cn/yxg-mp/pic/main_right.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: flex;
}
.choice-inner-text {
font-family: SourceHanSansBold;
font-size: 44rpx;
margin-left: 28rpx;
margin-top: 35rpx;
letter-spacing: 2rpx;
}
.bottom-view {
display: flex;
justify-content: center;
width: 100%;
margin-top: 40rpx;
}
.show-card {
margin-top: 14rpx;
width: 670rpx;
height: 244rpx;
border-radius: 10rpx;
background: #FFFFFF;
display: flex;
padding: 20rpx;
box-sizing: border-box;
justify-content: center;
}
.show-name {
/* 标题/标题三加粗 */
/* 样式描述:正文标题 */
font-family: SourceHanSansBold;
font-size: 28rpx;
line-height: normal;
letter-spacing: 0px;
font-variation-settings: "opsz" auto;
/* 背景色/浅色背景2 */
color: #614D49;
}
.show-introduce {
font-family: SourceHanSans;
font-size: 20rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0px;
font-variation-settings: "opsz" auto;
/* 正文色/正文辅助4 */
color: #9B918C;
display: -webkit-box; /* 使用 flex 布局 */
-webkit-box-orient: vertical; /* 垂直排列 */
-webkit-line-clamp: 3; /* 限制显示行数 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.momey-text {
color: #F37155;
/* 标题/标题二加粗 */
font-family: SourceHanSansBold;
font-size: 36rpx;
font-variation-settings: "opsz" auto;
}
.unit-text {
/* 正文/正文文本小号加粗 */
font-family: SourceHanSans;
font-weight: 700;
font-size: 20rpx;
font-variation-settings: "opsz" auto;
color: #F37155;
}
.tag {
border-radius: 60rpx;
opacity: 1;
/* 自动布局 */
display: flex;
padding: 2rpx 10rpx;
box-sizing: border-box;
border: 2rpx solid #EA8D7A;
justify-content: center;
align-items: center;
}
.tag-text {
/* 样式描述:辅助信息 */
font-family: SourceHanSans;
font-size: 16rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0rpx;
/* 正文色/正文色辅助3 */
color: #F37155;
}
</style>