Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Athena
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
华国豪
Athena
Commits
999b34ac
Commit
999b34ac
authored
Jan 20, 2020
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
888fd843
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
464 additions
and
4 deletions
+464
-4
PsCenter.css
src/assets/mall/PsCenter.css
+1
-1
index.js
src/plugins/index.js
+2
-2
router.js
src/router.js
+2
-1
msgLogin.vue
src/views/msgLogin.vue
+459
-0
No files found.
src/assets/mall/PsCenter.css
View file @
999b34ac
...
@@ -98,4 +98,4 @@
...
@@ -98,4 +98,4 @@
width
:
100%
;
width
:
100%
;
margin
:
20px
0
;
margin
:
20px
0
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
\ No newline at end of file
src/plugins/index.js
View file @
999b34ac
...
@@ -12,11 +12,11 @@ export default {
...
@@ -12,11 +12,11 @@ export default {
//域名管理对象
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
Vue
.
prototype
.
domainManager
=
function
()
{
// var domainUrl = "http://test_reborn.oytour.com";//主域名
// var domainUrl = "http://test_reborn.oytour.com";//主域名
var
domainUrl
=
"http://reborn.oytour.com"
;
//主域名
//
var domainUrl = "http://reborn.oytour.com"; //主域名
//var domainUrl = "http://192.168.2.65:8025"//主域名
//var domainUrl = "http://192.168.2.65:8025"//主域名
// let domainUrl = "https://reborn.oytour.com";
// let domainUrl = "https://reborn.oytour.com";
// let domainUrl = "http://testapi.oytour.com"
// let domainUrl = "http://testapi.oytour.com"
// let domainUrl = "http://192.168.2.215:9000
"
let
domainUrl
=
"http://192.168.2.65:8069
"
//let domainUrl = "http://192.168.0.106"
//let domainUrl = "http://192.168.0.106"
// let domainUrl = "http://192.168.2.214:8082"
// let domainUrl = "http://192.168.2.214:8082"
// var domainUrl = "http://reborn.oytour.com";
// var domainUrl = "http://reborn.oytour.com";
...
...
src/router.js
View file @
999b34ac
...
@@ -5,6 +5,7 @@ import login from "./views/login";
...
@@ -5,6 +5,7 @@ import login from "./views/login";
import
newLogin
from
"./views/newLogin"
;
import
newLogin
from
"./views/newLogin"
;
import
loginNationalDay
from
"./views/loginNationalDay"
;
import
loginNationalDay
from
"./views/loginNationalDay"
;
import
loginRed
from
"./views/loginRed"
;
import
loginRed
from
"./views/loginRed"
;
import
msgLogin
from
"./views/msgLogin"
;
import
IceCreamTask
from
"./components/taskPage/IceCream/IceCreamTask"
;
import
IceCreamTask
from
"./components/taskPage/IceCream/IceCreamTask"
;
// import JuanSaid from "./components/taskPage/JuanSaid";
// import JuanSaid from "./components/taskPage/JuanSaid";
import
FoodImg
from
"./components/taskPage/FoodImg"
;
import
FoodImg
from
"./components/taskPage/FoodImg"
;
...
@@ -27,7 +28,7 @@ export default new Router({
...
@@ -27,7 +28,7 @@ export default new Router({
{
{
path
:
"/login"
,
path
:
"/login"
,
name
:
"login"
,
name
:
"login"
,
component
:
loginRed
component
:
msgLogin
},
},
{
{
path
:
'/newTrip'
,
path
:
'/newTrip'
,
...
...
src/views/msgLogin.vue
0 → 100644
View file @
999b34ac
<
style
>
.new_login_red
{
height
:
100%
;
width
:
100%
;
background
:
url("../assets/img/login/login-red-bg.jpg")
;
background-size
:
100%
100%
;
}
.new_login_red
.container
{
width
:
450px
;
height
:
auto
;
float
:
right
;
margin-right
:
15%
;
margin-top
:
8%
;
-webkit-box-sizing
:
border-box
;
box-sizing
:
border-box
;
background-color
:
white
;
padding
:
52px
65px
;
position
:
relative
;
}
.new_login_red
.container
.top_logo
{
display
:
flex
;
align-items
:
flex-end
;
}
.new_login_red
.container
.top_logo
img
{
display
:
block
;
}
.new_login_red
.container
.top_logo
span
{
color
:
#ee4454
;
font-size
:
22px
;
padding-left
:
8px
;
font-weight
:
bold
;
font-family
:
"PingFangR"
;
}
.new_login_red
.container
.sub_tit
{
font-size
:
18px
;
margin-top
:
15px
;
color
:
#ee4454
;
margin-bottom
:
60px
;
}
.new_login_red
.container
._lable
{
color
:
#333333
;
font-size
:
16px
;
margin-bottom
:
5px
;
}
.new_login_red
.el-input__inner
{
border
:
2px
solid
rgba
(
230
,
230
,
230
,
1
)
!important
;
border-top
:
none
!important
;
border-left
:
none
!important
;
border-right
:
none
!important
;
padding
:
0
;
background-color
:
white
!important
;
border-radius
:
0
;
}
.new_login_red
.el-input__inner
:focus
{
border-bottom
:
2px
solid
#ee4454
!important
;
}
.new_login_red
input
{
caret-color
:
#ee4454
;
color
:
#333333
;
}
.new_login_red
.active_code
.el-button
{
border
:
none
;
color
:
#66b1ff
;
text-align
:
right
;
}
.new_login_red
.el-input--suffix
.el-input__inner
{
border-bottom
:
none
!important
;
}
.new_login_red
.active_code
{
border-bottom
:
2px
solid
rgba
(
230
,
230
,
230
,
1
)
!important
;
margin-bottom
:
20px
;
}
.new_login_red
.active_code
.el-button
:focus
,
.new_login_red
.active_code
.el-button
:hover
{
background-color
:
white
!important
;
}
.new_login_red
input
:-webkit-autofill
{
-webkit-text-fill-color
:
#ededed
!important
;
-webkit-box-shadow
:
0
0
0px
1000px
transparent
inset
!important
;
background-color
:
transparent
;
background-image
:
none
;
transition
:
background-color
50000s
ease-in-out
0s
;
}
.bg-gray
,
.new_login_red
.active_code
.el-button.bg-gray
:hover
{
color
:
#999999
!important
}
.login_pass
p
:hover
{
color
:
#111111
;
}
.new_login_red
.login_pass
{
color
:
#999999
;
color
:
#111111
;
}
.new_login_red
.el-button.is-round
{
padding
:
15px
70px
;
margin-top
:
50px
;
width
:
100%
;
}
._jihuo
{
font-size
:
14px
;
color
:
#111111
;
margin-top
:
20px
;
}
._jihuo
._gan
{
height
:
14px
;
width
:
14px
;
display
:
inline-block
;
color
:
white
;
text-align
:
center
;
font-size
:
12px
;
line-height
:
14px
;
margin-right
:
5px
;
background-color
:
#ee4454
;
border-radius
:
50%
;
}
._jihuo
._ji
{
color
:
#ee4454
;
cursor
:
pointer
;
}
.new_login_red
.el-form-item
{
margin-bottom
:
30
PX
;
}
.container-bg-1
{
position
:
absolute
;
bottom
:
-20px
;
left
:
10%
;
width
:
80%
;
height
:
20px
;
background-color
:
rgba
(
230
,
230
,
230
,
.4
);
}
.container-bg-2
{
position
:
absolute
;
bottom
:
-40px
;
width
:
60%
;
left
:
20%
;
height
:
40px
;
background-color
:
rgba
(
230
,
230
,
230
,
.4
);
}
</
style
>
<
template
>
<div
class=
"new_login_red"
>
<div
class=
"container"
:style=
"
{zoom: zoom}">
<div
class=
"container-bg container-bg-1"
></div>
<div
class=
"container-bg container-bg-2"
></div>
<div
class=
"top_logo"
>
<img
src=
"../assets/img/logo_t.png"
alt
>
<span>
-同业登录
</span>
</div>
<p
class=
"sub_tit"
>
印象之旅,同业旅游好助手
</p>
<!-- 登录 -->
<div
class=
"login"
v-if=
"!active"
>
<el-form
:model=
"loginMsg"
:rules=
"rules"
ref=
"loginMsg"
>
<p
class=
"_lable"
>
<i
class=
"iconfont icon-user"
></i>
账号
</p>
<el-form-item
prop=
"account"
>
<el-input
v-model=
"loginMsg.account"
@
change=
"GetAccountState()"
autocomplete=
"new-password"
placeholder=
"请输入账号"
></el-input>
</el-form-item>
<p
class=
"_lable"
>
<i
class=
"iconfont icon-mima1"
></i>
验证码
</p>
<div
class=
"active_code"
>
<el-input
placeholder=
"请输入验证码"
v-model=
"loginMsg.sendcode"
clearable
>
</el-input>
<el-button
v-if=
"show"
@
click=
"getCode2"
>
{{
timer
==
null
?
'发送验证码'
:
timer
}}
</el-button>
<el-button
v-else
disabled
class=
"bg-gray"
>
{{
count
}}
s重新获取
</el-button>
</div>
</el-form>
<el-button
type=
"danger"
round
@
click=
"user_login"
>
登录
</el-button>
<p
class=
"_jihuo"
>
<span
class=
"_gan"
>
!
</span>
账号未激活?
<span
class=
"_ji"
@
click=
"active = true, isEdit = false, initMsg()"
>
立即激活
</span>
</p>
</div>
<!-- 激活 -->
<div
class=
"active"
v-if=
"active"
>
<el-form
:model=
"activeMsg"
:rules=
"rules"
ref=
"activeMsg"
>
<p
class=
"_lable"
>
<i
class=
"iconfont icon-user"
></i>
账号
</p>
<el-form-item
prop=
"account"
>
<el-input
v-model=
"activeMsg.account"
@
change=
"GetAccountState()"
autocomplete=
"new-password"
placeholder=
"请输入账号"
></el-input>
</el-form-item>
<p
class=
"_lable"
>
<i
class=
"iconfont icon-mima1"
></i>
设置密码
</p>
<el-form-item
prop=
"password"
>
<el-input
type=
"password"
autocomplete=
"new-password"
v-model=
"activeMsg.password"
placeholder=
"请输入密码"
></el-input>
</el-form-item>
<p
class=
"_lable"
>
<i
class=
"iconfont icon-yanzhengma"
></i>
验证码
</p>
<div
class=
"active_code"
>
<el-input
placeholder=
"请输入验证码"
v-model=
"activeMsg.code"
clearable
>
</el-input>
<el-button
v-if=
"show"
@
click=
"getCode"
>
{{
timer
==
null
?
'发送验证码'
:
timer
}}
</el-button>
<el-button
v-else
disabled
class=
"bg-gray"
>
{{
count
}}
s重新获取
</el-button>
</div>
<div
class=
"login_pass"
>
<p
@
click=
"active = false, initMsg()"
>
返回登录
</p>
</div>
<el-button
type=
"danger"
round
@
click=
"user_active(isEdit ? 2 : 1 )"
>
{{
isEdit
?
'修改'
:
'激活'
}}
并登录
</el-button>
</el-form>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
active
:
false
,
checked
:
true
,
loginMsg
:
{
account
:
""
,
sendcode
:
""
},
activeMsg
:
{
account
:
""
,
mobileNumber
:
""
,
password
:
""
,
code
:
""
},
isEdit
:
false
,
rules
:
{
account
:
[{
required
:
true
,
message
:
"请输入账号"
,
trigger
:
"blur"
}],
password
:
[{
required
:
true
,
message
:
"请输入密码"
,
trigger
:
"blur"
}]
},
timer
:
null
,
show
:
true
,
count
:
''
,
mobileCodeType
:
1
,
zoom
:
1
,
};
},
methods
:
{
getCode2
(){
var
phoneReg
=
/
(
^1
[
3|4|5|7|8
]\d{9}
$
)
|
(
^09
\d{8}
$
)
/
;
//电话
var
phone
=
this
.
loginMsg
.
account
.
replace
(
/^
\s
+|
\s
+$/gm
,
""
);
if
(
!
phoneReg
.
test
(
phone
))
{
this
.
$message
.
error
(
"请输入有效的手机号码!"
);
return
false
;
}
const
TIME_COUNT
=
60
;
this
.
code2
=
""
;
if
(
!
this
.
timer
)
{
this
.
count
=
TIME_COUNT
;
this
.
show
=
false
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
count
>
0
&&
this
.
count
<=
TIME_COUNT
)
{
this
.
count
--
;
}
else
{
this
.
show
=
true
;
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
}
},
1000
);
}
this
.
apipost
(
"b2b_post_SendCodeByCustomerInfo"
,
{
account
:
phone
},
r
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
);
}
});
},
// 获取验证码
getCode
(
t
)
{
var
phoneReg
=
/
(
^1
[
3|4|5|7|8
]\d{9}
$
)
|
(
^09
\d{8}
$
)
/
;
//电话
var
phone
=
this
.
activeMsg
.
account
.
replace
(
/^
\s
+|
\s
+$/gm
,
""
);
if
(
!
phoneReg
.
test
(
phone
))
{
this
.
$message
.
error
(
"请输入有效的手机号码!"
);
return
false
;
}
const
TIME_COUNT
=
60
;
this
.
code
=
""
;
if
(
!
this
.
timer
)
{
this
.
count
=
TIME_COUNT
;
this
.
show
=
false
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
count
>
0
&&
this
.
count
<=
TIME_COUNT
)
{
this
.
count
--
;
}
else
{
this
.
show
=
true
;
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
}
},
1000
);
}
let
msg
=
{
mobileNumber
:
this
.
activeMsg
.
account
,
mobileCodeType
:
this
.
mobileCodeType
};
this
.
apipost
(
"user_get_moblieNumber_code"
,
msg
,
r
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
);
}
});
},
user_active
(
t
)
{
//t:1 激活账号 t:2 修改密码
if
(
this
.
activeMsg
.
account
==
""
)
return
this
.
$message
.
error
(
"请输入账号!"
);
if
(
this
.
activeMsg
.
password
==
""
)
return
this
.
$message
.
error
(
"请输入密码!"
);
if
(
this
.
activeMsg
.
code
==
""
)
return
this
.
$message
.
error
(
"请输入验证码!"
);
this
.
activeMsg
.
mobileNumber
=
this
.
activeMsg
.
account
;
let
cmd
=
"b2b_post_AccountActivation"
;
if
(
t
==
2
)
{
cmd
=
"b2b_post_ModifyPasswordByAccountAndCode"
;
}
this
.
apipost
(
cmd
,
this
.
activeMsg
,
r
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
let
msg
=
{
account
:
this
.
activeMsg
.
account
,
password
:
this
.
activeMsg
.
password
};
this
.
loginF
(
msg
);
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
);
}
},
err
=>
{}
);
},
// 检测账号是否已激活
GetAccountState
()
{
if
(
!
this
.
loginMsg
.
account
)
return
;
this
.
apipost
(
"b2b_get_GetAccountState"
,
{
account
:
this
.
loginMsg
.
account
},
r
=>
{
if
(
r
.
data
.
resultCode
==
10007
)
{
this
.
$confirm
(
"该账号还未激活,请先激活账号在进行登录!"
,
{
confirmButtonText
:
"立即激活"
,
cancelButtonText
:
"等一等"
,
type
:
"warning"
})
.
then
(()
=>
{
this
.
active
=
true
;
})
.
catch
(()
=>
{
});
}
else
if
(
r
.
data
.
resultCode
==
1
)
{
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
);
}
},
err
=>
{}
);
},
//登录
user_login
()
{
if
(
this
.
loginMsg
.
account
==
""
)
return
this
.
$message
.
error
(
"请输入账号!"
);
if
(
this
.
loginMsg
.
sendcode
==
""
)
return
this
.
$message
.
error
(
"请输入密码!"
);
this
.
loging
=
true
;
let
msg
=
{
account
:
this
.
loginMsg
.
account
,
sendcode
:
this
.
loginMsg
.
sendcode
};
this
.
loginF
(
msg
);
},
loginF
(
msg
)
{
msg
.
platform
=
0
;
// 登录方法
this
.
apipost
(
"b2b_post_Login_V2"
,
msg
,
r
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
let
autoLogin
=
this
.
checked
?
{
acc
:
this
.
loginMsg
.
account
,
pwd
:
this
.
loginMsg
.
password
,
}
:
null
;
localStorage
.
autoLogin
=
JSON
.
stringify
(
autoLogin
)
let
userInfo
=
r
.
data
.
data
;
let
userJson
=
JSON
.
stringify
(
userInfo
);
localStorage
.
userInfo
=
userJson
;
let
FromPath
=
sessionStorage
.
getItem
(
"FromPath"
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
"FromPath"
))
:
''
;
this
.
$store
.
commit
(
"changeLogin"
,
1
);
this
.
$store
.
commit
(
"updateUser"
,
userInfo
);
//登录成功 删除后台传参
sessionStorage
.
removeItem
(
"OpenB2BCode"
);
if
(
FromPath
)
{
this
.
$router
.
push
({
path
:
FromPath
.
path
,
query
:
FromPath
.
query
});
}
else
if
(
this
.
$route
.
query
.
id
&&
this
.
$route
.
query
.
path
)
{
let
path
=
`
${
this
.
$route
.
query
.
path
}
/
${
this
.
$route
.
query
.
id
}
`
;
this
.
$router
.
push
({
path
});
}
else
{
this
.
$router
.
push
({
path
:
"/Home"
});
}
this
.
$message
.
success
(
r
.
data
.
message
);
this
.
loging
=
false
;
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
);
this
.
loging
=
false
;
this
.
errorTips
=
true
;
}
},
null
);
},
initMsg
:
function
()
{
this
.
loginMsg
=
{
account
:
""
,
password
:
""
}
this
.
activeMsg
=
{
account
:
""
,
mobileNumber
:
""
,
password
:
""
,
code
:
""
}
}
},
created
(){
let
Height
=
window
.
innerHeight
this
.
zoom
=
(
Math
.
round
((
Height
/
1080
)
*
100
)
/
100
)
+
0.1
let
autoLogin
=
localStorage
.
autoLogin
?
JSON
.
parse
(
localStorage
.
autoLogin
)
:
null
console
.
log
(
autoLogin
)
this
.
loginMsg
.
account
=
autoLogin
?
autoLogin
.
acc
:
''
this
.
loginMsg
.
password
=
autoLogin
?
autoLogin
.
pwd
:
''
this
.
checked
=
autoLogin
?
true
:
false
}
};
</
script
>
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