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
947df9fe
Commit
947df9fe
authored
Oct 13, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9c854fd2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
130 deletions
+65
-130
jz_MyOrder.vue
pages/jiuzhai/jz_MyOrder.vue
+18
-2
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+24
-116
jz_SureOrder.vue
pages/jiuzhai/jz_SureOrder.vue
+23
-12
No files found.
pages/jiuzhai/jz_MyOrder.vue
View file @
947df9fe
...
...
@@ -170,13 +170,22 @@
>
再来一单
</view
>
<!-- #ifdef MP-WEIXIN -->
<view
<
!--
<
view
v-if=
"item.orderState == 2"
class=
"jz_Zailai"
style=
"width: 110rpx; margin-right: 10rpx"
@
click
.
stop=
"goZhifu(item)"
>
付款
</view
>
-->
<button
v-if=
"item.orderState == 2"
class=
"jz_Zailai"
style=
"width: 110rpx; margin-right: 10rpx"
@
click
.
stop=
"goZhifu(item)"
:disabled=
"disabledBtn"
>
付款
</button>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view
...
...
@@ -243,6 +252,7 @@ export default {
status
:
"加载中"
,
price
:
0
,
showBar
:
true
,
disabledBtn
:
false
,
};
},
created
()
{
...
...
@@ -394,6 +404,7 @@ export default {
// #ifdef MP-WEIXIN
goZhifu
(
item
)
{
console
.
log
(
item
,
"item"
);
this
.
disabledBtn
=
true
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
item
.
title
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
...
...
@@ -424,6 +435,7 @@ export default {
signType
:
orderInfo
.
signType
,
paySign
:
orderInfo
.
sign
,
success
:
function
(
res
)
{
this
.
disabledBtn
=
false
;
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
,
...
...
@@ -437,6 +449,7 @@ export default {
});
},
fail
:
function
(
err
)
{
this
.
disabledBtn
=
false
;
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
...
...
@@ -447,6 +460,7 @@ export default {
// #endif
// #ifdef MP-ALIPAY
goZhifuAli
(
item
)
{
this
.
disabledBtn
=
true
;
console
.
log
(
item
,
"item"
);
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
this
.
price
=
item
.
preferPrice
;
...
...
@@ -481,6 +495,7 @@ export default {
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
this
.
disabledBtn
=
false
;
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
...
...
@@ -489,7 +504,6 @@ export default {
});
},
payAliCallback
(
obj
)
{
console
.
log
(
893
),
Obj
;
this
.
request2
(
{
url
:
"/api/AliPay/ALiPayCallBackDmcNotify"
,
...
...
@@ -504,6 +518,7 @@ export default {
},
(
res
)
=>
{
console
.
log
(
"cb"
,
res
);
this
.
disabledBtn
=
false
;
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
...
...
@@ -513,6 +528,7 @@ export default {
},
(
err
)
=>
{
console
.
log
(
"cb2"
,
err
);
this
.
disabledBtn
=
false
;
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
947df9fe
...
...
@@ -98,7 +98,9 @@
}
.jz_OrderReNow
{
/* #ifdef MP-ALIPAY */
width
:
150
rpx
;
/* #endif */
height
:
80
rpx
;
background-color
:
#111111
;
text-align
:
center
;
...
...
@@ -443,18 +445,14 @@
>
</view>
<view
style=
"display: flex; margin-top: -2px"
>
<!-- #ifdef MP-WEIXIN -->
<view
class=
"jz_OrderReNow"
@
click=
"goPay()"
>
<text
v-if=
"!submit"
>
立即支付
</text>
<u-loading
v-if=
"submit"
size=
"32"
color=
"#f5f5f5"
></u-loading>
</view>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view
class=
"jz_OrderReNow"
@
click=
"goPayAli()"
>
<text
v-if=
"!submit"
>
立即支付
</text>
<u-loading
v-if=
"submit"
size=
"32"
color=
"#f5f5f5"
></u-loading>
</view>
<!-- #endif -->
<button
class=
"jz_OrderReNow"
@
click=
"goPay()"
:disabled=
"submit"
:loading=
"submit"
>
立即支付
</button>
</view>
</view>
</view>
...
...
@@ -497,7 +495,6 @@ export default {
});
},
onLoad
(
option
)
{
console
.
log
(
504
,
option
);
if
(
option
.
seat
)
{
this
.
currentPriceInfo
=
JSON
.
parse
(
decodeURIComponent
(
option
.
currentPriceInfo
)
...
...
@@ -605,7 +602,6 @@ export default {
this
.
price
=
money
;
},
//去支付
// #ifdef MP-WEIXIN
goPay
()
{
if
(
this
.
contactName
==
""
)
{
uni
.
showToast
({
...
...
@@ -676,7 +672,12 @@ export default {
ScenicRefundArr
:
[],
CommissionSharePeople
:
0
,
CommissionShareMoney
:
0
,
// #ifdef MP-WEIXIN
OrderSource
:
5
,
// #endif
// #ifdef MP-ALIPAY
OrderSource
:
6
,
// #endif
MiniAppUserId
:
this
.
userInfo
.
UserId
,
};
this
.
apipost
(
...
...
@@ -688,7 +689,12 @@ export default {
data
.
CoverImg
=
this
.
currentPriceInfo
.
CoverImg
;
let
myData
=
JSON
.
stringify
(
data
);
this
.
orderData
=
encodeURIComponent
(
myData
);
// #ifdef MP-WEIXIN
this
.
queren
(
data
.
OrderId
);
// #endif
// #ifdef MP-ALIPAY
this
.
querenAli
(
data
);
// #endif
}
else
{
}
this
.
submit
=
false
;
...
...
@@ -699,6 +705,8 @@ export default {
);
}
},
// #ifdef MP-WEIXIN
//微信支付
queren
(
OrderId
)
{
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
this
.
currentPriceInfo
.
title
;
...
...
@@ -759,101 +767,7 @@ export default {
},
// #endif
// #ifdef MP-ALIPAY
goPayAli
()
{
if
(
this
.
contactName
==
""
)
{
uni
.
showToast
({
title
:
"请输入联系人姓名"
,
icon
:
"none"
,
});
}
else
if
(
this
.
contactMobile
==
""
)
{
uni
.
showToast
({
title
:
"请输入联系人电话"
,
icon
:
"none"
,
});
}
else
{
this
.
submit
=
true
;
this
.
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
basedataObj
=
uni
.
getStorageSync
(
"basedata"
).
mall
;
var
CustomerId
=
this
.
basedataObj
.
virtualB2BCustomerId
;
var
ContactName
=
this
.
contactName
;
var
ContactMobile
=
this
.
contactMobile
;
var
CustomerType
=
4
;
var
price
=
this
.
currentPriceInfo
.
b2CPrice
;
let
msg
=
{
OrderId
:
0
,
TCID
:
this
.
currentPriceInfo
.
tcid
,
CustomerType
:
CustomerType
,
GroupType
:
1
,
ContactName
:
ContactName
,
ContactMobile
:
ContactMobile
,
CustomerId
:
CustomerId
,
DepartureCityId
:
262
,
IsIntermodal
:
2
,
Unit_Price
:
price
,
TC_Price
:
price
,
ManNum
:
this
.
orderMsg
.
ManNum
,
ChirdNum
:
this
.
orderMsg
.
ChirdNum
,
ChirdNeedBedNum
:
this
.
orderMsg
.
ChirdNeedBedNum
,
BabyNum
:
this
.
orderMsg
.
BabyNum
,
OldPeopleNum
:
0
,
SingleRoomNum
:
0
,
PreferPrice
:
this
.
price
,
YSeatNum
:
this
.
total
,
ESeatNum
:
0
,
FSeatNum
:
0
,
Commission
:
0
,
//todo 提成
ClientSource
:
2
,
BrandId
:
0
,
TradeWay
:
0
,
PlatformOrder
:
""
,
GuestNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
+
this
.
orderMsg
.
BabyNum
,
IsChildrenTour
:
this
.
currentPriceInfo
.
isSupportChildren
,
IsBirdDiscount
:
this
.
zaoniao
>
0
?
1
:
2
,
PredictRoomNum
:
1
,
BigRoomNum
:
0
,
TripleRoomNum
:
0
,
TradeDate
:
this
.
currentPriceInfo
.
startDate
,
CostType
:
0
,
MinOrderPrice
:
0
,
Remarks
:
""
,
VisaNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
,
SafeNum
:
this
.
orderMsg
.
ManNum
+
this
.
orderMsg
.
ChirdNum
,
AirticketNum
:
0
,
ReturnArriveCityId
:
262
,
IsReturnIntermodal
:
2
,
GoCityTime
:
""
,
BackCityTime
:
""
,
ScenicRefundArr
:
[],
CommissionSharePeople
:
0
,
CommissionShareMoney
:
0
,
OrderSource
:
6
,
MiniAppUserId
:
this
.
userInfo
.
UserId
,
};
this
.
apipost
(
"sellorder_post_SetOrderInfoForB2B"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
let
data
=
res
.
data
;
data
.
CoverImg
=
this
.
currentPriceInfo
.
CoverImg
;
let
myData
=
JSON
.
stringify
(
data
);
this
.
orderData
=
encodeURIComponent
(
myData
);
this
.
querenAli
(
data
);
OrderId
;
}
else
{
}
this
.
submit
=
false
;
},
(
e
)
=>
{
this
.
submit
=
false
;
}
);
}
},
//支付宝支付
querenAli
(
data
)
{
let
that
=
this
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
...
...
@@ -871,13 +785,7 @@ export default {
(
res
)
=>
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
if
(
res
.
data
)
{
let
cbObj
=
{
TradeNo
:
res
.
data
,
OrderNo
:
data
.
OrderNo
,
OrderId
:
data
.
OrderId
,
preferPrice
:
data
.
PreferPrice
,
};
this
.
payAliCallback
(
cbObj
);
that
.
PayAli
(
res
.
data
,
data
);
}
else
{
uni
.
showToast
({
title
:
"获取交易号失败"
,
...
...
pages/jiuzhai/jz_SureOrder.vue
View file @
947df9fe
...
...
@@ -601,16 +601,24 @@
</view>
<view
style=
"display: flex; margin-left: 30rpx"
>
<!-- #ifdef MP-WEIXIN -->
<view
class=
"jz_OrderReNow"
@
click=
"goFukuan"
v-if=
"showPayBtn"
>
<text
v-if=
"!submit"
>
立即支付
</text>
<u-loading
v-if=
"submit"
size=
"32"
color=
"#f5f5f5"
></u-loading>
</view>
<button
class=
"jz_OrderReNow"
@
click=
"goFukuan"
v-if=
"showPayBtn"
:disabled=
"submit"
>
立即支付
</button>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view
class=
"jz_OrderReNow"
@
click=
"goZhifuAli"
v-if=
"showPayBtn"
>
<text
v-if=
"!submit"
>
立即支付
</text>
<u-loading
v-if=
"submit"
size=
"32"
color=
"#f5f5f5"
></u-loading>
</view>
<button
class=
"jz_OrderReNow"
@
click=
"goZhifuAli"
v-if=
"showPayBtn"
:disabled=
"submit"
>
立即支付
</button>
<!-- #endif -->
</view>
</view>
...
...
@@ -648,7 +656,9 @@ export default {
},
methods
:
{
goback
()
{
uni
.
navigateBack
();
uni
.
navigateBack
({
delta
:
1
,
});
},
goCancel
()
{
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
...
...
@@ -863,9 +873,9 @@ export default {
console
.
log
(
"success"
,
res
);
let
obj
=
{
TradeNo
:
tradeNO
,
OrderNo
:
item
.
orderNo
,
OrderId
:
item
.
orderId
,
preferPrice
:
item
.
p
referPrice
,
OrderNo
:
that
.
orderData
.
model
.
orderNo
,
OrderId
:
that
.
orderData
.
model
.
orderId
,
preferPrice
:
that
.
orderData
.
model
.
P
referPrice
,
};
that
.
payAliCallback
(
obj
);
},
...
...
@@ -900,6 +910,7 @@ export default {
},
(
err
)
=>
{
console
.
log
(
"err"
,
err
);
that
.
submit
=
false
;
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
...
...
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