Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
9de7d4dd
Commit
9de7d4dd
authored
Sep 11, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合票跳转修改
parent
e07e2db3
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
392 additions
and
379 deletions
+392
-379
pages.json
pages.json
+0
-6
index.vue
pages/indexs/index/index.vue
+40
-3
login.vue
pages/login/login.vue
+9
-10
changeNumPayment.vue
pages/payment/changeNumPayment/changeNumPayment.vue
+0
-129
orderPayment.vue
pages/payment/orderPayment/orderPayment.vue
+10
-12
ourPayment.vue
pages/payment/ourPayment/ourPayment.vue
+322
-216
paySuccess.vue
pages/payment/paySuccess/paySuccess.vue
+11
-3
No files found.
pages.json
View file @
9de7d4dd
...
...
@@ -139,12 +139,6 @@
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/payment/changeNumPayment/changeNumPayment"
,
"style"
:
{
"navigationBarTitleText"
:
"支付"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/indexs/center/center"
,
...
...
pages/indexs/index/index.vue
View file @
9de7d4dd
...
...
@@ -11,7 +11,7 @@
<view
class=
"middle"
>
<view
class=
"tabbar"
>
<view
@
click=
"jumpPage(item.projectLinkUrl)"
v-for=
"(item,index) in iconList"
:key=
'index'
>
<view
@
click=
"jumpPage(item.projectLinkUrl)"
v-for=
"(item,index) in iconList"
:key=
'index'
v-show=
"item.projectStatus==0"
>
<image
:src=
"item.projectImgUrl"
></image>
<view>
{{
item
.
merchantExtendProjectName
}}
...
...
@@ -181,7 +181,44 @@ export default {
image
:
'http://wx.pangdly.com/static/img/home3.df60ec3.jpg'
}
],
iconList
:[],
//图标列表
iconList
:[
//图标列表
{
merchantExtendProjectName
:
'景区名称'
,
projectImgUrl
:
'/static/img/index/classify1.png'
,
projectLinkUrl
:
'/pages/scenic/scenicIndex/scenicIndex'
,
projectStatus
:
0
},
{
merchantExtendProjectName
:
'酒店民宿'
,
projectImgUrl
:
'/static/img/index/classify2.png'
,
projectLinkUrl
:
'/pages/hotel/hotelIndex/hotelIndex'
,
projectStatus
:
0
},
{
merchantExtendProjectName
:
'周边游'
,
projectImgUrl
:
'/static/img/index/classify4.png'
,
projectLinkUrl
:
'/pages/scenic/scenicIndex/scenicIndex'
,
projectStatus
:
0
},
{
merchantExtendProjectName
:
'跟团游'
,
projectImgUrl
:
'/static/img/index/classify5.png'
,
projectLinkUrl
:
'/pages/scenic/scenicIndex/scenicIndex'
,
projectStatus
:
0
},
{
merchantExtendProjectName
:
'亲子游'
,
projectImgUrl
:
'/static/img/index/classify6.png'
,
projectLinkUrl
:
'/pages/scenic/scenicIndex/scenicIndex'
,
projectStatus
:
0
},
{
merchantExtendProjectName
:
'行程订制'
,
projectImgUrl
:
'/static/img/index/classify7.png'
,
projectLinkUrl
:
'/pages/my/travelList/travelList/travelList'
,
projectStatus
:
0
}
],
}
},
onLoad
(
option
){
...
...
@@ -226,7 +263,7 @@ export default {
}
this
.
$request
(
'scenic/merchantExtendProject/loadList'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
iconList
=
res
.
data
||
[]
this
.
iconList
=
res
.
data
}
})
},
...
...
pages/login/login.vue
View file @
9de7d4dd
...
...
@@ -23,13 +23,12 @@ export default {
methods
:{
//---登录
login
(){
let
_this
=
this
uni
.
getProvider
({
service
:
'oauth'
,
success
(
proRes
)
{
success
:
proRes
=>
{
uni
.
login
({
provider
:
proRes
.
provider
[
0
],
success
:
function
(
res
)
{
success
:
res
=>
{
if
(
res
.
code
)
{
let
source
=
''
if
(
proRes
.
provider
[
0
]
==
'weixin'
)
{
...
...
@@ -45,13 +44,13 @@ export default {
if
(
uni
.
getStorageSync
(
'enterOptions'
).
query
){
data
.
companyId
=
uni
.
getStorageSync
(
'enterOptions'
).
query
.
companyId
||
''
}
_
this
.
$request
(
'wechat/wx/getUserInfoByCode'
,
data
).
then
(
res
=>
{
this
.
$request
(
'wechat/wx/getUserInfoByCode'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
let
openid
=
res
.
data
.
openid
uni
.
setStorageSync
(
'openid'
,
openid
)
let
userId
=
res
.
data
.
userId
||
''
let
datas
=
{
openid
,
source
,
userId
}
_
this
.
$request
(
'wechatUser/login/findWxUserAndLogin'
,
datas
).
then
(
res
=>
{
this
.
$request
(
'wechatUser/login/findWxUserAndLogin'
,
datas
).
then
(
res
=>
{
//通过openid获取token
if
(
res
.
code
==
'00'
)
{
let
token
=
res
.
data
.
token
||
''
...
...
@@ -71,7 +70,7 @@ export default {
url
:
'/'
+
enterOptions
.
path
+
'?'
+
queryTotal
})
//保存当前日期
let
oldDate
=
_
this
.
$commonjs
.
today
()
let
oldDate
=
this
.
$commonjs
.
today
()
uni
.
setStorageSync
(
'oldDate'
,
oldDate
)
// uni.navigateBack({
// delta:1
...
...
@@ -88,8 +87,8 @@ export default {
title
:
'登录失败,请退出并重新登录'
,
icon
:
'none'
})
_
this
.
timer
=
setTimeout
(()
=>
{
_
this
.
login
()
this
.
timer
=
setTimeout
(()
=>
{
this
.
login
()
},
2000
)
})
}
else
{
...
...
@@ -103,8 +102,8 @@ export default {
title
:
'登录失败,请退出并重新登录'
,
icon
:
'none'
})
_
this
.
timer
=
setTimeout
(()
=>
{
_
this
.
login
()
this
.
timer
=
setTimeout
(()
=>
{
this
.
login
()
},
2000
)
})
}
...
...
pages/payment/changeNumPayment/changeNumPayment.vue
deleted
100644 → 0
View file @
e07e2db3
<
template
>
<!-- 传入价格,通过改变数量改变价格的支付页面 -->
<view
class=
"wrap"
>
<view
class=
"top"
>
<view
class=
"name"
>
皇冠大扶梯
</view>
<view
class=
"number"
>
<text>
购买数量
</text>
<u-number-box
v-model=
"buyNumber"
bg-color=
'#3688FF'
color=
'#ffffff'
:input-height=
"60"
size=
'28'
>
</u-number-box>
</view>
<view
class=
"price"
>
<text>
总价
</text>
<text>
¥6.00
</text>
</view>
<view
class=
"remark"
>
<input
placeholder=
"添加备注(20字以内)"
maxlength=
"20"
v-model
.
trim=
"remark"
style=
"margin-bottom:20rpx;"
/>
</view>
<view
class=
"tips"
>
温馨提示:请核对以上付款金额、付款对象等信息与交易匹配。
</view>
</view>
<view
class=
"bottom"
>
<text
class=
"btn"
>
立即支付
</text>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
remark
:
''
,
//备注
payType
:
''
,
//支付方式
buyNumber
:
''
,
//购买数量
}
},
onLoad
(
option
)
{
//#ifdef MP-WEIXIN
this
.
payType
=
42
//#endif
//#ifdef MP-ALIPAY
this
.
payType
=
33
//#endif
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.wrap
{
height
:
100%
;
background
:
#ffffff
;
}
.top
{
padding
:
40rpx
24rpx
;
}
.name
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#191919
;
text-align
:
center
;
}
.number
{
display
:
flex
;
justify-content
:
space-between
;
font-weight
:
bold
;
margin-top
:
80rpx
;
align-items
:
center
;
}
.price
{
display
:
flex
;
justify-content
:
space-between
;
font-weight
:
bold
;
margin-top
:
48rpx
;
text
:nth-child
(
2
)
{
font-size
:
40rpx
;
color
:
$red
;
}
}
.remark
{
margin-top
:
48rpx
;
color
:
$grey
;
}
.tips
{
margin-top
:
24rpx
;
color
:
$grey
;
font-size
:
24rpx
;
}
.bottom
{
position
:
fixed
;
width
:
100%
;
height
:
100rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
bottom
:
0
;
box-shadow
:
0px
-4px
12px
2px
rgba
(
0
,
0
,
0
,
0
.08
);
background
:
#ffffff
;
}
.btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
90%
;
height
:
80rpx
;
background
:
#3688FF
;
border-radius
:
8rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
}
</
style
>
pages/payment/orderPayment/orderPayment.vue
View file @
9de7d4dd
...
...
@@ -97,13 +97,12 @@ export default {
methods
:
{
login
()
{
//---登录
let
_this
=
this
uni
.
getProvider
({
service
:
'oauth'
,
success
(
proRes
)
{
success
:
proRes
=>
{
uni
.
login
({
provider
:
proRes
.
provider
[
0
],
success
:
function
(
res
)
{
success
:
res
=>
{
if
(
res
.
code
)
{
let
source
=
''
if
(
proRes
.
provider
[
0
]
==
'weixin'
)
{
...
...
@@ -119,12 +118,12 @@ export default {
if
(
uni
.
getStorageSync
(
'enterOptions'
).
query
){
data
.
companyId
=
uni
.
getStorageSync
(
'enterOptions'
).
query
.
companyId
||
''
}
_
this
.
$request
(
'wechat/wx/getUserInfoByCode'
,
data
)
this
.
$request
(
'wechat/wx/getUserInfoByCode'
,
data
)
.
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
_
this
.
openid
=
res
.
data
.
openid
uni
.
setStorageSync
(
'openid'
,
_
this
.
openid
)
_
this
.
initDetail
()
this
.
openid
=
res
.
data
.
openid
uni
.
setStorageSync
(
'openid'
,
this
.
openid
)
this
.
initDetail
()
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
...
...
@@ -203,7 +202,6 @@ export default {
},
goPay
()
{
//-------------------------------------------------------去支付
let
_this
=
this
if
(
this
.
errorMessage
)
{
uni
.
showToast
({
title
:
this
.
errorMessage
,
...
...
@@ -224,9 +222,9 @@ export default {
package
:
this
.
package
,
signType
:
this
.
signType
,
paySign
:
this
.
paySign
,
success
:
function
(
res
)
{
success
:
res
=>
{
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
_this
.
orderId
+
'&afterBuyUrl='
+
_this
.
afterBuyUrl
+
'&ifyukuaiCode='
+
_
this
.
ifyukuaiCode
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
},
fail
:
function
(
err
)
{
...
...
@@ -242,9 +240,9 @@ export default {
uni
.
requestPayment
({
provider
:
'alipay'
,
// 服务提供商 支付宝支付: alipay 微信支付: wxpay
orderInfo
:
this
.
orderInfo
,
// 支付宝订单号
success
:
function
(
res
)
{
success
:
res
=>
{
uni
.
navigateTo
({
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
_this
.
orderId
+
'&afterBuyUrl='
+
_this
.
afterBuyUrl
+
'&ifyukuaiCode='
+
_
this
.
ifyukuaiCode
url
:
'/pages/payment/paySuccess/paySuccess?orderId='
+
this
.
orderId
+
'&afterBuyUrl='
+
this
.
afterBuyUrl
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
},
fail
:
function
(
err
)
{
...
...
pages/payment/ourPayment/ourPayment.vue
View file @
9de7d4dd
This diff is collapsed.
Click to expand it.
pages/payment/paySuccess/paySuccess.vue
View file @
9de7d4dd
...
...
@@ -57,14 +57,22 @@ export default {
let
data
=
{
orderId
:
this
.
orderId
}
this
.
$request
(
'order/
o
rder/getStatusById'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'order/
userO
rder/getStatusById'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
status
=
res
.
data
//如果是组合票,直接跳订单列表页面
let
orderType
=
res
.
data
.
orderType
if
(
orderType
==
'10'
){
uni
.
reLaunch
({
url
:
this
.
afterBuyUrl
+
'?orderId='
+
this
.
orderId
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
return
}
this
.
status
=
res
.
data
.
orderStatus
if
(
this
.
status
==
'2'
||
this
.
status
==
'4'
||
this
.
status
==
'5'
)
{
//1.跳订单列表,2.订单详情,3.停留该页面显示支付成功(ourPayment页面跳入时,无afterBuyUrl,停留在该页面)
this
.
title
=
'支付成功!'
this
.
loadImg
=
false
uni
.
re
directTo
({
uni
.
re
Launch
({
url
:
this
.
afterBuyUrl
+
'?orderId='
+
this
.
orderId
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
}
...
...
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