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
9f1a5668
Commit
9f1a5668
authored
Apr 03, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化token 过期
parent
9b9ecde8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
37 deletions
+99
-37
detail.vue
pages/hotel/detail.vue
+42
-1
index.vue
pages/index/index.vue
+4
-2
jz_Line.vue
pages/jiuzhai/jz_Line.vue
+4
-1
jz_LineDetail.vue
pages/jiuzhai/jz_LineDetail.vue
+16
-13
visaDetail.vue
pages/visa/visaDetail.vue
+15
-12
visaList.vue
pages/visa/visaList.vue
+5
-2
api.js
plugin/api.js
+13
-6
No files found.
pages/hotel/detail.vue
View file @
9f1a5668
...
...
@@ -278,10 +278,12 @@
>
<CheckDate
:msg=
"searchObj"
@
chosenDateResult=
"chosenDateResult"
></CheckDate>
</u-popup>
<auth
v-if=
"showAuth&&is_show_auth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
</
template
>
<
script
>
import
auth
from
"@/components/auth/index.vue"
;
import
roomGood
from
"./components/room-good.vue"
;
import
nearGood
from
"./components/near-good.vue"
;
import
recommedHotel
from
"./components/recommed-hotel.vue"
;
...
...
@@ -293,6 +295,7 @@ import hotelFacilities from "./components/hotelFacilities.vue";
import
CheckDate
from
"./components/time/date.vue"
;
export
default
{
components
:
{
auth
,
roomGood
,
nearGood
,
recommedHotel
,
...
...
@@ -305,6 +308,7 @@ export default {
},
data
()
{
return
{
showAuth
:
false
,
imgsList
:
[],
id
:
0
,
typeList
:
[
...
...
@@ -405,7 +409,10 @@ export default {
qMsg
:
{
RoomTypeName
:
""
,
//房型筛选
MTypeName
:
""
,
//早餐筛选
}
},
U
:{},
b2bUser
:{},
is_show_auth
:
0
,
};
},
computed
:
{
...
...
@@ -465,6 +472,8 @@ export default {
:
0
;
},
onLoad
(
options
)
{
this
.
U
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
this
.
id
=
options
.
id
;
this
.
roomMsg
.
hotelid
=
options
.
id
;
let
that
=
this
;
...
...
@@ -527,7 +536,39 @@ export default {
this
.
getHotelPrices
()
this
.
getdidaMealType
()
},
onShow
(){
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
//判断后台是否开启自动授权
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
is_show_auth
==
1
)
{
this
.
is_show_auth
=
1
;
}
if
(
!
this
.
U
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
else
if
(
!
this
.
b2bUser
&&
this
.
is_show_auth
==
1
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
},
methods
:
{
reloadUserinfo
()
{
const
pages
=
getCurrentPages
()
const
curPage
=
pages
[
pages
.
length
-
1
]
curPage
.
onLoad
(
curPage
.
options
)
curPage
.
onShow
()
curPage
.
onReady
()
},
//关闭登录窗口
gbAuth
()
{
this
.
showAuth
=
false
;
},
open
(
index
)
{
this
.
$refs
.
uDropdown
.
highlight
();
},
...
...
pages/index/index.vue
View file @
9f1a5668
...
...
@@ -353,10 +353,12 @@
changeHandler
(
i
)
{
this
.
active
=
i
;
},
reloadUserinfo
()
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
init
();
uni
.
removeStorageSync
(
"LoginState"
)
setTimeout
(()
=>
{
uni
.
removeStorageSync
(
"LoginState"
)
},
10000
);
},
gbAuth
()
{
this
.
showAuth
=
false
;
...
...
pages/jiuzhai/jz_Line.vue
View file @
9f1a5668
...
...
@@ -704,6 +704,9 @@
if
(
option
&&
option
.
pName
){
this
.
msg
.
pName
=
option
.
pName
}
this
.
getLineQuery
();
},
onShow
()
{
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
//判断后台是否开启自动授权
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
is_show_auth
==
...
...
@@ -725,7 +728,7 @@
};
this
.
showAuth
=
true
;
}
this
.
getLineQuery
();
},
methods
:
{
reloadUserinfo
()
{
...
...
pages/jiuzhai/jz_LineDetail.vue
View file @
9f1a5668
...
...
@@ -1368,19 +1368,7 @@
this
.
is_show_auth
=
1
;
}
if
(
!
this
.
U
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
}
;
this
.
showAuth
=
true
;
}
else
if
(
!
this
.
b2bUser
&&
this
.
is_show_auth
==
1
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
}
;
this
.
showAuth
=
true
;
}
let
that
=
this
;
uni
.
getSystemInfo
({
success
(
res
)
{
...
...
@@ -1395,6 +1383,21 @@
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
getSale
()
}
,
onShow
(){
if
(
!
this
.
U
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
}
;
this
.
showAuth
=
true
;
}
else
if
(
!
this
.
b2bUser
&&
this
.
is_show_auth
==
1
)
{
this
.
U
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
,
}
;
this
.
showAuth
=
true
;
}
}
,
methods
:
{
calcPzCouponHandler
(){
this
.
couponList
.
forEach
((
x
)
=>
{
...
...
pages/visa/visaDetail.vue
View file @
9f1a5668
...
...
@@ -427,6 +427,21 @@
}
this
.
getSale
()
this
.
getDetails
();
let
that
=
this
;
uni
.
getSystemInfo
({
success
(
res
)
{
that
.
titleStyle
=
{
height
:
"45px"
,
paddingTop
:
`
${
res
.
statusBarHeight
}
px`
,
opacity
:
0
,
};
that
.
topheight
=
55
+
res
.
statusBarHeight
},
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
onShow
(){
this
.
U
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
...
...
@@ -449,18 +464,6 @@
};
this
.
showAuth
=
true
;
}
let
that
=
this
;
uni
.
getSystemInfo
({
success
(
res
)
{
that
.
titleStyle
=
{
height
:
"45px"
,
paddingTop
:
`
${
res
.
statusBarHeight
}
px`
,
opacity
:
0
,
};
that
.
topheight
=
55
+
res
.
statusBarHeight
},
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
methods
:
{
downloadTripPlanHandler
(
item
)
{
...
...
pages/visa/visaList.vue
View file @
9f1a5668
...
...
@@ -163,6 +163,9 @@ export default {
}
},
onLoad
(
option
)
{
},
onShow
()
{
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
//判断后台是否开启自动授权
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
is_show_auth
==
...
...
@@ -183,10 +186,10 @@ export default {
avatarUrl
:
""
,
};
this
.
showAuth
=
true
;
}
}
},
created
()
{
this
.
b2bUser
=
uni
.
getStorageSync
(
"b2b_user"
);
},
mounted
()
{
this
.
getEnumeration
()
...
...
plugin/api.js
View file @
9f1a5668
...
...
@@ -121,12 +121,19 @@ export default {
if
(
res
.
data
.
resultCode
==
10000
||
res
.
data
.
resultCode
==
10001
)
{
uni
.
removeStorageSync
(
'b2b_user'
)
uni
.
removeStorageSync
(
'mall_UserInfo'
)
uni
.
redirectTo
({
url
:
'/pages/index/index'
})
// uni.redirectTo({
// url: '/pages/index/index'
// })
const
pages
=
getCurrentPages
()
const
curPage
=
pages
[
pages
.
length
-
1
]
if
(
cmd
==
'b2b_post_CheckMiniAppToken'
){
// curPage.onLoad(curPage.options)
curPage
.
onShow
()
// curPage.onReady()
}
else
{
if
(
uni
.
getStorageSync
(
"LoginState"
))
return
uni
.
setStorageSync
(
"LoginState"
,
true
)
uni
.
redirectTo
({
url
:
'/pages/index/index'
})
}
}
else
if
(
res
.
data
.
resultCode
!=
1
)
{
if
(
!
failed
)
{
if
(
res
.
data
.
message
!=
''
)
{
...
...
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