Commit efb98dd6 authored by 王炽's avatar 王炽

6666

parent 22395515
......@@ -18,16 +18,18 @@ const {
// const baseUrl = "http://172.16.224.178:7777/pmall";
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
const baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
const request = (options = {}) => {
// 在这里可以对请求头进行一些设置
// 例如:
// options.header = {
// "Content-Type": "application/x-www-form-urlencoded"
// }
// if(options.url == '/c/ai/chat/query'){
// baseUrl = "https://docs.dui88.com/mock/1956";
// }
options.header = {
"Content-Type": "application/x-www-form-urlencoded"
}
if(options.url == '/c/ai/chat/query'){
baseUrl = "https://docs.dui88.com/mock/1956/api";
}
return new Promise((resolve, reject) => {
uni
.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>
<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>
</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">
......@@ -185,6 +194,7 @@
<image class="consult-bg" src="/static/shengzhangTestResult/zhuanjiazixunBtn.png" mode="aspectFit"></image>
<text class="consult-text">专家在线咨询</text>
</view>
</view>
</view>
</template>
......@@ -322,11 +332,22 @@ const consultExpert = () => {
})
}
// 返回上一页
const goBack = () => {
uni.navigateBack({
delta: 1
})
// 首页组件逻辑
const backHandler = () => {
try {
uni.navigateBack({
success: () => {
console.log('返回成功')
},
fail: backFailHandler
})
} catch (error) {
console.log('error=', error)
jump({
type: JumpType.INNER,
url: "/pages/index/index"
})
}
}
onMounted(() => {
......@@ -571,31 +592,54 @@ const onScroll = (e) => {
<style lang="less" scoped>
.shengzhang-test-result-container {
min-height: 100vh;
background-color: #fdf6eb;
padding: 20rpx;
box-sizing: border-box;
width: 100%;
height: 2700rpx;
// box-sizing: border-box;
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 {
position: absolute;
top: 60rpx;
top: 119rpx;
left: 30rpx;
width: 60rpx;
height: 60rpx;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
width: 29rpx;
height: 29rpx;
}
.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) => {
align-items: center;
justify-content: center;
position: relative;
margin-bottom: 30rpx;
margin-top: 80rpx;
margin-top: 202rpx;
width: 260rpx;
margin-left: 5rpx;
.tab-item {
padding: 20rpx 40rpx;
margin: 0 20rpx;
width: 116rpx;
height: 51rpx;
// padding: 20rpx 40rpx;
margin-right: 30rpx;
border-radius: 25rpx;
background-color: rgba(255, 255, 255, 0.6);
background-color: #fffbed;
transition: all 0.3s ease;
&.active {
background-color: #b27c1e;
.tab-text {
color: #fff;
color: #ffffff;
}
}
.tab-text {
font-size: 28rpx;
color: #666;
color: #b27c1e;
font-weight: 500;
align-items: center;
justify-content: center;
display: flex;
width: 100%;
height: 100%;
}
}
......@@ -643,15 +695,15 @@ const onScroll = (e) => {
}
}
// 卡片通用样式
.baby-info-card,
.growth-status-card,
.growth-curve-card {
// 宝宝信息卡片
.baby-info-card {
background-color: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin-bottom: 30rpx;
border-radius: 24rpx;
padding: 50rpx 35rpx 35rpx 35rpx;
margin-top: 46rpx;
// height: 100%;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
position: relative;
.card-header {
display: flex;
......@@ -671,30 +723,27 @@ const onScroll = (e) => {
font-weight: bold;
}
}
}
// 宝宝信息卡片
.baby-info-card {
.baby-basic-info {
display: flex;
align-items: center;
margin-bottom: 30rpx;
.gender {
font-size: 26rpx;
color: #333;
font-size: 24rpx;
color: #000;
margin-right: 20rpx;
}
.age {
font-size: 26rpx;
color: #333;
font-size: 24rpx;
color: #000;
margin-right: 20rpx;
}
.test-date {
font-size: 26rpx;
color: #666;
font-size: 24rpx;
color: #000;
}
}
......@@ -745,6 +794,32 @@ const onScroll = (e) => {
// 生长情况卡片
.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 {
display: flex;
justify-content: space-between;
......@@ -837,6 +912,32 @@ const onScroll = (e) => {
// 生长曲线卡片
.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 {
display: flex;
justify-content: space-around;
......
......@@ -215,6 +215,7 @@ import BabySwitchPopup from '@/components/BabySwitchPopup.vue'
import BabyFeedSwitchPopup from '@/components/BabyFeedSwitchPopup.vue'
import DatePickerPopup from '@/components/DatePickerPopup.vue'
import BabyTestTipsPopup from '@/components/BabyTestTipsPopup.vue'
import { growthHome } from '../../api/shengzhangTools'
const swiperData = ref([
{ bannerImg: '/static/shengzhangTool/banner1.png' },
......@@ -461,8 +462,9 @@ const guideHandler = () => {
}
}
onMounted(() => {
onMounted(async () => {
// const {data} = await growthHome();
// console.log('data666666=', data);
})
</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