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
d6d2640e
Commit
d6d2640e
authored
Sep 24, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新登录
parent
b99b60fd
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
548 additions
and
35 deletions
+548
-35
localtourhome.css
src/assets/css/localtourhome.css
+1
-1
loginNationalDay-bg-s.png
src/assets/img/login/loginNationalDay-bg-s.png
+0
-0
loginNationalDay-bg.png
src/assets/img/login/loginNationalDay-bg.png
+0
-0
loginNationalDay-box.png
src/assets/img/login/loginNationalDay-box.png
+0
-0
newHead.css
src/assets/mall/newHead.css
+5
-2
IndependentList.vue
src/components/DependentTravel/IndependentList.vue
+5
-2
Home.vue
src/components/Home.vue
+15
-16
HotelList.vue
src/components/Hotel/HotelList.vue
+10
-0
TicketList.vue
src/components/Ticket/TicketList.vue
+3
-0
newHead.vue
src/components/global/newHead.vue
+52
-13
search.vue
src/components/mall/search.vue
+4
-0
router.js
src/router.js
+2
-1
loginNationalDay.vue
src/views/loginNationalDay.vue
+451
-0
No files found.
src/assets/css/localtourhome.css
View file @
d6d2640e
...
...
@@ -625,7 +625,7 @@
text-align
:
center
;
color
:
#fff
;
}
.LocalTourList
.choose_ul
.spanMargin
.el-date-editor.el-input
,
.el-date-editor.el-input__inner
{
.LocalTourList
.choose_ul
.spanMargin
.el-date-editor.el-input
,
.LocalTourList
.el-date-editor.el-input__inner
{
width
:
160px
;
height
:
28px
;
margin-top
:
3px
;
...
...
src/assets/img/login/loginNationalDay-bg-s.png
0 → 100644
View file @
d6d2640e
530 KB
src/assets/img/login/loginNationalDay-bg.png
0 → 100644
View file @
d6d2640e
685 KB
src/assets/img/login/loginNationalDay-box.png
0 → 100644
View file @
d6d2640e
62.1 KB
src/assets/mall/newHead.css
View file @
d6d2640e
...
...
@@ -23,8 +23,11 @@ ul,li{list-style: none;}
.w100
{
width
:
100px
!important
;
}
.wb60
{
width
:
60%
!important
;
.wb40
{
width
:
40%
!important
;
}
.wb30
{
width
:
30%
!important
;
}
._flex_center
{
display
:
flex
;
...
...
src/components/DependentTravel/IndependentList.vue
View file @
d6d2640e
...
...
@@ -243,6 +243,9 @@ export default {
if
(
this
.
$route
.
query
.
lineteamId
){
this
.
listmsg
.
lineTeamId
=
this
.
$route
.
query
.
lineteamId
;
}
if
(
this
.
$route
.
query
.
time
){
this
.
listmsg
.
monthdate
=
this
.
$route
.
query
.
time
;
}
this
.
isLogin
=
this
.
$store
.
state
.
isLogin
;
if
(
this
.
isLogin
==
1
){
this
.
listmsg
.
priceOrderByField
=
2
;
...
...
src/components/Home.vue
View file @
d6d2640e
...
...
@@ -37,7 +37,7 @@
<i
class=
"iconfont icon-Shape"
></i>
<p>
酒店
</p>
</li>
<li
@
click=
"ChangeTab('admticket')"
:class=
"tag=='admticket'?'tag_active':''"
v-show=
"false"
>
<li
@
click=
"ChangeTab('admticket')"
:class=
"tag=='admticket'?'tag_active':''"
>
<i
class=
"iconfont icon-menpiao1"
></i>
<p>
门票
</p>
</li>
...
...
@@ -240,7 +240,7 @@
</div>
<!-- 门票 v-show="tag=='admticket'"-->
<div
style=
"width:394px"
class=
"visa"
v-show=
"false"
>
<div
style=
"width:394px"
class=
"visa"
>
<el-form
ref=
"visa_form"
:model=
"visa_form"
label-width=
"90px"
>
<!--
<el-form-item
label=
"关键词搜索"
style=
"margin-bottom:10px"
>
<el-input
size=
"small"
v-model=
"visa_form.name"
placeholder=
"输入景点名称、城市或主题"
></el-input>
...
...
@@ -448,19 +448,19 @@
</span>
起
</span></p>
</div>
</div>
</div>
</div>
</div>
<!-- 冰糕活动跳转 -->
<el-row
style=
"margin: 20px 0;cursor: pointer;"
>
<!-- 冰糕活动跳转 -->
<!--
<el-row
style=
"margin: 20px 0;cursor: pointer;"
>
<img
@
click=
"FootgoUrl('IceCreamTask')"
class=
"huodong_img"
src=
"../assets/img/active/huodong_img1.png"
alt
>
</el-row>
</el-row>
-->
<!-- 景点门票 -->
<div
class=
"Ticket_spots"
v-show=
"false"
>
<ul
class=
"common_ul_tab"
>
...
...
@@ -1369,7 +1369,6 @@ export default {
}
};
</
script
>
<
style
>
@import
"../assets/css/home.css"
;
@import
"../assets/css/common.css"
;
...
...
src/components/Hotel/HotelList.vue
View file @
d6d2640e
...
...
@@ -897,6 +897,15 @@ export default {
mounted
()
{
},
created
()
{
if
(
this
.
$route
.
query
.
time
){
this
.
dateList
=
this
.
$route
.
query
.
time
;
this
.
msg
.
searchroomGroup
=
[{
roomNum
:
1
,
numberOfAdults
:
1
,
numberOfChildren
:
0
}]
this
.
getInOutDate
()
}
if
(
this
.
$route
.
query
.
searchKey
){
this
.
keyWords
=
this
.
$route
.
query
.
searchKey
;
this
.
SearchHotel
();
...
...
@@ -912,6 +921,7 @@ export default {
this
.
msg
.
searchroomGroup
=
msgList
.
roomList
;
this
.
SearchHotel
();
}
if
(
sessionStorage
.
getItem
(
"OpenB2BCode"
)){
if
(
sessionStorage
.
getItem
(
"OpenB2BCode"
)
==
'jqk4n7BSaoI='
){
this
.
isShowTime
=
false
;
...
...
src/components/Ticket/TicketList.vue
View file @
d6d2640e
...
...
@@ -426,6 +426,9 @@ export default {
this
.
choose_info
.
qFlightDateStart
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
if
(
this
.
$route
.
query
.
time
){
this
.
choose_info
.
qFlightDateStart
=
this
.
$route
.
query
.
time
[
0
];
}
this
.
Datelist
();
this
.
initAirlines
();
this
.
CFD
();
...
...
src/components/global/newHead.vue
View file @
d6d2640e
...
...
@@ -47,6 +47,15 @@
.item-tootip
{
width
:
100px
;
}
.my-input
{
border
:
none
!important
;
border-radius
:
0
!important
;
height
:
34px
!important
;
border-left
:
1px
solid
#e6e6e6
!important
;
}
.my-input
.el-range-separator
{
line-height
:
28px
!important
;
}
</
style
>
<
template
>
<!-- 头部 -->
...
...
@@ -163,10 +172,10 @@
</el-select>
</div>
</el-col>
<el-col
:span=
"1
0
"
:offset=
"1"
>
<el-col
:span=
"1
2
"
:offset=
"1"
>
<div
class=
"_search_box _flex_center"
>
<!-- <span class="_city">成都</span> -->
<el-select
v-model=
"select"
slot=
"prepend"
size=
"mini"
class=
"w100
"
placeholder=
"请选择"
>
<el-select
v-model=
"select"
slot=
"prepend"
@
change=
"value6 = []"
size=
"mini"
class=
"w85
"
placeholder=
"请选择"
>
<el-option
label=
"旅游"
value=
"1"
></el-option>
<el-option
label=
"定制游"
value=
"4"
></el-option>
<el-option
label=
"一日游"
value=
"5-1"
v-show=
"false"
></el-option>
...
...
@@ -178,19 +187,30 @@
</el-select>
<span
class=
"_splice"
></span>
<el-input
class=
"wb
6
0"
class=
"wb
4
0"
placeholder=
"搜索旅行地/酒店/旅游/门票/签证"
size=
"mini"
@
keyup
.
enter=
"goSearch"
v-model=
"searchText"
></el-input>
<el-date-picker
v-if=
"select!=='6'"
size=
"mini"
:picker-options=
"select !== '3' && select !== '7' ? pickerOptions0 : pickerOptions1"
v-model=
"value6"
type=
"daterange"
class=
"wb30 my-input"
value-format=
"yyyy-MM-dd"
range-separator=
"-"
format=
"MM-dd"
>
</el-date-picker>
<span
class=
"_search_btn __cp"
@
click=
"goSearch"
>
<i
class=
"iconfont icon-search"
></i>
</span>
</div>
</el-col>
<!-- 右 电话 -->
<el-col
:span=
"5"
:offset=
"
2
"
>
<el-col
:span=
"5"
:offset=
"
1
"
>
<div
class=
"_phone _flex_center"
>
<div>
<i
class=
"iconfont icon-dianhua1"
></i>
...
...
@@ -334,6 +354,7 @@ const map = new AMap.Map("map-container", {
import
{
location
}
from
"../../assets/utils/getLocation"
;
import
bus
from
"../../plugins/event-bus"
;
import
moment
from
"moment"
;
export
default
{
data
()
{
return
{
...
...
@@ -345,7 +366,19 @@ export default {
navActive
:
""
,
sites
:
[],
city
:
0
,
cityText
:
""
cityText
:
""
,
value6
:
''
,
pickerOptions0
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
}
},
pickerOptions1
:
{
disabledDate
(
time
)
{
let
today_after7
=
moment
().
add
(
7
,
'days'
).
format
(
'YYYY-MM-DD'
);
return
time
.
getTime
()
<
new
Date
(
today_after7
).
getTime
()
-
8.64e7
;
}
},
};
},
methods
:
{
...
...
@@ -426,14 +459,20 @@ export default {
if
(
this
.
searchText
!=
""
)
{
if
(
this
.
select
===
"1"
)
{
// 旅游
let
query
=
{
keywords
:
encodeURIComponent
(
this
.
searchText
)
};
let
time
=
[];
if
(
this
.
value6
)
{
this
.
value6
.
map
(
x
=>
{
time
.
push
(
x
.
substring
(
2
,
10
))
})
}
let
query
=
{
keywords
:
encodeURIComponent
(
this
.
searchText
),
time
:
time
};
this
.
$router
.
push
({
path
:
"search"
,
query
});
}
else
if
(
this
.
select
===
"3"
)
{
// 机票
let
query
=
{
keywords
:
encodeURIComponent
(
this
.
searchText
)
};
let
query
=
{
keywords
:
encodeURIComponent
(
this
.
searchText
)
,
time
:
this
.
value6
};
this
.
$router
.
push
({
path
:
"TicketList"
,
query
...
...
@@ -441,7 +480,7 @@ export default {
}
else
if
(
this
.
select
===
"4"
)
{
// 定制游
let
query
=
{
keywords
:
this
.
searchText
};
let
query
=
{
keywords
:
this
.
searchText
,
time
:
this
.
value6
};
this
.
$router
.
push
({
path
:
"IndependentList"
,
query
...
...
@@ -449,7 +488,7 @@ export default {
}
else
if
(
this
.
select
===
"5-1"
)
{
// 一日游
let
query
=
{
searchKey
:
this
.
searchText
,
tab
:
1
};
let
query
=
{
searchKey
:
this
.
searchText
,
tab
:
1
,
time
:
this
.
value6
};
this
.
$router
.
push
({
path
:
"LocalTourList"
,
query
...
...
@@ -457,7 +496,7 @@ export default {
}
else
if
(
this
.
select
===
"5-2"
)
{
// 当地游门票
let
query
=
{
searchKey
:
this
.
searchText
,
tab
:
2
};
let
query
=
{
searchKey
:
this
.
searchText
,
tab
:
2
,
time
:
this
.
value6
};
this
.
$router
.
push
({
path
:
"LocalTourList"
,
query
...
...
@@ -465,7 +504,7 @@ export default {
}
else
if
(
this
.
select
===
"5-3"
)
{
// 当地游美食
let
query
=
{
searchKey
:
this
.
searchText
};
let
query
=
{
searchKey
:
this
.
searchText
,
time
:
this
.
value6
};
this
.
$router
.
push
({
path
:
"LocalCuisine"
,
query
...
...
@@ -473,7 +512,7 @@ export default {
}
else
if
(
this
.
select
===
"6"
)
{
// 签证
let
query
=
{
searchKey
:
this
.
searchText
};
let
query
=
{
searchKey
:
this
.
searchText
,
time
:
this
.
value6
};
this
.
$router
.
push
({
path
:
"Visalist"
,
query
...
...
@@ -481,7 +520,7 @@ export default {
}
else
if
(
this
.
select
===
"7"
)
{
// 酒店
let
query
=
{
searchKey
:
this
.
searchText
};
let
query
=
{
searchKey
:
this
.
searchText
,
time
:
this
.
value6
};
this
.
$router
.
push
({
path
:
"HotelList"
,
query
...
...
src/components/mall/search.vue
View file @
d6d2640e
...
...
@@ -221,6 +221,10 @@ export default {
this
.
searchItem
.
push
(
''
)
this
.
searchItem
.
push
(
''
)
this
.
keywords
=
decodeURIComponent
(
this
.
$route
.
query
.
keywords
)
if
(
this
.
$route
.
query
.
time
)
{
this
.
multData
=
this
.
$route
.
query
.
time
this
.
multDataChange
()
}
this
.
loadRecoItems
()
this
.
loadDates
()
this
.
loadDayCount
()
...
...
src/router.js
View file @
d6d2640e
...
...
@@ -3,6 +3,7 @@ import Router from "vue-router";
import
index
from
"./views/index"
;
import
login
from
"./views/login"
;
import
newLogin
from
"./views/newLogin"
;
import
loginNationalDay
from
"./views/loginNationalDay"
;
import
IceCreamTask
from
"./components/taskPage/IceCream/IceCreamTask"
;
// import JuanSaid from "./components/taskPage/JuanSaid";
import
FoodImg
from
"./components/taskPage/FoodImg"
;
...
...
@@ -21,7 +22,7 @@ export default new Router({
{
path
:
"/login"
,
name
:
"login"
,
component
:
newLogin
component
:
loginNationalDay
},
// {
// path: "/newLogin",
...
...
src/views/loginNationalDay.vue
0 → 100644
View file @
d6d2640e
<
style
>
.loginNationalDay
{
height
:
100%
;
width
:
100%
;
background
:
url("../assets/img/login/loginNationalDay-bg.png")
;
background-size
:
100%
100%
;
}
.loginNationalDay
.container
{
width
:
100%
;
height
:
100%
;
float
:
right
;
box-sizing
:
border-box
;
/* background-color: skyblue; */
}
.loginNationalDay
.container
.top_logo
{
display
:
flex
;
align-items
:
flex-end
;
}
.loginNationalDay
.container
.top_logo
img
{
display
:
block
;
}
.loginNationalDay
.container
.top_logo
span
{
color
:
#ee4454
;
font-size
:
22px
;
padding-left
:
8px
;
font-weight
:
bold
;
font-family
:
"PingFangR"
;
}
.loginNationalDay
.container
.sub_tit
{
font-size
:
18px
;
margin-top
:
15px
;
color
:
#ee4454
;
margin-bottom
:
90px
;
}
.loginNationalDay
.container
._lable
{
color
:
#333333
;
font-size
:
16px
;
margin-bottom
:
5px
;
}
.loginNationalDay
.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
;
}
.loginNationalDay
.el-input__inner
:focus
{
border-bottom
:
2px
solid
#ee4454
!important
;
}
.loginNationalDay
input
{
caret-color
:
#ee4454
;
color
:
#333333
;
}
.loginNationalDay
.active_code
.el-button
{
border
:
none
;
color
:
#66b1ff
;
text-align
:
right
;
}
.loginNationalDay
.el-input--suffix
.el-input__inner
{
border-bottom
:
none
!important
;
}
.loginNationalDay
.active_code
{
border-bottom
:
2px
solid
rgba
(
230
,
230
,
230
,
1
)
!important
;
margin-bottom
:
20px
;
}
.loginNationalDay
.active_code
.el-button
:focus
,
.loginNationalDay
.active_code
.el-button
:hover
{
background-color
:
white
!important
;
}
.loginNationalDay
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
,
.loginNationalDay
.active_code
.el-button.bg-gray
:hover
{
color
:
#999999
!important
}
.login_pass
p
:hover
{
color
:
#111111
;
}
.loginNationalDay
.login_pass
{
color
:
#999999
;
color
:
#111111
;
}
.loginNationalDay
.el-button.is-round
{
padding
:
15px
70px
;
margin-top
:
50px
;
}
._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
;
}
.loginNationalDay
.el-form-item
{
margin-bottom
:
30
PX
;
}
.loginNationalDay
.container
.container_small
{
background
:
url("../assets/img/login/loginNationalDay-bg-s.png")
;
width
:
77%
;
height
:
87%
;
margin
:
0
auto
;
margin-top
:
3.5%
;
background-size
:
100%
100%
;
background-position
:
center
center
;
background-repeat
:
no-repeat
;
}
.conten-box
{
width
:
450px
;
height
:
100%
;
float
:
right
;
margin-right
:
120px
;
padding-top
:
10%
;
-webkit-box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
.right-img
{
background
:
url("../assets/img/login/loginNationalDay-box.png")
;
width
:
290px
;
height
:
250px
;
position
:
absolute
;
right
:
50px
;
bottom
:
15px
;
}
.loginNationalDay
.el-checkbox__input.is-checked
+
.el-checkbox__label
{
color
:
#f56c6c
;
}
.loginNationalDay
.el-checkbox__input.is-checked
.el-checkbox__inner
,
.loginNationalDay
.el-checkbox__input.is-indeterminate
.el-checkbox__inner
{
background-color
:
#f56c6c
;
border-color
:
#f56c6c
;
}
</
style
>
<
template
>
<div
class=
"loginNationalDay"
>
<div
class=
"container"
:style=
"
{zoom: zoom}">
<div
class=
"container_small"
>
<div
class=
"conten-box"
>
<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>
<el-form-item
prop=
"password"
>
<el-input
type=
"password"
autocomplete=
"new-password"
v-model=
"loginMsg.password"
placeholder=
"请输入密码"
></el-input>
</el-form-item>
</el-form>
<div
class=
"login_pass"
>
<div>
<el-checkbox
v-model=
"checked"
>
下次自动登录
</el-checkbox>
</div>
<p
@
click=
"active= true, isEdit = true"
>
忘记密码?
</p>
</div>
<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>
</div>
<div
class=
"right-img"
>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
active
:
false
,
checked
:
true
,
loginMsg
:
{
account
:
""
,
password
:
""
},
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
:
{
// 获取验证码
getCode
()
{
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
.
password
==
""
)
return
this
.
$message
.
error
(
"请输入密码!"
);
this
.
loging
=
true
;
let
msg
=
{
account
:
this
.
loginMsg
.
account
,
password
:
this
.
loginMsg
.
password
};
this
.
loginF
(
msg
);
},
loginF
(
msg
)
{
msg
.
platform
=
0
;
// 登录方法
this
.
apipost
(
"b2b_post_Login"
,
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