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
940a7884
Commit
940a7884
authored
Aug 13, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
12b15db0
451b9ffa
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
374 additions
and
161 deletions
+374
-161
order.js
src/api/order.js
+8
-0
Search.vue
src/components/index/Search.vue
+11
-14
index.vue
...s/assistingAgriculture/order/components/stepBar/index.vue
+117
-60
detail.vue
src/pages/assistingAgriculture/order/detail.vue
+170
-31
loading.vue
src/pages/index/loading.vue
+8
-3
order.vue
src/pages/order/order.vue
+54
-2
refund.vue
src/pages/order/refund.vue
+3
-3
detail.vue
src/pages/storeEntry/detail.vue
+3
-48
No files found.
src/api/order.js
View file @
940a7884
...
@@ -114,3 +114,11 @@ export function getLogisticsMap(data) {
...
@@ -114,3 +114,11 @@ export function getLogisticsMap(data) {
data
,
data
,
});
});
}
}
// 确认收货 orderNumber
export
function
confirmReceipt
(
data
)
{
return
request
({
url
:
'/sgyrdd/sgyOrder/receipt/'
+
data
,
method
:
'POST'
,
});
}
src/components/index/Search.vue
View file @
940a7884
...
@@ -40,25 +40,22 @@ const emit = defineEmits(['toSearch']);
...
@@ -40,25 +40,22 @@ const emit = defineEmits(['toSearch']);
const
title
=
ref
(
'小程序平台'
);
const
title
=
ref
(
'小程序平台'
);
const
{
countInfo
,
addCount
}
=
useCountStore
();
const
{
countInfo
,
addCount
}
=
useCountStore
();
const
test
=
ref
(
''
);
const
test
=
ref
(
''
);
onMounted
(()
=>
{
onLoad
(()
=>
{
// xma.xh.getUserProfile({
xma
.
xh
.
getMenuButtonBoundingClientRect
({
// range: ['ACCOUNT', 'MOBILE', 'CITIZEN'],
success
(
res
)
{
// async success(info) {
console
.
log
(
'宽度'
,
res
.
width
);
// 宽度,单位:px
// const info2 = JSON.stringify(info);
console
.
log
(
'高度'
,
res
.
height
);
// 高度,单位:px
// test.value = info2;
console
.
log
(
'上边界坐标'
,
res
.
top
);
// 上边界坐标,单位:px
// },
console
.
log
(
'右边界坐标'
,
res
.
right
);
// 右边界坐标,单位:px
// });
console
.
log
(
'下边界坐标'
,
res
.
bottom
);
// 下边界坐标,单位:px
console
.
log
(
'左边界坐标'
,
res
.
left
);
// 左边界坐标,单位:px
},
});
});
});
const
search
=
(
res
)
=>
{
const
search
=
(
res
)
=>
{
const
keyword
=
res
.
detail
.
value
;
const
keyword
=
res
.
detail
.
value
;
emit
(
'toSearch'
,
keyword
);
emit
(
'toSearch'
,
keyword
);
};
};
const
test2
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/shop/shop'
,
});
};
// 返回上一级
// 返回上一级
const
back
=
()
=>
{
const
back
=
()
=>
{
...
...
src/pages/assistingAgriculture/order/components/stepBar/index.vue
View file @
940a7884
...
@@ -15,72 +15,49 @@
...
@@ -15,72 +15,49 @@
</view>
</view>
<view
class=
"top"
>
<view
class=
"top"
>
<view
class=
"left"
>
<view
class=
"left"
>
<image
class=
"logo"
src=
"/static/ticket/logo.png
"
mode=
"aspectFill"
></image>
<image
class=
"logo"
:src=
"iconUrl + info.com + '.png'
"
mode=
"aspectFill"
></image>
<
text>
中通快递78810259271088
</text
>
<
view
class=
"text"
>
{{
info
.
companyName
}}{{
info
.
nu
}}
</view
>
</view>
</view>
<view
class=
"right"
>
<view
class=
"right"
>
<text>
复制
</text>
<text
@
tap=
"copyTextToClipboard(info.nu)"
>
复制
</text>
<text>
丨
</text>
<text>
丨
</text>
<text>
打电话
</text>
<text
@
tap=
"callShopPhone(shopInfo.phone)"
>
打电话
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"steps"
>
<view
class=
"steps"
>
<wd-steps
:active=
"1"
vertical
>
<wd-steps
:active=
"1"
vertical
>
<wd-step>
<wd-step
v-for=
"(item, index) in info.data"
:key=
"index"
>
<template
#
icon
>
<view
class=
"dot-red"
></view>
</
template
>
<
template
#
title
>
<view
class=
"titlebox"
>
<text
class=
"title red-title"
>
待取件
</text>
<text
class=
"time red"
>
06-25 17:37
</text>
</view>
</
template
>
<
template
#
description
>
<view
class=
"desc"
>
您购买的包裹已暂存至贵阳市市政公园菜鸟驿站, 请凭取件码取件。
</view>
</
template
>
</wd-step>
<wd-step>
<
template
#
icon
>
<view
class=
"dot"
></view>
</
template
>
<
template
#
title
>
<view
class=
"titlebox"
>
<text
class=
"title"
>
派送中
</text>
<text
class=
"time"
>
06-25 09:05
</text>
</view>
</
template
>
<
template
#
description
>
<rich-text
class=
"desc1"
:nodes=
"detail"
></rich-text>
</
template
>
</wd-step>
<wd-step>
<
template
#
icon
>
<view
class=
"dot"
></view>
</
template
>
<
template
#
title
>
<view
class=
"titlebox"
>
<text
class=
"title"
>
运输中
</text>
<text
class=
"time"
>
06-25 05:15
</text>
</view>
</
template
>
<
template
#
description
>
<text
class=
"desc2"
>
【贵阳市】快件已到达 贵阳小河二部
</text>
</
template
>
</wd-step>
<wd-step>
<template
#
icon
>
<template
#
icon
>
<view
class=
"dot"
></view>
<view
class=
"dot-red"
v-if=
"index === 0"
></view>
<view
class=
"dot"
v-else
></view>
</
template
>
</
template
>
<
template
#
title
>
<
template
#
title
>
<view
class=
"titlebox"
>
<view
class=
"titlebox"
>
<text
class=
"time"
>
06-20 01:25
</text>
<text
class=
"title"
:class=
"index === 0 ? 'red-title' : ''"
v-if=
"item.status !== '在途'"
>
{{
item
.
status
}}
</text>
<text
class=
"time"
:class=
"index === 0 ? 'red' : ''"
>
{{
item
.
ftime
.
slice
(
5
,
16
)
}}
</text>
</view>
</view>
</
template
>
</
template
>
<
template
#
description
>
<
template
#
description
>
<text
class=
"desc2"
>
【黔南布依族苗族自治州】快件已发往 贵阳小河二部
</text>
<!--
<rich-text
class=
"desc1"
:nodes=
"item.context"
></rich-text>
-->
<text
class=
"desc1"
v-for=
"(t, i) in distinguishPhone(item.context)"
@
click=
"phoneCall(t)"
:key=
"i"
:style=
"
{ color: t.type === 'phone' ? '#ff0909' : '' }"
>
{{
t
.
val
}}
</text>
</
template
>
</
template
>
</wd-step>
</wd-step>
<wd-step>
<wd-step>
...
@@ -99,9 +76,12 @@
...
@@ -99,9 +76,12 @@
<view
class=
"bottom"
>
<view
class=
"bottom"
>
<view
class=
"b-icon"
>
收
</view>
<view
class=
"b-icon"
>
收
</view>
<view
class=
"right"
>
<view
class=
"right"
>
<text
class=
"title"
>
送至
贵阳市市政公园正门菜鸟驿站
</text>
<text
class=
"title"
>
送至
{{ orderInfo.orderLogistics.receiverAddress }}
</text>
<view
class=
"rowbox"
>
<view
class=
"rowbox"
>
<text
class=
"text1"
>
李先生 +86-187****4253
</text>
<text
class=
"text1"
>
{{ orderInfo.orderLogistics.receiverName }}
{{ maskPhoneNumber(orderInfo.orderLogistics.receiverMobile) }}
</text>
<text
class=
"text"
>
隐藏保护中
</text>
<text
class=
"text"
>
隐藏保护中
</text>
</view>
</view>
</view>
</view>
...
@@ -111,11 +91,18 @@
...
@@ -111,11 +91,18 @@
<
script
setup
>
<
script
setup
>
const
props
=
defineProps
({
const
props
=
defineProps
({
dataList
:
{
orderInfo
:
{
type
:
Array
,
type
:
Object
,
default
:
null
,
default
:
null
,
},
},
phone
:
{
type
:
String
,
default
:
''
,
},
});
});
const
info
=
ref
({});
// 物流轨迹信息
const
iconUrl
=
ref
(
'https://cdn.kuaidi100.com/images/all/56/'
);
const
show
=
ref
(
false
);
const
show
=
ref
(
false
);
// 正则表达式匹配电话号码
// 正则表达式匹配电话号码
const
phoneRegex
=
/
\b(\d{3,4}
-
\d{7,8}
|
\d{11})\b
/g
;
const
phoneRegex
=
/
\b(\d{3,4}
-
\d{7,8}
|
\d{11})\b
/g
;
...
@@ -123,16 +110,78 @@ const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g;
...
@@ -123,16 +110,78 @@ const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g;
const
highlightedText
=
(
val
)
=>
{
const
highlightedText
=
(
val
)
=>
{
return
val
.
replace
(
phoneRegex
,
'<span class="highlight">$1</span>'
);
return
val
.
replace
(
phoneRegex
,
'<span class="highlight">$1</span>'
);
};
};
const
detail
=
ref
(
'【贵阳市】贵阳小河二部的业务员【文凯凯, 18784286692】正在为您派件(95720为中通快递员外呼专属号码,请放心接听,如有问题可联系网点:0851-83876676,投诉电话:0851-83876678)'
,
const
maskPhoneNumber
=
(
phone
)
=>
{
);
return
phone
.
replace
(
/
(\d{3})\d{4}(\d{4})
/
,
'$1****$2'
);
const
open
=
()
=>
{
};
detail
.
value
=
highlightedText
(
detail
.
value
);
const
distinguishPhone
=
(
val
)
=>
{
const
a
=
val
;
const
c
=
a
.
split
(
phoneRegex
);
const
list
=
[];
for
(
const
i
in
c
)
{
const
flag
=
c
[
i
]
!==
''
&&
phoneRegex
.
test
(
c
[
i
]);
c
[
i
]
!==
''
&&
list
.
push
({
type
:
flag
?
'phone'
:
'text'
,
val
:
c
[
i
],
});
}
return
list
;
};
/**
* 拨打商家电话
* @param {*} phoneNumber
*/
function
callShopPhone
(
phoneNumber
)
{
xma
.
makePhoneCall
({
phoneNumber
,
// 仅为示例
});
}
const
phoneCall
=
(
t
)
=>
{
if
(
t
.
type
===
'phone'
)
{
console
.
log
(
t
.
val
);
uni
.
makePhoneCall
({
phoneNumber
:
t
.
val
,
success
:
()
=>
{},
fail
:
()
=>
{},
});
}
};
/**
* 复制到剪切板
* @param {*} text
*/
function
copyTextToClipboard
(
text
)
{
xma
.
setClipboardData
({
data
:
text
,
success
:
function
()
{
// 可以添加用户友好的提示,例如使用uni.showToast提示复制成功
xma
.
showToast
({
title
:
'复制成功'
,
icon
:
'success'
,
duration
:
2000
,
});
},
});
}
const
open
=
(
val
)
=>
{
info
.
value
=
val
;
// info.value.data.forEach((item) => {
// item.context = highlightedText(item.context);
// });
console
.
log
(
info
.
value
);
show
.
value
=
true
;
show
.
value
=
true
;
};
};
const
close
=
()
=>
{
const
close
=
()
=>
{
show
.
value
=
false
;
show
.
value
=
false
;
};
};
defineExpose
({
defineExpose
({
open
,
open
,
close
,
close
,
...
@@ -150,6 +199,12 @@ defineExpose({
...
@@ -150,6 +199,12 @@ defineExpose({
border-bottom
:
1px
solid
#ededed
;
border-bottom
:
1px
solid
#ededed
;
padding
:
20rpx
30rpx
33rpx
;
padding
:
20rpx
30rpx
33rpx
;
gap
:
26rpx
;
gap
:
26rpx
;
position
:
fixed
;
width
:
100%
;
box-sizing
:
border-box
;
background-color
:
#fff
;
z-index
:
10
;
border-radius
:
16rpx
16rpx
0
0
;
.rowbox
{
.rowbox
{
display
:
flex
;
display
:
flex
;
...
@@ -181,7 +236,7 @@ defineExpose({
...
@@ -181,7 +236,7 @@ defineExpose({
border-radius
:
50%
;
border-radius
:
50%
;
}
}
text
{
.
text
{
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
font-size
:
28rpx
;
font-size
:
28rpx
;
...
@@ -207,6 +262,7 @@ defineExpose({
...
@@ -207,6 +262,7 @@ defineExpose({
}
}
.steps
{
.steps
{
margin-top
:
160rpx
;
padding
:
28rpx
30rpx
;
padding
:
28rpx
30rpx
;
&
:deep
(
.wd-step__icon.is-icon
)
{
&
:deep
(
.wd-step__icon.is-icon
)
{
...
@@ -317,6 +373,7 @@ defineExpose({
...
@@ -317,6 +373,7 @@ defineExpose({
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
gap
:
6rpx
;
gap
:
6rpx
;
.title
{
.title
{
font-family
:
font-family
:
PingFang
SC
,
PingFang
SC
,
...
...
src/pages/assistingAgriculture/order/detail.vue
View file @
940a7884
...
@@ -7,39 +7,67 @@
...
@@ -7,39 +7,67 @@
v-if=
"logisticsDetail"
v-if=
"logisticsDetail"
></web-view>
></web-view>
<!--
<view
style=
"height: 600rpx; background-color: aquamarine"
></view>
-->
<!--
<view
style=
"height: 600rpx; background-color: aquamarine"
></view>
-->
<view
class=
"content"
>
<view
class=
"content"
v-if=
"orderDetail"
>
<view
class=
"info"
>
<view
class=
"info"
>
<view
class=
"top"
>
<view
class=
"top"
v-if=
"logisticsDetail"
>
<view
class=
"left"
>
<view
class=
"left"
>
<image
class=
"logo"
src=
"/static/ticket/logo.png"
mode=
"aspectFill"
></image>
<image
<text>
中通快递
{{
orderDetail
.
orderLogistics
.
logisticsNumber
}}
</text>
class=
"logo"
:src=
"iconUrl + logisticsDetail.com + '.png'"
mode=
"aspectFill"
></image>
<view
class=
"text"
>
{{
logisticsDetail
.
companyName
}}{{
orderDetail
.
orderLogistics
.
logisticsNumber
}}
</view>
</view>
</view>
<view
class=
"right"
>
<view
class=
"right"
>
<text>
复制
</text>
<text
@
tap=
"copyTextToClipboard(orderDetail.orderLogistics.logisticsNumber)"
>
复制
</text>
<text>
丨
</text>
<text>
丨
</text>
<text>
打电话
</text>
<text
@
tap=
"callShopPhone(shopDetail.phone)"
>
打电话
</text>
</view>
</view>
</view>
</view>
<view
class=
"steps"
>
<view
class=
"steps"
:style=
"
{ 'padding-top': logisticsDetail ? '0' : '80rpx' }"
>
<view
class=
"step-box"
>
<view
class=
"step-box"
>
<view
class=
"header"
>
<view
class=
"header"
>
<view
class=
"dot"
></view>
<view
class=
"dot"
></view>
<view
class=
"line"
></view>
<view
class=
"line"
></view>
</view>
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"rowbox"
>
<view
class=
"rowbox"
v-if=
"
orderDetail.orderLogistics.status === '3' ||
orderDetail.orderLogistics.status === '4' ||
orderDetail.orderLogistics.status === '5'
"
>
<view
class=
"textbox"
>
<view
class=
"textbox"
>
<text
class=
"title"
>
待取件
</text>
<text
class=
"title"
>
{{
logisticsDetail
.
data
[
0
].
status
}}
</text>
<text
class=
"text"
>
06-25 17:37
</text>
<text
class=
"text"
>
{{
logisticsDetail
.
data
[
0
].
ftime
.
slice
(
5
,
16
)
}}
</text>
</view>
</view>
<text
class=
"detail"
@
tap=
"openPop()"
>
详细信息 >
</text>
<text
class=
"detail"
@
tap=
"openPop()"
>
详细信息 >
</text>
</view>
</view>
<view
class=
"detailbox"
>
<view
class=
"rowbox"
v-else
>
<text
class=
"text"
>
<view
class=
"textbox"
v-if=
"orderDetail"
>
【贵阳市】您的快递已签收。如有疑问请联系业务员:
<text
class=
"title"
>
18275185576,代理点电话:18275185576,投诉电
{{
orderStatusList
[
orderDetail
.
orderLogistics
.
status
]
}}
话:0851-88628778。感谢使用中通快递,期待再次 为您服务!
</text>
</text>
<text
class=
"text"
v-if=
"orderDetail.orderLogistics.status === '2'"
>
{{
orderDetail
.
orderLogistics
.
createTime
.
slice
(
5
,
16
)
}}
</text>
</view>
</view>
<view
class=
"detailbox"
>
<rich-text
class=
"text"
v-if=
"
orderDetail.orderLogistics.status === '3' ||
orderDetail.orderLogistics.status === '4' ||
orderDetail.orderLogistics.status === '5'
"
:nodes=
"logisticsDetail.data[0].context"
></rich-text>
<text
class=
"text"
v-if=
"logisticsDetail"
></text>
<!--
<view
class=
"infobox"
>
<!--
<view
class=
"infobox"
>
<text
class=
"addr"
>
请问本次收件是否遇到问题?
</text>
<text
class=
"addr"
>
请问本次收件是否遇到问题?
</text>
<view
class=
"row"
>
<view
class=
"row"
>
...
@@ -47,13 +75,13 @@
...
@@ -47,13 +75,13 @@
<view
class=
"btn"
>
去评价
</view>
<view
class=
"btn"
>
去评价
</view>
</view>
</view>
</view>
-->
</view>
-->
<view
class=
"infobox"
>
<
!--
<
view
class=
"infobox"
>
<text
class=
"addr"
>
贵阳市市政公园菜鸟驿站店
</text>
<text
class=
"addr"
>
贵阳市市政公园菜鸟驿站店
</text>
<view
class=
"column"
>
<view
class=
"column"
>
<text
class=
"text"
>
取件码
</text>
<text
class=
"text"
>
取件码
</text>
<text
class=
"code"
>
2-7-4109
</text>
<text
class=
"code"
>
2-7-4109
</text>
</view>
</view>
</view>
</view>
-->
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -62,16 +90,19 @@
...
@@ -62,16 +90,19 @@
<view
class=
"past-dot"
></view>
<view
class=
"past-dot"
></view>
<!--
<view
class=
"line"
></view>
-->
<!--
<view
class=
"line"
></view>
-->
</view>
</view>
<view
class=
"content"
>
<view
class=
"content"
v-if=
"orderDetail"
>
<text
class=
"title"
>
送至
贵阳市市政公园正门菜鸟驿站
</text>
<text
class=
"title"
>
送至
{{
orderDetail
.
orderLogistics
.
receiverAddress
}}
</text>
<view
class=
"rowbox"
>
<view
class=
"rowbox"
>
<text
class=
"text1"
>
李先生 +86-187****4253
</text>
<text
class=
"text1"
>
{{
orderDetail
.
orderLogistics
.
receiverName
}}
{{
maskPhoneNumber
(
orderDetail
.
orderLogistics
.
receiverMobile
)
}}
</text>
<text
class=
"text"
>
隐藏保护中
</text>
<text
class=
"text"
>
隐藏保护中
</text>
</view>
</view>
<view
class=
"rowbox"
>
<
!--
<
view
class=
"rowbox"
>
<text
class=
"text1"
>
取件时可初始虚拟号码 172****4532-3113
</text>
<text
class=
"text1"
>
取件时可初始虚拟号码 172****4532-3113
</text>
<wd-icon
name=
"browse"
size=
"22px"
color=
"#999"
></wd-icon>
<wd-icon
name=
"browse"
size=
"22px"
color=
"#999"
></wd-icon>
</view>
</view>
-->
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -122,7 +153,7 @@
...
@@ -122,7 +153,7 @@
<view
class=
"total-item"
>
<view
class=
"total-item"
>
<text>
实付
</text>
<text>
实付
</text>
<view
class=
"pricebox"
>
<view
class=
"pricebox"
>
<
text
class=
"text"
>
共2件 合计:
</text
>
<
view
class=
"text"
>
共
{{
orderDetail
.
prodCount
}}
件 合计:
</view
>
<text
class=
"icon"
>
¥
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"price"
>
{{
orderDetail
.
orderLogistics
.
actualTotal
}}
</text>
<text
class=
"price"
>
{{
orderDetail
.
orderLogistics
.
actualTotal
}}
</text>
<!--
<text
class=
"icon"
>
{{
orderDetail
.
orderLogistics
.
actualTotal
.
split
(
'.'
)[
1
]
}}
</text>
-->
<!--
<text
class=
"icon"
>
{{
orderDetail
.
orderLogistics
.
actualTotal
.
split
(
'.'
)[
1
]
}}
</text>
-->
...
@@ -161,20 +192,36 @@
...
@@ -161,20 +192,36 @@
<view
style=
"height: 170rpx"
></view>
<view
style=
"height: 170rpx"
></view>
</view>
</view>
<view
class=
"footer"
v-if=
"orderDetail"
>
<view
class=
"footer"
v-if=
"orderDetail"
>
<view
class=
"btn"
v-if=
"orderDetail.orderLogistics.status === '3'"
>
查看物流
</view>
<view
class=
"btn"
v-if=
"orderDetail.orderLogistics.status === '3'"
@
tap=
"openPop()"
>
<view
class=
"btn"
>
联系商家
</view>
查看物流
<view
class=
"btn err"
v-if=
"orderDetail.orderLogistics.status === '3'"
>
确认收货
</view>
</view>
<view
class=
"btn err"
v-if=
"orderDetail.orderLogistics.status === '1'"
>
立即付款
</view>
<view
class=
"btn"
@
tap=
"callShopPhone(shopDetail.phone)"
>
联系商家
</view>
<view
class=
"btn err"
v-if=
"orderDetail.orderLogistics.status === '3'"
@
click=
"receipt()"
>
确认收货
</view>
<view
class=
"btn err"
v-if=
"orderDetail.orderLogistics.status === '4'"
@
click=
"handleRemark()"
>
评价订单
</view>
</view>
</view>
</view>
</view>
<stepBar
ref=
"stepBarRef"
></stepBar>
<stepBar
v-if=
"logisticsDetail"
ref=
"stepBarRef"
:orderInfo=
"orderDetail"
:phone=
"shopDetail.phone"
></stepBar>
</
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
stepBar
from
'@/pages/assistingAgriculture/order/components/stepBar/index.vue'
;
import
stepBar
from
'@/pages/assistingAgriculture/order/components/stepBar/index.vue'
;
import
{
getOrderDetail
,
getShopDetail
,
getLogisticsMap
}
from
'@/api/order'
;
import
{
getOrderDetail
,
getShopDetail
,
getLogisticsMap
,
confirmReceipt
}
from
'@/api/order'
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
fileDomain
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
const
iconUrl
=
ref
(
'https://cdn.kuaidi100.com/images/all/56/'
);
const
orderNumber
=
ref
(
''
);
const
orderNumber
=
ref
(
''
);
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
...
@@ -182,6 +229,16 @@ onLoad((options) => {
...
@@ -182,6 +229,16 @@ onLoad((options) => {
getDetail
();
getDetail
();
});
});
const
orderStatusList
=
ref
({
1
:
'待付款'
,
2
:
'待发货'
,
3
:
'待收货'
,
4
:
'待评价'
,
5
:
'已完成'
,
6
:
'已取消'
,
7
:
'退款'
,
});
const
payWayList
=
ref
({
const
payWayList
=
ref
({
0
:
'翼支付'
,
0
:
'翼支付'
,
1
:
'支付宝'
,
1
:
'支付宝'
,
...
@@ -193,12 +250,23 @@ const payWayList = ref({
...
@@ -193,12 +250,23 @@ const payWayList = ref({
*/
*/
const
orderDetail
=
ref
();
const
orderDetail
=
ref
();
const
getDetail
=
async
()
=>
{
const
getDetail
=
async
()
=>
{
xma
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
,
});
const
res
=
await
getOrderDetail
({
orderNumber
:
orderNumber
.
value
});
const
res
=
await
getOrderDetail
({
orderNumber
:
orderNumber
.
value
});
orderDetail
.
value
=
res
.
data
;
orderDetail
.
value
=
res
.
data
;
getShopMailDetail
(
orderDetail
.
value
.
baseOrder
.
shopId
);
getShopMailDetail
(
orderDetail
.
value
.
baseOrder
.
shopId
);
if
(
orderDetail
.
value
.
orderLogistics
.
logisticsNumber
)
{
if
(
orderDetail
.
value
.
orderLogistics
.
logisticsNumber
)
{
getLogisticsDetail
(
orderDetail
.
value
.
orderLogistics
.
logisticsNumber
);
getLogisticsDetail
(
orderDetail
.
value
.
orderLogistics
.
logisticsNumber
);
}
}
// 计算购买件数
let
count
=
0
;
orderDetail
.
value
.
orderItems
.
forEach
((
item
)
=>
{
count
+=
item
.
prodCount
;
});
orderDetail
.
value
.
prodCount
=
count
;
xma
.
hideLoading
();
};
};
/**
/**
...
@@ -238,7 +306,78 @@ const changeShowMore = () => {
...
@@ -238,7 +306,78 @@ const changeShowMore = () => {
const
stepBarRef
=
ref
(
null
);
const
stepBarRef
=
ref
(
null
);
const
openPop
=
()
=>
{
const
openPop
=
()
=>
{
stepBarRef
.
value
.
open
();
stepBarRef
.
value
.
open
(
logisticsDetail
.
value
);
};
const
maskPhoneNumber
=
(
phone
)
=>
{
return
phone
.
replace
(
/
(\d{3})\d{4}(\d{4})
/
,
'$1****$2'
);
};
/**
* 拨打商家电话
* @param {*} phoneNumber
*/
function
callShopPhone
(
phoneNumber
)
{
xma
.
makePhoneCall
({
phoneNumber
,
// 仅为示例
});
}
/**
* 复制到剪切板
* @param {*} text
*/
function
copyTextToClipboard
(
text
)
{
xma
.
setClipboardData
({
data
:
text
,
success
:
function
()
{
// 可以添加用户友好的提示,例如使用uni.showToast提示复制成功
xma
.
showToast
({
title
:
'复制成功'
,
icon
:
'success'
,
duration
:
2000
,
});
},
});
}
/**
* 确认收货
* @param {*} orderNumber
*/
const
receipt
=
()
=>
{
xma
.
showModal
({
title
:
'提示'
,
content
:
'确认收货后,订单将无法退换货,请确认是否已收到货物'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
xma
.
showLoading
({
title
:
'加载中'
,
mask
:
true
,
});
confirmReceipt
(
orderNumber
.
value
).
then
((
res
)
=>
{
xma
.
hideLoading
();
xma
.
showToast
({
title
:
'收货成功'
,
icon
:
'success'
,
duration
:
2000
,
});
setTimeout
(()
=>
{
getDetail
();
});
});
}
},
});
};
/**
* 订单评价
*/
const
handleRemark
=
()
=>
{
xma
.
navigateTo
({
url
:
`/pages/order/remark?orderNumber=
${
orderNumber
.
value
}
&shopName=
${
shopDetail
.
value
.
shopName
}
`
,
});
};
};
</
script
>
</
script
>
...
@@ -285,7 +424,7 @@ page {
...
@@ -285,7 +424,7 @@ page {
border-radius
:
50%
;
border-radius
:
50%
;
}
}
text
{
.
text
{
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
font-size
:
28rpx
;
font-size
:
28rpx
;
...
...
src/pages/index/loading.vue
View file @
940a7884
...
@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
...
@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import
{
getToken
}
from
'../../utils/auth'
;
import
{
getToken
}
from
'../../utils/auth'
;
onLoad
(
async
(
options
)
=>
{
onLoad
(
async
(
options
)
=>
{
//
await signIn();
await
signIn
();
if
(
!
getToken
())
await
signIn2
();
//
if (!getToken()) await signIn2();
const
{
type
}
=
options
;
const
{
type
}
=
options
;
switch
(
type
)
{
switch
(
type
)
{
case
'0'
:
case
'0'
:
...
@@ -24,7 +24,12 @@ onLoad(async (options) => {
...
@@ -24,7 +24,12 @@ onLoad(async (options) => {
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/index/building?categoryId=3266'
});
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/index/building?categoryId=3266'
});
break
;
break
;
case
'3'
:
case
'3'
:
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268'
});
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268'
,
});
break
;
default
:
xma
.
reLaunch
({
url
:
'/pages/index/index'
});
}
}
});
});
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
...
...
src/pages/order/order.vue
View file @
940a7884
...
@@ -78,6 +78,7 @@
...
@@ -78,6 +78,7 @@
>
>
删除
删除
</view>
</view>
<view
v-if=
"item.orderType !== 'logistics'"
>
<view
<view
class=
"btn-info"
class=
"btn-info"
v-if=
"item.status === 'receive' || item.status == 'not_use'"
v-if=
"item.status === 'receive' || item.status == 'not_use'"
...
@@ -85,6 +86,23 @@
...
@@ -85,6 +86,23 @@
>
>
核销码
核销码
</view>
</view>
</view>
<view
v-if=
"item.orderType === 'logistics'"
>
<view
class=
"btn-info"
v-if=
"item.status == 'not_use'"
@
tap=
"handleDetail(item)"
>
查看物流
</view>
</view>
<view
class=
"btn-info"
@
tap=
"receipt(item.orderNumber)"
v-if=
"item.orderType === 'logistics' && item.status === 'not_use'"
>
确认收货
</view>
<view
<view
class=
"btn-info"
class=
"btn-info"
@
tap=
"handleCancel(item.orderNumber)"
@
tap=
"handleCancel(item.orderNumber)"
...
@@ -167,6 +185,7 @@ import {
...
@@ -167,6 +185,7 @@ import {
cancelOrderApi
,
cancelOrderApi
,
repaymentApi
,
repaymentApi
,
getOrderDetail
,
getOrderDetail
,
confirmReceipt
,
}
from
'@/api/order'
;
}
from
'@/api/order'
;
import
{
getOrderDic
}
from
'@/utils/orderDic'
;
import
{
getOrderDic
}
from
'@/utils/orderDic'
;
import
{
orderStatus
,
signIn
}
from
'@/utils/signIn'
;
import
{
orderStatus
,
signIn
}
from
'@/utils/signIn'
;
...
@@ -302,7 +321,7 @@ const catalog = reactive({
...
@@ -302,7 +321,7 @@ const catalog = reactive({
endDate
:
''
,
endDate
:
''
,
keyword
:
''
,
keyword
:
''
,
status
:
''
,
// 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
status
:
''
,
// 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
orderType
:
''
,
// 团购到店-store,外卖订单-takeaway,筑农物流logistics
orderType
:
'
logistics
'
,
// 团购到店-store,外卖订单-takeaway,筑农物流logistics
});
});
const
getList
=
async
()
=>
{
const
getList
=
async
()
=>
{
if
(
isEnd
.
value
)
return
;
if
(
isEnd
.
value
)
return
;
...
@@ -574,6 +593,38 @@ const handleRefund = (item) => {
...
@@ -574,6 +593,38 @@ const handleRefund = (item) => {
});
});
};
};
/**
* 确认收货
* @param {*} orderNumber
*/
const
receipt
=
(
orderNumber
)
=>
{
xma
.
showModal
({
title
:
'提示'
,
content
:
'确认收货后,订单将无法退换货,请确认是否已收到货物'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
xma
.
showLoading
({
title
:
'加载中'
,
mask
:
true
,
});
confirmReceipt
(
orderNumber
).
then
((
res
)
=>
{
xma
.
hideLoading
();
xma
.
showToast
({
title
:
'收货成功'
,
icon
:
'success'
,
duration
:
2000
,
});
setTimeout
(()
=>
{
initDataList
().
then
(()
=>
{
getList
();
},
2000
);
});
});
}
},
});
};
/**
/**
* 店铺详情
* 店铺详情
*/
*/
...
@@ -658,6 +709,7 @@ page {
...
@@ -658,6 +709,7 @@ page {
gap
:
10rpx
;
gap
:
10rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
.text
{
.text
{
margin-left
:
10rpx
;
margin-left
:
10rpx
;
font-family
:
font-family
:
...
@@ -762,7 +814,7 @@ page {
...
@@ -762,7 +814,7 @@ page {
gap
:
14rpx
;
gap
:
14rpx
;
.btn-info
{
.btn-info
{
width
:
1
6
2rpx
;
width
:
1
5
2rpx
;
height
:
66rpx
;
height
:
66rpx
;
border-radius
:
34rpx
;
border-radius
:
34rpx
;
border
:
1rpx
solid
#999999
;
border
:
1rpx
solid
#999999
;
...
...
src/pages/order/refund.vue
View file @
940a7884
...
@@ -23,17 +23,17 @@
...
@@ -23,17 +23,17 @@
<text
class=
"num"
>
{{
orderDetail
.
orderItems
[
0
].
prodCount
}}
</text>
<text
class=
"num"
>
{{
orderDetail
.
orderItems
[
0
].
prodCount
}}
</text>
<text>
件商品 实付款
</text>
<text>
件商品 实付款
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"price"
>
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
<text
class=
"price"
>
{{
orderDetail
.
baseOrder
.
actualTotal
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"content-item"
>
<view
class=
"content-item"
>
<view
class=
"item-buttom"
>
<view
class=
"item-buttom"
>
<text>
{{
orderDetail
.
orderStore
.
createTime
}}
</text>
<text>
{{
orderDetail
.
baseOrder
.
createTime
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"content-between"
>
<view
class=
"content-between"
>
<text>
退款金额
</text>
<text>
退款金额
</text>
<text
class=
"price"
>
¥
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
<text
class=
"price"
>
¥
{{
orderDetail
.
baseOrder
.
actualTotal
}}
</text>
</view>
</view>
<view
class=
"content-between"
>
<view
class=
"content-between"
>
<text>
相关图片
</text>
<text>
相关图片
</text>
...
...
src/pages/storeEntry/detail.vue
View file @
940a7884
...
@@ -253,8 +253,7 @@ const cardBackwardNull = ref(false);
...
@@ -253,8 +253,7 @@ const cardBackwardNull = ref(false);
const
qualificationsNull
=
ref
(
false
);
const
qualificationsNull
=
ref
(
false
);
// 用户选择的分类
// 用户选择的分类
const
choosedShopInfo
=
ref
([]);
const
choosedShopInfo
=
ref
([]);
// 临时创建的用户选择分类
const
tempChoosedData
=
ref
([]);
// 确保choosedShopInfo内是用户最新选择的分类
// 确保choosedShopInfo内是用户最新选择的分类
const
chooseShopType
=
(
id
,
name
)
=>
{
const
chooseShopType
=
(
id
,
name
)
=>
{
let
hasSameData
=
false
;
let
hasSameData
=
false
;
...
@@ -265,35 +264,18 @@ const chooseShopType = (id, name) => {
...
@@ -265,35 +264,18 @@ const chooseShopType = (id, name) => {
});
});
if
(
!
hasSameData
)
{
if
(
!
hasSameData
)
{
choosedShopInfo
.
value
.
push
({
areaId
:
id
,
areaName
:
name
,
qualifications
:
''
});
choosedShopInfo
.
value
.
push
({
areaId
:
id
,
areaName
:
name
,
qualifications
:
''
});
tempChoosedData
.
value
.
push
({
areaId
:
id
,
areaName
:
name
,
qualifications
:
''
,
tag
:
'add'
});
}
else
{
}
else
{
choosedShopInfo
.
value
=
choosedShopInfo
.
value
.
filter
((
item
)
=>
{
choosedShopInfo
.
value
=
choosedShopInfo
.
value
.
filter
((
item
)
=>
{
if
(
item
.
areaId
===
id
)
{
/* tempChoosedData.value.push({
areaId: id,
areaName: name,
qualifications: item.qualifications,
tag: 'delete',
}); */
// tempChoosedData.value.forEach(())
tempChoosedData
.
value
.
filter
((
sitem
)
=>
sitem
.
tag
!==
'add'
);
console
.
log
(
'tempChoosedData'
);
console
.
log
(
tempChoosedData
.
value
);
console
.
log
(
'choosedShopInfo'
);
console
.
log
(
choosedShopInfo
.
value
);
}
return
item
.
areaId
!==
id
;
return
item
.
areaId
!==
id
;
});
});
}
}
console
.
log
(
'临时数组'
);
console
.
log
(
tempChoosedData
.
value
);
};
};
// 删除图片之前的提示
// 删除图片之前的提示
const
beforeRemove
=
({
file
,
fileList
,
resolve
})
=>
{
const
beforeRemove
=
({
file
,
fileList
,
resolve
})
=>
{
xma
.
showModal
({
xma
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
content
:
'确定删除图片
'
+
file
.
name
+
'吗
'
,
content
:
'确定删除图片
吗?
'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
xma
.
showToast
({
title
:
'删除成功'
,
duration
:
2000
});
xma
.
showToast
({
title
:
'删除成功'
,
duration
:
2000
});
...
@@ -505,30 +487,7 @@ const show = ref(false);
...
@@ -505,30 +487,7 @@ const show = ref(false);
// 关闭店铺分类弹出层
// 关闭店铺分类弹出层
const
handleClose
=
()
=>
{
const
handleClose
=
()
=>
{
show
.
value
=
false
;
show
.
value
=
false
;
tempChoosedData
.
value
.
forEach
((
item
)
=>
{
if
(
item
.
tag
===
'add'
)
{
// 删除
// console.log('应该删除' + item.areaName);
// console.log('删除前的choosedShopInfo');
// console.log(choosedShopInfo.value);
for
(
let
i
=
0
;
i
<
choosedShopInfo
.
value
.
length
;
i
++
)
{
if
(
item
.
areaId
===
choosedShopInfo
.
value
[
i
].
areaId
)
{
choosedShopInfo
.
value
.
splice
(
i
,
1
);
}
}
}
else
{
// 添加
choosedShopInfo
.
value
.
push
(
reactive
({
areaId
:
item
.
areaId
,
areaName
:
item
.
areaName
,
qualifications
:
item
.
qualifications
,
}),
);
}
});
console
.
log
(
'删除后的choosedShopInfo'
);
console
.
log
(
choosedShopInfo
.
value
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
testFileList
.
value
=
choosedShopInfo
.
value
.
reduce
((
obj
,
item
)
=>
{
testFileList
.
value
=
choosedShopInfo
.
value
.
reduce
((
obj
,
item
)
=>
{
if
(
item
.
qualifications
===
''
)
{
if
(
item
.
qualifications
===
''
)
{
...
@@ -563,7 +522,6 @@ const chooseCategory = () => {
...
@@ -563,7 +522,6 @@ const chooseCategory = () => {
// 显示店铺分类弹窗
// 显示店铺分类弹窗
const
showclass
=
()
=>
{
const
showclass
=
()
=>
{
show
.
value
=
true
;
show
.
value
=
true
;
tempChoosedData
.
value
=
[];
};
};
const
isCategoryNull
=
ref
(
false
);
const
isCategoryNull
=
ref
(
false
);
...
@@ -876,7 +834,6 @@ page {
...
@@ -876,7 +834,6 @@ page {
font-size
:
var
(
--
wot-input-fs
,
var
(
--
wot-cell-title-fs
,
14px
));
font-size
:
var
(
--
wot-input-fs
,
var
(
--
wot-cell-title-fs
,
14px
));
color
:
var
(
--
wot-input-placeholder-color
,
#bfbfbf
);
color
:
var
(
--
wot-input-placeholder-color
,
#bfbfbf
);
}
}
.text.shopcateboxtxt
{
.text.shopcateboxtxt
{
margin-left
:
0px
;
margin-left
:
0px
;
}
}
...
@@ -919,10 +876,8 @@ page {
...
@@ -919,10 +876,8 @@ page {
.newAddCertification
{
.newAddCertification
{
margin-top
:
40rpx
;
margin-top
:
40rpx
;
.citem
{
.citem
{
margin-bottom
:
20rpx
;
margin-bottom
:
20rpx
;
.titleOfC
{
.titleOfC
{
margin-bottom
:
10rpx
;
margin-bottom
:
10rpx
;
display
:
block
;
display
:
block
;
...
...
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