Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
gd_yc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
af423e2b
authored
2024-01-26 10:24:33 +0800
by
杨炀
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
37e8b001
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
34 deletions
common/hotel.js
pages/index/index.vue
pages_hotel/hotel/detail.vue
pages_hotel/hotel/hotelDetail.vue
pages_hotel/hotel/myBills.vue
pages_hotel/hotel/pay.vue
common/hotel.js
View file @
af423e2
...
...
@@ -17,7 +17,7 @@ function getComanyList(params) {
}
function
getTrainDetail
(
id
)
{
return
request
({
url
:
`/train/info/
${
id
}
`
,
url
:
`/train/info/
getTrainByUser/
${
id
}
`
,
method
:
'get'
,
params
:
id
})
...
...
@@ -168,10 +168,10 @@ function cancelOrder2(orderId) {
}
function
payForOrder
(
orderId
)
{
const
nowOpenId
=
uni
.
getStorageSync
(
'nowOpenId'
);
//
const nowOpenId = uni.getStorageSync('nowOpenId');
return
request
({
// url: `/logex/order/payForOrder?orderId=${orderId}&openId=${nowOpenId}`,
url
:
`/
logex/norder/payForOrder?orderId=
${
orderId
}
&openId=
${
nowOpen
Id
}
`
,
url
:
`/
train/order/payForOrder?orderId=
${
order
Id
}
`
,
method
:
'post'
,
params
:
orderId
})
...
...
pages/index/index.vue
View file @
af423e2
...
...
@@ -53,7 +53,7 @@
</view>
<view
class=
"contentbox"
style=
"padding: 0;"
>
<view
class=
"content"
>
<uni-grid
:column=
"
4
"
:highlight=
"true"
:showBorder=
"false"
>
<uni-grid
:column=
"
3
"
:highlight=
"true"
:showBorder=
"false"
>
<uni-grid-item
v-for=
"(item, index) in list"
:index=
"index"
:key=
"index"
>
<view
class=
"grid-item-box"
@
click=
"goItem(item)"
>
<image
:src=
"item.partLogo"
class=
"image"
mode=
"aspectFill"
/>
...
...
@@ -127,13 +127,8 @@
partLogo
:
'/static/btn01.png'
,
path
:
'/pages_hotel/hotel/index'
},
{
id
:
1
,
name
:
'预订'
,
partLogo
:
'/static/btn02.png'
,
path
:
'/pages_hotel/hotel/index'
},
{
id
:
2
,
name
:
'
在线学习
'
,
name
:
'
校园风采
'
,
partLogo
:
'/static/btn03.png'
,
path
:
''
},
{
...
...
pages_hotel/hotel/detail.vue
View file @
af423e2
...
...
@@ -91,7 +91,8 @@
onShow
,
onPullDownRefresh
}
from
'@dcloudio/uni-app'
;
import
config
from
'@/config'
;
import
config
from
'@/config'
;
import
dayjs
from
'dayjs'
const
app
=
getApp
();
const
popYanZheng
=
ref
(
null
);
const
loading
=
ref
(
false
);
...
...
@@ -128,14 +129,14 @@
};
}
})
onShow
(()
=>
{
getData
()
})
let
goPath
function
getData
()
{
hotel
.
getTrainDetail
(
id
.
value
).
then
(
res
=>
{
form
.
value
=
res
.
data
form
.
value
=
res
.
data
if
(
form
.
value
.
isApply
){
isApply
.
value
=
form
.
value
.
isApply
}
})
}
...
...
@@ -154,6 +155,16 @@
}
})
return
}
const
today
=
dayjs
().
valueOf
()
const
start
=
dayjs
(
form
.
value
.
trainStart
).
valueOf
()
// console.log(today,start)
if
(
start
<
today
){
uni
.
showToast
({
title
:
'培训已过期,不能报名'
,
icon
:
'none'
})
return
}
let
path
=
`/pages/form/index?id=
${
form
.
value
.
id
}
`
;
uni
.
navigateTo
({
...
...
pages_hotel/hotel/hotelDetail.vue
View file @
af423e2
...
...
@@ -38,7 +38,7 @@
<view
class=
"fixedBottom"
v-if=
"type == 0"
>
<view>
总金额:
<text
class=
"price"
>
¥
{{
totalMoney
}}
</text></view>
<
button
class=
"subBtn btn"
@
click=
"submit"
>
费用缴纳
</button
>
<
!--
<button
class=
"subBtn btn"
@
click=
"submit"
>
费用缴纳
</button>
--
>
</view>
</view>
...
...
pages_hotel/hotel/myBills.vue
View file @
af423e2
...
...
@@ -25,17 +25,17 @@
<view
class=
"pp"
v-if=
"s.orderType==2"
>
就餐次数:{{s.repastNum}}次
</view>
<!-- 0:代付款 1:已付款 2:取消支付 -->
<view
class=
"status"
>
<text
class=
"gary"
v-if=
"
b.status == '0'&&b.surplus!='0,0'&&b
.surplus!='0'"
<text
class=
"gary"
v-if=
"
s.status == '0'&&s.surplus!='0,0'&&s
.surplus!='0'"
style=
"margin-right: 48rpx;"
>
待支付
</text>
<text
class=
"success"
v-if=
"
b
.status == '1'"
>
已付款
</text>
<text
class=
"warning"
v-if=
"
b
.status == '2'"
>
取消支付
</text>
<text
class=
"success"
v-if=
"
s
.status == '1'"
>
已付款
</text>
<text
class=
"warning"
v-if=
"
s
.status == '2'"
>
取消支付
</text>
</view>
<view
class=
"time"
v-if=
"
b.status == '0'&&(b.surplus&&b.surplus!='0,0'&&b
.surplus!='0')"
>
<view
class=
"time"
v-if=
"
s.status == '0'&&(s.surplus&&s.surplus!='0,0'&&s
.surplus!='0')"
>
(
<uni-countdown
style=
"display: inline-block;"
:font-size=
"12"
color=
"#999"
splitorColor=
"#999"
@
timeup=
"timeup"
:show-day=
"false"
:show-hour=
"false"
:start=
"true"
:minute=
"Number(
b
.surplus?.split(',')[0])"
:second=
"Number(
b
.surplus?.split(',')[1])"
></uni-countdown>
)
:minute=
"Number(
s
.surplus?.split(',')[0])"
:second=
"Number(
s
.surplus?.split(',')[1])"
></uni-countdown>
)
</view>
<view
class=
"billFoot"
>
...
...
@@ -44,8 +44,8 @@
<view
style=
"display: flex;"
>
<button
class=
"billbtn"
@
click
.
stop=
"showDetail(
b
,s.orderType)"
>
详情
</button>
<button
class=
"billbtn sxbtn"
v-if=
"
b
.status == '0'"
@
click=
"goPay(b)"
>
<button
class=
"billbtn"
@
click
.
stop=
"showDetail(
s
,s.orderType)"
>
详情
</button>
<button
class=
"billbtn sxbtn"
v-if=
"
s
.status == '0'"
@
click=
"goPay(b)"
>
支付
</button>
</view>
</view>
...
...
@@ -183,7 +183,7 @@
padding
:
0
25
rpx
70
rpx
;
}
.sonArea
{
min-height
:
5
0
0px
;
.sonArea
{
min-height
:
5
6
0px
;
.billItem
{
padding
:
40
rpx
0
10
rpx
;
...
...
pages_hotel/hotel/pay.vue
View file @
af423e2
...
...
@@ -116,16 +116,16 @@ function submit(){
}
}
function
goPayForOrder
(){
//
hotel.payForOrder(orderId.value).then(res=>{
//
isClick.value = false
//
if (res.data.weixinData) {
//
wePay(res.data.weixinData)
//
} else {
hotel
.
payForOrder
(
orderId
.
value
).
then
(
res
=>
{
isClick
.
value
=
false
if
(
res
.
data
.
weixinData
)
{
wePay
(
res
.
data
.
weixinData
)
}
else
{
uni
.
hideLoading
()
uni
.
showModal
({
title
:
'提示'
,
//
content: '暂时无法支付,请稍后重试',
content
:
'支付成功'
,
content
:
'暂时无法支付,请稍后重试'
,
//
content: '支付成功',
showCancel
:
false
,
success
:
function
(
res
)
{
// uni.navigateBack()
...
...
@@ -135,8 +135,8 @@ function submit(){
});
}
});
//
}
//
})
}
})
}
function
wePay
(
configdata
){
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment