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
6815acb2
Commit
6815acb2
authored
Aug 05, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
8b24fa78
66866a63
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
31 deletions
+73
-31
order.js
src/api/order.js
+10
-0
foodClassification.vue
src/pages/index/foodClassification.vue
+3
-4
order.vue
src/pages/order/order.vue
+0
-1
refund.vue
src/pages/order/refund.vue
+30
-11
ticketCode.vue
src/pages/order/ticketCode.vue
+11
-8
confirmOrder.vue
src/pages/shop/confirmOrder.vue
+1
-1
paymentSuccessful.vue
src/pages/shop/paymentSuccessful.vue
+13
-6
shop.vue
src/pages/shop/shop.vue
+5
-0
No files found.
src/api/order.js
View file @
6815acb2
...
@@ -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,3 +70,12 @@ export function sgyOrderGetStatus(data) {
...
@@ -69,3 +70,12 @@ export function sgyOrderGetStatus(data) {
data
,
data
,
});
});
}
}
// 申请退款applyForARefund
export
function
applyForARefundApi
(
data
)
{
return
request
({
url
:
'/sgyrdd/sgyOrder/afterSales/apply'
,
method
:
'POST'
,
data
,
});
}
src/pages/index/foodClassification.vue
View file @
6815acb2
...
@@ -142,11 +142,8 @@ onLoad((option) => {
...
@@ -142,11 +142,8 @@ onLoad((option) => {
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参数来源
...
@@ -313,6 +310,8 @@ function getLocationFn() {
...
@@ -313,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
});
},
},
...
...
src/pages/order/order.vue
View file @
6815acb2
...
@@ -221,7 +221,6 @@ const getList = async () => {
...
@@ -221,7 +221,6 @@ const getList = async () => {
res
.
data
.
records
.
forEach
((
item
)
=>
{
res
.
data
.
records
.
forEach
((
item
)
=>
{
// 待付款倒计时计算
// 待付款倒计时计算
if
(
item
.
status
===
'not_pay'
)
{
if
(
item
.
status
===
'not_pay'
)
{
console
.
log
(
item
.
status
);
item
.
countDown
=
calculateCountdown
(
item
.
createTime
);
item
.
countDown
=
calculateCountdown
(
item
.
createTime
);
}
}
});
});
...
...
src/pages/order/refund.vue
View file @
6815acb2
<
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"
style=
"padding-top: 60rpx"
>
<view
class=
"item-buttom"
style=
"padding-top: 60rpx"
>
<text>
共
</text>
<text>
共
</text>
<text
class=
"num"
>
1
</text>
<text
class=
"num"
>
{{
orderDetail
.
orderItems
[
0
].
prodCount
}}
</text>
<text>
件商品 实付款
</text>
<text>
件商品 实付款
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"price"
>
0.01
</text>
<text
class=
"price"
>
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"content-item"
>
<view
class=
"content-item"
>
<view
class=
"item-buttom"
>
<view
class=
"item-buttom"
>
<text>
2024-08-02 10:12:16
</text>
<text>
{{
orderDetail
.
orderStore
.
createTime
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"content-between"
>
<view
class=
"content-between"
>
<text>
退款金额
</text>
<text>
退款金额
</text>
<text
class=
"price"
>
¥
0.01
</text>
<text
class=
"price"
>
¥
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
</view>
</view>
<view
class=
"content-between"
>
<view
class=
"content-between"
>
<text>
相关图片
</text>
<text>
相关图片
</text>
...
@@ -91,11 +95,26 @@
...
@@ -91,11 +95,26 @@
<
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
fileList
=
ref
([]);
const
action
=
ref
(
''
);
const
action
=
ref
(
''
);
function
handleChange
({
fileList
:
files
})
{
function
handleChange
({
fileList
:
files
})
{
console
.
log
(
files
);
console
.
log
(
files
);
fileList
.
value
=
files
;
fileList
.
value
=
files
;
...
...
src/pages/order/ticketCode.vue
View file @
6815acb2
<
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/shop/confirmOrder.vue
View file @
6815acb2
...
@@ -186,7 +186,7 @@ onShow(() => {
...
@@ -186,7 +186,7 @@ onShow(() => {
if
(
outTradeNos
.
value
)
{
if
(
outTradeNos
.
value
)
{
// 查询订单状态决定是否支付
// 查询订单状态决定是否支付
getOrderDetail
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
getOrderDetail
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
switch
(
res
.
data
.
baseOrder
.
sub
s
tatus
)
{
switch
(
res
.
data
.
baseOrder
.
sub
S
tatus
)
{
case
'1'
:
case
'1'
:
xma
.
showToast
({
xma
.
showToast
({
title
:
'支付失败'
,
title
:
'支付失败'
,
...
...
src/pages/shop/paymentSuccessful.vue
View file @
6815acb2
...
@@ -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 @
6815acb2
...
@@ -615,6 +615,10 @@ const giveTheThumbs = (item, index) => {
...
@@ -615,6 +615,10 @@ const giveTheThumbs = (item, index) => {
* 查看全部评论
* 查看全部评论
*/
*/
const
viewAll
=
()
=>
{
const
viewAll
=
()
=>
{
xma
.
showLoading
({
title
:
'加载中...'
,
mask
:
false
,
});
getEvaluationPage
({
getEvaluationPage
({
current
:
1
,
current
:
1
,
size
:
commentTotal
.
value
,
size
:
commentTotal
.
value
,
...
@@ -624,6 +628,7 @@ const viewAll = () => {
...
@@ -624,6 +628,7 @@ const viewAll = () => {
commentList
.
value
=
res
.
data
.
records
.
map
((
item
)
=>
{
commentList
.
value
=
res
.
data
.
records
.
map
((
item
)
=>
{
item
.
avatar
=
addImgUrlPrefix
(
imgUrl
,
item
.
avatar
);
item
.
avatar
=
addImgUrlPrefix
(
imgUrl
,
item
.
avatar
);
item
.
images
=
addImgUrlPrefixToImages
(
imgUrl
,
item
.
images
);
item
.
images
=
addImgUrlPrefixToImages
(
imgUrl
,
item
.
images
);
xma
.
hideLoading
();
return
item
;
return
item
;
});
});
}
}
...
...
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