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
66866a63
Commit
66866a63
authored
Aug 05, 2024
by
彭佳妮(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
da0d1b44
840c2c7d
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
470 additions
and
75 deletions
+470
-75
Classification.vue
src/Components/index/Classification.vue
+2
-1
Position.vue
src/Components/index/Position.vue
+3
-1
index.js
src/api/index.js
+26
-0
pages.json
src/pages.json
+3
-2
coupon.vue
src/pages/index/coupon.vue
+217
-3
foodClassification.vue
src/pages/index/foodClassification.vue
+13
-7
index.vue
src/pages/index/index.vue
+75
-23
listFood.vue
src/pages/index/listFood.vue
+11
-16
packageDetails.vue
src/pages/packageDetails/packageDetails.vue
+42
-6
confirmOrder.vue
src/pages/shop/confirmOrder.vue
+23
-1
paymentSuccessful.vue
src/pages/shop/paymentSuccessful.vue
+13
-6
shop.vue
src/pages/shop/shop.vue
+42
-9
subsidy.png
src/static/shop/subsidy.png
+0
-0
yl.png
src/static/shop/yl.png
+0
-0
No files found.
src/Components/index/Classification.vue
View file @
66866a63
...
@@ -38,7 +38,7 @@ const selectItem = (index, categoryId) => {
...
@@ -38,7 +38,7 @@ const selectItem = (index, categoryId) => {
position
:
absolute
;
position
:
absolute
;
top
:
100%
;
top
:
100%
;
// width: 100%;
// width: 100%;
// height: 212
rpx;
max-height
:
780
rpx
;
border-radius
:
0rpx
0rpx
16rpx
16rpx
;
border-radius
:
0rpx
0rpx
16rpx
16rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0rpx
16rpx
16rpx
0rpx
rgba
(
73
,
73
,
73
,
0
.14
);
box-shadow
:
0rpx
16rpx
16rpx
0rpx
rgba
(
73
,
73
,
73
,
0
.14
);
...
@@ -47,6 +47,7 @@ const selectItem = (index, categoryId) => {
...
@@ -47,6 +47,7 @@ const selectItem = (index, categoryId) => {
display
:
flex
;
display
:
flex
;
padding-bottom
:
20rpx
;
padding-bottom
:
20rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
overflow-y
:
scroll
;
.ul
{
.ul
{
padding-left
:
60rpx
;
padding-left
:
60rpx
;
li
{
li
{
...
...
src/Components/index/Position.vue
View file @
66866a63
...
@@ -123,7 +123,7 @@ const selectItem2 = (index, area) => {
...
@@ -123,7 +123,7 @@ const selectItem2 = (index, area) => {
position
:
absolute
;
position
:
absolute
;
top
:
100%
;
top
:
100%
;
// width: 710rpx;
// width: 710rpx;
min-
height
:
780rpx
;
height
:
780rpx
;
border-radius
:
0rpx
0rpx
16rpx
16rpx
;
border-radius
:
0rpx
0rpx
16rpx
16rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0rpx
16rpx
16rpx
0rpx
rgba
(
73
,
73
,
73
,
0
.14
);
box-shadow
:
0rpx
16rpx
16rpx
0rpx
rgba
(
73
,
73
,
73
,
0
.14
);
...
@@ -188,6 +188,8 @@ const selectItem2 = (index, area) => {
...
@@ -188,6 +188,8 @@ const selectItem2 = (index, area) => {
}
}
.ul
{
.ul
{
padding-left
:
60rpx
;
padding-left
:
60rpx
;
overflow-y
:
scroll
;
height
:
65%
;
li
{
li
{
list-style-type
:
none
;
list-style-type
:
none
;
font-size
:
22rpx
;
font-size
:
22rpx
;
...
...
src/api/index.js
View file @
66866a63
...
@@ -102,3 +102,29 @@ export function prodSpecial(data) {
...
@@ -102,3 +102,29 @@ export function prodSpecial(data) {
data
,
data
,
});
});
}
}
// 领券中心-分类列表
export
function
getCoupon
()
{
return
request
({
url
:
`/sgyrdd/dict/key/coupon_classify`
,
method
:
'GET'
,
});
}
// 领券中心-店铺商品列表分页
export
function
getShopAndProdPage
(
data
)
{
return
request
({
url
:
`/sgyrdd/couponShop/shopAndProdPage`
,
method
:
'GET'
,
data
,
});
}
// 获取指定类型轮播图
export
function
getByType
(
data
)
{
return
request
({
url
:
`/sgyrdd/carousel/getByType`
,
method
:
'GET'
,
data
,
});
}
src/pages.json
View file @
66866a63
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
"^wd-(.*)"
:
"wot-design-uni/components/wd-$1/wd-$1.vue"
"^wd-(.*)"
:
"wot-design-uni/components/wd-$1/wd-$1.vue"
}
}
},
},
"pages"
:
[
//
pages
数组中第一项表示应用启动页
"pages"
:
[
{
{
"path"
:
"pages/index/index"
,
"path"
:
"pages/index/index"
,
"style"
:
{
"style"
:
{
...
@@ -96,7 +96,8 @@
...
@@ -96,7 +96,8 @@
{
{
"path"
:
"pages/index/coupon"
,
"path"
:
"pages/index/coupon"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"优惠券详情"
"navigationBarTitleText"
:
"优惠券详情"
,
"enablePullDownRefresh"
:
true
}
}
}
}
,
,
...
...
src/pages/index/coupon.vue
View file @
66866a63
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<scroll-view
class=
"tabs"
scroll-x=
"true"
@
scroll=
"scroll"
>
<scroll-view
class=
"tabs"
scroll-x=
"true"
@
scroll=
"scroll"
>
<text
class=
"tab"
v-for=
"(item, index) in tabs"
:key=
"index"
>
{{
item
}}
</text>
<text
@
tap=
"choice(index, item.value)"
class=
"tab"
:class=
"
{ light: active === index }"
v-for="(item, index) in tabs"
:key="index"
>
{{
item
.
label
}}
</text>
</scroll-view>
</scroll-view>
<view
class=
"itemBox"
>
<view
class=
"itemBox"
>
<view
class=
"item"
></view>
<view
class=
"item"
v-for=
"(item, index) in listData"
:key=
"index"
>
<image
class=
"commodity"
:src=
"item.shopLogo"
mode=
"aspectFill"
/>
<view
class=
"describe"
>
<text
class=
"title"
>
{{
item
.
shopName
}}
</text>
<view
class=
"oneBox"
>
<text
class=
"price"
>
¥
{{
item
.
price
}}
</text>
<view
class=
"afterTheCoupon"
>
<text
class=
"afterTheCoupon1"
>
券后¥
</text>
<text
class=
"afterTheCoupon2"
>
{{
item
.
price
-
item
.
reduceAmount
}}
</text>
</view>
</view>
<view
class=
"twoBox"
>
<text
class=
"coupon"
>
商家券
</text>
<text
class=
"discounted"
>
已优惠¥
{{
item
.
reduceAmount
}}
元
</text>
</view>
<view
class=
"threeBox"
>
<text
class=
"fullReduction"
>
{{
item
.
couponName
}}
</text>
<view
class=
"receive"
>
领劵
</view>
</view>
</view>
</view>
<view
style=
"width: 100%; text-align: center; font-size: 24rpx; margin: 10rpx 0; color: #888989"
v-if=
"show"
>
没有更多啦~
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{}
from
'vue'
;
import
{}
from
'vue'
;
import
{
getCoupon
,
getShopAndProdPage
}
from
'../../api/index'
;
const
tabs
=
ref
([
'推荐'
,
'附近美食'
,
'果蔬生鲜'
,
'数码商城'
,
'小吃快餐'
,
'数码商城'
,
'餐饮券'
]);
const
tabs
=
ref
([
'推荐'
,
'附近美食'
,
'果蔬生鲜'
,
'数码商城'
,
'小吃快餐'
,
'数码商城'
,
'餐饮券'
]);
const
params
=
{
current
:
1
,
size
:
6
,
lng
:
106.68650025025502
,
lat
:
26.567192352601154
,
};
let
total
;
const
active
=
ref
(
0
);
const
listData
=
ref
([]);
const
show
=
ref
(
false
);
// 获取优惠券
onMounted
(()
=>
{
getCoupons
();
getShop
();
});
// 数据重置
const
reset
=
()
=>
{
params
.
current
=
1
;
params
.
size
=
6
;
listData
.
value
=
[];
show
.
value
=
false
;
};
const
choice
=
(
index
,
value
)
=>
{
reset
();
active
.
value
=
index
;
if
(
value
===
'999'
)
{
delete
params
.
classification
;
}
else
{
params
.
classification
=
value
;
}
getShop
();
// emit('nearby', distance);
};
// 领券中心-分类列表
const
getCoupons
=
()
=>
{
getCoupon
().
then
((
res
)
=>
{
res
.
data
.
unshift
({
label
:
'推荐'
,
value
:
'999'
});
tabs
.
value
=
res
.
data
;
console
.
log
(
'优惠券'
,
res
);
});
};
// 领券中心-店铺商品列表分页
const
getShop
=
()
=>
{
xma
.
showLoading
({
title
:
'加载中'
,
});
getShopAndProdPage
(
params
).
then
((
res
)
=>
{
xma
.
hideLoading
();
total
=
res
.
data
.
total
;
res
.
data
.
records
.
forEach
((
item
)
=>
{
item
.
pic
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
item
.
shopLogo
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
shopLogo
;
});
console
.
log
(
'优惠券'
,
res
);
listData
.
value
=
[...
listData
.
value
,
...
res
.
data
.
records
];
});
};
onPullDownRefresh
(()
=>
{
getCoupons
();
getShop
();
});
onReachBottom
(()
=>
{
if
(
listData
.
value
.
length
<
total
)
{
params
.
current
++
;
getShop
();
return
;
}
show
.
value
=
true
;
});
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -29,19 +136,126 @@ page {
...
@@ -29,19 +136,126 @@ page {
color
:
#333333
;
color
:
#333333
;
font-weight
:
bold
;
font-weight
:
bold
;
background
:
white
;
background
:
white
;
position
:
sticky
;
top
:
0
;
z-index
:
99
;
.tab
{
.tab
{
display
:
inline-block
;
display
:
inline-block
;
margin-right
:
40rpx
;
margin-right
:
40rpx
;
}
}
.light
{
color
:
#f12a2a
;
}
}
}
.itemBox
{
.itemBox
{
padding
:
0
23rpx
;
padding
:
0
23rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
margin-top
:
20rpx
;
margin-top
:
20rpx
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
.item
{
.item
{
width
:
341rpx
;
width
:
341rpx
;
height
:
674rpx
;
//
height: 674rpx;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
margin-bottom
:
18rpx
;
box-sizing
:
border-box
;
padding-bottom
:
20rpx
;
.commodity
{
width
:
341rpx
;
height
:
401rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
}
.describe
{
padding
:
0
12rpx
;
box-sizing
:
border-box
;
.title
{
font-weight
:
bold
;
color
:
#333333
;
font-size
:
26rpx
;
font-family
:
PingFang
SC
,
PingFang
SC
;
}
.oneBox
{
display
:
flex
;
align-items
:
end
;
margin
:
20rpx
0
;
.price
{
font-weight
:
bold
;
color
:
#f12a2a
;
font-size
:
28rpx
;
}
.afterTheCoupon
{
border-radius
:
21rpx
21rpx
21rpx
21rpx
;
// height: 41rpx;
text-align
:
center
;
padding
:
0
10rpx
;
background
:
#f12a2a
;
margin-left
:
20rpx
;
display
:
flex
;
align-items
:
center
;
.afterTheCoupon1
{
color
:
#ffffff
;
font-size
:
20rpx
;
}
.afterTheCoupon2
{
color
:
#ffffff
;
font-size
:
36rpx
;
}
}
}
.twoBox
{
display
:
flex
;
align-items
:
center
;
.coupon
{
text-align
:
center
;
height
:
32rpx
;
font-size
:
22rpx
;
line-height
:
32rpx
;
min-width
:
73rpx
;
color
:
#ffffff
;
border-radius
:
6rpx
6rpx
6rpx
6rpx
;
background
:
linear-gradient
(
90deg
,
#ff4d33
0%
,
#ff1d2e
100%
);
}
.discounted
{
font-size
:
20rpx
;
min-width
:
136rpx
;
height
:
28rpx
;
color
:
#f12a2a
;
font-weight
:
400
;
background
:
#feebf0
;
border-radius
:
6rpx
6rpx
6rpx
6rpx
;
line-height
:
28rpx
;
text-align
:
center
;
}
}
.threeBox
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
13rpx
;
.fullReduction
{
font-size
:
20rpx
;
font-family
:
PingFang
SC
,
PingFang
SC
;
font-weight
:
400
;
color
:
#f12a2a
;
}
.receive
{
background
:
linear-gradient
(
90deg
,
#ff4d33
0%
,
#ff1d2e
100%
);
border-radius
:
20rpx
20rpx
20rpx
20rpx
;
height
:
35rpx
;
width
:
81rpx
;
text-align
:
center
;
line-height
:
35rpx
;
color
:
#ffffff
;
font-size
:
24rpx
;
}
}
}
}
}
}
}
}
}
...
...
src/pages/index/foodClassification.vue
View file @
66866a63
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
<view
class=
"bootom"
>
<view
class=
"bootom"
>
<view
class=
"bootom-top"
>
<view
class=
"bootom-top"
>
<view
class=
"option"
@
tap=
"locationFiltering(0)"
>
<view
class=
"option"
@
tap=
"locationFiltering(0)"
>
<text
:class=
"
{ rotate: rotate }">全部
烧烤烤肉
</text>
<text
:class=
"
{ rotate: rotate }">全部
{{
categoryNames
}}
</text>
<wd-icon
<wd-icon
:class=
"
{ rotate: rotate }"
:class=
"
{ rotate: rotate }"
name="fill-arrow-down"
name="fill-arrow-down"
...
@@ -117,6 +117,7 @@ const isLoadReachBottom = ref(null);
...
@@ -117,6 +117,7 @@ const isLoadReachBottom = ref(null);
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
business
=
reactive
([
'优选商家'
,
'超值半价'
,
'今日可订'
,
'经典单人'
]);
const
business
=
reactive
([
'优选商家'
,
'超值半价'
,
'今日可订'
,
'经典单人'
]);
const
active
=
ref
(
null
);
const
active
=
ref
(
null
);
const
categoryNames
=
ref
(
''
);
const
categoryData
=
ref
([]);
const
categoryData
=
ref
([]);
const
rotate
=
ref
(
false
);
const
rotate
=
ref
(
false
);
const
rotate2
=
ref
(
false
);
const
rotate2
=
ref
(
false
);
...
@@ -134,16 +135,15 @@ const params = ref({
...
@@ -134,16 +135,15 @@ const params = ref({
});
});
const
pics
=
ref
(
null
);
const
pics
=
ref
(
null
);
onLoad
((
option
)
=>
{
onLoad
((
option
)
=>
{
const
{
parentId
,
pic
}
=
option
;
const
{
parentId
,
pic
,
categoryName
}
=
option
;
categoryNames
.
value
=
categoryName
;
categoryId
.
value
=
parentId
;
categoryId
.
value
=
parentId
;
params
.
value
.
categoryId
=
[
parentId
];
pics
.
value
=
pic
;
pics
.
value
=
pic
;
query
(
parentId
);
query
(
parentId
);
prodSpecialFn
();
prodSpecialFn
();
});
onMounted
(()
=>
{
getLocationFn
().
then
((
res
)
=>
{
getLocationFn
().
then
((
res
)
=>
{
const
{
lat
,
lon
}
=
res
;
getMerchantList
();
getMerchantList
(
lat
,
lon
);
});
});
});
});
// distance参数来源
// distance参数来源
...
@@ -238,7 +238,7 @@ function jumpProductDetails(prodId) {
...
@@ -238,7 +238,7 @@ function jumpProductDetails(prodId) {
const
prodSpecialFn
=
()
=>
{
const
prodSpecialFn
=
()
=>
{
prodSpecial
({
categoryId
:
categoryId
.
value
}).
then
((
res
)
=>
{
prodSpecial
({
categoryId
:
categoryId
.
value
}).
then
((
res
)
=>
{
res
.
data
.
data
=
res
.
data
.
data
.
map
((
el
)
=>
{
res
.
data
.
data
=
res
.
data
.
data
.
map
((
el
)
=>
{
if
(
el
.
labels
)
{
if
(
el
.
labels
&&
el
.
labels
!==
''
)
{
el
.
labels
=
el
.
labels
.
split
(
','
);
el
.
labels
=
el
.
labels
.
split
(
','
);
}
}
return
el
;
return
el
;
...
@@ -310,6 +310,8 @@ function getLocationFn() {
...
@@ -310,6 +310,8 @@ function getLocationFn() {
type
:
'wgs84'
,
type
:
'wgs84'
,
isHighAccuracy
:
true
,
isHighAccuracy
:
true
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
params
.
value
.
lat
=
res
.
latitude
;
params
.
value
.
lon
=
res
.
longitude
;
// 经纬度
// 经纬度
resolve
({
lat
:
res
.
latitude
,
lon
:
res
.
longitude
});
resolve
({
lat
:
res
.
latitude
,
lon
:
res
.
longitude
});
},
},
...
@@ -440,10 +442,14 @@ page {
...
@@ -440,10 +442,14 @@ page {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin-left
:
auto
;
margin-left
:
auto
;
margin-right
:
20rpx
;
margin-right
:
20rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.text3
{
.text3
{
font-size
:
20rpx
;
font-size
:
20rpx
;
color
:
#fa5151
;
color
:
#fa5151
;
line-height
:
47rpx
;
line-height
:
47rpx
;
text-align
:
center
;
margin-left
:
14rpx
;
margin-left
:
14rpx
;
}
}
.qiang
{
.qiang
{
...
...
src/pages/index/index.vue
View file @
66866a63
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<view
class=
"classification"
>
<view
class=
"classification"
>
<view
class=
"classification-top"
>
<view
class=
"classification-top"
>
<view
<view
@
tap=
"jingang(item.categoryId, item.pic)"
@
tap=
"jingang(item.categoryId, item.pic
, item.categoryName
)"
class=
"choice"
class=
"choice"
v-for=
"(item, index) in classificationT"
v-for=
"(item, index) in classificationT"
:key=
"index"
:key=
"index"
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</view>
</view>
<view
class=
"classification-bottom"
>
<view
class=
"classification-bottom"
>
<view
<view
@
tap=
"jingang(item.categoryId, item.pic)"
@
tap=
"jingang(item.categoryId, item.pic
, item.categoryName
)"
class=
"choice"
class=
"choice"
v-for=
"(item, index) in classificationB"
v-for=
"(item, index) in classificationB"
:key=
"index"
:key=
"index"
...
@@ -138,6 +138,12 @@
...
@@ -138,6 +138,12 @@
<Marketing
/>
<Marketing
/>
<!-- 美食卡片 -->
<!-- 美食卡片 -->
<FoodDetails
:cardData=
"cardData2"
/>
<FoodDetails
:cardData=
"cardData2"
/>
<view
style=
"width: 100%; text-align: center; font-size: 24rpx; margin: 10rpx 0; color: #888989"
v-if=
"show"
>
没有更多啦~
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -167,7 +173,7 @@ const { countInfo, addCount } = useCountStore();
...
@@ -167,7 +173,7 @@ const { countInfo, addCount } = useCountStore();
// 附近美食
// 附近美食
const
foodNearbyData
=
ref
([]);
const
foodNearbyData
=
ref
([]);
const
tabsData
=
ref
([]);
const
tabsData
=
ref
([]);
const
show
=
ref
(
false
);
const
light
=
ref
(
0
);
const
light
=
ref
(
0
);
const
rotate
=
ref
(
false
);
const
rotate
=
ref
(
false
);
const
classificationT
=
ref
([
const
classificationT
=
ref
([
...
@@ -196,6 +202,7 @@ const listParams = {
...
@@ -196,6 +202,7 @@ const listParams = {
lat
:
26.567192352601154
,
lat
:
26.567192352601154
,
};
};
const
coupon
=
ref
([]);
const
coupon
=
ref
([]);
let
total
;
// 轮播图数据
// 轮播图数据
let
lunboData
;
let
lunboData
;
onMounted
(()
=>
{
onMounted
(()
=>
{
...
@@ -306,16 +313,58 @@ const recommendedClassification = () => {
...
@@ -306,16 +313,58 @@ const recommendedClassification = () => {
tabsData
.
value
.
unshift
({
categoryName
:
'推荐'
});
tabsData
.
value
.
unshift
({
categoryName
:
'推荐'
});
});
});
};
};
// 重置数据
const
reset
=
()
=>
{
listParams
.
current
=
1
;
shopCardData
.
value
=
{};
cardData
.
value
=
[];
cardData1
.
value
=
[];
cardData2
.
value
=
[];
show
.
value
=
false
;
};
// 商家列表分页-搜索列表
// 商家列表分页-搜索列表
const
getMerchantList
=
()
=>
{
const
getMerchantList
=
()
=>
{
xma
.
showLoading
({
title
:
'加载中'
,
});
merchantList
(
listParams
).
then
((
res
)
=>
{
xma
.
hideLoading
();
total
=
res
.
data
.
totalElements
;
res
.
data
.
content
.
forEach
((
item
)
=>
{
item
.
shopLogo
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
shopLogo
;
if
(
item
.
evaluationVos
.
length
>
0
)
{
item
.
simpleProds
.
forEach
((
item
)
=>
{
item
.
avatar
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
avatar
;
});
}
if
(
item
.
simpleProds
.
length
>
0
)
{
item
.
simpleProds
.
forEach
((
item
)
=>
{
item
.
pic
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
pic
;
});
}
if
(
item
.
labels
)
{
item
.
labels
=
item
.
labels
.
split
(
','
);
}
});
shopCardData
.
value
=
res
.
data
.
content
[
0
];
cardData
.
value
=
res
.
data
.
content
.
slice
(
1
,
3
);
cardData1
.
value
=
res
.
data
.
content
.
slice
(
3
,
5
);
cardData2
.
value
=
res
.
data
.
content
.
slice
(
5
);
});
};
// 商家列表分页-搜索列表(分页)
const
getMerchantListPaging
=
()
=>
{
// const data = {
// const data = {
// current: 1,
// current: 1,
// size: 10,
// size: 10,
// lon: 106.68650025025502,
// lon: 106.68650025025502,
// lat: 26.567192352601154,
// lat: 26.567192352601154,
// };
// };
xma
.
showLoading
({
title
:
'加载中'
,
});
merchantList
(
listParams
).
then
((
res
)
=>
{
merchantList
(
listParams
).
then
((
res
)
=>
{
console
.
log
(
'商家列表'
,
res
);
xma
.
hideLoading
(
);
res
.
data
.
content
.
forEach
((
item
)
=>
{
res
.
data
.
content
.
forEach
((
item
)
=>
{
item
.
shopLogo
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
shopLogo
;
item
.
shopLogo
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
item
.
shopLogo
;
if
(
item
.
evaluationVos
.
length
>
0
)
{
if
(
item
.
evaluationVos
.
length
>
0
)
{
...
@@ -332,15 +381,13 @@ const getMerchantList = () => {
...
@@ -332,15 +381,13 @@ const getMerchantList = () => {
item
.
labels
=
item
.
labels
.
split
(
','
);
item
.
labels
=
item
.
labels
.
split
(
','
);
}
}
});
});
shopCardData
.
value
=
res
.
data
.
content
[
0
];
cardData2
.
value
=
[...
cardData2
.
value
,
...
res
.
data
.
content
];
cardData
.
value
=
res
.
data
.
content
.
slice
(
1
,
3
);
cardData1
.
value
=
res
.
data
.
content
.
slice
(
3
,
5
);
cardData2
.
value
=
res
.
data
.
content
.
slice
(
5
);
});
});
};
};
// distance参数来源
// distance参数来源
const
nearby
=
(
distance
)
=>
{
const
nearby
=
(
distance
)
=>
{
console
.
log
(
'distance'
,
distance
);
console
.
log
(
'distance'
,
distance
);
reset
();
if
(
distance
===
0
)
{
if
(
distance
===
0
)
{
delete
listParams
.
distance
;
delete
listParams
.
distance
;
}
else
{
}
else
{
...
@@ -351,6 +398,7 @@ const nearby = (distance) => {
...
@@ -351,6 +398,7 @@ const nearby = (distance) => {
// communityName参数来源
// communityName参数来源
const
popular
=
(
communityName
)
=>
{
const
popular
=
(
communityName
)
=>
{
console
.
log
(
'communityName'
,
communityName
);
console
.
log
(
'communityName'
,
communityName
);
reset
();
listParams
.
communityName
=
communityName
;
listParams
.
communityName
=
communityName
;
if
(
listParams
.
area
)
{
if
(
listParams
.
area
)
{
delete
listParams
.
area
;
delete
listParams
.
area
;
...
@@ -360,6 +408,7 @@ const popular = (communityName) => {
...
@@ -360,6 +408,7 @@ const popular = (communityName) => {
// area参数来源
// area参数来源
const
region
=
(
area
)
=>
{
const
region
=
(
area
)
=>
{
console
.
log
(
'area'
,
area
);
console
.
log
(
'area'
,
area
);
reset
();
listParams
.
area
=
area
;
listParams
.
area
=
area
;
if
(
listParams
.
communityName
)
{
if
(
listParams
.
communityName
)
{
delete
listParams
.
communityName
;
delete
listParams
.
communityName
;
...
@@ -368,6 +417,7 @@ const region = (area) => {
...
@@ -368,6 +417,7 @@ const region = (area) => {
};
};
// tabs
// tabs
const
choice
=
(
index
,
categoryId
)
=>
{
const
choice
=
(
index
,
categoryId
)
=>
{
reset
();
light
.
value
=
index
;
light
.
value
=
index
;
listParams
.
categoryIds
=
[
categoryId
];
listParams
.
categoryIds
=
[
categoryId
];
if
(
index
===
0
)
{
if
(
index
===
0
)
{
...
@@ -376,7 +426,7 @@ const choice = (index, categoryId) => {
...
@@ -376,7 +426,7 @@ const choice = (index, categoryId) => {
getMerchantList
();
getMerchantList
();
};
};
// 金刚区分类选择
// 金刚区分类选择
const
jingang
=
(
id
,
pic
)
=>
{
const
jingang
=
(
id
,
pic
,
categoryName
)
=>
{
// switch (index) {
// switch (index) {
// case 0:
// case 0:
// xma.navigateTo({
// xma.navigateTo({
...
@@ -390,7 +440,7 @@ const jingang = (id, pic) => {
...
@@ -390,7 +440,7 @@ const jingang = (id, pic) => {
// xma.navigateTo({});
// xma.navigateTo({});
// }
// }
xma
.
navigateTo
({
xma
.
navigateTo
({
url
:
`/pages/index/foodClassification?parentId=
${
id
}
&pic=
${
pic
}
&page=index`
,
url
:
`/pages/index/foodClassification?parentId=
${
id
}
&pic=
${
pic
}
&page=index
&categoryName=
${
categoryName
}
`
,
});
});
};
};
const
locationFiltering
=
()
=>
{
const
locationFiltering
=
()
=>
{
...
@@ -398,22 +448,22 @@ const locationFiltering = () => {
...
@@ -398,22 +448,22 @@ const locationFiltering = () => {
};
};
const
handleClick
=
(
e
)
=>
{
const
handleClick
=
(
e
)
=>
{
const
index
=
e
.
index
;
const
index
=
e
.
index
;
if
(
index
===
0
)
{
xma
.
navigateTo
({
xma
.
navigateTo
({
url
:
lunboData
[
index
].
link
,
url
:
'/pages/index/listFood?type=1'
,
});
});
}
};
};
const
onChange
=
(
e
)
=>
{
const
onChange
=
(
e
)
=>
{
// console.log(e);
// console.log(e);
};
};
// function toUIComponentsDoc() {
// 触底加载
// window.open('https://wot-design-uni.netlify.app/component/button.html');
onReachBottom
(()
=>
{
// }
if
(
cardData2
.
value
.
length
+
5
<
total
)
{
listParams
.
current
++
;
// function onHandleClick() {
getMerchantListPaging
();
// addCount();
return
;
// }
}
show
.
value
=
true
;
});
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -665,7 +715,9 @@ page {
...
@@ -665,7 +715,9 @@ page {
box-shadow
:
0rpx
4rpx
16rpx
0rpx
rgba
(
0
,
0
,
0
,
0
.08
);
box-shadow
:
0rpx
4rpx
16rpx
0rpx
rgba
(
0
,
0
,
0
,
0
.08
);
margin
:
0
auto
;
margin
:
0
auto
;
margin-top
:
10rpx
;
margin-top
:
10rpx
;
position
:
relative
;
position
:
sticky
;
top
:
0
;
z-index
:
99
;
uni-scroll-view
.
uni-scroll-view
:
:-
webkit-scrollbar
{
uni-scroll-view
.
uni-scroll-view
:
:-
webkit-scrollbar
{
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display
:
none
;
display
:
none
;
...
...
src/pages/index/listFood.vue
View file @
66866a63
...
@@ -64,7 +64,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue';
...
@@ -64,7 +64,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue';
import
Classification
from
'../../components/index/Classification.vue'
;
import
Classification
from
'../../components/index/Classification.vue'
;
import
Position
from
'../../components/index/Position.vue'
;
import
Position
from
'../../components/index/Position.vue'
;
import
Sort
from
'../../components/index/Sort.vue'
;
import
Sort
from
'../../components/index/Sort.vue'
;
import
{
merchantList
,
getByParentId
}
from
'../../api/index'
;
import
{
merchantList
,
getByParentId
,
getByType
}
from
'../../api/index'
;
const
business
=
reactive
([
'优选商家'
,
'超值半价'
,
'今日可订'
,
'经典单人'
]);
const
business
=
reactive
([
'优选商家'
,
'超值半价'
,
'今日可订'
,
'经典单人'
]);
const
active
=
ref
(
null
);
const
active
=
ref
(
null
);
...
@@ -87,19 +87,12 @@ onMounted(() => {
...
@@ -87,19 +87,12 @@ onMounted(() => {
});
});
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
const
{
type
}
=
options
;
const
{
categoryId
,
place
}
=
options
;
switch
(
type
)
{
paramsId
.
parentId
=
categoryId
;
case
'1'
:
getByParentIdData
();
topBg
.
value
=
'url(../../static/index/taste.png)'
;
getByType
({
place
}).
then
((
res
)
=>
{
paramsId
.
parentId
=
'3262'
;
topBg
.
value
=
`url(
${
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
res
.
data
[
0
].
imgUrl
}
)`
;
getByParentIdData
();
});
break
;
case
'2'
:
topBg
.
value
=
'url(../../static/index/foodBg.png)'
;
paramsId
.
parentId
=
'3263'
;
getByParentIdData
();
break
;
}
});
});
// distance参数来源
// distance参数来源
const
nearby
=
(
distance
)
=>
{
const
nearby
=
(
distance
)
=>
{
...
@@ -212,7 +205,8 @@ page {
...
@@ -212,7 +205,8 @@ page {
}
}
.head
{
.head
{
width
:
100%
;
width
:
100%
;
height
:
480rpx
;
margin-bottom
:
10rpx
;
// height: 480rpx;
.top
{
.top
{
height
:
356rpx
;
height
:
356rpx
;
// background: url('../../static/index/taste.png');
// background: url('../../static/index/taste.png');
...
@@ -225,7 +219,8 @@ page {
...
@@ -225,7 +219,8 @@ page {
}
}
}
}
.bootom
{
.bootom
{
height
:
124rpx
;
// height: 124rpx;
height
:
80rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
space-around
;
justify-content
:
space-around
;
...
...
src/pages/packageDetails/packageDetails.vue
View file @
66866a63
...
@@ -52,11 +52,12 @@
...
@@ -52,11 +52,12 @@
<view
v-if=
"item.numState === 0"
class=
"btn"
@
click=
"getCoupon(item)"
>
<view
v-if=
"item.numState === 0"
class=
"btn"
@
click=
"getCoupon(item)"
>
立即领取
立即领取
</view>
</view>
<i
<
!--
<
i
v-else
v-else
class=
"iconfont icon-lianhe40"
class=
"iconfont icon-lianhe40"
style=
"font-size: 120rpx; color: #efefef"
style=
"font-size: 120rpx; color: #efefef"
></i>
></i>
-->
<image
v-else
class=
"ylq-icon"
src=
"@/static/shop/yl.png"
></image>
</view>
</view>
</view>
</view>
<view
class=
"foot"
>
<view
class=
"foot"
>
...
@@ -121,10 +122,16 @@
...
@@ -121,10 +122,16 @@
<view
class=
"yh"
>
<view
class=
"yh"
>
<text
class=
"yh-name"
>
优惠:
</text>
<text
class=
"yh-name"
>
优惠:
</text>
<view
class=
"bt-icon"
>
<view
class=
"bt-icon"
>
<image
src=
"@/static/shop/bt-icon.png"
></image>
<
!--
<
image
src=
"@/static/shop/bt-icon.png"
></image>
<text
class=
"yh-name lj"
>
<text
class=
"yh-name lj"
>
满
{{
productCoupons
[
0
].
thresholdAmount
}}
减
{{
productCoupons
[
0
].
discountValue
}}
满
{{
productCoupons
[
0
].
thresholdAmount
}}
减
{{
productCoupons
[
0
].
discountValue
}}
</text>
</text>
-->
<view
class=
"subsidy"
>
<image
mode=
"aspectFill"
src=
"@/static/shop/subsidy.png"
/>
<text
class=
"multi-line"
>
满
{{
productCoupons
[
0
].
thresholdAmount
}}
减
{{
productCoupons
[
0
].
discountValue
}}
</text>
</view>
</view>
</view>
<view
class=
"ylq-icon"
@
click=
"showpopup = true"
>
<view
class=
"ylq-icon"
@
click=
"showpopup = true"
>
{{
productCoupons
[
0
].
numState
===
0
?
'未领取'
:
'已领取'
}}
{{
productCoupons
[
0
].
numState
===
0
?
'未领取'
:
'已领取'
}}
...
@@ -602,7 +609,7 @@ page {
...
@@ -602,7 +609,7 @@ page {
.headbox
{
.headbox
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
end
;
align-items
:
center
;
height
:
50rpx
;
height
:
50rpx
;
.time
{
.time
{
...
@@ -611,6 +618,10 @@ page {
...
@@ -611,6 +618,10 @@ page {
color
:
#999999
;
color
:
#999999
;
line-height
:
20rpx
;
line-height
:
20rpx
;
}
}
.ylq-icon
{
width
:
64
*
2rpx
;
height
:
64
*
2rpx
;
}
.btn
{
.btn
{
padding
:
20rpx
;
padding
:
20rpx
;
...
@@ -634,7 +645,7 @@ page {
...
@@ -634,7 +645,7 @@ page {
gap
:
14rpx
;
gap
:
14rpx
;
.line
{
.line
{
border-top
:
2rpx
solid
#f2f2f2
;
//
border-top: 2rpx solid #f2f2f2;
}
}
.footbox
{
.footbox
{
...
@@ -793,9 +804,34 @@ page {
...
@@ -793,9 +804,34 @@ page {
position
:
absolute
;
position
:
absolute
;
right
:
14rpx
;
right
:
14rpx
;
height
:
11
*
2rpx
;
height
:
11
*
2rpx
;
text-align
:
center
;
line-height
:
22rpx
;
line-height
:
22rpx
;
top
:
calc
(
50%
-
11rpx
);
top
:
calc
(
50%
-
11rpx
);
}
}
.subsidy
{
width
:
144
*
2rpx
;
height
:
22
*
2rpx
;
position
:
relative
;
image
{
position
:
absolute
;
width
:
65
*
2rpx
;
height
:
22
*
2rpx
;
top
:
0
;
left
:
0
;
}
text
{
border
:
1rpx
solid
#fa5151
;
right
:
14rpx
;
height
:
20
*
2rpx
;
position
:
absolute
;
font-size
:
11
*
2rpx
;
line-height
:
22
*
2rpx
;
top
:
0
;
text-align
:
center
;
left
:
65
*
2rpx
;
color
:
#fa5151
;
}
}
}
}
}
}
.ylq-icon
{
.ylq-icon
{
...
...
src/pages/shop/confirmOrder.vue
View file @
66866a63
...
@@ -172,28 +172,36 @@ const orderInfo = ref({});
...
@@ -172,28 +172,36 @@ const orderInfo = ref({});
const
activeCouponInfo
=
ref
({});
const
activeCouponInfo
=
ref
({});
const
activeCouponId
=
ref
(
''
);
const
activeCouponId
=
ref
(
''
);
const
outTradeNos
=
ref
(
null
);
const
outTradeNos
=
ref
(
null
);
const
prodIds
=
ref
(
null
);
const
skuIds
=
ref
(
null
);
// 商品优惠券
// 商品优惠券
const
productCoupons
=
ref
([]);
const
productCoupons
=
ref
([]);
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
const
{
prodId
,
skuId
}
=
options
;
const
{
prodId
,
skuId
}
=
options
;
prodIds
.
value
=
prodId
;
skuIds
.
value
=
skuId
;
groupBuyConfirmFn
(
prodId
,
skuId
);
groupBuyConfirmFn
(
prodId
,
skuId
);
});
});
onShow
(()
=>
{
onShow
(()
=>
{
if
(
outTradeNos
.
value
)
{
if
(
outTradeNos
.
value
)
{
// 查询订单状态决定是否支付
// 查询订单状态决定是否支付
getOrderDetail
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
getOrderDetail
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
switch
(
res
.
data
.
s
tatus
)
{
switch
(
res
.
data
.
baseOrder
.
subS
tatus
)
{
case
'1'
:
case
'1'
:
xma
.
showToast
({
xma
.
showToast
({
title
:
'支付失败'
,
title
:
'支付失败'
,
icon
:
'error'
,
icon
:
'error'
,
duration
:
2000
,
duration
:
2000
,
success
()
{
groupBuyConfirmFn
(
prodIds
.
value
,
skuIds
.
value
);
},
});
});
break
;
break
;
case
'2'
:
case
'2'
:
xma
.
redirectTo
({
xma
.
redirectTo
({
url
:
`/pages/shop/paymentSuccessful?outTradeNos=
${
outTradeNos
.
value
}
`
,
url
:
`/pages/shop/paymentSuccessful?outTradeNos=
${
outTradeNos
.
value
}
`
,
});
});
break
;
case
'3'
:
case
'3'
:
xma
.
redirectTo
({
xma
.
redirectTo
({
url
:
`/pages/shop/paymentSuccessful?outTradeNos=
${
outTradeNos
.
value
}
`
,
url
:
`/pages/shop/paymentSuccessful?outTradeNos=
${
outTradeNos
.
value
}
`
,
...
@@ -268,10 +276,24 @@ function submitOrder() {
...
@@ -268,10 +276,24 @@ function submitOrder() {
};
};
groupBuyCreate
(
params
).
then
((
res
)
=>
{
groupBuyCreate
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
let
timeout
=
null
;
const
start
=
new
Date
().
getTime
();
const
{
paymentUrl
,
outTradeNo
}
=
res
.
data
.
result
;
const
{
paymentUrl
,
outTradeNo
}
=
res
.
data
.
result
;
console
.
log
(
'merchantNo'
,
outTradeNo
);
console
.
log
(
'merchantNo'
,
outTradeNo
);
outTradeNos
.
value
=
outTradeNo
;
outTradeNos
.
value
=
outTradeNo
;
window
.
location
.
href
=
paymentUrl
;
window
.
location
.
href
=
paymentUrl
;
timeout
=
setTimeout
(
function
()
{
const
end
=
new
Date
().
getTime
();
// 如果超时未打开应用,则假设未安装
if
(
end
-
start
<
1000
)
{
xma
.
showToast
({
title
:
'未安装App'
,
icon
:
'none'
,
});
}
},
1500
);
// window.open(paymentUrl);
// window.open(paymentUrl);
// plus.runtime.openURL(paymentUrl);
// plus.runtime.openURL(paymentUrl);
}
}
...
...
src/pages/shop/paymentSuccessful.vue
View file @
66866a63
...
@@ -31,26 +31,33 @@
...
@@ -31,26 +31,33 @@
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
{
getOrderDetail
,
getShopDetail
,
getProdDetail
}
from
'@/api/order'
;
import
{
getOrderDetail
,
getShopDetail
,
getProdDetail
}
from
'@/api/order'
;
import
QRCode
from
'qrcode'
;
import
QRCode
from
'qrcode'
;
const
myOutTradeNos
=
ref
(
''
);
/**
/**
* 获取订单详情
* 获取订单详情
*/
*/
const
orderDetail
=
ref
();
const
orderDetail
=
ref
();
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
const
{
outTradeNos
}
=
options
;
const
{
outTradeNos
}
=
options
;
getOrderDetailFn
(
'NEONO-2024080509591318964'
);
myOutTradeNos
.
value
=
outTradeNos
;
getOrderDetailFn
(
outTradeNos
);
});
});
function
getOrderDetailFn
(
orderNumber
)
{
function
getOrderDetailFn
(
orderNumber
)
{
getOrderDetail
({
orderNumber
}).
then
((
res
)
=>
{
getOrderDetail
({
orderNumber
}).
then
((
res
)
=>
{
orderDetail
.
value
=
res
.
data
;
orderDetail
.
value
=
res
.
data
.
baseOrder
;
const
outTradeNo
=
res
.
data
.
orderNumber
;
orderDetail
.
value
.
orderItems
=
res
.
data
.
orderItems
;
orderDetail
.
value
.
orderStore
=
res
.
data
.
orderStore
;
const
outTradeNo
=
res
.
data
.
baseOrder
.
orderNumber
;
const
indexOfDash
=
outTradeNo
.
indexOf
(
'-'
);
const
indexOfDash
=
outTradeNo
.
indexOf
(
'-'
);
if
(
indexOfDash
!==
-
1
)
{
if
(
indexOfDash
!==
-
1
)
{
res
.
data
.
orderNumber
=
outTradeNo
.
substring
(
indexOfDash
+
1
);
res
.
data
.
baseOrder
.
orderNumber
=
outTradeNo
.
substring
(
indexOfDash
+
1
);
}
else
{
}
else
{
console
.
log
(
`订单编号
${
outTradeNo
}
中没有找到 "-" 符号。`
);
console
.
log
(
`订单编号
${
outTradeNo
}
中没有找到 "-" 符号。`
);
}
}
if
(
orderDetail
.
value
.
status
===
'2'
||
orderDetail
.
value
.
status
===
'3'
)
{
if
(
codeDetail
(
orderDetail
.
value
.
orderNumber
);
orderDetail
.
value
.
orderStore
.
status
===
'2'
||
orderDetail
.
value
.
orderStore
.
status
===
'3'
)
{
codeDetail
(
orderNumber
);
}
}
getProductDetail
(
orderDetail
.
value
.
orderItems
[
0
].
prodId
);
getProductDetail
(
orderDetail
.
value
.
orderItems
[
0
].
prodId
);
getShopMailDetail
(
orderDetail
.
value
.
shopId
);
getShopMailDetail
(
orderDetail
.
value
.
shopId
);
...
...
src/pages/shop/shop.vue
View file @
66866a63
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
<view
class=
"subsidy-content"
@
click=
"jumpPage"
>
<view
class=
"subsidy-content"
@
click=
"jumpPage"
>
<view
class=
"subsidy"
>
<view
class=
"subsidy"
>
<image
mode=
"aspectFill"
src=
"@/static/shop/subsidy.png"
/>
<image
mode=
"aspectFill"
src=
"@/static/shop/subsidy.png"
/>
<text>
{{
merchantCoupons
.
activityName
}}
</text>
<text
class=
"multi-line"
>
{{
merchantCoupons
.
activityName
}}
</text>
</view>
</view>
<view
class=
"more"
>
<view
class=
"more"
>
<text>
更多
</text>
<text>
更多
</text>
...
@@ -215,6 +215,19 @@
...
@@ -215,6 +215,19 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
style=
"
width: 100%;
text-align: center;
font-size: 24rpx;
margin-top: 10rpx;
color: #888989;
"
v-if=
"commentList.length === 0"
>
没有更多啦~
</view>
<view
@
tap=
"viewAll"
v-if=
"commentList.length
<
commentTotal
"
class=
"u-more"
>
<view
@
tap=
"viewAll"
v-if=
"commentList.length
<
commentTotal
"
class=
"u-more"
>
查看全部
{{
commentTotal
}}
条评价
查看全部
{{
commentTotal
}}
条评价
</view>
</view>
...
@@ -261,7 +274,7 @@
...
@@ -261,7 +274,7 @@
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
<view
class=
"tj-more"
>
<view
class=
"tj-more"
@
click=
"jumpListPage"
>
<text>
查看更多
</text>
<text>
查看更多
</text>
<wd-icon
name=
"arrow-right"
size=
"16px"
></wd-icon>
<wd-icon
name=
"arrow-right"
size=
"16px"
></wd-icon>
</view>
</view>
...
@@ -341,6 +354,11 @@ const handleClick = (e) => {
...
@@ -341,6 +354,11 @@ const handleClick = (e) => {
const
imgSrc
=
shopSwiperList
.
value
[
index
];
const
imgSrc
=
shopSwiperList
.
value
[
index
];
previewImage
(
imgSrc
);
previewImage
(
imgSrc
);
};
};
function
jumpListPage
()
{
xma
.
navigateTo
({
url
:
`/pages/index/foodClassification?parentId=
${
activeId
.
value
}
&page=shop&pic=''`
,
});
}
const
onChange
=
(
e
)
=>
{};
const
onChange
=
(
e
)
=>
{};
function
scroll
(
e
)
{
function
scroll
(
e
)
{
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
...
@@ -354,7 +372,7 @@ function peripheryRecomFn() {
...
@@ -354,7 +372,7 @@ function peripheryRecomFn() {
const
lat
=
currentLatitudeAndLongitude
.
value
.
latitude
;
const
lat
=
currentLatitudeAndLongitude
.
value
.
latitude
;
// 经度
// 经度
const
lon
=
currentLatitudeAndLongitude
.
value
.
longitude
;
const
lon
=
currentLatitudeAndLongitude
.
value
.
longitude
;
peripheryRecom
({
lat
,
lon
,
distance
:
20
0
}).
then
((
res
)
=>
{
peripheryRecom
({
lat
,
lon
,
distance
:
1
0
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
recommendedTypesOfPeripherals
.
value
=
res
.
data
;
recommendedTypesOfPeripherals
.
value
=
res
.
data
;
const
id
=
recommendedTypesOfPeripherals
.
value
[
0
].
categoryId
;
const
id
=
recommendedTypesOfPeripherals
.
value
[
0
].
categoryId
;
...
@@ -370,8 +388,12 @@ function sgyrddShopPageFn(categoryIds, lat, lon) {
...
@@ -370,8 +388,12 @@ function sgyrddShopPageFn(categoryIds, lat, lon) {
lat
,
lat
,
lon
,
lon
,
categoryIds
,
categoryIds
,
distance
:
20
0
,
distance
:
1
0
,
};
};
xma
.
showLoading
({
title
:
'加载中'
,
mask
:
true
,
});
sgyrddShopPage
(
params
).
then
((
res
)
=>
{
sgyrddShopPage
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
res
.
data
.
content
=
res
.
data
.
content
res
.
data
.
content
=
res
.
data
.
content
...
@@ -385,6 +407,7 @@ function sgyrddShopPageFn(categoryIds, lat, lon) {
...
@@ -385,6 +407,7 @@ function sgyrddShopPageFn(categoryIds, lat, lon) {
return
item
!==
''
;
return
item
!==
''
;
});
});
recommendedListOfPeripherals
.
value
=
res
.
data
.
content
;
recommendedListOfPeripherals
.
value
=
res
.
data
.
content
;
xma
.
hideLoading
();
}
}
});
});
}
}
...
@@ -449,7 +472,9 @@ const getStoreInformationFn = (id) => {
...
@@ -449,7 +472,9 @@ const getStoreInformationFn = (id) => {
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
shopInfo
.
value
=
res
.
data
.
shop
;
shopInfo
.
value
=
res
.
data
.
shop
;
shopSwiperList
.
value
=
res
.
data
.
imgList
.
map
((
item
)
=>
imgUrl
+
item
.
imgUrl
);
shopSwiperList
.
value
=
res
.
data
.
imgList
.
map
((
item
)
=>
imgUrl
+
item
.
imgUrl
);
shopInfo
.
value
.
tagList
=
res
.
data
.
shop
.
labels
.
split
(
','
);
if
(
res
.
data
.
shop
.
labels
&&
res
.
data
.
shop
.
labels
!==
''
)
{
shopInfo
.
value
.
tagList
=
res
.
data
.
shop
.
labels
.
split
(
','
);
}
currentLatitudeAndLongitude
.
value
.
latitude
=
res
.
data
.
shop
.
location
.
lat
;
currentLatitudeAndLongitude
.
value
.
latitude
=
res
.
data
.
shop
.
location
.
lat
;
currentLatitudeAndLongitude
.
value
.
longitude
=
res
.
data
.
shop
.
location
.
lon
;
currentLatitudeAndLongitude
.
value
.
longitude
=
res
.
data
.
shop
.
location
.
lon
;
resolve
();
resolve
();
...
@@ -590,6 +615,10 @@ const giveTheThumbs = (item, index) => {
...
@@ -590,6 +615,10 @@ const giveTheThumbs = (item, index) => {
* 查看全部评论
* 查看全部评论
*/
*/
const
viewAll
=
()
=>
{
const
viewAll
=
()
=>
{
xma
.
showLoading
({
title
:
'加载中...'
,
mask
:
false
,
});
getEvaluationPage
({
getEvaluationPage
({
current
:
1
,
current
:
1
,
size
:
commentTotal
.
value
,
size
:
commentTotal
.
value
,
...
@@ -599,6 +628,7 @@ const viewAll = () => {
...
@@ -599,6 +628,7 @@ const viewAll = () => {
commentList
.
value
=
res
.
data
.
records
.
map
((
item
)
=>
{
commentList
.
value
=
res
.
data
.
records
.
map
((
item
)
=>
{
item
.
avatar
=
addImgUrlPrefix
(
imgUrl
,
item
.
avatar
);
item
.
avatar
=
addImgUrlPrefix
(
imgUrl
,
item
.
avatar
);
item
.
images
=
addImgUrlPrefixToImages
(
imgUrl
,
item
.
images
);
item
.
images
=
addImgUrlPrefixToImages
(
imgUrl
,
item
.
images
);
xma
.
hideLoading
();
return
item
;
return
item
;
});
});
}
}
...
@@ -853,18 +883,21 @@ page {
...
@@ -853,18 +883,21 @@ page {
position
:
relative
;
position
:
relative
;
image
{
image
{
position
:
absolute
;
position
:
absolute
;
width
:
14
4
*
2rpx
;
width
:
8
4
*
2rpx
;
height
:
54
*
2rpx
;
height
:
54
*
2rpx
;
top
:
calc
(
50%
-
54rpx
);
top
:
calc
(
50%
-
54rpx
);
left
:
0
;
left
:
0
;
}
}
text
{
text
{
border
:
1rpx
solid
#fa5151
;
right
:
14rpx
;
right
:
14rpx
;
height
:
28
*
2rpx
;
position
:
absolute
;
position
:
absolute
;
font-size
:
11
*
2rpx
;
font-size
:
11
*
2rpx
;
line-height
:
54
*
2rpx
;
line-height
:
28
*
2rpx
;
height
:
54
*
2rpx
;
top
:
calc
(
50%
-
28rpx
);
top
:
calc
(
50%
-
54rpx
);
text-align
:
center
;
left
:
84
*
2rpx
;
color
:
#fa5151
;
color
:
#fa5151
;
}
}
}
}
...
...
src/static/shop/subsidy.png
View replaced file @
da0d1b44
View file @
66866a63
9.04 KB
|
W:
|
H:
8.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/static/shop/yl.png
0 → 100644
View file @
66866a63
5.61 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