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
23189d75
Commit
23189d75
authored
Aug 12, 2024
by
周俊涛(东信)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
e044cf86
34399f4e
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
494 additions
and
246 deletions
+494
-246
App.vue
src/App.vue
+0
-1
DepartureDate.vue
src/Components/assistingAgriculture/index/DepartureDate.vue
+1
-9
fab.vue
src/Components/fab/fab.vue
+51
-0
shop.js
src/api/assistingAgriculture/shop.js
+8
-0
packageDetail.js
src/api/packageDetail.js
+9
-0
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+7
-3
cart.vue
src/pages/assistingAgriculture/cart/cart.vue
+9
-1
card.vue
src/pages/assistingAgriculture/commentList/card.vue
+25
-27
index.vue
src/pages/assistingAgriculture/commentList/index.vue
+121
-76
comment.vue
src/pages/assistingAgriculture/detail/comment.vue
+172
-35
detail.vue
src/pages/assistingAgriculture/order/detail.vue
+77
-41
index.vue
src/pages/index/index.vue
+8
-50
order.vue
src/pages/order/order.vue
+5
-2
vite.config.ts
vite.config.ts
+1
-1
No files found.
src/App.vue
View file @
23189d75
...
@@ -4,7 +4,6 @@ onLaunch(() => {});
...
@@ -4,7 +4,6 @@ onLaunch(() => {});
onShow
(()
=>
{
onShow
(()
=>
{
console
.
log
(
'App Show'
);
console
.
log
(
'App Show'
);
});
});
onHide
(()
=>
{
onHide
(()
=>
{
console
.
log
(
'App Hide'
);
console
.
log
(
'App Hide'
);
});
});
...
...
src/Components/assistingAgriculture/index/DepartureDate.vue
View file @
23189d75
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
:class=
"
{ active: selectedItem === index }"
:class=
"
{ active: selectedItem === index }"
@tap="selectItem(index, item)"
@tap="selectItem(index, item)"
>
>
{{
item
}}
{{
item
.
startDate
}}
</li>
</li>
<wd-calendar
use-default-slot
v-model=
"value"
@
confirm=
"handleConfirm4"
>
<wd-calendar
use-default-slot
v-model=
"value"
@
confirm=
"handleConfirm4"
>
<li>
选择日期
</li>
<li>
选择日期
</li>
...
@@ -39,21 +39,13 @@ onMounted(async () => {
...
@@ -39,21 +39,13 @@ onMounted(async () => {
getStartDateList
();
getStartDateList
();
});
});
const
selectItem
=
(
index
,
item
)
=>
{
const
selectItem
=
(
index
,
item
)
=>
{
console
.
log
(
'item'
,
item
);
selectedItem
.
value
=
index
;
selectedItem
.
value
=
index
;
emit
(
'dataParams'
,
item
);
emit
(
'dataParams'
,
item
);
};
};
// 查询出发日期
// 查询出发日期
const
getStartDateList
=
()
=>
{
const
getStartDateList
=
()
=>
{
getStartDate
(
params
).
then
((
res
)
=>
{
getStartDate
(
params
).
then
((
res
)
=>
{
console
.
log
(
'res.data'
,
res
.
data
);
const
transformedData
=
Object
.
keys
(
res
.
data
).
reduce
((
acc
,
key
)
=>
{
acc
[
key
]
=
{
[
key
]:
res
.
data
[
key
]
};
return
acc
;
},
{});
dataList
.
value
=
res
.
data
;
dataList
.
value
=
res
.
data
;
console
.
log
(
Object
.
keys
(
dataList
.
value
,
232
));
});
});
};
};
function
handleConfirm4
({
value
})
{
function
handleConfirm4
({
value
})
{
...
...
src/Components/fab/fab.vue
0 → 100644
View file @
23189d75
<
template
>
<!-- 悬浮按钮 -->
<wd-fab
type=
"error"
position=
"right-bottom"
direction=
"left"
:draggable=
"true"
inactiveIcon=
"a-controlplatform"
>
<view
class=
"custom-button"
@
click=
"go('/pages/ticket/ticket')"
>
<image
class=
"fab-icon"
src=
"../../static/index/coupon.png"
></image>
<text
class=
"fab-text"
>
优惠券
</text>
</view>
<view
class=
"custom-button"
@
click=
"go('/pages/order/order')"
>
<image
class=
"fab-icon"
src=
"../../static/index/order.png"
></image>
<text
class=
"fab-text"
>
订单
</text>
</view>
</wd-fab>
</
template
>
<
script
setup
>
// 前往个人中心
const
go
=
(
url
)
=>
{
xma
.
navigateTo
({
url
,
});
};
</
script
>
<
style
lang=
"scss"
scoped
>
.custom-button
{
min-width
:
auto
;
box-sizing
:
border-box
;
gap
:
10rpx
;
margin
:
8rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
.fab-icon
{
width
:
64rpx
;
height
:
64rpx
;
}
.fab-text
{
font-size
:
20rpx
;
color
:
#333
;
}
}
</
style
>
src/api/assistingAgriculture/shop.js
View file @
23189d75
...
@@ -64,3 +64,11 @@ export function sgyOrderOrderInfo(data) {
...
@@ -64,3 +64,11 @@ export function sgyOrderOrderInfo(data) {
data
,
data
,
});
});
}
}
// 筑农首页-3、订单详情
export
function
quantity
(
data
)
{
return
request
({
url
:
`/sgyrdd/sgyBasket/quantity`
,
method
:
'POST'
,
data
,
});
}
src/api/packageDetail.js
View file @
23189d75
...
@@ -73,3 +73,12 @@ export function getEvalStatis(data) {
...
@@ -73,3 +73,12 @@ export function getEvalStatis(data) {
data
,
data
,
});
});
}
}
// 评论列表数量统计和相同好评最多的评语
export
function
getEvalStatisByShopId
(
data
)
{
return
request
({
url
:
`/sgyrdd/evaluation/getShopEvalStatis`
,
method
:
'GET'
,
data
,
});
}
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
23189d75
...
@@ -213,6 +213,9 @@ const locationFiltering = (index) => {
...
@@ -213,6 +213,9 @@ const locationFiltering = (index) => {
sortType
.
value
=
null
;
sortType
.
value
=
null
;
attractionId
.
value
=
null
;
attractionId
.
value
=
null
;
dateType
.
value
=
null
;
dateType
.
value
=
null
;
startCity
.
value
=
null
;
serviceCommitment
.
value
=
null
;
labelId
.
value
=
null
;
}
}
};
};
// 查询热门路线
// 查询热门路线
...
@@ -231,7 +234,8 @@ const sortParams = (sortMode) => {
...
@@ -231,7 +234,8 @@ const sortParams = (sortMode) => {
};
};
// 出发日期
// 出发日期
const
dataParams
=
(
item
)
=>
{
const
dataParams
=
(
item
)
=>
{
dateType
.
value
=
item
;
console
.
log
(
item
,
item
.
key
,
22322323
);
dateType
.
value
=
item
.
key
;
getProd
();
getProd
();
};
};
// 景点
// 景点
...
@@ -258,7 +262,7 @@ const getProd = () => {
...
@@ -258,7 +262,7 @@ const getProd = () => {
size
:
10
,
size
:
10
,
...(
sortType
.
value
!==
null
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
...(
sortType
.
value
!==
null
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
...(
attractionId
.
value
!==
null
&&
{
attractionId
:
attractionId
.
value
.
id
}),
...(
attractionId
.
value
!==
null
&&
{
attractionId
:
attractionId
.
value
.
id
}),
...(
dateType
.
value
!==
null
&&
{
dateType
:
dateType
.
value
}),
...(
dateType
.
value
!==
null
&&
{
dateType
:
dateType
.
value
.
key
}),
...(
startCity
.
value
!==
null
&&
{
startCity
:
startCity
.
value
}),
...(
startCity
.
value
!==
null
&&
{
startCity
:
startCity
.
value
}),
...(
serviceCommitment
.
value
!==
null
&&
{
serviceCommitment
:
serviceCommitment
.
value
}),
...(
serviceCommitment
.
value
!==
null
&&
{
serviceCommitment
:
serviceCommitment
.
value
}),
...(
labelId
.
value
!==
null
&&
{
labelId
:
labelId
.
value
}),
...(
labelId
.
value
!==
null
&&
{
labelId
:
labelId
.
value
}),
...
@@ -274,7 +278,7 @@ function toRouteDetails(item) {
...
@@ -274,7 +278,7 @@ function toRouteDetails(item) {
console
.
log
(
item
,
22222
);
console
.
log
(
item
,
22222
);
// TODO: 跳转到线路详情
// TODO: 跳转到线路详情
xma
.
navigateTo
({
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/RouteDetails/RouteDetails?prodId=
${
item
.
prodId
}
`
,
url
:
`/pages/assistingAgriculture/RouteDetails/RouteDetails?
shopId=
${
item
.
shopId
}
,
prodId=
${
item
.
prodId
}
`
,
});
});
}
}
function
toSpecialOfferZoneList
()
{
function
toSpecialOfferZoneList
()
{
...
...
src/pages/assistingAgriculture/cart/cart.vue
View file @
23189d75
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<span>
¥
</span>
<span>
¥
</span>
{{
item
.
skuPrice
}}
{{
item
.
skuPrice
}}
</div>
</div>
<wd-input-number
v-model=
"item.count"
/>
<wd-input-number
v-model=
"item.count"
@
change=
"changeQuantity(item)"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
import
{
ref
,
computed
,
onMounted
}
from
'vue'
;
import
{
ref
,
computed
,
onMounted
}
from
'vue'
;
import
{
getshoppingCartList
}
from
'../../../api/packageDetail'
;
import
{
getshoppingCartList
}
from
'../../../api/packageDetail'
;
import
{
categoryPresaleList
}
from
'../../../api/assistingAgriculture/building'
;
import
{
categoryPresaleList
}
from
'../../../api/assistingAgriculture/building'
;
import
{
quantity
}
from
'../../../api/assistingAgriculture/shop'
;
// 计算是否全选
// 计算是否全选
const
checkedAll
=
computed
(()
=>
{
const
checkedAll
=
computed
(()
=>
{
return
cartList
.
value
.
every
((
item
)
=>
item
.
isChecked
);
return
cartList
.
value
.
every
((
item
)
=>
item
.
isChecked
);
...
@@ -114,6 +115,13 @@ const presaleSortList = (index) => {
...
@@ -114,6 +115,13 @@ const presaleSortList = (index) => {
});
});
});
});
};
};
// 购物车数量修改
const
changeQuantity
=
async
(
item
)
=>
{
const
res
=
await
quantity
({
basketId
:
item
.
basket
.
basketId
,
basketCount
:
item
.
count
,
});
};
const
selectedItems
=
computed
(()
=>
{
const
selectedItems
=
computed
(()
=>
{
return
cartList
.
value
.
reduce
((
acc
,
shop
)
=>
{
return
cartList
.
value
.
reduce
((
acc
,
shop
)
=>
{
const
selectedProducts
=
shop
.
prodInfos
.
filter
((
item
)
=>
item
.
isChecked
);
const
selectedProducts
=
shop
.
prodInfos
.
filter
((
item
)
=>
item
.
isChecked
);
...
...
src/pages/assistingAgriculture/commentList/card.vue
View file @
23189d75
<
template
>
<
template
>
<div
class=
"card"
>
<div
class=
"card"
v-for=
"(item, index) in commentData"
:key=
"index"
>
<div
class=
"card-top"
>
<div
class=
"card-top"
>
<div
class=
"avatar flex-align-center"
>
<div
class=
"avatar flex-align-center"
>
<img
src=
"/static/assistingAgriculture/comment/1.png
"
alt=
""
/>
<img
:src=
"item.avatar
"
alt=
""
/>
<div
class=
"name"
>
<div
class=
"name"
>
<p>
不爱吃鱼的小猫咪
</p>
<p>
{{
item
.
nickName
}}
</p>
<div
class=
"flex-align-center"
>
<div
class=
"grade flex-align-center"
>
5.0分
</div>
<img
src=
"/src/static/assistingAgriculture/comment/emoji.png"
alt=
""
/>
5.0分 好评
</div>
</div>
</div>
</div>
</div>
<div
class=
"info"
>
2024-08-03发表于贵州 | 朋友出游 | 2024-07-22出发
</div>
<div
class=
"info"
>
{{
item
.
createTime
[
0
]
}}
发表
</div>
</div>
</div>
<div
class=
"card-content"
>
<div
class=
"card-content"
>
<div
class=
"text-wrap"
:style=
"showMore ? 'max-height:none;' : ''"
>
<div
class=
"text-wrap"
>
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游
{{
item
.
evaluation
}}
<div
class=
"more"
v-if=
"!showMore"
@
click=
"showMore = true"
>
全文
</div>
</div>
</div>
<div
class=
"img-wrap"
>
<div
class=
"img-wrap"
>
<wd-img
<wd-img
v-for=
"(item, index) in item.images"
:key=
"index"
:src=
"item"
enable-preview
/>
v-for=
"v in Math.floor(Math.random() * 6 + 1)"
:key=
"v"
:src=
"`/src/static/assistingAgriculture/comment/$
{v}.png`"
enable-preview
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -33,6 +24,12 @@
...
@@ -33,6 +24,12 @@
<
script
setup
>
<
script
setup
>
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
const
showMore
=
ref
(
false
);
const
showMore
=
ref
(
false
);
const
props
=
defineProps
({
commentData
:
{
type
:
Array
,
default
:
()
=>
[],
},
});
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -40,6 +37,7 @@ const showMore = ref(false);
...
@@ -40,6 +37,7 @@ const showMore = ref(false);
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
16rpx
;
border-radius
:
16rpx
;
padding
:
20rpx
;
padding
:
20rpx
;
margin-bottom
:
10rpx
;
.card-top
{
.card-top
{
padding-bottom
:
20rpx
;
padding-bottom
:
20rpx
;
border-bottom
:
2rpx
solid
#f3f3f3
;
border-bottom
:
2rpx
solid
#f3f3f3
;
...
@@ -55,23 +53,23 @@ const showMore = ref(false);
...
@@ -55,23 +53,23 @@ const showMore = ref(false);
font-size
:
28rpx
;
font-size
:
28rpx
;
color
:
#3d3d3d
;
color
:
#3d3d3d
;
}
}
div
{
.grade
{
margin-top
:
18rpx
;
margin-top
:
18rpx
;
font-size
:
16rpx
;
font-size
:
16rpx
;
background
:
rgba
(
253
,
223
,
109
,
0
.1686
);
background
:
rgba
(
253
,
223
,
109
,
0
.1686
);
line-height
:
24rpx
;
line-height
:
24rpx
;
color
:
#e1961d
;
color
:
#e1961d
;
width
:
116rpx
;
//
width: 116rpx;
border-radius
:
200rpx
;
border-radius
:
200rpx
;
padding-left
:
32rpx
;
//
padding-left: 32rpx;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
position
:
relative
;
position
:
relative
;
img
{
//
img {
height
:
24rpx
;
//
height: 24rpx;
position
:
absolute
;
//
position: absolute;
left
:
0
;
//
left: 0;
width
:
24rpx
;
//
width: 24rpx;
}
//
}
}
}
}
}
}
}
...
@@ -88,7 +86,7 @@ const showMore = ref(false);
...
@@ -88,7 +86,7 @@ const showMore = ref(false);
line-height
:
normal
;
line-height
:
normal
;
color
:
#3d3d3d
;
color
:
#3d3d3d
;
overflow
:
hidden
;
overflow
:
hidden
;
max-height
:
150rpx
;
//
max-height: 150rpx;
position
:
relative
;
position
:
relative
;
.more
{
.more
{
position
:
absolute
;
position
:
absolute
;
...
...
src/pages/assistingAgriculture/commentList/index.vue
View file @
23189d75
...
@@ -2,37 +2,52 @@
...
@@ -2,37 +2,52 @@
<div
class=
"comment-list"
>
<div
class=
"comment-list"
>
<div
class=
"top-bar flex-align-center"
>
<div
class=
"top-bar flex-align-center"
>
<wd-icon
name=
"thin-arrow-left"
></wd-icon>
<wd-icon
name=
"thin-arrow-left"
></wd-icon>
<wd-search
hide-cancel
placeholder=
"点评关键词/特色"
placeholder-left
/>
<wd-search
@
search=
"search"
hide-cancel
placeholder=
"点评关键词/特色"
placeholder-left
/>
</div>
</div>
<scroll-view
class=
"content"
:scroll-y=
"true"
>
<scroll-view
@
scrolltolower=
"scrolltolower"
class=
"content"
:scroll-y=
"true"
>
<div
class=
"filter-box"
>
<div
class=
"filter-box"
>
<div
class=
"score-sort flex-between"
>
<div
class=
"score-sort flex-between"
>
<div
class=
"score"
>
<div
class=
"score"
>
<span
class=
"num"
>
6.9
</span>
<span
class=
"num"
>
{{
topData
.
score
}}
</span>
<
span
class=
"t1"
>
超棒
</span
>
<
!--
<span
class=
"t1"
>
超棒
</span>
--
>
<span
class=
"t2"
>
527
条
</span>
<span
class=
"t2"
>
{{
topData
.
count
}}
条
</span>
<
wd-icon
name=
"check-outline"
class=
"t1"
></wd-icon
>
<
!--
<wd-icon
name=
"check-outline"
class=
"t1"
></wd-icon>
--
>
</div>
</div>
<div
class=
"sort"
>
<
!--
<
div
class=
"sort"
>
<span
class=
"active"
>
推荐排序
</span>
<span
class=
"active"
>
推荐排序
</span>
|
|
<span>
重新点评
</span>
<span>
重新点评
</span>
</div>
</div>
-->
</div>
</div>
<div
class=
"type flex-between"
>
<div
class=
"type flex-between"
>
<p
class=
"active"
>
全部
</p>
<p
@
tap=
"choice(-1)"
:class=
"
{ active: select === -1 }">全部
</p>
<p
v-for=
"(v, i) in commentTypeList"
:key=
"i"
>
{{
v
.
text
}}
(
{{
v
.
value
}}
)
</p>
<p
@
tap=
"choice(i, v.type)"
:class=
"
{ active: select === i }"
v-for="(v, i) in commentTypeList"
:key="i"
>
{{
v
.
text
}}
(
{{
v
.
value
}}
)
</p>
</div>
</div>
<div
class=
"tags"
:style=
"
{ 'max-height': showMoreTag ? '600px' : '90rpx' }">
<div
class=
"tags"
>
<div
class=
"item"
v-for=
"(v, i) in tagList"
:key=
"i"
>
{{
v
.
text
}}
(
{{
v
.
value
}}
)
</div>
<div
class=
"item"
v-for=
"(v, i) in tagList"
:key=
"i"
>
<div
class=
"more"
@
click=
"showMoreTag = !showMoreTag"
>
{{
v
.
evaluation
}}
(
{{
v
.
count
}}
)
</div>
<!--
<div
class=
"more"
@
click=
"showMoreTag = !showMoreTag"
>
更多
更多
<wd-icon
name=
"arrow-down"
:class=
"
{ rotate: showMoreTag }">
</wd-icon>
<wd-icon
name=
"arrow-down"
:class=
"
{ rotate: showMoreTag }">
</wd-icon>
</div>
</div>
-->
</div>
</div>
</div>
</div>
<div
class=
"card-list"
>
<div
class=
"card-list"
>
<card
v-for=
"v in 10"
:key=
"v"
/>
<card
:commentData=
"commentData"
/>
<view
style=
"width: 100%; text-align: center; font-size: 24rpx; margin: 10rpx 0; color: #888989"
v-if=
"show"
>
没有更多啦~
</view>
</div>
</div>
</scroll-view>
</scroll-view>
<div
class=
"back"
>
<div
class=
"back"
>
...
@@ -44,91 +59,120 @@
...
@@ -44,91 +59,120 @@
<
script
setup
>
<
script
setup
>
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
card
from
'./card.vue'
;
import
card
from
'./card.vue'
;
import
{
getCommentList
}
from
'../../../api/packageDetail'
;
import
{
getCommentList
,
getEvalStatis
}
from
'../../../api/packageDetail'
;
const
commentTypeList
=
[
const
commentTypeList
=
reactive
(
[
{
{
text
:
'图/视频'
,
text
:
'图/视频'
,
value
:
183
,
value
:
0
,
type
:
'img'
,
},
},
{
{
text
:
'追评'
,
text
:
'追评'
,
value
:
5
,
value
:
0
,
type
:
'append'
,
},
},
{
{
text
:
'中差评'
,
text
:
'中差评'
,
value
:
5
,
value
:
0
,
type
:
'diff'
,
},
},
{
{
text
:
'好评'
,
text
:
'好评'
,
value
:
514
,
value
:
0
,
},
type
:
'good'
,
];
const
tagList
=
[
{
text
:
'餐食棒'
,
value
:
44
,
},
{
text
:
'导游负责耐心'
,
value
:
44
,
},
{
text
:
'车辆条件好'
,
value
:
514
,
},
{
text
:
'餐食棒'
,
value
:
44
,
},
{
text
:
'餐食棒'
,
value
:
44
,
},
{
text
:
'导游负责耐心'
,
value
:
44
,
},
{
text
:
'行程安排合理'
,
value
:
5
,
},
{
text
:
'车辆条件好'
,
value
:
514
,
},
{
text
:
'行程安排合理'
,
value
:
5
,
},
},
]);
{
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
text
:
'导游负责耐心'
,
const
tagList
=
ref
([]);
value
:
44
,
const
commentData
=
ref
([]);
},
{
text
:
'行程安排合理'
,
value
:
5
,
},
{
text
:
'车辆条件好'
,
value
:
514
,
},
];
const
commentParameters
=
{
const
commentParameters
=
{
shopId
:
'1818876196597334017'
,
shopId
:
'1818876196597334017'
,
prodId
:
'43828'
,
current
:
1
,
current
:
1
,
size
:
10
,
size
:
10
,
};
};
const
show
=
ref
(
false
);
let
total
;
const
select
=
ref
(
-
1
);
const
topData
=
ref
({});
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
getEvalStatisFn
();
getCommentListFn
();
getCommentListFn
();
});
});
const
search
=
(
e
)
=>
{
reset
();
commentParameters
.
evaluation
=
e
.
value
;
getCommentListFn
();
};
// 数据重置
const
reset
=
()
=>
{
commentParameters
.
current
=
1
;
commentData
.
value
=
[];
show
.
value
=
false
;
};
const
scrolltolower
=
()
=>
{
console
.
log
(
'触底加载触底加载触底加载'
);
if
(
commentData
.
value
.
length
<
total
)
{
commentParameters
.
current
++
;
getCommentListFn
();
return
;
}
show
.
value
=
true
;
};
// 触底加载
onReachBottom
(()
=>
{
if
(
cardData2
.
value
.
length
+
5
<
total
)
{
listParams
.
current
++
;
getMerchantListPaging
();
}
});
const
showMoreTag
=
ref
(
false
);
const
showMoreTag
=
ref
(
false
);
// 评论列表数量统计和相同好评最多的评语
const
getEvalStatisFn
=
()
=>
{
getEvalStatis
({
prodId
:
commentParameters
.
prodId
}).
then
((
res
)
=>
{
console
.
log
(
'评论数量统计和相同好评最多的评语'
,
res
);
res
.
data
.
score
=
res
.
data
.
score
.
toFixed
(
1
);
topData
.
value
=
res
.
data
;
tagList
.
value
=
res
.
data
.
evals
;
commentTypeList
[
0
].
value
=
res
.
data
.
imgCount
;
commentTypeList
[
1
].
value
=
res
.
data
.
append
;
commentTypeList
[
2
].
value
=
res
.
data
.
diffCount
;
commentTypeList
[
3
].
value
=
res
.
data
.
goodCount
;
});
};
// 评论列表
const
getCommentListFn
=
()
=>
{
const
getCommentListFn
=
()
=>
{
xma
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
,
});
getCommentList
(
commentParameters
).
then
((
res
)
=>
{
getCommentList
(
commentParameters
).
then
((
res
)
=>
{
console
.
log
(
'打印评论'
,
res
);
xma
.
hideLoading
();
total
=
res
.
data
.
total
;
res
.
data
.
records
.
forEach
((
v
)
=>
{
v
.
avatar
=
imgUrl
+
v
.
avatar
;
v
.
prodPic
=
imgUrl
+
v
.
prodPic
;
v
.
createTime
=
v
.
createTime
.
split
(
' '
);
if
(
v
.
images
)
{
v
.
images
=
v
.
images
.
split
(
','
).
map
((
item
)
=>
{
item
=
imgUrl
+
item
;
return
item
;
});
}
// console.log('v.images', v.images);
});
console
.
log
(
'res.data.records'
,
res
.
data
.
records
);
commentData
.
value
=
[...
commentData
.
value
,
...
res
.
data
.
records
];
});
});
};
};
// tabs选择
const
choice
=
(
i
,
type
)
=>
{
select
.
value
=
i
;
reset
();
commentParameters
.
type
=
type
;
getCommentListFn
();
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -188,6 +232,7 @@ uni-page-body {
...
@@ -188,6 +232,7 @@ uni-page-body {
.type
{
.type
{
font-size
:
22rpx
;
font-size
:
22rpx
;
color
:
#767676
;
color
:
#767676
;
box-sizing
:
border-box
;
.active
{
.active
{
color
:
#3d3d3d
;
color
:
#3d3d3d
;
font-size
:
24rpx
;
font-size
:
24rpx
;
...
@@ -212,7 +257,7 @@ uni-page-body {
...
@@ -212,7 +257,7 @@ uni-page-body {
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
gap
:
10rpx
;
gap
:
10rpx
;
position
:
relative
;
position
:
relative
;
max-height
:
80rpx
;
//
max-height: 80rpx;
overflow
:
hidden
;
overflow
:
hidden
;
transition
:
all
0
.3s
;
transition
:
all
0
.3s
;
.item
{
.item
{
...
...
src/pages/assistingAgriculture/detail/comment.vue
View file @
23189d75
...
@@ -10,14 +10,26 @@
...
@@ -10,14 +10,26 @@
@
click=
"handleBack"
@
click=
"handleBack"
></wd-icon>
></wd-icon>
<view
class=
"searchBox"
>
<view
class=
"searchBox"
>
<wd-icon
name=
"search"
size=
"24rpx"
color=
"#ABAAAA"
></wd-icon>
<view
class=
"search"
>
<input
<wd-icon
name=
"search"
size=
"24rpx"
color=
"#ABAAAA"
></wd-icon>
type=
"text"
<input
:value=
"searchValue"
type=
"text"
class=
"text"
:value=
"catalog.evaluation"
placeholder=
"点评关键词/特色"
class=
"text"
placeholder-style=
"font-size:22rpx;"
placeholder=
"点评关键词/特色"
/>
placeholder-style=
"font-size:22rpx;"
@
confirm=
"handleSearch"
@
input=
"handleInput"
confirm-type=
"搜索"
/>
</view>
<wd-icon
name=
"error-fill"
size=
"30rpx"
color=
"#999"
v-if=
"catalog.evaluation"
@
tap=
"handleClear"
></wd-icon>
</view>
</view>
</view>
</view>
...
@@ -31,10 +43,11 @@
...
@@ -31,10 +43,11 @@
@click="handleChangeTab(item.value)"
@click="handleChangeTab(item.value)"
>
>
{{
item
.
label
}}
{{
item
.
label
}}
<view
v-if=
"item.value !== 'all'"
>
(
{{
totalList
[
item
.
text
]
}}
)
</view>
</view>
</view>
</view>
</view>
<view
class=
"comment-list"
>
<view
class=
"comment-list"
v-if=
"commentData.length > 0"
>
<view
class=
"comment-item"
v-for=
"(item, index) in commentData"
:key=
"index"
>
<view
class=
"comment-item"
v-for=
"(item, index) in commentData"
:key=
"index"
>
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"row"
>
<view
class=
"row"
>
...
@@ -48,52 +61,69 @@
...
@@ -48,52 +61,69 @@
</view>
</view>
</view>
</view>
</view>
</view>
<text
class=
"detail"
>
{{
item
.
createTime
.
slice
(
0
,
10
)
}}
{{
item
.
prodName
}}
x2
</text>
<text
class=
"detail"
>
{{
item
.
createTime
.
slice
(
0
,
10
)
}}
{{
item
.
prodName
}}
</text>
</view>
</view>
<view
class=
"info"
>
<view
class=
"info"
>
<!--
<div
class=
"text-wrap"
:style=
"item.showMore ? 'max-height:none;' : ''"
>
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游
<text
class=
"more"
v-if=
"!item.showMore"
@
click=
"item.showMore = true"
>
全文
</text>
</div>
-->
<text
class=
"text"
>
{{
item
.
evaluation
}}
</text>
<text
class=
"text"
>
{{
item
.
evaluation
}}
</text>
<view
class=
"imgbox"
v-if=
"item.images.length > 0"
>
<view
class=
"imgbox"
v-if=
"item.images.length > 0"
>
<image
<image
class=
"img"
class=
"img"
mode=
"aspectFill"
mode=
"aspectFill"
:src=
"fileDomain + img"
:src=
"fileDomain + img"
v-for=
"img in item.images"
v-for=
"(img, index) in item.images"
:key=
"img"
:key=
"index"
@
tap=
"previewPic(item.images, index)"
></image>
></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view
style=
"
width: 100%;
text-align: center;
font-size: 24rpx;
margin-top: 10rpx;
color: #888989;
"
v-if=
"isEnd"
>
没有更多啦~
</view>
</view>
</view>
<wd-status-tip
image=
"comment"
tip=
"暂无评论"
v-else
/>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
getCommentList
}
from
'@/api/packageDetail'
;
import
{
getCommentList
,
getEvalStatisByShopId
}
from
'@/api/packageDetail'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
searchValue
=
ref
(
''
);
const
tab
=
ref
(
0
);
const
tab
=
ref
(
'all'
);
const
tabs
=
ref
([
const
tabs
=
ref
([
{
{
value
:
0
,
value
:
'all'
,
label
:
'全部'
,
label
:
'全部'
,
text
:
'count'
,
},
},
{
{
value
:
1
,
value
:
'img'
,
label
:
'图/视频(183)'
,
label
:
'图/视频'
,
},
text
:
'imgCount'
,
{
value
:
2
,
label
:
'追评(5)'
,
},
},
{
{
value
:
3
,
value
:
'diff'
,
label
:
'中差评(13)'
,
label
:
'中差评'
,
text
:
'diffCount'
,
},
},
{
{
value
:
4
,
value
:
'good'
,
label
:
'好评(514)'
,
label
:
'好评'
,
text
:
'goodCount'
,
},
},
]);
]);
...
@@ -120,6 +150,13 @@ const rateList = ref({
...
@@ -120,6 +150,13 @@ const rateList = ref({
},
},
});
});
onLoad
(
async
(
options
)
=>
{
catalog
.
shopId
=
options
.
shopId
;
console
.
log
(
options
);
await
getList
();
await
getTotal
();
});
/**
/**
* 获取用户优惠券列表
* 获取用户优惠券列表
*/
*/
...
@@ -129,11 +166,15 @@ const commentData = ref([]);
...
@@ -129,11 +166,15 @@ const commentData = ref([]);
const
catalog
=
reactive
({
const
catalog
=
reactive
({
current
:
0
,
current
:
0
,
size
:
10
,
size
:
10
,
shopId
:
'
1818876196597334017
'
,
shopId
:
''
,
evaluation
:
''
,
// 关键字搜索
evaluation
:
''
,
// 关键字搜索
type
:
''
,
// img-图片,append-追评,diff-中差评,good-好评
type
:
''
,
// img-图片,append-追评,diff-中差评,good-好评
});
});
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
catalog
.
type
=
tab
.
value
;
if
(
tab
.
value
===
'all'
)
{
catalog
.
type
=
''
;
}
catalog
.
current
++
;
catalog
.
current
++
;
xma
.
showLoading
({
xma
.
showLoading
({
title
:
'加载中...'
,
title
:
'加载中...'
,
...
@@ -145,6 +186,7 @@ const getList = async () => {
...
@@ -145,6 +186,7 @@ const getList = async () => {
}
}
if
(
res
.
data
.
records
.
length
>
0
)
{
if
(
res
.
data
.
records
.
length
>
0
)
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
item
.
showMore
=
false
;
if
(
item
.
images
===
''
)
{
if
(
item
.
images
===
''
)
{
item
.
images
=
[];
item
.
images
=
[];
}
else
{
}
else
{
...
@@ -153,19 +195,87 @@ const getList = async () => {
...
@@ -153,19 +195,87 @@ const getList = async () => {
});
});
commentData
.
value
.
push
(...
res
.
data
.
records
);
commentData
.
value
.
push
(...
res
.
data
.
records
);
total
.
value
=
res
.
data
.
total
;
total
.
value
=
res
.
data
.
total
;
console
.
log
(
commentData
.
value
);
}
}
xma
.
hideLoading
();
xma
.
hideLoading
();
};
};
getList
();
const
handleChangeTab
=
(
e
)
=>
{
const
handleChangeTab
=
(
e
)
=>
{
if
(
e
===
tab
.
value
)
return
;
if
(
e
===
tab
.
value
)
return
;
tab
.
value
=
e
;
tab
.
value
=
e
;
refresh
().
then
(()
=>
{
getList
();
});
};
};
const
handleBack
=
()
=>
{
const
handleBack
=
()
=>
{
uni
.
navigateBack
();
uni
.
navigateBack
();
};
};
// 下拉刷新
onPullDownRefresh
(()
=>
{
refresh
().
then
(()
=>
{
getList
();
xma
.
stopPullDownRefresh
();
});
});
// 触底函数
onReachBottom
(()
=>
{
if
(
commentData
.
value
.
length
>=
total
.
value
)
{
isEnd
.
value
=
true
;
}
else
{
getList
();
}
});
const
refresh
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
commentData
.
value
=
[];
total
.
value
=
0
;
catalog
.
current
=
0
;
resolve
();
});
};
const
preList
=
ref
([]);
const
previewPic
=
(
item
,
index
)
=>
{
preList
.
value
=
[];
item
.
forEach
((
img
)
=>
{
preList
.
value
.
push
(
fileDomain
+
img
);
});
console
.
log
(
preList
.
value
);
uni
.
previewImage
({
current
:
index
,
// 当前显示图片索引
urls
:
preList
.
value
,
// 需要预览的图片http链接列表
});
};
/**
* 搜索评论
*/
const
handleSearch
=
(
e
)
=>
{
catalog
.
evaluation
=
e
.
detail
.
value
;
refresh
().
then
(()
=>
{
getList
();
});
};
const
handleInput
=
(
e
)
=>
{
catalog
.
evaluation
=
e
.
detail
.
value
;
};
const
handleClear
=
()
=>
{
catalog
.
evaluation
=
''
;
refresh
().
then
(()
=>
{
getList
();
});
};
const
totalList
=
ref
();
const
getTotal
=
async
()
=>
{
const
res
=
await
getEvalStatisByShopId
({
shopId
:
catalog
.
shopId
});
totalList
.
value
=
res
.
data
;
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -180,7 +290,7 @@ page {
...
@@ -180,7 +290,7 @@ page {
.header
{
.header
{
height
:
88rpx
;
height
:
88rpx
;
position
:
absolute
;
position
:
fixed
;
width
:
100%
;
width
:
100%
;
z-index
:
999
;
z-index
:
999
;
display
:
flex
;
display
:
flex
;
...
@@ -197,18 +307,25 @@ page {
...
@@ -197,18 +307,25 @@ page {
border-radius
:
28rpx
28rpx
28rpx
28rpx
;
border-radius
:
28rpx
28rpx
28rpx
28rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
padding-left
:
20rpx
;
justify-content
:
space-between
;
padding
:
0rpx
20rpx
;
gap
:
10rpx
;
gap
:
10rpx
;
.text
{
.search
{
margin-left
:
10rpx
;
gap
:
10rpx
;
font-size
:
22rpx
;
display
:
flex
;
align-items
:
center
;
.text
{
margin-left
:
10rpx
;
font-size
:
22rpx
;
}
}
}
}
}
}
}
.content
{
.content
{
padding
:
98rpx
20rpx
0
;
padding
:
98rpx
20rpx
30rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
gap
:
10rpx
;
gap
:
10rpx
;
...
@@ -221,6 +338,8 @@ page {
...
@@ -221,6 +338,8 @@ page {
padding
:
30rpx
30rpx
;
padding
:
30rpx
30rpx
;
.tab
{
.tab
{
display
:
flex
;
align-items
:
center
;
font-family
:
Source
Han
Sans
;
font-family
:
Source
Han
Sans
;
font-weight
:
500
;
font-weight
:
500
;
font-size
:
22rpx
;
font-size
:
22rpx
;
...
@@ -297,6 +416,7 @@ page {
...
@@ -297,6 +416,7 @@ page {
gap
:
10rpx
;
gap
:
10rpx
;
padding
:
2rpx
10rpx
2rpx
26rpx
;
padding
:
2rpx
10rpx
2rpx
26rpx
;
border-radius
:
16rpx
;
border-radius
:
16rpx
;
width
:
90rpx
;
text
{
text
{
font-family
:
Source
Han
Sans
;
font-family
:
Source
Han
Sans
;
...
@@ -328,6 +448,23 @@ page {
...
@@ -328,6 +448,23 @@ page {
flex-direction
:
column
;
flex-direction
:
column
;
gap
:
20rpx
;
gap
:
20rpx
;
.text-wrap
{
line-height
:
normal
;
color
:
#3d3d3d
;
overflow
:
hidden
;
max-height
:
86rpx
;
position
:
relative
;
.more
{
position
:
absolute
;
bottom
:
4rpx
;
right
:
0
;
line-height
:
1
.2em
;
background-color
:
#fff
;
color
:
#0974f5
;
}
}
.text
{
.text
{
font-family
:
Source
Han
Sans
;
font-family
:
Source
Han
Sans
;
font-weight
:
500
;
font-weight
:
500
;
...
...
src/pages/assistingAgriculture/order/detail.vue
View file @
23189d75
...
@@ -76,64 +76,55 @@
...
@@ -76,64 +76,55 @@
</view>
</view>
</view>
</view>
<view
class=
"product"
>
<view
class=
"product"
>
<view
class=
"header"
>
<view
class=
"header"
@
tap=
"toShopDetail()"
>
<view
class=
"icon"
>
物流
</view>
<view
class=
"icon"
>
物流
</view>
<text
class=
"title"
>
焗中焗盐焗鸡麻辣鸡
</text>
<text
class=
"title"
v-if=
"shopDetail"
>
{{
shopDetail
.
shopName
}}
</text>
</view>
</view>
<view
class=
"product-list"
>
<view
class=
"product-list"
v-if=
"orderDetail"
>
<view
class=
"product-item"
>
<view
<view
class=
"left"
>
class=
"product-item"
<image
src=
"/static/ticket/logo.png"
class=
"img"
mode=
"aspectFill"
></image>
v-for=
"(item, index) in orderDetail.orderItems"
<view
class=
"infobox"
>
:key=
"index"
<view
class=
"name"
>
盐焗鸡
</view>
@
tap=
"toProdDetail(item.prodId)"
<view
class=
"num"
>
1斤
</view>
>
</view>
<block
v-if=
"index == 0 || showMore"
>
</view>
<view
class=
"left"
>
<view
class=
"right"
>
<image
:src=
"fileDomain + item.pic"
class=
"img"
mode=
"aspectFill"
></image>
<view
class=
"textbox"
>
<view
class=
"infobox"
>
<text>
实付¥
</text>
<view
class=
"name"
>
{{
item
.
prodName
}}
</view>
<text
class=
"price"
>
48.00
</text>
<view
class=
"num"
>
{{
item
.
skuName
}}
</view>
</view>
</view>
<text
class=
"num"
>
x1
</text>
</view>
</view>
<view
class=
"product-item"
v-if=
"showMore"
>
<view
class=
"left"
>
<image
src=
"/static/ticket/logo.png"
class=
"img"
mode=
"aspectFill"
></image>
<view
class=
"infobox"
>
<view
class=
"name"
>
盐焗鸡
</view>
<view
class=
"num"
>
1斤
</view>
</view>
</view>
</view>
<view
class=
"right"
>
<view
class=
"right"
>
<view
class=
"textbox"
>
<view
class=
"textbox"
>
<text>
实付¥
</text>
<text>
实付¥
</text>
<text
class=
"price"
>
{{
item
.
actualTotal
}}
</text>
<text
class=
"price"
>
48.00
</text>
</view>
<text
class=
"num"
>
x
{{
item
.
prodCount
}}
</text>
</view>
</view>
<text
class=
"num"
>
x1
</text>
</block>
</view>
</view>
</view>
</view>
</view>
<view
class=
"totalbox totalbox-line"
v-if=
"showMore"
>
<view
class=
"totalbox totalbox-line"
v-if=
"showMore"
>
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
商品总价:
</text>
<text>
商品总价:
</text>
<text>
¥
98.70
</text>
<text>
¥
{{
orderDetail
.
orderLogistics
.
total
}}
</text>
</view>
</view>
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
运费:
</text>
<text>
运费:
</text>
<text>
¥
10.00
</text>
<text>
¥
{{
orderDetail
.
orderLogistics
.
freightFee
}}
</text>
</view>
</view>
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
店铺优惠:
</text>
<text>
店铺优惠:
</text>
<text>
¥
0.00
</text>
<text>
¥
{{
orderDetail
.
orderLogistics
.
reduceAmount
}}
</text>
</view>
</view>
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
实付
</text>
<text>
实付
</text>
<view
class=
"pricebox"
>
<view
class=
"pricebox"
>
<text
class=
"text"
>
共2件 合计:
</text>
<text
class=
"text"
>
共2件 合计:
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"price"
>
108.
</text>
<text
class=
"price"
>
{{
orderDetail
.
orderLogistics
.
actualTotal
}}
</text>
<
text
class=
"icon"
>
70
</text
>
<
!--
<text
class=
"icon"
>
{{
orderDetail
.
orderLogistics
.
actualTotal
.
split
(
'.'
)[
1
]
}}
</text>
--
>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -141,19 +132,19 @@
...
@@ -141,19 +132,19 @@
<text
class=
"title"
>
订单信息
</text>
<text
class=
"title"
>
订单信息
</text>
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
订单号:
</text>
<text>
订单号:
</text>
<text>
5555222222111111
</text>
<text>
{{
orderDetail
.
orderLogistics
.
orderNumber
.
slice
(
6
)
}}
</text>
</view>
</view>
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
运费:
</text>
<text>
运费:
</text>
<text>
¥
10.00
</text>
<text>
¥
{{
orderDetail
.
orderLogistics
.
freightFee
}}
</text>
</view>
</view>
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
下单时间:
</text>
<text>
下单时间:
</text>
<text>
2024-05-22 17:25:54
</text>
<text>
{{
orderDetail
.
orderLogistics
.
createTime
}}
</text>
</view>
</view>
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
支付方式:
</text>
<text>
支付方式:
</text>
<text>
微信
</text>
<text>
{{
payWayList
[
orderDetail
.
orderLogistics
.
payWay
]
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"more"
@
tap=
"changeShowMore"
>
<view
class=
"more"
@
tap=
"changeShowMore"
>
...
@@ -180,6 +171,51 @@
...
@@ -180,6 +171,51 @@
<
script
setup
>
<
script
setup
>
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
stepBar
from
'@/pages/assistingAgriculture/order/components/stepBar/index.vue'
;
import
stepBar
from
'@/pages/assistingAgriculture/order/components/stepBar/index.vue'
;
import
{
getOrderDetail
,
getShopDetail
}
from
'@/api/order'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
orderNumber
=
ref
(
''
);
onLoad
((
options
)
=>
{
orderNumber
.
value
=
options
.
orderNumber
;
getDetail
();
});
const
payWayList
=
ref
({
0
:
'翼支付'
,
1
:
'支付宝'
,
2
:
'微信'
,
});
/**
* 获取订单详情 0-翼支付,1-支付宝,2-微信
*/
const
orderDetail
=
ref
();
const
getDetail
=
async
()
=>
{
const
res
=
await
getOrderDetail
({
orderNumber
:
orderNumber
.
value
});
orderDetail
.
value
=
res
.
data
;
getShopMailDetail
(
orderDetail
.
value
.
baseOrder
.
shopId
);
};
/**
* 获取商铺信息
*/
const
shopDetail
=
ref
();
const
getShopMailDetail
=
async
(
id
)
=>
{
const
res
=
await
getShopDetail
({
shopId
:
id
});
shopDetail
.
value
=
res
.
data
.
shop
;
};
const
toShopDetail
=
()
=>
{
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/shop/index?shopId=
${
shopDetail
.
value
.
shopId
}
`
,
});
};
const
toProdDetail
=
(
id
)
=>
{
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/detail/detail?prodId=
${
id
}
`
,
});
};
const
showMore
=
ref
(
false
);
const
showMore
=
ref
(
false
);
const
changeShowMore
=
()
=>
{
const
changeShowMore
=
()
=>
{
...
...
src/pages/index/index.vue
View file @
23189d75
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
v-for=
"(item, index) in classificationT"
v-for=
"(item, index) in classificationT"
:key=
"index"
:key=
"index"
>
>
<image
class=
"imgs"
:src=
"item.icon"
mode=
"widthFix"
/>
<image
class=
"imgs"
:src=
"item.icon"
/>
<text
class=
"introduce"
>
{{
item
.
categoryName
}}
</text>
<text
class=
"introduce"
>
{{
item
.
categoryName
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
v-for=
"(item, index) in classificationB"
v-for=
"(item, index) in classificationB"
:key=
"index"
:key=
"index"
>
>
<image
class=
"imgs"
:src=
"item.icon"
mode=
"widthFix"
/>
<image
class=
"imgs"
:src=
"item.icon"
/>
<text
class=
"introduce"
>
{{
item
.
categoryName
}}
</text>
<text
class=
"introduce"
>
{{
item
.
categoryName
}}
</text>
</view>
</view>
</view>
</view>
...
@@ -150,28 +150,12 @@
...
@@ -150,28 +150,12 @@
>
>
没有更多啦~
没有更多啦~
</view>
</view>
<fab
/>
<!-- 悬浮按钮 -->
<wd-fab
type=
"error"
position=
"right-bottom"
direction=
"left"
:draggable=
"true"
inactiveIcon=
"a-controlplatform"
>
<view
class=
"custom-button"
@
click=
"go('/pages/ticket/ticket')"
>
<image
class=
"fab-icon"
src=
"@/static/index/coupon.png"
></image>
<text
class=
"fab-text"
>
优惠券
</text>
</view>
<view
class=
"custom-button"
@
click=
"go('/pages/order/order')"
>
<image
class=
"fab-icon"
src=
"@/static/index/order.png"
></image>
<text
class=
"fab-text"
>
订单
</text>
</view>
</wd-fab>
</view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
fab
from
'../../components/fab/fab.vue'
;
import
myIcon
from
'../../components/wd-icon-local/wd-icon.vue'
;
import
myIcon
from
'../../components/wd-icon-local/wd-icon.vue'
;
import
{
onMounted
,
reactive
,
ref
}
from
'vue'
;
import
{
onMounted
,
reactive
,
ref
}
from
'vue'
;
import
{
useCountStore
}
from
'@/store'
;
import
{
useCountStore
}
from
'@/store'
;
...
@@ -526,13 +510,6 @@ onReachBottom(() => {
...
@@ -526,13 +510,6 @@ onReachBottom(() => {
}
}
show
.
value
=
true
;
show
.
value
=
true
;
});
});
// 前往个人中心
const
go
=
(
url
)
=>
{
xma
.
navigateTo
({
url
,
});
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -564,7 +541,7 @@ page {
...
@@ -564,7 +541,7 @@ page {
display
:
flex
;
display
:
flex
;
justify-content
:
space-evenly
;
justify-content
:
space-evenly
;
margin-top
:
32rpx
;
margin-top
:
32rpx
;
align-items
:
center
;
align-items
:
flex-end
;
.choice
{
.choice
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -577,6 +554,7 @@ page {
...
@@ -577,6 +554,7 @@ page {
Source
Han
Sans
;
Source
Han
Sans
;
.imgs
{
.imgs
{
width
:
88rpx
;
width
:
88rpx
;
height
:
88rpx
;
}
}
}
}
}
}
...
@@ -584,7 +562,7 @@ page {
...
@@ -584,7 +562,7 @@ page {
display
:
flex
;
display
:
flex
;
justify-content
:
space-evenly
;
justify-content
:
space-evenly
;
margin-top
:
34rpx
;
margin-top
:
34rpx
;
align-items
:
center
;
align-items
:
flex-end
;
.choice
{
.choice
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -597,6 +575,7 @@ page {
...
@@ -597,6 +575,7 @@ page {
Source
Han
Sans
;
Source
Han
Sans
;
.imgs
{
.imgs
{
width
:
68rpx
;
width
:
68rpx
;
height
:
68rpx
;
margin-bottom
:
8rpx
;
margin-bottom
:
8rpx
;
}
}
}
}
...
@@ -865,26 +844,5 @@ page {
...
@@ -865,26 +844,5 @@ page {
}
}
}
}
}
}
.custom-button
{
min-width
:
auto
;
box-sizing
:
border-box
;
gap
:
10rpx
;
margin
:
8rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
.fab-icon
{
width
:
64rpx
;
height
:
64rpx
;
}
.fab-text
{
font-size
:
20rpx
;
color
:
#333
;
}
}
}
}
</
style
>
</
style
>
src/pages/order/order.vue
View file @
23189d75
...
@@ -302,7 +302,7 @@ const catalog = reactive({
...
@@ -302,7 +302,7 @@ const catalog = reactive({
endDate
:
''
,
endDate
:
''
,
keyword
:
''
,
keyword
:
''
,
status
:
''
,
// 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
status
:
''
,
// 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
orderType
:
'
store
'
,
// 团购到店-store,外卖订单-takeaway,筑农物流logistics
orderType
:
''
,
// 团购到店-store,外卖订单-takeaway,筑农物流logistics
});
});
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
if
(
isEnd
.
value
)
return
;
if
(
isEnd
.
value
)
return
;
...
@@ -503,10 +503,13 @@ const onFinish = async (orderNumber) => {
...
@@ -503,10 +503,13 @@ const onFinish = async (orderNumber) => {
const
handleDetail
=
(
item
)
=>
{
const
handleDetail
=
(
item
)
=>
{
// 清空查询待付款状态
// 清空查询待付款状态
pendingPaymentOrder
.
value
=
null
;
pendingPaymentOrder
.
value
=
null
;
console
.
log
(
item
.
orderType
);
if
(
item
.
orderType
===
'logistics'
)
{
if
(
item
.
orderType
===
'logistics'
)
{
console
.
log
(
1111
);
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`pages/assistingAgriculture/order/detail?orderNumber=
${
item
.
orderNumber
}
`
,
url
:
`
/
pages/assistingAgriculture/order/detail?orderNumber=
${
item
.
orderNumber
}
`
,
});
});
return
;
}
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/order/detail?orderNumber=
${
item
.
orderNumber
}
`
,
url
:
`/pages/order/detail?orderNumber=
${
item
.
orderNumber
}
`
,
...
...
vite.config.ts
View file @
23189d75
...
@@ -35,7 +35,7 @@ export default defineConfig({
...
@@ -35,7 +35,7 @@ export default defineConfig({
alias
:
{
alias
:
{
'@'
:
path
.
resolve
(
__dirname
,
'./src'
),
'@'
:
path
.
resolve
(
__dirname
,
'./src'
),
},
},
},
},
server
:
{
server
:
{
open
:
true
,
open
:
true
,
// 代理配置
// 代理配置
...
...
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