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
b52df2e5
Commit
b52df2e5
authored
Jul 10, 2022
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
长江索道公众号页面改成小程序页面
parent
44040ee8
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
745 additions
and
480 deletions
+745
-480
request.js
common/request.js
+19
-19
manifest.json
manifest.json
+1
-1
pages.json
pages.json
+9
-0
combiOrder.vue
pages/combination/combiOrder/combiOrder.vue
+25
-25
getTicket.vue
pages/common/getTicket/getTicket.vue
+170
-0
login.vue
pages/login/login.vue
+4
-4
electronicTicket.vue
pages/my/order/electronicTicket/electronicTicket.vue
+35
-35
orderList.vue
pages/my/order/orderList/orderList.vue
+17
-17
orderPayment.vue
pages/payment/orderPayment/orderPayment.vue
+394
-308
scenicJointOrder.vue
pages/scenic/scenicJointOrder/scenicJointOrder.vue
+24
-24
scenicSingleOrder.vue
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
+47
-47
getTicketBg.jpg
static/img/common/getTicketBg.jpg
+0
-0
alipayLogo.png
static/img/orderPayment/alipayLogo.png
+0
-0
No files found.
common/request.js
View file @
b52df2e5
var
baseUrl
=
''
var
baseUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'development'
){
//开发环境
if
(
process
.
env
.
NODE_ENV
===
'development'
){
//开发环境
baseUrl
=
"http://pay.tuyoyoo.com/"
baseUrl
=
'http://pay.tuyoyoo.com/'
}
else
{
}
else
{
baseUrl
=
"https://manager.pangdly.com/"
baseUrl
=
'https://manager.pangdly.com/'
}
}
const
request
=
(
url
=
''
,
data
=
{},
type
=
'POST'
)
=>
{
const
request
=
(
url
=
''
,
data
=
{},
type
=
'POST'
)
=>
{
...
@@ -10,18 +10,18 @@ const request = (url = '', data = {}, type = 'POST') => {
...
@@ -10,18 +10,18 @@ const request = (url = '', data = {}, type = 'POST') => {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
uni
.
request
({
method
:
type
,
method
:
type
,
url
:
baseUrl
+
url
+
'?token='
+
uni
.
getStorageSync
(
"token"
),
url
:
baseUrl
+
url
+
'?token='
+
uni
.
getStorageSync
(
'token'
),
data
:
data
,
data
:
data
,
dataType
:
'json'
,
dataType
:
'json'
,
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
let
[
error
,
res
]
=
response
;
let
[
error
,
res
]
=
response
resolve
(
res
.
data
);
resolve
(
res
.
data
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
let
[
err
,
res
]
=
error
;
let
[
err
,
res
]
=
error
reject
(
err
)
reject
(
err
)
})
})
});
})
}
}
export
default
request
export
default
request
\ No newline at end of file
manifest.json
View file @
b52df2e5
{
{
"name"
:
"uni-pdtravel"
,
"name"
:
"uni-pdtravel"
,
"appid"
:
""
,
"appid"
:
"
__UNI__17F18E2
"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
...
...
pages.json
View file @
b52df2e5
...
@@ -320,6 +320,15 @@
...
@@ -320,6 +320,15 @@
}
}
}
}
,{
"path"
:
"pages/common/getTicket/getTicket"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"white"
,
"navigationBarTextStyle"
:
"white"
,
...
...
pages/combination/combiOrder/combiOrder.vue
View file @
b52df2e5
...
@@ -5,32 +5,32 @@
...
@@ -5,32 +5,32 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
enterUrl
:
""
,
//进入页面路由
enterUrl
:
''
,
//进入页面路由
outUrl
:
""
,
//跳出页面路由
outUrl
:
''
,
//跳出页面路由
}
}
},
},
onLoad
(
option
){
onLoad
(
option
){
let
groupId
=
option
.
groupId
let
groupId
=
option
.
groupId
||
''
let
groupChannelId
=
option
.
groupChannelId
let
groupChannelId
=
option
.
groupChannelId
||
''
let
companyId
=
option
.
companyId
let
companyId
=
option
.
companyId
||
''
let
productIdList
=
option
.
productIdList
let
productIdList
=
option
.
productIdList
||
''
let
orderSource
=
option
.
orderSource
let
orderSource
=
option
.
orderSource
||
''
let
ifyukuaiCode
=
option
.
ifyukuaiCode
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
pdOpenid
=
uni
.
getStorageSync
(
"openid"
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
"token"
)
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
"createUserId"
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
"userId"
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
"https://wx.pangdly.com/#/combiOrder?pdOpenid="
+
pdOpenid
+
"&pdToken="
+
pdToken
+
"&pdCreateUserId="
+
pdCreateUserId
+
"&pdUserId="
+
pdUserId
let
baseUrl
=
'https://wx.pangdly.com/#/combiOrder?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
"&groupId="
+
groupId
+
"&groupChannelId="
+
groupChannelId
+
"&productIdList="
+
productIdList
+
"&orderSource="
+
orderSource
+
"&companyId="
+
companyId
+
"&ifyukuaiCode="
+
ifyukuaiCode
let
url
=
'&groupId='
+
groupId
+
'&groupChannelId='
+
groupChannelId
+
'&productIdList='
+
productIdList
+
'&orderSource='
+
orderSource
+
'&companyId='
+
companyId
+
'&ifyukuaiCode='
+
ifyukuaiCode
this
.
outUrl
=
baseUrl
+
url
this
.
outUrl
=
baseUrl
+
url
},
},
methods
:
{
methods
:
{
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
...
...
pages/common/getTicket/getTicket.vue
0 → 100644
View file @
b52df2e5
<
template
>
<!-- 1.获取购票凭证页面,索道等景区进入添加企业微信获取电子门票 -->
<!--2.判断是否添加,已经添加直接进入订单列表页面 ,没有添加就添加企业微信-->
<!-- 3.如果企业微信人数达到上线,直接跳转到订单列表页面 -->
<!-- 4.如果企业微信码停用,走公众号流程 -->
<view
class=
"bigBox"
>
<image
src=
"../../../static/img/common/getTicketBg.jpg"
class=
"bigImg"
></image>
<view
class=
"title"
>
获取购票凭证
</view>
<!-- 企业微信流程 -->
<view
v-if=
"showCompany"
>
<view
class=
"imgbox"
>
<image
:src=
"imgUrl"
style=
"width:360rpx;height:360rpx;"
></image>
</view>
<view
class=
"content1"
>
长按二维码,添加“客服”
</view>
<view
class=
"content2"
>
获取您的电子门票
</view>
</view>
<!-- 公众号流程 -->
<div
v-if=
"showPublic"
>
<view
class=
"imgbox"
>
<image
:src=
"imgUrl"
style=
"width:360rpx;height:360rpx;"
></image>
</view>
<view
class=
"content1"
>
长按二维码,关注“胖丁旅游”
</view>
<view
class=
"content2"
>
获取您的电子门票
</view>
</div>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
showCompany
:
false
,
//企业微信流程
showPublic
:
false
,
//公众号流程
merchantId
:
''
,
//商户Id
companyId
:
''
,
//公司Id
imgUrl
:
''
,
//图片地址
}
},
onLoad
(
option
)
{
this
.
merchantId
=
option
.
merchantId
this
.
companyId
=
option
.
companyId
this
.
ifAddWxUser
()
},
methods
:
{
//---是否添加企业微信
ifAddWxUser
(){
let
data
=
{
openid
:
uni
.
getStorageSync
(
'openid'
),
//openId
}
this
.
$request
(
'wechatUser/wxUser/findWxUser'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
data
.
alreadyAddAttendant
==
'1'
){
//已添加
uni
.
navigateTo
({
url
:
'/pages/my/order/orderList/orderList'
})
}
else
{
//未添加
this
.
getCompanyCode
()
}
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
//---获取企业微信二维码编号
getCompanyCode
()
{
let
data
=
{
merchantId
:
this
.
merchantId
,
companyId
:
this
.
companyId
}
this
.
$request
(
'scenic/wechatCodeConfig/load'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
//微信码正常
if
(
res
.
data
.
status
==
'0'
){
//达到上线跳转小程序页面
if
(
res
.
data
.
alreadyAddNumber
>=
res
.
data
.
canAddNumber
){
uni
.
navigateTo
({
url
:
'/pages/my/order/orderList/orderList'
})
}
else
{
this
.
showCompany
=
true
this
.
imgUrl
=
res
.
data
.
codeUrl
}
}
else
{
//微信码停用获取公众号二维码
this
.
showPublic
=
true
this
.
getCode
()
}
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
//---获取公众号二维码编号
getCode
()
{
let
data
=
{
codeType
:
1
,
select
:
1
,
companyId
:
this
.
companyId
}
this
.
$request
(
'user/company/generateQrCodeUrl'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
this
.
imgUrl
=
res
.
data
.
codeImgUrl
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
}
}
</
script
>
<
style
>
.bigBox
{
height
:
100%
;
padding-top
:
18vh
;
text-align
:
center
;
font-weight
:
bold
;
font-size
:
28
rpx
;
box-sizing
:
border-box
;
position
:
relative
;
}
.bigImg
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
top
:
0
;
left
:
0
;
z-index
:
-1
;
}
.title
{
font-size
:
66
rpx
;
font-weight
:
bold
;
color
:
#ff570e
;
}
.imgbox
{
margin-top
:
6vh
;
}
.content1
{
margin-top
:
6vh
;
}
.content2
{
margin-top
:
3vh
;
}
@media
only
screen
and
(
max-height
:
760px
)
{
.bigBox
{
padding-top
:
16vh
;
}
.imgbox
{
margin-top
:
5vh
;
}
.content1
{
margin-top
:
5vh
;
}
.content2
{
margin-top
:
2vh
;
}
}
</
style
>
pages/login/login.vue
View file @
b52df2e5
...
@@ -63,25 +63,25 @@
...
@@ -63,25 +63,25 @@
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
+
'请退出并重新登录'
,
icon
:
'none'
icon
:
'none'
})
})
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'登录失败'
,
title
:
'登录失败
,请退出并重新登录
'
,
icon
:
'none'
icon
:
'none'
})
})
})
})
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
=
'请退出并重新登录'
,
icon
:
'none'
icon
:
'none'
})
})
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'登录失败'
,
title
:
'登录失败
,请退出并重新登录
'
,
icon
:
'none'
icon
:
'none'
})
})
})
})
...
...
pages/my/order/electronicTicket/electronicTicket.vue
View file @
b52df2e5
...
@@ -5,11 +5,11 @@
...
@@ -5,11 +5,11 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
outUrl
:
""
,
//跳出地址
outUrl
:
''
,
//跳出地址
Brightness
:
""
,
//屏幕亮度
Brightness
:
''
,
//屏幕亮度
}
}
},
},
onShow
()
{
onShow
()
{
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
uni
.
getScreenBrightness
({
uni
.
getScreenBrightness
({
success
:
function
(
res
){
success
:
function
(
res
){
// 这里是把获取到的手机屏幕亮度,存储到data里面,方便给到页面生命周期隐藏和卸载方法里面用
// 这里是把获取到的手机屏幕亮度,存储到data里面,方便给到页面生命周期隐藏和卸载方法里面用
_this
.
Brightness
=
res
.
value
;
_this
.
Brightness
=
res
.
value
if
(
res
.
value
!=
1
){
if
(
res
.
value
!=
1
){
uni
.
setScreenBrightness
({
uni
.
setScreenBrightness
({
value
:
1
value
:
1
});
})
}
}
}
}
})
})
...
@@ -32,17 +32,17 @@
...
@@ -32,17 +32,17 @@
})
})
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
let
pdOpenid
=
uni
.
getStorageSync
(
"openid"
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
"token"
)
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
"createUserId"
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
"userId"
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
ifyukuaiCode
=
option
.
ifyukuaiCode
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
this
.
outUrl
=
"https://wx.pangdly.com/#/unusedDetail?id="
+
option
.
orderId
+
"&pdOpenid="
+
pdOpenid
+
"&pdToken="
+
pdToken
+
"&pdCreateUserId="
+
pdCreateUserId
+
"&pdUserId="
+
pdUserId
+
"&ifyukuaiCode="
+
ifyukuaiCode
this
.
outUrl
=
'https://wx.pangdly.com/#/unusedDetail?id='
+
option
.
orderId
+
'&pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
+
'&ifyukuaiCode='
+
ifyukuaiCode
},
},
methods
:
{
methods
:
{
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
...
...
pages/my/order/orderList/orderList.vue
View file @
b52df2e5
...
@@ -5,24 +5,24 @@
...
@@ -5,24 +5,24 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
outUrl
:
""
,
//跳出地址
outUrl
:
''
,
//跳出地址
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
let
pdOpenid
=
uni
.
getStorageSync
(
"openid"
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
"token"
)
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
"createUserId"
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
"userId"
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
ifyukuaiCode
=
option
.
ifyukuaiCode
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
this
.
outUrl
=
"https://wx.pangdly.com/#/ordersList1?pdOpenid="
+
pdOpenid
+
"&pdToken="
+
pdToken
+
"&pdCreateUserId="
+
pdCreateUserId
+
"&pdUserId="
+
pdUserId
+
"&ifyukuaiCode="
+
ifyukuaiCode
this
.
outUrl
=
'https://wx.pangdly.com/#/ordersList1?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
+
'&ifyukuaiCode='
+
ifyukuaiCode
},
},
methods
:
{
methods
:
{
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
pages/payment/orderPayment/orderPayment.vue
View file @
b52df2e5
...
@@ -3,70 +3,50 @@
...
@@ -3,70 +3,50 @@
<view
class=
"middle"
v-show=
"bodyShow"
>
<view
class=
"middle"
v-show=
"bodyShow"
>
<view
class=
"main"
>
<view
class=
"main"
>
<!-- --------------------------------------复票----------------------------------------------- -->
<!-- --------------------------------------复票----------------------------------------------- -->
<view
v-if=
"orderList!=
''"
v-for=
"item of orderList"
:key=
"item.id"
class=
"product"
>
<view
v-if=
"orderList !=
''"
v-for=
"item of orderList"
:key=
"item.id"
class=
"product"
>
<view>
<view>
<text>
<text>
{{
item
.
merchantName
}}
(
{{
item
.
productName
}}
)
</text>
{{
item
.
merchantName
}}
(
{{
item
.
productName
}}
)
</text>
<text>
<text>
<text
style=
"font-size:24rpx;"
>
¥
</text>
{{
item
.
unitPrice
}}
<text
style=
"font-size:24rpx;"
>
¥
</text>
{{
item
.
unitPrice
}}
<text>
x
</text>
{{
item
.
orderNum
}}
<text>
x
</text>
<text
style=
"margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;"
v-if=
"item.depositReceived"
>
押金:
{{
item
.
depositReceived
}}
</text>
{{
item
.
orderNum
}}
<text
style=
"margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;"
v-if=
"item.depositReceived"
>
押金:
{{
item
.
depositReceived
}}
</text>
</text>
</text>
</view>
</view>
<view
class=
"coupon"
v-if=
"item.pdDiscountMoney"
>
<view
class=
"coupon"
v-if=
"item.pdDiscountMoney"
>
<text>
<text>
券
</text>
<text>
<text
style=
"font-size:24rpx;"
>
-¥
</text>
{{
item
.
pdDiscountMoney
}}
</text>
券
</text>
<text>
<text
style=
"font-size:24rpx;"
>
-¥
</text>
{{
item
.
pdDiscountMoney
}}
</text>
</view>
</view>
</view>
</view>
<!-- --------------------------------------单票----------------------------------------------- -->
<!-- --------------------------------------单票----------------------------------------------- -->
<view
v-if=
"orderList==
''"
class=
"product"
>
<view
v-if=
"orderList ==
''"
class=
"product"
>
<view>
<view>
<text>
<text>
{{
merchantName
}}
(
{{
productName
}}
)
</text>
{{
merchantName
}}
(
{{
productName
}}
)
</text>
<text
style=
"text-align: right;"
>
<text
style=
"text-align: right;"
>
<small
style=
"font-size:24rpx;"
>
¥
</small>
{{
unitPrice
}}
<text
style=
"font-size:24rpx;"
>
¥
</text>
{{
unitPrice
}}
<text>
x
</text>
{{
orderNum
}}
<text>
x
</text>
<text
style=
"margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;"
v-if=
"depositReceived"
>
押金:
{{
depositReceived
}}
</text>
{{
orderNum
}}
<text
style=
"margin-top:10rpx;font-size:22rpx;display:block;color:#f45803;"
v-if=
"depositReceived"
>
押金:
{{
depositReceived
}}
</text>
</text>
</text>
</view>
</view>
<view
class=
"coupon"
v-if=
"pdDiscountMoney"
>
<view
class=
"coupon"
v-if=
"pdDiscountMoney"
>
<text>
<text>
券
</text>
<text>
<text
style=
"font-size:24rpx;"
>
-¥
</text>
{{
pdDiscountMoney
}}
</text>
券
</text>
<text>
<text
style=
"font-size:24rpx;"
>
-¥
</text>
{{
pdDiscountMoney
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"mainP3"
>
<view
class=
"mainP3"
>
<text>
<text>
实际支付
</text>
实际支付
</text>
<text>
<text>
<!--
<i>
<!--
<i>
¥
{{
totalMoney
}}
¥
{{
totalMoney
}}
</i>
-->
</i>
-->
<text>
<text>
<text
style=
"font-size:28rpx;"
>
¥
</text>
{{
pdOrderMoney
}}
</text>
<text
style=
"font-size:28rpx;"
>
¥
</text>
{{
pdOrderMoney
}}
</text>
</text>
</text>
</view>
</view>
<view
class=
"mainview"
>
<view
class=
"mainview"
>
<image
src=
"@/static/img/orderPayment/weixin.png"
style=
"width:70rpx;height:62rpx;"
/>
<!-- #ifdef MP-WEIXIN -->
<view>
<image
src=
"@/static/img/orderPayment/weixin.png"
style=
"width:70rpx;height:62rpx;"
/>
<view>
微信支付
</view>
微信支付
<!-- #endif -->
</view>
<!-- #ifdef MP-ALIPAY -->
<image
src=
"@/static/img/orderPayment/alipayLogo.png"
style=
"width:70rpx;height:62rpx;"
/>
<view>
支付宝支付
</view>
<!-- #endif -->
<image
src=
"@/static/img/orderPayment/input.png"
style=
"width:32rpx;height: 32rpx;"
/>
<image
src=
"@/static/img/orderPayment/input.png"
style=
"width:32rpx;height: 32rpx;"
/>
</view>
</view>
</view>
</view>
...
@@ -74,30 +54,24 @@
...
@@ -74,30 +54,24 @@
<view
class=
"bottom"
v-show=
"bodyShow"
>
<view
class=
"bottom"
v-show=
"bodyShow"
>
<view
class=
"bottomFirst"
>
<view
class=
"bottomFirst"
>
<text>
<text>
实付款
</text>
实付款
</text>
<text>
<text>
<text>
¥
</text>
{{
pdOrderMoney
}}
</text>
<text>
¥
</text>
{{
pdOrderMoney
}}
</text>
</view>
</view>
<view
class=
"bottomLast"
>
<view
class=
"bottomLast"
>
<text
href=
"tel:400-072-0368"
>
<text
href=
"tel:400-072-0368"
>
<!--
<img
src=
"@/assets/img/combination/kefu11.png"
style=
"width: 0.31rpx;"
/>
-->
</text>
<!--
<img
src=
"@/assets/img/combination/kefu11.png"
style=
"width: 0.31rpx;"
/>
-->
<text
@
click=
"goPay()"
:style=
"
{ background: background }">去支付
</text>
</text>
<text
@
click=
"goPay()"
:style=
"
{background:background}">去支付
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
enterUrl
:
''
,
//进入页面路由
enterUrl
:
''
,
//进入页面路由
merchantName
:
''
,
//商户名称
merchantName
:
''
,
//商户名称
productName
:
''
,
//产品名称
productName
:
''
,
//产品名称
orderList
:
''
,
//订单列表
orderList
:
''
,
//订单列表
...
@@ -109,81 +83,86 @@
...
@@ -109,81 +83,86 @@
totalMoney
:
''
,
//原价总价
totalMoney
:
''
,
//原价总价
errorMessage
:
''
,
//错误信息
errorMessage
:
''
,
//错误信息
bodyShow
:
false
,
//控制初始化数据成功显示
bodyShow
:
false
,
//控制初始化数据成功显示
timeStamp
:
''
,
//支付参数
payType
:
''
,
//支付类型
nonceStr
:
''
,
timeStamp
:
''
,
//支付参数
package
:
''
,
nonceStr
:
''
,
signType
:
''
,
package
:
''
,
paySign
:
''
,
signType
:
''
,
orderInfo
:
''
,
//支付宝订单号
paySign
:
''
,
background
:
''
,
//去支付的背景颜色
orderInfo
:
''
,
//支付宝订单号
orderId
:
''
,
//订单Id
background
:
''
,
//去支付的背景颜色
openid
:
''
,
//用户Id
orderId
:
''
,
//订单Id
afterBuyUrl
:
''
,
//支付成功后地址跳转
openid
:
''
,
//用户Id
ifyukuaiCode
:
''
,
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
afterBuyUrl
:
''
,
//支付成功后地址跳转
ifyukuaiCode
:
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
//#ifdef MP-WEIXIN
//#ifdef MP-WEIXIN
this
.
enterUrl
=
option
.
q
this
.
enterUrl
=
option
.
q
this
.
payType
=
42
//#endif
//#endif
//#ifdef MP-ALIPAY
//#ifdef MP-ALIPAY
this
.
enterUrl
=
uni
.
getStorageSync
(
'alipayQrCode'
)
this
.
enterUrl
=
uni
.
getStorageSync
(
'alipayQrCode'
)
this
.
payType
=
33
//#endif
//#endif
if
(
this
.
enterUrl
)
{
if
(
this
.
enterUrl
)
{
this
.
orderId
=
this
.
getUrlKey
(
'orderId'
)
this
.
orderId
=
this
.
getUrlKey
(
'orderId'
)
}
else
{
}
else
{
this
.
orderId
=
option
.
orderId
this
.
orderId
=
option
.
orderId
}
}
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
this
.
afterBuyUrl
=
option
.
afterBuyUrl
||
'/pages/my/order/orderList/orderList'
this
.
afterBuyUrl
=
option
.
afterBuyUrl
||
'/pages/my/order/orderList/orderList'
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
||
''
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
||
''
if
(
this
.
openid
)
{
if
(
this
.
openid
)
{
this
.
initDetail
()
this
.
initDetail
()
}
else
{
}
else
{
this
.
login
()
//极个别手机从公众号跳转回来没有openid,再次获取openid
this
.
login
()
//极个别手机从公众号跳转回来没有openid,再次获取openid
}
}
},
},
methods
:{
methods
:
{
login
(){
//---登录
login
()
{
let
_this
=
this
//---登录
let
_this
=
this
uni
.
getProvider
({
uni
.
getProvider
({
service
:
'oauth'
,
service
:
'oauth'
,
success
(
proRes
)
{
success
(
proRes
)
{
uni
.
login
({
uni
.
login
({
provider
:
proRes
.
provider
[
0
],
provider
:
proRes
.
provider
[
0
],
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
code
)
{
if
(
res
.
code
)
{
let
source
=
''
let
source
=
''
if
(
proRes
.
provider
[
0
]
==
'weixin'
)
{
if
(
proRes
.
provider
[
0
]
==
'weixin'
)
{
source
=
3
source
=
3
}
else
if
(
proRes
.
provider
[
0
]
==
'alipay'
)
{
}
else
if
(
proRes
.
provider
[
0
]
==
'alipay'
)
{
source
=
4
source
=
4
}
}
let
data
=
{
let
data
=
{
code
:
res
.
code
,
code
:
res
.
code
,
source
,
//微信小程序3,支付宝小程序4
source
//微信小程序3,支付宝小程序4
}
}
_this
.
$request
(
'wechat/wx/getUserInfoByCode'
,
data
).
then
(
res
=>
{
_this
.
$request
(
'wechat/wx/getUserInfoByCode'
,
data
)
if
(
res
.
code
==
'00'
){
.
then
(
res
=>
{
_this
.
openid
=
res
.
data
.
openid
if
(
res
.
code
==
'00'
)
{
uni
.
setStorageSync
(
'openid'
,
_this
.
openid
)
_this
.
openid
=
res
.
data
.
openid
uni
.
setStorageSync
(
'openid'
,
_this
.
openid
)
_this
.
initDetail
()
_this
.
initDetail
()
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
icon
:
'none'
icon
:
'none'
})
})
}
}
}).
catch
((
err
)
=>
{
})
.
catch
(
err
=>
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'登录失败'
,
title
:
'登录失败'
,
icon
:
'none'
icon
:
'none'
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
_this
.
login
()
_this
.
login
()
},
2000
)
},
2000
)
})
})
}
}
}
}
...
@@ -191,34 +170,37 @@
...
@@ -191,34 +170,37 @@
}
}
})
})
},
},
initDetail
(){
//---初始化产品信息,以及获取支付需要的参数
initDetail
()
{
//---初始化产品信息,以及获取支付需要的参数
let
data
=
{
let
data
=
{
orderId
:
this
.
orderId
,
//订单Id
orderId
:
this
.
orderId
,
//订单Id
userId
:
this
.
openid
,
//用户Id
userId
:
this
.
openid
,
//用户Id
payType
:
42
,
//支付类型
payType
:
this
.
payType
//支付类型
}
}
this
.
$request
(
'orderc/order/findOrderInfo'
,
data
).
then
((
res
)
=>
{
this
.
$request
(
'orderc/order/findOrderInfo'
,
data
).
then
(
res
=>
{
if
(
res
.
code
==
'00'
)
{
if
(
res
.
code
==
'00'
)
{
this
.
bodyShow
=
true
this
.
bodyShow
=
true
//支付参数开始
//支付参数开始
this
.
timeStamp
=
res
.
data
.
timestamp
this
.
timeStamp
=
res
.
data
.
timestamp
this
.
nonceStr
=
res
.
data
.
noncestr
this
.
nonceStr
=
res
.
data
.
noncestr
this
.
package
=
res
.
data
.
package
this
.
package
=
res
.
data
.
package
this
.
signType
=
res
.
data
.
signType
this
.
signType
=
res
.
data
.
signType
this
.
paySign
=
res
.
data
.
sign
this
.
paySign
=
res
.
data
.
sign
//支付宝入参
//支付宝入参
this
.
orderInfo
=
res
.
data
.
payInfo
||
''
this
.
orderInfo
=
res
.
data
.
payInfo
||
''
//支付参数结束
//支付参数结束
this
.
pdOrderMoney
=
res
.
data
.
pdOrderMoney
this
.
pdOrderMoney
=
res
.
data
.
pdOrderMoney
if
(
this
.
pdOrderMoney
==
0
&&
res
.
data
.
subOrderType
==
-
1
){
//0元购直接跳电子门票页面
if
(
this
.
pdOrderMoney
==
0
&&
res
.
data
.
subOrderType
==
-
1
)
{
//0元购直接跳电子门票页面
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/my/order/electronicTicket/electronicTicket?orderId='
+
this
.
orderId
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
url
:
'/pages/my/order/electronicTicket/electronicTicket?orderId='
+
this
.
orderId
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
})
}
}
this
.
errorMessage
=
res
.
data
.
errorMessage
this
.
errorMessage
=
res
.
data
.
errorMessage
this
.
totalMoney
=
res
.
data
.
totalMoney
this
.
totalMoney
=
res
.
data
.
totalMoney
this
.
orderList
=
res
.
data
.
orderList
this
.
orderList
=
res
.
data
.
orderList
if
(
typeof
(
this
.
orderList
)
==
'undefined'
)
{
//单票
if
(
typeof
this
.
orderList
==
'undefined'
)
{
//单票
this
.
orderList
=
''
this
.
orderList
=
''
this
.
merchantName
=
res
.
data
.
merchantName
this
.
merchantName
=
res
.
data
.
merchantName
this
.
productName
=
res
.
data
.
productName
this
.
productName
=
res
.
data
.
productName
...
@@ -227,46 +209,46 @@
...
@@ -227,46 +209,46 @@
this
.
depositReceived
=
res
.
data
.
depositReceived
this
.
depositReceived
=
res
.
data
.
depositReceived
this
.
pdDiscountMoney
=
res
.
data
.
pdDiscountMoney
this
.
pdDiscountMoney
=
res
.
data
.
pdDiscountMoney
}
}
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
icon
:
'none'
icon
:
'none'
})
})
}
}
})
})
},
},
goPay
(){
//-------------------------------------------------------去支付
goPay
()
{
let
_this
=
this
//-------------------------------------------------------去支付
let
_this
=
this
if
(
this
.
errorMessage
)
{
if
(
this
.
errorMessage
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
this
.
errorMessage
,
title
:
this
.
errorMessage
,
icon
:
'none'
icon
:
'none'
})
})
return
return
}
}
this
.
background
=
'#E6E6E6'
this
.
background
=
'#E6E6E6'
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
background
=
'f9690e'
this
.
background
=
'f9690e'
},
1000
)
},
1000
)
// #ifdef MP-WEIXIN
// #ifdef MP-WEIXIN
uni
.
requestPayment
({
uni
.
requestPayment
({
provider
:
'wxpay'
,
provider
:
'wxpay'
,
timeStamp
:
this
.
timeStamp
,
timeStamp
:
this
.
timeStamp
,
nonceStr
:
this
.
nonceStr
,
nonceStr
:
this
.
nonceStr
,
package
:
this
.
package
,
package
:
this
.
package
,
signType
:
this
.
signType
,
signType
:
this
.
signType
,
paySign
:
this
.
paySign
,
paySign
:
this
.
paySign
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
_this
.
afterBuyUrl
+
'?orderId='
+
_this
.
orderId
+
'&ifyukuaiCode='
+
_this
.
ifyukuaiCode
url
:
_this
.
afterBuyUrl
+
'?orderId='
+
_this
.
orderId
+
'&ifyukuaiCode='
+
_this
.
ifyukuaiCode
})
})
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
err
.
errMsg
,
title
:
err
.
errMsg
,
icon
:
'none'
icon
:
'none'
})
})
}
}
})
})
...
@@ -276,49 +258,153 @@
...
@@ -276,49 +258,153 @@
uni
.
requestPayment
({
uni
.
requestPayment
({
provider
:
'alipay'
,
// 服务提供商 支付宝支付: alipay 微信支付: wxpay
provider
:
'alipay'
,
// 服务提供商 支付宝支付: alipay 微信支付: wxpay
orderInfo
:
this
.
orderInfo
,
// 支付宝订单号
orderInfo
:
this
.
orderInfo
,
// 支付宝订单号
success
:
function
(
res
)
{
success
:
function
(
res
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
_this
.
afterBuyUrl
+
'?orderId='
+
_this
.
orderId
+
'&ifyukuaiCode='
+
_this
.
ifyukuaiCode
url
:
_this
.
afterBuyUrl
+
'?orderId='
+
_this
.
orderId
+
'&ifyukuaiCode='
+
_this
.
ifyukuaiCode
})
})
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
err
.
errMsg
,
title
:
err
.
errMsg
,
icon
:
'none'
icon
:
'none'
})
})
}
}
})
})
// #endif
// #endif
},
},
getUrlKey
(
name
){
//---------------------------------------------------------------获取url
getUrlKey
(
name
)
{
return
(
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
decodeURIComponent
(
this
.
enterUrl
))
||
[,
''
])[
1
].
replace
(
/
\+
/g
,
'%20'
)
||
''
//---------------------------------------------------------------获取url
},
return
(
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
decodeURIComponent
(
this
.
enterUrl
))
||
[,
''
])[
1
].
replace
(
/
\+
/g
,
'%20'
)
||
''
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.bigBox
{
height
:
100%
;
background
:
#fafafc
;}
.bigBox
{
.middle
{
padding
:
30
rpx
24
rpx
0
24
rpx
;}
height
:
100%
;
.main
{
padding
:
10
rpx
24
rpx
20
rpx
24
rpx
;
background
:
#FFFFFF
;
border-radius
:
20
rpx
;
box-shadow
:
0
0
15
rpx
#e6e6e8
;}
background
:
#fafafc
;
.product
{
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
25
rpx
0
;}
}
.product
view
{
color
:
#000000
;
padding-left
:
10
rpx
;
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;}
.middle
{
.product
view
text
:first-child
{
flex
:
1
;}
padding
:
30
rpx
24
rpx
0
24
rpx
;
.product
view
text
:nth-child
(
2
)
{
color
:
#666666
;
font-size
:
28
rpx
;
text-align
:
right
;}
}
.product
view
.coupon
{
color
:
#F9690E
;
margin-top
:
10
rpx
;}
.main
{
.product
view
.coupon
text
{
font-size
:
30
rpx
;}
padding
:
10
rpx
24
rpx
20
rpx
24
rpx
;
.mainP3
{
height
:
120
rpx
;
color
:
#000000
;
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
25
rpx
0
25
rpx
10
rpx
;
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
justify-content
:
space-between
;}
background
:
#ffffff
;
.mainP3
text
:nth-child
(
2
)
{
font-size
:
24
rpx
;
color
:
#666666
;}
border-radius
:
20
rpx
;
.mainP3
text
:nth-child
(
2
)
text
:nth-child
(
1
)
{
font-size
:
36
rpx
;
color
:
#F9690E
;
margin-left
:
20
rpx
;
font-weight
:
bold
;}
box-shadow
:
0
0
15
rpx
#e6e6e8
;
.mainview
{
margin-top
:
50
rpx
;
display
:
flex
;
align-items
:
center
;}
}
.mainview
>
image
:first-child
{
margin
:
0
20
rpx
0
10
rpx
;}
.product
{
.mainview
>
view
{
flex
:
1
;}
border-bottom
:
1px
solid
#e5e5e5
;
.bottom
{
position
:
fixed
;
bottom
:
0
;
height
:
100
rpx
;
background
:
#FFFFFF
;
border-top
:
1px
solid
#e5e5e5
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;}
padding
:
25
rpx
0
;
.bottomFirst
{
border-right
:
1px
solid
#cccccc
;
padding-left
:
40
rpx
;
width
:
40%
;
box-sizing
:
border-box
;}
}
.bottomFirst
text
:nth-child
(
2
)
{
font-size
:
40
rpx
;
color
:
#f9690e
;
margin-left
:
10
rpx
;
font-weight
:
bold
;}
.product
view
{
.bottomFirst
text
:nth-child
(
2
)
text
{
font-size
:
28
rpx
;}
color
:
#000000
;
.bottomLast
{
padding-left
:
20
rpx
;
display
:
flex
;
width
:
60%
;
padding-right
:
20
rpx
;
box-sizing
:
border-box
;
align-items
:
center
;}
padding-left
:
10
rpx
;
.bottomLast
text
:first-child
{
display
:
block
;
text-align
:
center
;
width
:
60
rpx
;}
display
:
flex
;
.bottomLast
text
:first-child
text
{
margin-top
:
10
rpx
;
display
:
inline-block
;
font-size
:
24
rpx
;
color
:
#666666
;}
align-items
:
center
;
.bottomLast
text
:nth-child
(
2
)
{
flex
:
1
;
height
:
70
rpx
;
display
:
inline-block
;
text-align
:
center
;
line-height
:
70
rpx
;
background
:
#f9690e
;
color
:
#FFFFFF
;
margin-left
:
30
rpx
;
border-radius
:
20
rpx
;
font-size
:
32
rpx
;}
box-sizing
:
border-box
;
}
.product
view
text
:first-child
{
flex
:
1
;
}
.product
view
text
:nth-child
(
2
)
{
color
:
#666666
;
font-size
:
28
rpx
;
text-align
:
right
;
}
.product
view
.coupon
{
color
:
#f9690e
;
margin-top
:
10
rpx
;
}
.product
view
.coupon
text
{
font-size
:
30
rpx
;
}
.mainP3
{
height
:
120
rpx
;
color
:
#000000
;
border-bottom
:
1px
solid
#e5e5e5
;
padding
:
25
rpx
0
25
rpx
10
rpx
;
display
:
flex
;
align-items
:
center
;
box-sizing
:
border-box
;
justify-content
:
space-between
;
}
.mainP3
text
:nth-child
(
2
)
{
font-size
:
24
rpx
;
color
:
#666666
;
}
.mainP3
text
:nth-child
(
2
)
text
:nth-child
(
1
)
{
font-size
:
36
rpx
;
color
:
#f9690e
;
margin-left
:
20
rpx
;
font-weight
:
bold
;
}
.mainview
{
margin-top
:
50
rpx
;
display
:
flex
;
align-items
:
center
;
}
.mainview
>
image
:first-child
{
margin
:
0
20
rpx
0
10
rpx
;
}
.mainview
>
view
{
flex
:
1
;
}
.bottom
{
position
:
fixed
;
bottom
:
0
;
height
:
100
rpx
;
background
:
#ffffff
;
border-top
:
1px
solid
#e5e5e5
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
}
.bottomFirst
{
border-right
:
1px
solid
#cccccc
;
padding-left
:
40
rpx
;
width
:
40%
;
box-sizing
:
border-box
;
}
.bottomFirst
text
:nth-child
(
2
)
{
font-size
:
40
rpx
;
color
:
#f9690e
;
margin-left
:
10
rpx
;
font-weight
:
bold
;
}
.bottomFirst
text
:nth-child
(
2
)
text
{
font-size
:
28
rpx
;
}
.bottomLast
{
padding-left
:
20
rpx
;
display
:
flex
;
width
:
60%
;
padding-right
:
20
rpx
;
box-sizing
:
border-box
;
align-items
:
center
;
}
.bottomLast
text
:first-child
{
display
:
block
;
text-align
:
center
;
width
:
60
rpx
;
}
.bottomLast
text
:first-child
text
{
margin-top
:
10
rpx
;
display
:
inline-block
;
font-size
:
24
rpx
;
color
:
#666666
;
}
.bottomLast
text
:nth-child
(
2
)
{
flex
:
1
;
height
:
70
rpx
;
display
:
inline-block
;
text-align
:
center
;
line-height
:
70
rpx
;
background
:
#f9690e
;
color
:
#ffffff
;
margin-left
:
30
rpx
;
border-radius
:
20
rpx
;
font-size
:
32
rpx
;
}
</
style
>
</
style
>
pages/scenic/scenicJointOrder/scenicJointOrder.vue
View file @
b52df2e5
...
@@ -5,31 +5,31 @@
...
@@ -5,31 +5,31 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
enterUrl
:
""
,
//进入页面路由
enterUrl
:
''
,
//进入页面路由
outUrl
:
""
,
//跳出页面路由
outUrl
:
''
,
//跳出页面路由
}
}
},
},
onLoad
(
option
){
onLoad
(
option
){
let
merchantId
=
option
.
merchantId
let
merchantId
=
option
.
merchantId
||
''
let
productId
=
option
.
productId
let
productId
=
option
.
productId
||
''
let
companyId
=
option
.
companyId
let
companyId
=
option
.
companyId
||
''
let
orderSource
=
option
.
orderSource
let
orderSource
=
option
.
orderSource
||
''
let
ifyukuaiCode
=
option
.
ifyukuaiCode
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
pdOpenid
=
uni
.
getStorageSync
(
"openid"
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
"token"
)
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
"createUserId"
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
"userId"
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
"https://wx.pangdly.com/#/scenicJointOrder?pdOpenid="
+
pdOpenid
+
"&pdToken="
+
pdToken
+
"&pdCreateUserId="
+
pdCreateUserId
+
"&pdUserId="
+
pdUserId
let
baseUrl
=
'https://wx.pangdly.com/#/scenicJointOrder?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
"&merchantId="
+
merchantId
+
"&productId="
+
productId
+
"&orderSource="
+
orderSource
+
"&companyId="
+
companyId
+
"&ifyukuaiCode="
+
ifyukuaiCode
let
url
=
'&merchantId='
+
merchantId
+
'&productId='
+
productId
+
'&orderSource='
+
orderSource
+
'&companyId='
+
companyId
+
'&ifyukuaiCode='
+
ifyukuaiCode
this
.
outUrl
=
baseUrl
+
url
this
.
outUrl
=
baseUrl
+
url
},
},
methods
:
{
methods
:
{
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
...
...
pages/scenic/scenicSingleOrder/scenicSingleOrder.vue
View file @
b52df2e5
...
@@ -5,11 +5,11 @@
...
@@ -5,11 +5,11 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
enterUrl
:
""
,
//进入页面路由
enterUrl
:
''
,
//进入页面路由
outUrl
:
""
,
//跳出页面路由
outUrl
:
''
,
//跳出页面路由
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -18,43 +18,43 @@
...
@@ -18,43 +18,43 @@
//#endif
//#endif
//#ifdef MP-ALIPAY
//#ifdef MP-ALIPAY
this
.
enterUrl
=
uni
.
getStorageSync
(
"alipayQrCode"
)
this
.
enterUrl
=
uni
.
getStorageSync
(
'alipayQrCode'
)
//#endif
//#endif
if
(
this
.
enterUrl
){
//普通二维码扫码进入
if
(
this
.
enterUrl
){
//普通二维码扫码进入
let
merchantId
=
this
.
getUrlKey
(
"merchantId"
)
let
merchantId
=
this
.
getUrlKey
(
'merchantId'
)
let
productId
=
this
.
getUrlKey
(
"productId"
)
let
productId
=
this
.
getUrlKey
(
'productId'
)
let
orderSource
=
this
.
getUrlKey
(
"orderSource"
)
let
orderSource
=
this
.
getUrlKey
(
'orderSource'
)
let
companyId
=
this
.
getUrlKey
(
"companyId"
)
let
companyId
=
this
.
getUrlKey
(
'companyId'
)
let
pdOpenid
=
uni
.
getStorageSync
(
"openid"
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
"token"
)
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
"createUserId"
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
"userId"
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
"https://wx.pangdly.com/#/scenicSingleOrder?pdOpenid="
+
pdOpenid
+
"&pdToken="
+
pdToken
+
"&pdCreateUserId="
+
pdCreateUserId
+
"&pdUserId="
+
pdUserId
let
baseUrl
=
'https://wx.pangdly.com/#/scenicSingleOrder?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
"&merchantId="
+
merchantId
+
"&productId="
+
productId
+
"&orderSource="
+
orderSource
+
"&companyId="
+
companyId
let
url
=
'&merchantId='
+
merchantId
+
'&productId='
+
productId
+
'&orderSource='
+
orderSource
+
'&companyId='
+
companyId
this
.
outUrl
=
baseUrl
+
url
this
.
outUrl
=
baseUrl
+
url
}
else
{
//小程序页面跳转进入
}
else
{
//小程序页面跳转进入
let
merchantId
=
option
.
merchantId
let
merchantId
=
option
.
merchantId
||
''
let
productId
=
option
.
productId
let
productId
=
option
.
productId
||
''
let
orderSource
=
option
.
orderSource
let
orderSource
=
option
.
orderSource
||
''
let
companyId
=
option
.
companyId
let
companyId
=
option
.
companyId
||
''
let
ifyukuaiCode
=
option
.
ifyukuaiCode
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
//是否是渝快码跳入,渝快码跳入需要在H5端另外走流程
let
pdOpenid
=
uni
.
getStorageSync
(
"openid"
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
"token"
)
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
"createUserId"
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
let
pdUserId
=
uni
.
getStorageSync
(
"userId"
)
let
pdUserId
=
uni
.
getStorageSync
(
'userId'
)
let
baseUrl
=
"https://wx.pangdly.com/#/scenicSingleOrder?pdOpenid="
+
pdOpenid
+
"&pdToken="
+
pdToken
+
"&pdCreateUserId="
+
pdCreateUserId
+
"&pdUserId="
+
pdUserId
let
baseUrl
=
'https://wx.pangdly.com/#/scenicSingleOrder?pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
let
url
=
"&merchantId="
+
merchantId
+
"&productId="
+
productId
+
"&orderSource="
+
orderSource
+
"&companyId="
+
companyId
+
"&ifyukuaiCode="
+
ifyukuaiCode
let
url
=
'&merchantId='
+
merchantId
+
'&productId='
+
productId
+
'&orderSource='
+
orderSource
+
'&companyId='
+
companyId
+
'&ifyukuaiCode='
+
ifyukuaiCode
this
.
outUrl
=
baseUrl
+
url
this
.
outUrl
=
baseUrl
+
url
}
}
},
},
methods
:
{
methods
:
{
getUrlKey
(
name
){
//---------------------------------------------------------------获取url
getUrlKey
(
name
){
//---------------------------------------------------------------获取url
return
(
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
decodeURIComponent
(
this
.
enterUrl
))
||
[,
""
])[
1
].
replace
(
/
\+
/g
,
'%20'
)
||
""
;
return
(
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
decodeURIComponent
(
this
.
enterUrl
))
||
[,
''
])[
1
].
replace
(
/
\+
/g
,
'%20'
)
||
''
},
},
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
...
...
static/img/common/getTicketBg.jpg
0 → 100644
View file @
b52df2e5
314 KB
static/img/orderPayment/alipayLogo.png
0 → 100644
View file @
b52df2e5
5.05 KB
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