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
5e89b49d
Commit
5e89b49d
authored
Aug 15, 2024
by
周俊涛(东信)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
56848faa
9a9fd0d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
32 deletions
+80
-32
RouteDetails.vue
src/pages/assistingAgriculture/RouteDetails/RouteDetails.vue
+76
-22
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+4
-10
No files found.
src/pages/assistingAgriculture/RouteDetails/RouteDetails.vue
View file @
5e89b49d
...
...
@@ -148,7 +148,7 @@
<div
class=
"date-wrap"
>
<div
class=
"date-title"
>
选择日期
</div>
<div
class=
"date-list flex-between"
>
<div
class=
"list"
>
<div
class=
"list"
style=
"margin-top: 20rpx"
>
<div
class=
"item"
:class=
"
{ active: activePrice === v }"
...
...
@@ -328,7 +328,8 @@ import {
getItinerary
,
getStoreInformation
,
}
from
'@/api/assistingAgriculture/route'
;
import
{
groupBuyConfirm
,
groupBuyUpdate
}
from
'@/api/confirmOrder'
;
import
{
sgyOrderOrderInfo
}
from
'@/api/assistingAgriculture/shop'
;
import
{
groupBuyConfirm
,
groupBuyUpdate
,
groupBuyCreate
}
from
'@/api/confirmOrder'
;
import
{
getCollect
}
from
'@/api/packageDetail'
;
/* 监听滑动改变顶部颜色 */
const
backgroundBox
=
ref
(
''
);
...
...
@@ -373,6 +374,41 @@ watch(show, (value) => {
index
=
Math
.
min
(
priceList
.
value
.
length
-
3
,
index
);
viewPriceList
.
value
=
priceList
.
value
.
slice
(
index
-
1
,
index
+
3
);
});
onShow
(()
=>
{
if
(
outTradeNos
.
value
)
{
// 查询订单状态决定是否支付
sgyOrderOrderInfo
({
orderNumber
:
outTradeNos
.
value
}).
then
((
res
)
=>
{
switch
(
res
.
data
.
baseOrder
.
subStatus
)
{
case
'1'
:
xma
.
showToast
({
title
:
'支付失败'
,
icon
:
'error'
,
duration
:
1000
,
success
()
{
setTimeout
(()
=>
{
xma
.
redirectTo
({
url
:
`/pages/order/order?status=not_pay`
,
});
},
1500
);
},
});
break
;
case
'2'
:
xma
.
redirectTo
({
url
:
`/pages/order/detail?orderNumber=
${
outTradeNos
.
value
}
`
,
});
break
;
case
'3'
:
xma
.
redirectTo
({
url
:
`/pages/order/detail?orderNumber=
${
outTradeNos
.
value
}
`
,
});
break
;
default
:
break
;
}
});
}
});
const
getWeek
=
(
date
)
=>
{
const
week
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
];
return
week
[
new
Date
(
date
).
getDay
()];
...
...
@@ -393,7 +429,7 @@ function jumpPage() {
}
function
groupBuyConfirmFn
(
prodId
,
skuId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
groupBuyConfirm
({
prodId
,
skuId
}).
then
((
res
)
=>
{
groupBuyConfirm
({
prodId
,
skuId
,
orderType
:
'store'
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
orderInfo
.
value
=
res
.
data
;
resolve
(
res
.
data
.
shopId
);
...
...
@@ -428,33 +464,51 @@ function formatDate(inputDate) {
}
const
payNow
=
async
(
data
)
=>
{
groupBuyConfirmFn
(
activeMeal
.
value
.
prodId
,
activeMeal
.
value
.
skuId
).
then
((
res
)
=>
{
groupBuyUpdateFnQg
().
then
(()
=>
{});
groupBuyUpdateFnQg
().
then
(()
=>
{
const
qgParams
=
{
id
:
orderInfo
.
value
.
key
,
placeOrderWay
:
'sgy'
,
payWayCode
:
5
,
tradeType
:
data
.
selectType
,
};
groupBuyCreate
(
qgParams
).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
openUrl
(
res
.
data
.
result
);
}
else
{
groupBuyConfirmFn
(
activeMeal
.
value
.
prodId
,
activeMeal
.
value
.
skuId
);
}
});
});
});
params
.
value
.
id
=
orderInfo
.
value
.
key
;
params
.
value
.
tradeType
=
data
.
selectType
;
params
.
value
.
basketIds
=
basketIds
.
value
;
const
qgParams
=
{
id
:
orderInfo
.
value
.
key
,
placeOrderWay
:
'sgy'
,
payWayCode
:
5
,
tradeType
:
data
.
selectType
,
};
// groupBuyCreate(qgParams).then((res) => {
// if (res.code === 0) {
// openUrl(res.data.result);
// } else {
// groupBuyConfirmFn(prodIds.value, skuIds.value);
// }
// });
};
function
groupBuyUpdateFnQg
(
couponUserId
=
''
)
{
const
outTradeNos
=
ref
(
null
);
const
openUrl
=
(
result
)
=>
{
const
{
paymentUrl
,
outTradeNo
}
=
result
;
outTradeNos
.
value
=
outTradeNo
;
window
.
location
.
href
=
paymentUrl
;
// 设置一个延时器
const
start
=
Date
.
now
();
setTimeout
(()
=>
{
const
end
=
Date
.
now
();
if
(
end
-
start
<
1200
)
{
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma
.
showToast
({
title
:
'未安装App'
,
icon
:
'error'
,
});
// 这里可以跳转到应用下载页面
}
},
1600
);
};
function
groupBuyUpdateFnQg
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
groupBuyUpdate
({
key
:
orderInfo
.
value
.
key
,
receiverTime
:
formatDate
(
activePrice
.
value
.
priceDay
),
receiverTime
:
activePrice
.
value
.
priceDay
.
replace
(
' '
,
'-'
),
}).
then
((
res
)
=>
{
if
(
res
.
code
===
0
)
{
orderInfo
.
value
=
res
.
data
;
resolve
();
}
});
});
...
...
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
5e89b49d
...
...
@@ -697,7 +697,7 @@ page {
}
.tag
{
margin-top
:
10rpx
;
width
:
4
00rpx
;
width
:
6
00rpx
;
}
.detail-score
{
margin-top
:
30rpx
;
...
...
@@ -746,18 +746,12 @@ uni-video {
left
:
20rpx
;
border-radius
:
16rpx
;
}
::v-deep
.uni-video-controls
{
margin
:
0
;
}
.no-more-data
{
text-align
:
center
;
padding
:
20rpx
;
color
:
#999
;
}
/* 默认隐藏进度条 */
.
spe-img1
:
:-
webkit-media-controls-progress-panel
{
display
:
none
;
}
/* 当全屏时显示进度条 */
.
spe-img1
.
no-progress-bar
:
:-
webkit-media-controls-progress-panel
{
display
:
block
;
}
</
style
>
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