Commit 142df6e6 authored by 王炽's avatar 王炽

Merge branch 'dev' into 20250528-dev-king

parents 01721948 9e418629
No preview for this file type
import requestModule from './request.js';
const {
api
} = requestModule;
export const fetchBrandJSON = () => api.get('/c/front/content',{type:'brand'});
\ No newline at end of file
import requestModule from './request.js';
const {
api
} = requestModule;
/**
* 获取首页信息
* @returns
*/
export const fetchHomeInfo = () => api.get('/c/user/index');
export const fetchHomeJSON = () => api.get('/c/front/content',{type:'home'});
\ No newline at end of file
import requestModule from './request.js';
const {
api
} = requestModule;
/**
* 获取历史搜索
* @returns
*/
export const historySearch = () => api.get('/c/mini/historySearch');
/**
* 清空历史搜索
* @returns
*/
export const historyClear = () => api.get('/c/mini/historyClear');
/**
* 搜索
*/
export const search = (data) => api.get('/c/mini/search',data);
\ No newline at end of file
......@@ -45,3 +45,5 @@ export const fetchMemberInfo = () => api.get('/c/user/memberInfo');
* @returns
*/
export const updateBabyInfo = (data) => api.post('/c/user/saveBaby', data);
export const fetchUserJSON = () => api.get('/c/front/content',{type:'my'});
\ No newline at end of file
export const PRIVACY_URL = "https://secret.feihe.com/secret.html";
export const MEMBER_URL = "https://secret.feihe.com/index.html";
export const WHEEL_OPTIONS_YL = [
{ label: "1月龄", desc: "宝宝开始对外界产生兴趣,会追视物体" },
{ label: "2月龄", desc: "能发出咿咿呀呀的声音,会对妈妈微笑" },
{ label: "3月龄", desc: "抬头能力增强,喜欢玩自己的小手" },
{ label: "4月龄", desc: "会翻身了,对周围事物充满好奇" },
{ label: "5月龄", desc: "手眼协调能力提升,喜欢抓取玩具" },
{ label: "6月龄", desc: "可以独自坐立,开始尝试固体食物" },
{ label: "7月龄", desc: "会爬行了,语言能力逐渐发展" },
{ label: "8月龄", desc: "能扶物站立,认知能力显著提升" },
{ label: "9月龄", desc: "开始学步,能说简单的词语" },
{ label: "10月龄", desc: "独立行走能力增强,喜欢模仿大人" },
{ label: "11月龄", desc: "语言理解能力提高,会简单互动" },
{ label: "12月龄", desc: "基本能独立行走,表达欲望增强" },
{ label: "13月龄", desc: "动作更加协调,喜欢探索新事物" },
{ label: "14月龄", desc: "语言表达更丰富,独立意识增强" },
{ label: "15月龄", desc: "手部精细动作发展,创造力萌芽" },
{ label: "16月龄", desc: "记忆力提升,开始学习分类概念" },
{ label: "17月龄", desc: "想象力丰富,喜欢角色扮演游戏" },
{ label: "18月龄", desc: "语言交流更流畅,社交能力发展" },
{ label: "19月龄", desc: "运动技能全面发展,好奇心旺盛" },
{ label: "20月龄", desc: "逻辑思维初步形成,会简单推理" },
{ label: "21月龄", desc: "情感表达更丰富,记忆力增强" },
{ label: "22月龄", desc: "独立性增强,生活技能提升" },
{ label: "23月龄", desc: "语言组织能力提高,喜欢提问" },
{ label: "24月龄", desc: "社交圈子扩大,懂得分享" },
{ label: "25月龄", desc: "创造性思维发展,喜欢音乐" },
{ label: "26月龄", desc: "注意力更集中,会完成简单任务" },
{ label: "27月龄", desc: "空间认知能力提升,喜欢拼图" },
{ label: "28月龄", desc: "语言表达更准确,理解能力增强" },
{ label: "29月龄", desc: "自我意识增强,情绪管理提升" },
{ label: "30月龄", desc: "逻辑思维更成熟,会简单计数" },
{ label: "31月龄", desc: "艺术创造力发展,喜欢绘画" },
{ label: "32月龄", desc: "记忆力显著提升,会讲简单故事" },
{ label: "33月龄", desc: "运动协调性好,喜欢户外活动" },
{ label: "34月龄", desc: "社交技能成熟,懂得合作" },
{ label: "35月龄", desc: "思维更加灵活,解决问题能力增强" },
{ label: "36月龄", desc: "全面发展,准备进入幼儿园阶段" },
];
export const WHEEL_OPTIONS_YZ = [
{ label: "孕1周", desc: "胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化" },
{ label: "孕2周", desc: "胎盘开始形成,为胎儿提供营养" },
{ label: "孕3周", desc: "胎儿心脏开始跳动,神经系统发育" },
{ label: "孕4周", desc: "胎儿大小如花生,开始形成四肢" },
{ label: "孕5周", desc: "胎儿面部开始发育,可见眼睛雏形" },
{ label: "孕6周", desc: "胎儿开始运动,脊椎继续发育" },
{ label: "孕7周", desc: "胎儿手指脚趾形成,大脑发育加快" },
{ label: "孕8周", desc: "胎儿所有器官雏形完成,开始生长" },
{ label: "孕9周", desc: "胎儿开始吞咽羊水,肌肉发育" },
{ label: "孕10周", desc: "胎儿指甲开始生长,性别特征显现" },
{ label: "孕11周", desc: "胎儿可以做出简单动作,头部变圆" },
{ label: "孕12周", desc: "胎儿开始产生尿液,骨骼继续钙化" },
{ label: "孕13周", desc: "胎儿vocal cords形成,可发声" },
{ label: "孕14周", desc: "胎儿开始产生胎动,母体可感知" },
{ label: "孕15周", desc: "胎儿皮下脂肪开始形成,体型增大" },
{ label: "孕16周", desc: "胎儿听力开始发育,对声音敏感" },
{ label: "孕17周", desc: "胎儿免疫系统开始发育,产生抗体" },
{ label: "孕18周", desc: "胎儿睡眠周期形成,活动规律" },
{ label: "孕19周", desc: "胎儿肺部发育,为呼吸做准备" },
{ label: "孕20周", desc: "胎儿听力继续发育,对外界声音反应" },
{ label: "孕21周", desc: "胎儿眉毛睫毛生长,面部特征明显" },
{ label: "孕22周", desc: "胎儿皮肤变厚,开始长出胎毛" },
{ label: "孕23周", desc: "胎儿体重快速增长,运动更频繁" },
{ label: "孕24周", desc: "胎儿肺部继续发育,产生肺表面活性物质" },
{ label: "孕25周", desc: "胎儿脂肪积累加快,体型继续增大" },
{ label: "孕26周", desc: "胎儿眼睛可以睁开,对光有反应" },
{ label: "孕27周", desc: "胎儿大脑快速发育,神经系统成熟" },
{ label: "孕28周", desc: "胎儿各器官功能逐渐完善" },
{ label: "孕29周", desc: "胎儿骨骼继续钙化,头部下降" },
{ label: "孕30周", desc: "胎儿体重持续增加,活动空间减少" },
{ label: "孕31周", desc: "胎儿消化系统发育成熟,可消化羊水" },
{ label: "孕32周", desc: "胎儿皮下脂肪继续积累,体温调节能力增强" },
{ label: "孕33周", desc: "胎儿免疫系统继续发育,获得母体抗体" },
{ label: "孕34周", desc: "胎儿肺部发育接近成熟,准备独立呼吸" },
{ label: "孕35周", desc: "胎儿体重快速增加,为出生做准备" },
{ label: "孕36周", desc: "胎儿头部继续下降,为分娩做准备" },
{ label: "孕37周", desc: "胎儿各器官发育完善,可以安全出生" },
{ label: "孕38周", desc: "胎儿继续增重,准备出生" },
{ label: "孕39周", desc: "胎儿位置固定,随时可能出生" },
{ label: "孕40周", desc: "胎儿发育完全成熟,即将出生" },
];
......@@ -85,6 +85,9 @@ function onAdd() {
&:nth-child(3) {
border-bottom: none;
}
text {
white-space: nowrap;
}
}
.selected-icon {
width: 12rpx;
......
......@@ -79,11 +79,11 @@ const props = defineProps({
default: "custom", // 'date' | 'custom'
},
range: {
type: Array,
type: [Array, Object],
default: () => [],
},
value: {
type: [Number, Array],
type: [Number, Array, String],
default: 0,
},
onPickerChange: {
......@@ -195,8 +195,6 @@ const columns = computed(() => {
const defaultValue = computed(() => {
if (props.mode === "date") {
console.log("defaultValue", props.value);
// 1. value为索引数组
if (Array.isArray(props.value) && props.value.length === 3) {
return props.value;
......
......@@ -19,8 +19,11 @@
</template>
<script setup>
import { ref, getCurrentInstance,onMounted } from "vue";
import {useUserStore} from '@/stores/user.js';
import { ref, getCurrentInstance, onMounted, computed } from "vue";
import { useUserStore } from "@/stores/user.js";
import { useGlobalStore } from "@/stores/global.js";
const globalStore = useGlobalStore();
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
......@@ -49,29 +52,22 @@ const tabList = ref([
},
]);
const props = defineProps({
curTabIndex: {
type: Number,
default: 0,
},
});
const emit = defineEmits(["tabClick"]);
const currentIndex = ref(props.curTabIndex);
const currentIndex = computed(() => globalStore.curTabIndex);
const handleTabClick = (index, item) => {
currentIndex.value = index;
globalStore.setCurTabIndex(index);
emit("tabClick", { index, item });
};
onMounted(() => {
userStore.wxAutoLogin();
})
userStore.wxAutoLogin();
});
</script>
<style lang="less" scoped>
@import '@/common.less';
@import "@/common.less";
.tab-bar {
position: fixed;
......
export const brandObj = {
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/brandpage/banner_1%E6%85%A2%E4%BA%BA%E8%8A%82x%E9%A3%9E%E9%B9%A4%2B-%2B%E5%9C%9FFINAL.mp4",
"swiperList": [
{
"url": "brandpage/Banner1.jpg",
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/brandpage/banner_1%E6%85%A2%E4%BA%BA%E8%8A%82.mp4",
"link": {
},
},
{
"url": "brandpage/Banner2.jpg",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/0eMxbWB3R_0g06HZPUEj5Q",
"extra": {}
},
},
{
"url": "brandpage/Banner3.jpg",
"link": {
"type": 3,
"url": "https://factory.feihe.com/user/#/web",
"extra": {}
},
}
],
"swiperIconList": [
{
"baseUrl": "brandpage/corn1.png",
"activeUrl": "brandpage/corn2.png"
},
{
"baseUrl": "brandpage/cattle1.png",
"activeUrl": "brandpage/cattle2.png"
},
{
"baseUrl": "brandpage/factory1.png",
"activeUrl": "brandpage/factory2.png"
}
],
"productTabList": [
"全部", "母婴全阶", "功能营养", "儿童产品", "北纬47°"
],
"product": [
[
{
"bgUrl": "brandpage/pic_0_1.png",
"title": "超凡 吸收",
"desc": "星飞帆经典 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "0-1",
"contentImgLen": 20,
"shareTitle": "星飞帆经典 3段",
"shareImg": "brandpage/share_0_1.png",
},
{
"bgUrl": "brandpage/pic_0_2.png",
"title": "顶配 脑育",
"desc": "星飞帆卓睿 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "0-2",
"contentImgLen": 10,
"shareTitle": "星飞帆卓睿 3段",
"shareImg": "brandpage/pic_0_2.png",
},
{
"bgUrl": "brandpage/pic_0_3.png",
"title": "亲和 自护",
"desc": "星飞帆卓耀 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "0-3",
"contentImgLen": 28,
"shareTitle": "星飞帆卓耀 3段",
"shareImg": "brandpage/pic_0_3.png",
},
{
"bgUrl": "brandpage/pic_0_4.png",
"title": " 4维 效力",
"desc": "爱本跃动蛋白营养粉",
"link": "www.baidu.com",
"productId": "749098220531287139",
"skuId": "749098220531287140",
"contentImg": "0-4",
"contentImgLen": 15,
"shareTitle": "爱本跃动蛋白营养粉",
"shareImg": "brandpage/pic_0_4.png",
},
{
"bgUrl": "brandpage/pic_0_5.png",
"title": "高钙 爆脆",
"desc": "高钙奶酪泡芙脆",
"link": "www.baidu.com",
"productId": "693279214116405585",
"skuId": "693279214116405586",
"contentImg": "0-5",
"contentImgLen": 15,
"shareTitle": "高钙奶酪泡芙脆",
"shareImg": "brandpage/pic_0_5.png",
},
{
"bgUrl": "brandpage/pic_0_6.png",
"title": "软糯 Q弹",
"desc": "北纬47度黄糯玉米",
"link": "www.baidu.com",
"productId": "555503303308649561",
"skuId": "555503303308649562",
"contentImg": "0-6",
"contentImgLen": 5,
"shareTitle": "北纬47度黄糯玉米",
"shareImg": "brandpage/pic_0_6.png",
}
],
[
{
"bgUrl": "brandpage/pic_1_1.png",
"title": "超凡 吸收",
"desc": "星飞帆经典 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-1",
"contentImgLen": 20,
"shareTitle": "星飞帆经典 3段",
"shareImg": "brandpage/share_1_1.png",
},
{
"bgUrl": "brandpage/pic_1_2.png",
"title": "顶配 脑育",
"desc": "星飞帆卓睿 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-2",
"contentImgLen": 10,
"shareTitle": "星飞帆卓睿 3段",
"shareImg": "brandpage/pic_1_2.png",
},
{
"bgUrl": "brandpage/pic_1_3.png",
"title": "亲和 自护",
"desc": "星飞帆卓耀 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-3",
"contentImgLen": 28,
"shareTitle": "星飞帆卓耀 3段",
"shareImg": "brandpage/pic_1_3.png",
},
{
"bgUrl": "brandpage/pic_1_4.png",
"title": "顶配 A 2",
"desc": "星飞帆卓睿A2奶源",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-4",
"contentImgLen": 20,
"shareTitle": "星飞帆卓睿A2奶源",
"shareImg": "brandpage/pic_1_4.png",
},
{
"bgUrl": "brandpage/pic_1_5.png",
"title": "活性 有机",
"desc": "臻稚卓蓓 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-5",
"contentImgLen": 28,
"shareTitle": "臻稚卓蓓 3段",
"shareImg": "brandpage/pic_1_5.png",
},
{
"bgUrl": "brandpage/pic_1_6.png",
"title": "高端 乳铁",
"desc": "臻爱倍护 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-6",
"contentImgLen": 20,
"shareTitle": "臻爱倍护 3段",
"shareImg": "brandpage/pic_1_6.png",
}
],
[
{
"bgUrl": "brandpage/pic_2_1.png",
"title": " 4维 效力",
"desc": "爱本跃动蛋白营养粉",
"link": "www.baidu.com",
"productId": "749098220531287139",
"skuId": "749098220531287140",
"contentImg": "2-1",
"contentImgLen": 20,
"shareTitle": "爱本跃动蛋白营养粉",
"shareImg": "brandpage/pic_2_1.png",
},
{
"bgUrl": "brandpage/pic_2_2.png",
"title": "初乳 精华",
"desc": "爱本牛初乳",
"link": "www.baidu.com",
"productId": "748659115456528889",
"skuId": "7748659115456528890",
"contentImg": "2-2",
"contentImgLen": 15,
"shareTitle": "爱本牛初乳",
"shareImg": "brandpage/pic_2_2.png",
},
{
"bgUrl": "brandpage/pic_2_3.png",
"title": "每日 蛋白",
"desc": "爱本每日蛋白营养糊",
"link": "www.baidu.com",
"productId": "768991288915277214",
"skuId": "768991288915277215",
"contentImg": "2-3",
"contentImgLen": 15,
"shareTitle": "爱本每日蛋白营养糊",
"shareImg": "brandpage/pic_2_3.png",
},
{
"bgUrl": "brandpage/pic_2_4.png",
"title": "腰腹 燃脂",
"desc": "爱本纤纤益生菌\n羽衣甘蓝蛋白粉",
"link": "www.baidu.com",
"productId": "767546274051183809",
"skuId": "767546274051183810",
"contentImg": "2-4",
"contentImgLen": 10,
"shareTitle": "爱本纤纤益生菌羽衣甘蓝蛋白粉",
"shareImg": "brandpage/pic_2_4.png",
},
{
"bgUrl": "brandpage/pic_2_5.png",
"title": "药食 同源",
"desc": "爱本参芝初乳肽",
"link": "www.baidu.com",
"productId": "749443379821195324",
"skuId": "749443379821195325",
"contentImg": "2-5",
"contentImgLen": 10,
"shareTitle": "爱本参芝初乳肽",
"shareImg": "brandpage/pic_2_5.png",
},
{
"bgUrl": "brandpage/pic_2_6.png",
"title": "一夜 天亮",
"desc": "爱本悦眠功能粉",
"link": "www.baidu.com",
"productId": "753354110711035152",
"skuId": "753354110711035153",
"contentImg": "2-6",
"contentImgLen": 15,
"shareTitle": "爱本悦眠功能粉",
"shareImg": "brandpage/pic_2_6.png",
}
],
[
{
"bgUrl": "brandpage/pic_3_1.png",
"title": "高钙 高纤",
"desc": "爱上吃菜乳酪",
"link": "www.baidu.com",
"productId": "759563658744492290",
"skuId": "759563658744492293",
"contentImg": "3-1",
"contentImgLen": 10,
"shareTitle": "爱上吃菜乳酪",
"shareImg": "brandpage/pic_3_1.png"
},
{
"bgUrl": "brandpage/pic_3_2.png",
"title": "高钙 爆脆",
"desc": "高钙奶酪泡芙脆",
"link": "www.baidu.com",
"productId": "693279214116405585",
"skuId": "693279214116405586",
"contentImg": "3-2",
"contentImgLen": 15,
"shareTitle": "高钙奶酪泡芙脆",
"shareImg": "brandpage/pic_3_2.png",
},
{
"bgUrl": "brandpage/pic_3_3.png",
"title": "醇香 黑巧",
"desc": "高纤黑巧乳酪",
"link": "www.baidu.com",
"productId": "693279214116405585",
"skuId": "693279214116405586",
"contentImg": "3-3",
"contentImgLen": 10,
"shareTitle": "高纤黑巧乳酪",
"shareImg": "brandpage/pic_3_3.png",
},
{
"bgUrl": "brandpage/pic_3_4.png",
"title": "10倍 奶钙",
"desc": "超新星水果奶酪",
"link": "www.baidu.com",
"productId": "716141706338247497",
"skuId": "716141706338247498",
"contentImg": "3-4",
"contentImgLen": 15,
"shareTitle": "超新星水果奶酪",
"shareImg": "brandpage/pic_3_4.png",
},
{
"bgUrl": "brandpage/pic_3_5.png",
"title": "浓郁 爆浆",
"desc": "厚切流心芝士片",
"link": "www.baidu.com",
"productId": "717871366421930449",
"skuId": "717871366421930450",
"contentImg": "3-5",
"contentImgLen": 10,
"shareTitle": "厚切流心芝士片",
"shareImg": "brandpage/pic_3_5.png",
},
{
"bgUrl": "brandpage/pic_3_6.png",
"title": "洁净 配方",
"desc": "嚼奶粉乳酪",
"link": "www.baidu.com",
"productId": "551135905055024574",
"skuId": "596810081919086853",
"contentImg": "3-6",
"contentImgLen": 10,
"shareTitle": "嚼奶粉乳酪",
"shareImg": "brandpage/pic_3_6.png",
}
],
[
{
"bgUrl": "brandpage/pic_4_1.png",
"title": "含有 叶酸",
"desc": "北纬47度白甜糯玉米",
"link": "www.baidu.com",
"productId": "545768683314537529",
"skuId": "545770687080957074",
"contentImg": "4-1",
"contentImgLen": 5,
"shareTitle": "北纬47度白甜糯玉米",
"shareImg": "brandpage/pic_4_1.png",
},
{
"bgUrl": "brandpage/pic_4_2.png",
"title": "软糯 Q弹",
"desc": "北纬47度黄糯玉米",
"link": "www.baidu.com",
"productId": "555503303308649561",
"skuId": "555503303308649562",
"contentImg": "4-2",
"contentImgLen": 5,
"shareTitle": "北纬47度黄糯玉米",
"shareImg": "brandpage/pic_4_2.png",
},
{
"bgUrl": "brandpage/pic_4_3.png",
"title": "开袋 即食",
"desc": "北纬47度低GI水果玉米粒袋装",
"link": "www.baidu.com",
"productId": "469675861496440509",
"skuId": "469675861496440510",
"contentImg": "4-3",
"contentImgLen": 5,
"shareTitle": "北纬47度低GI水果玉米粒袋装",
"shareImg": "brandpage/pic_4_3.png",
},
{
"bgUrl": "brandpage/pic_4_4.png",
"title": "秘制 工艺",
"desc": "北纬47度东北烧烤味玉米段",
"link": "www.baidu.com",
"productId": "733411972814471679",
"skuId": "733468301522154622",
"contentImg": "4-4",
"contentImgLen": 5,
"shareTitle": "北纬47度东北烧烤味玉米段",
"shareImg": "brandpage/pic_4_4.png",
},
{
"bgUrl": "brandpage/pic_4_5.png",
"title": "0乳糖 低GI",
"desc": "N47°植物酵素乳",
"link": "www.baidu.com",
"productId": "733411972814471679",
"skuId": "733468301522154622",
"contentImg": "4-5",
"contentImgLen": 10,
"shareTitle": "N47°植物酵素乳",
"shareImg": "brandpage/pic_4_5.png",
},
{
"bgUrl": "brandpage/pic_4_6.png",
"title": "轻卡 低GI",
"desc": "N47°水果玉米汁",
"link": "www.baidu.com",
"productId": "705230699873112222",
"skuId": "705230699873112223",
"contentImg": "4-6",
"contentImgLen": 8,
"shareTitle": "N47°水果玉米汁",
"shareImg": "brandpage/pic_4_6.png",
}
]
],
"ipDesc": "鹤小飞一家是由鹤爸、鹤妈、鹤小飞(哥哥)、鹤小小(妹妹) 组成的一家。\n四口热爱生活、积极向上,是他们一家对生活的态度。",
"esgInfoList": [
{
"bgUrl": "brandpage/esg1.png",
"title": "中国飞鹤发布2024年ESG报告",
"desc": "飞鹤践行低碳节能,打造绿色产业链;承担 龙头责任,引领行业创新发展;履行社会责 任,构建共富共享生态。",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/UebPA-2XenAdw7lTs2NttA",
"extra": {}
},
},
{
"bgUrl": "brandpage/esg2.png",
"title": "12亿元生育补贴计划",
"desc": "中国飞鹤于2025年4月初在全国范围内启动 总规模为12亿元,为符合条件的孕期家庭提 供不少于1500元生育补贴的飞鹤生育补贴",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/TpjCyjCf2Df3t1RMfi-JKQ",
"extra": {}
},
},
{
"bgUrl": "brandpage/esg3.png",
"title": "教育公益",
"desc": "百年大计,教育为本;教育大计,教师为本。 近三年来,飞鹤已投入超过6500万元开展专 项助教活动,惠及在职专任教师超过28万人",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/fvo6LV95tCIPA_lda9L7zw",
"extra": {}
},
}
],
"qrInfoList": [
{
"title": "视频号",
"desc": "扫码关注<span style='color:#D3A358;'>鹤小飞一家</span>视频号,看超多有爱的趣味故事",
"qrUrl": "brandpage/qrhxf_sph.png"
},
{
"title": "微信小店",
"desc": "扫码进入<span style='color:#D3A358;'>鹤小飞一家</span>店铺,挑选精美限量周边",
"qrUrl": "brandpage/qrhxf_wxxd.png"
}
]
}
\ No newline at end of file
export const homeObj = {
swiperList: [{
url: 'homepage/banner1.jpg',
link: {
type: 1,
url: '/pages/product/product?id:1-1'
}
},
{
url: 'homepage/banner2.jpg',
link: {
type: 2,
url: 'pages/product/product?id:1-1',
extra: {
appId: 'wx1234567890abcdef',
envVersion: 'release'
"swiperList": [
{
"url": "homepage/banner1.jpg",
"link": {
"type": 1,
"url": "/pages/product/product?id:1-1"
}
}
},
{
url: 'homepage/banner3.jpg',
link: {
type: 3,
url: 'https://www.baidu.com',
extra: {
},
{
"url": "homepage/banner2.jpg",
"link": {
"type": 3,
"url": "https://mom.feihe.com/moreTools?monthAge=undefined&month=null",
"extra": {}
}
},
{
"url": "homepage/banner3.jpg",
"link": {
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot",
"extra": {"appId": "wx4205ec55b793245e", "envVersion": "release"}
}
}
},
],
vipCardList: [{
level: "钻石会员",
subTitle: "育儿课程权益",
btnTitle: "12类系列课程",
btnSubTitle: "立即领取",
showCornerTxt: "待领取",
link: "www.baidu.com",
bgUrl: "homepage/cardbg1.png"
},
{
level: "北纬47°系列",
subTitle: "来自万年黑土的健康食品",
btnTitle: "",
btnSubTitle: "",
showCornerTxt: "",
link: "",
bgUrl: "homepage/cardbg2.png"
},
{
level: "育儿宝典",
subTitle: "专家文章、育儿知识、饮食知识",
btnTitle: "",
btnSubTitle: "",
showCornerTxt: "",
link: "",
bgUrl: "homepage/cardbg3.png"
},
],
contentImgList: [{
bgUrl: 'homepage/content_1.png',
link: 'www.baidu.com',
_style: 'width:311rpx;height: 324rpx;left: 40rpx;top: 0;'
},
{
bgUrl: 'homepage/content_2.png',
link: 'www.baidu.com',
_style: 'width:263rpx;height: 324rpx;right: 40rpx;top: 400rpx;'
},
{
bgUrl: 'homepage/content_3.png',
link: 'www.baidu.com',
_style: 'width:418rpx;height: 345rpx;left: 40rpx;top: 750rpx;'
},
{
bgUrl: 'homepage/content_4.png',
link: 'www.baidu.com',
_style: 'width:263rpx;height: 324rpx;right: 40rpx;top: 1120rpx;'
}
],
channelTabList: ["凯叔讲故事", "哄睡故事", "知识科普", "安全意识", "社交能力"],
changelInfoList: [
[{
bgUrl: "homepage/channel_0_1.png",
title: "凯叔·金子美铃童诗:【星星和蒲公英】",
link: "www.baidu.com"
"vipConfigList": [
{
"grade": "-1",
"level": "注册会员",
"subTitle": "新人礼权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "首注200元优惠券",
"btnSubTitle": "立即注册"
},
{
bgUrl: "homepage/channel_0_1.png",
title: "凯叔·金子美铃童诗:【天空和海】",
link: "www.baidu.com"
}
],
[{
bgUrl: "homepage/channel_1_1.png",
title: "凯叔-小睡仙:【睡吧睡吧,香香的】",
link: "www.baidu.com"
"grade": "0",
"subTitle": "免费问诊权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "三甲医生在线问诊",
"btnSubTitle": "立即了解"
},
{
"grade": "1",
"subTitle": "育儿课程权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "12类系列课程",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取"
},
{
"grade": "2",
"subTitle": "育儿课程权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "12类系列课程",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取"
},
{
"grade": "3",
"subTitle": "月月礼权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "1分购、优惠券",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取"
},
{
bgUrl: "homepage/channel_1_1.png",
title: "凯叔-小睡仙:【睡觉仙气,3,2,1,】",
link: "www.baidu.com"
"grade": "4",
"subTitle": "月月礼权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "1分购、优惠券",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取"
}
],
[{
bgUrl: "homepage/channel_2_1.png",
title: "教宝宝认识人体:【守护眼睛的睫毛】",
link: "www.baidu.com"
],
"vipCardList": [
{
"level": "钻石会员",
"subTitle": "育儿课程权益",
"btnTitle": "12类系列课程",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取",
"link": {
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot",
"extra": {"appId": "wx4205ec55b793245e", "envVersion": "release"}
},
"bgUrl": "homepage/cardbg1.png"
},
{
"level": "北纬47°系列",
"subTitle": "来自万年黑土的健康食品",
"btnTitle": "",
"btnSubTitle": "",
"showCornerTxt": "",
"link": {
"type": 2,
"url": ""
},
"bgUrl": "homepage/cardbg2.png"
},
{
bgUrl: "homepage/channel_2_1.png",
title: "教宝宝认识人体:【为什么肚子会咕咕叫?】",
link: "www.baidu.com"
"level": "育儿宝典",
"subTitle": "专家文章、育儿知识、饮食知识",
"btnTitle": "",
"btnSubTitle": "",
"showCornerTxt": "",
"link": "",
"bgUrl": "homepage/cardbg3.png"
}
],
[{
bgUrl: "homepage/channel_3_1.png",
title: "教宝宝不乱吃东西:【这个不能吃】",
link: "www.baidu.com"
],
"contentImgList": [
{
"bgUrl": "homepage/content_1.png",
"link": "www.baidu.com",
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/homepage/4-0%E5%AE%98%E7%BD%91%E8%A7%86%E9%A2%91.mp4",
"_style": "width:311rpx;height: 324rpx;left: 40rpx;top: 0;"
},
{
"bgUrl": "homepage/content_2.png",
"link": "www.baidu.com",
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/homepage/%E9%A6%96%E9%A1%B5_2%E9%A3%9E%E9%B9%A4%E8%BF%9E%E7%BB%AD%E4%BA%94%E5%B9%B4%E5%A5%B6%E7%B2%89%E7%AC%AC%E4%B8%80.mp4",
"_style": "width:263rpx;height: 324rpx;right: 40rpx;top: 400rpx;"
},
{
"bgUrl": "homepage/content_3.png",
"link": "www.baidu.com",
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/homepage/%E9%A6%96%E9%A1%B5_3%E3%80%909%E6%9C%8827%E6%97%A5%E3%80%91%E9%A3%9E%E9%B9%A4_%E4%B8%96%E7%95%8C%E6%97%85%E6%B8%B8%E6%97%A5.mp4",
"_style": "width:418rpx;height: 345rpx;left: 40rpx;top: 750rpx;"
},
{
bgUrl: "homepage/channel_3_1.png",
title: "培养宝宝不摸插座的安全意识:【电线插座不好玩】",
link: "www.baidu.com"
"bgUrl": "homepage/content_4.png",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/HhBF5h8xX8zOrthsy2-Y-A",
"extra": {}
},
"_style": "width:263rpx;height: 324rpx;right: 40rpx;top: 1120rpx;"
}
],
"channelTabList": ["凯叔讲故事", "哄睡故事", "知识科普", "安全意识", "社交能力"],
"changelInfoList": [
[
{
"bgUrl": "homepage/channel_0_1.png",
"title": "凯叔·金子美铃童诗:【星星和蒲公英】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22121&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1221",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_0_1.png",
"title": "凯叔·金子美铃童诗:【天空和海】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22119&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1221",
"extra": {}
}
}
],
[
{
"bgUrl": "homepage/channel_1_1.png",
"title": "凯叔-小睡仙:【睡吧睡吧,香香的】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22238&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1211",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_1_1.png",
"title": "凯叔-小睡仙:【睡觉仙气,3,2,1,】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22237&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1211",
"extra": {}
}
}
],
[
{
"bgUrl": "homepage/channel_2_1.png",
"title": "教宝宝认识人体:【守护眼睛的睫毛】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21867&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1220",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_2_1.png",
"title": "教宝宝认识人体:【为什么肚子会咕咕叫?】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21880&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1220",
"extra": {}
}
}
],
[
{
"bgUrl": "homepage/channel_3_1.png",
"title": "教宝宝不乱吃东西:【这个不能吃】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21869&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1218",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_3_1.png",
"title": "培养宝宝不摸插座的安全意识:【电线插座不好玩】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21803&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1218",
"extra": {}
}
}
],
[{
bgUrl: "homepage/channel_4_1.png",
title: "教会宝宝不嘲笑别人:【鹤鸟】",
link: "www.baidu.com"
[
{
"bgUrl": "homepage/channel_4_1.png",
"title": "教会宝宝不嘲笑别人:【鹳鸟】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21949&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1216",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_4_1.png",
"title": "培养宝宝尊重别人的习惯:【爱嘲笑人的斑斑】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21888&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1216",
"extra": {}
}
}
]
],
"childrenInfoList": [
{
"bgUrl": "homepage/children_0.png",
"title": "1+3 育儿妙招大揭秘,带娃从此不“蕉绿”",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/Xn5dh96OaQ9CcsVMZ5jnvg",
"extra": {}
}
},
{
bgUrl: "homepage/channel_4_1.png",
title: "培养宝宝尊重别人的习惯:【爱嘲笑人的斑斑】",
link: "www.baidu.com"
"bgUrl": "homepage/children_1.png",
"title": "已有儿童中招,严重可瘫痪夏季防蜱虫最全指南速看",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/fL5UZjWUXmPrjJgSe2Hr5g",
"extra": {}
}
},
{
"bgUrl": "homepage/children_2.png",
"title": "99% 家长忽略的脑发育关键动作",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/G5q6g-EdRWqasB6tvRgIzw",
"extra": {}
}
}
]
],
childrenInfoList: [{
bgUrl: "homepage/children_0.png",
title: "1+3 育儿妙招大揭秘,带娃从此不“蕉绿”",
link: "www.baidu.com"
},
{
bgUrl: "homepage/children_1.png",
title: "已有儿童中招,严重可瘫痪夏季防蜱虫最全指南速看",
link: "www.baidu.com"
},
{
bgUrl: "homepage/children_2.png",
title: "99% 家长忽略的脑发育关键动作",
link: "www.baidu.com"
}
]
, bottomLinkList: [{
bgUrl: "homepage/iconwx.png",
link: "www.baidu.com",
_style: "width:70rpx;height:109rpx;"
},
{
bgUrl: "homepage/iconqw.png",
link: "www.baidu.com",
_style: "width:95rpx;height:109rpx;"
},
{
bgUrl: "homepage/iconsph.png",
link: "www.baidu.com",
_style: "width:70rpx;height:109rpx;"
},
{
bgUrl: "homepage/iconxhs.png",
link: "www.baidu.com",
_style: "width:88rpx;height:99rpx;"
}
"bottomLinkList": [
{
"bgUrl": "homepage/iconwx.png",
"link": "www.baidu.com",
"_style": "width:70rpx;height:109rpx;"
},
{
"bgUrl": "homepage/iconqw.png",
"link": "www.baidu.com",
"_style": "width:95rpx;height:109rpx;"
},
{
"bgUrl": "homepage/iconsph.png",
"link": "www.baidu.com",
"_style": "width:70rpx;height:109rpx;"
},
{
"bgUrl": "homepage/iconxhs.png",
"link": "www.baidu.com",
"_style": "width:88rpx;height:99rpx;"
}
],
qrInfoList: [{
title: "公众号",
desc: "扫码关注<span style:'color:#D3A358;'>星妈会</span>公众号,了解更多专业育儿资讯",
qrUrl: "homepage/qrcode_gzh.png"
},
{
title: "企业微信",
desc: "扫码添加<span style:'color:#D3A358;'>星妈管家</span>企微,了解更多专业育儿资讯",
qrUrl: "homepage/qrcode_qw.png"
},
{
title: "视频号",
desc: "扫码关注<span style:'color:#D3A358;'>星妈会</span>视频号,了解更多专业育儿资讯",
qrUrl: "homepage/qrcode_sph.png"
},
"qrInfoList": [
{
"title": "公众号",
"desc": "扫码关注<span style:'color:#D3A358;'>星妈会</span>公众号,了解更多专业育儿资讯",
"qrUrl": "homepage/qrcode_gzh.png"
},
{
"title": "企业微信",
"desc": "扫码添加<span style:'color:#D3A358;'>星妈管家</span>企微,了解更多专业育儿资讯",
"qrUrl": "homepage/qrcode_qw.png"
},
{
"title": "视频号",
"desc": "扫码关注<span style:'color:#D3A358;'>星妈会</span>视频号,了解更多专业育儿资讯",
"qrUrl": "homepage/qrcode_sph.png"
}
]
}
\ No newline at end of file
}
export const myObj = {
tool: [
[
{
bgUrl: "my/literature.png",
title: "育儿百科",
desc: "",
link: {
type: 1,
url: "/pages/library/ContentLibrary",
extra: {},
},
},
{
bgUrl: "my/suyuan.png",
title: "产品溯源",
desc: "",
link: {
type: 3,
url: "https://wic.feihe.com",
extra: {},
},
},
{
bgUrl: "my/book.png",
title: "奶娃宝典",
desc: "",
link: {
type: 3,
url: "https://mom.feihe.com/babyWikipedia",
extra: {},
},
},
{
bgUrl: "my/doctor.png",
title: "医生问诊",
desc: "",
link: {
type: 2,
url: "/pages/partner/redirect",
extra: {},
},
},
{
bgUrl: "my/babytest.png",
title: "宝宝体质测试",
desc: "",
link: {
type: 3,
url: "https://www.baidu.com",
extra: {},
},
},
],
],
contentCfg: {
contentLikeOptions: [
"奶粉选择",
"奶粉成分",
"奶粉冲泡",
"宝宝奶量",
"生长发育",
"常见疾病",
"体检疫苗",
"饮食营养补充",
"辅食营养",
"亲子关系",
"早教游戏",
],
productLikeOptions: [
"飞鹤星飞帆",
"星飞帆卓睿",
"星飞帆卓耀",
"星飞帆卓初",
"星飞帆臻稚卓蓓",
"星飞帆淳芮有机",
],
specialAttentionOptions: ["过敏", "长肉", "肠道", "消化", "脑发育"],
channelOptions: ["电商(京东/天猫)", "母婴店"],
},
wheelOptionsYL: [
{ label: "1月龄", desc: "宝宝开始对外界产生兴趣,会追视物体" },
{ label: "2月龄", desc: "能发出咿咿呀呀的声音,会对妈妈微笑" },
{ label: "3月龄", desc: "抬头能力增强,喜欢玩自己的小手" },
{ label: "4月龄", desc: "会翻身了,对周围事物充满好奇" },
{ label: "5月龄", desc: "手眼协调能力提升,喜欢抓取玩具" },
{ label: "6月龄", desc: "可以独自坐立,开始尝试固体食物" },
{ label: "7月龄", desc: "会爬行了,语言能力逐渐发展" },
{ label: "8月龄", desc: "能扶物站立,认知能力显著提升" },
{ label: "9月龄", desc: "开始学步,能说简单的词语" },
{ label: "10月龄", desc: "独立行走能力增强,喜欢模仿大人" },
{ label: "11月龄", desc: "语言理解能力提高,会简单互动" },
{ label: "12月龄", desc: "基本能独立行走,表达欲望增强" },
{ label: "13月龄", desc: "动作更加协调,喜欢探索新事物" },
{ label: "14月龄", desc: "语言表达更丰富,独立意识增强" },
{ label: "15月龄", desc: "手部精细动作发展,创造力萌芽" },
{ label: "16月龄", desc: "记忆力提升,开始学习分类概念" },
{ label: "17月龄", desc: "想象力丰富,喜欢角色扮演游戏" },
{ label: "18月龄", desc: "语言交流更流畅,社交能力发展" },
{ label: "19月龄", desc: "运动技能全面发展,好奇心旺盛" },
{ label: "20月龄", desc: "逻辑思维初步形成,会简单推理" },
{ label: "21月龄", desc: "情感表达更丰富,记忆力增强" },
{ label: "22月龄", desc: "独立性增强,生活技能提升" },
{ label: "23月龄", desc: "语言组织能力提高,喜欢提问" },
{ label: "24月龄", desc: "社交圈子扩大,懂得分享" },
{ label: "25月龄", desc: "创造性思维发展,喜欢音乐" },
{ label: "26月龄", desc: "注意力更集中,会完成简单任务" },
{ label: "27月龄", desc: "空间认知能力提升,喜欢拼图" },
{ label: "28月龄", desc: "语言表达更准确,理解能力增强" },
{ label: "29月龄", desc: "自我意识增强,情绪管理提升" },
{ label: "30月龄", desc: "逻辑思维更成熟,会简单计数" },
{ label: "31月龄", desc: "艺术创造力发展,喜欢绘画" },
{ label: "32月龄", desc: "记忆力显著提升,会讲简单故事" },
{ label: "33月龄", desc: "运动协调性好,喜欢户外活动" },
{ label: "34月龄", desc: "社交技能成熟,懂得合作" },
{ label: "35月龄", desc: "思维更加灵活,解决问题能力增强" },
{ label: "36月龄", desc: "全面发展,准备进入幼儿园阶段" },
],
wheelOptionsYZ: [
{
label: "孕1周",
desc: "胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化,胚胎开始着床,激素水平发生变化",
},
{ label: "孕2周", desc: "胎盘开始形成,为胎儿提供营养" },
{ label: "孕3周", desc: "胎儿心脏开始跳动,神经系统发育" },
{ label: "孕4周", desc: "胎儿大小如花生,开始形成四肢" },
{ label: "孕5周", desc: "胎儿面部开始发育,可见眼睛雏形" },
{ label: "孕6周", desc: "胎儿开始运动,脊椎继续发育" },
{ label: "孕7周", desc: "胎儿手指脚趾形成,大脑发育加快" },
{ label: "孕8周", desc: "胎儿所有器官雏形完成,开始生长" },
{ label: "孕9周", desc: "胎儿开始吞咽羊水,肌肉发育" },
{ label: "孕10周", desc: "胎儿指甲开始生长,性别特征显现" },
{ label: "孕11周", desc: "胎儿可以做出简单动作,头部变圆" },
{ label: "孕12周", desc: "胎儿开始产生尿液,骨骼继续钙化" },
{ label: "孕13周", desc: "胎儿vocal cords形成,可发声" },
{ label: "孕14周", desc: "胎儿开始产生胎动,母体可感知" },
{ label: "孕15周", desc: "胎儿皮下脂肪开始形成,体型增大" },
{ label: "孕16周", desc: "胎儿听力开始发育,对声音敏感" },
{ label: "孕17周", desc: "胎儿免疫系统开始发育,产生抗体" },
{ label: "孕18周", desc: "胎儿睡眠周期形成,活动规律" },
{ label: "孕19周", desc: "胎儿肺部发育,为呼吸做准备" },
{ label: "孕20周", desc: "胎儿听力继续发育,对外界声音反应" },
{ label: "孕21周", desc: "胎儿眉毛睫毛生长,面部特征明显" },
{ label: "孕22周", desc: "胎儿皮肤变厚,开始长出胎毛" },
{ label: "孕23周", desc: "胎儿体重快速增长,运动更频繁" },
{ label: "孕24周", desc: "胎儿肺部继续发育,产生肺表面活性物质" },
{ label: "孕25周", desc: "胎儿脂肪积累加快,体型继续增大" },
{ label: "孕26周", desc: "胎儿眼睛可以睁开,对光有反应" },
{ label: "孕27周", desc: "胎儿大脑快速发育,神经系统成熟" },
{ label: "孕28周", desc: "胎儿各器官功能逐渐完善" },
{ label: "孕29周", desc: "胎儿骨骼继续钙化,头部下降" },
{ label: "孕30周", desc: "胎儿体重持续增加,活动空间减少" },
{ label: "孕31周", desc: "胎儿消化系统发育成熟,可消化羊水" },
{ label: "孕32周", desc: "胎儿皮下脂肪继续积累,体温调节能力增强" },
{ label: "孕33周", desc: "胎儿免疫系统继续发育,获得母体抗体" },
{ label: "孕34周", desc: "胎儿肺部发育接近成熟,准备独立呼吸" },
{ label: "孕35周", desc: "胎儿体重快速增加,为出生做准备" },
{ label: "孕36周", desc: "胎儿头部继续下降,为分娩做准备" },
{ label: "孕37周", desc: "胎儿各器官发育完善,可以安全出生" },
{ label: "孕38周", desc: "胎儿继续增重,准备出生" },
{ label: "孕39周", desc: "胎儿位置固定,随时可能出生" },
{ label: "孕40周", desc: "胎儿发育完全成熟,即将出生" },
],
};
var a = {
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/brandpage/banner_1%E6%85%A2%E4%BA%BA%E8%8A%82x%E9%A3%9E%E9%B9%A4%2B-%2B%E5%9C%9FFINAL.mp4",
"swiperList": [
{
"url": "brandpage/Banner1.jpg",
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/brandpage/banner_1%E6%85%A2%E4%BA%BA%E8%8A%82.mp4",
"link": {
},
},
{
"url": "brandpage/Banner2.jpg",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/0eMxbWB3R_0g06HZPUEj5Q",
"extra": {}
},
},
{
"url": "brandpage/Banner3.jpg",
"link": {
"type": 3,
"url": "https://factory.feihe.com/user/#/web",
"extra": {}
},
}
],
"swiperIconList": [
{
"baseUrl": "brandpage/corn1.png",
"activeUrl": "brandpage/corn2.png"
},
{
"baseUrl": "brandpage/cattle1.png",
"activeUrl": "brandpage/cattle2.png"
},
{
"baseUrl": "brandpage/factory1.png",
"activeUrl": "brandpage/factory2.png"
}
],
"productTabList": [
"全部", "母婴全阶", "功能营养", "儿童产品", "北纬47°"
],
"product": [
[
{
"bgUrl": "brandpage/pic_0_1.png",
"title": "超凡 吸收",
"desc": "星飞帆经典 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "0-1",
"contentImgLen": 20,
"shareTitle": "星飞帆经典 3段",
"shareImg": "brandpage/share_0_1.png",
},
{
"bgUrl": "brandpage/pic_0_2.png",
"title": "顶配 脑育",
"desc": "星飞帆卓睿 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "0-2",
"contentImgLen": 10,
"shareTitle": "星飞帆卓睿 3段",
"shareImg": "brandpage/pic_0_2.png",
},
{
"bgUrl": "brandpage/pic_0_3.png",
"title": "亲和 自护",
"desc": "星飞帆卓耀 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "0-3",
"contentImgLen": 28,
"shareTitle": "星飞帆卓耀 3段",
"shareImg": "brandpage/pic_0_3.png",
},
{
"bgUrl": "brandpage/pic_0_4.png",
"title": " 4维 效力",
"desc": "爱本跃动蛋白营养粉",
"link": "www.baidu.com",
"productId": "749098220531287139",
"skuId": "749098220531287140",
"contentImg": "0-4",
"contentImgLen": 15,
"shareTitle": "爱本跃动蛋白营养粉",
"shareImg": "brandpage/pic_0_4.png",
},
{
"bgUrl": "brandpage/pic_0_5.png",
"title": "高钙 爆脆",
"desc": "高钙奶酪泡芙脆",
"link": "www.baidu.com",
"productId": "693279214116405585",
"skuId": "693279214116405586",
"contentImg": "0-5",
"contentImgLen": 15,
"shareTitle": "高钙奶酪泡芙脆",
"shareImg": "brandpage/pic_0_5.png",
},
{
"bgUrl": "brandpage/pic_0_6.png",
"title": "软糯 Q弹",
"desc": "北纬47度黄糯玉米",
"link": "www.baidu.com",
"productId": "555503303308649561",
"skuId": "555503303308649562",
"contentImg": "0-6",
"contentImgLen": 5,
"shareTitle": "北纬47度黄糯玉米",
"shareImg": "brandpage/pic_0_6.png",
}
],
[
{
"bgUrl": "brandpage/pic_1_1.png",
"title": "超凡 吸收",
"desc": "星飞帆经典 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-1",
"contentImgLen": 20,
"shareTitle": "星飞帆经典 3段",
"shareImg": "brandpage/share_1_1.png",
},
{
"bgUrl": "brandpage/pic_1_2.png",
"title": "顶配 脑育",
"desc": "星飞帆卓睿 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-2",
"contentImgLen": 10,
"shareTitle": "星飞帆卓睿 3段",
"shareImg": "brandpage/pic_1_2.png",
},
{
"bgUrl": "brandpage/pic_1_3.png",
"title": "亲和 自护",
"desc": "星飞帆卓耀 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-3",
"contentImgLen": 28,
"shareTitle": "星飞帆卓耀 3段",
"shareImg": "brandpage/pic_1_3.png",
},
{
"bgUrl": "brandpage/pic_1_4.png",
"title": "顶配 A 2",
"desc": "星飞帆卓睿A2奶源",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-4",
"contentImgLen": 20,
"shareTitle": "星飞帆卓睿A2奶源",
"shareImg": "brandpage/pic_1_4.png",
},
{
"bgUrl": "brandpage/pic_1_5.png",
"title": "活性 有机",
"desc": "臻稚卓蓓 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-5",
"contentImgLen": 28,
"shareTitle": "臻稚卓蓓 3段",
"shareImg": "brandpage/pic_1_5.png",
},
{
"bgUrl": "brandpage/pic_1_6.png",
"title": "高端 乳铁",
"desc": "臻爱倍护 3段",
"link": "www.baidu.com",
"productId": "1234567890",
"skuId": "1234567890",
"contentImg": "1-6",
"contentImgLen": 20,
"shareTitle": "臻爱倍护 3段",
"shareImg": "brandpage/pic_1_6.png",
}
],
[
{
"bgUrl": "brandpage/pic_2_1.png",
"title": " 4维 效力",
"desc": "爱本跃动蛋白营养粉",
"link": "www.baidu.com",
"productId": "749098220531287139",
"skuId": "749098220531287140",
"contentImg": "2-1",
"contentImgLen": 20,
"shareTitle": "爱本跃动蛋白营养粉",
"shareImg": "brandpage/pic_2_1.png",
},
{
"bgUrl": "brandpage/pic_2_2.png",
"title": "初乳 精华",
"desc": "爱本牛初乳",
"link": "www.baidu.com",
"productId": "748659115456528889",
"skuId": "7748659115456528890",
"contentImg": "2-2",
"contentImgLen": 15,
"shareTitle": "爱本牛初乳",
"shareImg": "brandpage/pic_2_2.png",
},
{
"bgUrl": "brandpage/pic_2_3.png",
"title": "每日 蛋白",
"desc": "爱本每日蛋白营养糊",
"link": "www.baidu.com",
"productId": "768991288915277214",
"skuId": "768991288915277215",
"contentImg": "2-3",
"contentImgLen": 15,
"shareTitle": "爱本每日蛋白营养糊",
"shareImg": "brandpage/pic_2_3.png",
},
{
"bgUrl": "brandpage/pic_2_4.png",
"title": "腰腹 燃脂",
"desc": "爱本纤纤益生菌\n羽衣甘蓝蛋白粉",
"link": "www.baidu.com",
"productId": "767546274051183809",
"skuId": "767546274051183810",
"contentImg": "2-4",
"contentImgLen": 10,
"shareTitle": "爱本纤纤益生菌羽衣甘蓝蛋白粉",
"shareImg": "brandpage/pic_2_4.png",
},
{
"bgUrl": "brandpage/pic_2_5.png",
"title": "药食 同源",
"desc": "爱本参芝初乳肽",
"link": "www.baidu.com",
"productId": "749443379821195324",
"skuId": "749443379821195325",
"contentImg": "2-5",
"contentImgLen": 10,
"shareTitle": "爱本参芝初乳肽",
"shareImg": "brandpage/pic_2_5.png",
},
{
"bgUrl": "brandpage/pic_2_6.png",
"title": "一夜 天亮",
"desc": "爱本悦眠功能粉",
"link": "www.baidu.com",
"productId": "753354110711035152",
"skuId": "753354110711035153",
"contentImg": "2-6",
"contentImgLen": 15,
"shareTitle": "爱本悦眠功能粉",
"shareImg": "brandpage/pic_2_6.png",
}
],
[
{
"bgUrl": "brandpage/pic_3_1.png",
"title": "高钙 高纤",
"desc": "爱上吃菜乳酪",
"link": "www.baidu.com",
"productId": "759563658744492290",
"skuId": "759563658744492293",
"contentImg": "3-1",
"contentImgLen": 10,
"shareTitle": "爱上吃菜乳酪",
"shareImg": "brandpage/pic_3_1.png"
},
{
"bgUrl": "brandpage/pic_3_2.png",
"title": "高钙 爆脆",
"desc": "高钙奶酪泡芙脆",
"link": "www.baidu.com",
"productId": "693279214116405585",
"skuId": "693279214116405586",
"contentImg": "3-2",
"contentImgLen": 15,
"shareTitle": "高钙奶酪泡芙脆",
"shareImg": "brandpage/pic_3_2.png",
},
{
"bgUrl": "brandpage/pic_3_3.png",
"title": "醇香 黑巧",
"desc": "高纤黑巧乳酪",
"link": "www.baidu.com",
"productId": "693279214116405585",
"skuId": "693279214116405586",
"contentImg": "3-3",
"contentImgLen": 10,
"shareTitle": "高纤黑巧乳酪",
"shareImg": "brandpage/pic_3_3.png",
},
{
"bgUrl": "brandpage/pic_3_4.png",
"title": "10倍 奶钙",
"desc": "超新星水果奶酪",
"link": "www.baidu.com",
"productId": "716141706338247497",
"skuId": "716141706338247498",
"contentImg": "3-4",
"contentImgLen": 15,
"shareTitle": "超新星水果奶酪",
"shareImg": "brandpage/pic_3_4.png",
},
{
"bgUrl": "brandpage/pic_3_5.png",
"title": "浓郁 爆浆",
"desc": "厚切流心芝士片",
"link": "www.baidu.com",
"productId": "717871366421930449",
"skuId": "717871366421930450",
"contentImg": "3-5",
"contentImgLen": 10,
"shareTitle": "厚切流心芝士片",
"shareImg": "brandpage/pic_3_5.png",
},
{
"bgUrl": "brandpage/pic_3_6.png",
"title": "洁净 配方",
"desc": "嚼奶粉乳酪",
"link": "www.baidu.com",
"productId": "551135905055024574",
"skuId": "596810081919086853",
"contentImg": "3-6",
"contentImgLen": 10,
"shareTitle": "嚼奶粉乳酪",
"shareImg": "brandpage/pic_3_6.png",
}
],
[
{
"bgUrl": "brandpage/pic_4_1.png",
"title": "含有 叶酸",
"desc": "北纬47度白甜糯玉米",
"link": "www.baidu.com",
"productId": "545768683314537529",
"skuId": "545770687080957074",
"contentImg": "4-1",
"contentImgLen": 5,
"shareTitle": "北纬47度白甜糯玉米",
"shareImg": "brandpage/pic_4_1.png",
},
{
"bgUrl": "brandpage/pic_4_2.png",
"title": "软糯 Q弹",
"desc": "北纬47度黄糯玉米",
"link": "www.baidu.com",
"productId": "555503303308649561",
"skuId": "555503303308649562",
"contentImg": "4-2",
"contentImgLen": 5,
"shareTitle": "北纬47度黄糯玉米",
"shareImg": "brandpage/pic_4_2.png",
},
{
"bgUrl": "brandpage/pic_4_3.png",
"title": "开袋 即食",
"desc": "北纬47度低GI水果玉米粒袋装",
"link": "www.baidu.com",
"productId": "469675861496440509",
"skuId": "469675861496440510",
"contentImg": "4-3",
"contentImgLen": 5,
"shareTitle": "北纬47度低GI水果玉米粒袋装",
"shareImg": "brandpage/pic_4_3.png",
},
{
"bgUrl": "brandpage/pic_4_4.png",
"title": "秘制 工艺",
"desc": "北纬47度东北烧烤味玉米段",
"link": "www.baidu.com",
"productId": "733411972814471679",
"skuId": "733468301522154622",
"contentImg": "4-4",
"contentImgLen": 5,
"shareTitle": "北纬47度东北烧烤味玉米段",
"shareImg": "brandpage/pic_4_4.png",
},
{
"bgUrl": "brandpage/pic_4_5.png",
"title": "0乳糖 低GI",
"desc": "N47°植物酵素乳",
"link": "www.baidu.com",
"productId": "733411972814471679",
"skuId": "733468301522154622",
"contentImg": "4-5",
"contentImgLen": 10,
"shareTitle": "N47°植物酵素乳",
"shareImg": "brandpage/pic_4_5.png",
},
{
"bgUrl": "brandpage/pic_4_6.png",
"title": "轻卡 低GI",
"desc": "N47°水果玉米汁",
"link": "www.baidu.com",
"productId": "705230699873112222",
"skuId": "705230699873112223",
"contentImg": "4-6",
"contentImgLen": 8,
"shareTitle": "N47°水果玉米汁",
"shareImg": "brandpage/pic_4_6.png",
}
]
],
"ipDesc": "鹤小飞一家是由鹤爸、鹤妈、鹤小飞(哥哥)、鹤小小(妹妹) 组成的一家。\n四口热爱生活、积极向上,是他们一家对生活的态度。",
"esgInfoList": [
{
"bgUrl": "brandpage/esg1.png",
"title": "中国飞鹤发布2024年ESG报告",
"desc": "飞鹤践行低碳节能,打造绿色产业链;承担 龙头责任,引领行业创新发展;履行社会责 任,构建共富共享生态。",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/UebPA-2XenAdw7lTs2NttA",
"extra": {}
},
},
{
"bgUrl": "brandpage/esg2.png",
"title": "12亿元生育补贴计划",
"desc": "中国飞鹤于2025年4月初在全国范围内启动 总规模为12亿元,为符合条件的孕期家庭提 供不少于1500元生育补贴的飞鹤生育补贴",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/TpjCyjCf2Df3t1RMfi-JKQ",
"extra": {}
},
},
{
"bgUrl": "brandpage/esg3.png",
"title": "教育公益",
"desc": "百年大计,教育为本;教育大计,教师为本。 近三年来,飞鹤已投入超过6500万元开展专 项助教活动,惠及在职专任教师超过28万人",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/fvo6LV95tCIPA_lda9L7zw",
"extra": {}
},
}
],
"qrInfoList": [
{
"title": "视频号",
"desc": "扫码关注<span style='color:#D3A358;'>鹤小飞一家</span>视频号,看超多有爱的趣味故事",
"qrUrl": "brandpage/qrhxf_sph.png"
},
{
"title": "微信小店",
"desc": "扫码进入<span style='color:#D3A358;'>鹤小飞一家</span>店铺,挑选精美限量周边",
"qrUrl": "brandpage/qrhxf_wxxd.png"
}
]
}
var b = JSON.stringify(JSON.stringify(a));
console.log(b);
\ No newline at end of file
var a = {
"swiperList": [
{
"url": "homepage/banner1.jpg",
"link": {
"type": 1,
"url": "/pages/product/product?id:1-1"
}
},
{
"url": "homepage/banner2.jpg",
"link": {
"type": 3,
"url": "https://mom.feihe.com/moreTools?monthAge=undefined&month=null",
"extra": {}
}
},
{
"url": "homepage/banner3.jpg",
"link": {
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot",
"extra": {"appId": "wx4205ec55b793245e", "envVersion": "release"}
}
}
],
"vipConfigList": [
{
"grade": "-1",
"level": "注册会员",
"subTitle": "新人礼权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "首注200元优惠券",
"btnSubTitle": "立即注册"
},
{
"grade": "0",
"subTitle": "免费问诊权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "三甲医生在线问诊",
"btnSubTitle": "立即了解"
},
{
"grade": "1",
"subTitle": "育儿课程权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "12类系列课程",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取"
},
{
"grade": "2",
"subTitle": "育儿课程权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "12类系列课程",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取"
},
{
"grade": "3",
"subTitle": "月月礼权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "1分购、优惠券",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取"
},
{
"grade": "4",
"subTitle": "月月礼权益",
"bgUrl": "homepage/cardbg1.png",
"btnTitle": "1分购、优惠券",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取"
}
],
"vipCardList": [
{
"level": "钻石会员",
"subTitle": "育儿课程权益",
"btnTitle": "12类系列课程",
"btnSubTitle": "立即领取",
"showCornerTxt": "待领取",
"link": {
"type": 2,
"url": "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot",
"extra": {"appId": "wx4205ec55b793245e", "envVersion": "release"}
},
"bgUrl": "homepage/cardbg1.png"
},
{
"level": "北纬47°系列",
"subTitle": "来自万年黑土的健康食品",
"btnTitle": "",
"btnSubTitle": "",
"showCornerTxt": "",
"link": {
"type": 2,
"url": ""
},
"bgUrl": "homepage/cardbg2.png"
},
{
"level": "育儿宝典",
"subTitle": "专家文章、育儿知识、饮食知识",
"btnTitle": "",
"btnSubTitle": "",
"showCornerTxt": "",
"link": "",
"bgUrl": "homepage/cardbg3.png"
}
],
"contentImgList": [
{
"bgUrl": "homepage/content_1.png",
"link": "www.baidu.com",
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/homepage/4-0%E5%AE%98%E7%BD%91%E8%A7%86%E9%A2%91.mp4",
"_style": "width:311rpx;height: 324rpx;left: 40rpx;top: 0;"
},
{
"bgUrl": "homepage/content_2.png",
"link": "www.baidu.com",
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/homepage/%E9%A6%96%E9%A1%B5_2%E9%A3%9E%E9%B9%A4%E8%BF%9E%E7%BB%AD%E4%BA%94%E5%B9%B4%E5%A5%B6%E7%B2%89%E7%AC%AC%E4%B8%80.mp4",
"_style": "width:263rpx;height: 324rpx;right: 40rpx;top: 400rpx;"
},
{
"bgUrl": "homepage/content_3.png",
"link": "www.baidu.com",
"videoUrl": "https://duiba.oss-cn-hangzhou.aliyuncs.com/fh/homepage/%E9%A6%96%E9%A1%B5_3%E3%80%909%E6%9C%8827%E6%97%A5%E3%80%91%E9%A3%9E%E9%B9%A4_%E4%B8%96%E7%95%8C%E6%97%85%E6%B8%B8%E6%97%A5.mp4",
"_style": "width:418rpx;height: 345rpx;left: 40rpx;top: 750rpx;"
},
{
"bgUrl": "homepage/content_4.png",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/HhBF5h8xX8zOrthsy2-Y-A",
"extra": {}
},
"_style": "width:263rpx;height: 324rpx;right: 40rpx;top: 1120rpx;"
}
],
"channelTabList": ["凯叔讲故事", "哄睡故事", "知识科普", "安全意识", "社交能力"],
"changelInfoList": [
[
{
"bgUrl": "homepage/channel_0_1.png",
"title": "凯叔·金子美铃童诗:【星星和蒲公英】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22121&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1221",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_0_1.png",
"title": "凯叔·金子美铃童诗:【天空和海】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22119&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1221",
"extra": {}
}
}
],
[
{
"bgUrl": "homepage/channel_1_1.png",
"title": "凯叔-小睡仙:【睡吧睡吧,香香的】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22238&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1211",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_1_1.png",
"title": "凯叔-小睡仙:【睡觉仙气,3,2,1,】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=22237&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1211",
"extra": {}
}
}
],
[
{
"bgUrl": "homepage/channel_2_1.png",
"title": "教宝宝认识人体:【守护眼睛的睫毛】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21867&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1220",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_2_1.png",
"title": "教宝宝认识人体:【为什么肚子会咕咕叫?】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21880&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1220",
"extra": {}
}
}
],
[
{
"bgUrl": "homepage/channel_3_1.png",
"title": "教宝宝不乱吃东西:【这个不能吃】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21869&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1218",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_3_1.png",
"title": "培养宝宝不摸插座的安全意识:【电线插座不好玩】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21803&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1218",
"extra": {}
}
}
],
[
{
"bgUrl": "homepage/channel_4_1.png",
"title": "教会宝宝不嘲笑别人:【鹳鸟】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21949&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1216",
"extra": {}
}
},
{
"bgUrl": "homepage/channel_4_1.png",
"title": "培养宝宝尊重别人的习惯:【爱嘲笑人的斑斑】",
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia/audioDetail?id=21888&type=3&period_id=5&tag_id=1&navActive=1&fnTagId=1216",
"extra": {}
}
}
]
],
"childrenInfoList": [
{
"bgUrl": "homepage/children_0.png",
"title": "1+3 育儿妙招大揭秘,带娃从此不“蕉绿”",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/Xn5dh96OaQ9CcsVMZ5jnvg",
"extra": {}
}
},
{
"bgUrl": "homepage/children_1.png",
"title": "已有儿童中招,严重可瘫痪夏季防蜱虫最全指南速看",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/fL5UZjWUXmPrjJgSe2Hr5g",
"extra": {}
}
},
{
"bgUrl": "homepage/children_2.png",
"title": "99% 家长忽略的脑发育关键动作",
"link": {
"type": 3,
"url": "https://mp.weixin.qq.com/s/G5q6g-EdRWqasB6tvRgIzw",
"extra": {}
}
}
],
"bottomLinkList": [
{
"bgUrl": "homepage/iconwx.png",
"link": "www.baidu.com",
"_style": "width:70rpx;height:109rpx;"
},
{
"bgUrl": "homepage/iconqw.png",
"link": "www.baidu.com",
"_style": "width:95rpx;height:109rpx;"
},
{
"bgUrl": "homepage/iconsph.png",
"link": "www.baidu.com",
"_style": "width:70rpx;height:109rpx;"
},
{
"bgUrl": "homepage/iconxhs.png",
"link": "www.baidu.com",
"_style": "width:88rpx;height:99rpx;"
}
],
"qrInfoList": [
{
"title": "公众号",
"desc": "扫码关注<span style:'color:#D3A358;'>星妈会</span>公众号,了解更多专业育儿资讯",
"qrUrl": "homepage/qrcode_gzh.png"
},
{
"title": "企业微信",
"desc": "扫码添加<span style:'color:#D3A358;'>星妈管家</span>企微,了解更多专业育儿资讯",
"qrUrl": "homepage/qrcode_qw.png"
},
{
"title": "视频号",
"desc": "扫码关注<span style:'color:#D3A358;'>星妈会</span>视频号,了解更多专业育儿资讯",
"qrUrl": "homepage/qrcode_sph.png"
}
]
}
var b = JSON.stringify(JSON.stringify(a));
console.log(b);
\ No newline at end of file
<template>
<view class="container">
<Home v-if="curTabIndex == 0"></Home>
<Brand v-if="curTabIndex == 1"></Brand>
<Integral v-if="curTabIndex == 2"></Integral>
<My v-if="curTabIndex == 3"></My>
<TabBar :curTabIndex="curTabIndex" @tabClick="handleTabClick" />
</view>
<view class="container">
<Home v-if="globalStore.curTabIndex == 0" />
<Brand v-if="globalStore.curTabIndex == 1" />
<Integral v-if="globalStore.curTabIndex == 2" />
<My v-if="globalStore.curTabIndex == 3" />
<TabBar :curTabIndex="globalStore.curTabIndex" @tabClick="handleTabClick" />
</view>
</template>
<script>
import TabBar from '@/components/TabBar.vue'
import Home from '@/views/Home.vue';
import Brand from '@/views/Brand.vue';
import Integral from '@/views/Integral.vue';
import My from '@/views/My.vue';
<script setup>
import { ref, getCurrentInstance } from "vue";
import { onLoad, onShareAppMessage, onShareTimeline } from "@dcloudio/uni-app";
import TabBar from "@/components/TabBar.vue";
import Home from "@/views/Home.vue";
import Brand from "@/views/Brand.vue";
import Integral from "@/views/Integral.vue";
import My from "@/views/My.vue";
import { useGlobalStore } from "@/stores/global.js";
export default {
data() {
return {
curTabIndex: 0,
};
},
onLoad() {},
methods: {
handleTabClick({
index,
item
}) {
console.log('Tab clicked:', index, item)
// 这里可以根据index或item进行相应的页面跳转或其他操作
this.curTabIndex = index
}
},
components: {
TabBar,
Home,
Brand,
Integral,
My
}
};
const globalStore = useGlobalStore();
const { proxy } = getCurrentInstance();
const $baseUrl = proxy.$baseUrl;
const shareOptions = {
0: {
title: "8000万中国妈妈信赖的育儿品牌",
path: "/pages/index/index?pageType=home",
imageUrl: $baseUrl + "share/share_home.png",
},
1: {
title: "飞鹤提供家庭营养一站式解决方案",
path: "/pages/index/index?pageType=brand",
imageUrl: $baseUrl + "share/share_brand.png",
},
2: {
title: "超凡吸收!更多妈妈推荐的奶粉",
path: "/pages/index/index?pageType=integral",
imageUrl: $baseUrl + "share/share_integral.png",
},
};
function handleTabClick({ index }) {
globalStore.setCurTabIndex(index);
}
onLoad((options) => {
if (options.pageType) {
switch (options.pageType) {
case "home":
globalStore.setCurTabIndex(0);
break;
case "brand":
globalStore.setCurTabIndex(1);
break;
case "integral":
globalStore.setCurTabIndex(2);
break;
case "my":
globalStore.setCurTabIndex(3);
break;
}
}
});
onShareAppMessage(() => {
const pageType = globalStore.curTabIndex;
return shareOptions[pageType] || shareOptions[0];
});
onShareTimeline(() => {
const pageType = globalStore.curTabIndex;
return shareOptions[pageType] || shareOptions[0];
});
</script>
<style lang="scss" scoped>
.container {
min-height: 100vh;
background-color: #f5f5f5;
.container {
min-height: 100vh;
background-color: #f5f5f5;
.content {
padding-bottom: 100rpx; // 为底部TabBar留出空间
}
}
.content {
padding-bottom: 100rpx; // 为底部TabBar留出空间
}
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
\ No newline at end of file
......@@ -37,6 +37,7 @@
>
<image
class="person-avatar-img"
mode="aspectFill"
:src="formData.babyAvatar || $baseUrl + 'common/default_avatar.png'"
></image>
</button>
......@@ -45,7 +46,7 @@
<image
class="avatar-edit"
:src="$baseUrl + 'person/icon_modify.png'"
mode="aspectFit|aspectFill|widthFix"
mode="widthFix"
lazy-load="false"
binderror=""
bindload=""
......@@ -126,8 +127,10 @@
<view class="form-input-box">
<view class="form-input">
{{
(formData[item.name] &&
formData[item.name].split(",").join("、")) ||
(formData[item.name] &&
(formData[item.name].split(",").join("、").length > 11
? formData[item.name].split(",").join("、").slice(0, 11) + "..."
: formData[item.name].split(",").join("、"))) ||
item.placeholder
}}
</view>
......@@ -292,15 +295,16 @@ watch(
);
const pageCfgStore = usePageCfgStore();
// 直接取store中的配置项(非响应式),后续store变化不会自动更新
const contentLikeOptions = pageCfgStore.conetntCfg.contentLikeOptions;
const productLikeOptions = pageCfgStore.conetntCfg.productLikeOptions;
const specialAttentionOptions = pageCfgStore.conetntCfg.specialAttentionOptions;
const channelOptions = pageCfgStore.conetntCfg.channelOptions;
console.log("contentLikeOptions", contentLikeOptions);
// 内容偏好选项
const contentLikeOptions = ref([]);
// 产品偏好选项
const productLikeOptions = ref([]);
// 特别关注选项
const specialAttentionOptions = ref([]);
// 购买渠道选项
const channelOptions = ref([]);
// 表单项配置
const formItems = [
{
label: "当前状态",
......@@ -377,7 +381,7 @@ const formItems = [
required: false,
placeholder: "未选择",
type: "multi-picker",
range: contentLikeOptions,
range: [],
mode: "custom",
},
{
......@@ -386,7 +390,7 @@ const formItems = [
required: false,
placeholder: "未选择",
type: "multi-picker",
range: productLikeOptions,
range: [],
mode: "custom",
},
{
......@@ -395,7 +399,7 @@ const formItems = [
required: false,
placeholder: "未选择",
type: "multi-picker",
range: specialAttentionOptions,
range: [],
mode: "custom",
},
{
......@@ -404,7 +408,7 @@ const formItems = [
required: false,
placeholder: "未选择",
type: "picker",
range: channelOptions,
range: [],
mode: "custom",
},
];
......@@ -446,6 +450,31 @@ const getPickerIndex = (item) => {
const onPickerChange = (e, name) => {
const item = formItems.find((i) => i.name === name);
if (name === "babyStage") {
if (
pageType.value === "edit" &&
babyStageMap[e].value < formData.value[name]
) {
uni.showToast({
title: "不能选择更早的阶段",
icon: "none",
});
return;
}
// 当阶段变化时清空相关表单项
if (formData.value[name] !== babyStageMap[e].value) {
formData.value.babyBirthday = "";
formData.value.dueDate = "";
formData.value.babyType = "";
formData.value.babyGender = "";
formData.value.feedingType = "";
formData.value.contentPreference = "";
formData.value.productPreference = "";
formData.value.followInfo = "";
formData.value.purchaseChannel = "";
formData.value.gestationalWeeks = "";
}
formData.value[name] = babyStageMap[e].value;
return;
}
......@@ -576,11 +605,11 @@ const handleUploadBackground = async (e) => {
sizeType: ["original", "compressed"],
sourceType: ["album", "camera"],
success: async (res) => {
showLoading();
const tempFilePath = res.tempFilePaths[0];
const fs = uni.getFileSystemManager();
const base64 =
"data:image/jpeg;base64," + fs.readFileSync(tempFilePath, "base64");
showLoading();
const uploadRes = await uploadImage(base64);
......@@ -613,10 +642,6 @@ const getLabelByValue = (item, value) => {
}
return value;
};
const getValueByLabel = (map, label) => {
const found = map.find((i) => i.label === label);
return found ? found.value : "";
};
const multiPickerStatus = ref(false); // 控制弹窗显示
const currentMultiPickerName = ref(""); // 当前弹窗对应的item.name
......@@ -643,6 +668,32 @@ function handleMultiPickerCancel() {
currentMultiPickerName.value = "";
}
const initData = () => {
const contentCfg = JSON.parse(JSON.stringify(pageCfgStore.contentCfg));
contentLikeOptions.value = contentCfg.contentLikeOptions;
productLikeOptions.value = contentCfg.productLikeOptions;
specialAttentionOptions.value = contentCfg.specialAttentionOptions;
channelOptions.value = contentCfg.channelOptions;
// 更新表单项的选项数据
formItems.forEach((item) => {
if (item.name === "contentPreference") {
item.range = contentLikeOptions.value;
} else if (item.name === "productPreference") {
item.range = productLikeOptions.value;
} else if (item.name === "followInfo") {
item.range = specialAttentionOptions.value;
} else if (item.name === "purchaseChannel") {
item.range = channelOptions.value;
}
});
};
onMounted(() => {
initData();
});
onLoad((options) => {
pageType.value = options.type || "add";
babyId.value = options.id || "";
......@@ -779,8 +830,8 @@ watch(
}
.person-avatar-img {
width: 126rpx;
height: 126rpx;
width: 135rpx;
height: 135rpx;
display: block;
}
}
......
<template>
<view class="container">
<image mode="widthFix" class="productimg" :src="$baseUrl + 'brandpage/products/' + productId + '.jpg'"></image>
<image :key="index" v-for="(item,index) in imgList" mode="widthFix" class="productimg" :src="item.imgUrl"></image>
<view class="btnbox">
<image @tap="buyHandler" class="btnbuy" :src="$baseUrl + 'brandpage/btnbuy.png'"></image>
<button class="btnshare" open-type="share" style="background: none; border: none; padding: 0;">
......@@ -14,21 +14,46 @@
export default {
data() {
return {
productId: ''
productId: '',
imgLength:0,
imgList:[],
productId:'',
skuId:'',
contentImg:'',
contentImgLen:'',
shareTitle:'',
shareImg:''
}
},
onLoad(options) {
// options 就是跳转时传递的参数对象
console.log('页面参数:', options);
this.productId = options.id;
const {productId,skuId,contentImg,contentImgLen,shareTitle,shareImg} = options;
this.productId = productId;
this.skuId = skuId;
this.contentImg = contentImg;
this.contentImgLen = contentImgLen;
this.shareTitle = shareTitle;
this.shareImg = this.$baseUrl + shareImg;
console.log("this.shareImg:",this.shareImg);
this.imgList = Array.from({ length: this.contentImgLen }, (_, index) => {
return {
imgUrl: this.$baseUrl + 'brandpage/products/' + contentImg.split('-')[0] + '/'
+ contentImg+'/product_'+contentImg.replace('-','_')+'_'+index + '.jpg'
}
});
console.log(this.imgList);
},
methods: {
buyHandler() {
const _path = `/subPackages/shopMainProcess/product/index?productId=${this.productId}&skuId=${this.skuId}&entrySource=xmh_wechatmp_brand_profamily`
uni.navigateToMiniProgram({
appId: 'wx1234567890abcdef',
path: 'pages/index/index',
envVersion: 'release',
appId: 'wx4205ec55b793245e',
path: _path,
success(res) {
console.log('跳转成功', res)
},
......@@ -37,15 +62,13 @@ export default {
}
})
},
shareHandler() {
}
},
onShareAppMessage() {
return {
title: '商品详情',
path: '/pages/product/product?id=123',
imageUrl: 'https://你的图片链接.jpg'
title: this.shareTitle,
path: '/pages/product/product?id='+this.productId,
imageUrl: this.shareImg
}
},
}
......@@ -56,6 +79,7 @@ export default {
.productimg {
width: 750rpx;
vertical-align: top;
}
.btnbox {
......
......@@ -6,14 +6,14 @@
<view class="flexinput">
<image class="icon_search_yellow" :src="$baseUrl+'searchpage/icon_search_yellow.png'">
</image>
<input confirm-type="search" maxlength="50" class="nav-bar-input" type="text" placeholder="输入搜索关键词"
<input confirm-type="search" maxlength="50" :value="searchValue" class="nav-bar-input" type="text" placeholder="输入搜索关键词"
@confirm="confirm" />
</view>
</view>
</view>
<view class="topbox" :style="`margin-top:${statusBarHeight+10}px`">
<view v-if="step === 1" class="recentbox">
<image class="icon_trash" :src="$baseUrl+'searchpage/icon_trash.png'"></image>
<view v-if="step === 1 && recentTagsList.length > 0" class="recentbox">
<image @tap="historyClearHandler" class="icon_trash" :src="$baseUrl+'searchpage/icon_trash.png'"></image>
<view class="title">最近搜索</view>
<view class="tagbox">
<view @tap="searchHandler(item)" :key="index" v-for="(item,index) in recentTagsList" class="tag">{{item}}</view>
......@@ -29,19 +29,28 @@
<view v-if="step !== 1" class="tabbox">
<van-tabs :color="`#d3a358`" line-width="15px" :active="tabIndex" @click="onTabChange">
<van-tab title="内容" name="a"></van-tab>
<van-tab title="工具" name="b"></van-tab>
<van-tab title="商品" name="c"></van-tab>
<van-tab title="内容" name="content"></van-tab>
<van-tab title="工具" name="tool"></van-tab>
<!-- <van-tab title="商品" name="product"></van-tab> -->
</van-tabs>
</view>
<view v-if="step !== 1" class="cardbox">
<view v-if="step !== 1 && tabIndex==='content'" class="cardbox">
<view class="card" v-for="(item,index) in resultList[tabIndex]" :key="index">
<image class="pic" :src="$baseUrl+item.bgUrl"></image>
<view class="desc">
{{item.desc}}
</view>
<view class="timestr">{{item.timeStr||"2025-06-10"}}</view>
</view>
</view>
<view v-if="step !== 1 && tabIndex==='tool'" class="cardbox">
<view class="card" v-for="(item,index) in resultList[tabIndex]" :key="index">
<image class="pic" :src="$baseUrl+item.bgUrl"></image>
<view class="desc">
{{item.desc}}
</view>
<view class="timestr">{{item.timeStr}}</view>
<view class="timestr">{{item.timeStr||"2025-06-10"}}</view>
</view>
</view>
......@@ -53,153 +62,166 @@
<script>
const recentTagsList=[
"功能营养","母婴","功能营养","母婴","功能营养","母婴","功能营养","母婴","功能营养","母婴"
]
const oftenTagsList=[
"功能营养","母婴","功能营养","母婴","功能营养","母婴","功能营养","母婴","功能营养","母婴"
]
const resultList = [
[
{
bgUrl:"searchpage/test.png",
desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test.png",
desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test.png",
desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test.png",
desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test.png",
desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test.png",
desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test.png",
desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test.png",
desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
timeStr:"2025-03-10",
link:"www.baidu.com"
}
],
[
{
bgUrl:"searchpage/test2.png",
desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test2.png",
desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test2.png",
desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test2.png",
desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test2.png",
desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
],
[
{
bgUrl:"searchpage/test3.png",
desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test3.png",
desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test3.png",
desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test3.png",
desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
{
bgUrl:"searchpage/test3.png",
desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
timeStr:"2025-03-10",
link:"www.baidu.com"
},
]
]
import { historySearch,historyClear,search } from '../../api/search';
// const recentTagsList=[
// "功能营养","母婴","功能营养","母婴","功能营养","母婴","功能营养","母婴","功能营养","母婴"
// ]
const oftenTagsList=["婴幼儿奶粉","权益","奶酪棒","星飞帆经典"]
// const resultList = {
// "content":[
// {
// bgUrl:"searchpage/test.png",
// desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test.png",
// desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test.png",
// desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test.png",
// desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test.png",
// desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test.png",
// desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test.png",
// desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test.png",
// desc:"宝宝出生必做6件事,90 %爸妈漏掉第3条",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// }
// ],
// "tool":[
// {
// bgUrl:"searchpage/test2.png",
// desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test2.png",
// desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test2.png",
// desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test2.png",
// desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test2.png",
// desc:"秋风渐凉,宝宝的免疫力 也进入 “换季挑战期”",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// ],
// "product":[
// {
// bgUrl:"searchpage/test3.png",
// desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test3.png",
// desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test3.png",
// desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test3.png",
// desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// {
// bgUrl:"searchpage/test3.png",
// desc:"3 个 0 成本游戏,让宝宝 越玩越聪明~",
// timeStr:"2025-03-10",
// link:"www.baidu.com"
// },
// ]
// }
export default {
data() {
return {
statusBarHeight: 38,
recentTagsList:recentTagsList,
recentTagsList:[],
oftenTagsList:oftenTagsList,
step:1,
resultList:resultList,
tabIndex:0,
resultList:{'tool':[],'content':[],'product':[]},
tabIndex:'content',
searchValue:''
}
},
mounted() {
const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
this.statusBarHeight = menuButtonInfo.top;
this.initHistorySearch();
},
methods: {
initHistorySearch(){
historySearch().then(res=>{
console.log(res);
this.recentTagsList=res.data || [];
});
},
historyClearHandler(){
historyClear().then(res=>{
console.log(res);
this.recentTagsList=[]
});
},
backHandler() {
uni.navigateBack();
},
onTabChange(evt)
{
this.tabIndex = evt.detail.index;
this.tabIndex = evt.detail.name;
},
confirm(evt){
this.searchHandler(evt.detail.value);
......@@ -209,6 +231,12 @@
this.searchValue=_searchValue;
}
this.step=2;
search({
keyword:this.searchValue
}).then(res=>{
console.log(res);
this.resultList=res.data || {'tool':[],'content':[],'product':[]};
});
}
}
}
......
......@@ -5,20 +5,27 @@
<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import * as CFG from "@/cfg";
let src = ref("");
const PRIVACY_URL = "https://secret.feihe.com/secret.html";
const MEMBER_URL = "https://secret.feihe.com/index.html";
const urlMap = {
PRIVACY_URL,
MEMBER_URL,
};
onLoad((options) => {
let url = "";
if (options.type) {
const type = options.type;
url = CFG[type];
url = urlMap[type];
} else {
url = decodeURIComponent(options.url) || "";
}
src.value = url;
});
</script>
\ No newline at end of file
import {
defineStore
} from 'pinia';
} from 'pinia';
const cuk = uni.getStorageSync('cuk')
export const useGlobalStore = defineStore('global', {
state: () => {
return {
cuk: cuk, // 用户登录后获取的凭证,调用接口时headers中携带
curTabIndex: 0, // 当前Tab索引
};
},
actions: {
......@@ -16,8 +17,15 @@ export const useGlobalStore = defineStore('global', {
* @param {Object} cuk
*/
setCuk(cuk) {
this.cuk = cuk;
this.cuk = cuk;
uni.setStorageSync('cuk', cuk);
},
/**
* 设置当前Tab索引
* @param {number} index
*/
setCurTabIndex(index) {
this.curTabIndex = index;
}
},
});
\ No newline at end of file
import {
defineStore
} from 'pinia';
import {
fetchHomeInfo
} from '../api/home.js';
export const useHomeStore = defineStore('homeInfo', {
state: () => {
return {
homeInfo: null,
isLogin:false,
babyExistence:false
};
},
actions: {
/**
* 更新首页信息
* @param {Object} homeInfo
*/
setHomeInfo(homeInfo) {
this.homeInfo = homeInfo;
if(homeInfo?.memberId === "not_login"){
this.isLogin = false;
}else{
this.isLogin = true;
}
},
setBabyExistence(babyExistence){
console.log('setBabyExistence', babyExistence);
this.babyExistence = !babyExistence;
},
/**
* 获取首页信息
*/
async loadHomeInfo() {
const {
data
} = await fetchHomeInfo();
console.log('loadHomeInfo', data);
if(data){
this.setHomeInfo(data);
}
},
},
});
\ No newline at end of file
import { defineStore } from "pinia";
import { JumpType } from "@/utils";
import { WHEEL_OPTIONS_YL, WHEEL_OPTIONS_YZ } from "@/cfg";
import { myObj } from "../mock/my";
import { fetchUserJSON } from "@/api/user";
export const usePageCfgStore = defineStore("pageCfg", {
state: () => {
return {
toolList: [
{
icon: "my/literature.png",
title: "育儿百科",
url: "https://secret.feihe.com/secret.html",
jumpType: JumpType.H5,
},
{
icon: "my/suyuan.png",
title: "产品溯源",
url: "",
jumpType: JumpType.H5,
},
{
icon: "my/book.png",
title: "奶娃宝典",
url: "",
jumpType: JumpType.INNER,
},
{
icon: "my/doctor.png",
title: "医生问诊",
url: "",
jumpType: JumpType.MINI,
checkRegister: true,
},
{
icon: "my/babytest.png",
title: "宝宝体质测试",
url: "",
jumpType: JumpType.H5,
},
],
conetntCfg: {
wheelOptionsYL: WHEEL_OPTIONS_YL || [],
wheelOptionsYZ: WHEEL_OPTIONS_YZ || [],
contentLikeOptions: [
"奶粉选择",
"奶粉成分",
"奶粉冲泡",
"宝宝奶量",
"生长发育",
"常见疾病",
"体检疫苗",
"饮食营养补充",
"辅食营养",
"亲子关系",
"早教游戏",
],
productLikeOptions: [
"飞鹤星飞帆",
"星飞帆卓睿",
"星飞帆卓耀",
"星飞帆卓初",
"星飞帆臻稚卓蓓",
"星飞帆淳芮有机",
],
specialAttentionOptions: ["过敏", "长肉", "肠道", "消化", "脑发育"],
channelOptions: ["电商(京东/天猫)", "母婴店"],
toolList: [],
wheelOptionsYL: [],
wheelOptionsYZ: [],
contentCfg: {
contentLikeOptions: [],
productLikeOptions: [],
specialAttentionOptions: [],
channelOptions: [],
},
};
},
actions: {
/**
* 设置用户cuk
* @param {Object} cuk
*/
setCuk(cuk) {
this.cuk = cuk;
uni.setStorageSync("cuk", cuk);
async fetchCfg() {
const { data } = await fetchUserJSON();
if (!data) return;
this.toolList = data?.tool?.[0] || [];
this.contentCfg = data.contentCfg;
this.wheelOptionsYL = data.wheelOptionsYL;
this.wheelOptionsYZ = data.wheelOptionsYZ;
},
},
});
......@@ -10,6 +10,7 @@ import {
} from "../api/user.js";
import { useGlobalStore } from "./global.js";
import { showLoading, hideLoading } from "../utils/index.js";
import { useHomeStore } from "./home.js";
const globalStore = useGlobalStore();
......@@ -44,14 +45,11 @@ export const useUserStore = defineStore("userInfo", {
async changeBabySelected(babyId) {
// 更新选中状态
showLoading();
const { data } = await fetchBabyInfoById(babyId);
console.log("babyInfo", data);
if (data?.memberId !== "not_login") {
this.babyInfo = data;
}
hideLoading();
},
saveBabyInfo(babyInfo) {
......@@ -70,12 +68,15 @@ export const useUserStore = defineStore("userInfo", {
// console.log('wxAutoLogin', res);
if (res.errMsg === "login:ok") {
// 用户手机授权
await fetchAutoPhone({
const { data: babyExistence } = await fetchAutoPhone({
phoneEncryptedData: data.encryptedData,
phoneIv: data.iv,
code: data.code,
codeLogin: res.code,
});
const homeStore = useHomeStore();
await homeStore.setBabyExistence(babyExistence);
// 授权注册成功后做一次登录
this.wxAutoLogin();
} else {
......@@ -109,19 +110,26 @@ export const useUserStore = defineStore("userInfo", {
this.babyInfo = data;
}
},
/**
* 获取用户积分信息
*/
async loadMemberInfo() {
const { data } = await fetchMemberInfo();
console.log("fetchMemberInfo=", data);
this.setMemberInfo(data);
// this.memberInfo = data;
// if (data?.memberId !== "not_login") {
// this.babyInfo = data;
// }
},
/**
* 获取用户积分信息
*/
async loadMemberInfo() {
const { data } = await fetchMemberInfo();
console.log("fetchMemberInfo=", data);
this.setMemberInfo(data);
// this.memberInfo = data;
// if (data?.memberId !== "not_login") {
// this.babyInfo = data;
// }
},
* 获取宝宝信息
*/
async loadHomeInfo() {
const homeStore = useHomeStore();
await homeStore.loadHomeInfo();
},
/**
* wx.login 获取code后,调用此方法完成登录
......@@ -134,8 +142,9 @@ export const useUserStore = defineStore("userInfo", {
if (data && data.cuk) {
globalStore.setCuk(data.cuk);
this.loadUserInfo();
this.loadBabyInfo();
await this.loadUserInfo();
await this.loadBabyInfo();
await this.loadHomeInfo();
}
},
......
......@@ -6,7 +6,8 @@
:indicator-color="indicatorColor" :indicator-active-color="indicatoractiveColor">
<swiper-item v-for="item in swiperList" :key="item.url">
<view class="swiper-item banneritem">
<image :data-link="item.link" @tap="jumpLink(item.link)" class="b-img" :src="$baseUrl + item.url">
<image :data-link="item.link" @tap="jumpLink(item.link,item.videoUrl)" class="b-img"
:src="$baseUrl + item.url">
</image>
</view>
</swiper-item>
......@@ -20,7 +21,7 @@
</view>
</view>
<view class="videoposterbox">
<image class="videoposter" :src="$baseUrl + 'brandpage/videoposter.png'"></image>
<image @tap="showVideoHandler" class="videoposter" :src="$baseUrl + 'brandpage/videoposter.png'"></image>
</view>
<view class="productcontai">
<text class="maintitle">飞鹤产品家族</text>
......@@ -31,9 +32,9 @@
{{ item }}
</view>
</view>
<view class="productbox">
<view v-if="productInfoList.length > 0" class="productbox">
<view class="infobox" :key="index" v-for="(infoItem, index) in productInfoList[channelTabIndex]"
@tap="jumpLink(infoItem.link)">
@tap="jumpProduct(infoItem)">
<view class="flexbox">
<view class="infotitle">
{{ infoItem.title }}
......@@ -79,7 +80,7 @@
</view>
</view>
</view>
<view class="esgbox">
<view v-if="esgInfoList.length > 0" class="esgbox">
<text class="maintitle">飞鹤ESG</text>
<text class="subtitle">关注祖国下一代的营养、教育和陪伴</text>
<view class="channelscroll">
......@@ -101,7 +102,7 @@
<!-- 普通弹窗 -->
<uni-popup :is-mask-click="false" :safe-area="false" ref="popup" background-color="#fff"
border-radius="48rpx">
<view v-if="this.popupIndex < 2" class="popup-content">
<view v-if="this.popupIndex < 2 && this.qrInfoList.length > 0" class="popup-content">
<image class="btnclose" @tap="closePop" :src="$baseUrl + 'homepage/btnclose.png'"></image>
<view class="title">
{{ this.qrInfoList[this.popupIndex].title }}
......@@ -119,263 +120,24 @@
</view>
</uni-popup>
</view>
<view v-if="showVideo" class="video-popup">
<video :src="currentVideoUrl" controls autoplay style="width: 100vw; height: 56vw;"></video>
<view class="close-btn-bottom" @tap="closeVideo">×</view>
</view>
</view>
</template>
<script>
const swiperList = [{
url: 'brandpage/Banner1.jpg',
link: 'www.baidu.com'
},
{
url: 'brandpage/Banner2.jpg',
link: 'www.baidu.com'
},
{
url: 'brandpage/Banner3.jpg',
link: 'www.baidu.com'
},
];
const swiperIconList = [{
baseUrl: "brandpage/corn1.png",
activeUrl: "brandpage/corn2.png"
},
{
baseUrl: "brandpage/cattle1.png",
activeUrl: "brandpage/cattle2.png"
},
{
baseUrl: "brandpage/factory1.png",
activeUrl: "brandpage/factory2.png"
}
];
const productTabList = ["全部", "母婴全阶", "功能营养", "儿童产品", "北纬47°"];
const productInfoList = [
[{
bgUrl: "brandpage/pic_0_1.png",
title: "超凡 吸收",
desc: "星飞帆经典 3段",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_0_2.png",
title: "顶配 脑育",
desc: "星飞帆卓睿 3段",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_0_3.png",
title: "亲和 自护",
desc: "星飞帆卓耀 3段",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_0_4.png",
title: " 4维 效力",
desc: "爱本跃动蛋白营养粉",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_0_5.png",
title: "高钙 爆脆",
desc: "高钙奶酪泡芙脆",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_0_6.png",
title: "软糯 Q弹",
desc: "北纬47度黄糯玉米",
link: "www.baidu.com"
},
],
[{
bgUrl: "brandpage/pic_1_1.png",
title: "超凡 吸收",
desc: "星飞帆经典 3段",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_1_2.png",
title: "顶配 脑育",
desc: "星飞帆卓睿 3段",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_1_3.png",
title: "亲和 自护",
desc: "星飞帆卓耀 3段",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_1_4.png",
title: "顶配 A 2",
desc: "星飞帆卓睿A2奶源",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_1_5.png",
title: "活性 有机",
desc: "臻稚卓蓓 3段",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_1_6.png",
title: "高端 乳铁",
desc: "臻爱倍护 3段",
link: "www.baidu.com"
},
],
[{
bgUrl: "brandpage/pic_2_1.png",
title: " 4维 效力",
desc: "爱本跃动蛋白营养粉",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_2_2.png",
title: "初乳 精华",
desc: "爱本牛初乳",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_2_3.png",
title: "每日 蛋白",
desc: "爱本每日蛋白营养糊",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_2_4.png",
title: "腰腹 燃脂",
desc: "爱本纤纤益生菌\n羽衣甘蓝蛋白粉",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_2_5.png",
title: "药食 同源",
desc: "爱本参芝初乳肽",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_2_6.png",
title: "一夜 天亮",
desc: "爱本悦眠功能粉",
link: "www.baidu.com"
},
],
[{
bgUrl: "brandpage/pic_3_1.png",
title: "高钙 高纤",
desc: "爱上吃菜乳酪",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_3_2.png",
title: "高钙 爆脆",
desc: "高钙奶酪泡芙脆",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_3_3.png",
title: "醇香 黑巧",
desc: "高纤黑巧乳酪",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_3_4.png",
title: "10倍 奶钙",
desc: "超新星水果奶酪",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_3_5.png",
title: "浓郁 爆浆",
desc: "厚切流心芝士片",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_3_6.png",
title: "洁净 配方",
desc: "嚼奶粉乳酪",
link: "www.baidu.com"
},
],
[{
bgUrl: "brandpage/pic_4_1.png",
title: "含有 叶酸",
desc: "北纬47度白甜糯玉米",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_4_2.png",
title: "软糯 Q弹",
desc: "北纬47度黄糯玉米",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_4_3.png",
title: "开袋 即食",
desc: "北纬47度低GI水果玉米粒袋装",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_4_4.png",
title: "秘制 工艺",
desc: "北纬47度东北烧烤味玉米段",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_4_5.png",
title: "0乳糖 低GI",
desc: "N47°植物酵素乳",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/pic_4_6.png",
title: "轻卡 低GI",
desc: "N47°水果玉米汁",
link: "www.baidu.com"
},
]
]
const ipDesc = "鹤小飞一家是由鹤爸、鹤妈、鹤小飞(哥哥)、鹤小小(妹妹) 组成的一家。\n四口热爱生活、积极向上,是他们一家对生活的态度。"
const esgInfoList = [{
bgUrl: "brandpage/esg1.png",
title: "中国飞鹤发布2024年ESG报告",
desc: "飞鹤践行低碳节能,打造绿色产业链;承担 龙头责任,引领行业创新发展;履行社会责 任,构建共富共享生态。",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/esg2.png",
title: "12亿元生育补贴计划",
desc: "中国飞鹤于2025年4月初在全国范围内启动 总规模为12亿元,为符合条件的孕期家庭提 供不少于1500元生育补贴的飞鹤生育补贴",
link: "www.baidu.com"
},
{
bgUrl: "brandpage/esg3.png",
title: "教育公益",
desc: "百年大计,教育为本;教育大计,教师为本。 近三年来,飞鹤已投入超过6500万元开展专 项助教活动,惠及在职专任教师超过28万人",
link: "www.baidu.com"
}
]
const qrInfoList = [{
title: "视频号",
desc: "扫码关注<span style='color:#D3A358;'>鹤小飞一家</span>视频号,看超多有爱的趣味故事",
qrUrl: "brandpage/qrhxf_sph.png"
},
{
title: "微信小店",
desc: "扫码进入<span style='color:#D3A358;'>鹤小飞一家</span>店铺,挑选精美限量周边",
qrUrl: "brandpage/qrhxf_wxxd.png"
}
]
import { brandObj } from '../mock/brand';
import { fetchBrandJSON } from '../api/brand';
import { jump, JumpType } from '../utils';
export default {
data() {
return {
popType: 'bottom',
swiperList: swiperList,
swiperList: [],
indicatorDots: false,
autoplay: true,
interval: 4000,
......@@ -383,20 +145,44 @@ export default {
indicatoractiveColor: "#a6a0a1",
indicatorColor: "rgba(255, 255, 255, 1)",
channelTabIndex: 0,
productTabList: productTabList,
productInfoList: productInfoList,
swiperIconList: swiperIconList,
productTabList: [],
productInfoList: [],
swiperIconList: [],
swiperIndex: 0,
ipDesc: ipDesc,
esgInfoList: esgInfoList,
qrInfoList: qrInfoList,
ipDesc: '',
esgInfoList: [],
qrInfoList: [],
popupIndex: 0,
showVideo:false
}
},
mounted() {
// this.swiperList = brandObj.swiperList;
// this.productTabList = brandObj.productTabList;
// this.productInfoList = brandObj.productInfoList;
// this.esgInfoList = brandObj.esgInfoList;
// this.qrInfoList = brandObj.qrInfoList;
// this.ipDesc = brandObj.ipDesc;
// this.swiperIconList = brandObj.swiperIconList;
// this.currentVideoUrl=brandObj.videoUrl;
this.initBrandInfo();
},
methods: {
async initBrandInfo(){
const {data} = await fetchBrandJSON();
if(data){
this.swiperList = data.swiperList;
this.productTabList = data.productTabList;
this.productInfoList = data.product;
this.esgInfoList = data.esgInfoList;
this.qrInfoList = data.qrInfoList;
this.ipDesc = data.ipDesc;
this.swiperIconList = data.swiperIconList;
this.currentVideoUrl=data.videoUrl;
}
},
intervalChange(e) {
this.swiperIndex = e.target.current;
},
......@@ -404,10 +190,26 @@ export default {
this.swiperIndex = _index;
},
jumpLink(_link) {
jumpLink(_link,videoUrl) {
// console.log(_link)
// uni.navigateTo({
// url: "/pages/product/product?id=1-1"
// })
if (videoUrl) {
// 弹出视频
this.currentVideoUrl = videoUrl;
this.showVideo = true;
return;
// 视频弹窗出现后,video标签的autoplay会自动播放
} else if (link) {
// 其他跳转逻辑
jump(link);
}
},
jumpProduct(item){
const {productId,skuId,contentImg,contentImgLen,shareTitle,shareImg} = item;
uni.navigateTo({
url: "/pages/product/product?id=1-1"
url: "/pages/product/product?productId="+productId+"&skuId="+skuId+"&contentImg="+contentImg+"&contentImgLen="+contentImgLen+"&shareTitle="+shareTitle+"&shareImg="+shareImg
})
},
channelTabHandler(_index) {
......@@ -421,40 +223,47 @@ export default {
this.$refs.popup.close();
},
downloadHandler(imgurl) {
uni.downloadFile({
url: imgurl,
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: downloadRes.tempFilePath,
success: (res) => {
uni.showToast({
title: '保存成功',
icon: 'success'
});
},
fail: (err) => {
uni.showToast({
title: '保存失败',
icon: 'none'
});
}
});
} else {
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
},
fail: (err) => {
uni.downloadFile({
url: imgurl,
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: downloadRes.tempFilePath,
success: (res) => {
uni.showToast({
title: '保存成功',
icon: 'success'
});
},
fail: (err) => {
uni.showToast({
title: '保存失败',
icon: 'none'
});
}
});
} else {
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
});
}
},
fail: (err) => {
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
});
},
showVideoHandler(){
this.showVideo = true;
},
closeVideo() {
this.showVideo = false;
this.currentVideoUrl = '';
},
}
}
</script>
......@@ -787,65 +596,95 @@ export default {
}
}
.popup-content {
width: 750rpx;
height: 812rpx;
border-top-left-radius: 48rpx;
border-top-right-radius: 48rpx;
position: relative;
.btnclose {
width: 70rpx;
height: 70rpx;
position: absolute;
top: 36rpx;
right: 32rpx;
}
.popup-content {
width: 750rpx;
height: 812rpx;
border-top-left-radius: 48rpx;
border-top-right-radius: 48rpx;
position: relative;
.btnclose {
width: 70rpx;
height: 70rpx;
position: absolute;
top: 36rpx;
right: 32rpx;
}
.xingmahui {
width: 750rpx;
height: 100%;
position: absolute;
bottom: 0;
}
.xingmahui {
width: 750rpx;
height: 100%;
position: absolute;
bottom: 0;
}
.title {
position: absolute;
top: 47rpx;
left: 32rpx;
font-size: 36rpx;
color: @color-black-deep;
font-weight: bold;
.title {
position: absolute;
top: 47rpx;
left: 32rpx;
font-size: 36rpx;
color: @color-black-deep;
font-weight: bold;
}
}
.desc {
position: absolute;
top: 108rpx;
left: 32rpx;
font-size: 28rpx;
color: @color-black-medium;
font-weight: bold;
.desc {
position: absolute;
top: 108rpx;
left: 32rpx;
font-size: 28rpx;
color: @color-black-medium;
font-weight: bold;
}
}
.qrcode {
width: 340rpx;
height: 340rpx;
position: absolute;
top: 220rpx;
left: 205rpx;
}
.qrcode {
width: 340rpx;
height: 340rpx;
position: absolute;
top: 220rpx;
left: 205rpx;
}
.btndownload {
width: 286rpx;
height: 89rpx;
position: absolute;
top: 630rpx;
left: 232rpx;
}
.btndownload {
width: 286rpx;
height: 89rpx;
position: absolute;
top: 630rpx;
left: 232rpx;
}
}
.video-popup {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 9999;
}
.close-btn-bottom {
margin: 32rpx auto 0 auto;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: rgba(0, 0, 0, 0.5);
color: #fff;
font-size: 44rpx;
line-height: 64rpx;
text-align: center;
z-index: 10001;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
\ No newline at end of file
<template>
<view class="home-container">
<view class="content">
<view class="content">
<swiper class="swiper banner" circular :indicator-dots="indicatorDots" :autoplay="autoplay"
:interval="interval" :duration="duration" :indicator-color="indicatorColor"
:indicator-active-color="indicatoractiveColor">
<swiper-item v-for="item in swiperList" :key="item.url">
<view class="swiper-item banneritem">
<image :data-link="item.link" @tap="jumpLink(item.link)" class="b-img" :src="$baseUrl + item.url">
<image :data-link="item.link" @tap="jumpBannerHandler(item)" class="b-img"
:src="$baseUrl + item.url">
</image>
</view>
</swiper-item>
......@@ -15,7 +16,12 @@
<image class="btnlogo" :src="$baseUrl + 'homepage/btnlogo.png'"></image>
<image class="btnsearch" @tap="goSearchHandler" :src="$baseUrl + 'homepage/btnsearch.png'">
</image>
<image class="btncustomer" :src="$baseUrl + 'homepage/btncustomer.png'"></image>
<view class="customer-btn-wrap">
<image @tap="goCustomerHandler" class="btncustomer" :src="$baseUrl + 'homepage/btncustomer.png'">
</image>
<button v-if="homeStore && !homeStore.isLogin" open-type="getPhoneNumber"
@getphonenumber="onGetPhoneNumber" class="phone-auth-btn-cover"></button>
</view>
</view>
<view class="txtbox">
<text class="txtlink">星妈会医生在线答疑群,为孩子成长保驾护航</text>
......@@ -31,10 +37,14 @@
{{ cardData.showCornerTxt }}
</view>
<view v-if="cardData.btnTitle && cardData.btnTitle.length > 0" class="cardbtn"
:data-link="cardData.link" @tap="jumpLink(cardData.link)">
:data-link="cardData.link" @tap="jumpLinkWithLogin(cardData.link)">
<image class="cardbtnbg" :src="$baseUrl + 'homepage/btn_receive.png'"></image>
<text class="btnTitle">{{ cardData.btnTitle }}</text>
<text class="btnTitle" :style="cardData.btnTitle.length > 7 ? 'font-size:22rpx;' : ''">{{
cardData.btnTitle }}</text>
<text class="btnSubTitle">{{ cardData.btnSubTitle }}</text>
<button v-if="homeStore && !homeStore.isLogin" open-type="getPhoneNumber"
@getphonenumber="onGetPhoneNumber" class="phone-auth-btn-cover"></button>
</view>
</view>
</view>
......@@ -43,7 +53,7 @@
<image class="contentbg" :src="$baseUrl + 'homepage/contentbg.png'" alt="" />
<image class="contentitem" :key="index" :style="contentItem._style"
v-for="(contentItem, index) in contentImgList" :src="$baseUrl + contentItem.bgUrl"
@tap="jumpLink(contentItem.link)"></image>
@tap="jumpLink(contentItem.link, contentItem.videoUrl)"></image>
</view>
<view class="channelbox">
<text class="maintitle">有声频道</text>
......@@ -92,8 +102,8 @@
<view class="bottomlink">
<image class="bottombg" :src="$baseUrl + 'homepage/bottombg.png'"></image>
<view class="box">
<image class="icon" v-for="(icon, index) in bottomLinkList" :key="index" :src="$baseUrl + icon.bgUrl"
:style="icon._style" @tap="showPopup(index)"></image>
<image class="icon" v-for="(icon, index) in bottomLinkList" :key="index"
:src="$baseUrl + icon.bgUrl" :style="icon._style" @tap="showPopup(index)"></image>
</view>
</view>
</view>
......@@ -119,24 +129,31 @@
</view>
</uni-popup>
</view>
<view v-if="showVideo" class="video-popup">
<video :src="currentVideoUrl" controls autoplay style="width: 100vw; height: 56vw;"></video>
<view class="close-btn-bottom" @tap="closeVideo">×</view>
</view>
<RegisterLayer v-model="showRegisterLayer" />
</view>
</template>
<script>
import { jump,JumpType } from '../utils';
import { jump, JumpType } from '../utils';
import { homeObj } from '../mock/home';
import { useHomeStore } from '../stores/home';
import { fetchHomeJSON } from '../api/home';
import { useUserStore } from '../stores/user';
import RegisterLayer from "../components/RegisterLayer.vue";
// const homeStore = useHomeStore();
const userStore = useUserStore();
export default {
data() {
return {
loading: true,
popType: 'bottom',
statusBarHeight: 38,
showRegisterLayer:false,
swiperList: [],
indicatorDots: true,
autoplay: true,
......@@ -144,7 +161,7 @@ export default {
duration: 500,
indicatoractiveColor: "#a6a0a1",
indicatorColor: "rgba(255, 255, 255, 1)",
vipCardList:[],
vipCardList: [],
contentImgList: [],
channelTabList: [],
channelTabIndex: 0,
......@@ -153,26 +170,65 @@ export default {
bottomLinkList: [],
qrInfoObj: undefined,
popupIndex: 0,
qrInfoList: [{ title: '', desc: '', qrUrl: '' }],
qrInfoList: [{ title: '', desc: '', qrUrl: '' }],
showVideo: false,
currentVideoUrl: '',
isClickPhoneAuth:false
}
},
components:{
RegisterLayer
},
computed: {
homeStore() {
return useHomeStore();
}
},
mounted() {
const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
this.statusBarHeight = menuButtonInfo.top;
this.swiperList = homeObj.swiperList;
this.vipCardList = homeObj.vipCardList;
this.contentImgList = homeObj.contentImgList;
this.channelTabList = homeObj.channelTabList;
this.changelInfoList = homeObj.changelInfoList;
this.childrenInfoList = homeObj.childrenInfoList;
this.bottomLinkList = homeObj.bottomLinkList;
this.qrInfoList = homeObj.qrInfoList;
this.loading = false;
console.log(homeObj);
this.isClickPhoneAuth = false;
this.initHomeInfo();
},
watch: {
homeStore:{
handler(newVal){
this.showRegisterLayer =this.isClickPhoneAuth &&newVal.isLogin && !newVal.babyExistence;
},
deep:true,
immediate: true
}
},
methods: {
async initHomeInfo() {
await this.homeStore.loadHomeInfo();
const { data } = await fetchHomeJSON();
if (data) {
this.swiperList = data.swiperList;
this.vipConfigList = data.vipConfigList;
// this.vipCardList = data.vipCardList;
this.contentImgList = data.contentImgList;
this.channelTabList = data.channelTabList;
this.changelInfoList = data.changelInfoList;
this.childrenInfoList = data.childrenInfoList;
this.bottomLinkList = data.bottomLinkList;
this.qrInfoList = data.qrInfoList;
this.vipCardList = data.vipCardList;
if (this.homeStore.isLogin) {
this.vipCardList[0] = data.vipConfigList.find(item => item.grade === this.homeStore.homeInfo?.grade);
this.vipCardList[0].level = this.homeStore.homeInfo?.gradeName;
} else {
this.vipCardList[0] = data.vipConfigList[0];
}
}
},
changeIndicatorDots(e) {
this.indicatorDots = !this.indicatorDots
},
......@@ -185,9 +241,34 @@ export default {
durationChange(e) {
this.duration = e.target.value
},
jumpLink(_link) {
console.log(_link);
jump(_link);
jumpBannerHandler(item) {
if (item.link) {
// 有 link,执行跳转
jump(item.link);
} else {
// 没有 link,预览图片
uni.previewImage({
urls: [this.$baseUrl + item.url], // 预览当前图片
current: this.$baseUrl + item.url // 当前显示的图片
});
}
},
jumpLinkWithLogin(link) {
if (this.homeStore.isLogin) {
jump(link);
}
},
jumpLink(link, videoUrl) {
if (videoUrl) {
// 弹出视频
this.currentVideoUrl = videoUrl;
this.showVideo = true;
return;
// 视频弹窗出现后,video标签的autoplay会自动播放
} else if (link) {
// 其他跳转逻辑
jump(link);
}
},
channelTabHandler(_index) {
this.channelTabIndex = _index;
......@@ -239,6 +320,28 @@ export default {
});
}
});
},
closeVideo() {
this.showVideo = false;
this.currentVideoUrl = '';
},
onGetPhoneNumber(e) {
if (e.detail.errMsg !== 'getPhoneNumber:ok') {
uni.showToast({
title: '请授权使用手机号',
icon: 'none',
});
return;
}
console.log('detail', e.detail);
this.isClickPhoneAuth = true;
userStore.phoneCallback(e.detail);
},
goCustomerHandler() {
const { memberId, mobile, openId, unionId } = this.homeStore.homeInfo;
const customerUrl = `https://intelcc-user.icsoc.net/?channelKey=45839e0505554f8c8aea3c7b6259b049&init=1&crmld=${memberId}&mobile=${mobile}&openId=${openId}&unionId=${unionId}`;
jump({ type: JumpType.H5, url: customerUrl });
}
}
}
......@@ -286,11 +389,33 @@ export default {
margin-left: 20rpx;
}
.customer-btn-wrap {
position: relative;
display: inline-block;
}
.btncustomer {
width: 70rpx;
height: 68rpx;
margin-left: 110rpx;
}
.phone-auth-btn-cover {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
background: transparent;
opacity: 0;
border: none;
padding: 0;
margin: 0;
z-index: 10;
pointer-events: auto;
}
}
.txtbox {
......@@ -372,6 +497,18 @@ export default {
left: 6rpx;
top: 130rpx;
.phone-auth-btn-cover {
position: absolute;
width: 368rpx;
height: 88rpx;
z-index: 0;
left: 0;
top: 0;
opacity: 0;
pointer-events: auto;
}
.cardbtnbg {
position: absolute;
width: 368rpx;
......@@ -614,5 +751,74 @@ export default {
left: 232rpx;
}
}
.video-popup {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 9999;
}
.close-btn-bottom {
margin: 32rpx auto 0 auto;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: rgba(0, 0, 0, 0.5);
color: #fff;
font-size: 44rpx;
line-height: 64rpx;
text-align: center;
z-index: 10001;
display: flex;
align-items: center;
justify-content: center;
}
.phone-auth-mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
}
.phone-auth-popup {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: #fff;
border-radius: 16rpx;
padding: 40rpx 32rpx;
z-index: 1001;
display: flex;
flex-direction: column;
align-items: center;
}
.phone-auth-btn {
background: #ffd700;
color: #333;
font-size: 32rpx;
border-radius: 8rpx;
padding: 20rpx 60rpx;
margin-bottom: 20rpx;
}
.close-btn {
font-size: 40rpx;
color: #999;
margin-top: 10rpx;
}
}
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
:src="
babyInfo?.content?.backgroundImg || $baseUrl + 'my/cover_white_bg.png'
"
mode="aspectFit"
mode="widthFix"
lazy-load="false"
binderror=""
bindload=""
......@@ -44,7 +44,7 @@
babyInfo?.content?.babyAvatar ||
$baseUrl + 'common/default_avatar.png'
"
mode="aspectFill"
mode="widthFix"
/>
</view>
<image
......@@ -128,11 +128,11 @@
>
<image
class="tool-icon"
:src="$baseUrl + item.icon"
:src="$baseUrl + item.bgUrl"
mode="aspectFit"
/>
<button
v-if="item.checkRegister && !cfgStatus.isRegister"
v-if="item.title == '医生问诊' && !cfgStatus.isRegister"
class="tool-btn-register"
type="primary"
open-type="getPhoneNumber"
......@@ -161,6 +161,8 @@ import { useUserStore } from "@/stores/user";
import { usePageCfgStore } from "@/stores/pageCfg";
import { jump, JumpType } from "@/utils";
import { getHealthField } from "@/api/common";
import { hideLoading, showLoading } from "../utils";
const { proxy } = getCurrentInstance();
const $baseUrl = proxy.$baseUrl;
......@@ -176,7 +178,7 @@ const cfgStatus = ref({
const wheelOptions = ref([]);
const wheelSelectedIndex = ref(0);
const toolList = computed(() => pageCfgStore?.toolList);
const toolList = computed(() => pageCfgStore?.toolList || []);
const babyInfo = computed(() => userStore?.babyInfo || {});
......@@ -242,7 +244,7 @@ const handleToolClick = async (item) => {
},
});
} else {
jump({ type: item.jumpType, url: item.url });
jump({ type: item.link.type, url: item.link.url });
}
};
......@@ -289,8 +291,8 @@ const initData = async () => {
if (__showDetail) {
wheelOptions.value =
babyInfo.value.babyStage == 2
? pageCfgStore.conetntCfg.wheelOptionsYL
: pageCfgStore.conetntCfg.wheelOptionsYZ;
? pageCfgStore.wheelOptionsYL
: pageCfgStore.wheelOptionsYZ;
const index = wheelOptions.value.findIndex(
(item) => item.label == babyInfo.value.babyAge
);
......@@ -320,12 +322,14 @@ const handleChangeBaby = () => {
showBabySwitcher.value = true;
};
function onSelectBaby(baby) {
async function onSelectBaby(baby) {
// 处理宝宝切换逻辑
showBabySwitcher.value = false;
userStore.changeBabySelected(baby.id);
showLoading();
await userStore.changeBabySelected(baby.id);
hideLoading();
console.log("onSelectBaby", baby);
}
......@@ -336,9 +340,11 @@ function onAddBaby() {
}
// 页面加载
onMounted(() => {
console.log("onMounted");
onMounted(async () => {
showLoading();
await pageCfgStore.fetchCfg();
initData();
hideLoading();
});
watch([() => userStore.userInfo, () => userStore.babyInfo], () => {
......
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