Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
蒋勇
zhichan
Commits
796c3d5e
Commit
796c3d5e
authored
Jan 10, 2020
by
刘泽奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
0af37616
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
256 additions
and
134 deletions
+256
-134
igirl-channel-web/app/front/entry/index.ejs
+3
-3
igirl-channel-web/app/front/entry/public/js/admin.js
+107
-105
igirl-channel-web/app/front/entry/public/js/index.js
+41
-4
igirl-channel-web/app/front/vues/pages/jdtrademark/jdtrademark.js
+24
-1
igirl-channel-web/app/front/vues/pages/login/login.js
+81
-21
No files found.
igirl-channel-web/app/front/entry/index.ejs
View file @
796c3d5e
...
@@ -71,13 +71,13 @@
...
@@ -71,13 +71,13 @@
<span>
{{channelMessage}}工商、商标注册平台
</span>
<span>
{{channelMessage}}工商、商标注册平台
</span>
</div>
</div>
<div
v-if=
"user_Name"
>
<div
v-if=
"user_Name"
>
<el-dropdown>
<el-dropdown
@
command=
"headerMenu"
>
<span
class=
"el-dropdown-link"
>
<span
class=
"el-dropdown-link"
>
{{user_Name}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
{{user_Name}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
icon=
"el-icon-
plus
"
>
我的订单
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-
s-order
"
>
我的订单
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-
circle-plus
"
>
退出登录
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-
bicycle"
command=
"loginOut
"
>
退出登录
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
<!-- <span @click="loginOut" v-if="user_Name">退出</span> -->
<!-- <span @click="loginOut" v-if="user_Name">退出</span> -->
...
...
igirl-channel-web/app/front/entry/public/js/admin.js
View file @
796c3d5e
basecomp
.
forEach
(
function
(
comp
)
{
basecomp
.
forEach
(
function
(
comp
)
{
try
{
try
{
var
obj
=
eval
(
"("
+
comp
+
")"
);
var
obj
=
eval
(
"("
+
comp
+
")"
);
Vue
.
component
(
obj
.
vname
,
obj
);
Vue
.
component
(
obj
.
vname
,
obj
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
}
}
});
});
console
.
log
(
"load base component finished..."
);
console
.
log
(
"load base component finished..."
);
function
buildPromise
(
compath
)
{
function
buildPromise
(
compath
)
{
return
Promise
.
resolve
(
new
Promise
(
function
(
resolve
,
reject
)
{
return
Promise
.
resolve
(
new
Promise
(
function
(
resolve
,
reject
)
{
//异步加载组件
//异步加载组件
axios
.
get
(
compath
).
then
(
function
(
res
)
{
axios
.
get
(
compath
).
then
(
function
(
res
)
{
console
.
log
(
compath
);
console
.
log
(
compath
);
// var obj=eval("("+res.data+")");
// var obj=eval("("+res.data+")");
var
obj
=
eval
(
"("
+
unescape
(
res
.
data
)
+
")"
);
var
obj
=
eval
(
"("
+
unescape
(
res
.
data
)
+
")"
);
resolve
(
obj
);
resolve
(
obj
);
}).
catch
(
function
(
reason
)
{
}).
catch
(
function
(
reason
)
{
console
.
log
(
reason
)
console
.
log
(
reason
)
})
})
}));
}));
}
}
function
componentFactory
(
comname
)
{
function
componentFactory
(
comname
)
{
var
compath
=
"/vue/comp/"
+
comname
;
var
compath
=
"/vue/comp/"
+
comname
;
var
tmpFunc
=
function
()
{
var
tmpFunc
=
function
()
{
return
buildPromise
(
compath
);
return
buildPromise
(
compath
);
}
}
return
tmpFunc
;
return
tmpFunc
;
}
}
window
.
componentFactory
=
componentFactory
;
window
.
componentFactory
=
componentFactory
;
const
store
=
new
Vuex
.
Store
({
const
store
=
new
Vuex
.
Store
({
state
:
{
state
:
{
currentCodePath
:
""
,
currentCodePath
:
""
,
currentUser
:
null
,
currentUser
:
null
,
curSelRow
:
{},
curSelRow
:
{},
},
},
});
});
Vue
.
mixin
({
Vue
.
mixin
({
props
:[
"groupName"
,
"modelName"
],
props
:
[
"groupName"
,
"modelName"
],
computed
:
Vuex
.
mapState
({
computed
:
Vuex
.
mapState
({
currentUser
:
state
=>
{
currentUser
:
state
=>
{
return
state
.
currentUser
;
return
state
.
currentUser
;
},
},
codePath
:
state
=>
{
codePath
:
state
=>
{
return
state
.
currentCodePath
;
return
state
.
currentCodePath
;
},
},
ctlName
:
function
()
{
ctlName
:
function
()
{
return
this
.
groupName
+
"/"
+
this
.
modelName
+
"Ctl"
;
return
this
.
groupName
+
"/"
+
this
.
modelName
+
"Ctl"
;
},
},
}),
}),
methods
:
{
methods
:
{
getUrl
(
md
)
{
getUrl
(
md
)
{
return
"web/"
+
this
.
ctlName
+
"/"
+
md
;
return
"web/"
+
this
.
ctlName
+
"/"
+
md
;
},
},
}
}
});
});
var
routes
=
[];
var
routes
=
[];
var
codepaths
=
{};
var
codepaths
=
{};
axios
.
get
(
"/web/common/metaCtl/getRouteConfig"
).
then
(
d
=>
{
axios
.
get
(
"/web/common/metaCtl/getRouteConfig"
).
then
(
d
=>
{
Object
.
keys
(
d
.
data
.
data
.
bizs
).
map
((
k
)
=>
{
Object
.
keys
(
d
.
data
.
data
.
bizs
).
map
((
k
)
=>
{
//path是路由,静态的路由
//path是路由,静态的路由
var
pathTmp
=
d
.
data
.
data
.
bizs
[
k
].
path
;
var
pathTmp
=
d
.
data
.
data
.
bizs
[
k
].
path
;
var
codepath
=
d
.
data
.
data
.
bizs
[
k
].
codepath
;
var
codepath
=
d
.
data
.
data
.
bizs
[
k
].
codepath
;
var
tmp
=
{
"path"
:
pathTmp
,
"components"
:{
var
tmp
=
{
"default"
:
componentFactory
(
d
.
data
.
data
.
bizs
[
k
].
comname
)
"path"
:
pathTmp
,
"components"
:
{
},};
"default"
:
componentFactory
(
d
.
data
.
data
.
bizs
[
k
].
comname
)
},
};
routes
.
push
(
tmp
);
routes
.
push
(
tmp
);
codepaths
[
pathTmp
]
=
codepath
;
//暂存每个叶子节点对应的codepath
codepaths
[
pathTmp
]
=
codepath
;
//暂存每个叶子节点对应的codepath
});
});
console
.
log
(
routes
);
console
.
log
(
routes
);
var
router
=
new
VueRouter
({
var
router
=
new
VueRouter
({
routes
:
routes
,
routes
:
routes
,
});
});
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
store
.
state
.
currentCodePath
=
codepaths
[
to
.
path
];
store
.
state
.
currentCodePath
=
codepaths
[
to
.
path
];
next
();
next
();
});
});
var
app
=
new
Vue
({
var
app
=
new
Vue
({
el
:
"#app"
,
el
:
"#app"
,
router
:
router
,
router
:
router
,
store
:
store
,
store
:
store
,
data
:
function
()
{
data
:
function
()
{
return
{
return
{
loading
:
true
,
loading
:
true
,
logins
:
[
logins
:
[
],
],
};
};
},
},
created
()
{
created
()
{
$
(
window
).
resize
(()
=>
{
$
(
window
).
resize
(()
=>
{
this
.
initWindowShow
();
this
.
initWindowShow
();
});
});
this
.
initWindowShow
();
this
.
initWindowShow
();
this
.
loading
=
false
;
this
.
loading
=
false
;
},
},
updated
()
{
updated
()
{
},
},
mounted
()
{
mounted
()
{
var
self
=
this
;
var
self
=
this
;
if
(
!
this
.
currentUser
)
{
if
(
!
this
.
currentUser
)
{
this
.
logins
.
push
({
"icon"
:
"el-icon-location-outline"
,
"title"
:
"登录"
,
"type"
:
"text"
,
key
:
"login"
,
"isOnGrid"
:
true
});
this
.
logins
.
push
({
"icon"
:
"el-icon-location-outline"
,
"title"
:
"登录"
,
"type"
:
"text"
,
key
:
"login"
,
"isOnGrid"
:
true
});
this
.
logins
.
push
({
"icon"
:
"el-icon-edit-outline"
,
"title"
:
"注册"
,
"type"
:
"text"
,
key
:
"register"
,
"isOnGrid"
:
true
});
this
.
logins
.
push
({
"icon"
:
"el-icon-edit-outline"
,
"title"
:
"注册"
,
"type"
:
"text"
,
key
:
"register"
,
"isOnGrid"
:
true
});
}
else
{
}
else
{
this
.
logins
.
push
({
"icon"
:
"el-icon-arrow-right"
,
"title"
:
"退出"
,
"type"
:
"text"
,
key
:
"exit"
,
"isOnGrid"
:
true
});
this
.
logins
.
push
({
"icon"
:
"el-icon-arrow-right"
,
"title"
:
"退出"
,
"type"
:
"text"
,
key
:
"exit"
,
"isOnGrid"
:
true
});
}
}
},
},
methods
:
{
methods
:
{
initWindowShow
()
{
initWindowShow
()
{
var
h
=
$
(
window
).
height
();
var
h
=
$
(
window
).
height
();
var
m
=
h
-
90
;
var
m
=
h
-
90
;
$
(
"#app"
).
css
(
"min-height"
,
h
+
"px"
);
$
(
"#app"
).
css
(
"min-height"
,
h
+
"px"
);
$
(
"#app-stage"
).
css
(
"min-height"
,
m
+
"px"
);
$
(
"#app-stage"
).
css
(
"min-height"
,
m
+
"px"
);
$
(
"#app"
).
css
(
"visibility"
,
'visible'
);
$
(
"#app"
).
css
(
"visibility"
,
'visible'
);
},
},
localdata
(
key
,
item
)
{
localdata
(
key
,
item
)
{
if
(
item
)
{
if
(
item
)
{
localStorage
.
setItem
(
key
,
JSON
.
stringify
(
item
));
localStorage
.
setItem
(
key
,
JSON
.
stringify
(
item
));
}
else
{
}
else
{
var
strobj
=
localStorage
.
getItem
(
key
);
var
strobj
=
localStorage
.
getItem
(
key
);
if
(
strobj
)
{
if
(
strobj
)
{
return
JSON
.
parse
(
strobj
);
return
JSON
.
parse
(
strobj
);
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}
}
},
},
showMask
()
{
showMask
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
},
},
hideMask
()
{
hideMask
()
{
this
.
loading
=
false
;
this
.
loading
=
false
;
},
},
onMenuSelect
:
function
(
index
,
keyIndex
)
{
onMenuSelect
:
function
(
index
,
keyIndex
)
{
console
.
log
(
index
);
console
.
log
(
index
);
this
.
$router
.
push
(
index
);
this
.
$router
.
push
(
index
);
},
},
...
@@ -150,28 +152,28 @@ basecomp.forEach(function (comp) {
...
@@ -150,28 +152,28 @@ basecomp.forEach(function (comp) {
}
}
}
}
},
},
clkapp
()
{
clkapp
()
{
location
.
href
=
appinfo
.
homePage
;
location
.
href
=
appinfo
.
homePage
;
},
},
async
exitclick
()
{
async
exitclick
()
{
var
d
=
await
this
.
$root
.
postReq
(
"/web/auth/userCtl/exit"
,
{});
var
d
=
await
this
.
$root
.
postReq
(
"/web/auth/userCtl/exit"
,
{});
location
.
href
=
appinfo
.
homePage
;
location
.
href
=
appinfo
.
homePage
;
},
},
async
checkLogin
(
cbk
)
{
async
checkLogin
(
cbk
)
{
var
d
=
await
this
.
$root
.
postReq
(
"/web/auth/userCtl/checkLogin"
,
{});
var
d
=
await
this
.
$root
.
postReq
(
"/web/auth/userCtl/checkLogin"
,
{});
if
(
d
&&
d
.
status
==
0
&&
d
.
data
)
{
if
(
d
&&
d
.
status
==
0
&&
d
.
data
)
{
this
.
$store
.
state
.
currentUser
=
d
.
data
;
this
.
$store
.
state
.
currentUser
=
d
.
data
;
cbk
();
cbk
();
}
else
{
}
else
{
//alert("no login");
//alert("no login");
location
.
href
=
appinfo
.
homePage
;
location
.
href
=
appinfo
.
homePage
;
}
}
},
},
getReq
(
path
,
data
)
{
getReq
(
path
,
data
)
{
var
self
=
this
;
var
self
=
this
;
return
axios
.
get
(
path
,{
params
:
data
,
"headers"
:{
"codepath"
:
this
.
codePath
}}).
then
(
function
(
r
)
{
return
axios
.
get
(
path
,
{
params
:
data
,
"headers"
:
{
"codepath"
:
this
.
codePath
}
}).
then
(
function
(
r
)
{
if
(
r
&&
r
.
data
&&
r
.
data
.
status
==-
99
)
{
if
(
r
&&
r
.
data
&&
r
.
data
.
status
==
-
99
)
{
self
.
$store
.
state
.
currentUser
=
null
;
self
.
$store
.
state
.
currentUser
=
null
;
self
.
hideMask
();
self
.
hideMask
();
self
.
$router
.
push
(
"/"
);
self
.
$router
.
push
(
"/"
);
self
.
$message
({
self
.
$message
({
...
@@ -180,21 +182,21 @@ basecomp.forEach(function (comp) {
...
@@ -180,21 +182,21 @@ basecomp.forEach(function (comp) {
});
});
self
.
showLogin
();
self
.
showLogin
();
return
null
;
return
null
;
}
else
{
}
else
{
if
(
r
.
data
&&
r
.
data
.
bizmsg
&&
r
.
data
.
bizmsg
!=
"empty"
)
{
if
(
r
.
data
&&
r
.
data
.
bizmsg
&&
r
.
data
.
bizmsg
!=
"empty"
)
{
self
.
$message
({
self
.
$message
({
message
:
r
.
data
.
bizmsg
,
message
:
r
.
data
.
bizmsg
,
type
:
'warning'
type
:
'warning'
});
});
}
}
return
r
.
data
?
r
.
data
:
null
;;
return
r
.
data
?
r
.
data
:
null
;;
}
}
});
});
},
},
postReq
(
path
,
data
)
{
postReq
(
path
,
data
)
{
return
axios
.
post
(
path
,
data
,{
"headers"
:{
'codepath'
:
this
.
codePath
}}).
then
(
function
(
r
)
{
return
axios
.
post
(
path
,
data
,
{
"headers"
:
{
'codepath'
:
this
.
codePath
}
}).
then
(
function
(
r
)
{
if
(
r
&&
r
.
data
&&
r
.
data
.
status
==-
99
)
{
if
(
r
&&
r
.
data
&&
r
.
data
.
status
==
-
99
)
{
self
.
$store
.
state
.
currentUser
=
null
;
self
.
$store
.
state
.
currentUser
=
null
;
self
.
hideMask
();
self
.
hideMask
();
self
.
$router
.
push
(
"/"
);
self
.
$router
.
push
(
"/"
);
self
.
$message
({
self
.
$message
({
...
@@ -203,12 +205,12 @@ basecomp.forEach(function (comp) {
...
@@ -203,12 +205,12 @@ basecomp.forEach(function (comp) {
});
});
self
.
showLogin
();
self
.
showLogin
();
return
null
;
return
null
;
}
else
{
}
else
{
return
r
.
data
?
r
.
data
:
null
;
return
r
.
data
?
r
.
data
:
null
;
}
}
});
});
},
},
},
},
});
});
});
});
//});
//});
igirl-channel-web/app/front/entry/public/js/index.js
View file @
796c3d5e
...
@@ -34,6 +34,7 @@ const store = new Vuex.Store({
...
@@ -34,6 +34,7 @@ const store = new Vuex.Store({
currentCodePath
:
""
,
currentCodePath
:
""
,
currentUser
:
null
,
currentUser
:
null
,
curSelRow
:
{},
curSelRow
:
{},
reqUrl
:
""
},
},
});
});
Vue
.
mixin
({
Vue
.
mixin
({
...
@@ -75,8 +76,11 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
...
@@ -75,8 +76,11 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
if
(
to
.
path
==
"/"
&&
location
.
hostname
==
"tm.plus.jdcloud.com"
)
{
if
(
to
.
path
==
"/"
&&
location
.
hostname
==
"tm.plus.jdcloud.com"
)
{
router
.
replace
({
path
:
'/jd/jdtrademark'
});
router
.
replace
({
path
:
'/jd/jdtrademark'
});
}
}
if
(
to
.
path
.
includes
(
'login'
))
{
store
.
state
.
reqUrl
=
from
.
path
;
console
.
log
(
to
,
from
,
store
.
state
.
reqUrl
);
console
.
log
(
to
,
from
);
}
next
();
next
();
});
});
Vue
.
use
(
window
[
'vue-cropper'
]);
Vue
.
use
(
window
[
'vue-cropper'
]);
...
@@ -86,6 +90,8 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
...
@@ -86,6 +90,8 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
store
:
store
,
store
:
store
,
data
:
function
()
{
data
:
function
()
{
return
{
return
{
// 回调地址
reqUrl
:
""
,
// 请求地址
// 请求地址
host
:
``
,
host
:
``
,
// 请求头携带参数
// 请求头携带参数
...
@@ -165,7 +171,6 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
...
@@ -165,7 +171,6 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
commonFooter
:
true
,
commonFooter
:
true
,
user_Name
:
""
,
user_Name
:
""
,
channelMessage
:
""
,
channelMessage
:
""
,
};
};
},
},
created
()
{
created
()
{
...
@@ -176,6 +181,7 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
...
@@ -176,6 +181,7 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
channelName
=
location
.
hash
.
split
(
'/'
)[
1
];
this
.
channelName
=
location
.
hash
.
split
(
'/'
)[
1
];
this
.
accessTitle
();
this
.
accessTitle
();
},
},
updated
()
{
updated
()
{
...
@@ -189,6 +195,10 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
...
@@ -189,6 +195,10 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
this
.
logins
.
push
({
"icon"
:
"el-icon-edit-outline"
,
"title"
:
"注册"
,
"type"
:
"text"
,
key
:
"register"
,
"isOnGrid"
:
true
});
this
.
logins
.
push
({
"icon"
:
"el-icon-edit-outline"
,
"title"
:
"注册"
,
"type"
:
"text"
,
key
:
"register"
,
"isOnGrid"
:
true
});
}
else
{
}
else
{
this
.
logins
.
push
({
"icon"
:
"el-icon-arrow-right"
,
"title"
:
"退出"
,
"type"
:
"text"
,
key
:
"exit"
,
"isOnGrid"
:
true
});
this
.
logins
.
push
({
"icon"
:
"el-icon-arrow-right"
,
"title"
:
"退出"
,
"type"
:
"text"
,
key
:
"exit"
,
"isOnGrid"
:
true
});
};
if
(
$
.
cookie
(
'userpin'
))
{
this
.
user_Name
=
$
.
cookie
(
'userName'
);
this
.
channelUserId
=
$
.
cookie
(
'channelUserId'
);
}
}
},
},
watch
:
{
watch
:
{
...
@@ -227,7 +237,20 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
...
@@ -227,7 +237,20 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
break
;
break
;
}
}
},
},
headerMenu
(
key
)
{
console
.
log
(
key
);
switch
(
key
)
{
case
'loginOut'
:
this
.
loginOut
();
break
;
default
:
break
;
}
},
loginOut
()
{
loginOut
()
{
let
_this
=
this
;
console
.
log
(
this
.
channelName
);
/*
/*
var url = encodeURIComponent("http://tm.plus.jdcloud.com/#/jd/jdtrademark") ;
var url = encodeURIComponent("http://tm.plus.jdcloud.com/#/jd/jdtrademark") ;
...
@@ -235,8 +258,8 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
...
@@ -235,8 +258,8 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
/*
/*
location.href = `http://login.jdcloud.com/logout?callback=http://tm.plus.jdcloud.com/#/jd/jdtrademark`;
location.href = `http://login.jdcloud.com/logout?callback=http://tm.plus.jdcloud.com/#/jd/jdtrademark`;
*/
*/
switch
(
this
.
channelName
)
{
let
_this
=
this
;
case
"jd"
:
$
.
ajax
({
$
.
ajax
({
async
:
true
,
async
:
true
,
url
:
"https://login.jdcloud.com/logout"
,
url
:
"https://login.jdcloud.com/logout"
,
...
@@ -255,6 +278,20 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
...
@@ -255,6 +278,20 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
}
}
}
}
});
});
break
;
case
"bw"
:
$
.
removeCookie
(
"userpin"
);
$
.
removeCookie
(
"userName"
);
$
.
removeCookie
(
"channelUserId"
);
this
.
user_Name
=
""
;
this
.
channelUserId
=
''
;
break
;
default
:
break
;
}
},
},
...
...
igirl-channel-web/app/front/vues/pages/jdtrademark/jdtrademark.js
View file @
796c3d5e
...
@@ -155,9 +155,32 @@
...
@@ -155,9 +155,32 @@
},
},
methods
:
{
methods
:
{
/*全选 */
goIndentList
(){
goIndentList
(){
switch
(
this
.
$root
.
channelName
)
{
case
"jd"
:
location
.
href
=
"https://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=https://tm.plus.jdcloud.com/jdtm/getUser&state=jdindentlist&client_id=9491577327154697"
;
location
.
href
=
"https://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=https://tm.plus.jdcloud.com/jdtm/getUser&state=jdindentlist&client_id=9491577327154697"
;
break
;
case
"bw"
:
console
.
log
(
$
.
cookie
(
"channelUserId"
),
`llllllllllllllllllllllll`
);
if
(
$
.
cookie
(
"channelUserId"
))
{
this
.
$router
.
push
({
path
:
`/
${
this
.
$root
.
channelName
}
/jdindentlist`
,
query
:
{
channelUserId
:
$
.
cookie
(
"channelUserId"
)
}
});
}
else
{
this
.
$router
.
push
({
path
:
`/
${
this
.
$root
.
channelName
}
/login`
,
query
:
{
reqUrl
:
location
.
href
}
});
}
break
;
default
:
break
;
}
},
},
handleCheckAllChange
(
val
)
{
handleCheckAllChange
(
val
)
{
if
(
val
)
{
if
(
val
)
{
...
...
igirl-channel-web/app/front/vues/pages/login/login.js
View file @
796c3d5e
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
}
}
}
}
if
(
rule
.
field
==
"code"
)
{
if
(
rule
.
field
==
"code"
)
{
if
(
that
.
rcode
!=
value
)
{
if
(
that
.
form1
.
code
.
length
!=
6
)
{
return
callback
(
new
Error
(
"输入验证码有误,请重新输入"
));
return
callback
(
new
Error
(
"输入验证码有误,请重新输入"
));
}
}
}
}
...
@@ -94,9 +94,13 @@
...
@@ -94,9 +94,13 @@
{
min
:
6
,
max
:
18
,
message
:
'长度在 6 到 18 个字符'
,
trigger
:
'blur'
}
{
min
:
6
,
max
:
18
,
message
:
'长度在 6 到 18 个字符'
,
trigger
:
'blur'
}
],
],
},
},
reqUrl
:
""
,
}
}
},
},
mounted
:
function
()
{
mounted
:
function
()
{
if
(
this
.
$route
.
query
.
reqUrl
!=
""
)
{
this
.
reqUrl
=
this
.
$route
.
query
.
reqUrl
;
}
},
},
created
:
function
()
{
created
:
function
()
{
...
@@ -106,6 +110,7 @@
...
@@ -106,6 +110,7 @@
}
else
{
}
else
{
this
.
loginUrl
=
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_41110157500594182420192913391824zhuce_background.png"
;
this
.
loginUrl
=
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_41110157500594182420192913391824zhuce_background.png"
;
}
}
},
},
methods
:
{
methods
:
{
handleSelect
(
key
,
keyPath
)
{
handleSelect
(
key
,
keyPath
)
{
...
@@ -140,7 +145,6 @@
...
@@ -140,7 +145,6 @@
this
.
resetall
();
this
.
resetall
();
},
},
register
(){
register
(){
console
.
log
(
this
.
$root
.
channelName
,
"bbbbbbbbbbbb"
);
switch
(
this
.
$root
.
channelName
)
{
switch
(
this
.
$root
.
channelName
)
{
case
"bw"
:
case
"bw"
:
this
.
$router
.
push
({
path
:
`/bw/register`
});
this
.
$router
.
push
({
path
:
`/bw/register`
});
...
@@ -156,7 +160,14 @@
...
@@ -156,7 +160,14 @@
this
.
resetall
();
this
.
resetall
();
},
},
obtaincode1
(){
obtaincode1
(){
this
.
fetchVcode
(
this
.
form1
.
mobile
)
let
obj
=
this
.
$root
.
copyParams
({
mobile
:
this
.
form1
.
mobile
},
"getVerifyCode"
,
"/auth/accessAuth/springBoard"
);
this
.
$root
.
postReq
(
"/web/trademark/tmqueryCtl/doPost"
,
obj
).
then
((
d
)
=>
{
if
(
d
.
status
==
0
)
{
console
.
log
(
"返回信息"
,
d
);
}
else
{
console
.
log
(
d
.
msg
);
}
});
},
},
obtaincode2
(){
obtaincode2
(){
var
that
=
this
;
var
that
=
this
;
...
@@ -245,32 +256,58 @@
...
@@ -245,32 +256,58 @@
},
},
checklogin1
(){
checklogin1
(){
var
that
=
this
;
var
that
=
this
;
var
obj
=
{
var
userInfo
=
{
mobile
:
that
.
form1
.
mobile
,
mobile
:
that
.
form1
.
mobile
,
vcode
:
that
.
form1
.
code
,
};
};
that
.
$refs
.
form1
.
validate
(
valid
=>
{
that
.
$refs
.
form1
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
that
.
$root
.
postReq
(
"/web/userCtl/loginByMobile"
,
{
u
:
obj
}).
then
(
function
(
d
)
{
let
obj
=
this
.
$root
.
copyParams
(
userInfo
,
"userPinByLgoinVcode"
,
"/auth/accessAuth/springBoard"
);
this
.
$root
.
loading
=
true
;
this
.
$root
.
postReq
(
"/web/trademark/tmqueryCtl/doPost"
,
obj
).
then
((
d
)
=>
{
this
.
$root
.
loading
=
false
;
if
(
d
.
status
==
0
)
{
if
(
d
.
status
==
0
)
{
console
.
log
(
"..................................................helllo.................................."
);
$
.
cookie
(
'channelUserId'
,
d
.
data
.
channelUserId
);
$
.
cookie
(
'userName'
,
d
.
data
.
userName
);
$
.
cookie
(
'userpin'
,
d
.
data
.
userpin
);
this
.
$root
.
user_Name
=
d
.
data
.
userName
;
this
.
$root
.
channelUserId
=
d
.
data
.
channelUserId
;
that
.
$root
.
refreshLoginState
(()
=>
{
console
.
log
(
"....................................................................................innner"
);
var
afto
=
localStorage
.
getItem
(
"afterLogin"
);
if
(
!
this
.
$store
.
state
.
reqUrl
)
{
if
(
afto
)
{
this
.
$router
.
push
(
{
that
.
$root
.
pushx
(
JSON
.
parse
(
afto
));
path
:
`/
${
this
.
$root
.
channelName
}
/jdtrademark`
,
localStorage
.
removeItem
(
"afterLogin"
);
query
:
{
channelUserId
:
d
.
data
.
channelUserId
}
that
.
$root
.
removetab
(
"/login"
);
})
}
else
{
}
else
{
location
.
reload
();
this
.
$router
.
push
({
path
:
`
${
this
.
$store
.
state
.
reqUrl
}
`
,
query
:
{
channelUserId
:
d
.
data
.
channelUserId
}
})
}
}
console
.
log
(
"返回信息"
,
d
)
}
else
if
(
d
.
status
==
2030
)
{
this
.
$message
({
message
:
d
.
msg
,
type
:
'warning'
});
}
else
if
(
d
.
status
==
2060
)
{
this
.
$message
({
message
:
d
.
msg
,
type
:
'warning'
});
}
else
{
this
.
$message
({
message
:
"请求失败"
,
type
:
'warning'
});
});
}
}
})
})
;
}
}
})
})
},
},
/**密码登录2222222222 */
checklogin2
(){
checklogin2
(){
var
that
=
this
;
var
that
=
this
;
var
obj
=
{
var
obj
=
{
...
@@ -281,19 +318,42 @@
...
@@ -281,19 +318,42 @@
if
(
valid
)
{
if
(
valid
)
{
var
userInfo
=
that
.
$root
.
copyParams
(
obj
,
"userPinByLgoin"
,
"/auth/accessAuth/springBoard"
);
var
userInfo
=
that
.
$root
.
copyParams
(
obj
,
"userPinByLgoin"
,
"/auth/accessAuth/springBoard"
);
console
.
log
(
userInfo
,
'mmmmmmmmmmmmmmmmmmmmmm'
);
console
.
log
(
userInfo
,
'mmmmmmmmmmmmmmmmmmmmmm'
);
this
.
$root
.
loading
=
true
;
this
.
$root
.
postReq
(
"/web/trademark/tmqueryCtl/doPost"
,
userInfo
).
then
((
d
)
=>
{
this
.
$root
.
postReq
(
"/web/trademark/tmqueryCtl/doPost"
,
userInfo
).
then
((
d
)
=>
{
this
.
$root
.
loading
=
false
;
if
(
d
.
status
==
0
)
{
if
(
d
.
status
==
0
)
{
$
.
cookie
(
'channelUserId'
,
this
.
$root
.
channelUserId
);
this
.
$root
.
channelUserId
=
decodeURIComponent
(
d
.
data
.
channelUserId
);
$
.
cookie
(
'channelUserId'
,
d
.
data
.
channelUserId
);
$
.
cookie
(
'channelUserId'
,
d
.
data
.
channelUserId
);
$
.
cookie
(
'userName'
,
d
.
data
.
userName
);
$
.
cookie
(
'userName'
,
d
.
data
.
userName
);
$
.
cookie
(
'userpin'
,
d
.
data
.
userpin
);
this
.
$root
.
user_Name
=
d
.
data
.
userName
;
this
.
$root
.
channelUserId
=
d
.
data
.
channelUserId
;
if
(
!
this
.
$store
.
state
.
reqUrl
)
{
this
.
$router
.
push
({
path
:
`/
${
this
.
$root
.
channelName
}
/jdtrademark`
,
query
:
{
channelUserId
:
d
.
data
.
channelUserId
}
})
}
else
{
this
.
$router
.
push
({
path
:
`
${
this
.
$store
.
state
.
reqUrl
}
`
,
query
:
{
channelUserId
:
d
.
data
.
channelUserId
}
})
}
console
.
log
(
"返回信息"
,
d
)
console
.
log
(
"返回信息"
,
d
)
}
else
if
(
d
.
status
==
2010
)
{
}
else
if
(
d
.
status
==
2010
)
{
console
.
log
(
d
.
msg
);
this
.
$message
({
message
:
d
.
msg
,
type
:
'warning'
});
}
else
if
(
d
.
status
==
2060
)
{
}
else
if
(
d
.
status
==
2060
)
{
console
.
log
(
d
.
msg
);
this
.
$message
({
message
:
d
.
msg
,
type
:
'warning'
});
}
else
{
}
else
{
console
.
log
(
d
.
msg
);
this
.
$message
({
message
:
"请求失败"
,
type
:
'warning'
});
}
}
});
});
}
}
...
...
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