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
745d7900
Commit
745d7900
authored
Aug 12, 2022
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增资源页面
parent
5d2d5ef3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
2 deletions
+77
-2
pages.json
pages.json
+10
-2
sourceCombiChoose.vue
pages/combination/sourceCombiChoose/sourceCombiChoose.vue
+67
-0
No files found.
pages.json
View file @
745d7900
...
...
@@ -79,8 +79,16 @@
"enablePullDownRefresh"
:
false
}
}
,{
},
{
"path"
:
"pages/combination/sourceCombiChoose/sourceCombiChoose"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},{
"path"
:
"pages/combination/distributionCombiChoose/distributionCombiChoose"
,
"style"
:
{
...
...
pages/combination/sourceCombiChoose/sourceCombiChoose.vue
0 → 100644
View file @
745d7900
<
template
>
<!-- 资源方组合票页面,根据景区,酒店,餐饮,特产显示不同内容 -->
<view>
<web-view
:src=
"outUrl"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
enterUrl
:
""
,
//进入页面路由
outUrl
:
""
,
//跳出页面路由
}
},
onLoad
(
option
)
{
//#ifdef MP-WEIXIN
this
.
enterUrl
=
option
.
q
//#endif
//#ifdef MP-ALIPAY
this
.
enterUrl
=
uni
.
getStorageSync
(
"alipayQrCode"
)
//#endif
if
(
this
.
enterUrl
){
//普通二维码扫码进入
let
channelId
=
this
.
getUrlKey
(
"channelId"
)
let
companyId
=
this
.
getUrlKey
(
"companyId"
)
let
merchantId
=
this
.
getUrlKey
(
"merchantId"
)
let
groupId
=
this
.
getUrlKey
(
"groupId"
)
let
groupChannelId
=
this
.
getUrlKey
(
"groupChannelId"
)
let
sourceType
=
this
.
getUrlKey
(
'sourceType'
)
//资源方类型,景区1,酒店2,餐饮3,特产4,运营车5
let
pdOpenid
=
uni
.
getStorageSync
(
"openid"
)
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
"token"
)
let
pdCreateUserId
=
uni
.
getStorageSync
(
"createUserId"
)
let
pdUserId
=
uni
.
getStorageSync
(
"userId"
)
let
baseUrl
=
"https://wx.pangdly.com/#/sourceCombiChoose?channelId="
+
channelId
+
"&merchantId="
+
merchantId
+
"&groupId="
+
groupId
+
"&groupChannelId="
+
groupChannelId
+
"&companyId="
+
companyId
this
.
outUrl
=
baseUrl
+
"&pdOpenid="
+
pdOpenid
+
"&pdToken="
+
pdToken
+
"&pdCreateUserId="
+
pdCreateUserId
+
"&pdUserId="
+
pdUserId
+
"&sourceType="
+
sourceType
}
else
{
//小程序页面跳转进入
let
channelId
=
option
.
channelId
||
''
let
companyId
=
option
.
companyId
||
''
let
merchantId
=
option
.
merchantId
||
''
let
groupId
=
option
.
groupId
||
''
let
groupChannelId
=
option
.
groupChannelId
||
''
let
thirdOpenid
=
option
.
thirdOpenid
||
''
//第三方openid
let
sourceType
=
option
.
sourceType
||
''
//第三方openid//资源方类型,景区1,酒店2,餐饮3,特产4,运营车5
let
pdOpenid
=
uni
.
getStorageSync
(
"openid"
)
||
''
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
"token"
)
||
''
let
pdCreateUserId
=
uni
.
getStorageSync
(
"createUserId"
)
||
''
let
pdUserId
=
uni
.
getStorageSync
(
"userId"
)
||
''
let
baseUrl
=
"https://wx.pangdly.com/#/sourceCombiChoose?thirdOpenid="
+
thirdOpenid
+
"&channelId="
+
channelId
+
"&merchantId="
+
merchantId
+
"&groupId="
+
groupId
+
"&sourceType="
+
sourceType
this
.
outUrl
=
baseUrl
+
"&groupChannelId="
+
groupChannelId
+
"&companyId="
+
companyId
+
"&pdOpenid="
+
pdOpenid
+
"&pdToken="
+
pdToken
+
"&pdCreateUserId="
+
pdCreateUserId
+
"&pdUserId="
+
pdUserId
}
},
methods
:
{
getUrlKey
(
name
){
//---------------------------------------------------------------获取url
return
(
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
decodeURIComponent
(
this
.
enterUrl
))
||
[,
""
])[
1
].
replace
(
/
\+
/g
,
'%20'
)
||
""
;
},
}
}
</
script
>
<
style
>
</
style
>
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