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
244711c4
Commit
244711c4
authored
Dec 31, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
0dcab989
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
src/pages/address/index.vue
+18
-2
src/pages/login/index.vue
+3
-3
No files found.
src/pages/address/index.vue
View file @
244711c4
<
template
>
<
template
>
<div
class=
"domain"
>
获取微信地址
{{
address
}}
----
{{
openid
}}
</div>
<div
class=
"domain"
>
获取微信地址
</div>
<!--
{{
address
}}
----
{{
openid
}}
-->
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -43,7 +44,7 @@ export default {
...
@@ -43,7 +44,7 @@ export default {
this
.
init
();
this
.
init
();
},
},
onShow
()
{
onShow
()
{
console
.
log
(
"onshow"
,
this
.
openSetting
);
console
.
log
(
"onshow"
,
this
.
openSetting
);
if
(
this
.
openSetting
)
{
if
(
this
.
openSetting
)
{
this
.
init
();
this
.
init
();
}
}
...
@@ -55,6 +56,21 @@ export default {
...
@@ -55,6 +56,21 @@ export default {
});
});
let
that
=
this
;
let
that
=
this
;
wx
.
chooseAddress
({
success
:
function
(
res
)
{
console
.
log
(
4
);
that
.
disposeAddress
(
res
);
},
fail
:
function
(
res
)
{
//用户取消
console
.
log
(
5
);
// wx.navigateBack();
that
.
getSett
();
}
});
},
getSett
()
{
let
that
=
this
;
wx
.
getSetting
({
wx
.
getSetting
({
success
(
res
)
{
success
(
res
)
{
if
(
!
res
.
authSetting
[
"scope.address"
])
{
if
(
!
res
.
authSetting
[
"scope.address"
])
{
...
...
src/pages/login/index.vue
View file @
244711c4
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
<button
class=
"btn"
lang=
"zh_CN"
open-type=
"getUserInfo"
@
getuserinfo=
"getUserInfo"
>
微信一键登录
</button>
<button
class=
"btn"
lang=
"zh_CN"
open-type=
"getUserInfo"
@
getuserinfo=
"getUserInfo"
>
微信一键登录
</button>
</div>
</div>
<div>
{{
testd
}}
</div>
<
!--
<
div>
{{
testd
}}
</div>
<div>
{{
test_sessionId
}}
</div>
--sessionId
<div>
{{
test_sessionId
}}
</div>
--sessionId
<div>
{{
unionId
}}
</div>
--unionId
<div>
{{
unionId
}}
</div>
--unionId
<div>
{{
test_isHaveUnion
}}
</div>
--isHaveUnion
<div>
{{
test_isHaveUnion
}}
</div>
--isHaveUnion
-->
<!--
<div
class=
"enterpriseLogin"
@
click=
"eLogin"
>
账号登录
</div>
-->
<!--
<div
class=
"enterpriseLogin"
@
click=
"eLogin"
>
账号登录
</div>
-->
</div>
</div>
<div
class=
"toCLogin1"
v-if=
"isShowPhone"
>
<div
class=
"toCLogin1"
v-if=
"isShowPhone"
>
...
@@ -93,7 +93,7 @@ export default {
...
@@ -93,7 +93,7 @@ export default {
login
login
.
miniLogin
({
code
:
res
.
code
})
.
miniLogin
({
code
:
res
.
code
})
.
then
(
res
=>
{
.
then
(
res
=>
{
wx
.
showToast
({
title
:
res
.
data
.
code
,
icon
:
"none"
});
//
wx.showToast({ title: res.data.code, icon: "none" });
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
testd
=
JSON
.
stringify
(
res
.
data
);
this
.
testd
=
JSON
.
stringify
(
res
.
data
);
this
.
test_isHaveUnion
=
res
.
data
.
data
.
isHaveUnion
;
this
.
test_isHaveUnion
=
res
.
data
.
data
.
isHaveUnion
;
...
...
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