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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
171 additions
and
51 deletions
+171
-51
igirl-channel-web/app/front/entry/index.ejs
+3
-3
igirl-channel-web/app/front/entry/public/js/admin.js
+0
-0
igirl-channel-web/app/front/entry/public/js/index.js
+59
-22
igirl-channel-web/app/front/vues/pages/jdtrademark/jdtrademark.js
+26
-3
igirl-channel-web/app/front/vues/pages/login/login.js
+83
-23
No files found.
igirl-channel-web/app/front/entry/index.ejs
View file @
796c3d5e
...
...
@@ -71,13 +71,13 @@
<span>
{{channelMessage}}工商、商标注册平台
</span>
</div>
<div
v-if=
"user_Name"
>
<el-dropdown>
<el-dropdown
@
command=
"headerMenu"
>
<span
class=
"el-dropdown-link"
>
{{user_Name}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
icon=
"el-icon-
plus
"
>
我的订单
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-
circle-plus
"
>
退出登录
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-
s-order
"
>
我的订单
</el-dropdown-item>
<el-dropdown-item
icon=
"el-icon-
bicycle"
command=
"loginOut
"
>
退出登录
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <span @click="loginOut" v-if="user_Name">退出</span> -->
...
...
igirl-channel-web/app/front/entry/public/js/admin.js
View file @
796c3d5e
This diff is collapsed.
Click to expand it.
igirl-channel-web/app/front/entry/public/js/index.js
View file @
796c3d5e
...
...
@@ -34,6 +34,7 @@ const store = new Vuex.Store({
currentCodePath
:
""
,
currentUser
:
null
,
curSelRow
:
{},
reqUrl
:
""
},
});
Vue
.
mixin
({
...
...
@@ -75,8 +76,11 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
if
(
to
.
path
==
"/"
&&
location
.
hostname
==
"tm.plus.jdcloud.com"
)
{
router
.
replace
({
path
:
'/jd/jdtrademark'
});
}
console
.
log
(
to
,
from
);
if
(
to
.
path
.
includes
(
'login'
))
{
store
.
state
.
reqUrl
=
from
.
path
;
console
.
log
(
to
,
from
,
store
.
state
.
reqUrl
);
}
next
();
});
Vue
.
use
(
window
[
'vue-cropper'
]);
...
...
@@ -86,6 +90,8 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
store
:
store
,
data
:
function
()
{
return
{
// 回调地址
reqUrl
:
""
,
// 请求地址
host
:
``
,
// 请求头携带参数
...
...
@@ -165,7 +171,6 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
commonFooter
:
true
,
user_Name
:
""
,
channelMessage
:
""
,
};
},
created
()
{
...
...
@@ -176,6 +181,7 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
this
.
loading
=
false
;
this
.
channelName
=
location
.
hash
.
split
(
'/'
)[
1
];
this
.
accessTitle
();
},
updated
()
{
...
...
@@ -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
});
}
else
{
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
:
{
...
...
@@ -227,7 +237,20 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
break
;
}
},
headerMenu
(
key
)
{
console
.
log
(
key
);
switch
(
key
)
{
case
'loginOut'
:
this
.
loginOut
();
break
;
default
:
break
;
}
},
loginOut
()
{
let
_this
=
this
;
console
.
log
(
this
.
channelName
);
/*
var url = encodeURIComponent("http://tm.plus.jdcloud.com/#/jd/jdtrademark") ;
...
...
@@ -235,26 +258,40 @@ axios.get("/web/common/metaCtl/getRouteConfig").then(d => {
/*
location.href = `http://login.jdcloud.com/logout?callback=http://tm.plus.jdcloud.com/#/jd/jdtrademark`;
*/
switch
(
this
.
channelName
)
{
case
"jd"
:
$
.
ajax
({
async
:
true
,
url
:
"https://login.jdcloud.com/logout"
,
type
:
"GET"
,
dataType
:
"jsonp"
,
jsonp
:
'callback'
,
jsonpCallback
:
'handleResponse'
,
data
:
{
},
success
:
function
(
response
,
status
,
xhr
)
{
console
.
log
(
'状态为:'
+
status
+
',状态是:'
+
xhr
.
statusText
);
console
.
log
(
response
);
if
(
response
.
code
==
0
)
{
console
.
log
(
response
);
_this
.
$router
.
push
({
path
:
`/
${
_this
.
$root
.
channelName
}
/jdtrademark`
});
}
}
});
break
;
case
"bw"
:
$
.
removeCookie
(
"userpin"
);
$
.
removeCookie
(
"userName"
);
$
.
removeCookie
(
"channelUserId"
);
this
.
user_Name
=
""
;
this
.
channelUserId
=
''
;
break
;
default
:
break
;
}
let
_this
=
this
;
$
.
ajax
({
async
:
true
,
url
:
"https://login.jdcloud.com/logout"
,
type
:
"GET"
,
dataType
:
"jsonp"
,
jsonp
:
'callback'
,
jsonpCallback
:
'handleResponse'
,
data
:
{
},
success
:
function
(
response
,
status
,
xhr
)
{
console
.
log
(
'状态为:'
+
status
+
',状态是:'
+
xhr
.
statusText
);
console
.
log
(
response
);
if
(
response
.
code
==
0
)
{
console
.
log
(
response
);
_this
.
$router
.
push
({
path
:
`/
${
_this
.
$root
.
channelName
}
/jdtrademark`
});
}
}
});
},
...
...
igirl-channel-web/app/front/vues/pages/jdtrademark/jdtrademark.js
View file @
796c3d5e
...
...
@@ -155,9 +155,32 @@
},
methods
:
{
/*全选 */
goIndentList
(){
location
.
href
=
"https://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=https://tm.plus.jdcloud.com/jdtm/getUser&state=jdindentlist&client_id=9491577327154697"
;
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"
;
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
)
{
if
(
val
)
{
...
...
@@ -198,7 +221,7 @@
jumpJdProductDetails
(
code
){
console
.
log
(
this
.
$root
.
channelName
);
switch
(
this
.
$root
.
channelName
)
{
case
"jd"
:
if
(
code
.
channelItemCode
)
{
...
...
igirl-channel-web/app/front/vues/pages/login/login.js
View file @
796c3d5e
...
...
@@ -12,7 +12,7 @@
}
}
if
(
rule
.
field
==
"code"
)
{
if
(
that
.
rcode
!=
value
)
{
if
(
that
.
form1
.
code
.
length
!=
6
)
{
return
callback
(
new
Error
(
"输入验证码有误,请重新输入"
));
}
}
...
...
@@ -94,9 +94,13 @@
{
min
:
6
,
max
:
18
,
message
:
'长度在 6 到 18 个字符'
,
trigger
:
'blur'
}
],
},
reqUrl
:
""
,
}
},
mounted
:
function
()
{
if
(
this
.
$route
.
query
.
reqUrl
!=
""
)
{
this
.
reqUrl
=
this
.
$route
.
query
.
reqUrl
;
}
},
created
:
function
()
{
...
...
@@ -106,6 +110,7 @@
}
else
{
this
.
loginUrl
=
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_41110157500594182420192913391824zhuce_background.png"
;
}
},
methods
:
{
handleSelect
(
key
,
keyPath
)
{
...
...
@@ -140,7 +145,6 @@
this
.
resetall
();
},
register
(){
console
.
log
(
this
.
$root
.
channelName
,
"bbbbbbbbbbbb"
);
switch
(
this
.
$root
.
channelName
)
{
case
"bw"
:
this
.
$router
.
push
({
path
:
`/bw/register`
});
...
...
@@ -156,7 +160,14 @@
this
.
resetall
();
},
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
(){
var
that
=
this
;
...
...
@@ -245,32 +256,58 @@
},
checklogin1
(){
var
that
=
this
;
var
obj
=
{
var
userInfo
=
{
mobile
:
that
.
form1
.
mobile
,
vcode
:
that
.
form1
.
code
,
};
that
.
$refs
.
form1
.
validate
(
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
)
{
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
(
afto
)
{
that
.
$root
.
pushx
(
JSON
.
parse
(
afto
));
localStorage
.
removeItem
(
"afterLogin"
);
that
.
$root
.
removetab
(
"/login"
);
}
else
{
location
.
reload
();
}
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
)
}
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
(){
var
that
=
this
;
var
obj
=
{
...
...
@@ -281,19 +318,42 @@
if
(
valid
)
{
var
userInfo
=
that
.
$root
.
copyParams
(
obj
,
"userPinByLgoin"
,
"/auth/accessAuth/springBoard"
);
console
.
log
(
userInfo
,
'mmmmmmmmmmmmmmmmmmmmmm'
);
this
.
$root
.
loading
=
true
;
this
.
$root
.
postReq
(
"/web/trademark/tmqueryCtl/doPost"
,
userInfo
).
then
((
d
)
=>
{
this
.
$root
.
loading
=
false
;
if
(
d
.
status
==
0
)
{
$
.
cookie
(
'channelUserId'
,
this
.
$root
.
channelUserId
);
this
.
$root
.
channelUserId
=
decodeURIComponent
(
d
.
data
.
channelUserId
);
$
.
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
;
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
)
}
else
if
(
d
.
status
==
2010
)
{
console
.
log
(
d
.
msg
);
this
.
$message
({
message
:
d
.
msg
,
type
:
'warning'
});
}
else
if
(
d
.
status
==
2060
)
{
console
.
log
(
d
.
msg
);
this
.
$message
({
message
:
d
.
msg
,
type
:
'warning'
});
}
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