Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
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
front-end-dev
techbook
Commits
a11cd458
Commit
a11cd458
authored
Nov 03, 2020
by
anxixi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录相关功能
parent
2ae9a6b6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
12 deletions
+41
-12
index.css
public/css/index.css
+3
-0
PageTopindex.vue
src/components/index/PageTopindex.vue
+16
-5
mbByCodeCmpt.vue
src/components/login/mbByCodeCmpt.vue
+5
-0
mbByPwdCmpt.vue
src/components/login/mbByPwdCmpt.vue
+6
-2
myevent.vue
src/views/findeventpage/myevent.vue
+3
-3
mobileLoginCmpt.vue
src/views/loginregister/pages/mobileLoginCmpt.vue
+8
-2
No files found.
public/css/index.css
View file @
a11cd458
...
...
@@ -6502,6 +6502,9 @@
.el-loading-mask.is-fullscreen
{
position
:
fixed
}
.el-loading-parent--hidden
{
overflow
:
auto
!important
;
}
.el-loading-mask.is-fullscreen
.el-loading-spinner
{
margin-top
:
-25px
...
...
src/components/index/PageTopindex.vue
View file @
a11cd458
...
...
@@ -156,6 +156,13 @@
</el-drawer>
</div>
<el-dialog
:visible
.
sync=
"expertVisible"
width=
"500px"
:append-to-body=
"true"
:close-on-click-modal=
"false"
>
<div
v-if=
"expertVisible"
class=
"loginform"
style=
"width: 320px;margin: 0 auto;text-align: center;"
>
<loginbar
:tocurrent=
"true"
></loginbar>
</div>
</el-dialog>
<wxexpertVisible
ref=
"wxlogin"
@
dataEvent=
"successlogin"
></wxexpertVisible>
</div>
</
template
>
...
...
@@ -165,6 +172,7 @@
import
api
from
"../../views/loginregister/api/api"
;
import
$
from
'jquery'
;
import
wxexpertVisible
from
"../../views/index/pages/wxlogin"
;
import
loginbar
from
'../../views/loginregister/pages/mobileLoginCmpt'
//非必要
export
default
{
name
:
"PageTopindex"
,
...
...
@@ -199,13 +207,14 @@
direction
:
'rtl'
,
positions
:
false
,
keyword_search
:
false
,
expertVisible
:
false
,
hrefweb
:
"https://open.weixin.qq.com/connect/qrconnect?appid=wxf7c7984d24495e1d&redirect_uri="
+
encodeURIComponent
(
this
.
publicFun
.
getCurrentHrefEnv
()
+
'#/pcauth'
)
+
"&response_type=code&scope=snsapi_login&state=#wechat_redirect"
,
}
},
props
:[
'tabpath'
],
components
:
{
wxexpertVisible
},
components
:
{
wxexpertVisible
,
loginbar
},
methods
:
{
//微信授权
wxopenlogin
(){
...
...
@@ -261,14 +270,16 @@
},
//登录
handleLogin
(){
if
(
this
.
$i18n
.
locale
==
"zh-CN"
)
this
.
$router
.
push
(
"/mobileLoginCmpt"
);
else
this
.
$router
.
push
(
'/emailLoginCmpt'
);
this
.
expertVisible
=
true
;
// if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileLoginCmpt");
// else this.$router.push('/emailLoginCmpt');
},
//注册
handleRegister
(){
if
(
this
.
$i18n
.
locale
==
"zh-CN"
)
this
.
$router
.
push
(
"/mobileRegisterCmpt"
);
else
this
.
$router
.
push
(
'/emailRegisterCmpt'
);
this
.
expertVisible
=
true
;
// if (this.$i18n.locale == "zh-CN") this.$router.push("/mobileRegisterCmpt");
// else this.$router.push('/emailRegisterCmpt');
},
//抽屉 去哪里
handleTo
(
type
){
...
...
src/components/login/mbByCodeCmpt.vue
View file @
a11cd458
...
...
@@ -79,6 +79,7 @@
outSideParams
:
window
.
location
.
href
.
split
(
"?"
)?
window
.
location
.
href
.
split
(
"?"
)[
1
]:
null
}
},
props
:[
'tocurrent'
],
methods
:{
timeOutReturn
(){
...
...
@@ -147,12 +148,16 @@
if
(
res
.
code
==
0
){
if
(
!
res
.
result
){
this
.
$router
.
push
(
"/setPassword"
);
}
else
{
if
(
this
.
tocurrent
){
globalMsg
.
$emit
(
'islogin'
);
}
else
{
if
(
this
.
publicFun
.
isgetUserRoleFunc
(
1
))
this
.
$router
.
push
(
"/sys.user"
);
else
{
if
(
this
.
publicFun
.
isgetUserRoleFunc
(
8
)
||
this
.
publicFun
.
isgetUserRoleFunc
(
4
)
||
this
.
publicFun
.
isgetUserRoleFunc
(
7
))
this
.
$router
.
push
({
path
:
"/seeprojectlist"
,
query
:{
remind
:
true
}});
else
this
.
$router
.
push
(
"/seeprojectlist"
);
}
}
this
.
timeOutReturn
();
}
}
else
{
...
...
src/components/login/mbByPwdCmpt.vue
View file @
a11cd458
...
...
@@ -51,6 +51,7 @@
outSideParams
:
window
.
location
.
href
.
split
(
"?"
)?
window
.
location
.
href
.
split
(
"?"
)[
1
]:
null
}
},
props
:[
'tocurrent'
],
methods
:{
timeOutReturn
(){
...
...
@@ -165,13 +166,16 @@
}
this
.
publicFun
.
setUserInfoCookieType
(
that
.
Base64
.
encode
(
JSON
.
stringify
(
data
)));
this
.
hasSetPassword
();
that
.
timeOutReturn
()
if
(
this
.
tocurrent
){
globalMsg
.
$emit
(
'islogin'
);
}
else
{
if
(
this
.
publicFun
.
isgetUserRoleFunc
(
1
))
this
.
$router
.
push
(
"/sys.user"
);
else
{
if
(
this
.
publicFun
.
isgetUserRoleFunc
(
8
)
||
this
.
publicFun
.
isgetUserRoleFunc
(
4
)
||
this
.
publicFun
.
isgetUserRoleFunc
(
7
))
this
.
$router
.
push
({
path
:
"/seeprojectlist"
,
query
:{
remind
:
true
}});
else
this
.
$router
.
push
(
"/seeprojectlist"
);
}
that
.
timeOutReturn
()
}
},
hasSetPassword
(){
...
...
src/views/findeventpage/myevent.vue
View file @
a11cd458
...
...
@@ -88,7 +88,7 @@
if
(
row
.
baseLive
.
liveState
!=
0
){
if
(
this
.
userInfo
&&
this
.
userInfo
.
empId
==
row
.
createdBy
){
if
(
row
.
baseLive
.
liveState
==
1
||
row
.
baseLive
.
liveBack
==
0
){
window
.
open
(
this
.
publicFun
.
getCurrentHrefEnv
()
+
"#/eventlive
"
);
window
.
open
(
this
.
publicFun
.
getCurrentHrefEnv
()
+
"#/eventlive
?url="
+
liveUrl
);
}
}
else
{
if
(
row
.
baseLive
.
liveState
==
2
&&
row
.
baseLive
.
liveBack
==
0
){
...
...
@@ -96,7 +96,7 @@
this
.
$refs
.
login
.
isexpertVisible
();
return
}
window
.
open
(
this
.
publicFun
.
getCurrentHrefEnv
()
+
"#/eventlive
"
);
window
.
open
(
this
.
publicFun
.
getCurrentHrefEnv
()
+
"#/eventlive
?url="
+
liveUrl
);
}
else
{
if
(
row
.
baseLive
.
livePowers
==
0
&&
row
.
activityState
==
2
&&
row
.
isJoin
==
2
){
if
(
!
this
.
publicFun
.
getUserInfoCookieType
()){
...
...
@@ -114,7 +114,7 @@
this
.
$refs
.
login
.
isexpertVisible
();
return
}
window
.
open
(
this
.
publicFun
.
getCurrentHrefEnv
()
+
"#/eventlive
"
);
window
.
open
(
this
.
publicFun
.
getCurrentHrefEnv
()
+
"#/eventlive
?url="
+
liveUrl
);
}
}
}
...
...
src/views/loginregister/pages/mobileLoginCmpt.vue
View file @
a11cd458
...
...
@@ -3,12 +3,16 @@
<p>
{{
$t
(
"login.title"
)
}}
</p>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
:label=
"$t('login.phonePwdLogin')"
name=
"first"
>
<mbByPwdCmpt></mbByPwdCmpt>
<mbByPwdCmpt
:tocurrent=
"tocurrent"
></mbByPwdCmpt>
</el-tab-pane>
<el-tab-pane
:label=
"$t('login.phoneCodeLogin')"
name=
"second"
>
<mbByCodeCmpt></mbByCodeCmpt>
<mbByCodeCmpt
:tocurrent=
"tocurrent"
></mbByCodeCmpt>
</el-tab-pane>
</el-tabs>
<div
v-if=
"$i18n.locale=='zh-CN'&&tocurrent"
style=
"margin-top: -20px;text-align: center;"
>
<el-divider>
其他登录方式
</el-divider>
<p><a
:href=
"hrefweb"
><i
style=
"color: #00C800;font-size: 28px;"
class=
"iconfont icon-gongzhonghao"
></i></a></p>
</div>
</div>
</
template
>
...
...
@@ -21,9 +25,11 @@
mbByPwdCmpt
,
mbByCodeCmpt
},
props
:[
'tocurrent'
],
data
()
{
return
{
activeName
:
"first"
,
hrefweb
:
"https://open.weixin.qq.com/connect/qrconnect?appid=wxf7c7984d24495e1d&redirect_uri="
+
encodeURIComponent
(
this
.
publicFun
.
getCurrentHrefEnv
()
+
'#/pcauth'
)
+
"&response_type=code&scope=snsapi_login&state=#wechat_redirect"
,
}
},
methods
:
{
...
...
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