Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
a768b22e
Commit
a768b22e
authored
Sep 01, 2025
by
chenkai@duiba.com.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页工具新增体质测试和AI起名
parent
cfa344ec
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1977 additions
and
2122 deletions
+1977
-2122
home.json
mock/home.json
+575
-734
pages.json
pages.json
+14
-0
naming.vue
pages/naming/naming.vue
+4
-4
Home.vue
views/Home.vue
+1384
-1384
No files found.
mock/home.json
View file @
a768b22e
This diff is collapsed.
Click to expand it.
pages.json
View file @
a768b22e
...
...
@@ -63,6 +63,20 @@
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/naming/naming"
,
"style"
:
{
"navigationBarTitleText"
:
"星妈起名"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/naming/namingResult"
,
"style"
:
{
"navigationBarTitleText"
:
"星妈起名"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/expertTeamPage/expertTeamPage"
,
"style"
:
{
...
...
pages/naming/naming.vue
View file @
a768b22e
...
...
@@ -170,10 +170,10 @@
<view
class=
"item_line"
></view>
</view>
<!--避
讳
字-->
<!--避
免
字-->
<view
class=
"taboo_word"
>
<view
class=
"item_top"
>
<span
class=
"title_txt"
>
避
讳
字
</span>
<span
class=
"title_txt"
>
避
免
字
</span>
<input
class=
"taboo_input"
:placeholder=
"showPlaceholder2 ? '示例:然、萌' : ''"
v-model=
"avoidChars"
@
blur=
"e => enforceSeparator(e, 2)"
@
click=
"showPlaceholder2 = false"
/>
</view>
...
...
@@ -293,7 +293,7 @@
//必有字
const
requiredChars
=
ref
(
''
);
const
showPlaceholder2
=
ref
(
true
);
//避
讳
字
//避
免
字
const
avoidChars
=
ref
(
''
);
//期望风格
const
expectedStyle
=
ref
(
''
);
...
...
@@ -416,7 +416,7 @@
return
input
.
length
<=
filtered
.
length
||
input
===
filtered
}
//设置必有字和避
讳
字,用、隔开每一个字
//设置必有字和避
免
字,用、隔开每一个字
const
enforceSeparator
=
(
e
,
idx
)
=>
{
let
text
=
e
.
detail
.
value
// 1. 移除所有现有分隔符(避免干扰)
...
...
views/Home.vue
View file @
a768b22e
...
...
@@ -58,8 +58,8 @@
<swiper-item
v-for=
"(item, index) in toolList.tools"
:key=
"index"
:class=
"['swiperItem',
{ 'active': currentIndex === index }]">
<view
class=
"tool"
>
<button
v-if=
"homeStore && !homeStore.isLogin && i
ndex > 0"
open-type=
"getPhoneNumber
"
@
getphonenumber=
"onGetPhoneNumber"
class=
"sq_btn"
></button>
<button
v-if=
"homeStore && !homeStore.isLogin && i
tem.title!='AI起名' && item.title!='体质测试'
"
open-type=
"getPhoneNumber"
@
getphonenumber=
"onGetPhoneNumber"
class=
"sq_btn"
></button>
<image
class=
"tool_bg"
:src=
"$baseUrl + item.icon"
@
tap=
"handleToolClick(item)"
>
</image>
<!--
<image
class=
"tool_icon"
:src=
"$baseUrl + item.icon"
></image>
...
...
@@ -328,62 +328,62 @@
<
script
>
import
{
import
{
jump
,
JumpType
}
from
'../utils'
;
import
{
}
from
'../utils'
;
import
{
useHomeStore
}
from
'../stores/home'
;
import
{
}
from
'../stores/home'
;
import
{
fetchHomeJSON
}
from
'../api/home'
;
import
{
}
from
'../api/home'
;
import
{
useUserStore
}
from
'../stores/user'
;
import
RegisterLayer
from
"../components/RegisterLayer.vue"
;
import
md
from
'../md'
;
import
ExposureTracker
from
'../utils/exposure'
;
import
{
}
from
'../stores/user'
;
import
RegisterLayer
from
"../components/RegisterLayer.vue"
;
import
md
from
'../md'
;
import
ExposureTracker
from
'../utils/exposure'
;
import
{
getHealthField
}
from
"@/api/common"
;
}
from
"@/api/common"
;
// const homeStore = useHomeStore();
const
userStore
=
useUserStore
();
// const homeStore = useHomeStore();
const
userStore
=
useUserStore
();
// 定义需要曝光检测的元素配置
const
EXPOSURE_CONFIGS
=
[{
// 定义需要曝光检测的元素配置
const
EXPOSURE_CONFIGS
=
[{
id
:
'firstScreen'
,
logParams
:
{
xcxPage
:
'首页-首屏页面浏览'
,
pageName
:
'首页-首屏'
}
},
// 可以添加更多需要曝光检测的元素配置
{
},
// 可以添加更多需要曝光检测的元素配置
{
id
:
'secondScreen'
,
logParams
:
{
xcxPage
:
'首页-二屏页面浏览'
,
pageName
:
'首页-二屏'
}
},
{
},
{
id
:
'thirdScreen'
,
logParams
:
{
xcxPage
:
'首页-三屏页面浏览'
,
pageName
:
'首页-三屏'
}
},
{
},
{
id
:
'fourthScreen'
,
logParams
:
{
xcxPage
:
'首页-四屏页面浏览'
,
pageName
:
'首页-四屏'
}
}
];
}
];
export
default
{
export
default
{
beforeDestroy
()
{
if
(
this
.
exposureTracker
)
{
this
.
exposureTracker
.
resetAllExposure
();
...
...
@@ -1051,13 +1051,13 @@ export default {
}
}
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
@import '@/common.less';
@import '@/common.less';
.home-container {
.home-container {
width: 100vw;
overflow-x: hidden;
background-color: white;
...
...
@@ -1952,5 +1952,5 @@ export default {
z-index: 10;
}
}
}
}
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment