Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
b393bc4a
Commit
b393bc4a
authored
Aug 13, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
胶囊和跳转
parent
14350536
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
Search.vue
src/components/index/Search.vue
+11
-14
loading.vue
src/pages/index/loading.vue
+8
-3
No files found.
src/components/index/Search.vue
View file @
b393bc4a
...
...
@@ -40,25 +40,22 @@ const emit = defineEmits(['toSearch']);
const
title
=
ref
(
'小程序平台'
);
const
{
countInfo
,
addCount
}
=
useCountStore
();
const
test
=
ref
(
''
);
onMounted
(()
=>
{
// xma.xh.getUserProfile({
// range: ['ACCOUNT', 'MOBILE', 'CITIZEN'],
// async success(info) {
// const info2 = JSON.stringify(info);
// test.value = info2;
// },
// });
onLoad
(()
=>
{
xma
.
xh
.
getMenuButtonBoundingClientRect
({
success
(
res
)
{
console
.
log
(
'宽度'
,
res
.
width
);
// 宽度,单位:px
console
.
log
(
'高度'
,
res
.
height
);
// 高度,单位:px
console
.
log
(
'上边界坐标'
,
res
.
top
);
// 上边界坐标,单位:px
console
.
log
(
'右边界坐标'
,
res
.
right
);
// 右边界坐标,单位:px
console
.
log
(
'下边界坐标'
,
res
.
bottom
);
// 下边界坐标,单位:px
console
.
log
(
'左边界坐标'
,
res
.
left
);
// 左边界坐标,单位:px
},
});
});
const
search
=
(
res
)
=>
{
const
keyword
=
res
.
detail
.
value
;
emit
(
'toSearch'
,
keyword
);
};
const
test2
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/shop/shop'
,
});
};
// 返回上一级
const
back
=
()
=>
{
...
...
src/pages/index/loading.vue
View file @
b393bc4a
...
...
@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import
{
getToken
}
from
'../../utils/auth'
;
onLoad
(
async
(
options
)
=>
{
//
await signIn();
if
(
!
getToken
())
await
signIn2
();
await
signIn
();
//
if (!getToken()) await signIn2();
const
{
type
}
=
options
;
switch
(
type
)
{
case
'0'
:
...
...
@@ -24,7 +24,12 @@ onLoad(async (options) => {
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/index/building?categoryId=3266'
});
break
;
case
'3'
:
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268'
});
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268'
,
});
break
;
default
:
xma
.
reLaunch
({
url
:
'/pages/index/index'
});
}
});
onMounted
(
async
()
=>
{
...
...
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