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/
dist/
static/
node_modules/
.DS_Store
\ No newline at end of file
......@@ -65,7 +65,7 @@
"desc" : "请允许获取位置信息,用于提供附近服务"
}
},
"requiredBackgroundModes": ["share"]
"requiredBackgroundModes" : [ "share" ]
},
"mp-alipay" : {
"usingComponents" : true
......
......@@ -604,10 +604,110 @@
"type": 1,
"url": "/pages/library/ContentLibrary"
},
<<<<<<< HEAD
"bgUrl": "homepage/cardbg3.png"
}
],
"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",
"title": "公众号",
......
{
"name": "20250528_FHQ1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"lockfileVersion": 1,
"dependencies": {
"crypto-js": "^4.2.0"
}
},
"node_modules/crypto-js": {
"crypto-js": {
"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=="
}
}
......
......@@ -82,7 +82,7 @@
}"
>
<text class="form-label">
{{getlabelFn(item)}}
{{ getlabelFn(item) }}
<!-- {{ item.label }} -->
<text v-if="item.required" class="required">*</text>
</text>
......@@ -232,7 +232,7 @@ import { showLoading, hideLoading } from "../../utils/index.js";
import { updateBabyInfo, getGestationalWeeks } from "../../api/user.js";
import { usePageCfgStore } from "../../stores/pageCfg";
import md from "../../md.js";
import { jump, JumpType } from '../../utils/index.js';
import { jump, JumpType } from "../../utils/index.js";
const userStore = useUserStore();
const pageType = ref("add");
const babyId = ref("");
......@@ -511,6 +511,13 @@ const onPickerChange = (e, name) => {
const onRadioChange = (e, name) => {
formData.value[name] = e.detail.value;
};
const sleep = (delay) => {
return new Promise((resolve) => {
setTimeout(() => resolve(), delay);
});
};
const onSubmit = async (e) => {
md.sensorLogTake({
xcxClick: "我的页面-信息修改页点击",
......@@ -579,23 +586,24 @@ const onSubmit = async (e) => {
hideLoading();
if (res.success) {
data?.id &&
userStore.setBabyNickCache(data?.id, formData.value.babyName);
data?.id && userStore.setBabyNickCache(data?.id, formData.value.babyName);
uni.showToast({
title: "提交成功",
icon: "success",
});
uni.navigateBack();
// jump({
// type: JumpType.INNER,
// url: "/pages/index/index"
// })
showLoading();
await sleep(3000);
await userStore.loadUserInfo();
await userStore.loadBabyInfo();
await userStore.loadHomeInfo();
hideLoading();
uni.showToast({
title: "提交成功",
icon: "success",
});
uni.navigateBack();
} else {
uni.showToast({
title: res.message,
......@@ -674,21 +682,18 @@ function onDateStatusChange(status) {
}
return true;
}
const getlabelFn =(item) =>{
const getlabelFn = (item) => {
if (item.name === "babyBirthday") {
item.label = formData.value.babyStage == 1 ? '预产日期':'宝宝出生日期'
item.label = formData.value.babyStage == 1 ? "预产日期" : "宝宝出生日期";
}
return item.label
}
return item.label;
};
// getLabelByValue 支持所有映射字段
const getLabelByValue = (item, value) => {
if (item.name === "babyStage") {
return babyStageMap.find((i) => i.value === value)?.label || "";
}
if (item.name === "babyType") {
return babyTypeMap.find((i) => i.value === value)?.label || "";
}
......@@ -699,8 +704,12 @@ const getLabelByValue = (item, value) => {
// // 添加根据切换状态修改文案
if (item.name === "babyBirthday") {
// console.log("🚀 ~ getLabelByValue ~ formData:", formData.value, item)
item.placeholder = formData.value.babyBirthday? formData.value.babyBirthday : formData.value.babyStage == 1 ? '请选择预产日期':'请选择出生日期'
return item.placeholder
item.placeholder = formData.value.babyBirthday
? formData.value.babyBirthday
: formData.value.babyStage == 1
? "请选择预产日期"
: "请选择出生日期";
return item.placeholder;
}
return value;
};
......@@ -740,7 +749,6 @@ const initData = () => {
// 更新表单项的选项数据
formItems.value.forEach((item) => {
if (item.name === "contentPreference") {
item.range = contentLikeOptions.value;
} else if (item.name === "productPreference") {
......@@ -761,7 +769,6 @@ const initData = () => {
formData.value.babyStage == 2 ? "请选择出生日期" : "请选择预产日期";
}
});
};
onMounted(() => {
......@@ -774,13 +781,13 @@ onMounted(() => {
});
onLoad((options) => {
console.log("🚀 ~ options-新增和修改:", options)
console.log("🚀 ~ options-新增和修改:", options);
// debugger;
pageType.value = options.type || "add";
babyId.value = options.id || "";
if (pageType.value === "edit") {
const baby = userStore.babyInfo;
console.log("🚀 ~ baby:", baby)
console.log("🚀 ~ baby:", baby);
formData.value.babyStage = baby.babyStage ?? 2;
formData.value.babyName = baby.babyName || "";
formData.value.babyBirthday = baby.content?.babyBirthday || "";
......
......@@ -61,9 +61,12 @@
@add="onAddBaby" />
</view>
<view class="integralContainer">
<image class="integralIcon" src="https://course.feihe.com/momclub-picture/my/integralBg.png"
mode="aspectFit" />
<view class="integralContainer" @click="handleIntegralClick">
<image
class="integralIcon"
src="https://course.feihe.com/momclub-picture/my/integralBg.png"
mode="aspectFit"
/>
<text class="integralText0">{{ babyInfo.points || "0" }}</text>
<text class="integralText1">积分</text>
</view>
......@@ -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) => {
console.log("获取手机号码", e);
......@@ -752,9 +771,40 @@ defineExpose({});
.integralContainer {
<<<<<<< HEAD
position: absolute;
top: 0rpx;
right: 0rpx;
=======
position: absolute;
top: 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 {
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