Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
repair_workers_h5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
石盼盼
repair_workers_h5
Commits
0d033b16
Commit
0d033b16
authored
Oct 27, 2021
by
郭欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'优化逻辑,'
parent
fe2ff37d
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
26 deletions
+55
-26
App.vue
src/App.vue
+3
-3
self.js
src/assets/js/self.js
+1
-1
tabbar.scss
src/assets/styles/common/tabbar.scss
+3
-3
index.js
src/router/index.js
+5
-3
admin_detail.vue
src/views/my/admin_detail.vue
+7
-7
charge.vue
src/views/my/charge.vue
+2
-0
order_detail.vue
src/views/my/order_detail.vue
+12
-4
Home.vue
src/views/tabbar/Home.vue
+22
-5
No files found.
src/App.vue
View file @
0d033b16
<
template
>
<div
id=
"app"
>
<keep-alive
v-if=
"$route.meta.keepAlive"
>
<router-view
/>
<keep-alive
>
<router-view
v-if=
"$route.meta.keepAlive"
/>
</keep-alive>
<router-view
v-
else
/>
<router-view
v-
if=
"!$route.meta.keepAlive"
/>
<div
class=
"goBack-btn flex-h flex-hc flex-align-center"
v-if=
"!$route.meta.hideBack"
>
<i
class=
"iconfont icon-icon_fanhuishouye"
@
click=
"gohome"
></i>
</div>
...
...
src/assets/js/self.js
View file @
0d033b16
// export const SELFSHOP = 'self_shop
'
export
const
REFRESH_LIST
=
'
REFRESH_LIST
'
/**
* 设置缓存 getLocalStorage
...
...
src/assets/styles/common/tabbar.scss
View file @
0d033b16
...
...
@@ -21,7 +21,7 @@
width
:
1
.5rem
;
height
:
100%
;
text-align
:
center
;
font-size
:
0
.
26
rem
;
font-size
:
0
.
3
rem
;
color
:
#333333
;
}
...
...
@@ -30,7 +30,7 @@
}
.tabbar-item
img
{
width
:
0
.
44
rem
;
height
:
0
.
44
rem
;
width
:
0
.
56
rem
;
height
:
0
.
56
rem
;
margin
:
0
auto
;
}
\ No newline at end of file
src/router/index.js
View file @
0d033b16
...
...
@@ -29,7 +29,8 @@ const routes = [{
name
:
'
mine
'
,
meta
:
{
title
:
'
我的
'
,
hideBack
:
true
hideBack
:
true
,
keepAlive
:
true
},
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
},
...
...
@@ -66,7 +67,8 @@ const routes = [{
name
:
'
order_detail
'
,
meta
:
{
title
:
'
工单详情
'
,
hideBack
:
true
hideBack
:
true
,
keepAlive
:
true
},
component
:
()
=>
import
(
'
@/views/my/order_detail.vue
'
)
},
...
...
@@ -94,7 +96,7 @@ const router = new VueRouter({
mode
:
'
history
'
,
base
:
process
.
env
.
BASE_URL
,
routes
,
scrollBehavior
(
to
,
from
,
savePosition
)
{
scrollBehavior
(
to
,
from
,
savePosition
)
{
if
(
savePosition
)
{
return
savePosition
}
else
{
...
...
src/views/my/admin_detail.vue
View file @
0d033b16
...
...
@@ -9,7 +9,7 @@
<div
class=
"item-desc que-desc"
>
{{
order
.
repair_type
.
type_name
}}
-
{{
order
.
description
}}
</div>
<div
class=
"item flex-h flex-
vc
"
>
<div
class=
"item flex-h flex-
start
"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
...
...
@@ -25,9 +25,9 @@
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-desc"
>
{{
item
.
created_at
}}
</div>
<div
class=
"item-desc"
>
{{
order
.
created_at
}}
</div>
</div>
<div
class=
"item flex-h flex-
vc
"
>
<div
class=
"item flex-h flex-
start
"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img"
...
...
@@ -62,7 +62,7 @@
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.pay_order != ''"
>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
class=
"item-title"
>
已支付耗材
:
</div>
<div
v-for=
"(parent, index) in order.pay_order"
:key=
"index"
>
<div
class=
"ma-item flex-h flex-hb"
...
...
@@ -80,7 +80,7 @@
<div
class=
"item_line"
></div>
</div>
<div
class=
"material"
v-if=
"order.free_material_order"
>
<div
class=
"item-title bz-title"
>
备注耗材
</div>
<div
class=
"item-title bz-title"
>
备注耗材
:
</div>
<div
class=
"ma-item flex-h flex-hb"
v-for=
"(child, index) in order.free_material_order.goods"
...
...
@@ -99,11 +99,11 @@
<div
class=
"item_line"
></div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_transfer"
>
<div
class=
"item-title"
>
转单备注
:
</div>
<div
class=
"item-title"
>
转单备注
:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_transfer
.
remark
}}
</div>
</div>
<div
class=
"item flex-h flex-start"
v-if=
"order.orderlog_cancel"
>
<div
class=
"item-title"
>
退回备注
:
</div>
<div
class=
"item-title"
>
退回备注
:
</div>
<div
class=
"item-desc"
>
{{
order
.
orderlog_cancel
.
remark
}}
</div>
</div>
<div
v-if=
"order.is_can_assign_worker==1"
>
...
...
src/views/my/charge.vue
View file @
0d033b16
...
...
@@ -147,6 +147,7 @@
<
script
>
import
{
ImagePreview
}
from
'
vant
'
import
{
REFRESH_LIST
,
setLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
name
:
'
charge
'
,
data
()
{
...
...
@@ -343,6 +344,7 @@ export default {
console
.
log
(
'
执行了吗
'
)
this
.
$toast
.
success
(
'
发起成功
'
)
this
.
$router
.
go
(
-
1
)
setLocalStorage
(
REFRESH_LIST
,
true
)
})
.
catch
(()
=>
{
})
},
...
...
src/views/my/order_detail.vue
View file @
0d033b16
...
...
@@ -13,7 +13,7 @@
<div
class=
"item-desc que-desc"
>
{{
order
.
repair_type
.
type_name
}}
-
{{
order
.
description
}}
</div>
<div
class=
"item flex-h flex-
vc
"
>
<div
class=
"item flex-h flex-
start
"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
>
{{
order
.
region
.
region_name
}}
-
{{
...
...
@@ -33,7 +33,7 @@
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-desc"
>
{{
order
.
created_at
}}
</div>
</div>
<div
class=
"item flex-h flex-
vc
"
>
<div
class=
"item flex-h flex-
start
"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img"
...
...
@@ -249,6 +249,7 @@
<
script
>
import
{
ImagePreview
}
from
'
vant
'
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
import
{
REFRESH_LIST
,
getLocalStorage
,
removeLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
name
:
'
order_detail
'
,
data
()
{
...
...
@@ -321,6 +322,7 @@ export default {
this
.
order
=
res
.
order
this
.
locked
=
false
this
.
isloading
=
false
removeLocalStorage
(
REFRESH_LIST
)
})
.
catch
(()
=>
{
this
.
locked
=
false
...
...
@@ -482,10 +484,16 @@ export default {
},
fetchData
(
to
,
from
)
{
this
.
order_id
=
to
.
query
?
to
.
query
.
id
:
''
if
(
from
.
path
!==
undefined
&&
from
.
path
.
indexOf
(
'
/charge
'
)
!==
-
1
)
{
if
(
getLocalStorage
(
REFRESH_LIST
))
{
this
.
getDetail
()
}
}
else
{
if
(
this
.
order_id
)
{
this
.
getDetail
()
}
}
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
...
...
src/views/tabbar/Home.vue
View file @
0d033b16
...
...
@@ -327,6 +327,7 @@ import myTabbar from '@components/common/tabbar.vue'
import
{
trimStrSpace
}
from
'
@assets/js/format.js
'
import
{
ImagePreview
}
from
'
vant
'
import
{
share
}
from
'
@/api/wxShare.js
'
import
{
REFRESH_LIST
,
getLocalStorage
,
removeLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
name
:
'
home
'
,
components
:
{
...
...
@@ -517,7 +518,7 @@ export default {
this
.
isloading
=
false
this
.
loading
=
false
this
.
finished
=
false
this
.
getUserInfo
()
//
this.getUserInfo()
},
getStatus
()
{
this
.
$http
...
...
@@ -533,6 +534,7 @@ export default {
.
get
(
this
.
$myApi
.
USERINFO
)
.
then
((
res
)
=>
{
this
.
user
=
res
this
.
getList
()
})
.
catch
(()
=>
{
})
},
...
...
@@ -567,6 +569,7 @@ export default {
this
.
count
=
data
.
count
this
.
loading
=
false
this
.
finished
=
!
data
.
more
removeLocalStorage
(
REFRESH_LIST
)
})
.
catch
(()
=>
{
this
.
locked
=
false
...
...
@@ -784,14 +787,26 @@ export default {
tz_charge
(
id
)
{
console
.
log
(
id
,
'
jaeofne
'
)
this
.
$router
.
push
({
path
:
'
/charge
'
,
query
:
{
id
}
name
:
'
charge
'
,
query
:
{
id
:
id
}
})
},
fetchData
(
to
,
from
)
{
console
.
log
(
from
.
path
,
'
from----------------
'
)
if
(
from
.
path
!==
undefined
&&
from
.
path
.
indexOf
(
'
/charge
'
)
!==
-
1
)
{
console
.
log
(
!
this
.
list
.
length
,
'
!this.list.length-------
'
,
this
.
list
)
console
.
log
(
getLocalStorage
(
REFRESH_LIST
),
'
getLocalStorage(REFRESH_LIST)-------
'
)
if
(
!
this
.
list
.
length
||
getLocalStorage
(
REFRESH_LIST
))
{
this
.
initData
()
this
.
getList
()
}
}
else
{
this
.
initData
()
this
.
getUserInfo
()
}
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
...
...
@@ -799,6 +814,8 @@ export default {
})
},
beforeRouteLeave
(
to
,
from
,
next
)
{
console
.
log
(
this
.
list
,
'
this.list-------------
'
)
// return
next
()
}
}
...
...
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