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
20681a88
Commit
20681a88
authored
Aug 15, 2024
by
蔡亮华(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
5973f5f6
e94f42ed
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
385 additions
and
168 deletions
+385
-168
fab.vue
src/Components/fab/fab.vue
+71
-6
Search.vue
src/components/index/Search.vue
+4
-3
pages.json
src/pages.json
+5
-3
RouteDetails.vue
src/pages/assistingAgriculture/RouteDetails/RouteDetails.vue
+90
-26
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+54
-14
cart.vue
src/pages/assistingAgriculture/cart/cart.vue
+1
-0
detail.vue
src/pages/assistingAgriculture/detail/detail.vue
+9
-27
building.vue
src/pages/assistingAgriculture/index/building.vue
+4
-4
index.vue
src/pages/assistingAgriculture/index/index.vue
+2
-2
presale.vue
src/pages/assistingAgriculture/index/presale.vue
+5
-4
searchPage.vue
src/pages/assistingAgriculture/searchPage/searchPage.vue
+89
-60
index.vue
src/pages/index/index.vue
+1
-1
loading.vue
src/pages/index/loading.vue
+2
-2
detail.vue
src/pages/order/detail.vue
+32
-6
order.vue
src/pages/order/order.vue
+4
-2
detail.vue
src/pages/ticket/detail.vue
+2
-3
ticket.vue
src/pages/ticket/ticket.vue
+10
-5
gwc.png
src/static/index/gwc.png
+0
-0
No files found.
src/Components/fab/fab.vue
View file @
20681a88
...
...
@@ -7,18 +7,66 @@
: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
v-if=
"position === '0'"
class=
"outer-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>
</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
v-if=
"position === '1'"
class=
"outer-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>
<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/storeEntry/index')"
>
<image
class=
"fab-icon"
src=
"../../static/index/coupon.png"
></image>
<text
class=
"fab-text"
>
商家
</text>
</view>
<view
class=
"custom-button"
@
click=
"go('/pages/assistingAgriculture/index/index')"
>
<image
class=
"fab-icon"
src=
"../../static/index/coupon.png"
></image>
<text
class=
"fab-text"
>
助农
</text>
</view>
</view>
<!-- 预售主页 -->
<view
v-if=
"position === '2'"
class=
"outer-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>
<view
class=
"custom-button"
@
click=
"go('/pages/assistingAgriculture/cart/cart')"
>
<image
class=
"fab-icon"
src=
"../../static/index/gwc.png"
></image>
<text
class=
"fab-text"
>
购物车
</text>
<view
class=
"badge"
v-if=
"cartCount > 0"
>
{{
cartCount
}}
</view>
</view>
</view>
<!-- 旅居主页 -->
<view
v-if=
"position === '3'"
class=
"outer-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>
</view>
</wd-fab>
</
template
>
<
script
setup
>
const
props
=
defineProps
({
// 悬浮按钮
position
:
{
type
:
String
,
default
:
'1'
,
},
cartCount
:
{
type
:
Number
,
default
:
0
,
},
});
// 前往个人中心
const
go
=
(
url
)
=>
{
xma
.
navigateTo
({
...
...
@@ -28,6 +76,9 @@ const go = (url) => {
</
script
>
<
style
lang=
"scss"
scoped
>
.outer-view
{
display
:
flex
;
}
.custom-button
{
min-width
:
auto
;
box-sizing
:
border-box
;
...
...
@@ -37,6 +88,7 @@ const go = (url) => {
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
position
:
relative
;
.fab-icon
{
width
:
64rpx
;
...
...
@@ -47,5 +99,18 @@ const go = (url) => {
font-size
:
20rpx
;
color
:
#333
;
}
.badge
{
font-size
:
18rpx
;
font-weight
:
bold
;
color
:
#fa4350
;
background-color
:
#fff
;
text-align
:
center
;
border-radius
:
32rpx
;
padding
:
4rpx
8rpx
;
position
:
absolute
;
top
:
0
;
right
:
-6rpx
;
}
}
</
style
>
src/components/index/Search.vue
View file @
20681a88
...
...
@@ -62,7 +62,8 @@ onLoad(() => {
// console.log('右边界坐标', res.right); // 右边界坐标,单位:px
// console.log('下边界坐标', res.bottom); // 下边界坐标,单位:px
// console.log('左边界坐标', res.left);
contentHeight
.
value
=
res
.
bottom
*
2
+
10
+
'rpx'
;
// 左边界坐标,单位:px
contentHeight
.
value
=
(
res
.
top
+
res
.
bottom
)
/
2
+
25
+
'px'
;
// contentHeight.value = res.bottom * 2 + 10 + 'rpx'; // 左边界坐标,单位:px
},
});
});
...
...
@@ -81,7 +82,7 @@ const back = () => {
top
:
0
;
z-index
:
999999
;
transition
:
background-color
0
.5s
;
box-sizing
:
border-box
;
//
box-sizing: border-box;
.search
{
position
:
absolute
;
bottom
:
10rpx
;
...
...
@@ -90,7 +91,7 @@ const back = () => {
width
:
710rpx
;
height
:
80rpx
;
// background: rgba(255, 255, 255, 0.8);
//
border-radius: 16rpx 16rpx 16rpx 16rpx;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
opacity
:
0
.8
;
margin
:
0
auto
;
// margin-top: 44rpx;
...
...
src/pages.json
View file @
20681a88
...
...
@@ -174,7 +174,10 @@
{
"path"
:
"pages/assistingAgriculture/detail/detail"
,
"style"
:
{
"navigationBarTitleText"
:
"详情页"
"navigationBarTitleText"
:
"商品详情"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationStyle"
:
"custom"
,
"onReachBottomDistance"
:
50
,
}
},
{
...
...
@@ -264,4 +267,4 @@
"globalStyle"
:
{
"navigationStyle"
:
"custom"
}
}
\ No newline at end of file
}
src/pages/assistingAgriculture/RouteDetails/RouteDetails.vue
View file @
20681a88
<
template
>
<div
class=
"route-details"
>
<Search></Search>
<scroll-view
class=
"container"
scroll-y
>
<Search
:backgroundBox=
"backgroundBox"
></Search>
<scroll-view
class=
"container"
scroll-y
@
scroll=
"onScroll"
>
<!--
<img
class=
"back-img"
src=
"/static/assistingAgriculture/assets/left.png"
@
tap=
"back"
/>
-->
<!-- 轮播 -->
<div
class=
"banner"
>
...
...
@@ -148,7 +148,7 @@
<div
class=
"date-wrap"
>
<div
class=
"date-title"
>
选择日期
</div>
<div
class=
"date-list flex-between"
>
<div
class=
"list"
>
<div
class=
"list"
style=
"margin-top: 20rpx"
>
<div
class=
"item"
:class=
"
{ active: activePrice === v }"
...
...
@@ -328,9 +328,19 @@ import {
getItinerary
,
getStoreInformation
,
}
from
'@/api/assistingAgriculture/route'
;
import
{
groupBuyConfirm
,
groupBuyUpdate
}
from
'@/api/confirmOrder'
;
import
{
sgyOrderOrderInfo
}
from
'@/api/assistingAgriculture/shop'
;
import
{
groupBuyConfirm
,
groupBuyUpdate
,
groupBuyCreate
}
from
'@/api/confirmOrder'
;
import
{
getCollect
}
from
'@/api/packageDetail'
;
/* 监听滑动改变顶部颜色 */
const
backgroundBox
=
ref
(
''
);
const
onScroll
=
(
e
)
=>
{
const
{
scrollTop
}
=
e
.
detail
;
if
(
scrollTop
>
20
)
{
backgroundBox
.
value
=
'#fff'
;
}
else
{
backgroundBox
.
value
=
''
;
}
};
const
swiperList
=
ref
([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg'
,
]);
...
...
@@ -344,12 +354,13 @@ const firstEvaluation = ref({});
const
photoList
=
ref
([]);
// 套餐列表
const
mealList
=
ref
([]);
const
activeMeal
=
ref
(
null
);
const
activeMeal
=
ref
(
{}
);
const
orderInfo
=
ref
({});
const
onActiveMeal
=
(
item
)
=>
{
activeMeal
.
value
=
item
;
getPriceListFn
(
item
.
mealId
);
};
// 日历
const
priceList
=
ref
([]);
const
viewPriceList
=
ref
([]);
...
...
@@ -363,6 +374,41 @@ watch(show, (value) => {
index
=
Math
.
min
(
priceList
.
value
.
length
-
3
,
index
);
viewPriceList
.
value
=
priceList
.
value
.
slice
(
index
-
1
,
index
+
3
);
});
onShow
(()
=>
{
if
(
outTradeNos
.
value
)
{
// 查询订单状态决定是否支付
sgyOrderOrderInfo
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
switch
(
res
.
data
.
baseOrder
.
subStatus
)
{
case
'1'
:
xma
.
showToast
({
title
:
'支付失败'
,
icon
:
'error'
,
duration
:
1000
,
success
()
{
setTimeout
(()
=>
{
xma
.
redirectTo
({
url
:
`/pages/order/order?status=not_pay`
,
});
},
1500
);
},
});
break
;
case
'2'
:
xma
.
redirectTo
({
url
:
`/pages/order/detail?orderNumber=
${
outTradeNos
.
value
}
`
,
});
break
;
case
'3'
:
xma
.
redirectTo
({
url
:
`/pages/order/detail?orderNumber=
${
outTradeNos
.
value
}
`
,
});
break
;
default
:
break
;
}
});
}
});
const
getWeek
=
(
date
)
=>
{
const
week
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
];
return
week
[
new
Date
(
date
).
getDay
()];
...
...
@@ -383,7 +429,7 @@ function jumpPage() {
}
function
groupBuyConfirmFn
(
prodId
,
skuId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
groupBuyConfirm
({
prodId
,
skuId
}).
then
((
res
)
=>
{
groupBuyConfirm
({
prodId
,
skuId
,
orderType
:
'store'
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
orderInfo
.
value
=
res
.
data
;
resolve
(
res
.
data
.
shopId
);
...
...
@@ -418,33 +464,51 @@ function formatDate(inputDate) {
}
const
payNow
=
async
(
data
)
=>
{
groupBuyConfirmFn
(
activeMeal
.
value
.
prodId
,
activeMeal
.
value
.
skuId
).
then
((
res
)
=>
{
groupBuyUpdateFnQg
().
then
(()
=>
{});
groupBuyUpdateFnQg
().
then
(()
=>
{
const
qgParams
=
{
id
:
orderInfo
.
value
.
key
,
placeOrderWay
:
'sgy'
,
payWayCode
:
5
,
tradeType
:
data
.
selectType
,
};
groupBuyCreate
(
qgParams
).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
openUrl
(
res
.
data
.
result
);
}
else
{
groupBuyConfirmFn
(
activeMeal
.
value
.
prodId
,
activeMeal
.
value
.
skuId
);
}
});
});
});
params
.
value
.
id
=
orderInfo
.
value
.
key
;
params
.
value
.
tradeType
=
data
.
selectType
;
params
.
value
.
basketIds
=
basketIds
.
value
;
const
qgParams
=
{
id
:
orderInfo
.
value
.
key
,
placeOrderWay
:
'sgy'
,
payWayCode
:
5
,
tradeType
:
data
.
selectType
,
};
// groupBuyCreate(qgParams).then((res) => {
// if (res.code === 0) {
// openUrl(res.data.result);
// } else {
// groupBuyConfirmFn(prodIds.value, skuIds.value);
// }
// });
};
function
groupBuyUpdateFnQg
(
couponUserId
=
''
)
{
const
outTradeNos
=
ref
(
null
);
const
openUrl
=
(
result
)
=>
{
const
{
paymentUrl
,
outTradeNo
}
=
result
;
outTradeNos
.
value
=
outTradeNo
;
window
.
location
.
href
=
paymentUrl
;
// 设置一个延时器
const
start
=
Date
.
now
();
setTimeout
(()
=>
{
const
end
=
Date
.
now
();
if
(
end
-
start
<
1200
)
{
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma
.
showToast
({
title
:
'未安装App'
,
icon
:
'error'
,
});
// 这里可以跳转到应用下载页面
}
},
1600
);
};
function
groupBuyUpdateFnQg
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
groupBuyUpdate
({
key
:
orderInfo
.
value
.
key
,
receiverTime
:
formatDate
(
activePrice
.
value
.
priceDay
),
receiverTime
:
activePrice
.
value
.
priceDay
.
replace
(
' '
,
'-'
),
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
orderInfo
.
value
=
res
.
data
;
resolve
();
}
});
});
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
20681a88
...
...
@@ -55,15 +55,16 @@
style=
"width: 32rpx; height: 32rpx"
/>
<video
:class=
"
{ 'no-progress-bar': !isFullScreen }"
:show-fullscreen-btn="true"
:show-play-btn="true"
:show-enter-play-btn="true"
class="spe-img1"
id="videoId"
:src="videoList[0].videoUrl"
@error="videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
danmu-btn
@play="play"
@
fullscreenchange=
"
fullscreenc
hange"
@fullscreenchange="
handleFullscreenC
hange"
>
</video>
<!--
<img-->
<!-- class="spe-img"-->
...
...
@@ -188,9 +189,10 @@
</view>
</view>
</view>
<view
v-if=
"!hasMoreData"
class=
"no-more-data"
>
没有更多了
</view>
</view>
</view>
<fab
/>
<fab
position=
"3"
/>
</view>
</
template
>
...
...
@@ -230,7 +232,7 @@ const screenRef = ref(null);
const
backgroundBox
=
ref
(
''
);
const
border
=
ref
(
''
);
const
videoList
=
ref
([]);
const
isFullScreen
=
ref
(
false
);
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
case
0
:
...
...
@@ -311,6 +313,9 @@ function fullscreenchange(e) {
uni
.
createVideoContext
(
'videoId'
).
pause
();
}
}
function
handleFullscreenChange
(
event
)
{
isFullScreen
.
value
=
!
isFullScreen
.
value
;
}
// //退出全屏时停止
// function fullscreenchange (e){
// if(!e.detail.fullScreen){
...
...
@@ -362,16 +367,15 @@ const screenParams = (selectedItems, type) => {
}
};
// 搜索
// 搜索
const
toSearch
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/assistingAgriculture/searchPage/searchPage?prodTypes=10'
});
};
const
currentPage
=
ref
(
1
);
// 查询列表
const
getProd
=
(
searchKeyword
=
''
)
=>
{
const
params
=
{
current
:
1
,
size
:
10
,
current
:
currentPage
.
value
,
size
:
3
,
...(
sortType
.
value
&&
{
sortType
:
sortType
.
value
.
sortMode
}),
...(
attractionIdList
.
value
&&
attractionIdList
.
value
.
length
>
0
&&
...
...
@@ -394,9 +398,25 @@ const getProd = (searchKeyword = '') => {
item
.
img
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
item
.
serveList
=
item
.
serviceList
.
slice
(
0
,
3
);
});
cardList
.
value
=
res
.
data
.
records
;
if
(
currentPage
.
value
===
1
)
{
cardList
.
value
=
res
.
data
.
records
;
}
else
{
cardList
.
value
=
cardList
.
value
.
concat
(
res
.
data
.
records
);
}
// 判断是否还有更多数据
if
(
res
.
data
.
records
.
length
<
params
.
size
)
{
hasMoreData
.
value
=
false
;
// 没有更多数据
}
});
};
// 页面滚动到底部触发加载更多
onReachBottom
(()
=>
{
if
(
hasMoreData
.
value
)
{
currentPage
.
value
++
;
getProd
();
}
});
const
hasMoreData
=
ref
(
true
);
const
resetParams
=
()
=>
{
if
(
sortRef
.
value
||
departureDateRef
.
value
||
scenicSpotsRef
.
value
||
screenRef
.
value
)
{
sortType
.
value
=
null
;
...
...
@@ -639,6 +659,10 @@ page {
font-weight
:
normal
;
line-height
:
30rpx
;
color
:
#666666
;
height
:
30rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.tag
.wd-tag
{
margin-right
:
10px
;
...
...
@@ -653,11 +677,12 @@ page {
color
:
#0974f5
;
}
.price
{
position
:
absolute
;
font-size
:
28rpx
;
font-weight
:
bold
;
line-height
:
28rpx
;
color
:
#fa5151
;
margin-left
:
16
0rpx
;
margin-left
:
30
0rpx
;
}
.venue
{
display
:
flex
;
...
...
@@ -672,7 +697,7 @@ page {
}
.tag
{
margin-top
:
10rpx
;
width
:
4
00rpx
;
width
:
6
00rpx
;
}
.detail-score
{
margin-top
:
30rpx
;
...
...
@@ -686,7 +711,7 @@ page {
display
:
flex
;
align-items
:
center
;
padding-left
:
20rpx
;
margin-left
:
8
0rpx
;
margin-left
:
6
0rpx
;
text-align
:
start
;
.magnifyingGlass
{
width
:
26rpx
;
...
...
@@ -721,4 +746,19 @@ uni-video {
left
:
20rpx
;
border-radius
:
16rpx
;
}
::v-deep
.uni-video-controls
{
margin
:
0
;
}
.no-more-data
{
text-align
:
center
;
padding
:
20rpx
;
color
:
#999
;
}
::v-deep
.uni-video-progress-container
{
transform
:
scale
(
0
);
}
::v-deep
.uni-video-current-time
,
::v-deep
.uni-video-duration
{
transform
:
scale
(
0
);
}
</
style
>
src/pages/assistingAgriculture/cart/cart.vue
View file @
20681a88
...
...
@@ -265,6 +265,7 @@ const toStore = (item) => {
background-color
:
#fff
;
padding
:
0
15rpx
0
23rpx
;
box-sizing
:
border-box
;
z-index
:
999
;
.left
{
.check-box
{
font-size
:
24rpx
;
...
...
src/pages/assistingAgriculture/detail/detail.vue
View file @
20681a88
...
...
@@ -3,12 +3,11 @@
<!-- 顶部搜索框-->
<view
class=
"top"
>
<view
class=
"top"
>
<Search
background=
"rgba(255, 255, 255, 0.8)"
backIcon=
"black"
iconSrc=
"/static/assistingAgriculture/assets/blackLeft.png"
placeholderText=
"请输入要搜索的内容"
></Search>
<Search
style=
"z-index: 99; width: 100%"
:type=
"2"
backgroundBox=
"#fff"
>
<view
style=
"width: 100%; text-align: center; font-size: 36rpx; font-weight: bold"
>
商品详情
</view>
</Search>
</view>
</view>
<!-- 图片-->
...
...
@@ -56,7 +55,7 @@
<view
class=
"bottom"
style=
"display: flex; flex-direction: row"
>
<view
class=
"borderClass"
@
tap=
"toStore"
>
<img
src=
"/static/assistingAgriculture/detail/
img7
.png"
src=
"/static/assistingAgriculture/detail/
home
.png"
style=
"width: 40rpx; height: 40rpx"
/>
<view
class=
"sort-text"
>
店铺
</view>
...
...
@@ -71,7 +70,7 @@
<view
class=
"borderClass"
@
tap=
"toCart"
>
<wd-badge
:modelValue=
"subscript"
>
<img
src=
"/static/assistingAgriculture/detail/car.png"
src=
"/static/assistingAgriculture/detail/car
Img
.png"
style=
"width: 40rpx; height: 40rpx"
/>
</wd-badge>
...
...
@@ -97,7 +96,6 @@
</
template
>
<
script
setup
>
import
Search
from
'../../../components/assistingAgriculture/index/Search.vue'
;
import
{
ref
}
from
'vue'
;
import
{
onShow
}
from
'@dcloudio/uni-app'
;
import
{
...
...
@@ -237,18 +235,6 @@ function toSettle() {
page
{
background-color
:
#f3f3f3
;
}
.container
{
position
:
relative
;
left
:
0rpx
;
top
:
-45rpx
;
opacity
:
1
;
}
.top
{
width
:
750rpx
;
height
:
128rpx
;
margin-top
:
40rpx
;
background
:
#ffffff
;
}
.nav
{
width
:
750rpx
;
}
...
...
@@ -438,13 +424,13 @@ page {
}
.detail-bottom
{
width
:
750rpx
;
height
:
216
rpx
;
height
:
140
rpx
;
border-radius
:
16rpx
16px
0rpx
0rpx
;
background
:
#ffffff
;
box-shadow
:
0rpx
-8rpx
20rpx
0rpx
rgba
(
0
,
0
,
0
,
0
.12
);
z-index
:
10
;
position
:
fixed
;
top
:
88
%
;
top
:
91
%
;
}
.sort
{
width
:
750rpx
;
...
...
@@ -470,8 +456,4 @@ page {
margin-top
:
-90rpx
;
margin-left
:
400rpx
;
}
::v-deep
.icon
{
width
:
56rpx
;
height
:
56rpx
;
}
</
style
>
src/pages/assistingAgriculture/index/building.vue
View file @
20681a88
...
...
@@ -134,7 +134,7 @@
</view>
</view>
<!-- 购物车悬浮按钮 -->
<view
class=
"cart-floating"
@
tap=
"toCart"
>
<
!--
<
view
class=
"cart-floating"
@
tap=
"toCart"
>
<wd-badge
:modelValue=
"subscript"
>
<img
class=
"shop-car"
...
...
@@ -142,8 +142,8 @@
style=
"width: 40rpx; height: 40rpx"
/>
</wd-badge>
</view>
<fab
/>
</view>
-->
<fab
position=
"2"
:cartCount=
"subscript"
/>
</view>
</
template
>
...
...
@@ -497,7 +497,7 @@ img.rice {
display
:
flex
;
align-items
:
center
;
padding-left
:
20rpx
;
margin-left
:
8
0rpx
;
margin-left
:
6
0rpx
;
text-align
:
start
;
.magnifyingGlass
{
width
:
26rpx
;
...
...
src/pages/assistingAgriculture/index/index.vue
View file @
20681a88
...
...
@@ -74,7 +74,7 @@
</view>
</view>
</view>
<fab
/>
<fab
position=
"0"
/>
</view>
</
template
>
...
...
@@ -302,7 +302,7 @@ page {
display
:
flex
;
align-items
:
center
;
padding-left
:
20rpx
;
margin-left
:
8
0rpx
;
margin-left
:
6
0rpx
;
text-align
:
start
;
.magnifyingGlass
{
width
:
26rpx
;
...
...
src/pages/assistingAgriculture/index/presale.vue
View file @
20681a88
...
...
@@ -128,7 +128,7 @@
</view>
</view>
<!-- 购物车悬浮按钮 -->
<view
class=
"cart-floating"
@
tap=
"toCart"
>
<
!--
<
view
class=
"cart-floating"
@
tap=
"toCart"
>
<wd-badge
:modelValue=
"subscript"
>
<img
class=
"shop-car"
...
...
@@ -136,7 +136,8 @@
style=
"width: 40rpx; height: 40rpx"
/>
</wd-badge>
</view>
</view>
-->
<fab
position=
"2"
:cartCount=
"subscript"
/>
</
template
>
<
script
setup
>
...
...
@@ -150,7 +151,7 @@ import {
getStrictSelection
,
}
from
'../../../api/assistingAgriculture/building'
;
import
{
getshoppingCartList
}
from
'@/api/packageDetail'
;
import
fab
from
'../../../components/fab/fab.vue'
;
const
swiperList
=
ref
([]);
const
current
=
ref
(
0
);
// 轮播图数据
...
...
@@ -526,7 +527,7 @@ page {
display
:
flex
;
align-items
:
center
;
padding-left
:
20rpx
;
margin-left
:
8
0rpx
;
margin-left
:
6
0rpx
;
text-align
:
start
;
.magnifyingGlass
{
width
:
26rpx
;
...
...
src/pages/assistingAgriculture/searchPage/searchPage.vue
View file @
20681a88
<
template
>
<view
class=
"search-page"
>
<view
class=
"search"
style=
"background: linear-gradient(180deg, #71c456 0%, rgba(243, 243, 243, 0) 100%)"
>
<wd-icon
name=
"thin-arrow-left"
class=
"icon"
@
tap=
"back"
:style=
"
{ color: '#FFFAE8' }"
>
</wd-icon>
<slot></slot>
<view
class=
"searchBox"
>
<wd-icon
name=
"search"
size=
"22rpx"
></wd-icon>
<input
type=
"text"
:value=
"test"
class=
"text"
@
confirm=
"toSearch"
placeholder=
"请输入搜索内容"
confirm-type=
"搜索"
/>
</view>
<Search
backIcon=
"white"
backgroundBox=
"linear-gradient(180deg, #71c456 0%, rgba(243, 243, 243, 0) 100%)"
>
<view
class=
"searchBox"
>
<wd-icon
name=
"search"
size=
"22rpx"
></wd-icon>
<input
type=
"text"
:value=
"test"
class=
"text"
@
confirm=
"toSearch"
placeholder=
"请输入搜索内容"
confirm-type=
"搜索"
/>
</view>
</
view
>
<wd-tabs
custom-class=
"tabss"
v-model=
"tab"
>
</
Search
>
<
!--
<
wd-tabs
custom-class=
"tabss"
v-model=
"tab"
>
<block
v-for=
"(item, index) in tabs"
:key=
"index"
>
<wd-tab
:title=
"item"
>
<view
class=
"content1"
v-show=
"tab === 0"
>
...
...
@@ -62,7 +53,16 @@
</view>
</wd-tab>
</block>
</wd-tabs>
</wd-tabs>
-->
<view
class=
"shopitem"
v-for=
"(item, index) in commoditys"
:key=
"index"
@
tap=
"toDetail(item)"
>
<image
class=
"img"
:src=
"item.imgUrl"
mode=
"aspectFill"
/>
<view
class=
"middle"
>
<text
class=
"text"
>
{{
item
.
prodName
}}
</text>
<text
class=
"text2"
>
¥
{{
item
.
price
}}
</text>
<text
class=
"collection"
>
月销量
{{
item
.
soldNum
}}
</text>
</view>
</view>
<wd-status-tip
image=
"content"
tip=
"暂无商品"
v-if=
"commoditys.length === 0 && active"
/>
</
template
>
<
script
setup
>
...
...
@@ -74,6 +74,7 @@ const value = ref(5);
const
commoditys
=
ref
([]);
const
shops
=
ref
([]);
const
baseImgurl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
active
=
ref
(
false
);
function
changeValue
({
value
})
{
console
.
log
(
value
);
}
...
...
@@ -99,9 +100,12 @@ const toSearch = (data) => {
// 商品搜索
params
.
prodName
=
keyword
;
searchCommodity
(
params
).
then
((
res
)
=>
{
active
.
value
=
true
;
res
.
data
.
data
.
forEach
((
item
)
=>
{
const
imgs
=
item
.
imgs
.
split
(
','
);
item
.
imgUrl
=
baseImgurl
+
imgs
[
0
];
if
(
item
.
imgs
)
{
const
imgs
=
item
.
imgs
.
split
(
','
);
item
.
imgUrl
=
baseImgurl
+
imgs
[
0
];
}
});
commoditys
.
value
=
res
.
data
.
data
;
});
...
...
@@ -134,43 +138,68 @@ function toDetail(item) {
page
{
background
:
#f6f6f6
;
}
.search-page
{
.search
{
width
:
100%
;
height
:
124rpx
;
opacity
:
0
.8
;
margin
:
0
auto
;
.searchBox
{
opacity
:
1
;
width
:
350rpx
;
height
:
56rpx
;
background
:
#ffffff
;
border-radius
:
28rpx
28rpx
28rpx
28rpx
;
display
:
flex
;
align-items
:
center
;
padding-left
:
20rpx
;
margin-left
:
50rpx
;
.magnifyingGlass
{
width
:
26rpx
;
height
:
26rpx
;
}
.text
{
margin-left
:
10rpx
;
font-size
:
24rpx
;
}
}
.shopitem
{
padding
:
0
20rpx
;
display
:
flex
;
height
:
200rpx
;
background-color
:
white
;
align-items
:
center
;
border-bottom
:
1rpx
solid
rgb
(
225
,
223
,
223
);
.img
{
width
:
200rpx
;
height
:
150rpx
;
border-radius
:
16rpx
;
flex-shrink
:
0
;
}
.middle
{
height
:
150rpx
;
margin-left
:
20rpx
;
display
:
flex
;
align-items
:
center
;
padding-left
:
20rpx
;
box-sizing
:
border-box
;
.arrow
{
width
:
15rpx
;
height
:
24rpx
;
flex-direction
:
column
;
justify-content
:
space-around
;
.text
{
font-weight
:
bold
;
font-size
:
26rpx
;
}
.icon
{
font-size
:
28rpx
;
.text2
{
font-weight
:
bold
;
font-size
:
22rpx
;
color
:
red
;
}
.searchBox
{
opacity
:
1
;
width
:
350rpx
;
height
:
56rpx
;
background
:
#ffffff
;
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
;
}
.collection
{
font-size
:
22rpx
;
color
:
rgb
(
147
,
145
,
145
);
}
}
.btn
{
text-align
:
center
;
border-radius
:
50rpx
;
background
:
#2fb641
;
font-size
:
22rpx
;
padding
:
8rpx
15rpx
;
color
:
white
;
box-sizing
:
border-box
;
}
}
:deep
(
.wd-tabs__line
)
{
...
...
src/pages/index/index.vue
View file @
20681a88
...
...
@@ -807,7 +807,7 @@ page {
box-shadow
:
0rpx
4rpx
16rpx
0rpx
rgba
(
0
,
0
,
0
,
0
.08
);
margin
:
0
auto
;
margin-top
:
10rpx
;
// position: sticky
;
position
:
relative
;
// top: 0;
z-index
:
99
;
uni-scroll-view
.
uni-scroll-view
:
:-
webkit-scrollbar
{
...
...
src/pages/index/loading.vue
View file @
20681a88
...
...
@@ -21,11 +21,11 @@ onLoad(async (options) => {
xma
.
reLaunch
({
url
:
'/pages/index/index'
});
break
;
case
'2'
:
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/
index/building?categoryId=3266
'
});
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/
RuralTravel/RuralTravel?categoryId=3268
'
});
break
;
case
'3'
:
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/
RuralTravel/RuralTravel?categoryId=3268
'
,
url
:
'/pages/assistingAgriculture/
index/building?categoryId=3266
'
,
});
break
;
default
:
...
...
src/pages/order/detail.vue
View file @
20681a88
...
...
@@ -20,22 +20,36 @@
></wd-icon>
<view
class=
"status-text"
>
{{
statusList
[
orderDetail
.
orderStore
.
status
]
}}
</view>
</view>
<view
class=
"detail"
v-if=
"orderDetail.orderStore.status == 3"
>
<view
class=
"detail"
v-if=
"orderDetail.orderStore.status == 3 && orderDetail.baseOrder.prodType === 5"
>
请在
{{
orderDetail
.
orderStore
.
writeOffEnd
.
slice
(
0
,
4
)
}}
年
{{
orderDetail
.
orderStore
.
writeOffEnd
.
slice
(
5
,
7
)
}}
月
{{
orderDetail
.
orderStore
.
writeOffEnd
.
slice
(
8
,
10
)
}}
前到店消费
</view>
<view
class=
"detail"
v-if=
"orderDetail.orderStore.status == 3 && orderDetail.baseOrder.prodType === 9"
>
预约时间:
{{
orderDetail
.
orderStore
.
receiverTime
.
slice
(
0
,
4
)
}}
年
{{
orderDetail
.
orderStore
.
receiverTime
.
slice
(
5
,
7
)
}}
月
{{
orderDetail
.
orderStore
.
receiverTime
.
slice
(
8
,
10
)
}}
日
</view>
</view>
<!-- 券码信息 -->
<view
class=
"info"
>
<view
class=
"box"
>
<view
class=
"box"
@
tap=
"toProdDetail()"
>
<view
class=
"left"
>
<image
mode=
"aspectFill"
:src=
"fileDomain + orderDetail.orderItems[0].pic"
/>
<view
class=
"left-box"
>
<text
class=
"title"
>
{{
orderDetail
.
orderItems
[
0
].
prodName
}}
</text>
<!--
<text
class=
"detail"
>
周一至周日 到店吃
</text>
<text
class=
"detail"
>
随时退·过期自动退·免预约
</text>
-->
<text
class=
"detail"
v-if=
"orderDetail.baseOrder.prodType === 9"
>
预约时间:
{{
orderDetail
.
orderStore
.
receiverTime
}}
</text>
<text
class=
"detail"
>
购买数量:
{{
orderDetail
.
orderItems
[
0
].
prodCount
}}
</text>
<view
class=
"price-box"
>
<text
class=
"icon"
>
¥
</text>
...
...
@@ -43,7 +57,12 @@
</view>
</view>
</view>
<!--
<wd-icon
name=
"chevron-right"
size=
"22px"
color=
"#333"
></wd-icon>
-->
<wd-icon
name=
"chevron-right"
size=
"22px"
color=
"#333"
v-if=
"orderDetail.baseOrder.prodType === 9"
></wd-icon>
</view>
<view
class=
"rectangle-with-semicircles"
></view>
...
...
@@ -59,7 +78,7 @@
>
<view
class=
"column"
>
<text
class=
"title"
>
券码信息(1张可用)
</text>
<text
class=
"text"
>
{{
orderDetail
.
orderStore
.
writeOffEnd
}}
到期
</text>
<text
class=
"text"
>
{{
orderDetail
.
orderStore
.
writeOffEnd
.
slice
(
0
,
16
)
}}
到期
</text>
</view>
<view
class=
"btn"
@
tap=
"handleRefund(orderDetail.orderStore.orderNumber)"
>
申请退款
...
...
@@ -116,7 +135,7 @@
</view>
<!-- 套餐信息 -->
<view
class=
"info"
v-if=
"prodDetail"
>
<view
class=
"info"
v-if=
"prodDetail
&& orderDetail.baseOrder.prodType === 5
"
>
<view
class=
"menu padding"
>
<text
class=
"title"
>
到店吃套餐
</text>
<view
class=
"menu-box"
v-for=
"(item, index) in prodDetail.prodAdditionals"
:key=
"index"
>
...
...
@@ -385,7 +404,7 @@ function copyTextToClipboard(text) {
const
handleRefund
=
(
item
)
=>
{
xma
.
navigateTo
({
url
:
`/pages/order/refund?orderNumber=
${
item
.
orderNumber
}
`
,
url
:
`/pages/order/refund?orderNumber=
${
item
}
`
,
});
};
...
...
@@ -394,6 +413,13 @@ const anotherOrder = () => {
url
:
`/pages/shop/confirmOrder?prodId=
${
orderDetail
.
value
.
orderItems
[
0
].
prodId
}
&skuId=
${
orderDetail
.
value
.
orderItems
[
0
].
skuId
}
`
,
});
};
const
toProdDetail
=
()
=>
{
if
(
orderDetail
.
value
.
baseOrder
.
prodType
===
5
)
return
;
xma
.
navigateTo
({
url
:
`/pages/assistingAgriculture/RouteDetails/RouteDetails?shopId=
${
orderDetail
.
value
.
baseOrder
.
shopId
}
&prodId=
${
orderDetail
.
value
.
orderItems
[
0
].
prodId
}
`
,
});
};
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
src/pages/order/order.vue
View file @
20681a88
...
...
@@ -58,7 +58,9 @@
<image
mode=
"aspectFill"
:src=
"fileDomain + item.orderItems[0].pic"
/>
<view
class=
"info-box"
>
<view
class=
"text"
>
下单时间:
{{
item
.
createTime
.
slice
(
0
,
16
)
}}
</view>
<!--
<view
class=
"text"
>
预约时间:
{{
item
.
receiverTime
}}
</view>
-->
<view
class=
"text"
v-if=
"item.prodType === 9"
>
预约时间:
{{
item
.
subOrder
.
receiverTime
}}
</view>
<view
class=
"text"
>
数量:
{{
item
.
orderItems
[
0
].
prodCount
}}
</view>
<view
class=
"text"
>
实付:¥
{{
item
.
actualTotal
}}
</view>
</view>
...
...
@@ -543,7 +545,7 @@ function callShopPhone(phoneNumber) {
}
/**
* 再来一单 商品类型,0-普通商品,5-团购,6-套餐,7-预售,8-售券
* 再来一单 商品类型,0-普通商品,5-团购,6-套餐,7-预售,8-售券
9-景点,10-旅游路线
*/
const
anotherOrder
=
(
item
)
=>
{
// 清空查询待付款状态
...
...
src/pages/ticket/detail.vue
View file @
20681a88
...
...
@@ -2,7 +2,7 @@
<view
class=
"container"
>
<!--
<Header
:title=
"shopDetail.shopName"
></Header>
-->
<Search
:title=
"shopDetail.shopName"
backgroundBox=
"white"
:showTitle=
"true"
></Search>
<view
class=
"content
1
"
>
<view
class=
"content"
>
<view
class=
"shop"
>
<image
:src=
"fileDomain + shopDetail.shopLogo"
class=
"logo"
mode=
"aspectFill"
></image>
<view
class=
"info"
>
...
...
@@ -136,7 +136,6 @@ import { shopCouponList, receiveCoupon, couponUsageNotice } from '@/api/ticket';
import
{
getShopDetail
}
from
'@/api/order'
;
import
{
getDistance
}
from
'@/utils/common'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
onShow
(()
=>
{
...
...
@@ -339,7 +338,7 @@ page {
.container
{
width
:
375
*
2rpx
;
margin
:
0
auto
;
.content
1
{
.content
{
display
:
flex
;
flex-direction
:
column
;
padding
:
20rpx
26rpx
26rpx
;
...
...
src/pages/ticket/ticket.vue
View file @
20681a88
<
template
>
<Search
title=
"我的券"
backgroundBox=
"white"
:showTitle=
"true"
></Search>
<view
class=
"container"
>
<!--
<Header
title=
"我的券"
></Header>
-->
<Search
title=
"我的券"
backgroundBox=
"white"
:showTitle=
"true"
></Search>
<view
class=
"tab"
>
<view
class=
"tab"
:style=
"
{ top: contentHeight }">
<view
:class=
"currentTab == index ? 'tab-select' : 'tab-item'"
@
click=
"changeTab(index)"
...
...
@@ -129,8 +129,14 @@ import { getTokenUser } from '@/api/index';
import
{
getToken
}
from
'@/utils/auth'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
contentHeight
=
ref
(
'88rpx'
);
onLoad
(
async
()
=>
{
if
(
!
getToken
())
await
signIn
();
xma
.
xh
.
getMenuButtonBoundingClientRect
({
success
(
res
)
{
contentHeight
.
value
=
res
.
bottom
*
2
+
10
+
'rpx'
;
// 左边界坐标,单位:px
},
});
// if (!getToken()) await signIn2();
getStatistics
();
getCouponList
();
...
...
@@ -298,8 +304,7 @@ page {
height
:
88rpx
;
background
:
#fff
;
width
:
100%
;
position
:
fixed
;
top
:
88rpx
;
position
:
sticky
;
z-index
:
999
;
.tab-item
{
...
...
@@ -333,7 +338,7 @@ page {
.content
{
display
:
flex
;
flex-direction
:
column
;
padding
:
10
0rpx
26rpx
26rpx
;
padding
:
2
0rpx
26rpx
26rpx
;
gap
:
36rpx
;
.card
{
...
...
src/static/index/gwc.png
0 → 100644
View file @
20681a88
1.76 KB
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