Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
43aca4c6
Commit
43aca4c6
authored
Aug 16, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
e04e5760
e7b19a99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
36 deletions
+49
-36
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+48
-36
index.vue
src/pages/index/index.vue
+1
-0
No files found.
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
43aca4c6
...
...
@@ -340,7 +340,8 @@ const sortParams = (sortMode) => {
// };
const
dataParams
=
(
item
,
datePart
)
=>
{
if
(
item
)
{
dateType
.
value
=
item
.
key
.
toString
();
console
.
log
(
item
,
212
);
dateType
.
value
=
String
(
item
.
key
);
getProd
();
}
else
{
dateType
.
value
=
'8'
;
...
...
@@ -353,30 +354,50 @@ const dataParams = (item, datePart) => {
};
// 景点
const
placeParams
=
(
item
)
=>
{
const
ids
=
item
.
map
((
i
)
=>
i
.
id
);
const
arr
=
ids
.
join
(
','
);
attractionIdList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
if
(
item
.
length
!==
0
)
{
const
ids
=
item
.
map
((
i
)
=>
i
.
id
);
const
arr
=
ids
.
join
(
','
);
attractionIdList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
}
else
if
(
item
.
length
===
0
)
{
attractionIdList
.
value
=
[];
getProd
();
}
};
// 筛选
const
screenParams
=
(
selectedItems
,
type
)
=>
{
console
.
log
(
selectedItems
,
type
,
111
);
console
.
log
(
selectedItems
.
length
,
type
,
111
);
if
(
type
===
'screen'
)
{
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
tripCityId
);
const
arr
=
ids
.
join
(
','
);
startCityList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
if
(
selectedItems
.
length
!==
0
)
{
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
tripCityId
);
const
arr
=
ids
.
join
(
','
);
startCityList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
}
else
if
(
selectedItems
.
length
===
0
)
{
startCityList
.
value
=
[];
getProd
();
}
}
else
if
(
type
===
'serve'
)
{
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
labelId
);
const
arr
=
ids
.
join
(
','
);
serviceList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
if
(
selectedItems
.
length
!==
0
)
{
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
labelId
);
const
arr
=
ids
.
join
(
','
);
serviceList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
}
else
if
(
selectedItems
.
length
===
0
)
{
serviceList
.
value
=
[];
getProd
();
}
}
else
if
(
type
===
'people'
)
{
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
labelId
);
const
arr
=
ids
.
join
(
','
);
forPeopleList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
if
(
selectedItems
.
length
!==
0
)
{
const
ids
=
selectedItems
.
map
((
i
)
=>
i
.
labelId
);
const
arr
=
ids
.
join
(
','
);
forPeopleList
.
value
=
arr
.
split
(
','
).
map
(
String
);
getProd
();
}
else
if
(
selectedItems
.
length
===
0
)
{
forPeopleList
.
value
=
[];
getProd
();
}
}
};
// 搜索
...
...
@@ -391,7 +412,7 @@ const getProd = (searchKeyword = '') => {
});
const
params
=
{
current
:
currentPage
.
value
,
size
:
3
,
size
:
5
,
...(
sortType
.
value
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
...(
attractionIdList
.
value
&&
attractionIdList
.
value
.
length
>
0
&&
...
...
@@ -402,10 +423,6 @@ const getProd = (searchKeyword = '') => {
...(
serviceList
.
value
&&
serviceList
.
value
.
length
>
0
&&
{
serviceList
:
serviceList
.
value
}),
...(
forPeopleList
.
value
&&
forPeopleList
.
value
.
length
>
0
&&
{
forPeopleList
:
forPeopleList
.
value
}),
// ...(startCityList.value && { startCityList: startCityList.value.split(',') }),
// ...(serviceList.value && { serviceList: serviceList.value.split(',') }),
// ...(forPeopleList.value && { forPeopleList: forPeopleList.value.split(',') }),
...(
dateType
.
value
===
'8'
&&
{
allocateDate
:
allocateDate
.
value
}),
...(
searchKeyword
&&
{
keyword
:
searchKeyword
}),
};
...
...
@@ -418,7 +435,7 @@ const getProd = (searchKeyword = '') => {
if
(
currentPage
.
value
===
1
)
{
cardList
.
value
=
res
.
data
.
records
;
}
else
{
cardList
.
value
=
cardList
.
value
.
concat
(
res
.
data
.
records
)
;
cardList
.
value
=
[...
cardList
.
value
,
...
res
.
data
.
content
]
;
}
// 判断是否还有更多数据
if
(
res
.
data
.
records
.
length
<
params
.
size
)
{
...
...
@@ -450,16 +467,6 @@ const resetParams = () => {
getProd
();
}
};
// const resetParams = () => {
// sortType.value = null;
// attractionIdList.value = [];
// dateType.value = null;
// startCityList.value = [];
// serviceList.value = [];
// forPeopleList.value = [];
// allocateDate.value = null;
// getProd();
// };
function
toRouteDetails
(
item
)
{
console
.
log
(
item
,
22222
);
// TODO: 跳转到线路详情
...
...
@@ -682,8 +689,8 @@ page {
white-space
:
nowrap
;
}
.tag
.wd-tag
{
margin-right
:
10px
;
margin-bottom
:
5
px
;
margin-right
:
10
r
px
;
margin-bottom
:
10r
px
;
}
.score
,
.num
,
...
...
@@ -711,6 +718,11 @@ page {
::v-deep
.wd-tag__text
{
font-size
:
20rpx
;
margin-top
:
4rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
width
:
80rpx
;
text-align
:
center
;
}
.tag
{
margin-top
:
10rpx
;
...
...
src/pages/index/index.vue
View file @
43aca4c6
...
...
@@ -235,6 +235,7 @@ onLoad(() => {
getCouponMainList
();
});
onPullDownRefresh
(()
=>
{
reset
();
getClassification
();
rotatingBroadcast
();
nearbyFood
();
...
...
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