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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
204 additions
and
130 deletions
+204
-130
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
+0
-0
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) {
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']);
const
title
=
ref
(
'小程序平台'
);
const
{
countInfo
,
addCount
}
=
useCountStore
();
const
test
=
ref
(
''
);
onMounted
(()
=>
{
// xma.xh.getUserProfile({
// range: ['ACCOUNT', 'MOBILE', 'CITIZEN'],
// async success(info) {
// const info2 = JSON.stringify(info);
// test.value = info2;
// },
// });
onLoad
(()
=>
{
xma
.
xh
.
getMenuButtonBoundingClientRect
({
success
(
res
)
{
console
.
log
(
'宽度'
,
res
.
width
);
// 宽度,单位:px
console
.
log
(
'高度'
,
res
.
height
);
// 高度,单位:px
console
.
log
(
'上边界坐标'
,
res
.
top
);
// 上边界坐标,单位:px
console
.
log
(
'右边界坐标'
,
res
.
right
);
// 右边界坐标,单位:px
console
.
log
(
'下边界坐标'
,
res
.
bottom
);
// 下边界坐标,单位:px
console
.
log
(
'左边界坐标'
,
res
.
left
);
// 左边界坐标,单位:px
},
});
});
const
search
=
(
res
)
=>
{
const
keyword
=
res
.
detail
.
value
;
emit
(
'toSearch'
,
keyword
);
};
const
test2
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/shop/shop'
,
});
};
// 返回上一级
const
back
=
()
=>
{
...
...
src/pages/assistingAgriculture/order/components/stepBar/index.vue
View file @
940a7884
...
...
@@ -15,72 +15,49 @@
</view>
<view
class=
"top"
>
<view
class=
"left"
>
<image
class=
"logo"
src=
"/static/ticket/logo.png
"
mode=
"aspectFill"
></image>
<
text>
中通快递78810259271088
</text
>
<image
class=
"logo"
:src=
"iconUrl + info.com + '.png'
"
mode=
"aspectFill"
></image>
<
view
class=
"text"
>
{{
info
.
companyName
}}{{
info
.
nu
}}
</view
>
</view>
<view
class=
"right"
>
<text>
复制
</text>
<text
@
tap=
"copyTextToClipboard(info.nu)"
>
复制
</text>
<text>
丨
</text>
<text>
打电话
</text>
<text
@
tap=
"callShopPhone(shopInfo.phone)"
>
打电话
</text>
</view>
</view>
</view>
</view>
<view
class=
"steps"
>
<wd-steps
:active=
"1"
vertical
>
<wd-step>
<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>
<wd-step
v-for=
"(item, index) in info.data"
:key=
"index"
>
<template
#
icon
>
<view
class=
"dot"
></view>
<view
class=
"dot-red"
v-if=
"index === 0"
></view>
<view
class=
"dot"
v-else
></view>
</
template
>
<
template
#
title
>
<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>
</
template
>
<
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
>
</wd-step>
<wd-step>
...
...
@@ -99,9 +76,12 @@
<view
class=
"bottom"
>
<view
class=
"b-icon"
>
收
</view>
<view
class=
"right"
>
<text
class=
"title"
>
送至
贵阳市市政公园正门菜鸟驿站
</text>
<text
class=
"title"
>
送至
{{ orderInfo.orderLogistics.receiverAddress }}
</text>
<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>
</view>
</view>
...
...
@@ -111,11 +91,18 @@
<
script
setup
>
const
props
=
defineProps
({
dataList
:
{
type
:
Array
,
orderInfo
:
{
type
:
Object
,
default
:
null
,
},
phone
:
{
type
:
String
,
default
:
''
,
},
});
const
info
=
ref
({});
// 物流轨迹信息
const
iconUrl
=
ref
(
'https://cdn.kuaidi100.com/images/all/56/'
);
const
show
=
ref
(
false
);
// 正则表达式匹配电话号码
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
)
=>
{
return
val
.
replace
(
phoneRegex
,
'<span class="highlight">$1</span>'
);
};
const
detail
=
ref
(
'【贵阳市】贵阳小河二部的业务员【文凯凯, 18784286692】正在为您派件(95720为中通快递员外呼专属号码,请放心接听,如有问题可联系网点:0851-83876676,投诉电话:0851-83876678)'
,
);
const
open
=
()
=>
{
detail
.
value
=
highlightedText
(
detail
.
value
);
const
maskPhoneNumber
=
(
phone
)
=>
{
return
phone
.
replace
(
/
(\d{3})\d{4}(\d{4})
/
,
'$1****$2'
);
};
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
;
};
const
close
=
()
=>
{
show
.
value
=
false
;
};
defineExpose
({
open
,
close
,
...
...
@@ -150,6 +199,12 @@ defineExpose({
border-bottom
:
1px
solid
#ededed
;
padding
:
20rpx
30rpx
33rpx
;
gap
:
26rpx
;
position
:
fixed
;
width
:
100%
;
box-sizing
:
border-box
;
background-color
:
#fff
;
z-index
:
10
;
border-radius
:
16rpx
16rpx
0
0
;
.rowbox
{
display
:
flex
;
...
...
@@ -181,7 +236,7 @@ defineExpose({
border-radius
:
50%
;
}
text
{
.
text
{
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-size
:
28rpx
;
...
...
@@ -207,6 +262,7 @@ defineExpose({
}
.steps
{
margin-top
:
160rpx
;
padding
:
28rpx
30rpx
;
&
:deep
(
.wd-step__icon.is-icon
)
{
...
...
@@ -317,6 +373,7 @@ defineExpose({
display
:
flex
;
flex-direction
:
column
;
gap
:
6rpx
;
.title
{
font-family
:
PingFang
SC
,
...
...
src/pages/assistingAgriculture/order/detail.vue
View file @
940a7884
This diff is collapsed.
Click to expand it.
src/pages/index/loading.vue
View file @
940a7884
...
...
@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import
{
getToken
}
from
'../../utils/auth'
;
onLoad
(
async
(
options
)
=>
{
//
await signIn();
if
(
!
getToken
())
await
signIn2
();
await
signIn
();
//
if (!getToken()) await signIn2();
const
{
type
}
=
options
;
switch
(
type
)
{
case
'0'
:
...
...
@@ -24,7 +24,12 @@ onLoad(async (options) => {
xma
.
reLaunch
({
url
:
'/pages/assistingAgriculture/index/building?categoryId=3266'
});
break
;
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
()
=>
{
...
...
src/pages/order/order.vue
View file @
940a7884
...
...
@@ -78,6 +78,7 @@
>
删除
</view>
<view
v-if=
"item.orderType !== 'logistics'"
>
<view
class=
"btn-info"
v-if=
"item.status === 'receive' || item.status == 'not_use'"
...
...
@@ -85,6 +86,23 @@
>
核销码
</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
class=
"btn-info"
@
tap=
"handleCancel(item.orderNumber)"
...
...
@@ -167,6 +185,7 @@ import {
cancelOrderApi
,
repaymentApi
,
getOrderDetail
,
confirmReceipt
,
}
from
'@/api/order'
;
import
{
getOrderDic
}
from
'@/utils/orderDic'
;
import
{
orderStatus
,
signIn
}
from
'@/utils/signIn'
;
...
...
@@ -302,7 +321,7 @@ const catalog = reactive({
endDate
:
''
,
keyword
:
''
,
status
:
''
,
// 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
orderType
:
''
,
// 团购到店-store,外卖订单-takeaway,筑农物流logistics
orderType
:
'
logistics
'
,
// 团购到店-store,外卖订单-takeaway,筑农物流logistics
});
const
getList
=
async
()
=>
{
if
(
isEnd
.
value
)
return
;
...
...
@@ -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 {
gap
:
10rpx
;
display
:
flex
;
align-items
:
center
;
.text
{
margin-left
:
10rpx
;
font-family
:
...
...
@@ -762,7 +814,7 @@ page {
gap
:
14rpx
;
.btn-info
{
width
:
1
6
2rpx
;
width
:
1
5
2rpx
;
height
:
66rpx
;
border-radius
:
34rpx
;
border
:
1rpx
solid
#999999
;
...
...
src/pages/order/refund.vue
View file @
940a7884
...
...
@@ -23,17 +23,17 @@
<text
class=
"num"
>
{{
orderDetail
.
orderItems
[
0
].
prodCount
}}
</text>
<text>
件商品 实付款
</text>
<text
class=
"icon"
>
¥
</text>
<text
class=
"price"
>
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
<text
class=
"price"
>
{{
orderDetail
.
baseOrder
.
actualTotal
}}
</text>
</view>
</view>
<view
class=
"content-item"
>
<view
class=
"item-buttom"
>
<text>
{{
orderDetail
.
orderStore
.
createTime
}}
</text>
<text>
{{
orderDetail
.
baseOrder
.
createTime
}}
</text>
</view>
</view>
<view
class=
"content-between"
>
<text>
退款金额
</text>
<text
class=
"price"
>
¥
{{
orderDetail
.
orderStore
.
actualTotal
}}
</text>
<text
class=
"price"
>
¥
{{
orderDetail
.
baseOrder
.
actualTotal
}}
</text>
</view>
<view
class=
"content-between"
>
<text>
相关图片
</text>
...
...
src/pages/storeEntry/detail.vue
View file @
940a7884
...
...
@@ -253,8 +253,7 @@ const cardBackwardNull = ref(false);
const
qualificationsNull
=
ref
(
false
);
// 用户选择的分类
const
choosedShopInfo
=
ref
([]);
// 临时创建的用户选择分类
const
tempChoosedData
=
ref
([]);
// 确保choosedShopInfo内是用户最新选择的分类
const
chooseShopType
=
(
id
,
name
)
=>
{
let
hasSameData
=
false
;
...
...
@@ -265,35 +264,18 @@ const chooseShopType = (id, name) => {
});
if
(
!
hasSameData
)
{
choosedShopInfo
.
value
.
push
({
areaId
:
id
,
areaName
:
name
,
qualifications
:
''
});
tempChoosedData
.
value
.
push
({
areaId
:
id
,
areaName
:
name
,
qualifications
:
''
,
tag
:
'add'
});
}
else
{
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
;
});
}
console
.
log
(
'临时数组'
);
console
.
log
(
tempChoosedData
.
value
);
};
// 删除图片之前的提示
const
beforeRemove
=
({
file
,
fileList
,
resolve
})
=>
{
xma
.
showModal
({
title
:
'提示'
,
content
:
'确定删除图片
'
+
file
.
name
+
'吗
'
,
content
:
'确定删除图片
吗?
'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
xma
.
showToast
({
title
:
'删除成功'
,
duration
:
2000
});
...
...
@@ -505,30 +487,7 @@ const show = ref(false);
// 关闭店铺分类弹出层
const
handleClose
=
()
=>
{
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
(()
=>
{
testFileList
.
value
=
choosedShopInfo
.
value
.
reduce
((
obj
,
item
)
=>
{
if
(
item
.
qualifications
===
''
)
{
...
...
@@ -563,7 +522,6 @@ const chooseCategory = () => {
// 显示店铺分类弹窗
const
showclass
=
()
=>
{
show
.
value
=
true
;
tempChoosedData
.
value
=
[];
};
const
isCategoryNull
=
ref
(
false
);
...
...
@@ -876,7 +834,6 @@ page {
font-size
:
var
(
--
wot-input-fs
,
var
(
--
wot-cell-title-fs
,
14px
));
color
:
var
(
--
wot-input-placeholder-color
,
#bfbfbf
);
}
.text.shopcateboxtxt
{
margin-left
:
0px
;
}
...
...
@@ -919,10 +876,8 @@ page {
.newAddCertification
{
margin-top
:
40rpx
;
.citem
{
margin-bottom
:
20rpx
;
.titleOfC
{
margin-bottom
:
10rpx
;
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