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
969e7da4
Commit
969e7da4
authored
Sep 01, 2021
by
石盼盼
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'spp' into 'master'
Spp See merge request
!9
parents
d380aaa9
0f8875be
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
582 additions
and
293 deletions
+582
-293
apiList.js
src/api/apiList.js
+5
-1
admin_index.scss
src/assets/styles/tabbar/admin_index.scss
+1
-0
index.scss
src/assets/styles/tabbar/index.scss
+57
-3
index.js
src/router/index.js
+71
-63
login.vue
src/views/login/login.vue
+12
-1
charge.vue
src/views/my/charge.vue
+4
-1
Home.vue
src/views/tabbar/Home.vue
+312
-166
admin_home.vue
src/views/tabbar/admin_home.vue
+120
-58
No files found.
src/api/apiList.js
View file @
969e7da4
...
...
@@ -9,12 +9,16 @@ const baseUrl = '/api'
// todo: url
const
httpUrl
=
'
https://repairtest.zeruiedu.com
'
// 测试接口
const
h5Url
=
'
http://localhost:8080/
'
// 测试h5线上地址
const
h5Url
=
'
http://localhost:8080/
'
// 测试h5线上地址
window
.
localStorage
.
setItem
(
'
httpUrl
'
,
httpUrl
)
window
.
localStorage
.
setItem
(
'
h5Url
'
,
h5Url
)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
const
wxLogin
=
'
/api/worker/login
'
// 微信登录获取token、登录状态
window
.
localStorage
.
setItem
(
'
wxLogin
'
,
wxLogin
)
const
curScope
=
'
scopes=snsapi_base&type=1
'
export
default
{
// url地址
...
...
src/assets/styles/tabbar/admin_index.scss
View file @
969e7da4
...
...
@@ -159,6 +159,7 @@
.item-title
{
// min-width: 1.5rem;
color
:
#000000
;
white-space
:
nowrap
;
}
.item-desc
{
...
...
src/assets/styles/tabbar/index.scss
View file @
969e7da4
...
...
@@ -110,7 +110,15 @@
}
.ma-item
{
// margin-top: 0.3rem;
height
:
0
.6rem
;
height
:
0
.4rem
;
margin-top
:
0
.2rem
;
}
.item_line
{
width
:
6
.28rem
;
height
:
0
.01rem
;
background
:
#f1f1f1
;
margin-bottom
:
0
.4rem
;
margin-top
:
0
.4rem
;
}
.bz-title
{
margin-bottom
:
0
.2rem
;
...
...
@@ -145,16 +153,25 @@
.blank
{
height
:
1rem
;
}
.
van-popup
{
.
cancel_cont
{
width
:
6
.9rem
;
max-height
:
7rem
;
// height: 5.9rem;
background
:
#fff
;
border-radius
:
0
.12rem
;
padding-top
:
0
.4rem
;
padding-bottom
:
0
.2rem
;
text-align
:
center
;
}
// .van-popup {
// width: 6.9rem;
// max-height: 7rem;
// // height: 5.9rem;
// background: #fff;
// border-radius: 0.12rem;
// padding-top: 0.4rem;
// padding-bottom: 0.2rem;
// text-align: center;
// }
.pop_title
{
color
:
#000000
;
font-size
:
0
.36rem
;
...
...
@@ -235,4 +252,41 @@
text-align
:
center
;
line-height
:
0
.78rem
;
margin
:
1
.2rem
auto
;
}
// 日期选择样式
.date
{
width
:
92%
;
height
:
0
.58rem
;
margin
:
0
.36rem
auto
0
.4rem
;
}
.date
.start
{
width
:
3
.08rem
;
height
:
0
.58rem
;
background
:
#FFFFFF
;
border
:
0
.02rem
solid
#0054FF
;
border-radius
:
0
.12rem
;
text-align
:
center
;
line-height
:
0
.58rem
;
color
:
#000000
;
font-size
:
0
.28rem
;
}
.date
.end
{
width
:
3
.08rem
;
height
:
0
.58rem
;
background
:
#FFFFFF
;
border
:
0
.02rem
solid
#0054FF
;
border-radius
:
0
.12rem
;
text-align
:
center
;
line-height
:
0
.58rem
;
color
:
#000000
;
font-size
:
0
.28rem
;
}
.date
.blue
{
width
:
0
.31rem
;
height
:
0
.03rem
;
background
:
#0054FF
;
}
\ No newline at end of file
src/router/index.js
View file @
969e7da4
...
...
@@ -4,81 +4,79 @@ import Home from '../views/tabbar/Home.vue'
import
selfApi
from
'
@/api/apiList
'
Vue
.
use
(
VueRouter
)
const
routes
=
[
{
path
:
'
/
'
,
name
:
'
home
'
,
meta
:
{
title
:
'
工单
'
,
hideBack
:
true
,
keepAlive
:
true
},
component
:
Home
const
routes
=
[{
path
:
'
/
'
,
name
:
'
home
'
,
meta
:
{
title
:
'
工单
'
,
hideBack
:
true
,
keepAlive
:
true
},
// 登录
{
path
:
'
/login
'
,
name
:
'
login
'
,
meta
:
{
title
:
'
登录
'
,
hideBack
:
true
}
,
component
:
()
=>
import
(
'
@/views/login/login.vue
'
)
component
:
Home
},
// 登录
{
path
:
'
/login
'
,
name
:
'
login
'
,
meta
:
{
title
:
'
登录
'
,
hideBack
:
true
},
{
path
:
'
/mine
'
,
name
:
'
mine
'
,
meta
:
{
title
:
'
我的
'
,
hideBack
:
true
}
,
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
component
:
()
=>
import
(
'
@/views/login/login.vue
'
)
}
,
{
path
:
'
/mine
'
,
name
:
'
mine
'
,
meta
:
{
title
:
'
我的
'
,
hideBack
:
true
},
{
path
:
'
/admin_home
'
,
name
:
'
admin_home
'
,
meta
:
{
title
:
'
报修工单
'
,
hideBack
:
true
}
,
component
:
()
=>
import
(
'
../views/tabbar/admin_home.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
}
,
{
path
:
'
/admin_home
'
,
name
:
'
admin_home
'
,
meta
:
{
title
:
'
报修工单
'
,
hideBack
:
true
},
{
path
:
'
/modifyPhone
'
,
name
:
'
mesmodifyPhonesage
'
,
meta
:
{
title
:
'
修改手机号
'
,
hideBack
:
true
}
,
component
:
()
=>
import
(
'
../views/tabbar/modifyPhone.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/admin_home.vue
'
)
}
,
{
path
:
'
/modifyPhone
'
,
name
:
'
mesmodifyPhonesage
'
,
meta
:
{
title
:
'
修改手机号
'
,
hideBack
:
true
},
// 个人中心
{
path
:
'
/charge
'
,
name
:
'
charge
'
,
meta
:
{
title
:
'
发起收费
'
,
hideBack
:
true
}
,
component
:
()
=>
import
(
'
@/views/my/charge.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/modifyPhone.vue
'
)
},
// 个人中心
{
path
:
'
/charge
'
,
name
:
'
charge
'
,
meta
:
{
title
:
'
发起收费
'
,
hideBack
:
true
},
{
path
:
'
/lookEvaluate
'
,
name
:
'
lookEvaluate
'
,
meta
:
{
title
:
'
查看评价
'
,
hideBack
:
true
},
component
:
()
=>
import
(
'
@/views/my/lookEvaluate.vue
'
)
}
component
:
()
=>
import
(
'
@/views/my/charge.vue
'
)
},
{
path
:
'
/lookEvaluate
'
,
name
:
'
lookEvaluate
'
,
meta
:
{
title
:
'
查看评价
'
,
hideBack
:
true
},
component
:
()
=>
import
(
'
@/views/my/lookEvaluate.vue
'
)
}
]
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
{
...
...
@@ -107,6 +105,8 @@ router.beforeEach((to, from, next) => {
role
=
to
.
query
.
role
window
.
localStorage
.
setItem
(
'
role
'
,
role
)
}
console
.
log
(
'
router里的
'
,
window
.
localStorage
.
getItem
(
'
role
'
));
// console.log(token)
// console.log(status)
window
.
localStorage
.
setItem
(
'
token
'
,
token
)
...
...
@@ -114,6 +114,14 @@ router.beforeEach((to, from, next) => {
}
if
(
token
&&
status
===
'
200
'
)
{
console
.
log
(
'
ok-------1
'
,
200
)
if
(
role
==
2
)
{
window
.
localStorage
.
setItem
(
'
role
'
,
''
)
setTimeout
(()
=>
{
next
({
path
:
'
/admin_home
'
})
},
50
)
}
next
()
}
else
if
(
token
&&
status
===
'
100
'
)
{
console
.
log
(
'
ok-------2
'
,
100
)
...
...
src/views/login/login.vue
View file @
969e7da4
...
...
@@ -82,7 +82,18 @@ export default {
}
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
.
then
(
res
=>
{
window
.
document
.
location
=
this
.
$myApi
.
WINDOWHREF_ASK
// url-
const
httpUrl
=
window
.
localStorage
.
getItem
(
'
httpUrl
'
)
console
.
log
(
'
httpUrl
'
,
httpUrl
)
const
h5Url
=
window
.
localStorage
.
getItem
(
'
h5Url
'
)
console
.
log
(
'
h5Url
'
,
h5Url
)
const
wxLogin
=
window
.
localStorage
.
getItem
(
'
wxLogin
'
)
console
.
log
(
'
wxLogin
'
,
wxLogin
)
const
t
=
res
.
role
==
3
?
h5Url
:
`
${
h5Url
}
admin_home`
// 测试h5线上地址
console
.
log
(
'
的数据傅雷家书蝶恋蜂狂
'
,
res
,
'
链接
'
,
httpUrl
,
'
h5Url
'
,
h5Url
,
'
role
'
,
t
)
let
url
=
`
${
httpUrl
}${
wxLogin
}
?callBack=
${
t
}
&scopes=snsapi_userinfo&type=1`
console
.
log
(
'
1111111111111111111111111111111链接
'
,
url
)
window
.
document
.
location
=
url
// url-
})
.
catch
(()
=>
{})
},
...
...
src/views/my/charge.vue
View file @
969e7da4
...
...
@@ -211,8 +211,11 @@ export default {
changeInput
(
e
,
index
){
this
.
hc_number
=
e
.
target
.
value
console
.
log
(
'
商品数量
'
,
this
.
hc_number
)
this
.
getMonery
()
this
.
totalCount
()
if
(
this
.
addList
[
index
].
mc
){
this
.
getMonery
()
}
},
getMonery
(){
console
.
log
(
'
addlist
'
,
this
.
addList
);
...
...
src/views/tabbar/Home.vue
View file @
969e7da4
This diff is collapsed.
Click to expand it.
src/views/tabbar/admin_home.vue
View file @
969e7da4
This diff is collapsed.
Click to expand it.
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