Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
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
viitto
mallapp
Commits
25dc8fad
Commit
25dc8fad
authored
Apr 09, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d02570f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
45 deletions
+46
-45
index.vue
components/auth/index.vue
+45
-44
cashCard.vue
components/coupon/cashCard.vue
+1
-1
No files found.
components/auth/index.vue
View file @
25dc8fad
...
...
@@ -2,7 +2,8 @@
<div
class=
"auth-page"
>
<u-popup
v-model=
"showDialog"
mode=
"center"
:mask-close-able=
"false"
custom-style=
"padding:0;background:none;"
>
<img
:src=
"pageinfo.pic_url"
mode=
"widthFix"
/>
<button
:style=
"sureStyle"
class=
"hotsopt"
open-type=
"getUserInfo"
@
getuserinfo=
"showLogin==true?getUserInfo():''"
></button>
<!--
<button
:style=
"sureStyle"
class=
"hotsopt"
open-type=
"getUserInfo"
@
getuserinfo=
"showLogin==true?getUserInfo():''"
></button>
-->
<button
:style=
"sureStyle"
class=
"hotsopt"
@
tap=
"showLogin==true?getUserProfile():''"
></button>
<button
:style=
"cancelStyle"
class=
"hotsopt"
@
click=
"close"
></button>
</u-popup>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
:cform=
"ComeFrom"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
...
...
@@ -35,7 +36,23 @@
this
.
cancelStyle
=
`height:
${
y
.
height
}
rpx;width:
${
y
.
width
}
rpx;left:
${
y
.
left
}
rpx;top:
${
y
.
top
}
rpx;`
;
},
methods
:
{
getUserInfo
(
e
)
{
getUserProfile
(){
var
that
=
this
;
wx
.
getUserProfile
({
desc
:
'用于完善资料'
,
// 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success
:
info
=>
{
console
.
log
(
info
.
userInfo
)
that
.
getUserInfo
(
info
)
},
fail
:
()
=>
{
uni
.
showToast
({
title
:
'微信登录授权失败'
,
icon
:
'none'
});
}
});
},
getUserInfo
(
info
)
{
var
that
=
this
;
that
.
showDialog
=
true
;
uni
.
getProvider
({
...
...
@@ -45,29 +62,18 @@
uni
.
login
({
provider
:
'weixin'
,
success
:
res
=>
{
that
.
authorization
=
res
.
code
;
uni
.
getUserInfo
({
provider
:
'weixin'
,
success
:
info
=>
{
//这里请求接口
let
obj
=
{
Source
:
1
,
OpenId
:
''
,
Name
:
info
.
userInfo
.
nickName
,
Photo
:
info
.
userInfo
.
avatarUrl
,
Moblie
:
''
,
SuperiorId
:
0
,
code
:
res
.
code
};
that
.
getCode
(
obj
);
},
fail
:
()
=>
{
uni
.
showToast
({
title
:
'微信登录授权失败'
,
icon
:
'none'
});
}
});
//这里请求接口
let
obj
=
{
Source
:
1
,
OpenId
:
''
,
Name
:
info
.
userInfo
.
nickName
,
Photo
:
info
.
userInfo
.
avatarUrl
,
Moblie
:
''
,
SuperiorId
:
0
,
code
:
res
.
code
};
that
.
getCode
(
obj
);
},
fail
:
()
=>
{
uni
.
showToast
({
...
...
@@ -95,26 +101,21 @@
uni
.
showLoading
({
title
:
'登录中'
});
uni
.
getUserInfo
({
provider
:
'weixin'
,
success
:
info
=>
{
//这里请求接口
var
OpenId
=
''
;
that
.
request2
({
url
:
'/api/mall/GetWeChatOpenId'
,
data
:
{
Code
:
obj
.
code
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
obj
.
OpenId
=
res
.
data
;
that
.
getLogin
(
obj
);
}
}
);
//这里请求接口
var
OpenId
=
''
;
that
.
request2
({
url
:
'/api/mall/GetWeChatOpenId'
,
data
:
{
Code
:
obj
.
code
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
obj
.
OpenId
=
res
.
data
;
that
.
getLogin
(
obj
);
}
}
}
);
);
},
//登录
getLogin
(
obj
)
{
...
...
components/coupon/cashCard.vue
View file @
25dc8fad
...
...
@@ -16,7 +16,7 @@
</view>
</view>
<view
style=
"width: 1px;flex: 1;display: flex;align-items: flex-end;color: #FF4544;font-size: 12px;justify-content: flex-end;"
>
余额¥
<text
style=
"font-size: 20px;"
>
{{
x
.
SurplusPrice
}}
99999
</text>
余额¥
<text
style=
"font-size: 20px;"
>
{{
x
.
SurplusPrice
}}
</text>
</view>
<view
class=
"chosen"
>
<u-radio-group
v-model=
"currentChosen"
>
...
...
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