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
97702c2e
Commit
97702c2e
authored
May 07, 2020
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
感兴趣标签登录
parent
14921c4b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
118 additions
and
80 deletions
+118
-80
commonApi.js
src/common/commonApi.js
+5
-0
public.js
src/common/public.js
+0
-28
emCodeCmpt.vue
src/views/mobile/loginregister/emCodeCmpt.vue
+25
-13
emPwdCmpt.vue
src/views/mobile/loginregister/emPwdCmpt.vue
+24
-13
phoneCodeCmpt.vue
src/views/mobile/loginregister/phoneCodeCmpt.vue
+24
-12
phonePwdCmpt.vue
src/views/mobile/loginregister/phonePwdCmpt.vue
+25
-13
selectInterset.vue
src/views/mobile/selectInterset.vue
+15
-1
No files found.
src/common/commonApi.js
View file @
97702c2e
...
...
@@ -13,5 +13,10 @@ export default {
//提交感兴趣领域标签
postIntersetedDictAxios
(
params
){
return
api
.
fetchPost
(
'/business/content/addEmpDataLabel'
,
params
);
},
//获取用户选择标签
getUserIntersetedFlagAxios
(){
return
api
.
fetchPost
(
'/business/content/selectEmpDataLabelList'
)
}
}
src/common/public.js
View file @
97702c2e
...
...
@@ -2,7 +2,6 @@ import Vue from 'vue';
import
publicFun
from
'@/assets/js/public.js'
;
import
api
from
'./commonApi'
;
let
userInfoObj
=
""
;
window
.
isHasInterFlag
=
""
;
export
default
{
//根据ID获取name,适用于select,radio
getLabelByIdPublic
(
key
,
data
,
name
,
keyword
){
...
...
@@ -285,32 +284,6 @@ export default {
'updateTimelineShareData'
]
// 需要使用的JS接口列表
})
},
//获取标签
getIntersetFlag
(){
return
api
.
tipInfo
().
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
if
(
res
.
result
.
indexOf
(
'TIP005'
)
>-
1
)
return
true
;
else
return
false
;
}
else
{
console
.
log
(
res
.
msg
);
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
})
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag
(){
var
resultData
=
""
;
// 以下是把 m 的 `this` 指向到本组件
let
pdata
=
this
.
getIntersetFlag
();
// ******************console.log(pdata);******************
let
a
=
Promise
.
resolve
(
pdata
);
a
.
then
(
function
(
result
)
{
window
.
isHasInterFlag
=
result
})
}
}
\ No newline at end of file
src/views/mobile/loginregister/emCodeCmpt.vue
View file @
97702c2e
...
...
@@ -150,23 +150,35 @@
}
this
.
publicFun
.
setUserInfoCookie
(
"userInfo"
,
that
.
Base64
.
encode
(
JSON
.
stringify
(
data
)));
globalMsg
.
$emit
(
'getUserInfo'
)
publicFunc
.
isSelectedInterstedFlag
();
if
(
this
.
publicFun
.
getCookie
(
"userInfo"
)
&&
window
.
isHasInterFlag
){
this
.
isShow
=
true
;
this
.
isShowFlag
=
false
;
this
.
routerLinkFunc
();
}
else
{
if
(
this
.
publicFun
.
getUserDetailRoleFunc
()
!=
2
){
this
.
isShow
=
false
;
this
.
isShowFlag
=
true
;
}
else
this
.
routerLinkFunc
();
}
that
.
timeOutReturn
();
this
.
isSelectedInterstedFlag
();
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag
(){
let
m
=
selectFlag
.
methods
.
getIntersetFlag
,
that
=
this
;
// 以下是把 m 的 `this` 指向到本组件
let
pdata
=
m
.
call
(
this
);
// ******************console.log(pdata);******************
let
a
=
Promise
.
resolve
(
pdata
);
a
.
then
(
function
(
result
)
{
if
(
that
.
publicFun
.
getCookie
(
"userInfo"
)
&&
result
){
that
.
isShow
=
true
;
that
.
isShowFlag
=
false
;
that
.
routerLinkFunc
();
}
else
{
if
(
that
.
publicFun
.
getUserDetailRoleFunc
()
!=
2
){
that
.
isShow
=
false
;
that
.
isShowFlag
=
true
;
}
else
that
.
routerLinkFunc
();
}
that
.
timeOutReturn
()
})
},
//登录
handleLogin
(
type
,
formName
)
{
const
that
=
this
;
...
...
src/views/mobile/loginregister/emPwdCmpt.vue
View file @
97702c2e
...
...
@@ -136,21 +136,32 @@
}
this
.
publicFun
.
setUserInfoCookie
(
"userInfo"
,
that
.
Base64
.
encode
(
JSON
.
stringify
(
data
)));
globalMsg
.
$emit
(
'getUserInfo'
)
publicFunc
.
isSelectedInterstedFlag
();
if
(
this
.
publicFun
.
getCookie
(
"userInfo"
)
&&
window
.
isHasInterFlag
){
this
.
isShow
=
true
;
this
.
isShowFlag
=
false
;
this
.
routerLinkFunc
();
}
else
{
if
(
this
.
publicFun
.
getUserDetailRoleFunc
()
!=
2
){
this
.
isShow
=
false
;
this
.
isShowFlag
=
true
;
}
else
this
.
routerLinkFunc
();
}
this
.
timeOutReturn
();
this
.
isSelectedInterstedFlag
();
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag
(){
let
m
=
selectFlag
.
methods
.
getIntersetFlag
,
that
=
this
;
// 以下是把 m 的 `this` 指向到本组件
let
pdata
=
m
.
call
(
this
);
// ******************console.log(pdata);******************
let
a
=
Promise
.
resolve
(
pdata
);
a
.
then
(
function
(
result
)
{
if
(
that
.
publicFun
.
getCookie
(
"userInfo"
)
&&
result
){
that
.
isShow
=
true
;
that
.
isShowFlag
=
false
;
that
.
routerLinkFunc
();
}
else
{
if
(
that
.
publicFun
.
getUserDetailRoleFunc
()
!=
2
){
that
.
isShow
=
false
;
that
.
isShowFlag
=
true
;
}
else
that
.
routerLinkFunc
();
}
that
.
timeOutReturn
()
})
},
//登录
handleLogin
(
type
,
formName
)
{
...
...
src/views/mobile/loginregister/phoneCodeCmpt.vue
View file @
97702c2e
...
...
@@ -137,19 +137,31 @@
}
this
.
publicFun
.
setUserInfoCookie
(
"userInfo"
,
that
.
Base64
.
encode
(
JSON
.
stringify
(
data
)));
globalMsg
.
$emit
(
'getUserInfo'
)
publicFunc
.
isSelectedInterstedFlag
();
if
(
this
.
publicFun
.
getCookie
(
"userInfo"
)
&&
window
.
isHasInterFlag
){
this
.
isShow
=
true
;
this
.
isShowFlag
=
false
;
this
.
routerLinkFunc
();
this
.
isSelectedInterstedFlag
();
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag
(){
let
m
=
selectFlag
.
methods
.
getIntersetFlag
,
that
=
this
;
// 以下是把 m 的 `this` 指向到本组件
let
pdata
=
m
.
call
(
this
);
// ******************console.log(pdata);******************
let
a
=
Promise
.
resolve
(
pdata
);
a
.
then
(
function
(
result
)
{
if
(
that
.
publicFun
.
getCookie
(
"userInfo"
)
&&
result
){
that
.
isShow
=
true
;
that
.
isShowFlag
=
false
;
that
.
routerLinkFunc
();
}
else
{
if
(
that
.
publicFun
.
getUserDetailRoleFunc
()
!=
2
){
that
.
isShow
=
false
;
that
.
isShowFlag
=
true
;
}
else
that
.
routerLinkFunc
();
}
that
.
timeOutReturn
()
})
}
else
{
if
(
this
.
publicFun
.
getUserDetailRoleFunc
()
!=
2
){
this
.
isShow
=
false
;
this
.
isShowFlag
=
true
;
}
else
this
.
routerLinkFunc
();
}
that
.
timeOutReturn
();
},
routerLinkFunc
(){
...
...
src/views/mobile/loginregister/phonePwdCmpt.vue
View file @
97702c2e
...
...
@@ -175,19 +175,7 @@
}
this
.
publicFun
.
setUserInfoCookie
(
"userInfo"
,
that
.
Base64
.
encode
(
JSON
.
stringify
(
data
)));
globalMsg
.
$emit
(
'getUserInfo'
)
publicFunc
.
isSelectedInterstedFlag
();
if
(
this
.
publicFun
.
getCookie
(
"userInfo"
)
&&
window
.
isHasInterFlag
){
this
.
isShow
=
true
;
this
.
isShowFlag
=
false
;
this
.
routerLinkFunc
();
}
else
{
if
(
this
.
publicFun
.
getUserDetailRoleFunc
()
!=
2
){
this
.
isShow
=
false
;
this
.
isShowFlag
=
true
;
}
else
this
.
routerLinkFunc
();
}
that
.
timeOutReturn
()
this
.
isSelectedInterstedFlag
();
},
...
...
@@ -229,6 +217,30 @@
postData
(){
this
.
routerLinkFunc
()
},
//是否选择了感兴趣领域标签
isSelectedInterstedFlag
(){
let
m
=
selectFlag
.
methods
.
getIntersetFlag
,
that
=
this
;
// 以下是把 m 的 `this` 指向到本组件
let
pdata
=
m
.
call
(
this
);
// ******************console.log(pdata);******************
let
a
=
Promise
.
resolve
(
pdata
);
a
.
then
(
function
(
result
)
{
if
(
that
.
publicFun
.
getCookie
(
"userInfo"
)
&&
result
){
that
.
isShow
=
true
;
that
.
isShowFlag
=
false
;
that
.
routerLinkFunc
();
}
else
{
if
(
that
.
publicFun
.
getUserDetailRoleFunc
()
!=
2
){
that
.
isShow
=
false
;
that
.
isShowFlag
=
true
;
}
else
that
.
routerLinkFunc
();
}
that
.
timeOutReturn
()
})
}
},
mounted
()
{
...
...
src/views/mobile/selectInterset.vue
View file @
97702c2e
...
...
@@ -48,7 +48,21 @@
}).
catch
(
err
=>
{
this
.
$toast
(
err
);
})
}
},
//获取标签
getIntersetFlag
(){
return
api
.
tipInfo
().
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
if
(
res
.
result
.
indexOf
(
'TIP005'
)
>-
1
)
return
true
;
else
return
false
;
}
else
{
console
.
log
(
res
.
msg
);
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
})
},
},
mounted
(){
this
.
getInitSelect
();
...
...
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