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
d200caea
Commit
d200caea
authored
Aug 06, 2024
by
彭佳妮(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
82434109
6f152b4e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
App.vue
src/App.vue
+10
-1
pages.json
src/pages.json
+2
-1
index.vue
src/pages/index/index.vue
+6
-0
No files found.
src/App.vue
View file @
d200caea
...
...
@@ -4,6 +4,9 @@ import { sgyOrderGetStatus } from './api/order';
import
testJson
from
'./static/json/test.json'
;
import
{
getToken
}
from
'./utils/auth'
;
import
{
setOrderDic
}
from
'./utils/orderDic'
;
// beforeMount(() => {
// if (!getToken()) signIn();
// });
onLaunch
(()
=>
{
if
(
!
getToken
())
signIn
();
sgyOrderGetStatus
().
then
((
res
)
=>
{
...
...
@@ -22,13 +25,19 @@ onHide(() => {
});
// 登录
const
signIn
=
()
=>
{
getTokenUser
(
testJson
).
then
((
res
)
=>
{
xma
.
xh
.
getUserProfile
({
range
:
[
'ACCOUNT'
,
'MOBILE'
,
'CITIZEN'
],
async
success
(
info
)
{
const
info2
=
JSON
.
stringify
(
info
);
getTokenUser
(
info2
).
then
((
res
)
=>
{
const
token
=
res
.
data
.
access_token
;
const
userInfo
=
res
.
data
.
user_info
;
xma
.
setStorageSync
(
'Authorization'
,
token
);
xma
.
setStorageSync
(
'userInfo'
,
userInfo
);
console
.
log
(
'登录...'
);
});
},
});
};
</
script
>
<
style
>
...
...
src/pages.json
View file @
d200caea
...
...
@@ -9,7 +9,8 @@
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
"小程序平台"
"navigationBarTitleText"
:
"小程序平台"
,
"navigationStyle"
:
"custom"
}
},
{
...
...
src/pages/index/index.vue
View file @
d200caea
...
...
@@ -322,6 +322,12 @@ const reset = () => {
cardData2
.
value
=
[];
show
.
value
=
false
;
};
const
toUse
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/index/listFood?type=1'
,
});
};
// 商家列表分页-搜索列表
const
getMerchantList
=
()
=>
{
xma
.
showLoading
({
...
...
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