Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
ce0848b2
Commit
ce0848b2
authored
Jan 14, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
bd23b168
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
22 deletions
+35
-22
indexassembly.vue
src/pages/index/components/indexassembly.vue
+7
-8
login.vue
src/pages/login/login.vue
+23
-12
request.js
src/utils/request.js
+4
-1
requestMall.js
src/utils/requestMall.js
+1
-1
No files found.
src/pages/index/components/indexassembly.vue
View file @
ce0848b2
...
@@ -11,13 +11,13 @@
...
@@ -11,13 +11,13 @@
<view
<view
style=
"width: 70vw;background: #FFF;display: flex;flex-direction: column;align-items: center;padding-bottom: 20px;border-radius: 8px;"
>
style=
"width: 70vw;background: #FFF;display: flex;flex-direction: column;align-items: center;padding-bottom: 20px;border-radius: 8px;"
>
<view
<view
style=
"width: 100%;height: 45px;display: flex;align-items: center;justify-content: center;border-bottom: 1px solid #EBEBEB;"
>
style=
"width: 100%;height: 45px;display: flex;align-items: center;justify-content: center;border-bottom: 1px solid #EBEBEB;
color: #111111;
"
>
手机号授权
手机号授权
</view>
</view>
<image
:src=
"obj.Photo"
style=
"width: 120rpx;height: 120rpx;border-radius: 50%;margin-top: 15px;"
>
<image
:src=
"obj.Photo"
style=
"width: 120rpx;height: 120rpx;border-radius: 50%;margin-top: 15px;"
>
</image>
</image>
<text
style=
"margin-top: 15px;font-size: 18px;font-weight: bold;"
>
{{
obj
.
Name
}}
</text>
<text
style=
"margin-top: 15px;font-size: 18px;font-weight: bold;
color: #111111;
"
>
{{
obj
.
Name
}}
</text>
<text
style=
"margin-top: 5px;font-size: 13px;"
>
申请获取您微信绑定的手机号码
</text>
<text
style=
"margin-top: 5px;font-size: 13px;
color: #111111;
"
>
申请获取您微信绑定的手机号码
</text>
<view
class=
"btn"
>
获取手机号
<view
class=
"btn"
>
获取手机号
<button
type=
"default"
open-type=
"getPhoneNumber"
v-if=
"showLogin == true"
<button
type=
"default"
open-type=
"getPhoneNumber"
v-if=
"showLogin == true"
style=
"position: absolute;left: 0;top: 0;width: 100%;height: 100%;opacity: 0;"
style=
"position: absolute;left: 0;top: 0;width: 100%;height: 100%;opacity: 0;"
...
@@ -65,7 +65,6 @@
...
@@ -65,7 +65,6 @@
wx
.
getUserProfile
({
wx
.
getUserProfile
({
desc
:
"用于完善资料"
,
// 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
desc
:
"用于完善资料"
,
// 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success
:
(
info
)
=>
{
success
:
(
info
)
=>
{
// console.log(info);
data
.
obj
.
Name
=
info
.
userInfo
.
nickName
;
data
.
obj
.
Name
=
info
.
userInfo
.
nickName
;
data
.
obj
.
Photo
=
info
.
userInfo
.
avatarUrl
;
data
.
obj
.
Photo
=
info
.
userInfo
.
avatarUrl
;
data
.
showPhone
=
true
;
//显示获取手机号码弹窗
data
.
showPhone
=
true
;
//显示获取手机号码弹窗
...
@@ -208,8 +207,8 @@
...
@@ -208,8 +207,8 @@
<
style
scoped
>
<
style
scoped
>
.indexassembly
{
.indexassembly
{
width
:
110
rpx
;
width
:
110
rpx
;
height
:
6
0
rpx
;
height
:
9
0
rpx
;
line-height
:
6
0
rpx
;
line-height
:
9
0
rpx
;
position
:
relative
;
position
:
relative
;
}
}
...
@@ -221,8 +220,8 @@
...
@@ -221,8 +220,8 @@
opacity
:
0
;
opacity
:
0
;
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
width
:
11
0
rpx
;
width
:
28
0
rpx
;
height
:
6
0
rpx
;
height
:
9
0
rpx
;
}
}
...
...
src/pages/login/login.vue
View file @
ce0848b2
...
@@ -23,10 +23,14 @@
...
@@ -23,10 +23,14 @@
<view
class=
"phoneBtn flex flex_center_center"
@
click=
"show=true"
>
游客登录
</view>
<view
class=
"phoneBtn flex flex_center_center"
@
click=
"show=true"
>
游客登录
</view>
<!--
<button
class=
"phoneBtn flex flex_center_center"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getphonenumber"
@
click=
"login2"
>
手机号一键登录
</button>
-->
<!--
<button
class=
"phoneBtn flex flex_center_center"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getphonenumber"
@
click=
"login2"
>
手机号一键登录
</button>
-->
</view>
</view>
<view
class=
"btnBox"
style=
"margin:20rpx auto 0;"
>
<indexassembly
@
success=
'againdata'
>
<view
class=
"loginBtn flex flex_center_center"
style=
"background-color:#4C50E7;"
>
授权登录
</view>
</indexassembly>
</view>
<!--
<view
class=
"auth"
@
click=
"authLogin"
>
授权手机号一键登录
</view>
-->
<van-toast
id=
"van-toast"
/>
<van-toast
id=
"van-toast"
/>
<van-dialog
:show=
'show'
title=
"
标题
"
message=
'游客登录,不能使用全部功能!'
show-cancel-button
@
cancel=
'show = false'
<van-dialog
:show=
'show'
title=
"
提示
"
message=
'游客登录,不能使用全部功能!'
show-cancel-button
@
cancel=
'show = false'
@
confirm=
'login3'
>
@
confirm=
'login3'
>
</van-dialog>
</van-dialog>
...
@@ -53,8 +57,11 @@
...
@@ -53,8 +57,11 @@
import
{
import
{
Dialog
Dialog
}
from
'../../wxcomponents/vant/dialog/index'
;
}
from
'../../wxcomponents/vant/dialog/index'
;
import
indexassembly
from
'../index/components/indexassembly.vue'
export
default
{
export
default
{
components
:{
indexassembly
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
let
{
proxy
proxy
...
@@ -169,7 +176,6 @@
...
@@ -169,7 +176,6 @@
},
},
async
login3
()
{
//游客登录
async
login3
()
{
//游客登录
data
.
show
=
false
data
.
show
=
false
console
.
log
(
uni
.
getStorageSync
(
"temporarydh"
))
let
temporarydh
=
uni
.
getStorageSync
(
"temporarydh"
)
let
temporarydh
=
uni
.
getStorageSync
(
"temporarydh"
)
if
(
temporarydh
)
{
if
(
temporarydh
)
{
let
msg
=
{
let
msg
=
{
...
@@ -195,18 +201,23 @@
...
@@ -195,18 +201,23 @@
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"none"
,
icon
:
"none"
,
title
:
"请先点击
首页
登录按钮授权"
,
title
:
"请先点击
授权
登录按钮授权"
,
duration
:
2000
,
duration
:
2000
,
})
})
setTimeout
(()
=>
{
//
setTimeout(()=>{
uni
.
reLaunch
({
//
uni.reLaunch({
url
:
'/pages/index/index'
//没有授权登录
//
url: '/pages/index/index' //没有授权登录
});
//
});
},
1500
)
//
},1500)
}
}
}
},
againdata
()
{
uni
.
reLaunch
({
url
:
'/pages/index/index'
});
},
};
};
onMounted
(()
=>
{});
onMounted
(()
=>
{});
let
that
=
methods
;
let
that
=
methods
;
...
...
src/utils/request.js
View file @
ce0848b2
...
@@ -32,7 +32,10 @@ let request = (param) => {
...
@@ -32,7 +32,10 @@ let request = (param) => {
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
,
icon
:
"none"
,
});
});
uni
.
clearStorageSync
();
uni
.
removeStorageSync
(
'userInfo'
);
uni
.
reLaunch
({
url
:
"/pages/login/login"
})
reject
()
reject
()
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
...
src/utils/requestMall.js
View file @
ce0848b2
...
@@ -39,7 +39,7 @@ let request = (param) => {
...
@@ -39,7 +39,7 @@ let request = (param) => {
duration
:
2000
,
duration
:
2000
,
icon
:
"none"
,
icon
:
"none"
,
});
});
uni
.
clearStorageSync
(
);
uni
.
removeStorageSync
(
'userInfo'
);
}
}
}
}
},
},
...
...
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