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
a8156271
Commit
a8156271
authored
Jun 09, 2025
by
黄韬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '20250528-dev-ht' into 'dev'
fix: 修复上传 See merge request sparkprojects/20250528_FHQ1!12
parents
03055b1d
c8b89655
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
request.js
api/request.js
+1
-1
person.vue
pages/person/person.vue
+9
-2
My.vue
views/My.vue
+5
-7
No files found.
api/request.js
View file @
a8156271
...
...
@@ -15,7 +15,7 @@ const {
// request.js
// 通常可以吧 baseUrl 单独放在一个 js 文件了
const
baseUrl
=
"http://172.16.2
30.10
8:7777/pmall"
;
const
baseUrl
=
"http://172.16.2
24.17
8:7777/pmall"
;
const
request
=
(
options
=
{})
=>
{
// 在这里可以对请求头进行一些设置
...
...
pages/person/person.vue
View file @
a8156271
...
...
@@ -521,6 +521,13 @@ const onSubmit = async (e) => {
data
.
id
=
babyId
.
value
;
}
// 移除空值属性
Object
.
keys
(
data
).
forEach
(
key
=>
{
if
(
data
[
key
]
===
''
)
{
delete
data
[
key
];
}
});
console
.
log
(
"提交数据"
,
data
);
showLoading
();
...
...
@@ -577,7 +584,7 @@ const handleUploadBackground = async (e) => {
success
:
async
(
res
)
=>
{
const
tempFilePath
=
res
.
tempFilePaths
[
0
];
const
fs
=
uni
.
getFileSystemManager
();
const
base64
=
"data:image/jpeg;base64,"
+
fs
.
readFileSync
(
tempFilePath
);
const
base64
=
"data:image/jpeg;base64,"
+
fs
.
readFileSync
(
tempFilePath
,
"base64"
);
showLoading
();
const
uploadRes
=
await
uploadImage
(
base64
);
...
...
@@ -657,7 +664,7 @@ onLoad((options) => {
formData
.
value
.
productPreference
=
baby
.
content
?.
productPreference
||
""
;
formData
.
value
.
followInfo
=
baby
.
content
?.
followInfo
||
""
;
formData
.
value
.
purchaseChannel
=
baby
.
content
?.
purchaseChannel
||
""
;
formData
.
value
.
babyAvatar
=
baby
.
babyAvatar
||
""
;
formData
.
value
.
babyAvatar
=
baby
.
content
?.
babyAvatar
||
""
;
formData
.
value
.
backgroundImg
=
baby
.
content
?.
backgroundImg
||
""
;
formData
.
value
.
gestationalWeeks
=
baby
.
content
?.
gestationalWeeks
||
""
;
...
...
views/My.vue
View file @
a8156271
...
...
@@ -41,7 +41,7 @@
<image
class=
"avatar"
:src=
"
babyInfo?.babyAvatar || $baseUrl + 'common/default_avatar.png'
babyInfo?.
content?.
babyAvatar || $baseUrl + 'common/default_avatar.png'
"
mode=
"aspectFill"
/>
...
...
@@ -242,11 +242,7 @@ const onRegisterConfirm = (data) => {
// 获取用户信息
const
initData
=
async
()
=>
{
if
(
!
userStore
.
userInfo
||
JSON
.
stringify
(
userStore
.
userInfo
)
==
"{}"
||
userStore
.
userInfo
.
memberId
==
"not_login"
)
{
if
(
!
userStore
?.
userInfo
?.
memberId
||
userStore
?.
userInfo
?.
memberId
==
"not_login"
)
{
cfgStatus
.
value
.
isRegister
=
false
;
cfgStatus
.
value
.
showDetail
=
false
;
return
;
...
...
@@ -307,10 +303,12 @@ function onAddBaby() {
// 页面加载
onMounted
(()
=>
{
console
.
log
(
"onMounted"
);
initData
();
});
watch
(
babyInfo
,
()
=>
{
watch
([()
=>
userStore
.
userInfo
,
()
=>
userStore
.
babyInfo
],
()
=>
{
console
.
log
(
"userInfo/babyInfo变化"
,
userStore
.
userInfo
,
userStore
.
babyInfo
);
initData
();
});
...
...
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