Commit efb98dd6 authored by 王炽's avatar 王炽

6666

parent 22395515
...@@ -18,16 +18,18 @@ const { ...@@ -18,16 +18,18 @@ const {
// const baseUrl = "http://172.16.224.178:7777/pmall"; // const baseUrl = "http://172.16.224.178:7777/pmall";
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境 // const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
const baseUrl = "https://momclub.feihe.com/pmall";//生产环境 const baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
const request = (options = {}) => { const request = (options = {}) => {
// 在这里可以对请求头进行一些设置 // 在这里可以对请求头进行一些设置
// 例如: // 例如:
// options.header = { options.header = {
// "Content-Type": "application/x-www-form-urlencoded" "Content-Type": "application/x-www-form-urlencoded"
// } }
// if(options.url == '/c/ai/chat/query'){ if(options.url == '/c/ai/chat/query'){
// baseUrl = "https://docs.dui88.com/mock/1956"; baseUrl = "https://docs.dui88.com/mock/1956/api";
// } }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni uni
.request({ .request({
......
import requestModule from './request.js';
const {
api
} = requestModule;
/**
* 获取首页信息
* @returns
*/
export const growthHome = () => api.post('/c/growth/home');
// export const fetchHomeJSON = () => api.get('/c/front/content',{type:'home'});
\ No newline at end of file
<template> <template>
<view class="shengzhang-test-result-container"> <view class="shengzhang-test-result-container">
<view class="result-bg">
<image class="result-bg-img0" src="/static/shengzhangTestResult/resultBg0.jpg" mode="aspectFit"></image>
<image class="result-bg-img1" src="/static/shengzhangTestResult/resultBg1.jpg" mode="aspectFit"></image>
</view>
<!-- 返回按钮 --> <!-- 返回按钮 -->
<view class="back-btn" @click="goBack"> <!-- <view class="back-btn" @click="backHandler">
<text class="back-text"></text> <text class="back-text"></text>
</view> </view> -->
<image @tap="backHandler" class="back-btn" :src="`/static/shengzhangTool/backBtn.png`"></image>
<text class="title">生长测评</text>
<view class="content-wrapper">
<!-- 顶部导航标签 --> <!-- 顶部导航标签 -->
<view class="nav-tabs"> <view class="nav-tabs">
...@@ -186,6 +195,7 @@ ...@@ -186,6 +195,7 @@
<text class="consult-text">专家在线咨询</text> <text class="consult-text">专家在线咨询</text>
</view> </view>
</view> </view>
</view>
</template> </template>
<script setup> <script setup>
...@@ -322,11 +332,22 @@ const consultExpert = () => { ...@@ -322,11 +332,22 @@ const consultExpert = () => {
}) })
} }
// 返回上一页 // 首页组件逻辑
const goBack = () => { const backHandler = () => {
try {
uni.navigateBack({ uni.navigateBack({
delta: 1 success: () => {
console.log('返回成功')
},
fail: backFailHandler
}) })
} catch (error) {
console.log('error=', error)
jump({
type: JumpType.INNER,
url: "/pages/index/index"
})
}
} }
onMounted(() => { onMounted(() => {
...@@ -571,31 +592,54 @@ const onScroll = (e) => { ...@@ -571,31 +592,54 @@ const onScroll = (e) => {
<style lang="less" scoped> <style lang="less" scoped>
.shengzhang-test-result-container { .shengzhang-test-result-container {
min-height: 100vh; width: 100%;
background-color: #fdf6eb; height: 2700rpx;
padding: 20rpx; // box-sizing: border-box;
box-sizing: border-box;
position: relative; position: relative;
overflow: hidden;
.result-bg{
top: 0rpx;
width: 100%;
height: 2700rpx;
position: absolute;
.result-bg-img0{
position: absolute;
top: 0rpx;
width: 100%;
height: 1300rpx;
}
.result-bg-img1{
position: absolute;
top: 1300rpx;
width: 100%;
height: 1400rpx;
}
}
// 内容容器
.content-wrapper {
padding-left: 30rpx;
padding-right: 30rpx;
}
// 返回按钮 // 返回按钮
.back-btn { .back-btn {
position: absolute; position: absolute;
top: 60rpx; top: 119rpx;
left: 30rpx; left: 30rpx;
width: 60rpx; width: 29rpx;
height: 60rpx; height: 29rpx;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
.back-text {
font-size: 32rpx;
color: #333;
font-weight: bold;
} }
.title{
position: absolute;
top: 112rpx;
font-size: 34rpx;
font-weight: 500;
width: 100%;
text-align: center;
} }
// 顶部导航标签 // 顶部导航标签
...@@ -604,27 +648,35 @@ const onScroll = (e) => { ...@@ -604,27 +648,35 @@ const onScroll = (e) => {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
margin-bottom: 30rpx; margin-top: 202rpx;
margin-top: 80rpx; width: 260rpx;
margin-left: 5rpx;
.tab-item { .tab-item {
padding: 20rpx 40rpx; width: 116rpx;
margin: 0 20rpx; height: 51rpx;
// padding: 20rpx 40rpx;
margin-right: 30rpx;
border-radius: 25rpx; border-radius: 25rpx;
background-color: rgba(255, 255, 255, 0.6); background-color: #fffbed;
transition: all 0.3s ease; transition: all 0.3s ease;
&.active { &.active {
background-color: #b27c1e; background-color: #b27c1e;
.tab-text { .tab-text {
color: #fff; color: #ffffff;
} }
} }
.tab-text { .tab-text {
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #b27c1e;
font-weight: 500; font-weight: 500;
align-items: center;
justify-content: center;
display: flex;
width: 100%;
height: 100%;
} }
} }
...@@ -643,15 +695,15 @@ const onScroll = (e) => { ...@@ -643,15 +695,15 @@ const onScroll = (e) => {
} }
} }
// 卡片通用样式 // 宝宝信息卡片
.baby-info-card, .baby-info-card {
.growth-status-card,
.growth-curve-card {
background-color: #fff; background-color: #fff;
border-radius: 20rpx; border-radius: 24rpx;
padding: 30rpx; padding: 50rpx 35rpx 35rpx 35rpx;
margin-bottom: 30rpx; margin-top: 46rpx;
// height: 100%;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1); box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
position: relative;
.card-header { .card-header {
display: flex; display: flex;
...@@ -671,30 +723,27 @@ const onScroll = (e) => { ...@@ -671,30 +723,27 @@ const onScroll = (e) => {
font-weight: bold; font-weight: bold;
} }
} }
}
// 宝宝信息卡片
.baby-info-card {
.baby-basic-info { .baby-basic-info {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.gender { .gender {
font-size: 26rpx; font-size: 24rpx;
color: #333; color: #000;
margin-right: 20rpx; margin-right: 20rpx;
} }
.age { .age {
font-size: 26rpx; font-size: 24rpx;
color: #333; color: #000;
margin-right: 20rpx; margin-right: 20rpx;
} }
.test-date { .test-date {
font-size: 26rpx; font-size: 24rpx;
color: #666; color: #000;
} }
} }
...@@ -745,6 +794,32 @@ const onScroll = (e) => { ...@@ -745,6 +794,32 @@ const onScroll = (e) => {
// 生长情况卡片 // 生长情况卡片
.growth-status-card { .growth-status-card {
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 30rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
position: relative;
.card-header {
display: flex;
align-items: center;
margin-bottom: 20rpx;
.name-icon,
.status-icon {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.card-title {
font-size: 32rpx;
color: #333;
font-weight: bold;
}
}
.legend { .legend {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -837,6 +912,32 @@ const onScroll = (e) => { ...@@ -837,6 +912,32 @@ const onScroll = (e) => {
// 生长曲线卡片 // 生长曲线卡片
.growth-curve-card { .growth-curve-card {
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 30rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
position: relative;
.card-header {
display: flex;
align-items: center;
margin-bottom: 20rpx;
.name-icon,
.status-icon {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.card-title {
font-size: 32rpx;
color: #333;
font-weight: bold;
}
}
.curve-tabs { .curve-tabs {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
......
...@@ -215,6 +215,7 @@ import BabySwitchPopup from '@/components/BabySwitchPopup.vue' ...@@ -215,6 +215,7 @@ import BabySwitchPopup from '@/components/BabySwitchPopup.vue'
import BabyFeedSwitchPopup from '@/components/BabyFeedSwitchPopup.vue' import BabyFeedSwitchPopup from '@/components/BabyFeedSwitchPopup.vue'
import DatePickerPopup from '@/components/DatePickerPopup.vue' import DatePickerPopup from '@/components/DatePickerPopup.vue'
import BabyTestTipsPopup from '@/components/BabyTestTipsPopup.vue' import BabyTestTipsPopup from '@/components/BabyTestTipsPopup.vue'
import { growthHome } from '../../api/shengzhangTools'
const swiperData = ref([ const swiperData = ref([
{ bannerImg: '/static/shengzhangTool/banner1.png' }, { bannerImg: '/static/shengzhangTool/banner1.png' },
...@@ -461,8 +462,9 @@ const guideHandler = () => { ...@@ -461,8 +462,9 @@ const guideHandler = () => {
} }
} }
onMounted(() => { onMounted(async () => {
// const {data} = await growthHome();
// console.log('data666666=', data);
}) })
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment