Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
junlebao-milk-20240619
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
SparkProjects
junlebao-milk-20240619
Commits
68ecf35c
Commit
68ecf35c
authored
Jun 25, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
8133ff29
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
7 deletions
+27
-7
index.ts
miniprogram/pages/index/index.ts
+6
-4
store.ts
miniprogram/store/store.ts
+7
-2
project.private.config.json
project.private.config.json
+14
-1
No files found.
miniprogram/pages/index/index.ts
View file @
68ecf35c
...
...
@@ -31,7 +31,7 @@ ComponentWithStore({
canIUseGetUserProfile
:
wx
.
canIUse
(
'getUserProfile'
),
canIUseNicknameComp
:
wx
.
canIUse
(
'input.type.nickname'
),
},
async
created
()
{
async
ready
()
{
this
.
updateHomeInfo
();
},
methods
:
{
...
...
@@ -56,7 +56,9 @@ ComponentWithStore({
},
async
updateHomeInfo
()
{
await
store
.
updateHomeInfo
();
const
{
channel
,
city
}
=
this
.
options
||
{};
await
store
.
updateHomeInfo
({
channel
,
city
});
const
{
mobile
,
first
}
=
store
.
homeInfo
;
if
(
!
mobile
)
{
...
...
@@ -65,8 +67,8 @@ ComponentWithStore({
});
}
else
{
this
.
setData
({
showGetPanel
:
first
,
showAlGetPanel
:
!
first
,
showGetPanel
:
channel
&&
first
,
showAlGetPanel
:
channel
&&
!
first
,
showPhoneBtn
:
false
,
});
}
...
...
miniprogram/store/store.ts
View file @
68ecf35c
...
...
@@ -15,14 +15,19 @@ class Store {
activities
:
[]
}
async
updateHomeInfo
()
{
async
updateHomeInfo
(
params
:
{
longitude
?:
number
,
latitude
?:
number
,
channel
?:
string
,
city
?:
string
,
})
{
// wx.showLoading({
// title: '加载中',
// mask: true,
// });
const
{
success
,
data
}
=
await
request
({
url
:
API_PATH
.
index
,
data
:
params
,
});
if
(
!
success
)
return
;
...
...
project.private.config.json
View file @
68ecf35c
...
...
@@ -6,5 +6,18 @@
"preloadBackgroundData"
:
false
,
"urlCheck"
:
false
},
"libVersion"
:
"3.4.6"
"libVersion"
:
"3.4.6"
,
"condition"
:
{
"miniprogram"
:
{
"list"
:
[
{
"name"
:
"店铺id+城市"
,
"pathName"
:
"pages/index/index"
,
"query"
:
"channel=1231&city=石家庄"
,
"launchMode"
:
"default"
,
"scene"
:
1011
}
]
}
}
}
\ 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