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
db24da2f
Commit
db24da2f
authored
Oct 12, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
acffdfef
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
131 additions
and
128 deletions
+131
-128
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+46
-22
jz_MyOrder.vue
pages/jiuzhai/jz_MyOrder.vue
+60
-3
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+15
-46
jz_SureOrder.vue
pages/jiuzhai/jz_SureOrder.vue
+10
-57
No files found.
pages/jiuzhai/jz_LineDetail.vue
View file @
db24da2f
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
<view
class=
"jz_TopPrice"
>
<view
class=
"jz_TopPrice"
>
<view
class=
"jz_LineTitle"
>
<view
class=
"jz_LineTitle"
>
<text
class=
"jz_renmin"
>
¥
</text
<text
class=
"jz_renmin"
>
¥
</text
><text
class=
"jz_B2bPrice"
>
{{
currentPrice
.
b2CPrice
}}
</text>
><text
class=
"jz_B2bPrice"
>
{{
currentPrice
.
b2CPrice
}}
</text>
<text
style=
"color: #999999; font-size: 24rpx; font-weight: 400"
>
<text
style=
"color: #999999; font-size: 24rpx; font-weight: 400"
>
/人起
</text
/人起
</text
>
>
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
<text
v-if=
"dataList.title"
>
{{
dataList
.
title
}}
</text>
<text
v-if=
"dataList.title"
>
{{
dataList
.
title
}}
</text>
</view>
</view>
<view
class=
"jz_Maidian"
>
<view
class=
"jz_Maidian"
>
<text>
{{
dataList
.
productRecommend
}}
</text>
<text>
{{
dataList
.
productRecommend
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"jz_Service"
>
<view
class=
"jz_Service"
>
...
@@ -179,7 +179,7 @@
...
@@ -179,7 +179,7 @@
<view
<view
v-if=
"item.remainNum > 0"
v-if=
"item.remainNum > 0"
style=
"color: #ff3166; font-size: 26rpx"
style=
"color: #ff3166; font-size: 26rpx"
>
¥
{{
item
.
b2CPrice
}}
</view
>
¥
{{
item
.
b2CPrice
}}
</view
>
>
<view
v-if=
"item.remainNum == 0"
style=
"padding: 20rpx 0"
>
<view
v-if=
"item.remainNum == 0"
style=
"padding: 20rpx 0"
>
<text
style=
"font-size: 32rpx; font-weight: 600"
>
已售罄
</text>
<text
style=
"font-size: 32rpx; font-weight: 600"
>
已售罄
</text>
...
@@ -914,6 +914,11 @@
...
@@ -914,6 +914,11 @@
</view>
</view>
</view>
</view>
</view>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
...
@@ -922,9 +927,11 @@ import canlendar from "./components/sign/index.vue";
...
@@ -922,9 +927,11 @@ import canlendar from "./components/sign/index.vue";
// #ifdef MP-ALIPAY
// #ifdef MP-ALIPAY
import
parseHtml
from
"../../plugin/htmlparse.js"
;
import
parseHtml
from
"../../plugin/htmlparse.js"
;
// #endif
// #endif
import
auth
from
"@/components/auth/index.vue"
;
export
default
{
export
default
{
components
:
{
components
:
{
canlendar
,
canlendar
,
auth
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -958,6 +965,8 @@ export default {
...
@@ -958,6 +965,8 @@ export default {
currentPrice
:
{},
currentPrice
:
{},
canCreateOrder
:
false
,
canCreateOrder
:
false
,
finishFirstLoad
:
false
,
finishFirstLoad
:
false
,
showAuth
:
false
,
U
:
{},
};
};
},
},
created
()
{},
created
()
{},
...
@@ -1047,6 +1056,13 @@ export default {
...
@@ -1047,6 +1056,13 @@ export default {
},
},
});
});
},
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
},
openOrderPreview
()
{
openOrderPreview
()
{
if
(
this
.
canCreateOrder
&&
this
.
finishFirstLoad
)
{
if
(
this
.
canCreateOrder
&&
this
.
finishFirstLoad
)
{
this
.
showOrderPreviwe
=
true
;
this
.
showOrderPreviwe
=
true
;
...
@@ -1123,7 +1139,7 @@ export default {
...
@@ -1123,7 +1139,7 @@ export default {
this
.
dataList
=
res
.
data
;
this
.
dataList
=
res
.
data
;
this
.
scenicNum
=
0
;
this
.
scenicNum
=
0
;
//this.dataList.productRecommend=this.dataList.productRecommend.split('\n').join('&hc')
//this.dataList.productRecommend=this.dataList.productRecommend.split('\n').join('&hc')
console
.
log
(
this
.
dataList
.
productRecommend
)
console
.
log
(
this
.
dataList
.
productRecommend
);
this
.
dataList
.
dayList
.
forEach
((
x
)
=>
{
this
.
dataList
.
dayList
.
forEach
((
x
)
=>
{
x
.
dayArray
.
forEach
((
y
)
=>
{
x
.
dayArray
.
forEach
((
y
)
=>
{
if
(
y
.
type
==
2
)
{
if
(
y
.
type
==
2
)
{
...
@@ -1254,10 +1270,19 @@ export default {
...
@@ -1254,10 +1270,19 @@ export default {
},
},
//立即预定
//立即预定
goReserce
()
{
goReserce
()
{
let
myObj
=
{};
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
return
;
}
let
myObj
=
{};
// let myCurrentInfo = this.currentPrice;
// let myCurrentInfo = this.currentPrice;
// myCurrentInfo.startCityName = this.dataList.startCityName;
// myCurrentInfo.startCityName = this.dataList.startCityName;
myObj
.
startCityName
=
this
.
dataList
.
startCityName
myObj
.
startCityName
=
this
.
dataList
.
startCityName
;
myObj
.
startDate
=
this
.
currentPrice
.
startDate
;
myObj
.
startDate
=
this
.
currentPrice
.
startDate
;
myObj
.
dayNum
=
this
.
currentPrice
.
dayNum
;
myObj
.
dayNum
=
this
.
currentPrice
.
dayNum
;
myObj
.
title
=
this
.
currentPrice
.
title
;
myObj
.
title
=
this
.
currentPrice
.
title
;
...
@@ -1272,10 +1297,9 @@ export default {
...
@@ -1272,10 +1297,9 @@ export default {
let
imgCover
=
JSON
.
parse
(
this
.
dataList
.
imgCover
);
let
imgCover
=
JSON
.
parse
(
this
.
dataList
.
imgCover
);
if
(
imgCover
.
length
>
0
)
{
if
(
imgCover
.
length
>
0
)
{
// myCurrentInfo.CoverImg = imgCover[0].Url;
// myCurrentInfo.CoverImg = imgCover[0].Url;
myObj
.
CoverImg
=
imgCover
[
0
].
Url
myObj
.
CoverImg
=
imgCover
[
0
].
Url
;
}
}
let
myCurr
=
JSON
.
stringify
(
myObj
);
let
myCurr
=
JSON
.
stringify
(
myObj
);
let
ren
=
{
let
ren
=
{
crCount
:
this
.
crCount
,
crCount
:
this
.
crCount
,
etCount
:
this
.
etCount
,
etCount
:
this
.
etCount
,
...
...
pages/jiuzhai/jz_MyOrder.vue
View file @
db24da2f
...
@@ -166,21 +166,32 @@
...
@@ -166,21 +166,32 @@
<view
<view
class=
"jz_Zailai"
class=
"jz_Zailai"
style=
"margin-right: 10rpx"
style=
"margin-right: 10rpx"
@
click=
"gojz_List"
@
click
.
stop
=
"gojz_List"
>
再来一单
</view
>
再来一单
</view
>
>
<!-- #ifdef MP-WEIXIN -->
<view
<view
v-if=
"item.orderState == 2"
v-if=
"item.orderState == 2"
class=
"jz_Zailai"
class=
"jz_Zailai"
style=
"width: 110rpx; margin-right: 10rpx"
style=
"width: 110rpx; margin-right: 10rpx"
@
click=
"goZhifu(item)"
@
click=
"goZhifu
.stop
(item)"
>
付款
</view
>
付款
</view
>
>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view
v-if=
"item.orderState == 2"
class=
"jz_Zailai"
style=
"width: 110rpx; margin-right: 10rpx"
@
click
.
stop=
"goZhifuAli(item)"
>
付款
</view
>
<!-- #endif -->
<view
<view
v-if=
"item.isApplyForCancel != 1"
v-if=
"item.isApplyForCancel != 1"
class=
"jz_Zailai"
class=
"jz_Zailai"
style=
"width: 110rpx"
style=
"width: 110rpx"
@
click=
"goCancel(item)"
@
click=
"goCancel
.stop
(item)"
>
取消
</view
>
取消
</view
>
>
</view>
</view>
...
@@ -380,6 +391,7 @@ export default {
...
@@ -380,6 +391,7 @@ export default {
}
}
},
},
//付款
//付款
// #ifdef MP-WEIXIN
goZhifu
(
item
)
{
goZhifu
(
item
)
{
console
.
log
(
item
,
"item"
);
console
.
log
(
item
,
"item"
);
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
...
@@ -432,6 +444,51 @@ export default {
...
@@ -432,6 +444,51 @@ export default {
},
},
});
});
},
},
// #endif
// #ifdef MP-ALIPAY
goZhifuAli
(
item
)
{
console
.
log
(
item
,
"item"
);
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
this
.
price
=
item
.
preferPrice
;
this
.
request2
(
{
url
:
url
,
data
:
{
OrderId
:
item
.
orderId
,
GoodsName
:
item
.
title
,
OrderPayType
:
2
,
OpenId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
,
},
},
(
res
)
=>
{
this
.
goPayAli
(
res
.
data
);
}
);
},
goPayAli
(
tradeNO
)
{
let
that
=
this
;
my
.
tradePay
({
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
if
(
res
.
resultCode
==
"9000"
)
{
that
.
getOrderInfo
();
}
else
if
(
res
.
resultCode
==
"6001"
)
{
uni
.
showToast
({
title
:
"支付取消"
,
});
}
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
},
});
},
// #endif
},
},
};
};
</
script
>
</
script
>
pages/jiuzhai/jz_Reserve.vue
View file @
db24da2f
...
@@ -295,7 +295,7 @@
...
@@ -295,7 +295,7 @@
<view
class=
"label"
>
联系电话
</view>
<view
class=
"label"
>
联系电话
</view>
<view
class=
"val"
>
<view
class=
"val"
>
<input
<input
type=
"
text
"
type=
"
number
"
v-model=
"contactMobile"
v-model=
"contactMobile"
placeholder=
"输入电话号码"
placeholder=
"输入电话号码"
/>
/>
...
@@ -341,7 +341,7 @@
...
@@ -341,7 +341,7 @@
<text
style=
"margin-right: 30rpx"
>
成人
</text>
<text
style=
"margin-right: 30rpx"
>
成人
</text>
</view>
</view>
<view
style=
"text-align: right"
<view
style=
"text-align: right"
>
{{
orderMsg
.
ManNum
}}
人 × ¥
{{
currentPriceInfo
.
b2CPrice
}}
</view
>
{{
orderMsg
.
ManNum
}}
人 × ¥
{{
currentPriceInfo
.
b2CPrice
}}
</view
>
>
</view>
</view>
<view
<view
...
@@ -852,7 +852,6 @@ export default {
...
@@ -852,7 +852,6 @@ export default {
querenAli
(
OrderId
)
{
querenAli
(
OrderId
)
{
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
this
.
currentPriceInfo
.
title
;
let
GoodsName
=
this
.
currentPriceInfo
.
title
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
this
.
request2
(
this
.
request2
(
{
{
url
:
url
,
url
:
url
,
...
@@ -873,7 +872,6 @@ export default {
...
@@ -873,7 +872,6 @@ export default {
duration
:
2000
,
duration
:
2000
,
});
});
}
}
console
.
log
(
873
,
res
);
}
}
);
);
},
},
...
@@ -883,41 +881,17 @@ export default {
...
@@ -883,41 +881,17 @@ export default {
tradeNO
:
tradeNO
,
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
if
(
res
.
resultCode
==
"9000"
)
{
title
:
"支付成功"
,
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
uni
.
redirectTo
({
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
price
,
url
:
"/pages/jiuzhai/jz_MyOrder"
,
});
});
},
100
);
},
1000
);
},
}
else
if
(
res
.
resultCode
==
"6001"
)
{
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
uni
.
showToast
({
title
:
"支付失败"
,
title
:
"支付取消"
,
icon
:
"none"
,
});
});
},
}
});
return
;
uni
.
requestPayment
({
provider
:
"wxpay"
,
timeStamp
:
this
.
orderInfo
.
timeStamp
,
nonceStr
:
this
.
orderInfo
.
nonceStr
,
package
:
this
.
orderInfo
.
package
,
signType
:
this
.
orderInfo
.
signType
,
paySign
:
this
.
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
title
:
"支付成功"
,
});
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
price
,
});
},
100
);
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
console
.
log
(
"fail:"
,
err
);
...
@@ -925,11 +899,6 @@ export default {
...
@@ -925,11 +899,6 @@ export default {
title
:
"支付失败"
,
title
:
"支付失败"
,
icon
:
"none"
,
icon
:
"none"
,
});
});
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/jz_SureOrder?orderId="
+
OrderId
,
});
},
100
);
},
},
});
});
},
},
...
...
pages/jiuzhai/jz_SureOrder.vue
View file @
db24da2f
...
@@ -811,31 +811,11 @@ export default {
...
@@ -811,31 +811,11 @@ export default {
},
},
// #endif
// #endif
// #ifdef MP-ALIPAY
// #ifdef MP-ALIPAY
// goFukuanAli() {
//支付宝支付
// if (this.submit || this.submitCancel) return;
// var that = this;
// var tempObj = uni.getStorageSync("basedata").mall.wechatmessage;
// var tmplIds = [];
// if (tempObj && tempObj.length > 0) {
// tempObj.forEach((x) => {
// if (x.Name == "下单成功提醒" || x.Name == "订单取消提醒") {
// tmplIds.push(x.MessageId);
// }
// });
// }
// uni.requestSubscribeMessage({
// tmplIds: tmplIds,
// complete(res) {
// that.goZhifu();
// },
// });
// },
//支付
goZhifuAli
()
{
goZhifuAli
()
{
this
.
submit
=
true
;
this
.
submit
=
true
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
url
=
"/api/WeChatPay/GetTravlePayInfo"
;
let
GoodsName
=
this
.
orderData
.
model
.
Title
;
let
GoodsName
=
this
.
orderData
.
model
.
Title
;
GoodsName
=
GoodsName
.
slice
(
0
,
10
);
this
.
request2
(
this
.
request2
(
{
{
url
:
url
,
url
:
url
,
...
@@ -847,8 +827,6 @@ export default {
...
@@ -847,8 +827,6 @@ export default {
},
},
},
},
(
res
)
=>
{
(
res
)
=>
{
let
orderInfo
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
orderInfo
);
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
goPayAli
(
res
.
data
);
this
.
goPayAli
(
res
.
data
);
}
else
{
}
else
{
...
@@ -860,45 +838,20 @@ export default {
...
@@ -860,45 +838,20 @@ export default {
}
}
);
);
},
},
goPayAli
(
orderInfo
)
{
goPayAli
(
tradeNO
)
{
let
that
=
this
;
let
that
=
this
;
my
.
tradePay
({
my
.
tradePay
({
tradeNO
:
tradeNO
,
tradeNO
:
tradeNO
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
console
.
log
(
"success"
,
res
);
uni
.
showToast
({
if
(
res
.
resultCode
==
"9000"
)
{
title
:
"支付成功"
,
});
that
.
submit
=
false
;
that
.
submit
=
false
;
//todo
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
}
else
if
(
res
.
resultCode
==
"6001"
)
{
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
uni
.
showToast
({
uni
.
showToast
({
title
:
"支付失败"
,
title
:
"支付取消"
,
icon
:
"none"
,
});
that
.
submit
=
false
;
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
});
});
return
;
}
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
:
"支付成功"
,
});
that
.
submit
=
false
;
//todo
that
.
initOrderInfo
(
that
.
orderData
.
model
.
OrderId
);
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
console
.
log
(
"fail:"
,
err
);
...
...
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