Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
Overview
Overview
Details
Activity
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
hooloo
mp
user
Commits
d956ed89
Commit
d956ed89
authored
Jul 08, 2022
by
songbingqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改结算页跳转订单详情返回逻辑
parent
4c5c7ff2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
orderSubPackage/pages/orderInfo/index.vue
+14
-5
request/index.js
+0
-1
request/menu/index.js
+2
-2
No files found.
orderSubPackage/pages/orderInfo/index.vue
View file @
d956ed89
...
@@ -126,7 +126,8 @@ export default {
...
@@ -126,7 +126,8 @@ export default {
Utils
,
Utils
,
isBuild
:
true
,
isBuild
:
true
,
waitTime
:
0
,
waitTime
:
0
,
backFlag
:
false
backFlag
:
false
,
backToMneu
:
false
}
}
},
},
methods
:
{
methods
:
{
...
@@ -141,7 +142,11 @@ export default {
...
@@ -141,7 +142,11 @@ export default {
},
},
goBack
(){
goBack
(){
if
(
this
.
backFlag
){
if
(
this
.
backFlag
){
if
(
this
.
backToMneu
){
uni
.
switchTab
({
url
:
'/pages/menu/menu'
})
}
else
{
uni
.
switchTab
({
url
:
'/pages/order/order'
})
uni
.
switchTab
({
url
:
'/pages/order/order'
})
}
this
.
backFlag
=
false
this
.
backFlag
=
false
}
}
},
},
...
@@ -179,12 +184,18 @@ export default {
...
@@ -179,12 +184,18 @@ export default {
},
},
async
initData
(
option
){
async
initData
(
option
){
this
.
getSystemInfo
()
this
.
getSystemInfo
()
this
.
backToMneu
=
false
this
.
backFlag
=
true
let
oId
=
uni
.
getStorageSync
(
'orderId'
);
let
oId
=
uni
.
getStorageSync
(
'orderId'
);
console
.
log
(
option
,
'option'
)
console
.
log
(
option
,
'option'
)
// 从订阅消息进入
if
(
JSON
.
stringify
(
option
)
!==
'{}'
&&
option
){
if
(
JSON
.
stringify
(
option
)
!==
'{}'
&&
option
){
this
.
option
=
JSON
.
stringify
(
option
)
this
.
option
=
JSON
.
stringify
(
option
)
const
{
orderId
=
''
}
=
option
const
{
orderId
=
''
,
from
=
''
}
=
option
// 从结算进入
if
(
from
===
'settlement'
){
this
.
backToMneu
=
true
}
// 从订阅消息进入
let
Authorization
=
uni
.
getStorageSync
(
'Authorization'
)
let
Authorization
=
uni
.
getStorageSync
(
'Authorization'
)
if
(
orderId
){
if
(
orderId
){
console
.
log
(
!
Authorization
,
Authorization
)
console
.
log
(
!
Authorization
,
Authorization
)
...
@@ -197,8 +208,6 @@ export default {
...
@@ -197,8 +208,6 @@ export default {
oId
=
orderId
oId
=
orderId
}
}
}
}
}
else
{
this
.
backFlag
=
true
}
}
// return
// return
const
{
data
=
{}}
=
await
Order
.
getOrderDetail
({
orderId
:
oId
})
const
{
data
=
{}}
=
await
Order
.
getOrderDetail
({
orderId
:
oId
})
...
...
request/index.js
View file @
d956ed89
...
@@ -25,7 +25,6 @@ module.exports = (vm) => {
...
@@ -25,7 +25,6 @@ module.exports = (vm) => {
// 请求拦截
// 请求拦截
uni
.
$u
.
http
.
interceptors
.
request
.
use
(
uni
.
$u
.
http
.
interceptors
.
request
.
use
(
(
config
)
=>
{
(
config
)
=>
{
console
.
log
(
config
)
const
{
noLoading
=
false
}
=
config
.
custom
const
{
noLoading
=
false
}
=
config
.
custom
// 可使用async await 做异步操作
// 可使用async await 做异步操作
if
(
!
noLoading
){
if
(
!
noLoading
){
...
...
request/menu/index.js
View file @
d956ed89
...
@@ -63,7 +63,7 @@ export default {
...
@@ -63,7 +63,7 @@ export default {
$EventBus
.
$emit
(
'updateCar'
);
$EventBus
.
$emit
(
'updateCar'
);
uni
.
setStorageSync
(
'orderId'
,
data
.
orderId
);
uni
.
setStorageSync
(
'orderId'
,
data
.
orderId
);
if
(
switchTab
){
if
(
switchTab
){
let
url
=
'/orderSubPackage/pages/orderInfo/index'
let
url
=
'/orderSubPackage/pages/orderInfo/index
?from=settlement
'
uni
.
navigateTo
({
url
})
uni
.
navigateTo
({
url
})
}
else
{
}
else
{
callBack
()
callBack
()
...
@@ -81,7 +81,7 @@ export default {
...
@@ -81,7 +81,7 @@ export default {
$EventBus
.
$emit
(
'updateCar'
);
$EventBus
.
$emit
(
'updateCar'
);
uni
.
setStorageSync
(
'orderId'
,
data
.
orderId
);
uni
.
setStorageSync
(
'orderId'
,
data
.
orderId
);
if
(
switchTab
){
if
(
switchTab
){
let
url
=
'/orderSubPackage/pages/orderInfo/index'
let
url
=
'/orderSubPackage/pages/orderInfo/index
?from=settlement
'
uni
.
navigateTo
({
url
})
uni
.
navigateTo
({
url
})
}
else
{
}
else
{
callBack
()
callBack
()
...
...
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