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
d8e32148
Commit
d8e32148
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
cb9c41f1
fdab40c4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
84 additions
and
50 deletions
+84
-50
Date.vue
src/Components/assistingAgriculture/index/Date.vue
+7
-7
pages.json
src/pages.json
+6
-0
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+54
-37
specialOfferZoneList.vue
...assistingAgriculture/RuralTravel/specialOfferZoneList.vue
+12
-5
detail.vue
src/pages/assistingAgriculture/detail/detail.vue
+4
-1
refund.vue
src/pages/assistingAgriculture/order/refund.vue
+0
-0
index.vue
src/pages/index/index.vue
+1
-0
icon1.png
src/static/assistingAgriculture/order/icon1.png
+0
-0
No files found.
src/Components/assistingAgriculture/index/Date.vue
View file @
d8e32148
...
...
@@ -55,6 +55,13 @@ const selectItem = (index, item) => {
emit
(
'dataParams'
,
item
,
datePart
);
}
};
function
timestampToDateBasic
(
timestamp
)
{
const
date
=
new
Date
(
timestamp
);
const
year
=
date
.
getFullYear
();
const
month
=
(
date
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
const
day
=
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
return
`
${
year
}
-
${
month
}
-
${
day
}
00:00:00`
;
}
const
getStartDateList
=
()
=>
{
getStartDate
(
params
).
then
((
res
)
=>
{
dataList
.
value
=
res
.
data
;
...
...
@@ -64,13 +71,6 @@ function handleConfirm({ value }) {
const
datePart
=
timestampToDateBasic
(
value
);
emit
(
'dataParams'
,
null
,
datePart
);
}
function
timestampToDateBasic
(
timestamp
)
{
const
date
=
new
Date
(
timestamp
);
const
year
=
date
.
getFullYear
();
const
month
=
(
date
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
const
day
=
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
return
`
${
year
}
/
${
month
}
/
${
day
}
`
;
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages.json
View file @
d8e32148
...
...
@@ -257,6 +257,12 @@
"navigationBarTitleText"
:
"商品详情页"
}
},
{
"path"
:
"pages/assistingAgriculture/order/refund"
,
"style"
:
{
"navigationBarTitleText"
:
"申请售后"
}
},
{
"path"
:
"pages/assistingAgriculture/detail/comment"
,
"style"
:
{
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
d8e32148
...
...
@@ -324,6 +324,8 @@ function handleFullscreenChange(event) {
// };
// 智能排序
const
sortParams
=
(
sortMode
)
=>
{
currentPage
.
value
=
1
;
hasMoreData
.
value
=
true
;
sortType
.
value
=
sortMode
;
getProd
();
};
...
...
@@ -340,9 +342,14 @@ const sortParams = (sortMode) => {
// };
const
dataParams
=
(
item
,
datePart
)
=>
{
if
(
item
)
{
dateType
.
value
=
item
.
key
.
toString
();
currentPage
.
value
=
1
;
hasMoreData
.
value
=
true
;
console
.
log
(
item
,
212
);
dateType
.
value
=
String
(
item
.
key
);
getProd
();
}
else
{
currentPage
.
value
=
1
;
hasMoreData
.
value
=
true
;
dateType
.
value
=
'8'
;
if
(
datePart
&&
datePart
!==
'NaN/NaN/NaN'
)
{
allocateDate
.
value
=
datePart
;
...
...
@@ -353,30 +360,54 @@ 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
();
currentPage
.
value
=
1
;
hasMoreData
.
value
=
true
;
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
);
currentPage
.
value
=
1
;
hasMoreData
.
value
=
true
;
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 +422,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 +433,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 +445,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
.
records
]
;
}
// 判断是否还有更多数据
if
(
res
.
data
.
records
.
length
<
params
.
size
)
{
...
...
@@ -450,16 +477,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 +699,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
,
...
...
@@ -714,7 +731,7 @@ page {
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
width
:
9
0rpx
;
width
:
8
0rpx
;
text-align
:
center
;
}
.tag
{
...
...
src/pages/assistingAgriculture/RuralTravel/specialOfferZoneList.vue
View file @
d8e32148
...
...
@@ -190,10 +190,17 @@ function onChange(e) {
}
// 智能排序
const
sortParams
=
(
sortMode
)
=>
{
params
.
value
.
sortType
=
sortMode
.
sortMode
;
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
if
(
sortMode
)
{
params
.
value
.
sortType
=
sortMode
.
sortMode
;
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
}
else
{
delete
params
.
value
.
sortType
;
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
}
};
// 出发日期
const
dataParams
=
(
item
,
datePart
)
=>
{
...
...
@@ -203,7 +210,7 @@ const dataParams = (item, datePart) => {
queryOfferProdListFn
();
});
}
else
{
params
.
value
.
dateType
=
8
;
params
.
value
.
dateType
=
'8'
;
if
(
datePart
&&
datePart
!==
'NaN/NaN/NaN'
)
{
params
.
value
.
allocateDate
=
datePart
;
rotate2
.
value
=
false
;
...
...
src/pages/assistingAgriculture/detail/detail.vue
View file @
d8e32148
...
...
@@ -166,6 +166,8 @@
<
script
setup
>
import
{
ref
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
onShow
}
from
'@dcloudio/uni-app'
;
import
{
getProdDetail
,
...
...
@@ -177,6 +179,7 @@ import {
receiveCoupon
,
}
from
'@/api/packageDetail'
;
import
fab
from
'../../../components/fab/fab.vue'
;
const
router
=
useRoute
();
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
// 图片
const
swiperList
=
ref
([
...
...
@@ -215,7 +218,7 @@ function handleClick(e) {
}
function
jumpPjPgae
()
{
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/detail/comment?shopId=
${
dataDetails
.
value
.
prod
.
shopId
}
&prodId=
${
dataDetails
.
value
.
prodPresale
.
prodId
}
`
,
url
:
`/pages/assistingAgriculture/detail/comment?shopId=
${
dataDetails
.
value
.
prod
.
shopId
}
&prodId=
${
router
.
query
.
prodId
}
`
,
});
}
function
onChange
(
e
)
{
...
...
src/pages/assistingAgriculture/order/refund.vue
0 → 100644
View file @
d8e32148
This diff is collapsed.
Click to expand it.
src/pages/index/index.vue
View file @
d8e32148
...
...
@@ -235,6 +235,7 @@ onLoad(() => {
getCouponMainList
();
});
onPullDownRefresh
(()
=>
{
reset
();
getClassification
();
rotatingBroadcast
();
nearbyFood
();
...
...
src/static/assistingAgriculture/order/icon1.png
0 → 100644
View file @
d8e32148
672 Bytes
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