Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
ec017d63
Commit
ec017d63
authored
Feb 14, 2020
by
chenhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product_dev' of
http://code.mayi888.com/chengmo/mayi-mp-shop
into product_dev
parents
6514a4b9
25c1e8a3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
src/pages/index/index.vue
+17
-16
No files found.
src/pages/index/index.vue
View file @
ec017d63
...
...
@@ -116,6 +116,7 @@ export default {
}
console
.
log
(
"url"
,
this
.
link
+
this
.
page
+
this
.
params
);
this
.
getSpokesman
();
this
.
init
();
},
onShow
()
{
// console.log('显示了',options.webViewUrl);
...
...
@@ -123,23 +124,23 @@ export default {
methods
:
{
init
()
{
// 弃用小程序地位
let
that
=
this
;
//
let that = this;
// 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.record" 这个 scope
wx
.
getSetting
({
success
(
res
)
{
console
.
log
(
res
,
"sdf1233"
);
if
(
!
res
.
authSetting
[
"scope.userLocation"
])
{
wx
.
authorize
({
scope
:
"scope.userLocation"
,
success
()
{
that
.
getLocationHandle
();
}
});
}
else
{
that
.
getLocationHandle
();
}
}
});
//
wx.getSetting({
//
success(res) {
//
console.log(res, "sdf1233");
//
if (!res.authSetting["scope.userLocation"]) {
//
wx.authorize({
//
scope: "scope.userLocation",
//
success() {
//
that.getLocationHandle();
//
}
//
});
//
} else {
//
that.getLocationHandle();
//
}
//
}
//
});
},
checkLogin
()
{
let
getOpenid
=
wx
.
getStorageSync
(
"openid"
);
...
...
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