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
855d089f
Commit
855d089f
authored
Aug 06, 2024
by
刘玉宏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
8ffa9ba7
d200caea
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1543 additions
and
246 deletions
+1543
-246
App.vue
src/App.vue
+15
-6
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
order.js
src/api/order.js
+19
-2
pages.json
src/pages.json
+5
-3
coupon.vue
src/pages/index/coupon.vue
+244
-3
foodClassification.vue
src/pages/index/foodClassification.vue
+14
-7
index.vue
src/pages/index/index.vue
+81
-23
listFood.vue
src/pages/index/listFood.vue
+47
-28
afterSales.vue
src/pages/order/afterSales.vue
+227
-12
index.vue
src/pages/order/components/Header/index.vue
+3
-5
detail.vue
src/pages/order/detail.vue
+42
-27
order.vue
src/pages/order/order.vue
+65
-34
refund.vue
src/pages/order/refund.vue
+332
-11
ticketCode.vue
src/pages/order/ticketCode.vue
+11
-8
packageDetails.vue
src/pages/packageDetails/packageDetails.vue
+47
-7
confirmOrder.vue
src/pages/shop/confirmOrder.vue
+23
-2
paymentSuccessful.vue
src/pages/shop/paymentSuccessful.vue
+13
-6
shop.vue
src/pages/shop/shop.vue
+140
-39
index.vue
src/pages/storeEntry/index.vue
+160
-13
ticket.vue
src/pages/ticket/ticket.vue
+23
-8
subsidy.png
src/static/shop/subsidy.png
+0
-0
yl.png
src/static/shop/yl.png
+0
-0
request.js
src/utils/request.js
+1
-0
No files found.
src/App.vue
View file @
855d089f
...
@@ -4,6 +4,9 @@ import { sgyOrderGetStatus } from './api/order';
...
@@ -4,6 +4,9 @@ import { sgyOrderGetStatus } from './api/order';
import
testJson
from
'./static/json/test.json'
;
import
testJson
from
'./static/json/test.json'
;
import
{
getToken
}
from
'./utils/auth'
;
import
{
getToken
}
from
'./utils/auth'
;
import
{
setOrderDic
}
from
'./utils/orderDic'
;
import
{
setOrderDic
}
from
'./utils/orderDic'
;
// beforeMount(() => {
// if (!getToken()) signIn();
// });
onLaunch
(()
=>
{
onLaunch
(()
=>
{
if
(
!
getToken
())
signIn
();
if
(
!
getToken
())
signIn
();
sgyOrderGetStatus
().
then
((
res
)
=>
{
sgyOrderGetStatus
().
then
((
res
)
=>
{
...
@@ -22,12 +25,18 @@ onHide(() => {
...
@@ -22,12 +25,18 @@ onHide(() => {
});
});
// 登录
// 登录
const
signIn
=
()
=>
{
const
signIn
=
()
=>
{
getTokenUser
(
testJson
).
then
((
res
)
=>
{
xma
.
xh
.
getUserProfile
({
const
token
=
res
.
data
.
access_token
;
range
:
[
'ACCOUNT'
,
'MOBILE'
,
'CITIZEN'
],
const
userInfo
=
res
.
data
.
user_info
;
async
success
(
info
)
{
xma
.
setStorageSync
(
'Authorization'
,
token
);
const
info2
=
JSON
.
stringify
(
info
);
xma
.
setStorageSync
(
'userInfo'
,
userInfo
);
getTokenUser
(
info2
).
then
((
res
)
=>
{
console
.
log
(
'登录...'
);
const
token
=
res
.
data
.
access_token
;
const
userInfo
=
res
.
data
.
user_info
;
xma
.
setStorageSync
(
'Authorization'
,
token
);
xma
.
setStorageSync
(
'userInfo'
,
userInfo
);
console
.
log
(
'登录...'
);
});
},
});
});
};
};
</
script
>
</
script
>
...
...
src/Components/index/Classification.vue
View file @
855d089f
...
@@ -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 @
855d089f
...
@@ -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 @
855d089f
...
@@ -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/api/order.js
View file @
855d089f
...
@@ -9,10 +9,10 @@ export function getOrderList(data) {
...
@@ -9,10 +9,10 @@ export function getOrderList(data) {
});
});
}
}
// 订单
列表
接口
// 订单
详情
接口
export
function
getOrderDetail
(
data
)
{
export
function
getOrderDetail
(
data
)
{
return
request
({
return
request
({
url
:
'/sgyrdd/sgyOrder/
groupBuy/
orderInfo'
,
url
:
'/sgyrdd/sgyOrder/orderInfo'
,
method
:
'GET'
,
method
:
'GET'
,
data
,
data
,
});
});
...
@@ -61,6 +61,7 @@ export function repaymentApi(data) {
...
@@ -61,6 +61,7 @@ export function repaymentApi(data) {
data
,
data
,
});
});
}
}
// 查询各类订单状态
// 查询各类订单状态
export
function
sgyOrderGetStatus
(
data
)
{
export
function
sgyOrderGetStatus
(
data
)
{
return
request
({
return
request
({
...
@@ -69,6 +70,15 @@ export function sgyOrderGetStatus(data) {
...
@@ -69,6 +70,15 @@ export function sgyOrderGetStatus(data) {
data
,
data
,
});
});
}
}
// 申请退款applyForARefund
export
function
applyForARefundApi
(
data
)
{
return
request
({
url
:
'/sgyrdd/sgyOrder/afterSales/apply'
,
method
:
'POST'
,
data
,
});
}
// 新增订单评价
// 新增订单评价
export
function
evaluation
(
data
)
{
export
function
evaluation
(
data
)
{
return
request
({
return
request
({
...
@@ -77,3 +87,10 @@ export function evaluation(data) {
...
@@ -77,3 +87,10 @@ export function evaluation(data) {
data
,
data
,
});
});
}
}
export
function
afterSale
(
data
)
{
return
request
({
url
:
'/sgyrdd/sgyOrder/afterSales/getInfo'
,
method
:
'GET'
,
data
,
});
}
src/pages.json
View file @
855d089f
...
@@ -5,11 +5,12 @@
...
@@ -5,11 +5,12 @@
"^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"
:
{
"navigationBarTitleText"
:
"小程序平台"
"navigationBarTitleText"
:
"小程序平台"
,
"navigationStyle"
:
"custom"
}
}
},
},
{
{
...
@@ -96,7 +97,8 @@
...
@@ -96,7 +97,8 @@
{
{
"path"
:
"pages/index/coupon"
,
"path"
:
"pages/index/coupon"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"优惠券详情"
"navigationBarTitleText"
:
"优惠券详情"
,
"enablePullDownRefresh"
:
true
}
}
}
}
,
,
...
...
src/pages/index/coupon.vue
View file @
855d089f
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<wd-icon
name=
"thin-arrow-left"
class=
"icon"
@
tap=
"back"
></wd-icon>
<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"
@
tap=
"toDetail(item.shopId)"
>
<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>
<wd-status-tip
image=
"content"
tip=
"暂无内容"
v-if=
"listData.length === 0"
/>
<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
back
=
()
=>
{
xma
.
navigateBack
({
delta
:
1
,
});
};
const
toDetail
=
(
id
)
=>
{
xma
.
navigateTo
({
url
:
`/pages/ticket/detail?shopId=
${
id
}
`
,
});
};
// 数据重置
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
>
...
@@ -19,9 +142,19 @@ page {
...
@@ -19,9 +142,19 @@ page {
background
:
#f3f3f3
;
background
:
#f3f3f3
;
}
}
.container
{
.container
{
position
:
relative
;
.icon
{
font-size
:
28rpx
;
margin-right
:
40rpx
;
position
:
absolute
;
left
:
30rpx
;
top
:
37rpx
;
z-index
:
999
;
}
.tabs
{
.tabs
{
white-space
:
nowrap
;
white-space
:
nowrap
;
padding
:
0
30rpx
;
padding
:
0
30rpx
;
padding-left
:
80rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
height
:
100rpx
;
height
:
100rpx
;
line-height
:
100rpx
;
line-height
:
100rpx
;
...
@@ -29,19 +162,127 @@ page {
...
@@ -29,19 +162,127 @@ 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 @
855d089f
...
@@ -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
{
...
@@ -466,6 +472,7 @@ page {
...
@@ -466,6 +472,7 @@ page {
background
:
#ffffff
;
background
:
#ffffff
;
position
:
relative
;
position
:
relative
;
margin-top
:
10rpx
;
margin-top
:
10rpx
;
margin-bottom
:
20rpx
;
.bootom-top
{
.bootom-top
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/pages/index/index.vue
View file @
855d089f
...
@@ -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,64 @@ const recommendedClassification = () => {
...
@@ -306,16 +313,64 @@ 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
toUse
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/index/listFood?type=1'
,
});
};
// 商家列表分页-搜索列表
// 商家列表分页-搜索列表
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 +387,13 @@ const getMerchantList = () => {
...
@@ -332,15 +387,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 +404,7 @@ const nearby = (distance) => {
...
@@ -351,6 +404,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 +414,7 @@ const popular = (communityName) => {
...
@@ -360,6 +414,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 +423,7 @@ const region = (area) => {
...
@@ -368,6 +423,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 +432,7 @@ const choice = (index, categoryId) => {
...
@@ -376,7 +432,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 +446,7 @@ const jingang = (id, pic) => {
...
@@ -390,7 +446,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 +454,22 @@ const locationFiltering = () => {
...
@@ -398,22 +454,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 +721,9 @@ page {
...
@@ -665,7 +721,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 @
855d089f
...
@@ -55,6 +55,13 @@
...
@@ -55,6 +55,13 @@
</view>
</view>
</view>
</view>
<FoodDetails
:cardData=
"cardData"
/>
<FoodDetails
:cardData=
"cardData"
/>
<wd-status-tip
image=
"content"
tip=
"暂无内容"
v-if=
"cardData.length === 0"
/>
<view
style=
"width: 100%; text-align: center; font-size: 24rpx; margin: 10rpx 0; color: #888989"
v-if=
"show"
>
没有更多啦~
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -64,7 +71,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue';
...
@@ -64,7 +71,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
);
...
@@ -73,6 +80,9 @@ const rotate2 = ref(false);
...
@@ -73,6 +80,9 @@ const rotate2 = ref(false);
const
rotate3
=
ref
(
false
);
const
rotate3
=
ref
(
false
);
const
topBg
=
ref
(
null
);
const
topBg
=
ref
(
null
);
const
categoryData
=
ref
([]);
const
categoryData
=
ref
([]);
const
show
=
ref
(
false
);
const
cardData
=
ref
([]);
let
total
;
const
paramsId
=
{
const
paramsId
=
{
parentId
:
null
,
parentId
:
null
,
};
};
...
@@ -87,23 +97,17 @@ onMounted(() => {
...
@@ -87,23 +97,17 @@ 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
)
=>
{
console
.
log
(
'distance'
,
distance
);
console
.
log
(
'distance'
,
distance
);
reset
();
if
(
distance
===
0
)
{
if
(
distance
===
0
)
{
delete
listParams
.
distance
;
delete
listParams
.
distance
;
}
else
{
}
else
{
...
@@ -114,15 +118,24 @@ const nearby = (distance) => {
...
@@ -114,15 +118,24 @@ 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
;
}
}
getMerchantList
();
getMerchantList
();
};
};
// 重置数据
const
reset
=
()
=>
{
listParams
.
current
=
1
;
cardData
.
value
=
[];
show
.
value
=
false
;
};
// 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
;
...
@@ -131,11 +144,13 @@ const region = (area) => {
...
@@ -131,11 +144,13 @@ const region = (area) => {
};
};
// categoryId参数来源
// categoryId参数来源
const
foodCategory
=
(
categoryId
)
=>
{
const
foodCategory
=
(
categoryId
)
=>
{
reset
();
listParams
.
categoryIds
=
[
categoryId
];
listParams
.
categoryIds
=
[
categoryId
];
getMerchantList
();
getMerchantList
();
};
};
// 排序参数来源
// 排序参数来源
const
sortParams
=
(
params
)
=>
{
const
sortParams
=
(
params
)
=>
{
reset
();
const
{
sortName
,
sortMode
}
=
params
;
const
{
sortName
,
sortMode
}
=
params
;
listParams
.
sortName
=
sortName
;
listParams
.
sortName
=
sortName
;
listParams
.
sortMode
=
sortMode
;
listParams
.
sortMode
=
sortMode
;
...
@@ -155,7 +170,12 @@ const back = () => {
...
@@ -155,7 +170,12 @@ const back = () => {
};
};
// 商家列表分页-搜索列表
// 商家列表分页-搜索列表
const
getMerchantList
=
()
=>
{
const
getMerchantList
=
()
=>
{
xma
.
showLoading
({
title
:
'加载中'
,
});
merchantList
(
listParams
).
then
((
res
)
=>
{
merchantList
(
listParams
).
then
((
res
)
=>
{
total
=
res
.
data
.
totalElements
;
xma
.
hideLoading
();
console
.
log
(
'商家列表'
,
res
);
console
.
log
(
'商家列表'
,
res
);
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
;
...
@@ -167,23 +187,20 @@ const getMerchantList = () => {
...
@@ -167,23 +187,20 @@ const getMerchantList = () => {
item
.
labels
=
item
.
labels
.
split
(
','
);
item
.
labels
=
item
.
labels
.
split
(
','
);
}
}
});
});
cardData
.
value
=
res
.
data
.
content
;
cardData
.
value
=
[...
cardData
.
value
,
...
res
.
data
.
content
]
;
});
});
};
};
onReachBottom
(()
=>
{
if
(
cardData
.
value
.
length
<
total
)
{
listParams
.
current
++
;
getMerchantList
();
return
;
}
show
.
value
=
true
;
});
const
choice
=
(
index
)
=>
{
const
choice
=
(
index
)
=>
{
active
.
value
=
index
;
active
.
value
=
index
;
};
};
const
cardData
=
ref
([
{
text
:
'测试'
,
},
{
text
:
'测试'
,
},
{
text
:
'测试'
,
},
]);
const
locationFiltering
=
(
index
)
=>
{
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
switch
(
index
)
{
...
@@ -212,7 +229,8 @@ page {
...
@@ -212,7 +229,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 +243,8 @@ page {
...
@@ -225,7 +243,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/order/afterSales.vue
View file @
855d089f
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<Header
title=
"售后
"
></Header>
<Header
title=
"售后详情
"
></Header>
<view
class=
"content"
>
<view
class=
"content"
>
111
<view
class=
"box box1"
v-if=
"afterSaleDetail"
>
<view
class=
"money"
>
<view
class=
"money_l"
>
退款金额
</view>
<view
class=
"money_r"
>
¥
{{
afterSaleDetail
.
refundPrice
}}
</view>
</view>
</view>
<view
class=
"intro"
>
申请通过后退回至原账户
</view>
</view>
<view
class=
"box"
>
<view
class=
"steps"
>
<view
class=
"step"
v-for=
"(item, index) in handleLog"
:key=
"index"
>
<wd-icon
name=
"check-circle-filled"
size=
"12px"
class=
"tag"
v-if=
"index == 0"
></wd-icon>
<view
class=
"head"
>
{{
item
.
title
}}
</view>
<view
class=
"time"
v-if=
"item.content"
>
{{
item
.
content
}}
</view>
<view
class=
"time"
>
{{
item
.
time
}}
</view>
</view>
</view>
</view>
<view
class=
"box"
v-if=
"orderItems"
>
<view
class=
"goods"
>
<view
class=
"g1"
>
退款信息
</view>
<view
class=
"g2"
v-for=
"(item, index) in orderItems"
:key=
"index"
>
<img
:src=
"fileDomain + item.pic"
mode=
"aspectFill"
/>
<view
class=
"g2_item"
>
<view
class=
"g2_info"
>
<view
class=
"g2_name"
>
{{
item
.
prodName
}}
</view>
<view
class=
"g2_price"
>
¥
{{
item
.
actualTotal
}}
</view>
</view>
<view
class=
"g2_number"
>
X
{{
item
.
prodCount
}}
</view>
</view>
</view>
<view
class=
"g3"
>
<view
class=
"g3_item"
>
<view
class=
"g3_title"
>
申请时间:
</view>
<view
class=
"g3_intro"
>
{{
afterSaleDetail
.
applyTime
}}
</view>
</view>
<view
class=
"g3_item"
>
<view
class=
"g3_title"
>
退款原因:
</view>
<view
class=
"g3_intro"
>
{{
afterSaleDetail
.
refundMemo
}}
</view>
</view>
<view
class=
"g3_item"
>
<view
class=
"g3_title"
>
订单号:
</view>
<view
class=
"g3_intro"
>
{{
afterSaleDetail
.
orderNumber
.
split
(
'-'
)[
1
]
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
{
afterSale
}
from
'@/api/order'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
orderNumber
=
ref
(
''
);
const
afterSaleDetail
=
ref
();
const
handleLog
=
ref
();
const
orderItems
=
ref
();
const
getAterSaleDetail
=
async
(
id
)
=>
{
const
res
=
await
afterSale
({
orderNumber
:
id
});
handleLog
.
value
=
res
.
data
[
0
].
handleLog
;
afterSaleDetail
.
value
=
res
.
data
[
0
];
orderItems
.
value
=
res
.
data
[
0
].
orderItems
;
};
onLoad
((
options
)
=>
{
orderNumber
.
value
=
options
.
orderNumber
;
getAterSaleDetail
(
orderNumber
.
value
);
});
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
page
{
page
{
background
:
#f3f3f3
;
background
:
#f3f3f3
;
}
}
.container
{
.container
{
width
:
375
*
2rpx
;
width
:
375
*
2rpx
;
margin
:
0
auto
;
margin
:
0
auto
;
.content
{
padding-top
:
88rpx
;
.box1
{
display
:
flex
;
flex-direction
:
column
;
.intro
{
font-size
:
12px
;
font-weight
:
normal
;
line-height
:
12px
;
letter-spacing
:
0em
;
font-variation-settings
:
'opsz'
auto
;
font-feature-settings
:
'kern'
on
;
color
:
#bcbcbc
;
}
.money
{
display
:
flex
;
line-height
:
14px
;
letter-spacing
:
0em
;
font-variation-settings
:
'opsz'
auto
;
font-feature-settings
:
'kern'
on
;
color
:
#3d3d3d
;
font-family
:
Source
Han
Sans
;
font-size
:
14px
;
margin-bottom
:
10rpx
;
.money_l
{
font-weight
:
normal
;
flex
:
1
;
}
.money_r
{
font-weight
:
bold
;
flex
:
2
;
text-align
:
right
;
margin-top
:
-15rpx
;
}
}
}
.box
{
width
:
710rpx
;
margin
:
10rpx
auto
3rpx
;
border-radius
:
8px
;
background-color
:
#fff
;
padding
:
40rpx
40rpx
;
box-sizing
:
border-box
;
.steps
{
border-left
:
2px
solid
#f3f3f3
;
.step
{
position
:
relative
;
padding-left
:
25rpx
;
.tag
{
position
:
absolute
;
left
:
-6px
;
top
:
0px
;
opacity
:
1
;
color
:
#fa5151
;
}
.head
{
font-family
:
Source
Han
Sans
;
font-size
:
14px
;
font-weight
:
bold
;
line-height
:
14px
;
letter-spacing
:
0em
;
font-variation-settings
:
'opsz'
auto
;
font-feature-settings
:
'kern'
on
;
color
:
#3d3d3d
;
margin-bottom
:
10rpx
;
}
.time
{
font-family
:
Source
Han
Sans
;
font-size
:
11px
;
font-weight
:
normal
;
line-height
:
14px
;
letter-spacing
:
0em
;
font-variation-settings
:
'opsz'
auto
;
font-feature-settings
:
'kern'
on
;
color
:
#bcbcbc
;
margin-bottom
:
10rpx
;
}
.time
:last-child
{
margin-bottom
:
40rpx
;
}
}
}
}
}
}
.goods
{
.g1
{
font-family
:
Source
Han
Sans
;
font-size
:
14px
;
font-weight
:
normal
;
line-height
:
14px
;
letter-spacing
:
0em
;
font-variation-settings
:
'opsz'
auto
;
font-feature-settings
:
'kern'
on
;
color
:
#3d3d3d
;
margin-bottom
:
40rpx
;
}
.g2
{
display
:
flex
;
margin-bottom
:
20rpx
;
img
{
width
:
176rpx
;
height
:
176rpx
;
border-radius
:
8px
;
opacity
:
1
;
margin-right
:
20rpx
;
}
.g2_item
{
flex
:
1
;
font-family
:
Source
Han
Sans
;
font-variation-settings
:
'opsz'
auto
;
font-feature-settings
:
'kern'
on
;
font-size
:
14px
;
line-height
:
14px
;
letter-spacing
:
0em
;
color
:
#3d3d3d
;
.g2_info
{
display
:
flex
;
margin-top
:
20rpx
;
margin-bottom
:
22rpx
;
justify-content
:
space-between
;
.g2_name
{
font-weight
:
bold
;
}
.g2_price
{
font-weight
:
bold
;
text-align
:
right
;
}
}
.g2_number
{
font-weight
:
normal
;
}
}
}
.g3
{
font-family
:
Source
Han
Sans
;
font-size
:
14px
;
font-weight
:
normal
;
line-height
:
14px
;
letter-spacing
:
0em
;
.content
{
font-variation-settings
:
'opsz'
auto
;
padding-top
:
88rpx
;
font-feature-settings
:
'kern'
on
;
.g3_item
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
20rpx
;
.g3_title
{
color
:
#767676
;
width
:
120rpx
;
}
.g3_intro
{
color
:
#3d3d3d
;
text-align
:
right
;
flex
:
1
;
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/order/components/Header/index.vue
View file @
855d089f
...
@@ -40,7 +40,6 @@ const handleBack = () => {
...
@@ -40,7 +40,6 @@ const handleBack = () => {
top
:
0
;
top
:
0
;
.headbox
{
.headbox
{
position
:
relative
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
height
:
100%
;
height
:
100%
;
...
@@ -51,10 +50,9 @@ const handleBack = () => {
...
@@ -51,10 +50,9 @@ const handleBack = () => {
}
}
.title
{
.title
{
position
:
absolute
;
text-align
:
center
;
top
:
50%
;
width
:
100%
;
left
:
50%
;
transform
:
translate
(
-18px
);
transform
:
translate
(
-50%
,
-50%
);
font-size
:
36rpx
;
font-size
:
36rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
color
:
#333333
;
color
:
#333333
;
...
...
src/pages/order/detail.vue
View file @
855d089f
...
@@ -9,20 +9,20 @@
...
@@ -9,20 +9,20 @@
name=
"check-outline"
name=
"check-outline"
size=
"26px"
size=
"26px"
color=
"#333"
color=
"#333"
v-if=
"orderDetail.
status == 5 || orderDetail
.status == 7"
v-if=
"orderDetail.
orderStore.status == 5 || orderDetail.orderStore
.status == 7"
></wd-icon>
></wd-icon>
<wd-icon
<wd-icon
name=
"close-outline"
name=
"close-outline"
size=
"26px"
size=
"26px"
color=
"#333"
color=
"#333"
v-if=
"orderDetail.status == 6"
v-if=
"orderDetail.
orderStore.
status == 6"
></wd-icon>
></wd-icon>
<view
class=
"status-text"
>
{{
statusList
[
orderDetail
.
status
]
}}
</view>
<view
class=
"status-text"
>
{{
statusList
[
orderDetail
.
orderStore
.
status
]
}}
</view>
</view>
</view>
<view
class=
"detail"
v-if=
"orderDetail.
s
tatus == 3"
>
<view
class=
"detail"
v-if=
"orderDetail.
orderStore.subS
tatus == 3"
>
请在
{{
orderDetail
.
receiverTime
.
slice
(
0
,
4
)
}}
年
{{
请在
{{
orderDetail
.
orderStore
.
receiverTime
.
slice
(
0
,
4
)
}}
年
{{
orderDetail
.
receiverTime
.
slice
(
5
,
7
)
orderDetail
.
orderStore
.
receiverTime
.
slice
(
5
,
7
)
}}
月
{{
orderDetail
.
receiverTime
.
slice
(
8
,
10
)
}}
前到店消费
}}
月
{{
orderDetail
.
orderStore
.
receiverTime
.
slice
(
8
,
10
)
}}
前到店消费
</view>
</view>
</view>
</view>
...
@@ -52,30 +52,42 @@
...
@@ -52,30 +52,42 @@
<image
:src=
"qrcode"
class=
"qr"
></image>
<image
:src=
"qrcode"
class=
"qr"
></image>
</view>
</view>
<view
class=
"info-box"
>
<view
class=
"info-box"
>
<view
class=
"between"
v-if=
"orderDetail.status == 2 || orderDetail.status == 3"
>
<view
class=
"between"
v-if=
"orderDetail.orderStore.subStatus == 2 || orderDetail.orderStore.subStatus == 3"
>
<view
class=
"column"
>
<view
class=
"column"
>
<text
class=
"title"
>
券码信息(1张可用)
</text>
<text
class=
"title"
>
券码信息(1张可用)
</text>
<text
class=
"text"
>
{{
orderDetail
.
receiverTime
}}
到期
</text>
<text
class=
"text"
>
{{
orderDetail
.
orderStore
.
receiverTime
}}
到期
</text>
</view>
<view
class=
"btn"
@
tap=
"handleRefund(orderDetail.orderStore.orderNumber)"
>
申请退款
</view>
</view>
<view
class=
"btn"
@
tap=
"handleRefund(orderDetail.orderNumber)"
>
申请退款
</view>
</view>
</view>
<view
class=
"between"
>
<view
class=
"between"
>
<view
class=
"column"
>
<view
class=
"column"
>
<text
class=
"title1"
v-if=
"orderDetail.status != 2 || orderDetail.status != 3"
>
<text
class=
"title1"
v-if=
"
orderDetail.orderStore.subStatus != 2 || orderDetail.orderStore.subStatus != 3
"
>
券码信息
券码信息
</text>
</text>
<text
<text
:class=
"
:class=
"
orderDetail.status == 5 || orderDetail.status == 6 || orderDetail.status == 7
orderDetail.orderStore.subStatus == 5 ||
orderDetail.orderStore.subStatus == 6 ||
orderDetail.orderStore.subStatus == 7
? 'linethrough'
? 'linethrough'
: 'phone'
: 'phone'
"
"
>
>
{{
orderDetail
.
orderNumber
.
slice
(
6
)
}}
{{
orderDetail
.
order
Store
.
order
Number
.
slice
(
6
)
}}
</text>
</text>
</view>
</view>
<text
class=
"text"
>
{{
orderStatusList
[
orderDetail
.
s
tatus
]
}}
</text>
<text
class=
"text"
>
{{
orderStatusList
[
orderDetail
.
orderStore
.
subS
tatus
]
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -153,14 +165,17 @@
...
@@ -153,14 +165,17 @@
<!-- 订单详情 -->
<!-- 订单详情 -->
<view
class=
"info"
>
<view
class=
"info"
>
<view
class=
"tips padding"
>
<view
class=
"tips padding"
>
<text
class=
"title"
>
实付金额:¥
{{
orderDetail
.
actualTotal
}}
</text>
<text
class=
"title"
>
实付金额:¥
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
<view
class=
"tips-box"
>
<view
class=
"tips-box"
>
<view
class=
"row"
>
<view
class=
"row"
>
<text
class=
"name"
>
订单号
</text>
<text
class=
"name"
>
订单号
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"colon"
>
:
</text>
<view
class=
"copybox"
>
<view
class=
"copybox"
>
<text
class=
"text"
>
{{
orderDetail
.
orderNumber
.
slice
(
6
)
}}
</text>
<text
class=
"text"
>
{{
orderDetail
.
orderStore
.
orderNumber
.
slice
(
6
)
}}
</text>
<view
class=
"copy"
@
tap=
"copyTextToClipboard(orderDetail.orderNumber.slice(6))"
>
<view
class=
"copy"
@
tap=
"copyTextToClipboard(orderDetail.orderStore.orderNumber.slice(6))"
>
复制
复制
</view>
</view>
</view>
</view>
...
@@ -168,17 +183,17 @@
...
@@ -168,17 +183,17 @@
<view
class=
"row"
>
<view
class=
"row"
>
<text
class=
"name"
>
手机号
</text>
<text
class=
"name"
>
手机号
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"text"
>
{{
maskPhoneNumber
(
orderDetail
.
receiverMobile
)
}}
</text>
<text
class=
"text"
>
{{
maskPhoneNumber
(
orderDetail
.
orderStore
.
receiverMobile
)
}}
</text>
</view>
</view>
<view
class=
"row"
v-if=
"orderDetail.payTime"
>
<view
class=
"row"
v-if=
"orderDetail.
orderStore.
payTime"
>
<text
class=
"name"
>
付款时间
</text>
<text
class=
"name"
>
付款时间
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"text"
>
{{
orderDetail
.
payTime
}}
</text>
<text
class=
"text"
>
{{
orderDetail
.
orderStore
.
payTime
}}
</text>
</view>
</view>
<view
class=
"row"
>
<view
class=
"row"
>
<text
class=
"name"
>
下单时间
</text>
<text
class=
"name"
>
下单时间
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"text"
>
{{
orderDetail
.
createTime
}}
</text>
<text
class=
"text"
>
{{
orderDetail
.
orderStore
.
createTime
}}
</text>
</view>
</view>
<view
class=
"row"
>
<view
class=
"row"
>
<text
class=
"name"
>
数量
</text>
<text
class=
"name"
>
数量
</text>
...
@@ -188,17 +203,17 @@
...
@@ -188,17 +203,17 @@
<view
class=
"row"
>
<view
class=
"row"
>
<text
class=
"name"
>
总价
</text>
<text
class=
"name"
>
总价
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"text"
>
¥
{{
orderDetail
.
total
}}
</text>
<text
class=
"text"
>
¥
{{
orderDetail
.
orderStore
.
total
}}
</text>
</view>
</view>
<view
class=
"row"
>
<view
class=
"row"
>
<text
class=
"name"
>
优惠明细
</text>
<text
class=
"name"
>
优惠明细
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"text"
>
-¥
{{
orderDetail
.
reduceAmount
}}
</text>
<text
class=
"text"
>
-¥
{{
orderDetail
.
orderStore
.
reduceAmount
}}
</text>
</view>
</view>
<view
class=
"row"
>
<view
class=
"row"
>
<text
class=
"name"
>
实付
</text>
<text
class=
"name"
>
实付
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"colon"
>
:
</text>
<text
class=
"text"
>
¥
{{
orderDetail
.
actualTotal
}}
</text>
<text
class=
"text"
>
¥
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -260,11 +275,11 @@ const orderDetail = ref();
...
@@ -260,11 +275,11 @@ const orderDetail = ref();
const
getDetail
=
async
()
=>
{
const
getDetail
=
async
()
=>
{
const
res
=
await
getOrderDetail
({
orderNumber
:
orderNumber
.
value
});
const
res
=
await
getOrderDetail
({
orderNumber
:
orderNumber
.
value
});
orderDetail
.
value
=
res
.
data
;
orderDetail
.
value
=
res
.
data
;
if
(
orderDetail
.
value
.
status
===
'2'
||
orderDetail
.
valu
e
.
status
===
'3'
)
{
if
(
orderDetail
.
value
.
orderStore
.
status
===
'2'
||
orderDetail
.
value
.
orderStor
e
.
status
===
'3'
)
{
codeDetail
(
orderDetail
.
value
.
orderNumber
);
codeDetail
(
orderDetail
.
value
.
order
Store
.
order
Number
);
}
}
getProductDetail
(
orderDetail
.
value
.
orderItems
[
0
].
prodId
);
getProductDetail
(
orderDetail
.
value
.
orderItems
[
0
].
prodId
);
getShopMailDetail
(
orderDetail
.
value
.
shopId
);
getShopMailDetail
(
orderDetail
.
value
.
baseOrder
.
shopId
);
};
};
/**
/**
...
...
src/pages/order/order.vue
View file @
855d089f
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
<view
class=
"title"
>
{{
item
.
shopName
}}
</view>
<view
class=
"title"
>
{{
item
.
shopName
}}
</view>
</view>
</view>
<view
class=
"right"
>
<view
class=
"right"
>
<span
class=
"status"
>
{{
stat
usList
[
item
.
status
]
}}
</span>
<span
class=
"status"
>
{{
stat
eList
[
item
.
status
].
label
}}
</span>
<wd-count-down
<wd-count-down
:time=
"item.countDown"
:time=
"item.countDown"
:format=
"format"
:format=
"format"
@
finish=
"onFinish(item.orderNumber)"
@
finish=
"onFinish(item.orderNumber)"
v-if=
"item.status ==
1
"
v-if=
"item.status ==
= 'not_pay'
"
/>
/>
</view>
</view>
</view>
</view>
...
@@ -36,14 +36,14 @@
...
@@ -36,14 +36,14 @@
<view
class=
"btn"
>
<view
class=
"btn"
>
<view
<view
class=
"btn-info"
class=
"btn-info"
v-if=
"item.status ==
5 || item.status == 6
"
v-if=
"item.status ==
= 'complete' || item.status == 'cancel'
"
@
tap=
"handleDelete(item.orderNumber)"
@
tap=
"handleDelete(item.orderNumber)"
>
>
删除
删除
</view>
</view>
<view
<view
class=
"btn-info"
class=
"btn-info"
v-if=
"item.status ==
3 || item.status == 2
"
v-if=
"item.status ==
= 'receive' || item.status == 'not_use'
"
@
tap=
"handleQrcode(item)"
@
tap=
"handleQrcode(item)"
>
>
核销码
核销码
...
@@ -51,28 +51,46 @@
...
@@ -51,28 +51,46 @@
<view
<view
class=
"btn-info"
class=
"btn-info"
@
tap=
"handleCancel(item.orderNumber)"
@
tap=
"handleCancel(item.orderNumber)"
v-if=
"item.status ==
1
"
v-if=
"item.status ==
= 'not_pay'
"
>
>
取消订单
取消订单
</view>
</view>
<view
class=
"btn-info"
v-if=
"item.status == 4"
@
tap=
"handleRemark(item)"
>
<view
class=
"btn-info"
v-if=
"item.status === 'not_eval'"
@
tap=
"handleRemark(item)"
>
评价
评价
</view>
</view>
<view
class=
"btn-info"
@
tap=
"callShopPhone(item.shopTel)"
>
联系商家
</view>
<view
class=
"btn-info"
@
tap=
"callShopPhone(item.shopTel)"
>
联系商家
</view>
<view
class=
"btn-error"
v-if=
"item.status == 7"
>
售后详情
</view>
<view
<view
class=
"btn-error"
class=
"btn-error"
v-if=
"item.status == 2 || item.status == 3 || item.status == 4"
v-if=
"item.status === 'after_sales'"
@
tap=
"handleAfterSales(item)"
>
售后详情
</view>
<view
class=
"btn-error"
v-if=
"
item.status === 'receive' ||
item.status === 'not_use' ||
item.status === 'not_eval'
"
@
click=
"handleRefund(item)"
@
click=
"handleRefund(item)"
>
>
申请退款
申请退款
</view>
</view>
<view
class=
"btn-error"
v-if=
"item.status == 5"
@
tap=
"anotherOrder(item)"
>
<view
class=
"btn-error"
v-if=
"item.status === 'complete'"
@
tap=
"anotherOrder(item)"
>
再来一单
再来一单
</view>
</view>
<view
<view
class=
"btn-error"
class=
"btn-error"
v-if=
"item.status ==
1
"
v-if=
"item.status ==
= 'not_pay'
"
@
tap=
"openPayment(item.orderNumber, index)"
@
tap=
"openPayment(item.orderNumber, index)"
>
>
立即支付
立即支付
...
@@ -101,52 +119,56 @@ import {
...
@@ -101,52 +119,56 @@ import {
repaymentApi
,
repaymentApi
,
getOrderDetail
,
getOrderDetail
,
}
from
'@/api/order'
;
}
from
'@/api/order'
;
import
{
getOrderDic
}
from
'@/utils/orderDic'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
stateList
=
ref
();
onLoad
((
options
)
=>
{
const
orderDic
=
getOrderDic
();
stateList
.
value
=
orderDic
.
reduce
((
obj
,
item
)
=>
{
obj
[
item
.
baseStatus
]
=
item
;
return
obj
;
},
{});
if
(
options
.
status
)
{
tab
.
value
=
options
.
status
;
}
getList
();
});
const
tabs
=
ref
([
const
tabs
=
ref
([
{
{
name
:
'全部'
,
name
:
'全部'
,
value
:
'
0
'
,
value
:
'
all
'
,
},
},
{
{
name
:
'待付款'
,
name
:
'待付款'
,
value
:
'
1
'
,
value
:
'
not_pay
'
,
},
},
{
{
name
:
'待使用'
,
name
:
'待使用'
,
value
:
'
3
'
,
value
:
'
not_use
'
,
},
},
{
{
name
:
'待评价'
,
name
:
'待评价'
,
value
:
'
4
'
,
value
:
'
not_eval
'
,
},
},
{
{
name
:
'已完成'
,
name
:
'已完成'
,
value
:
'
5
'
,
value
:
'
complete
'
,
},
},
{
{
name
:
'退款/售后'
,
name
:
'退款/售后'
,
value
:
'
7
'
,
value
:
'
after_sales
'
,
},
},
]);
]);
const
tab
=
ref
(
'0'
);
const
tab
=
ref
(
'all'
);
const
statusList
=
ref
({
1
:
'待付款'
,
3
:
'待消费'
,
4
:
'待评价'
,
5
:
'已完成'
,
6
:
'已取消'
,
7
:
'已退款'
,
});
onShow
(()
=>
{
onShow
(()
=>
{
console
.
log
(
pendingPaymentOrder
.
value
);
if
(
pendingPaymentOrder
.
value
)
{
if
(
pendingPaymentOrder
.
value
)
{
// 查询订单状态决定是否支付
// 查询订单状态决定是否支付
getOrderDetail
({
orderNumber
:
pendingPaymentOrder
.
value
}).
then
((
res
)
=>
{
getOrderDetail
({
orderNumber
:
pendingPaymentOrder
.
value
}).
then
((
res
)
=>
{
console
.
log
(
res
.
data
.
s
tatus
);
console
.
log
(
res
.
data
.
baseOrder
.
subS
tatus
);
switch
(
res
.
data
.
s
tatus
)
{
switch
(
res
.
data
.
baseOrder
.
subS
tatus
)
{
case
'1'
:
case
'1'
:
xma
.
showToast
({
xma
.
showToast
({
title
:
'支付失败'
,
title
:
'支付失败'
,
...
@@ -193,11 +215,12 @@ const catalog = reactive({
...
@@ -193,11 +215,12 @@ const catalog = reactive({
startDate
:
''
,
startDate
:
''
,
endDate
:
''
,
endDate
:
''
,
keyword
:
''
,
keyword
:
''
,
status
:
''
,
// 订单状态,1-待付款,2-待接单,3-待取货,4-待评价,5-完成,6-取消,7-退款
status
:
''
,
// 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
orderType
:
'store'
,
// 团购到店-store,外卖订单-takeaway,筑农物流logistics
});
});
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
catalog
.
status
=
tab
.
value
;
catalog
.
status
=
tab
.
value
;
if
(
tab
.
value
===
'
0
'
)
{
if
(
tab
.
value
===
'
all
'
)
{
catalog
.
status
=
''
;
catalog
.
status
=
''
;
}
}
catalog
.
current
++
;
catalog
.
current
++
;
...
@@ -206,7 +229,7 @@ const getList = async () => {
...
@@ -206,7 +229,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
)
=>
{
// 待付款倒计时计算
// 待付款倒计时计算
if
(
item
.
status
===
'
1
'
)
{
if
(
item
.
status
===
'
not_pay
'
)
{
item
.
countDown
=
calculateCountdown
(
item
.
createTime
);
item
.
countDown
=
calculateCountdown
(
item
.
createTime
);
}
}
});
});
...
@@ -215,8 +238,10 @@ const getList = async () => {
...
@@ -215,8 +238,10 @@ const getList = async () => {
}
}
state
.
value
=
'finished'
;
state
.
value
=
'finished'
;
};
};
getList
();
/**
* 切换状态栏
*/
const
handleChange
=
(
e
)
=>
{
const
handleChange
=
(
e
)
=>
{
tab
.
value
=
e
.
name
;
tab
.
value
=
e
.
name
;
initDataList
();
initDataList
();
...
@@ -369,7 +394,7 @@ const handleQrcode = (item) => {
...
@@ -369,7 +394,7 @@ const handleQrcode = (item) => {
};
};
/**
/**
*
售后详情
*
订单评价
*/
*/
const
handleRemark
=
(
item
)
=>
{
const
handleRemark
=
(
item
)
=>
{
xma
.
navigateTo
({
xma
.
navigateTo
({
...
@@ -377,6 +402,12 @@ const handleRemark = (item) => {
...
@@ -377,6 +402,12 @@ const handleRemark = (item) => {
});
});
};
};
const
handleAfterSales
=
(
item
)
=>
{
xma
.
navigateTo
({
url
:
`/pages/order/afterSales?orderNumber=
${
item
.
orderNumber
}
`
,
});
};
/**
/**
* 申请退款
* 申请退款
*/
*/
...
...
src/pages/order/refund.vue
View file @
855d089f
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<Header
title=
"售后/退款"
></Header>
<Header
title=
"售后/退款"
></Header>
<view
class=
"content"
>
<view
class=
"content"
v-if=
"orderDetail"
>
<view
class=
"content-box"
>
<view
class=
"content-box"
>
<view
class=
"content-item"
>
<view
class=
"content-item"
>
<text
class=
"title"
>
单号:
1111111111
</text>
<text
class=
"title"
>
单号:
{{
orderDetail
.
orderStore
.
orderNumber
.
slice
(
6
)
}}
</text>
</view>
</view>
<view
class=
"content-item"
>
<view
class=
"content-item"
>
<view
class=
"item-top"
>
<view
class=
"item-top"
>
<image
class=
"item-img"
mode=
"aspectFill"
src=
"/static/ticket/logo.png"
></image>
<image
class=
"item-img"
mode=
"aspectFill"
:src=
"fileDomain + orderDetail.orderItems[0].pic"
></image>
<view
class=
"item-info"
>
<view
class=
"item-info"
>
<text>
血糯米
</text>
<text>
{{
orderDetail
.
orderItems
[
0
].
prodName
}}
</text>
<text>
¥
0.01
</text>
<text>
¥
{{
orderDetail
.
orderItems
[
0
].
price
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"item-buttom"
>
<view
class=
"item-buttom"
style=
"padding-top: 60rpx"
>
<text>
共
</text>
<text>
共
</text>
<text
>
1
</text>
<text
class=
"num"
>
{{
orderDetail
.
orderItems
[
0
].
prodCount
}}
</text>
<text>
件商品 实付款
</text>
<text>
件商品 实付款
</text>
<text>
¥
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"price"
>
0.01
</text>
<text
class=
"price"
>
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
</view>
</view>
<view
class=
"content-item"
>
<view
class=
"item-buttom"
>
<text>
{{
orderDetail
.
orderStore
.
createTime
}}
</text>
</view>
</view>
<view
class=
"content-between"
>
<text>
退款金额
</text>
<text
class=
"price"
>
¥
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
</view>
<view
class=
"content-between"
>
<text>
相关图片
</text>
<wd-upload
:file-list=
"fileList"
image-mode=
"aspectFill"
:action=
"action"
@
change=
"handleChange"
></wd-upload>
</view>
<view
class=
"content-between"
@
tap=
"showPop = true"
>
<text>
退款原因
</text>
<view
class=
"rightbox"
>
<text
v-if=
"selectType"
>
{{
reasonList
[
selectType
].
name
}}
</text>
<text
v-else
>
选择退款原因
</text>
<wd-icon
name=
"arrow-right"
size=
"22px"
></wd-icon>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"btn"
@
tap=
"submit"
>
提交
</view>
</view>
</view>
</view>
</view>
<wd-popup
v-model=
"showPop"
position=
"bottom"
:safe-area-inset-bottom=
"true"
custom-style=
"border-radius: 16rpx 16rpx 0 0"
@
close=
"showPop = false"
lockScroll
>
<view
class=
"pop-content"
>
<view
class=
"header"
>
<view
class=
"title"
>
退款原因
</view>
<wd-icon
name=
"close"
size=
"20"
color=
"#999"
@
tap=
"showPop = false"
></wd-icon>
</view>
<radio-group
style=
"width: 100%"
@
change=
"radioChange"
>
<view
class=
"resaon"
v-for=
"(item, index) in reasonList"
:key=
"index"
>
<view
class=
"resaon-item"
>
<text>
{{
item
.
name
}}
</text>
<radio
class=
"radio"
color=
"#f62828"
:value=
"item.id"
:checked=
"item.id == selectType"
/>
</view>
</view>
<textarea
v-if=
"selectType == 4"
v-model=
"otherReason"
placeholder=
"请填写原因"
placeholder-style=
"font-size:28rpx;color: #c0c4cc;"
></textarea>
</radio-group>
<view
class=
"btn"
@
tap=
"chooseReason"
>
确认
</view>
</view>
</wd-popup>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
{
applyForARefundApi
,
getOrderDetail
}
from
'@/api/order'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
orderNumber
=
ref
(
''
);
onLoad
((
options
)
=>
{
orderNumber
.
value
=
options
.
orderNumber
;
getDetail
();
});
/**
* 获取订单详情
*/
const
orderDetail
=
ref
();
const
getDetail
=
async
()
=>
{
const
res
=
await
getOrderDetail
({
orderNumber
:
orderNumber
.
value
});
orderDetail
.
value
=
res
.
data
;
};
const
fileList
=
ref
([]);
const
action
=
ref
(
''
);
function
handleChange
({
fileList
:
files
})
{
console
.
log
(
files
);
fileList
.
value
=
files
;
}
const
showPop
=
ref
(
false
);
const
selectType
=
ref
(
null
);
const
reasonList
=
ref
([
{
id
:
'0'
,
name
:
'不想要了'
,
},
{
id
:
'1'
,
name
:
'协商一致退款'
,
},
{
id
:
'2'
,
name
:
'缺货'
,
},
{
id
:
'3'
,
name
:
'七天无理由'
,
},
{
id
:
'4'
,
name
:
'其他'
,
},
]);
const
otherReason
=
ref
(
''
);
function
radioChange
(
evt
)
{
const
{
value
}
=
evt
.
detail
;
selectType
.
value
=
value
;
}
const
submit
=
async
()
=>
{
if
(
!
selectType
.
value
)
{
return
xma
.
showToast
({
title
:
'请选择退款原因'
,
icon
:
'none'
,
});
}
if
(
selectType
.
value
===
'4'
&&
!
otherReason
.
value
)
{
return
xma
.
showToast
({
title
:
'请输入其他原因'
,
icon
:
'none'
,
});
}
xma
.
showLoading
({
title
:
'提交中'
,
mask
:
true
,
});
await
applyForARefundApi
({
orderNumber
:
orderNumber
.
value
,
refundMemo
:
selectType
.
value
===
4
?
otherReason
.
value
:
reasonList
.
value
[
selectType
.
value
].
name
,
imgs
:
fileList
.
value
.
map
((
item
)
=>
item
.
url
),
});
setTimeout
(()
=>
{
xma
.
hideLoading
();
setTimeout
(()
=>
{
xma
.
showToast
({
title
:
'提交成功'
,
icon
:
'success'
,
});
},
500
);
xma
.
redirectTo
({
url
:
`/pages/order/order?status=after_sales`
,
});
},
1500
);
};
const
chooseReason
=
()
=>
{
if
(
!
selectType
.
value
)
{
return
xma
.
showToast
({
title
:
'请选择退款原因'
,
icon
:
'none'
,
});
}
if
(
selectType
.
value
===
'4'
&&
!
otherReason
.
value
)
{
return
xma
.
showToast
({
title
:
'请输入其他原因'
,
icon
:
'none'
,
});
}
showPop
.
value
=
false
;
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -44,11 +218,11 @@ page {
...
@@ -44,11 +218,11 @@ page {
padding
:
108rpx
10rpx
0
;
padding
:
108rpx
10rpx
0
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
gap
:
2
0rpx
;
gap
:
6
0rpx
;
.content-box
{
.content-box
{
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
16
rpx
;
border-radius
:
8
rpx
;
padding
:
0
20rpx
;
padding
:
0
20rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
@@ -63,9 +237,156 @@ page {
...
@@ -63,9 +237,156 @@ page {
}
}
.item-top
{
.item-top
{
display
:
flex
;
gap
:
20rpx
;
.item-img
{
width
:
120rpx
;
height
:
120rpx
;
border-radius
:
6rpx
;
}
.item-info
{
display
:
flex
;
flex-direction
:
column
;
gap
:
20rpx
;
text
{
font-size
:
30rpx
;
color
:
#333
;
}
}
}
.item-buttom
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
baseline
;
text
{
font-size
:
24rpx
;
color
:
#b5b5b5
;
}
.num
{
color
:
#606060
;
font-weight
:
bold
;
}
.icon
{
color
:
#606060
;
}
.price
{
font-size
:
30rpx
;
color
:
#606060
;
}
}
}
}
}
.content-between
{
border-bottom
:
1rpx
solid
#f3f3f3
;
padding
:
20rpx
0
;
display
:
flex
;
justify-content
:
space-between
;
text
{
color
:
#747474
;
font-size
:
30rpx
;
}
.price
{
color
:
#e0302f
;
}
.rightbox
{
display
:
flex
;
font-size
:
30rpx
;
color
:
#b4b4b4
;
}
}
}
}
.btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
80rpx
;
width
:
100%
;
background-color
:
#f8446b
;
color
:
#fff
;
font-size
:
30rpx
;
border-radius
:
8rpx
;
}
}
.pop-content
{
display
:
flex
;
flex-direction
:
column
;
padding
:
20rpx
;
.header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding-bottom
:
30rpx
;
.title
{
font-size
:
28rpx
;
color
:
#333
;
font-weight
:
bold
;
text-align
:
center
;
width
:
100%
;
}
}
textarea
{
width
:
100%
;
height
:
200rpx
;
border
:
1rpx
solid
#e0e0e0
;
padding
:
20rpx
;
border-radius
:
8rpx
;
box-sizing
:
border-box
;
margin-top
:
20rpx
;
font-size
:
28rpx
;
}
.resaon
{
display
:
flex
;
flex-direction
:
column
;
gap
:
20rpx
;
.resaon-item
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
10rpx
0
;
border-bottom
:
1rpx
solid
#f3f3f3
;
text
{
font-size
:
28rpx
;
color
:
#333
;
}
radio
{
transform
:
scale
(
0
.8
);
}
}
}
}
}
.btn
{
margin-top
:
100rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
58rpx
;
color
:
#fff
;
font-size
:
28rpx
;
background-color
:
#f62828
;
border-radius
:
36rpx
;
width
:
100%
;
}
}
}
</
style
>
</
style
>
src/pages/order/ticketCode.vue
View file @
855d089f
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<Header
title=
"查看券码"
></Header>
<Header
title=
"查看券码"
></Header>
<view
class=
"content"
>
<view
class=
"content"
v-if=
"orderDetail"
>
<!-- 使用状态 -->
<!-- 使用状态 -->
<view
class=
"status"
>
<view
class=
"status"
>
<view
class=
"status-text"
>
{{
orderDetail
.
shop
Name
}}
</view>
<view
class=
"status-text"
>
{{
orderDetail
.
orderItems
[
0
].
prod
Name
}}
</view>
<view
class=
"detail"
>
有效期:
{{
orderDetail
.
receiverTime
}}
</view>
<view
class=
"detail"
>
有效期:
{{
orderDetail
.
orderStore
.
receiverTime
}}
</view>
</view>
</view>
<!-- 券码信息 -->
<!-- 券码信息 -->
<view
class=
"info"
>
<view
class=
"info"
>
<view
class=
"box"
>
<view
class=
"box"
>
<text
class=
"title"
>
{{
orderDetail
.
orderItems
[
0
].
prodName
}}
</text>
<text
class=
"title"
>
{{
orderDetail
.
orderItems
[
0
].
prodName
}}
</text>
<text
class=
"code"
>
{{
orderDetail
.
orderNumber
}}
</text>
<text
class=
"code"
>
{{
orderDetail
.
order
Store
.
order
Number
}}
</text>
</view>
</view>
<view
class=
"rectangle-with-semicircles"
></view>
<view
class=
"rectangle-with-semicircles"
></view>
<view
class=
"qrcode line"
>
<view
class=
"qrcode line"
>
...
@@ -44,15 +44,18 @@ const orderDetail = ref();
...
@@ -44,15 +44,18 @@ const orderDetail = ref();
function
getOrderDetailFn
(
orderNumber
)
{
function
getOrderDetailFn
(
orderNumber
)
{
getOrderDetail
({
orderNumber
}).
then
((
res
)
=>
{
getOrderDetail
({
orderNumber
}).
then
((
res
)
=>
{
orderDetail
.
value
=
res
.
data
;
orderDetail
.
value
=
res
.
data
;
const
outTradeNo
=
res
.
data
.
orderNumber
;
const
outTradeNo
=
res
.
data
.
order
Store
.
order
Number
;
const
indexOfDash
=
outTradeNo
.
indexOf
(
'-'
);
const
indexOfDash
=
outTradeNo
.
indexOf
(
'-'
);
if
(
indexOfDash
!==
-
1
)
{
if
(
indexOfDash
!==
-
1
)
{
res
.
data
.
orderNumber
=
outTradeNo
.
substring
(
indexOfDash
+
1
);
res
.
data
.
order
Store
.
order
Number
=
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
(
orderDetail
.
value
.
orderStore
.
orderNumber
);
}
}
});
});
}
}
...
...
src/pages/packageDetails/packageDetails.vue
View file @
855d089f
...
@@ -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
?
'未领取'
:
'已领取'
}}
...
@@ -231,9 +238,13 @@
...
@@ -231,9 +238,13 @@
<wd-icon
v-else
color=
"red"
name=
"star-on"
size=
"22px"
></wd-icon>
<wd-icon
v-else
color=
"red"
name=
"star-on"
size=
"22px"
></wd-icon>
{{
shopInfo
.
privateIntFcount
}}
{{
shopInfo
.
privateIntFcount
}}
</view>
</view>
<view
class=
"start"
@
click=
"shareFn"
>
<
!--
<
view
class=
"start"
@
click=
"shareFn"
>
<image
src=
"@/static/shop/share.png"
></image>
<image
src=
"@/static/shop/share.png"
></image>
分享
分享
</view>
-->
<view
class=
"start"
@
click=
"shareFn"
>
<!--
<image
src=
"@/static/shop/share.png"
></image>
分享 -->
</view>
</view>
<view
class=
"btn"
@
click=
"buyNow"
>
立即抢购
</view>
<view
class=
"btn"
@
click=
"buyNow"
>
立即抢购
</view>
</view>
</view>
...
@@ -602,7 +613,7 @@ page {
...
@@ -602,7 +613,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 +622,10 @@ page {
...
@@ -611,6 +622,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 +649,7 @@ page {
...
@@ -634,7 +649,7 @@ page {
gap
:
14rpx
;
gap
:
14rpx
;
.line
{
.line
{
border-top
:
2rpx
solid
#f2f2f2
;
//
border-top: 2rpx solid #f2f2f2;
}
}
.footbox
{
.footbox
{
...
@@ -793,9 +808,34 @@ page {
...
@@ -793,9 +808,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 @
855d089f
...
@@ -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,23 @@ function submitOrder() {
...
@@ -268,10 +276,23 @@ 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
);
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
:
'error'
,
});
groupBuyConfirmFn
(
prodIds
.
value
,
skuIds
.
value
);
}
},
1500
);
// window.open(paymentUrl);
// window.open(paymentUrl);
// plus.runtime.openURL(paymentUrl);
// plus.runtime.openURL(paymentUrl);
}
}
...
...
src/pages/shop/paymentSuccessful.vue
View file @
855d089f
...
@@ -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 @
855d089f
...
@@ -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>
...
@@ -143,6 +143,18 @@
...
@@ -143,6 +143,18 @@
<view
class=
"my-button-qg"
@
click=
"jumpProductDetails(item)"
>
抢购
</view>
<view
class=
"my-button-qg"
@
click=
"jumpProductDetails(item)"
>
抢购
</view>
</view>
</view>
</view>
</view>
<view
style=
"
width: 100%;
text-align: center;
font-size: 24rpx;
background: #fdfdfd;
color: #888989;
"
v-if=
"listOfGroupBuyingProducts.length === 0"
>
没有更多啦~
</view>
</view>
</view>
</view>
</view>
<!-- 团购优惠-end -->
<!-- 团购优惠-end -->
...
@@ -215,6 +227,19 @@
...
@@ -215,6 +227,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 +286,7 @@
...
@@ -261,7 +286,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>
...
@@ -298,6 +323,8 @@ const shopInfo = ref({});
...
@@ -298,6 +323,8 @@ const shopInfo = ref({});
const
shopSwiperList
=
ref
([]);
const
shopSwiperList
=
ref
([]);
// 当前位置的经纬度-// 店铺的经纬度
// 当前位置的经纬度-// 店铺的经纬度
const
currentLatitudeAndLongitude
=
ref
({
latitude
:
0
,
longitude
:
0
});
const
currentLatitudeAndLongitude
=
ref
({
latitude
:
0
,
longitude
:
0
});
// 店铺经纬度
const
shopLocation
=
ref
({
lat
:
0
,
lon
:
0
});
// 团购商品列表
// 团购商品列表
const
listOfGroupBuyingProducts
=
ref
([]);
const
listOfGroupBuyingProducts
=
ref
([]);
// 商家优惠券
// 商家优惠券
...
@@ -318,29 +345,87 @@ const commentTotal = ref(0);
...
@@ -318,29 +345,87 @@ const commentTotal = ref(0);
const
recommendedTypesOfPeripherals
=
ref
([]);
const
recommendedTypesOfPeripherals
=
ref
([]);
// 商户id
// 商户id
const
shopId
=
ref
(
''
);
const
shopId
=
ref
(
''
);
const
tagList2
=
ref
([{
name
:
'免费停车'
,
id
:
1
}]);
// 周边推荐-商家列表
// 周边推荐-商家列表
const
recommendedListOfPeripherals
=
ref
([]);
const
recommendedListOfPeripherals
=
ref
([]);
onLoad
((
options
)
=>
{
// onLoad((options) => {
// params.value.shopId = options.shopId;
// getStoreInformationFn(options.shopId).then(() => {
// peripheryRecomFn();
// });
// groupBuyListFn(options.shopId);
// shopId.value = options.shopId;
// couponShopListFn(options.shopId);
// getEvaluationPageFn();
// });
// onShow(() => {
// getStoreInformationFn(params.value.shopId).then(() => {
// // 获取位置
// getLocationFn().then((res) => {
// const distance = getDistance(
// res.lat,
// res.lon,
// shopLocation.value.lat,
// shopLocation.value.lon,
// 1,
// );
// shopInfo.value.distance = distance;
// });
// });
// });
onLoad
(
async
(
options
)
=>
{
params
.
value
.
shopId
=
options
.
shopId
;
params
.
value
.
shopId
=
options
.
shopId
;
getStoreInformationFn
(
options
.
shopId
).
then
(()
=>
{
peripheryRecomFn
();
});
groupBuyListFn
(
options
.
shopId
);
shopId
.
value
=
options
.
shopId
;
shopId
.
value
=
options
.
shopId
;
couponShopListFn
(
options
.
shopId
);
// 使用 Promise.all 并行请求,提升性能
await
Promise
.
all
([
getStoreInformationFn
(
options
.
shopId
),
groupBuyListFn
(
options
.
shopId
),
couponShopListFn
(
options
.
shopId
),
]);
// 获取周边推荐信息
peripheryRecomFn
();
// 获取评价信息
getEvaluationPageFn
();
getEvaluationPageFn
();
// 获取位置并计算距离
calculateDistance
();
});
});
onShow
(()
=>
{
// 获取位置
onShow
(
async
()
=>
{
getLocationFn
();
await
getStoreInformationFn
(
params
.
value
.
shopId
);
// 获取位置并计算距离
calculateDistance
();
});
});
const
value
=
ref
(
5
);
// 计算距离的函数封装
async
function
calculateDistance
()
{
try
{
const
res
=
await
getLocationFn
();
const
distance
=
getDistance
(
res
.
lat
,
res
.
lon
,
shopLocation
.
value
.
lat
,
shopLocation
.
value
.
lon
,
1
,
);
shopInfo
.
value
.
distance
=
distance
;
console
.
log
(
'distance'
,
distance
,
shopLocation
.
value
.
lat
,
shopLocation
.
value
.
lon
);
}
catch
(
error
)
{
console
.
error
(
'Error calculating distance:'
,
error
);
}
}
const
handleClick
=
(
e
)
=>
{
const
handleClick
=
(
e
)
=>
{
const
{
index
}
=
e
;
const
{
index
}
=
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
;
...
@@ -351,10 +436,10 @@ function scroll(e) {
...
@@ -351,10 +436,10 @@ function scroll(e) {
*/
*/
function
peripheryRecomFn
()
{
function
peripheryRecomFn
()
{
// 维度
// 维度
const
lat
=
currentLatitudeAndLongitude
.
value
.
latitude
;
const
lat
=
shopLocation
.
value
.
lat
;
// 经度
// 经度
const
lon
=
currentLatitudeAndLongitude
.
value
.
longitude
;
const
lon
=
shopLocation
.
value
.
lon
;
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 +455,12 @@ function sgyrddShopPageFn(categoryIds, lat, lon) {
...
@@ -370,8 +455,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
...
@@ -384,26 +473,27 @@ function sgyrddShopPageFn(categoryIds, lat, lon) {
...
@@ -384,26 +473,27 @@ function sgyrddShopPageFn(categoryIds, lat, lon) {
.
filter
((
item
)
=>
{
.
filter
((
item
)
=>
{
return
item
!==
''
;
return
item
!==
''
;
});
});
console
.
log
(
'res.data.content'
,
res
.
data
.
content
);
recommendedListOfPeripherals
.
value
=
res
.
data
.
content
;
recommendedListOfPeripherals
.
value
=
res
.
data
.
content
;
xma
.
hideLoading
();
}
}
});
});
}
}
function
getLocationFn
()
{
function
getLocationFn
()
{
xma
.
getLocation
({
return
new
Promise
((
resolve
,
reject
)
=>
{
type
:
'wgs84'
,
xma
.
getLocation
({
isHighAccuracy
:
true
,
type
:
'wgs84'
,
success
:
function
(
res
)
{
isHighAccuracy
:
true
,
// 经纬度
success
:
function
(
res
)
{
console
.
log
(
'res.latitude, res.longitude'
,
res
.
latitude
,
res
.
longitude
);
// 经纬度
// 店铺的经纬度
console
.
log
(
'res.latitude, res.longitude'
,
res
.
latitude
,
res
.
longitude
);
const
myLatitude
=
currentLatitudeAndLongitude
.
value
.
latitude
;
resolve
({
lat
:
res
.
latitude
,
lon
:
res
.
longitude
});
const
myLongitude
=
currentLatitudeAndLongitude
.
value
.
longitude
;
},
const
distance
=
getDistance
(
res
.
latitude
,
res
.
longitude
,
myLatitude
,
myLongitude
,
1
);
fail
:
function
(
err
)
{
shopInfo
.
value
.
distance
=
distance
;
return
err
;
},
},
fail
:
function
(
err
)
{
});
return
err
;
},
});
});
}
}
/**
/**
...
@@ -449,9 +539,12 @@ const getStoreInformationFn = (id) => {
...
@@ -449,9 +539,12 @@ 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
!==
''
)
{
currentLatitudeAndLongitude
.
value
.
latitude
=
res
.
data
.
shop
.
location
.
lat
;
shopInfo
.
value
.
tagList
=
res
.
data
.
shop
.
labels
.
split
(
','
);
currentLatitudeAndLongitude
.
value
.
longitude
=
res
.
data
.
shop
.
location
.
lon
;
}
const
{
lat
,
lon
}
=
res
.
data
.
shop
.
location
;
shopLocation
.
value
.
lat
=
lat
;
shopLocation
.
value
.
lon
=
lon
;
resolve
();
resolve
();
}
}
});
});
...
@@ -590,6 +683,10 @@ const giveTheThumbs = (item, index) => {
...
@@ -590,6 +683,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 +696,7 @@ const viewAll = () => {
...
@@ -599,6 +696,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 +951,21 @@ page {
...
@@ -853,18 +951,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/pages/storeEntry/index.vue
View file @
855d089f
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<Header
title=
"我的店铺"
></Header>
<Header
title=
"我的店铺"
></Header>
<view
class=
"content"
>
<view
class=
"content"
>
111
<!-- 列表 -->
<view
class=
"listcon"
>
<view
class=
"pubList"
>
<!-- 列表头部 -->
<view
class=
"titlecon"
>
<span>
标题标题
</span>
<span>
未通过
</span>
</view>
<!-- 列表详细 -->
<view
class=
"delbox"
>
<view
class=
"listPic"
>
<img
src=
"https://www.gywb.cn/upload/web/dataset/2024/08/01/2282c5c7e93b42c88dcfc606440f9716.jpg"
alt=
""
/>
</view>
<view
class=
"deltxt"
>
<ul>
<li>
<span>
申请时间:
</span>
<span>
2024-08-02 16:21:19
</span>
</li>
<li>
<span>
签约时间:
</span>
<span>
2024-08-02 ~ 2024-08-02
</span>
</li>
<li>
<span>
地址:
</span>
<span>
贵州省贵阳市南明区彭家湾花果园项目M区3栋1单元25层5号房
</span>
</li>
</ul>
</view>
</view>
</view>
<view
class=
"pubList"
>
<!-- 列表头部 -->
<view
class=
"titlecon"
>
<span>
标题标题
</span>
<span>
未通过
</span>
</view>
<!-- 列表详细 -->
<view
class=
"delbox"
>
<view
class=
"listPic"
>
<img
src=
"https://www.gywb.cn/upload/web/dataset/2024/08/01/2282c5c7e93b42c88dcfc606440f9716.jpg"
alt=
""
/>
</view>
<view
class=
"deltxt"
>
<ul>
<li>
<span>
申请时间:
</span>
<span>
2024-08-02 16:21:19
</span>
</li>
<li>
<span>
签约时间:
</span>
<span>
2024-08-02 ~ 2024-08-02
</span>
</li>
<li>
<span>
地址:
</span>
<span>
贵州省贵阳市南明区彭家湾花果园项目M区3栋1单元25层5号房
</span>
</li>
</ul>
</view>
</view>
</view>
</view>
</view>
<view
class=
"shbox"
>
审核被拒可点击修改重新提交
</view>
</view>
</view>
<view
class=
"butCon"
><button
class=
"butXz"
>
主要按钮
</button></view>
</view>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
Header
from
'@/pages/order/components/Header/index.vue'
;
import
Header
from
'@/pages/order/components/Header/index.vue'
;
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
page
{
page
{
background
:
#f3f3f3
;
background
:
#f3f3f3
;
}
}
.container
{
.container
{
width
:
375
*
2rpx
;
position
:
relative
;
margin
:
0
auto
;
width
:
375
*
2rpx
;
margin
:
0
auto
;
.content
{
background
:
#f1f1f1
;
padding-top
:
88rpx
;
padding-bottom
:
80px
;
.content
{
padding-top
:
88rpx
;
.listcon
{
margin-top
:
10px
;
.pubList
{
margin-top
:
5px
;
width
:
100%
;
height
:
auto
;
.titlecon
{
display
:
flex
;
width
:
96%
;
padding
:
2%
;
background-color
:
#fff
;
position
:
relative
;
}
.titlecon
span
{
display
:
block
;
font-size
:
14px
;
line-height
:
30px
;
font-weight
:
bold
;
}
.titlecon
span
:last-child
{
position
:
absolute
;
right
:
2%
;
line-height
:
30px
;
color
:
#cb6429
;
}
.delbox
{
width
:
96%
;
padding
:
2%
;
display
:
flex
;
margin-top
:
2px
;
background-color
:
#fff
;
}
.delbox
.listPic
{
padding-top
:
2%
;
width
:
25%
;
}
.delbox
.listPic
img
{
width
:
100%
;
}
.delbox
.deltxt
{
padding
:
0
;
padding-left
:
2%
;
width
:
73%
;
}
.delbox
.deltxt
ul
{
list-style
:
none
;
padding
:
0
;
}
.delbox
.deltxt
ul
li
{
text-align
:
left
;
}
.delbox
.deltxt
ul
li
span
{
font-size
:
14px
;
}
}
}
.shbox
{
text-align
:
center
;
margin-top
:
10px
;
font-size
:
15px
;
color
:
#7f7f7f
;
}
}
}
.butCon
{
width
:
100%
;
height
:
auto
;
position
:
absolute
;
bottom
:
0px
;
width
:
96%
;
padding
:
2%
;
background-color
:
#fff
;
}
.butXz
{
border-radius
:
10px
;
background-color
:
#fb3534
;
color
:
#fff
;
outline
:
none
;
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/ticket/ticket.vue
View file @
855d089f
...
@@ -2,8 +2,12 @@
...
@@ -2,8 +2,12 @@
<view
class=
"container"
>
<view
class=
"container"
>
<Header
title=
"我的券"
></Header>
<Header
title=
"我的券"
></Header>
<view
class=
"tab"
>
<view
class=
"tab"
>
<view
:class=
"currentTab == index ? 'tab-select' : 'tab-item'"
@
click=
"changeTab(index)"
<view
v-for=
"(item, index) in tabList"
:key=
"index"
>
:class=
"currentTab == index ? 'tab-select' : 'tab-item'"
@
click=
"changeTab(index)"
v-for=
"(item, index) in tabList"
:key=
"index"
>
{{
item
}}
{{
item
}}
</view>
</view>
</view>
</view>
...
@@ -15,8 +19,12 @@
...
@@ -15,8 +19,12 @@
<!-- 优惠券状态 -->
<!-- 优惠券状态 -->
<view
class=
"status"
>
<view
class=
"status"
>
<view
:class=
"currenStatus == index ? 'status-select' : 'status-item'"
@
click=
"changeStatus(index)"
<view
v-for=
"(item, index) in statusList"
:key=
"index"
>
:class=
"currenStatus == index ? 'status-select' : 'status-item'"
@
click=
"changeStatus(index)"
v-for=
"(item, index) in statusList"
:key=
"index"
>
{{
item
}}
{{
item
}}
</view>
</view>
</view>
</view>
...
@@ -39,7 +47,11 @@
...
@@ -39,7 +47,11 @@
</view>
</view>
<view
class=
"ticket-right"
>
<view
class=
"ticket-right"
>
<image
class=
"img"
:src=
"iconUrl[item.status]"
v-if=
"item.status == 0 || item.status == 2"
></image>
<image
class=
"img"
:src=
"iconUrl[item.status]"
v-if=
"item.status == 0 || item.status == 2"
></image>
<view
class=
"head"
>
<view
class=
"head"
>
<text
class=
"title"
>
{{
item
.
couponName
}}
</text>
<text
class=
"title"
>
{{
item
.
couponName
}}
</text>
<view
class=
"headbox"
>
<view
class=
"headbox"
>
...
@@ -55,8 +67,11 @@
...
@@ -55,8 +67,11 @@
<view
class=
"line"
></view>
<view
class=
"line"
></view>
<view
class=
"footbox"
@
click=
"handleChangeDetail(index)"
>
<view
class=
"footbox"
@
click=
"handleChangeDetail(index)"
>
<text
class=
"desc"
>
详细信息
</text>
<text
class=
"desc"
>
详细信息
</text>
<wd-icon
:name=
"item.showDetail ? 'chevron-down' : 'chevron-right'"
size=
"15px"
<wd-icon
color=
"#9d9d9d"
></wd-icon>
:name=
"item.showDetail ? 'chevron-down' : 'chevron-right'"
size=
"15px"
color=
"#9d9d9d"
></wd-icon>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -168,7 +183,7 @@ const getCouponList = async () => {
...
@@ -168,7 +183,7 @@ const getCouponList = async () => {
});
});
couponData
.
value
.
push
(...
res
.
data
.
records
);
couponData
.
value
.
push
(...
res
.
data
.
records
);
total
.
value
=
res
.
data
.
total
;
total
.
value
=
res
.
data
.
total
;
}
}
state
.
value
=
'finished'
;
state
.
value
=
'finished'
;
};
};
getCouponList
();
getCouponList
();
...
...
src/static/shop/subsidy.png
View replaced file @
8ffa9ba7
View file @
855d089f
9.04 KB
|
W:
|
H:
8.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/static/shop/yl.png
0 → 100644
View file @
855d089f
5.61 KB
src/utils/request.js
View file @
855d089f
...
@@ -26,6 +26,7 @@ export const request = ({ url, data = {}, header, method = 'GET' }) => {
...
@@ -26,6 +26,7 @@ export const request = ({ url, data = {}, header, method = 'GET' }) => {
duration
:
1000
,
duration
:
1000
,
icon
:
'none'
,
icon
:
'none'
,
});
});
return
;
}
}
resolve
(
res
.
data
);
resolve
(
res
.
data
);
},
},
...
...
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