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
824456cf
Commit
824456cf
authored
Jun 27, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
10dfbccc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
37 deletions
+40
-37
index.ts
miniprogram/pages/index/index.ts
+40
-37
No files found.
miniprogram/pages/index/index.ts
View file @
824456cf
...
...
@@ -29,9 +29,7 @@ ComponentWithStore({
canIUseGetUserProfile
:
wx
.
canIUse
(
'getUserProfile'
),
canIUseNicknameComp
:
wx
.
canIUse
(
'input.type.nickname'
),
},
methods
:
{
async
onShow
()
{
store
.
doLog
(
507
,
10
)
created
()
{
// 登录
wx
.
login
({
success
:
async
(
res
)
=>
{
...
...
@@ -41,6 +39,11 @@ ComponentWithStore({
await
this
.
updateHomeInfo
();
},
});
},
methods
:
{
async
onShow
()
{
store
.
doLog
(
507
,
10
)
await
this
.
updateHomeInfo
();
const
{
channel
,
city
}
=
this
.
options
||
{};
store
.
paramsObj
=
{
channel
,
city
};
},
...
...
@@ -100,7 +103,7 @@ ComponentWithStore({
// 跳转活动页
jumpActPage
:
_asyncThrottle
(
async
function
()
{
store
.
doLog
(
508
,
4
)
wx
.
switchTab
({
url
:
"/pages/activity/activity"
})
wx
.
switchTab
({
url
:
"/pages/activity/activity"
})
}),
closeGetPanel
()
{
...
...
@@ -120,7 +123,7 @@ ComponentWithStore({
getPos
()
{
wx
.
getLocation
({
type
:
'wgs84'
,
success
(
res
)
{
success
(
res
)
{
const
latitude
=
res
.
latitude
const
longitude
=
res
.
longitude
const
speed
=
res
.
speed
...
...
@@ -135,7 +138,7 @@ ComponentWithStore({
wx
.
getFileSystemManager
().
readFile
({
filePath
:
e
.
detail
.
avatarUrl
,
//地址
encoding
:
'base64'
,
//编码格式
success
:
async
(
res
)
=>
{
success
:
async
(
res
)
=>
{
let
base64
=
'data:image/png;base64,'
+
res
.
data
const
data
=
await
store
.
doImgUpload
(
base64
)
console
.
info
(
'头像上传后data'
,
data
);
...
...
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