Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
e3504ff2
Commit
e3504ff2
authored
Jul 07, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
2b5daf78
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
59 deletions
+95
-59
utils.js
src/boot/utils.js
+23
-18
search_sf1.vue
src/components/search_sf/search_sf1.vue
+17
-12
search_sf2.vue
src/components/search_sf/search_sf2.vue
+15
-11
search_sf3.vue
src/components/search_sf/search_sf3.vue
+17
-13
Search.vue
src/pages/Search.vue
+23
-5
No files found.
src/boot/utils.js
View file @
e3504ff2
...
...
@@ -6,7 +6,8 @@ import md5 from 'js-md5'
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
''
;
domainUrl
=
"http://192.168.2.214:8082"
;
domainUrl
=
"http://192.168.0.110"
;
domainUrl
=
"http://127.0.0.1"
;
//domainUrl = "http://reborn.oytour.com";
//let locationName = location.hostname;
// if (locationName.indexOf('testerp.oytour') !== -1) {
// domainUrl = "http://testapi.oytour.com";
...
...
@@ -161,24 +162,28 @@ Vue.prototype.formatDate = function (year, month, day) {
}
//格式化日期二
Vue
.
prototype
.
formatDate2
=
function
(
dateStr
)
{
var
date
=
new
Date
(
dateStr
);
return
{
CYear
:
date
.
getFullYear
(),
CMonth
:(
date
.
getMonth
()
+
1
),
CDay
:
date
.
getDate
(),
}
Vue
.
prototype
.
formatDate2
=
function
(
dateStr
)
{
var
date
=
new
Date
(
dateStr
);
return
{
CYear
:
date
.
getFullYear
(),
CMonth
:
(
date
.
getMonth
()
+
1
),
CDay
:
date
.
getDate
(),
}
}
//添加月份
Vue
.
prototype
.
AddMonth
=
function
(
dateStr
,
month
)
{
var
v
=
new
Date
(
dateStr
);
if
(
v
)
{
var
t
=
new
Date
(
v
.
getFullYear
(),
v
.
getMonth
(),
v
.
getDate
(),
v
.
getHours
(),
v
.
getMinutes
(),
v
.
getSeconds
(),
v
.
getMilliseconds
());
t
.
setMonth
(
v
.
getMonth
()
+
month
);
if
(
t
.
getDate
()
!=
v
.
getDate
())
{
t
.
setDate
(
0
);
}
return
t
;
Vue
.
prototype
.
AddMonth
=
function
(
dateStr
,
month
)
{
var
v
=
new
Date
(
dateStr
);
if
(
v
)
{
var
t
=
new
Date
(
v
.
getFullYear
(),
v
.
getMonth
(),
v
.
getDate
(),
v
.
getHours
(),
v
.
getMinutes
(),
v
.
getSeconds
(),
v
.
getMilliseconds
());
t
.
setMonth
(
v
.
getMonth
()
+
month
);
if
(
t
.
getDate
()
!=
v
.
getDate
())
{
t
.
setDate
(
0
);
}
}
\ No newline at end of file
return
t
;
}
}
Vue
.
prototype
.
getUrlKey
=
function
(
name
,
url
)
{
return
decodeURIComponent
((
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
url
)
||
[,
""
])[
1
].
replace
(
/
\+
/g
,
'%20'
))
||
null
}
src/components/search_sf/search_sf1.vue
View file @
e3504ff2
...
...
@@ -273,7 +273,7 @@
tl
:
""
,
ful
:
""
},
RB_Group_Id
:
0
,
RB_Group_Id
:
0
,
};
},
mounted
()
{
...
...
@@ -352,17 +352,22 @@
this
.
showCompPannel
=
false
;
},
goSearchHandler
()
{
if
(
this
.
searchKey
==
""
)
{
this
.
$q
.
notify
({
color
:
"negative"
,
textColor
:
"#FFF"
,
icon
:
"report_problem"
,
message
:
"尊敬的客人,請選擇一個目的地吧"
,
position
:
"top"
,
timeout
:
3000
});
}
this
.
CommonJump
(
'/search'
,
{})
// if (this.searchKey == "") {
// this.$q.notify({
// color: "negative",
// textColor: "#FFF",
// icon: "report_problem",
// message: "尊敬的客人,請選擇一個目的地吧",
// position: "top",
// timeout: 3000
// });
// }
this
.
CommonJump
(
'/search'
,
{
qsearchKey
:
this
.
searchKey
,
qsearchDate
:
this
.
searchDate
,
qsearchEndDate
:
this
.
searchEndDate
,
})
}
}
};
...
...
src/components/search_sf/search_sf2.vue
View file @
e3504ff2
...
...
@@ -354,17 +354,21 @@
this
.
showCompPannel
=
false
;
},
goSearchHandler
()
{
if
(
this
.
searchKey
==
""
)
{
this
.
$q
.
notify
({
color
:
"negative"
,
textColor
:
"#FFF"
,
icon
:
"report_problem"
,
message
:
"尊敬的客人,請選擇一個目的地吧"
,
position
:
"top"
,
timeout
:
3000
});
}
this
.
CommonJump
(
'/search'
,
{})
// if (this.searchKey == "") {
// this.$q.notify({
// color: "negative",
// textColor: "#FFF",
// icon: "report_problem",
// message: "尊敬的客人,請選擇一個目的地吧",
// position: "top",
// timeout: 3000
// });
// }
this
.
CommonJump
(
'/search'
,
{
qsearchKey
:
this
.
searchKey
,
qsearchDate
:
this
.
searchDate
,
qsearchEndDate
:
this
.
searchEndDate
,
})
}
}
};
...
...
src/components/search_sf/search_sf3.vue
View file @
e3504ff2
...
...
@@ -273,7 +273,7 @@
tl
:
""
,
ful
:
""
},
RB_Group_Id
:
0
,
RB_Group_Id
:
0
,
};
},
mounted
()
{
...
...
@@ -302,7 +302,7 @@
getAera
()
{
this
.
apipost
(
"ws_get_GetSearchArea"
,
{
RB_Group_Id
:
this
.
RB_Group_Id
RB_Group_Id
:
this
.
RB_Group_Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
...
...
@@ -357,17 +357,21 @@
this
.
showCompPannel
=
false
;
},
goSearchHandler
()
{
if
(
this
.
searchKey
==
""
)
{
this
.
$q
.
notify
({
color
:
"negative"
,
textColor
:
"#FFF"
,
icon
:
"report_problem"
,
message
:
"尊敬的客人,請選擇一個目的地吧"
,
position
:
"top"
,
timeout
:
3000
});
}
this
.
CommonJump
(
'/search'
,
{})
// if (this.searchKey == "") {
// this.$q.notify({
// color: "negative",
// textColor: "#FFF",
// icon: "report_problem",
// message: "尊敬的客人,請選擇一個目的地吧",
// position: "top",
// timeout: 3000
// });
// }
this
.
CommonJump
(
'/search'
,
{
qsearchKey
:
this
.
searchKey
,
qsearchDate
:
this
.
searchDate
,
qsearchEndDate
:
this
.
searchEndDate
,
})
}
}
};
...
...
src/pages/Search.vue
View file @
e3504ff2
...
...
@@ -638,11 +638,13 @@
</div>
</div>
{{ShowType}}
<
template
v-if=
"ShowType==0"
>
<!--豆腐格-->
<searchBlock
:DataList=
"DataList"
:PageCount=
"PageCount"
></searchBlock>
</
template
>
<
template
v-else
>
<!--列表-->
<searchList
:DataList=
"DataList"
:PageCount=
"PageCount"
></searchList>
</
template
>
...
...
@@ -863,8 +865,24 @@
//行程列表
DataList
:
[],
PageCount
:
0
,
TotalCount
:
0
,
};
},
created
()
{
var
qsearchKey
=
this
.
getUrlKey
(
"qsearchKey"
,
window
.
location
.
href
);
var
qsearchDate
=
this
.
getUrlKey
(
"qsearchDate"
,
window
.
location
.
href
);
var
qsearchEndDate
=
this
.
getUrlKey
(
"qsearchEndDate"
,
window
.
location
.
href
);
if
(
qsearchKey
)
{
this
.
qMsg
.
searchKey
=
qsearchKey
;
}
if
(
qsearchDate
)
{
this
.
qMsg
.
startDate
=
qsearchDate
;
}
if
(
qsearchEndDate
)
{
this
.
qMsg
.
endDate
=
qsearchEndDate
;
}
},
mounted
()
{
if
(
localStorage
.
baseifo
)
{
var
jObj
=
JSON
.
parse
(
localStorage
.
baseifo
);
...
...
@@ -873,7 +891,6 @@
}
else
{
this
.
getAera
()
}
document
.
addEventListener
(
"click"
,
this
.
clickHandler
);
},
methods
:
{
...
...
@@ -916,16 +933,18 @@
this
.
showSplitPannel
=
false
;
}
},
chosenAreaHandler
()
{
chosenAreaHandler
(
name
)
{
this
.
qMsg
.
searchKey
=
name
;
this
.
showSplitPannel
=
false
;
},
goSearchHandler
()
{
console
.
log
(
"this.qMsg"
,
this
.
qMsg
);
this
.
apipost
(
"b2b_get_GetB2BTravelPageList"
,
this
.
qMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
PageCount
=
res
.
data
.
data
.
pageCount
;
this
.
TotalCount
=
res
.
data
.
data
.
total
;
var
tempArray
=
res
.
data
.
data
.
pageData
;
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
tempArray
.
forEach
(
item
=>
{
...
...
@@ -937,8 +956,7 @@
}
else
{
item
.
newCoverImg
=
""
;
}
}
catch
(
e
)
{
}
}
catch
(
e
)
{}
}
});
this
.
DataList
=
tempArray
;
...
...
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