Commit aa864465 authored by 张九刚's avatar 张九刚

chore: remove tracked .DS_Store files, update .gitignore, conclude merge

parents bb458366 f6646fad
File deleted
...@@ -2,3 +2,4 @@ unpackage/ ...@@ -2,3 +2,4 @@ unpackage/
dist/ dist/
static/ static/
node_modules/ node_modules/
.DS_Store
\ No newline at end of file
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
"desc" : "请允许获取位置信息,用于提供附近服务" "desc" : "请允许获取位置信息,用于提供附近服务"
} }
}, },
"requiredBackgroundModes": ["share"] "requiredBackgroundModes" : [ "share" ]
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true
......
...@@ -604,10 +604,110 @@ ...@@ -604,10 +604,110 @@
"type": 1, "type": 1,
"url": "/pages/library/ContentLibrary" "url": "/pages/library/ContentLibrary"
}, },
<<<<<<< HEAD
"bgUrl": "homepage/cardbg3.png" "bgUrl": "homepage/cardbg3.png"
} }
], ],
"qrInfoList": [ "qrInfoList": [
=======
"context": "一键更新喂养记录",
"type": 1,
"title": "喂养工具"
},
{
"icon": "homepage/tool_icon_3.png",
"link": {
"extra": {},
"type": 1,
"url": "/pages/postnatalCheckUp/postnatalCheckUp"
},
"context": "孕周检查准时告知",
"type": 1,
"title": "产检提醒"
},
{
"icon": "homepage/tool_icon_4.png",
"link": {
"extra": {},
"type": 1,
"url": "/pages/shengzhangTools/shengzhangTools"
},
"context": "发育偏离预警早报",
"type": 1,
"title": "宝宝生长测评"
},
{
"icon": "homepage/tool_icon_5.png",
"link": {
"extra": {},
"type": 3,
"url": "https://ali.xudankeji.com/play/rCeXjMai"
},
"context": "测体质选奶粉",
"type": 1,
"title": "体质测试"
}
],
"bgUrl": "homepage/toolBg.png"
},
"suggest": {
"link": {
"type": 3,
"url": "https://mom.feihe.com/expertsView?from=home"
}
},
"channelTabList": [
"凯叔讲故事",
"品格培养",
"知识科普",
"睡眠作息",
"宝贝喂养"
],
"popupImageObj": {
"jumpType": 1,
"imageUrl": "homepage/popImg/popBgImg2.jpg",
"jumpExtra": {},
"jumpUrl": "/pages/syWebview/syWebview?p=xmh11"
},
"voiceStory": {
"link": {
"type": 3,
"url": "https://mom.feihe.com/babyWikipedia?from=song&sourceFrom=moreTools&source=moreTools&num=1&bir=2024-05-23&monthAge=12&month=null"
}
},
"channelTabListMianTitle": "有声频道",
"swiperList": [
{
"img": "homepage/homeSwiper/V1/7.jpg",
"link": {
"extra": {},
"type": 1,
"url": "/pages/syWebview/syWebview?p=xmh09"
},
"type": 1,
"url": "homepage/homeSwiper/V1/7.jpg"
},
{
"videoUrl": "homepage/homeSwiper/V1/2.m4v",
"link": {},
"url": "homepage/homeSwiper/V1/2.png"
},
{
"img": "homepage/homeSwiper/V1/28会员日.jpg",
"link": {
"extra": {
"envVersion": "release",
"appId": "wx4205ec55b793245e"
},
"type": 2,
"url": "/subPackages/shopMainList/topicNew/index?id=1001087"
},
"url": "homepage/homeSwiper/V1/28会员日.jpg"
}
],
"childrenInfoList": [
[
>>>>>>> master
{ {
"qrUrl": "homepage/qrcode_gzh.png", "qrUrl": "homepage/qrcode_gzh.png",
"title": "公众号", "title": "公众号",
......
{ {
"name": "20250528_FHQ1",
"lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "lockfileVersion": 1,
"": {
"dependencies": { "dependencies": {
"crypto-js": "^4.2.0" "crypto-js": {
}
},
"node_modules/crypto-js": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz", "resolved": "http://npm.dui88.com:80/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
} }
} }
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
}" }"
> >
<text class="form-label"> <text class="form-label">
{{getlabelFn(item)}} {{ getlabelFn(item) }}
<!-- {{ item.label }} --> <!-- {{ item.label }} -->
<text v-if="item.required" class="required">*</text> <text v-if="item.required" class="required">*</text>
</text> </text>
...@@ -232,7 +232,7 @@ import { showLoading, hideLoading } from "../../utils/index.js"; ...@@ -232,7 +232,7 @@ import { showLoading, hideLoading } from "../../utils/index.js";
import { updateBabyInfo, getGestationalWeeks } from "../../api/user.js"; import { updateBabyInfo, getGestationalWeeks } from "../../api/user.js";
import { usePageCfgStore } from "../../stores/pageCfg"; import { usePageCfgStore } from "../../stores/pageCfg";
import md from "../../md.js"; import md from "../../md.js";
import { jump, JumpType } from '../../utils/index.js'; import { jump, JumpType } from "../../utils/index.js";
const userStore = useUserStore(); const userStore = useUserStore();
const pageType = ref("add"); const pageType = ref("add");
const babyId = ref(""); const babyId = ref("");
...@@ -511,6 +511,13 @@ const onPickerChange = (e, name) => { ...@@ -511,6 +511,13 @@ const onPickerChange = (e, name) => {
const onRadioChange = (e, name) => { const onRadioChange = (e, name) => {
formData.value[name] = e.detail.value; formData.value[name] = e.detail.value;
}; };
const sleep = (delay) => {
return new Promise((resolve) => {
setTimeout(() => resolve(), delay);
});
};
const onSubmit = async (e) => { const onSubmit = async (e) => {
md.sensorLogTake({ md.sensorLogTake({
xcxClick: "我的页面-信息修改页点击", xcxClick: "我的页面-信息修改页点击",
...@@ -579,23 +586,24 @@ const onSubmit = async (e) => { ...@@ -579,23 +586,24 @@ const onSubmit = async (e) => {
hideLoading(); hideLoading();
if (res.success) { if (res.success) {
data?.id && data?.id && userStore.setBabyNickCache(data?.id, formData.value.babyName);
userStore.setBabyNickCache(data?.id, formData.value.babyName);
uni.showToast({
title: "提交成功",
icon: "success",
});
uni.navigateBack();
// jump({ // jump({
// type: JumpType.INNER, // type: JumpType.INNER,
// url: "/pages/index/index" // url: "/pages/index/index"
// }) // })
showLoading(); showLoading();
await sleep(3000);
await userStore.loadUserInfo(); await userStore.loadUserInfo();
await userStore.loadBabyInfo(); await userStore.loadBabyInfo();
await userStore.loadHomeInfo(); await userStore.loadHomeInfo();
hideLoading(); hideLoading();
uni.showToast({
title: "提交成功",
icon: "success",
});
uni.navigateBack();
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
...@@ -674,21 +682,18 @@ function onDateStatusChange(status) { ...@@ -674,21 +682,18 @@ function onDateStatusChange(status) {
} }
return true; return true;
} }
const getlabelFn =(item) =>{ const getlabelFn = (item) => {
if (item.name === "babyBirthday") { if (item.name === "babyBirthday") {
item.label = formData.value.babyStage == 1 ? '预产日期':'宝宝出生日期' item.label = formData.value.babyStage == 1 ? "预产日期" : "宝宝出生日期";
} }
return item.label return item.label;
} };
// getLabelByValue 支持所有映射字段 // getLabelByValue 支持所有映射字段
const getLabelByValue = (item, value) => { const getLabelByValue = (item, value) => {
if (item.name === "babyStage") { if (item.name === "babyStage") {
return babyStageMap.find((i) => i.value === value)?.label || ""; return babyStageMap.find((i) => i.value === value)?.label || "";
} }
if (item.name === "babyType") { if (item.name === "babyType") {
return babyTypeMap.find((i) => i.value === value)?.label || ""; return babyTypeMap.find((i) => i.value === value)?.label || "";
} }
...@@ -699,8 +704,12 @@ const getLabelByValue = (item, value) => { ...@@ -699,8 +704,12 @@ const getLabelByValue = (item, value) => {
// // 添加根据切换状态修改文案 // // 添加根据切换状态修改文案
if (item.name === "babyBirthday") { if (item.name === "babyBirthday") {
// console.log("🚀 ~ getLabelByValue ~ formData:", formData.value, item) // console.log("🚀 ~ getLabelByValue ~ formData:", formData.value, item)
item.placeholder = formData.value.babyBirthday? formData.value.babyBirthday : formData.value.babyStage == 1 ? '请选择预产日期':'请选择出生日期' item.placeholder = formData.value.babyBirthday
return item.placeholder ? formData.value.babyBirthday
: formData.value.babyStage == 1
? "请选择预产日期"
: "请选择出生日期";
return item.placeholder;
} }
return value; return value;
}; };
...@@ -740,7 +749,6 @@ const initData = () => { ...@@ -740,7 +749,6 @@ const initData = () => {
// 更新表单项的选项数据 // 更新表单项的选项数据
formItems.value.forEach((item) => { formItems.value.forEach((item) => {
if (item.name === "contentPreference") { if (item.name === "contentPreference") {
item.range = contentLikeOptions.value; item.range = contentLikeOptions.value;
} else if (item.name === "productPreference") { } else if (item.name === "productPreference") {
...@@ -761,7 +769,6 @@ const initData = () => { ...@@ -761,7 +769,6 @@ const initData = () => {
formData.value.babyStage == 2 ? "请选择出生日期" : "请选择预产日期"; formData.value.babyStage == 2 ? "请选择出生日期" : "请选择预产日期";
} }
}); });
}; };
onMounted(() => { onMounted(() => {
...@@ -774,13 +781,13 @@ onMounted(() => { ...@@ -774,13 +781,13 @@ onMounted(() => {
}); });
onLoad((options) => { onLoad((options) => {
console.log("🚀 ~ options-新增和修改:", options) console.log("🚀 ~ options-新增和修改:", options);
// debugger; // debugger;
pageType.value = options.type || "add"; pageType.value = options.type || "add";
babyId.value = options.id || ""; babyId.value = options.id || "";
if (pageType.value === "edit") { if (pageType.value === "edit") {
const baby = userStore.babyInfo; const baby = userStore.babyInfo;
console.log("🚀 ~ baby:", baby) console.log("🚀 ~ baby:", baby);
formData.value.babyStage = baby.babyStage ?? 2; formData.value.babyStage = baby.babyStage ?? 2;
formData.value.babyName = baby.babyName || ""; formData.value.babyName = baby.babyName || "";
formData.value.babyBirthday = baby.content?.babyBirthday || ""; formData.value.babyBirthday = baby.content?.babyBirthday || "";
......
...@@ -61,9 +61,12 @@ ...@@ -61,9 +61,12 @@
@add="onAddBaby" /> @add="onAddBaby" />
</view> </view>
<view class="integralContainer"> <view class="integralContainer" @click="handleIntegralClick">
<image class="integralIcon" src="https://course.feihe.com/momclub-picture/my/integralBg.png" <image
mode="aspectFit" /> class="integralIcon"
src="https://course.feihe.com/momclub-picture/my/integralBg.png"
mode="aspectFit"
/>
<text class="integralText0">{{ babyInfo.points || "0" }}</text> <text class="integralText0">{{ babyInfo.points || "0" }}</text>
<text class="integralText1">积分</text> <text class="integralText1">积分</text>
</view> </view>
...@@ -413,6 +416,22 @@ const initData = async () => { ...@@ -413,6 +416,22 @@ const initData = async () => {
} }
}; };
const handleIntegralClick = () => {
md.sensorLogTake({
xcxClick: "我的页面-首屏页面点击",
pageName: "我的页面-首屏",
buttonName: "积分明细",
});
const urlStr = 'https://mom.feihe.com/member/mine/newPointDetail?crmId={crmid}&appCode=XMH';
const url = urlStr.replace("{crmid}", userStore.babyInfo?.memberId);
console.log('积分明细链接:==',url)
jump({
type: 3,
url: url
})
}
const getRealtimePhoneNumber = async (e) => { const getRealtimePhoneNumber = async (e) => {
console.log("获取手机号码", e); console.log("获取手机号码", e);
...@@ -752,9 +771,40 @@ defineExpose({}); ...@@ -752,9 +771,40 @@ defineExpose({});
.integralContainer { .integralContainer {
<<<<<<< HEAD
position: absolute;
top: 0rpx;
right: 0rpx;
=======
position: absolute; position: absolute;
top: 0rpx; top: 0rpx;
right: 0rpx; right: 0rpx;
width: 226rpx;
height: 166rpx;
.integralIcon {
position: absolute;
width: 226rpx;
height: 166rpx;
right: 0rpx;
}
.integralText0 {
position: absolute;
font-size: 24rpx;
color: #1d1e25;
top: 45rpx;
right: 0rpx;
width: 167rpx;
text-align: center;
}
.integralText1 {
position: absolute;
font-size: 24rpx;
color: #1d1e25;
width: 167rpx;
text-align: center;
right: 0rpx;
top: 81rpx;
>>>>>>> master
.integralIcon { .integralIcon {
position: absolute; position: absolute;
......
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