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
e18ee443
Commit
e18ee443
authored
Mar 16, 2023
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改
parent
7c2d7e45
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
190 additions
and
127 deletions
+190
-127
utils.js
src/boot/utils.js
+2
-2
search_sf2.vue
src/components/search_sf/search_sf2.vue
+1
-0
kkday.vue
src/components/searchdata/kkday.vue
+180
-123
orderPreview.vue
src/components/trip/orderPreview.vue
+3
-1
detailsNew.vue
src/pages/detailsNew.vue
+4
-1
No files found.
src/boot/utils.js
View file @
e18ee443
...
...
@@ -26,7 +26,7 @@ Vue.prototype.domainManager = function() {
domainUrl
=
"http://testapi.oytour.com"
;
}
else
if
(
domainNameUrl
.
indexOf
(
'oytour'
)
!==
-
1
)
{
domainUrl
=
"http://reborn.oytour.com"
;
//
domainUrl = 'http://192.168.10.206:8015' //'http://192.168.10.206:8015' ''http://192.168.10.11:8083' '
domainUrl
=
'http://192.168.10.206:8015'
//'http://192.168.10.206:8015' ''http://192.168.10.11:8083' '
}
var
obj
=
{
//主地址
...
...
@@ -41,7 +41,7 @@ Vue.prototype.domainManager = function() {
//获取当前域名
Vue
.
prototype
.
GetDomain
=
function
()
{
var
domainNameUrl
=
window
.
location
.
hostname
;
domainNameUrl
=
"
www
.oytour.com"
;
domainNameUrl
=
"
t
.oytour.com"
;
return
domainNameUrl
;
}
Vue
.
prototype
.
groupBy
=
function
(
array
,
f
)
{
...
...
src/components/search_sf/search_sf2.vue
View file @
e18ee443
...
...
@@ -145,6 +145,7 @@
@
focus=
"searchFocusHandler"
@
blur=
"searchBlurHandler"
@
keyup=
"searchChangeHandler"
@
keypress
.
enter
.
native=
"goSearchHandler"
/>
<q-btn
dark-percentage
...
...
src/components/searchdata/kkday.vue
View file @
e18ee443
<
template
>
<div
class=
"items-start q-mt-lg travel-list"
:class=
"$q.platform.is.desktop ? 'row' : 'colmuns'"
>
<div
class=
"items-start q-mt-lg travel-list"
:class=
"$q.platform.is.desktop ? 'row' : 'colmuns'"
>
<div
class=
"col-3"
:class=
"$q.platform.is.desktop ? 'q-mr-lg' : 'q-ma-md'"
>
<q-card
flat
class=
"rounded-borders q-py-md"
>
<div
class=
"text-subtitle1 text-weight-bold q-mx-md"
>
篩選目的地
</div>
...
...
@@ -61,7 +64,7 @@
:
options
=
"optionsFn"
range
@
range
-
end
=
"dateRangeHandler"
mask
=
"YYYY
/MM/
DD"
mask
=
"YYYY
-MM-
DD"
><
/q-date
>
<
/div
>
<
/q-popup-proxy
>
...
...
@@ -78,7 +81,7 @@
:
min
=
"priceModel.min"
:
max
=
"priceModel.max"
:
step
=
"1"
@
input
=
"testHandler"
@
change
=
"testHandler"
color
=
"primary"
class
=
"q-mt-md"
/>
...
...
@@ -152,14 +155,8 @@
<
/div
>
<
div
class
=
"q-mt-lg"
v
-
if
=
"!$q.loading.isActive && DataList.length > 0"
>
<
div
class
=
"
rounded-borders
cursor-pointer
overflow-hidden
bg-white
"
:
class
=
"$q.platform.is.desktop ? 'row q-mb-md' : 'colmuns q-ma-md'"
class
=
"rounded-borders cursor-pointer overflow-hidden bg-white"
:
class
=
"$q.platform.is.desktop ? 'row q-mb-md' : 'colmuns q-ma-md'"
@
click
=
"GotoDetails(x)"
v
-
for
=
"(x, i) in DataList"
:
key
=
"i"
...
...
@@ -169,8 +166,8 @@
:
ratio
=
"1"
spinner
-
color
=
"grey"
spinner
-
size
=
"20px"
:
width
=
"$q.platform.is.desktop ? '272px' : ''"
:
height
=
"$q.platform.is.desktop ? '' : '200px'"
:
width
=
"$q.platform.is.desktop ? '272px' : ''"
:
height
=
"$q.platform.is.desktop ? '' : '200px'"
class
=
"bg-grey-3"
/>
<
div
class
=
"q-pa-md col column"
>
...
...
@@ -194,10 +191,7 @@
/>
<
/div
>
<
div
class
=
"
text-subtitle2 text-grey-6 text-weight-regular
ellipsis-2-lines
"
class
=
"text-subtitle2 text-grey-6 text-weight-regular ellipsis-2-lines"
style
=
"line-height: 1.6"
>
{{
x
.
productRecommend
}}
...
...
@@ -371,9 +365,9 @@ export default {
TotalCount: 0,
PageCount: 0,
priceModel: {
min: 1,
max: 10
0000,
}
min: 1,
max: 3
0000,
}
,
}
;
}
,
created() {
...
...
@@ -383,10 +377,10 @@ export default {
this.initGoods();
this.msg.priceRange = {
min: 1,
max:
10
0000,
max:
3
0000,
}
;
this.msg.minPrice = 0;
this.msg.maxPrice =
10
0000;
this.msg.maxPrice =
3
0000;
this.dayArray.forEach((x) => {
x.checked = false;
}
);
...
...
@@ -395,19 +389,21 @@ export default {
}
,
mounted() {
var CategoryName = this.getUrlKey("
CategoryName
", window.location.href);
if(CategoryName) {
let list = this.goodsType.find(item => item.CategoryName === CategoryName)
let arr = []
list.children.forEach(item => {
arr.push(item.Id)
if(item.children && item.children.length) {
item.children.forEach(item2 => {
arr.push(item2.Id)
}
)
if (CategoryName) {
let list = this.goodsType.find(
(item) => item.CategoryName === CategoryName
);
let arr = [];
list.children.forEach((item) => {
arr.push(item.Id);
if (item.children && item.children.length) {
item.children.forEach((item2) => {
arr.push(item2.Id);
}
);
}
}
)
this.ticked = arr
}
}
)
;
this.ticked = arr
;
}
}
,
methods: {
handleSelected(target) {
...
...
@@ -419,7 +415,7 @@ export default {
}
,
handleAreaTicked(target) {
this.areaTicked = target;
console.log(
'this.areaTicked', target)
console.log(
"
this
.
areaTicked
", target);
this.msg.placeIds = this.getChoseAddressCity().join("
,
");
this.goSearchHandler();
}
,
...
...
@@ -481,16 +477,19 @@ export default {
let result = [];
function treeToArray(tree) {
return tree.reduce((res, item) => {
const { children, ...i
}
= item
return res.concat(i, children && children.length ? treeToArray(children) : [])
}
, [])
const { children, ...i
}
= item;
return res.concat(
i,
children && children.length ? treeToArray(children) : []
);
}
, []);
}
const areaList = treeToArray(this.areaList)
console.log(
'>>>>>>>>>>>>>>>>>>>>>', areaList)
const areaList = treeToArray(this.areaList)
;
console.log(
"
>>>>>>>>>>>>>>>>>>>>>
", areaList);
areaList.forEach((item) => {
if
(this.areaTicked.includes(item.Id)) {
let arr = item.DestinationList.map((item) => item.ID);
result = result.concat(arr);
if
(this.areaTicked.includes(item.Id)) {
let arr = item.DestinationList.map((item) => item.ID);
result = result.concat(arr);
}
}
);
return result;
...
...
@@ -519,7 +518,6 @@ export default {
}
);
this.msg.dayNumList = arr;
this.goSearchHandler();
}
,
optionsFn(cd) {
return (
...
...
@@ -571,48 +569,66 @@ export default {
}
);
this.goodsType.push(x);
}
);
this.goodsTypeJSON = JSON.stringify(this.goodsType)
this.goodsTypeJSON = JSON.stringify(this.goodsType)
;
if (this.msg.categoryId) {
this.$nextTick(() => {
this.$refs.category.setTicked([...new Set(arr)], true);
}
);
}
}
,
dfs
(tree, ope, filter) {
const walkAndCopy = (tree, depth = 1) => {
if(filter(tree)) {
const copy = {...tree
}
ope(tree.Name, depth)
if
(tree.children) {
copy.children = []
tree.children.forEach((node) => {
const subTree = walkAndCopy(node, depth + 1)
subTree && copy.children.push(subTree)
}
)
}
return copy
}
else if(tree && tree.children && tree.children.length) {
const copy = {...tree
}
ope(tree.Name, depth)
copy.Name = tree.Name
if
(tree.children) {
copy.children = []
tree.children.forEach((node) => {
const subTree = walkAndCopy(node, depth + 1)
subTree && copy.children.push(subTree)
}
)
}
return copy
dfs(tree, ope, filter) {
const walkAndCopy = (tree, depth = 1) => {
if
(filter(tree)) {
const copy = { ...tree
}
;
ope(tree.Name, depth);
if
(tree.children) {
copy.children = [];
tree.children.forEach((node) => {
const subTree = walkAndCopy(node, depth + 1);
subTree && copy.children.push(subTree);
}
);
}
return copy;
}
else if
(tree && tree.children && tree.children.length) {
const copy = { ...tree
}
;
ope(tree.Name, depth);
copy.Name = tree.Name;
if
(tree.children) {
copy.children = [];
tree.children.forEach((node) => {
const subTree = walkAndCopy(node, depth + 1);
subTree && copy.children.push(subTree);
}
);
}
return copy;
}
}
return walkAndCopy(tree)
}
,
}
;
return walkAndCopy(tree);
}
,
changeAddrSearchHandler(v) {
this.areaListJSONTMP = JSON.parse(JSON.stringify(this.areaListJSON));
let tree = this.dfs({Name: '', children: this.areaListJSONTMP
}
, (name, depth) => {
}
, ({Name
}
) => {return Name.indexOf(v) !== -1
}
)
tree = this.dfs(tree, (name, depth) => {
}
, ({Name
}
) => {return Name.indexOf(v) !== -1
}
)
tree = this.dfs(tree, (name, depth) => {
}
, ({Name
}
) => {return Name.indexOf(v) !== -1
}
)
this.areaList = tree.children
let tree = this.dfs(
{ Name: "", children: this.areaListJSONTMP
}
,
(name, depth) => {
}
,
({ Name
}
) => {
return Name.indexOf(v) !== -1;
}
);
tree = this.dfs(
tree,
(name, depth) => {
}
,
({ Name
}
) => {
return Name.indexOf(v) !== -1;
}
);
tree = this.dfs(
tree,
(name, depth) => {
}
,
({ Name
}
) => {
return Name.indexOf(v) !== -1;
}
);
this.areaList = tree.children;
// this.areaList.forEach(x => {
// x.isShow = x.Name.indexOf(v) != -1;
// x.isShowChild = false;
...
...
@@ -647,7 +663,10 @@ export default {
var companyId = -1;
if (localStorage.groupinfo) {
var groupinfo = JSON.parse(localStorage.groupinfo);
companyId = groupinfo.siteList[0]&&groupinfo.siteList[0].companyId?groupinfo.siteList[0].companyId:-1;
companyId =
groupinfo.siteList[0] && groupinfo.siteList[0].companyId
? groupinfo.siteList[0].companyId
: -1;
}
if (localStorage.b2bUser) {
var b2bUser = JSON.parse(window.localStorage.getItem("
b2bUser
"));
...
...
@@ -665,9 +684,9 @@ export default {
if (res.data.resultCode == 1) {
this.PageCount = res.data.data.pageCount;
this.TotalCount = res.data.data.
pageData.
count;
this.TotalCount = res.data.data.count;
var tempArray = res.data.data.pageData.list;
console.log(
'getSearch data', tempArray)
console.log(
"
getSearch
data
", tempArray);
if (tempArray && tempArray.length > 0) {
// tempArray.forEach(item => {
// if (item.imgCover && item.imgCover != "") {
...
...
@@ -682,7 +701,7 @@ export default {
//
}
//
}
);
this.DataList = tempArray;
this.renderSearchInfo(res.data.data.pageData.condition)
this.renderSearchInfo(res.data.data.pageData.condition)
;
this.$forceUpdate();
}
}
...
...
@@ -691,52 +710,91 @@ export default {
);
}
,
renderSearchInfo(condition) {
if(!condition.length) {
return
if
(!condition.length) {
return
;
}
let areaInfo = condition.find(item => item.type === 1).list
let dayInfo = condition.find(item => item.type === 2).list
let priceInfo = condition.find(item => item.type === 3)
let categoryInfo = condition.find(item => item.type === 4).list
// this.areaTicked = areaInfo;
let areaInfo = condition.find((item) => item.type === 1).list;
let dayInfo = condition.find((item) => item.type === 2).list;
let priceInfo = condition.find((item) => item.type === 3);
let categoryInfo = condition.find((item) => item.type === 4).list;
// this.areaTicked = areaInfo;
this.areaListJSONTMP = JSON.parse(JSON.stringify(this.areaListJSON));
let tree = this.dfs({Name: '', children: this.areaListJSONTMP
}
, (name, depth) => {
}
, ({Id
}
) => {return areaInfo.includes(Id)
}
)
tree = this.dfs(tree, (name, depth) => {
}
, ({Id
}
) => {return areaInfo.includes(Id)
}
)
tree = this.dfs(tree, (name, depth) => {
}
, ({Id
}
) => {return areaInfo.includes(Id)
}
)
this.areaList = tree.children
let tree = this.dfs(
{ Name: "", children: this.areaListJSONTMP
}
,
(name, depth) => {
}
,
({ Id
}
) => {
return areaInfo.includes(Id);
}
);
tree = this.dfs(
tree,
(name, depth) => {
}
,
({ Id
}
) => {
return areaInfo.includes(Id);
}
);
tree = this.dfs(
tree,
(name, depth) => {
}
,
({ Id
}
) => {
return areaInfo.includes(Id);
}
);
this.areaList = tree.children;
const categoryTmp = JSON.parse(this.goodsTypeJSON);
let category = this.dfs({Name: '', children: categoryTmp
}
, (name, depth) => {
}
, (item) => {return categoryInfo.includes(item.Id)
}
)
category = this.dfs(category, (name, depth) => {
}
, (item) => {return categoryInfo.includes(item.Id)
}
)
category = this.dfs(category, (name, depth) => {
}
, (item) => {return categoryInfo.includes(item.Id)
}
)
this.goodsType = category.children
// this.ticked = categoryInfo;
console.log('this.areaListJSONTMP', this.areaListJSONTMP, this.areaList)
this.priceModel = {min: priceInfo.minPrice, max: priceInfo.maxPrice
}
this.msg.priceRange = {min: priceInfo.minPrice, max: priceInfo.maxPrice
}
let arr = []
dayInfo.forEach(item => {
if(item < 6) {
arr.push(item)
}
else if(item === 7 || item ===8) {
arr.push(7)
}
else if(item === 8 || item ===10) {
arr.push(8)
}
else {
arr.push(9)
}
}
)
console.log('dayInfo', arr, dayInfo, this.dayArray)
// arr = [... new Set(arr)]
// this.dayArray.forEach(item => {
// if(arr.includes(item.id)) {
// item.checked = true
//
}
//
}
)
this.dayArray = this.dayArray.filter(item => arr.includes(item.id))
// this.msg.dayNumList = arr;
let category = this.dfs(
{ Name: "", children: categoryTmp
}
,
(name, depth) => {
}
,
(item) => {
return categoryInfo.includes(item.Id);
}
);
category = this.dfs(
category,
(name, depth) => {
}
,
(item) => {
return categoryInfo.includes(item.Id);
}
);
category = this.dfs(
category,
(name, depth) => {
}
,
(item) => {
return categoryInfo.includes(item.Id);
}
);
this.goodsType = category.children;
// this.ticked = categoryInfo;
console.log("
this
.
areaListJSONTMP
", this.areaListJSONTMP, this.areaList);
this.priceModel = { min: priceInfo.minPrice, max: priceInfo.maxPrice
}
;
this.msg.priceRange = {
min: priceInfo.minPrice,
max: priceInfo.maxPrice,
}
;
let arr = [];
dayInfo.forEach((item) => {
if (item < 6) {
arr.push(item);
}
else if (item === 7 || item === 8) {
arr.push(7);
}
else if (item === 8 || item === 10) {
arr.push(8);
}
else {
arr.push(9);
}
}
);
console.log("
dayInfo
", arr, dayInfo, this.dayArray);
// arr = [... new Set(arr)]
// this.dayArray.forEach(item => {
// if(arr.includes(item.id)) {
// item.checked = true
//
}
//
}
)
this.dayArray = this.dayArray.filter((item) => arr.includes(item.id));
// this.msg.dayNumList = arr;
}
,
GotoDetails(item) {
this.CommonJump(item,
{
}
, 'blank'
);
this.CommonJump(item,
{
}
, "
blank
"
);
}
,
}
,
}
;
...
...
@@ -746,7 +804,6 @@ this.dayArray = this.dayArray.filter(item => arr.includes(item.id))
.addr-list:hover {
background: #f1416c1a;
}
</style>
<style scoped>
.price-stuff {
...
...
src/components/trip/orderPreview.vue
View file @
e18ee443
...
...
@@ -381,8 +381,10 @@ export default {
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
();
if
(
this
.
p
.
unionCityList
&&
this
.
p
.
unionCityList
.
length
>
0
&&
this
.
p
.
originalB2CPrice
==
this
.
p
.
RealPrice
){
if
(
this
.
p
.
unionCityList
[
0
].
cityId
==
this
.
travel
.
startCityId
){
this
.
changeCityHandler
(
this
.
p
.
unionCityList
[
0
])
}
this
.
changeCityHandler
(
this
.
p
.
unionCityList
[
0
])
}
}
...
...
src/pages/detailsNew.vue
View file @
e18ee443
...
...
@@ -898,10 +898,13 @@ export default {
this
.
currentPrice
.
RealPrice
=
this
.
currentPrice
.
RealPrice
?
this
.
currentPrice
.
RealPrice
:
this
.
currentPrice
.
originalB2CPrice
this
.
currentPrice
.
originalB2CPrice
=
this
.
currentPrice
.
RealPrice
if
(
this
.
currentPrice
.
unionCityList
&&
this
.
currentPrice
.
unionCityList
.
length
>
0
&&
this
.
dataList
.
startCityId
!=
0
){
this
.
currentPrice
.
unionCityList
.
splice
(
0
,
0
,{
if
(
this
.
currentPrice
.
unionCityList
.
findIndex
(
x
=>
x
.
cityId
==
this
.
dataList
.
startCityId
)
==-
1
){
this
.
currentPrice
.
unionCityList
.
splice
(
0
,
0
,{
cityId
:
this
.
dataList
.
startCityId
,
cityName
:
this
.
dataList
.
startCityName
})
}
}
if
(
this
.
$q
.
platform
.
is
.
mobile
){
this
.
$refs
.
qDateProxy
.
hide
();
...
...
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