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
3c67e3ad
Commit
3c67e3ad
authored
Aug 13, 2024
by
蔡亮华(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
58f35743
24bf7b0b
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
450 additions
and
63 deletions
+450
-63
Date.vue
src/Components/assistingAgriculture/index/Date.vue
+125
-0
Search.vue
src/Components/assistingAgriculture/index/Search.vue
+12
-1
specialOfferZoneList.js
src/api/assistingAgriculture/specialOfferZoneList.js
+10
-0
pages.json
src/pages.json
+3
-2
RouteDetails.vue
src/pages/assistingAgriculture/RouteDetails/RouteDetails.vue
+29
-19
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+12
-2
specialOfferZoneList.vue
...assistingAgriculture/RuralTravel/specialOfferZoneList.vue
+235
-38
card.vue
src/pages/assistingAgriculture/album/card.vue
+7
-1
building.vue
src/pages/assistingAgriculture/index/building.vue
+6
-0
presale.vue
src/pages/assistingAgriculture/index/presale.vue
+5
-0
searchPage.vue
src/pages/assistingAgriculture/searchPage/searchPage.vue
+5
-0
index.vue
src/pages/index/index.vue
+1
-0
No files found.
src/Components/assistingAgriculture/index/Date.vue
0 → 100644
View file @
3c67e3ad
<
template
>
<view
class=
"sort"
:style=
"
{ width: width }">
<view
class=
"date"
>
出发日期
</view>
<ul
class=
"ul"
>
<li
v-for=
"(item, index) in dataList"
:key=
"index"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index, item)"
>
{{
item
.
startDate
}}
</li>
<wd-calendar
use-default-slot
v-model=
"value"
@
confirm=
"handleConfirm"
>
<li>
选择日期
</li>
</wd-calendar>
</ul>
</view>
</
template
>
<
script
setup
>
import
{
defineProps
,
onMounted
,
ref
}
from
'vue'
;
import
{
getStartDate
}
from
'@/api/assistingAgriculture/village'
;
const
selectedItem
=
ref
(
null
);
const
emit
=
defineEmits
([
'dataParams'
]);
const
dataList
=
ref
([]);
const
value
=
ref
(
''
);
const
formatValue
=
ref
(
''
);
const
params
=
{
current
:
1
,
size
:
10
,
};
const
props
=
defineProps
({
width
:
{
type
:
String
,
default
:
'100%'
,
},
});
onMounted
(
async
()
=>
{
getStartDateList
();
});
const
selectItem
=
(
index
,
item
)
=>
{
console
.
log
(
item
,
323
);
const
datePart
=
timestampToDateBasic
(
value
.
value
);
selectedItem
.
value
=
index
;
emit
(
'dataParams'
,
item
,
datePart
);
console
.
log
(
datePart
,
'datePart'
);
};
const
getStartDateList
=
()
=>
{
getStartDate
(
params
).
then
((
res
)
=>
{
dataList
.
value
=
res
.
data
;
});
};
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
>
.sort
{
width
:
710rpx
;
height
:
192rpx
;
position
:
absolute
;
top
:
100%
;
// width: 100%;
// min-height: 212rpx;
border-radius
:
0rpx
0rpx
16rpx
16rpx
;
background
:
#ffffff
;
box-shadow
:
0rpx
16rpx
16rpx
0rpx
rgba
(
73
,
73
,
73
,
0
.14
);
margin
:
0
auto
;
z-index
:
99
;
// display: flex;
padding-bottom
:
20rpx
;
box-sizing
:
border-box
;
overflow
:
auto
;
.date
{
width
:
96rpx
;
height
:
28rpx
;
font-family
:
Source
Han
Sans
;
font-size
:
24rpx
;
font-weight
:
normal
;
line-height
:
28rpx
;
letter-spacing
:
0em
;
font-variation-settings
:
'opsz'
auto
;
font-feature-settings
:
'kern'
on
;
color
:
#fa5151
;
margin-left
:
44rpx
;
margin-top
:
20rpx
;
}
.ul
{
padding-left
:
20rpx
;
display
:
flex
;
flex-flow
:
wrap
;
li
{
width
:
154rpx
;
height
:
20rpx
;
border-radius
:
8rpx
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
padding
:
6rpx
26rpx
;
margin-left
:
20rpx
;
background
:
#f3f3f3
;
font-size
:
24rpx
;
line-height
:
20rpx
;
text-align
:
center
;
list-style-type
:
none
;
margin-top
:
20rpx
;
}
.active
{
color
:
#fa5151
;
background
:
#feeeee
;
}
}
}
</
style
>
src/Components/assistingAgriculture/index/Search.vue
View file @
3c67e3ad
...
@@ -11,10 +11,13 @@
...
@@ -11,10 +11,13 @@
/>
/>
<input
<input
type=
"text"
type=
"text"
:value=
"test"
class=
"text"
class=
"text"
:placeholder=
"placeholderText"
:placeholder=
"placeholderText"
placeholder-style=
"font-size:16rpx;"
placeholder-style=
"font-size:16rpx;"
:value=
"modelValue"
@
input=
"updateModelValue"
@
keyup
.
enter=
"toSearch"
@
focus=
"toSearch"
/>
/>
</view>
</view>
</view>
</view>
...
@@ -22,6 +25,7 @@
...
@@ -22,6 +25,7 @@
<
script
setup
>
<
script
setup
>
import
{
defineProps
}
from
'vue'
;
import
{
defineProps
}
from
'vue'
;
const
emit
=
defineEmits
([
'search'
]);
const
props
=
defineProps
({
const
props
=
defineProps
({
iconSrc
:
{
iconSrc
:
{
type
:
String
,
type
:
String
,
...
@@ -31,7 +35,14 @@ const props = defineProps({
...
@@ -31,7 +35,14 @@ const props = defineProps({
type
:
String
,
type
:
String
,
default
:
''
,
default
:
''
,
},
},
modelValue
:
String
,
});
});
const
updateModelValue
=
(
event
)
=>
{
emit
(
'update:modelValue'
,
event
.
target
.
value
);
};
const
toSearch
=
(
test
)
=>
{
emit
(
'search'
,
test
);
};
// 返回上一级
// 返回上一级
function
back
()
{
function
back
()
{
xma
.
navigateBack
({
xma
.
navigateBack
({
...
...
src/api/assistingAgriculture/specialOfferZoneList.js
0 → 100644
View file @
3c67e3ad
import
{
request
}
from
'../../utils/request'
;
// 筑农首页-分类查询商品列表
export
function
queryOfferProdList
(
data
)
{
return
request
({
url
:
`/sgyrdd/prod/queryOfferProdList`
,
method
:
'GET'
,
data
,
});
}
src/pages.json
View file @
3c67e3ad
...
@@ -152,7 +152,9 @@
...
@@ -152,7 +152,9 @@
"path"
:
"pages/assistingAgriculture/RuralTravel/specialOfferZoneList"
,
"path"
:
"pages/assistingAgriculture/RuralTravel/specialOfferZoneList"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
""
,
"navigationBarTitleText"
:
""
,
"navigationBarBackgroundColor"
:
"#ffffff"
"navigationBarBackgroundColor"
:
"#ffffff"
,
"enablePullDownRefresh"
:
true
,
"onReachBottomDistance"
:
50
}
}
},
},
{
{
...
@@ -227,7 +229,6 @@
...
@@ -227,7 +229,6 @@
"navigationBarTitleText"
:
"景点详情"
,
"navigationBarTitleText"
:
"景点详情"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationStyle"
:
""
,
"navigationStyle"
:
""
,
"enablePullDownRefresh"
:
true
,
"onReachBottomDistance"
:
50
"onReachBottomDistance"
:
50
}
}
},
},
...
...
src/pages/assistingAgriculture/RouteDetails/RouteDetails.vue
View file @
3c67e3ad
...
@@ -212,6 +212,7 @@
...
@@ -212,6 +212,7 @@
<ul>
<ul>
<li>
<li>
{{
activeMeal
.
mealScenery
}}
{{
activeMeal
.
mealScenery
}}
<text
@
click=
"jumpPage"
style=
"color: #0974f5"
>
详情
</text>
</li>
</li>
<!--
<li>
<!--
<li>
4个景点,约7小时
4个景点,约7小时
...
@@ -343,6 +344,7 @@ const photoList = ref([]);
...
@@ -343,6 +344,7 @@ const photoList = ref([]);
// 套餐列表
// 套餐列表
const
mealList
=
ref
([]);
const
mealList
=
ref
([]);
const
activeMeal
=
ref
(
null
);
const
activeMeal
=
ref
(
null
);
const
orderInfo
=
ref
({});
const
onActiveMeal
=
(
item
)
=>
{
const
onActiveMeal
=
(
item
)
=>
{
activeMeal
.
value
=
item
;
activeMeal
.
value
=
item
;
getPriceListFn
(
item
.
mealId
);
getPriceListFn
(
item
.
mealId
);
...
@@ -353,6 +355,7 @@ const viewPriceList = ref([]);
...
@@ -353,6 +355,7 @@ const viewPriceList = ref([]);
const
activePrice
=
ref
(
null
);
const
activePrice
=
ref
(
null
);
const
show
=
ref
(
false
);
const
show
=
ref
(
false
);
const
shopIds
=
ref
(
''
);
const
shopIds
=
ref
(
''
);
const
prodIds
=
ref
(
''
);
watch
(
show
,
(
value
)
=>
{
watch
(
show
,
(
value
)
=>
{
let
index
=
priceList
.
value
.
indexOf
(
activePrice
.
value
);
let
index
=
priceList
.
value
.
indexOf
(
activePrice
.
value
);
index
=
Math
.
max
(
1
,
index
);
index
=
Math
.
max
(
1
,
index
);
...
@@ -370,7 +373,13 @@ const getPriceListFn = (mealId) => {
...
@@ -370,7 +373,13 @@ const getPriceListFn = (mealId) => {
viewPriceList
.
value
=
res
.
data
.
slice
(
0
,
4
);
viewPriceList
.
value
=
res
.
data
.
slice
(
0
,
4
);
});
});
};
};
function
jumpPage
()
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/reviewDetails/scenicSpotDetails?prodId='
+
activeMeal
.
value
.
prodId
,
});
}
function
groupBuyConfirmFn
(
prodId
,
skuId
)
{
function
groupBuyConfirmFn
(
prodId
,
skuId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
groupBuyConfirm
({
prodId
,
skuId
}).
then
((
res
)
=>
{
groupBuyConfirm
({
prodId
,
skuId
}).
then
((
res
)
=>
{
...
@@ -407,8 +416,8 @@ function formatDate(inputDate) {
...
@@ -407,8 +416,8 @@ function formatDate(inputDate) {
return
`
${
year
}
-
${
monthDay
}
`
;
return
`
${
year
}
-
${
monthDay
}
`
;
}
}
const
payNow
=
async
(
data
)
=>
{
const
payNow
=
async
(
data
)
=>
{
groupBuyConfirmFn
(
prodIds
.
value
,
skuIds
.
value
).
then
((
res
)
=>
{
groupBuyConfirmFn
(
activeMeal
.
value
.
prodId
,
activeMeal
.
value
.
skuId
).
then
((
res
)
=>
{
groupBuyUpdateFnQg
();
groupBuyUpdateFnQg
()
.
then
(()
=>
{})
;
});
});
params
.
value
.
id
=
orderInfo
.
value
.
key
;
params
.
value
.
id
=
orderInfo
.
value
.
key
;
params
.
value
.
tradeType
=
data
.
selectType
;
params
.
value
.
tradeType
=
data
.
selectType
;
...
@@ -419,24 +428,24 @@ const payNow = async (data) => {
...
@@ -419,24 +428,24 @@ const payNow = async (data) => {
payWayCode
:
5
,
payWayCode
:
5
,
tradeType
:
data
.
selectType
,
tradeType
:
data
.
selectType
,
};
};
groupBuyCreate
(
qgParams
).
then
((
res
)
=>
{
//
groupBuyCreate(qgParams).then((res) => {
if
(
res
.
code
===
0
)
{
//
if (res.code === 0) {
openUrl
(
res
.
data
.
result
);
//
openUrl(res.data.result);
}
else
{
//
} else {
groupBuyConfirmFn
(
prodIds
.
value
,
skuIds
.
value
);
//
groupBuyConfirmFn(prodIds.value, skuIds.value);
}
//
}
});
//
});
};
};
function
groupBuyUpdateFnQg
(
couponUserId
=
''
)
{
function
groupBuyUpdateFnQg
(
couponUserId
=
''
)
{
const
{
receiverName
,
receiverMobile
,
receiverAddress
}
=
addressParams
.
value
;
return
new
Promise
((
resolve
,
reject
)
=>
{
groupBuyUpdate
({
groupBuyUpdate
({
key
:
orderInfo
.
value
.
key
,
key
:
orderInfo
.
value
.
key
,
couponUserId
,
receiverTime
:
formatDate
(
activePrice
.
value
.
priceDay
)
,
receiverTime
:
formatDate
(
activePrice
.
value
.
priceDay
),
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
orderInfo
.
value
=
res
.
data
;
orderInfo
.
value
=
res
.
data
;
}
}
}
);
});
});
}
}
const
shopInfo
=
ref
({});
const
shopInfo
=
ref
({});
...
@@ -457,6 +466,7 @@ const itineraryData = ref([]);
...
@@ -457,6 +466,7 @@ const itineraryData = ref([]);
prodId:43835 */
prodId:43835 */
onLoad
(({
shopId
,
prodId
})
=>
{
onLoad
(({
shopId
,
prodId
})
=>
{
shopIds
.
value
=
shopId
;
shopIds
.
value
=
shopId
;
prodIds
.
value
=
prodId
;
// const shopId = 1821388624367861761n;
// const shopId = 1821388624367861761n;
// const prodId = 43835;
// const prodId = 43835;
getProd
({
getProd
({
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
3c67e3ad
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
backIcon=
"black"
backIcon=
"black"
iconSrc=
"/static/assistingAgriculture/assets/left.png"
iconSrc=
"/static/assistingAgriculture/assets/left.png"
placeholderText=
"请输入要搜索的关键词"
placeholderText=
"请输入要搜索的关键词"
@
search=
"toSearch"
v-model=
"keyword"
></Search>
></Search>
</view>
</view>
<view
class=
"bac-img"
>
<view
class=
"bac-img"
>
...
@@ -189,6 +191,7 @@ const startCity = ref(null);
...
@@ -189,6 +191,7 @@ const startCity = ref(null);
const
dateType
=
ref
(
null
);
const
dateType
=
ref
(
null
);
const
allocateDate
=
ref
(
null
);
const
allocateDate
=
ref
(
null
);
const
serviceCommitment
=
ref
(
null
);
const
serviceCommitment
=
ref
(
null
);
const
keyword
=
ref
(
''
);
const
labelId
=
ref
(
null
);
const
labelId
=
ref
(
null
);
const
locationFiltering
=
(
index
)
=>
{
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
switch
(
index
)
{
...
@@ -227,8 +230,8 @@ const locationFiltering = (index) => {
...
@@ -227,8 +230,8 @@ const locationFiltering = (index) => {
}
}
};
};
onPullDownRefresh
(()
=>
{
onPullDownRefresh
(()
=>
{
keyword
.
value
=
''
;
getProd
();
getProd
();
getPopular
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
uni
.
stopPullDownRefresh
();
uni
.
stopPullDownRefresh
();
},
1000
);
},
1000
);
...
@@ -278,8 +281,14 @@ const screenParams = (item, type) => {
...
@@ -278,8 +281,14 @@ const screenParams = (item, type) => {
getProd
();
getProd
();
}
}
};
};
// 搜索
const
toSearch
=
(
data
)
=>
{
keyword
.
value
=
data
.
detail
.
value
;
getProd
(
keyword
.
value
);
};
// 查询列表
// 查询列表
const
getProd
=
()
=>
{
const
getProd
=
(
searchKeyword
=
''
)
=>
{
const
params
=
{
const
params
=
{
current
:
1
,
current
:
1
,
size
:
10
,
size
:
10
,
...
@@ -290,6 +299,7 @@ const getProd = () => {
...
@@ -290,6 +299,7 @@ const getProd = () => {
...(
serviceCommitment
.
value
!==
null
&&
{
serviceCommitment
:
serviceCommitment
.
value
}),
...(
serviceCommitment
.
value
!==
null
&&
{
serviceCommitment
:
serviceCommitment
.
value
}),
...(
labelId
.
value
!==
null
&&
{
labelId
:
labelId
.
value
}),
...(
labelId
.
value
!==
null
&&
{
labelId
:
labelId
.
value
}),
...(
dateType
.
value
===
8
&&
{
allocateDate
:
allocateDate
.
value
}),
...(
dateType
.
value
===
8
&&
{
allocateDate
:
allocateDate
.
value
}),
...(
searchKeyword
&&
{
keyword
:
searchKeyword
}),
};
};
getProdList
(
params
).
then
((
res
)
=>
{
getProdList
(
params
).
then
((
res
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
...
...
src/pages/assistingAgriculture/RuralTravel/specialOfferZoneList.vue
View file @
3c67e3ad
<
template
>
<
template
>
<view
class=
"special-offer-zone-list-page"
>
<view
class=
"special-offer-zone-list-page"
>
<view
class=
"search"
>
<wd-icon
color=
"#fff"
name=
"thin-arrow-left"
class=
"icon"
@
tap=
"back"
></wd-icon>
</view>
<view
class=
"swiper"
>
<view
class=
"swiper"
>
<wd-swiper
<wd-swiper
customClass=
"swiper-custom"
customClass=
"swiper-custom"
...
@@ -65,16 +68,42 @@
...
@@ -65,16 +68,42 @@
></wd-icon>
></wd-icon>
</view>
</view>
</view>
</view>
<Sort
v-show=
"rotate"
/>
<view
class=
"bootom-top"
>
<DepartureDate
v-show=
"rotate2"
/>
<view
class=
"option"
@
tap=
"resetParams"
>
<ScenicSpots
v-show=
"rotate3"
/>
<text>
清空
</text>
<Screen
v-show=
"rotate4"
/>
<wd-icon
size=
"24rpx"
class=
"icons"
></wd-icon>
</view>
</view>
<Sort
v-show=
"rotate"
@
sortParams=
"sortParams"
/>
<DepartureDate
v-show=
"rotate2"
@
dataParams=
"dataParams"
/>
<ScenicSpots
v-show=
"rotate3"
@
placeParams=
"placeParams"
/>
<Screen
v-show=
"rotate4"
@
screenParams=
"screenParams"
/>
</view>
</view>
<view
class=
"list"
>
<view
class=
"list"
>
<view
class=
"item"
v-for=
"i in 10"
:key=
"i"
>
<view
@
click=
"jumpPage(item)"
class=
"item"
v-for=
"(item, index) in cardData"
:key=
"index"
>
<image
mode=
"aspectFill"
src=
"@/static/assistingAgriculture/reviewDetails/fj.png"
></image>
<image
mode=
"aspectFill"
:src=
"imgUrl + item.pic"
></image>
<view
class=
"info"
>
<text
class=
"title multi-line"
>
{{ item.prodName }}
</text>
<text
class=
"subtitle"
>
赠价值59元特产伴手礼一份
</text>
<view
class=
"tag-list"
>
<text
class=
"tag"
>
可定明日
</text>
<text
class=
"tag"
>
可定明日
</text>
<text
class=
"tag"
>
可定明日
</text>
</view>
<view
class=
"fs-box"
>
<text
class=
"fs-num"
>
{{ item.score }}分
</text>
<text
style=
"margin-left: 20rpx"
class=
"sales-volume"
>
月销{{ item.monthSoldNum }}
</text>
</view>
<text
class=
"address"
>
{{ item.tripArea }}出发
</text>
</view>
<text
class=
"price"
>
¥{{ item.price }}
</text>
</view>
<view
class=
"item"
v-for=
"(item, index) in cardData"
:key=
"index"
>
<image
mode=
"aspectFill"
:src=
"imgUrl + item.pic"
></image>
<view
class=
"info"
>
<view
class=
"info"
>
<text
class=
"title multi-line"
>
红枫湖+青岩古镇+云漫湖+云顶高坡景区一日游
</text>
<text
class=
"title multi-line"
>
{{ item.prodName }}
</text>
<text
class=
"subtitle"
>
赠价值59元特产伴手礼一份
</text>
<text
class=
"subtitle"
>
赠价值59元特产伴手礼一份
</text>
<view
class=
"tag-list"
>
<view
class=
"tag-list"
>
<text
class=
"tag"
>
可定明日
</text>
<text
class=
"tag"
>
可定明日
</text>
...
@@ -82,67 +111,181 @@
...
@@ -82,67 +111,181 @@
<text
class=
"tag"
>
可定明日
</text>
<text
class=
"tag"
>
可定明日
</text>
</view>
</view>
<view
class=
"fs-box"
>
<view
class=
"fs-box"
>
<text
class=
"fs-num"
>
4.9分
</text>
<text
class=
"fs-num"
>
{{ item.score }}分
</text>
<text
style=
"margin-left: 20rpx"
class=
"sales-volume"
>
月销2000+
</text>
<text
style=
"margin-left: 20rpx"
class=
"sales-volume"
>
月销{{ item.monthSoldNum }}
</text>
</view>
</view>
<text
class=
"address"
>
云岩
出发
</text>
<text
class=
"address"
>
{{ item.tripArea }}
出发
</text>
</view>
</view>
<text
class=
"price"
>
¥
299.00
</text>
<text
class=
"price"
>
¥
{{ item.price }}
</text>
</view>
</view>
</view>
</view>
<view
style=
"width: 100%; text-align: center; font-size: 24rpx; margin-top: 10rpx; color: #888989"
v-if=
"params.isEnd"
>
没有更多啦~
</view>
</view>
</view>
</view>
</view>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
queryOfferProdList
}
from
'@/api/assistingAgriculture/specialOfferZoneList'
;
import
Sort
from
'../../../components/assistingAgriculture/index/Sort.vue'
;
import
Sort
from
'../../../components/assistingAgriculture/index/Sort.vue'
;
import
DepartureDate
from
'../../../components/assistingAgriculture/index/D
epartureD
ate.vue'
;
import
DepartureDate
from
'../../../components/assistingAgriculture/index/Date.vue'
;
import
ScenicSpots
from
'../../../components/assistingAgriculture/index/ScenicSpots.vue'
;
import
ScenicSpots
from
'../../../components/assistingAgriculture/index/ScenicSpots.vue'
;
import
Screen
from
'../../../components/assistingAgriculture/index/Screen.vue'
;
import
Screen
from
'../../../components/assistingAgriculture/index/Screen.vue'
;
const
rotate
=
ref
(
false
);
const
rotate
=
ref
(
false
);
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
rotate2
=
ref
(
false
);
const
rotate2
=
ref
(
false
);
const
rotate3
=
ref
(
false
);
const
rotate3
=
ref
(
false
);
const
rotate4
=
ref
(
false
);
const
rotate4
=
ref
(
false
);
const
current
=
ref
(
0
);
const
current
=
ref
(
0
);
const
isLoadReachBottom
=
ref
(
null
);
const
params
=
ref
({
current
:
1
,
size
:
15
,
isEnd
:
false
,
sortType
:
''
,
dateType
:
''
,
// 日期
allocateDate
:
''
,
attractionId
:
''
,
startCity
:
''
,
serviceCommitment
:
''
,
labelId
:
''
,
});
const
shopSwiperList
=
ref
([
const
shopSwiperList
=
ref
([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg'
,
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg'
,
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg'
,
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg'
,
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg'
,
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg'
,
]);
]);
const
locationFiltering
=
(
index
)
=>
{
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
const
rotates
=
[
rotate
,
rotate2
,
rotate3
,
rotate4
];
case
0
:
rotates
.
forEach
((
rotate
,
i
)
=>
{
rotate
.
value
=
!
rotate
.
value
;
rotate
.
value
=
i
===
index
?
!
rotate
.
value
:
false
;
rotate2
.
value
=
false
;
});
rotate3
.
value
=
false
;
rotate4
.
value
=
false
;
break
;
case
1
:
rotate2
.
value
=
!
rotate2
.
value
;
rotate
.
value
=
false
;
rotate3
.
value
=
false
;
rotate4
.
value
=
false
;
break
;
case
2
:
rotate3
.
value
=
!
rotate3
.
value
;
rotate
.
value
=
false
;
rotate2
.
value
=
false
;
rotate4
.
value
=
false
;
break
;
case
3
:
rotate4
.
value
=
!
rotate4
.
value
;
rotate
.
value
=
false
;
rotate2
.
value
=
false
;
rotate3
.
value
=
false
;
break
;
}
};
};
onMounted
(()
=>
{
queryOfferProdListFn
();
});
function
handleClick
(
e
)
{
function
handleClick
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
}
}
function
jumpPage
(
item
)
{
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/RouteDetails/RouteDetails?prodId=
${
item
.
prodId
}
&shopId=
${
item
.
shopId
}
`
,
});
}
function
onChange
(
e
)
{
function
onChange
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
}
}
// 智能排序
const
sortParams
=
(
sortMode
)
=>
{
params
.
value
.
sortType
=
sortMode
.
sortMode
;
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
};
// 出发日期
const
dataParams
=
(
item
,
datePart
)
=>
{
if
(
item
)
{
params
.
value
.
dateType
=
item
.
key
;
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
}
else
{
params
.
value
.
dateType
=
8
;
if
(
datePart
&&
datePart
!==
'NaN/NaN/NaN'
)
{
params
.
value
.
allocateDate
=
datePart
;
rotate2
.
value
=
false
;
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
}
}
};
// 景点
const
placeParams
=
(
id
)
=>
{
params
.
value
.
attractionId
=
id
;
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
};
// 筛选
const
screenParams
=
(
item
,
type
)
=>
{
if
(
type
===
'screen'
)
{
params
.
value
.
startCity
=
item
.
tripCity
;
}
else
if
(
type
===
'serve'
)
{
params
.
value
.
serviceCommitment
=
item
.
labelName
;
}
else
if
(
type
===
'people'
)
{
params
.
value
.
labelId
=
item
.
labelName
;
}
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
};
const
resetParams
=
()
=>
{
params
.
value
.
sortType
=
null
;
params
.
value
.
attractionId
=
null
;
params
.
value
.
dateType
=
null
;
params
.
value
.
startCity
=
null
;
params
.
value
.
serviceCommitment
=
null
;
params
.
value
.
labelId
=
null
;
params
.
value
.
allocateDate
=
null
;
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
};
/**
* @description: 刷新
*/
function
refresh
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cardData
.
value
=
[];
params
.
value
.
current
=
1
;
params
.
value
.
isEnd
=
false
;
resolve
();
});
}
onPullDownRefresh
(()
=>
{
refresh
().
then
(()
=>
{
queryOfferProdListFn
();
});
});
function
back
()
{
xma
.
navigateBack
({
delta
:
1
,
});
}
const
cardData
=
ref
([]);
onReachBottom
(()
=>
{
if
(
isLoadReachBottom
.
value
===
true
)
return
;
isLoadReachBottom
.
value
=
true
;
queryOfferProdListFn
().
then
(()
=>
{
isLoadReachBottom
.
value
=
false
;
});
});
function
queryOfferProdListFn
()
{
if
(
params
.
value
.
isEnd
===
true
)
return
new
Promise
((
resolve
)
=>
{
resolve
();
});
xma
.
showLoading
({
title
:
'加载中...'
,
mask
:
false
,
});
return
queryOfferProdList
(
params
.
value
).
then
((
res
)
=>
{
if
(
res
.
data
.
records
.
length
<
params
.
value
.
size
)
{
params
.
value
.
isEnd
=
true
;
}
params
.
value
.
current
+=
1
;
cardData
.
value
=
cardData
.
value
.
concat
(
res
.
data
.
records
);
xma
.
stopPullDownRefresh
();
xma
.
hideLoading
();
});
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -154,6 +297,60 @@ page {
...
@@ -154,6 +297,60 @@ page {
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
width
:
750rpx
;
width
:
750rpx
;
.search
{
width
:
710rpx
;
height
:
80rpx
;
// background: rgba(255, 255, 255, 0.8);
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
opacity
:
0
.8
;
margin
:
0
auto
;
margin-top
:
44rpx
;
display
:
flex
;
align-items
:
center
;
padding-left
:
20rpx
;
box-sizing
:
border-box
;
position
:
absolute
;
top
:
0
;
z-index
:
99
;
.arrow
{
width
:
15rpx
;
height
:
24rpx
;
}
.icon
{
font-size
:
28rpx
;
}
.searchBox
{
width
:
129
*
2rpx
;
height
:
26
*
2rpx
;
background
:
rgba
(
243
,
243
,
243
,
0
.4
);
border-radius
:
28rpx
28rpx
28rpx
28rpx
;
display
:
flex
;
align-items
:
center
;
padding-left
:
20rpx
;
margin-left
:
20rpx
;
.magnifyingGlass
{
width
:
26rpx
;
height
:
26rpx
;
}
.text
{
margin-left
:
10rpx
;
font-size
:
24rpx
;
}
}
.icon-box
{
display
:
flex
;
align-content
:
center
;
margin-left
:
86rpx
;
.icon
{
font-size
:
40rpx
;
color
:
#fff
;
}
.icon-fenxiang
{
margin-left
:
20rpx
;
}
}
}
.custom-indicator
{
.custom-indicator
{
padding
:
0
12rpx
;
padding
:
0
12rpx
;
height
:
48rpx
;
height
:
48rpx
;
...
...
src/pages/assistingAgriculture/album/card.vue
View file @
3c67e3ad
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"img-wrap"
>
<div
class=
"img-wrap"
>
<wd-img
v-for=
"(item, index) in item.images"
:key=
"index"
:src=
"item"
enable-preview
/>
<wd-img
v-for=
"(item, index) in item.images"
:key=
"index"
:src=
"item"
enable-preview
/>
</div>
</div>
<div
class=
"text"
>
<div
class=
"text"
@
click=
"toReviewDetails(item.evaluationId)"
>
{{
item
.
evaluation
}}
{{
item
.
evaluation
}}
</div>
</div>
<div
class=
"user-info flex-between"
>
<div
class=
"user-info flex-between"
>
...
@@ -27,6 +27,12 @@ const props = defineProps({
...
@@ -27,6 +27,12 @@ const props = defineProps({
default
:
()
=>
[],
default
:
()
=>
[],
},
},
});
});
// 查看评论详情
const
toReviewDetails
=
(
id
)
=>
{
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/reviewDetails/reviewDetails?evaluationId=
${
id
}
`
,
});
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/pages/assistingAgriculture/index/building.vue
View file @
3c67e3ad
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
backIcon=
"black"
backIcon=
"black"
iconSrc=
"/static/assistingAgriculture/assets/blackLeft.png"
iconSrc=
"/static/assistingAgriculture/assets/blackLeft.png"
placeholderText=
"请输入要搜索的内容"
placeholderText=
"请输入要搜索的内容"
@
search=
"toSearch"
></Search>
></Search>
</view>
</view>
<!-- 轮播图-->
<!-- 轮播图-->
...
@@ -173,6 +174,11 @@ onMounted(async () => {
...
@@ -173,6 +174,11 @@ onMounted(async () => {
platformProdList
();
platformProdList
();
getshoppingCartListFn
();
getshoppingCartListFn
();
});
});
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage'
});
};
// 获取购物车列表
// 获取购物车列表
const
getshoppingCartListFn
=
()
=>
{
const
getshoppingCartListFn
=
()
=>
{
getshoppingCartList
({}).
then
((
res
)
=>
{
getshoppingCartList
({}).
then
((
res
)
=>
{
...
...
src/pages/assistingAgriculture/index/presale.vue
View file @
3c67e3ad
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
backIcon=
"black"
backIcon=
"black"
iconSrc=
"/static/assistingAgriculture/assets/left.png"
iconSrc=
"/static/assistingAgriculture/assets/left.png"
placeholderText=
"输入商品名称"
placeholderText=
"输入商品名称"
@
search=
"toSearch"
></Search>
></Search>
</view>
</view>
<view
class=
"nav"
>
<view
class=
"nav"
>
...
@@ -158,6 +159,10 @@ onMounted(async () => {
...
@@ -158,6 +159,10 @@ onMounted(async () => {
presaleSortList
();
presaleSortList
();
getshoppingCartListFn
();
getshoppingCartListFn
();
});
});
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage'
});
};
// 获取购物车列表
// 获取购物车列表
const
getshoppingCartListFn
=
()
=>
{
const
getshoppingCartListFn
=
()
=>
{
getshoppingCartList
({}).
then
((
res
)
=>
{
getshoppingCartList
({}).
then
((
res
)
=>
{
...
...
src/pages/assistingAgriculture/searchPage/searchPage.vue
View file @
3c67e3ad
...
@@ -71,6 +71,11 @@ const baseImgurl = import.meta.env.VITE_APP_IMG_URL;
...
@@ -71,6 +71,11 @@ const baseImgurl = import.meta.env.VITE_APP_IMG_URL;
function
changeValue
({
value
})
{
function
changeValue
({
value
})
{
console
.
log
(
value
);
console
.
log
(
value
);
}
}
const
back
=
()
=>
{
uni
.
navigateBack
({
delta
:
1
,
});
};
// 搜索
// 搜索
const
toSearch
=
(
data
)
=>
{
const
toSearch
=
(
data
)
=>
{
const
keyword
=
data
.
detail
.
value
;
const
keyword
=
data
.
detail
.
value
;
...
...
src/pages/index/index.vue
View file @
3c67e3ad
...
@@ -555,6 +555,7 @@ page {
...
@@ -555,6 +555,7 @@ page {
.imgs
{
.imgs
{
width
:
88rpx
;
width
:
88rpx
;
height
:
88rpx
;
height
:
88rpx
;
margin-bottom
:
5rpx
;
}
}
}
}
}
}
...
...
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