Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
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
zhengke
jz_Travel
Commits
4a08ee85
Commit
4a08ee85
authored
Jun 03, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
b1a97027
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
13 deletions
+92
-13
jz_MyOrder.vue
pages/jiuzhai/jz_MyOrder.vue
+73
-8
jz_SureOrder.vue
pages/jiuzhai/jz_SureOrder.vue
+6
-1
paysuccess.vue
pages/jiuzhai/paysuccess.vue
+13
-4
No files found.
pages/jiuzhai/jz_MyOrder.vue
View file @
4a08ee85
...
...
@@ -65,9 +65,6 @@
}
.jz_Zailai
{
position
:
absolute
;
right
:
40
rpx
;
bottom
:
20
rpx
;
background-color
:
#111111
;
border-radius
:
16px
;
width
:
150
rpx
;
...
...
@@ -81,6 +78,13 @@
.isShowAll
{
height
:
auto
;
}
.jz_BtnContent
{
margin-top
:
15px
;
right
:
40
rpx
;
bottom
:
20
rpx
;
display
:
flex
;
justify-content
:
flex-end
;
}
</
style
>
<
template
>
<view
class=
"jz_MyOrder"
>
...
...
@@ -99,7 +103,7 @@
<u-icon
name=
"arrow-up"
@
click=
"getShow(item)"
v-else
color=
"#2979ff"
size=
"28"
></u-icon>
</view>
<view
class=
"jz-Oright"
>
{{
item
.
orderStateName
}}
{{
item
.
orderStateName
==
'占位'
?
'待付款'
:
item
.
orderStateName
}}
</view>
</view>
<view
style=
"display:flex;"
>
...
...
@@ -111,8 +115,12 @@
<view
style=
"margin-top:22rpx;"
>
付款总额:¥
{{
item
.
preferPrice
}}
</view>
</view>
</view>
<view
class=
"jz_Zailai"
style=
"right:90px;"
@
click=
"gojz_List"
>
再来一单
</view>
<view
class=
"jz_Zailai"
style=
"width:60px;"
@
click=
"goCancel(item)"
>
取消
</view>
<view
v-if=
"item.isApplyForCancel==1"
style=
"color:red;font-size:24rpx;margin-left:122rpx;"
>
订单取消,正在确认中!
</view>
<view
class=
"jz_BtnContent"
>
<view
class=
"jz_Zailai"
style=
"margin-right:10rpx;"
@
click=
"gojz_List"
>
再来一单
</view>
<view
v-if=
"item.orderState==2"
class=
"jz_Zailai"
style=
"width:110rpx;margin-right:10rpx;"
@
click=
"goZhifu(item)"
>
付款
</view>
<view
v-if=
"item.isApplyForCancel!=1"
class=
"jz_Zailai"
style=
"width:110rpx;"
@
click=
"goCancel(item)"
>
取消
</view>
</view>
</view>
</scroll-view>
</view>
...
...
@@ -141,8 +149,11 @@
name
:
'待付款'
,
Id
:
2
},
{
name
:
'已
付款
'
,
name
:
'已
完成
'
,
Id
:
1
},{
name
:
'已取消'
,
Id
:
4
}],
current
:
0
,
dataList
:
[],
...
...
@@ -153,6 +164,7 @@
nomore
:
"没有更多了"
,
},
status
:
"加载中"
,
price
:
0
};
},
created
()
{
...
...
@@ -201,6 +213,10 @@
this
.
getOrderInfo
(
1
);
},
getOrderInfo
(
type
)
{
uni
.
showLoading
({
title
:
'加载中'
,
icon
:
'none'
})
if
(
type
==
1
){
this
.
dataList
=
[];
}
...
...
@@ -208,6 +224,7 @@
this
.
msg
.
MiniAppUserId
=
this
.
userInfo
.
UserId
this
.
apipost
(
"sellorder_post_GetMiniAppTravelOrderList"
,
this
.
msg
,
res
=>
{
uni
.
hideLoading
();
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据'
);
if
(
type
==
1
){
...
...
@@ -258,7 +275,6 @@
this
.
apipost
(
"sellorder_post_AppletUserCancelOrder"
,
msg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据'
);
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
...
...
@@ -272,6 +288,55 @@
null
);
}
},
//付款
goZhifu
(
item
){
console
.
log
(
item
,
'item'
);
let
url
=
'/api/WeChatPay/GetTravlePayInfo'
let
GoodsName
=
item
.
title
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
this
.
price
=
item
.
preferPrice
;
this
.
request2
({
url
:
url
,
data
:
{
OrderId
:
item
.
orderId
,
GoodsName
:
GoodsName
,
OrderPayType
:
1
,
OpenId
:
uni
.
getStorageSync
(
'mall_UserInfo'
).
OpenId
,
}
},
res
=>
{
let
orderInfo
=
JSON
.
parse
(
res
.
data
);
this
.
goPay
(
orderInfo
)
}
);
},
goPay
(
orderInfo
){
let
that
=
this
;
uni
.
requestPayment
({
provider
:
'wxpay'
,
timeStamp
:
orderInfo
.
timeStamp
,
nonceStr
:
orderInfo
.
nonceStr
,
package
:
orderInfo
.
package
,
signType
:
orderInfo
.
signType
,
paySign
:
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
'success'
,
res
);
uni
.
showToast
({
title
:
"支付成功"
})
//todo
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/paysuccess?PreferPrice='
+
that
.
price
+
'&isFrom=1'
});
},
fail
:
function
(
err
)
{
console
.
log
(
'fail:'
,
err
);
uni
.
showToast
({
title
:
"支付失败"
})
}
});
}
}
...
...
pages/jiuzhai/jz_SureOrder.vue
View file @
4a08ee85
...
...
@@ -199,13 +199,18 @@
title
:
"支付成功"
})
//todo
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/paysuccess?PreferPrice='
+
that
.
orderData
.
PreferPrice
+
'&isFrom=1'
});
},
fail
:
function
(
err
)
{
console
.
log
(
'fail:'
,
err
);
uni
.
showToast
({
title
:
"支付失败"
})
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/jz_MyOrder'
});
}
});
}
...
...
pages/jiuzhai/paysuccess.vue
View file @
4a08ee85
...
...
@@ -38,6 +38,7 @@
showCoupons
:
false
,
couponMessage
:
''
,
PreferPrice
:
''
,
isLineOrder
:
false
};
},
onLoad
(
option
)
{
...
...
@@ -50,14 +51,22 @@
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
themCustomStyle
.
color
=
this
.
mainColor
;
this
.
themCustomStyle
.
borderColor
=
this
.
mainColor
;
if
(
option
.
isFrom
==
1
){
this
.
isLineOrder
=
true
}
},
methods
:
{
redictToOrders
()
{
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/allorderList'
});
if
(
!
this
.
isLineOrder
){
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/allorderList'
});
}
else
{
uni
.
redirectTo
({
url
:
'/pages/jiuzhai/jz_MyOrder'
});
}
},
goHome
()
{
uni
.
reLaunch
({
...
...
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