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
262f87f6
Commit
262f87f6
authored
Aug 14, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入口公司ID流程优化
parent
da4f8294
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
209 additions
and
79 deletions
+209
-79
App.vue
App.vue
+2
-0
common.js
common/common.js
+25
-0
main.js
main.js
+1
-1
pages.json
pages.json
+18
-0
hotelIndex.vue
pages/hotel/hotelIndex/hotelIndex.vue
+1
-1
index.vue
pages/indexs/index/index.vue
+70
-64
merchantListIndex.vue
pages/indexs/merchantListIndex/merchantListIndex.vue
+7
-4
login.vue
pages/login/login.vue
+1
-1
center.vue
pages/my/center/center.vue
+14
-2
commonInfo.vue
pages/my/commonInfo/commonInfo.vue
+1
-1
myCouponList.vue
pages/my/couponCenter/myCouponList/myCouponList.vue
+31
-0
enterpriseWechat.vue
.../my/customerService/enterpriseWechat/enterpriseWechat.vue
+1
-1
codeResult.vue
pages/my/passCode/codeResult/codeResult.vue
+1
-1
shopCart.vue
pages/my/shopCart/shopCart.vue
+1
-1
travelList.vue
pages/my/travelList/travelList/travelList.vue
+31
-0
scenicChooseProduct.vue
pages/scenic/scenicChooseProduct/scenicChooseProduct.vue
+3
-1
scenicIndex.vue
pages/scenic/scenicIndex/scenicIndex.vue
+1
-1
No files found.
App.vue
View file @
262f87f6
...
...
@@ -40,6 +40,8 @@ export default {
uni
.
removeStorageSync
(
'alipayQrCode'
)
}
//#endif
//清除之前的companyId
uni
.
removeStorageSync
(
'companyId'
)
/* 版本自动更新代码 */
const
updateManager
=
uni
.
getUpdateManager
()
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
...
...
common/common.js
View file @
262f87f6
...
...
@@ -46,6 +46,31 @@ export default{
var
regss
=
new
RegExp
(
':'
,
'g'
)
//去掉时间里面的:冒号
var
c
=
b
.
replace
(
regss
,
''
)
return
c
},
getUrlKey
:
function
(
name
){
//通过连接地址获取参数值
return
(
new
RegExp
(
'[?|&]'
+
name
+
'='
+
'([^&;]+?)(&|#|;|$)'
).
exec
(
decodeURIComponent
(
this
.
enterUrl
))
||
[,
''
])[
1
].
replace
(
/
\+
/g
,
'%20'
)
||
''
},
/*
通过链接地址获取companyId,并保持在本地
页面获取companyI方法 let companyId=this.$commonjs.getCompanyId()
*/
getCompanyId
:
function
(
option
){
let
enterUrl
=
''
//#ifdef MP-WEIXIN
enterUrl
=
option
.
q
//#endif
//#ifdef MP-ALIPAY
enterUrl
=
uni
.
getStorageSync
(
'alipayQrCode'
)
//#endif
let
companyId
=
''
if
(
enterUrl
){
//普通二维码扫码进入
companyId
=
getUrlKey
(
'companyId'
)
||
uni
.
getStorageSync
(
'companyId'
)
||
''
}
else
{
//小程序页面跳转进入
companyId
=
option
.
companyId
||
uni
.
getStorageSync
(
'companyId'
)
||
''
}
uni
.
setStorageSync
(
'companyId'
,
companyId
)
return
companyId
}
}
//调用方法时--this.$commonjs.today()
\ No newline at end of file
main.js
View file @
262f87f6
...
...
@@ -8,7 +8,7 @@ import commonjs from 'common/common.js'
Vue
.
prototype
.
$commonjs
=
commonjs
Vue
.
prototype
.
$request
=
request
Vue
.
prototype
.
imageError
=
'@/static/img/common/pangdingLogo.png'
//餐饮类型
Vue
.
prototype
.
imageError
=
'@/static/img/common/pangdingLogo.png'
Vue
.
use
(
uView
)
Vue
.
config
.
productionTip
=
false
...
...
pages.json
View file @
262f87f6
...
...
@@ -269,6 +269,24 @@
}
}
,{
"path"
:
"pages/my/couponCenter/myCouponList/myCouponList"
,
"style"
:
{
"navigationBarTitleText"
:
"我的券列表"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/my/travelList/travelList/travelList"
,
"style"
:
{
"navigationBarTitleText"
:
"行程单"
,
"enablePullDownRefresh"
:
false
}
}
],
//分包加载配置,此配置为小程序的分包加载机制。
"subPackages"
:
[
...
...
pages/hotel/hotelIndex/hotelIndex.vue
View file @
262f87f6
...
...
@@ -12,7 +12,7 @@ export default {
}
},
onLoad
(
option
)
{
let
companyId
=
option
.
companyId
||
''
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
||
''
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
||
''
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
||
''
...
...
pages/indexs/index/index.vue
View file @
262f87f6
...
...
@@ -41,7 +41,7 @@
亲子游
</view>
</view>
<view>
<view
@
click=
"goTravelList()"
>
<image
src=
"@/static/img/index/classify7.png"
></image>
<view>
行程订制
...
...
@@ -207,7 +207,6 @@
export
default
{
data
()
{
return
{
companyId
:
''
,
//公司Id
list
:
[
{
image
:
'http://wx.pangdly.com/static/img/home1.69efcf8.jpg'
...
...
@@ -222,8 +221,8 @@ export default {
}
},
onLoad
(
option
){
this
.
companyId
=
option
.
companyId
||
''
if
(
!
this
.
companyId
){
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
if
(
!
companyId
){
this
.
getCompanyId
()
}
},
...
...
@@ -234,70 +233,77 @@ export default {
let
data
=
{
openid
}
this
.
$request
(
'wechatUser/wxUser/getLastRecord'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
//公司Id,用于入口判断,跳入公众号页面时需要传入到公众号
this
.
companyId
=
res
.
data
.
companyId
||
''
//公司Id,用于入口判断,跳入公众号页面时需要传入到公众号
let
companyId
=
res
.
data
.
companyId
||
''
uni
.
setStorageSync
(
'companyId'
,
companyId
)
}
})
},
//---轮播图点击
swiperClick
(
index
){
//长江索道
if
(
index
==
0
){
this
.
goSuodao
()
}
//湖广会馆
if
(
index
==
1
){
this
.
goHuiguan
()
}
//联合国际
if
(
index
==
2
){
this
.
goGuoji
()
}
},
//---跳转景区首页
goScenic
(){
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicIndex/scenicIndex?companyId='
+
this
.
companyId
})
},
//---跳转酒店首页
goHotel
(){
uni
.
navigateTo
({
url
:
'/pages/hotel/hotelIndex/hotelIndex?companyId='
+
this
.
companyId
})
},
//---跳转vlog
goVlog
(){
uni
.
navigateTo
({
url
:
'/pages/vlog/vlogIndex/vlogIndex?companyId='
+
this
.
companyId
})
},
//---跳转索道
goSuodao
(){
uni
.
navigateTo
({
url
:
'/pages/combination/distributionCombiChoose/distributionCombiChoose?channelId=1&merchantId=z0015605022691a5945bbe463141668c'
+
'&groupId=z0016038113016708b8ad38c637b2f26&groupChannelId=z00160423712018998e6260ffcaf3369&companyId='
+
this
.
companyId
})
},
//---跳转联合国际
goGuoji
(){
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicProduct/scenicProduct?merchantId=z00160128940329482da6bd94d443a91&companyId='
+
this
.
companyId
})
},
//---跳转两江游
goLiangjiang
(){
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicProduct/scenicProduct?merchantId=z001578652229233acd0134cf825fdbe&companyId='
+
this
.
companyId
})
//---轮播图点击
swiperClick
(
index
){
//长江索道
if
(
index
==
0
){
this
.
goSuodao
()
}
//湖广会馆
if
(
index
==
1
){
this
.
goHuiguan
()
}
//联合国际
if
(
index
==
2
){
this
.
goGuoji
()
}
},
//---跳转景区首页
goScenic
(){
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicIndex/scenicIndex'
})
},
//---跳转酒店首页
goHotel
(){
uni
.
navigateTo
({
url
:
'/pages/hotel/hotelIndex/hotelIndex'
})
},
//---跳转vlog
goVlog
(){
uni
.
navigateTo
({
url
:
'/pages/vlog/vlogIndex/vlogIndex'
})
},
//---跳转行程订制
goTravelList
(){
uni
.
navigateTo
({
url
:
'/pages/my/travelList/travelList/travelList'
})
},
//---跳转索道
goSuodao
(){
uni
.
navigateTo
({
url
:
'/pages/combination/distributionCombiChoose/distributionCombiChoose?channelId=1&merchantId=z0015605022691a5945bbe463141668c'
+
'&groupId=z0016038113016708b8ad38c637b2f26&groupChannelId=z00160423712018998e6260ffcaf3369'
})
},
//---跳转联合国际
goGuoji
(){
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicProduct/scenicProduct?merchantId=z00160128940329482da6bd94d443a91'
})
},
//---跳转两江游
goLiangjiang
(){
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicProduct/scenicProduct?merchantId=z001578652229233acd0134cf825fdbe'
})
},
//---跳转湖广会馆
goHuiguan
(){
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicProduct/scenicProduct?merchantId=cdd4da5d154a4512bd5f3bec2797557b&companyId='
+
this
.
companyId
})
}
},
//---跳转湖广会馆
goHuiguan
(){
uni
.
navigateTo
({
url
:
'/pages/scenic/scenicProduct/scenicProduct?merchantId=cdd4da5d154a4512bd5f3bec2797557b'
})
}
}
}
...
...
pages/indexs/merchantListIndex/merchantListIndex.vue
View file @
262f87f6
...
...
@@ -144,13 +144,13 @@ export default {
scenicList
:[],
//景区数据
list
:
[
{
image
:
'http://wx.pangdly.com/static/img/
test7.6d14c2d
.jpg'
image
:
'http://wx.pangdly.com/static/img/
home1.69efcf8
.jpg'
},
{
image
:
'http://wx.pangdly.com/static/img/
test8.1cf812b
.jpg'
image
:
'http://wx.pangdly.com/static/img/
home2.2ec1a04
.jpg'
},
{
image
:
'http://wx.pangdly.com/static/img/
test9.b3dd44c
.jpg'
image
:
'http://wx.pangdly.com/static/img/
home3.df60ec3
.jpg'
}
],
tabList
:
[{
...
...
@@ -168,7 +168,10 @@ export default {
}
},
onLoad
(
option
)
{
let
token
=
uni
.
getStorageSync
(
'token'
)
//获取公司Id,保存到本地,支付等逻辑需要入口companyId
this
.
$commonjs
.
getCompanyId
(
option
)
let
token
=
uni
.
getStorageSync
(
'token'
)
||
''
uni
.
setStorageSync
(
'companyId'
,
companyId
)
if
(
token
){
uni
.
getLocation
({
type
:
'wgs84'
,
...
...
pages/login/login.vue
View file @
262f87f6
...
...
@@ -67,7 +67,7 @@ export default {
}
queryTotal
=
queryTotal
.
substr
(
1
)
if
(
token
)
{
uni
.
re
directTo
({
uni
.
re
Launch
({
url
:
'/'
+
enterOptions
.
path
+
'?'
+
queryTotal
})
//保存当前日期
...
...
pages/my/center/center.vue
View file @
262f87f6
...
...
@@ -19,7 +19,7 @@
</view>
</view>
<view
class=
"middle1-list"
>
<view
class=
"middle1-list"
@
click=
"goCoupon()"
>
<view>
0
</view>
...
...
@@ -142,7 +142,7 @@
购物车
</view>
</view>
<view
class=
"middle3-list"
>
<view
class=
"middle3-list"
@
click=
"goTravelList()"
>
<view>
<image
src=
"@/static/img/my/center/schedule.png"
></image>
</view>
...
...
@@ -208,6 +208,18 @@ export default {
url
:
'/pages/my/customerService/enterpriseWechat/enterpriseWechat'
})
},
//---跳转券中心
goCoupon
(){
uni
.
navigateTo
({
url
:
'/pages/my/couponCenter/myCouponList/myCouponList'
})
},
//---跳转行程单
goTravelList
(){
uni
.
navigateTo
({
url
:
'/pages/my/travelList/travelList/travelList'
})
},
}
}
</
script
>
...
...
pages/my/commonInfo/commonInfo.vue
View file @
262f87f6
...
...
@@ -12,7 +12,7 @@ export default {
}
},
onLoad
(
option
)
{
let
companyId
=
option
.
companyId
||
''
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
||
''
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
||
''
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
||
''
...
...
pages/my/couponCenter/myCouponList/myCouponList.vue
0 → 100644
View file @
262f87f6
<
template
>
<view>
<web-view
:src=
"outUrl"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
outUrl
:
''
,
//跳出地址
}
},
onLoad
(
option
)
{
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
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/#/myCoupon?companyId='
this
.
outUrl
=
baseUrl
+
companyId
+
'&pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
},
methods
:
{
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/my/customerService/enterpriseWechat/enterpriseWechat.vue
View file @
262f87f6
...
...
@@ -12,7 +12,7 @@ export default {
}
},
onLoad
(
option
)
{
let
companyId
=
option
.
companyId
||
''
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
||
''
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
||
''
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
||
''
...
...
pages/my/passCode/codeResult/codeResult.vue
View file @
262f87f6
...
...
@@ -12,7 +12,7 @@ export default {
}
},
onLoad
(
option
)
{
let
companyId
=
option
.
companyId
||
''
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
||
''
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
||
''
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
||
''
...
...
pages/my/shopCart/shopCart.vue
View file @
262f87f6
...
...
@@ -12,7 +12,7 @@ export default {
}
},
onLoad
(
option
)
{
let
companyId
=
option
.
companyId
||
''
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
||
''
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
||
''
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
||
''
...
...
pages/my/travelList/travelList/travelList.vue
0 → 100644
View file @
262f87f6
<
template
>
<view>
<web-view
:src=
"outUrl"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
outUrl
:
''
,
//跳出地址
}
},
onLoad
(
option
)
{
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
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/#/travelList?companyId='
this
.
outUrl
=
baseUrl
+
companyId
+
'&pdOpenid='
+
pdOpenid
+
'&pdToken='
+
pdToken
+
'&pdCreateUserId='
+
pdCreateUserId
+
'&pdUserId='
+
pdUserId
},
methods
:
{
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/scenic/scenicChooseProduct/scenicChooseProduct.vue
View file @
262f87f6
...
...
@@ -34,7 +34,7 @@
<label
v-for=
"(items,a) in item.productListCopy"
:key=
'a'
:class=
"{'off':items.status==2}"
>
<view
class=
"product"
:class=
"{'on':items.ifChangeBg}"
>
<view
class=
"product-left"
>
<checkbox
class=
"blue"
:disabled=
"items.status==2"
:value=
"JSON.stringify(items)"
:checked=
"items.ifChecked"
/>
<checkbox
style=
"transform:scale(0.8)"
class=
"blue"
:disabled=
"items.status==2"
:value=
"JSON.stringify(items)"
:checked=
"items.ifChecked"
/>
</view>
<view
class=
"product-right"
>
...
...
@@ -227,6 +227,8 @@ export default {
},
onLoad
(
option
){
//获取公司Id,保存到本地,支付等逻辑需要入口companyId
this
.
$commonjs
.
getCompanyId
(
option
)
this
.
merchantId
=
option
.
merchantId
||
''
let
token
=
uni
.
getStorageSync
(
'token'
)
if
(
token
){
...
...
pages/scenic/scenicIndex/scenicIndex.vue
View file @
262f87f6
...
...
@@ -12,7 +12,7 @@ export default {
}
},
onLoad
(
option
)
{
let
companyId
=
option
.
companyId
||
''
let
companyId
=
this
.
$commonjs
.
getCompanyId
(
option
)
let
pdOpenid
=
uni
.
getStorageSync
(
'openid'
)
||
''
//胖丁小程序openid,临时用,当公众号授权做好之后可以删除
let
pdToken
=
uni
.
getStorageSync
(
'token'
)
||
''
let
pdCreateUserId
=
uni
.
getStorageSync
(
'createUserId'
)
||
''
...
...
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