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
af1fd72c
Commit
af1fd72c
authored
Aug 27, 2021
by
石盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口对接
parent
ff9d7ae0
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
437 additions
and
261 deletions
+437
-261
package-lock.json
package-lock.json
+1
-1
package.json
package.json
+1
-1
App.vue
src/App.vue
+2
-1
apiList.js
src/api/apiList.js
+16
-9
axios.js
src/api/axios.js
+28
-27
common.js
src/api/common.js
+1
-1
index.js
src/api/index.js
+45
-16
main.js
src/main.js
+2
-2
index.js
src/router/index.js
+79
-73
login.vue
src/views/login/login.vue
+2
-2
charge.vue
src/views/my/charge.vue
+35
-10
Home.vue
src/views/tabbar/Home.vue
+180
-90
mine.vue
src/views/tabbar/mine.vue
+43
-26
vue.config.js
vue.config.js
+2
-2
No files found.
package-lock.json
View file @
af1fd72c
{
{
"name"
:
"
fhxm
"
,
"name"
:
"
repair
"
,
"version"
:
"0.1.0"
,
"version"
:
"0.1.0"
,
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
...
...
package.json
View file @
af1fd72c
{
{
"name"
:
"
fhxm
"
,
"name"
:
"
repair
"
,
"version"
:
"0.1.0"
,
"version"
:
"0.1.0"
,
"private"
:
true
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
...
...
src/App.vue
View file @
af1fd72c
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<keep-alive>
<keep-alive
v-if=
"$route.meta.keepAlive"
>
<router-view
/>
<router-view
/>
</keep-alive>
</keep-alive>
<router-view
v-else
/>
<div
class=
"goBack-btn flex-h flex-hc flex-align-center"
v-if=
"!$route.meta.hideBack"
>
<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>
<i
class=
"iconfont icon-icon_fanhuishouye"
@
click=
"gohome"
></i>
</div>
</div>
...
...
src/api/apiList.js
View file @
af1fd72c
...
@@ -8,10 +8,10 @@ const baseUrl = '/api'
...
@@ -8,10 +8,10 @@ const baseUrl = '/api'
// }
// }
// todo: url
// todo: url
// const httpUrl = 'https://fhxmtest.xueyoubang
edu.com' // 测试接口
const
httpUrl
=
'
https://repairtest.zerui
edu.com
'
// 测试接口
// const h5Url = 'http://fhxmtest.h5.xueyoubang
edu.com' // 测试h5线上地址
const
h5Url
=
'
https://repair.zerui
edu.com
'
// 测试h5线上地址
const
httpUrl
=
'
https://fenghexm.xueyoubangedu.com
'
// 正式接口
//
const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
const
h5Url
=
'
http://depository.fhxmcy.com
'
// 正式h5线上地址
//
const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
export
default
{
export
default
{
// url地址
// url地址
...
@@ -21,11 +21,18 @@ export default {
...
@@ -21,11 +21,18 @@ export default {
WINDOWHREF_ASK
:
`
${
httpUrl
}
/api/scm/login?callBack=
${
h5Url
}
&scopes=snsapi_userinfo&type=1`
,
WINDOWHREF_ASK
:
`
${
httpUrl
}
/api/scm/login?callBack=
${
h5Url
}
&scopes=snsapi_userinfo&type=1`
,
// 登录相关
// 登录相关
SENDCODE
:
baseUrl
+
'
/scm/send
'
,
// 发送验证码
SENDCODE
:
baseUrl
+
'
/worker/send
'
,
// 发送验证码
BINDLOGIN
:
baseUrl
+
'
/scm/bind/login
'
,
// 绑定后台账号
BINDLOGIN
:
baseUrl
+
'
/worker/bind/login
'
,
// 手机号验证码登录绑定微信
BINDLOGINTWO
:
baseUrl
+
'
/scm/bind/login/two
'
,
// 绑定后台账号
USERINFO
:
baseUrl
+
'
/worker/user/info
'
,
// 获取用户信息
REFRESHTOKEN
:
baseUrl
+
'
/scm/change/token
'
,
// 更新token
REPAIR_LIST
:
baseUrl
+
'
/worker/repair/list
'
,
// 工人/审核员端报修单列表
LOGOUT
:
baseUrl
+
'
/scm/logout
'
,
// 更新token
ORDER_STATUS
:
baseUrl
+
'
/worker/repair/order/status
'
,
// 获取订单状态
REPAIR_BEGIN
:
baseUrl
+
'
/worker/repair/begin
'
,
// 开始维修接口
REPAIR_ORDER_DETAIL
:
baseUrl
+
'
/worker/repair/order/detail
'
,
// 报修单详情
REPAIR_ORDER
:
baseUrl
+
'
/worker/material/order
'
,
// 发起收费生成耗材单
MATERIAL_REMARK
:
baseUrl
+
'
/worker/material/remark
'
,
// 备注耗材
// BINDLOGINTWO: baseUrl + '/scm/bind/login/two', // 绑定后台账号
// REFRESHTOKEN: baseUrl + '/scm/change/token', // 更新token
// LOGOUT: baseUrl + '/scm/logout', // 更新token
// 首页
// 首页
WARNGOODS
:
baseUrl
+
'
/scm/warn_goods/today
'
,
// 今日预警
WARNGOODS
:
baseUrl
+
'
/scm/warn_goods/today
'
,
// 今日预警
...
...
src/api/axios.js
View file @
af1fd72c
...
@@ -34,34 +34,35 @@ service.interceptors.request.use(
...
@@ -34,34 +34,35 @@ service.interceptors.request.use(
service
.
interceptors
.
response
.
use
(
service
.
interceptors
.
response
.
use
(
response
=>
{
response
=>
{
const
{
data
,
config
}
=
response
const
{
data
,
config
}
=
response
// console.log('添加响应拦截器', response)
if
(
data
.
code
===
400
)
{
console
.
log
(
'
===== token过期 =====
'
)
const
promisefresh
=
new
Promise
(
function
(
resolve
,
reject
)
{
updateToken
(()
=>
{
config
.
headers
.
token
=
window
.
localStorage
.
getItem
(
'
token
'
)
axios
.
request
(
response
.
config
).
then
(
res
=>
{
const
curData
=
res
.
data
if
(
curData
.
code
===
200
)
{
resolve
(
curData
)
}
else
{
// window.localStorage.removeItem('token')
// window.localStorage.removeItem('status')
resolve
(
curData
)
}
})
},
(
err
)
=>
{
resolve
(
err
)
window
.
localStorage
.
clear
()
Toast
(
'
身份失效,请重新登录
'
)
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN
// url-
console
.
log
(
'
错误--------
'
,
err
)
})
})
return
promisefresh
}
else
{
return
data
return
data
}
// console.log('添加响应拦截器', response)
// if (data.code === 400) {
// console.log('===== token过期 =====')
// const promisefresh = new Promise(function (resolve, reject) {
// updateToken(() => {
// config.headers.token = window.localStorage.getItem('token')
// axios.request(response.config).then(res => {
// const curData = res.data
// if (curData.code === 200) {
// resolve(curData)
// } else {
// // window.localStorage.removeItem('token')
// // window.localStorage.removeItem('status')
// resolve(curData)
// }
// })
// }, (err) => {
// resolve(err)
// window.localStorage.clear()
// Toast('身份失效,请重新登录')
// window.document.location = selfApi.WINDOWHREF_LOGIN // url-
// console.log('错误--------', err)
// })
// })
// return promisefresh
// } else {
// return data
// }
},
},
error
=>
{
error
=>
{
let
info
=
{}
let
info
=
{}
...
...
src/api/common.js
View file @
af1fd72c
...
@@ -22,7 +22,7 @@ export function updateToken (cb, errcb) {
...
@@ -22,7 +22,7 @@ export function updateToken (cb, errcb) {
typeof
cb
===
'
function
'
&&
cb
()
typeof
cb
===
'
function
'
&&
cb
()
}
else
{
}
else
{
console
.
log
(
'
token换取失败-------
'
,
curdata
)
console
.
log
(
'
token换取失败-------
'
,
curdata
)
typeof
errcb
===
'
function
'
&&
errcb
(
curdata
)
//
typeof errcb === 'function' && errcb(curdata)
}
}
}
}
})
})
...
...
src/api/index.js
View file @
af1fd72c
import
axios
from
'
./axios
'
import
axios
from
'
./axios
'
import
{
Toast
,
Dialog
}
from
'
vant
'
import
{
Toast
,
Dialog
}
from
'
vant
'
import
router
from
'
../router/index
'
import
router
from
'
../router/index
'
import
selfApi
from
'
@/api/apiList
'
import
selfApi
from
'
@/api/apiList
'
const
instance
=
axios
()
const
instance
=
axios
()
export
default
{
export
default
{
get
(
url
,
params
,
headers
,
toast
=
true
)
{
get
(
url
,
params
,
headers
,
toast
=
true
)
{
const
options
=
{}
const
options
=
{}
options
.
headers
=
{
options
.
headers
=
{
token
:
window
.
localStorage
.
getItem
(
'
token
'
),
// token: window.localStorage.getItem('token'),
type
:
1
token
:
'
sys
'
// type: 1
}
}
if
(
params
)
{
if
(
params
)
{
...
@@ -19,7 +23,10 @@ export default {
...
@@ -19,7 +23,10 @@ export default {
}
}
if
(
headers
)
{
if
(
headers
)
{
options
.
headers
=
{
...
options
.
headers
,
...
headers
}
options
.
headers
=
{
...
options
.
headers
,
...
headers
}
}
}
Toast
.
allowMultiple
()
Toast
.
allowMultiple
()
let
tipsToast
=
''
let
tipsToast
=
''
...
@@ -33,7 +40,11 @@ export default {
...
@@ -33,7 +40,11 @@ export default {
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
instance
.
get
(
url
,
options
).
then
(
res
=>
{
instance
.
get
(
url
,
options
).
then
(
res
=>
{
const
{
code
,
data
,
message
}
=
res
const
{
data
,
message
}
=
res
const
code
=
res
.
meta
.
code
// console.log(code, typeof code, '11111111111111')
// console.log(code, typeof code, '11111111111111')
toast
&&
tipsToast
.
clear
()
toast
&&
tipsToast
.
clear
()
if
(
code
===
200
)
{
if
(
code
===
200
)
{
...
@@ -53,19 +64,23 @@ export default {
...
@@ -53,19 +64,23 @@ export default {
})
})
},
},
post
(
url
,
data
,
headers
,
params
,
toast
=
true
)
{
post
(
url
,
data
,
headers
,
params
,
toast
=
true
)
{
const
options
=
{}
const
options
=
{}
options
.
headers
=
{
options
.
headers
=
{
token
:
window
.
localStorage
.
getItem
(
'
token
'
),
// token: window.localStorage.getItem('token'),
type
:
1
token
:
'
sys
'
// type: 1
}
}
if
(
params
)
{
if
(
params
)
{
options
.
params
=
params
options
.
params
=
params
}
}
if
(
headers
)
{
if
(
headers
)
{
options
.
headers
=
{
...
options
.
headers
,
...
headers
}
options
.
headers
=
{
...
options
.
headers
,
...
headers
}
}
}
Toast
.
allowMultiple
()
Toast
.
allowMultiple
()
let
tipsToast
=
''
let
tipsToast
=
''
...
@@ -79,7 +94,11 @@ export default {
...
@@ -79,7 +94,11 @@ export default {
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
instance
.
post
(
url
,
data
,
options
).
then
(
res
=>
{
instance
.
post
(
url
,
data
,
options
).
then
(
res
=>
{
const
{
code
,
data
,
message
}
=
res
const
{
data
,
message
}
=
res
const
code
=
res
.
meta
.
code
toast
&&
tipsToast
.
clear
()
toast
&&
tipsToast
.
clear
()
if
(
code
===
200
)
{
if
(
code
===
200
)
{
resolve
(
data
)
resolve
(
data
)
...
@@ -98,15 +117,22 @@ export default {
...
@@ -98,15 +117,22 @@ export default {
})
})
},
},
put
(
url
,
params
,
headers
)
{
put
(
url
,
params
,
headers
)
{
const
options
=
{}
const
options
=
{}
if
(
headers
)
{
if
(
headers
)
{
options
.
headers
=
{
...
options
.
headers
,
...
headers
}
options
.
headers
=
{
...
options
.
headers
,
...
headers
}
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
instance
.
put
(
url
,
params
,
options
).
then
(
res
=>
{
instance
.
put
(
url
,
params
,
options
).
then
(
res
=>
{
const
{
code
,
data
,
message
}
=
res
const
{
code
,
data
,
message
}
=
res
if
(
code
===
200
)
{
if
(
code
===
200
)
{
resolve
(
data
)
resolve
(
data
)
}
else
if
(
code
!==
400
)
{
}
else
if
(
code
!==
400
)
{
...
@@ -119,14 +145,17 @@ export default {
...
@@ -119,14 +145,17 @@ export default {
})
})
},
},
delete
(
url
,
params
,
headers
)
{
delete
(
url
,
params
,
headers
)
{
const
options
=
{}
const
options
=
{}
if
(
params
)
{
if
(
params
)
{
options
.
params
=
params
options
.
params
=
params
}
}
if
(
headers
)
{
if
(
headers
)
{
options
.
headers
=
{
...
options
.
headers
,
...
headers
}
options
.
headers
=
{
...
options
.
headers
,
...
headers
}
}
}
return
instance
.
delete
(
url
,
options
)
return
instance
.
delete
(
url
,
options
)
}
}
...
...
src/main.js
View file @
af1fd72c
...
@@ -7,7 +7,7 @@ import myApi from './api/apiList'
...
@@ -7,7 +7,7 @@ import myApi from './api/apiList'
import
myAxios
from
'
./api/index
'
import
myAxios
from
'
./api/index
'
import
Vant
from
'
vant
'
import
Vant
from
'
vant
'
import
'
vant/lib/index.css
'
import
'
vant/lib/index.css
'
//
import vConsole from '@/plugins/vconsole.js'
import
vConsole
from
'
@/plugins/vconsole.js
'
import
myCondition
from
'
@/components/common/condition.vue
'
import
myCondition
from
'
@/components/common/condition.vue
'
import
listTips
from
'
@/components/common/listtips.vue
'
import
listTips
from
'
@/components/common/listtips.vue
'
// Vue.component('chooseDate', chooseDate)
// Vue.component('chooseDate', chooseDate)
...
@@ -15,7 +15,7 @@ import listTips from '@/components/common/listtips.vue'
...
@@ -15,7 +15,7 @@ import listTips from '@/components/common/listtips.vue'
// import chooseDate from '@/components/common/chooseDate.vue'
// import chooseDate from '@/components/common/chooseDate.vue'
Vue
.
component
(
'
myCondition
'
,
myCondition
)
Vue
.
component
(
'
myCondition
'
,
myCondition
)
Vue
.
component
(
'
listTips
'
,
listTips
)
Vue
.
component
(
'
listTips
'
,
listTips
)
//
Vue.use(vConsole)
Vue
.
use
(
vConsole
)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
...
...
src/router/index.js
View file @
af1fd72c
...
@@ -5,16 +5,22 @@ import Home from '../views/tabbar/Home.vue'
...
@@ -5,16 +5,22 @@ import Home from '../views/tabbar/Home.vue'
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
const
routes
=
[{
const
routes
=
[
path
:
'
/
'
,
{
path
:
'
/home
'
,
name
:
'
home
'
,
name
:
'
home
'
,
meta
:
{
meta
:
{
title
:
'
首页
'
,
title
:
'
工单
'
,
hideBack
:
true
hideBack
:
true
,
keepAlive
:
true
},
},
component
:
Home
component
:
Home
},
},
{
{
path
:
'
/
'
,
redirect
:
'
/login
'
},
{
path
:
'
/my
'
,
path
:
'
/my
'
,
name
:
'
my
'
,
name
:
'
my
'
,
meta
:
{
meta
:
{
...
@@ -22,9 +28,9 @@ const routes = [{
...
@@ -22,9 +28,9 @@ const routes = [{
hideBack
:
true
hideBack
:
true
},
},
component
:
()
=>
import
(
'
../views/tabbar/my.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/my.vue
'
)
},
},
{
{
path
:
'
/mine
'
,
path
:
'
/mine
'
,
name
:
'
mine
'
,
name
:
'
mine
'
,
meta
:
{
meta
:
{
...
@@ -32,8 +38,8 @@ const routes = [{
...
@@ -32,8 +38,8 @@ const routes = [{
hideBack
:
true
hideBack
:
true
},
},
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/mine.vue
'
)
},
},
{
{
path
:
'
/modifyPhone
'
,
path
:
'
/modifyPhone
'
,
name
:
'
mesmodifyPhonesage
'
,
name
:
'
mesmodifyPhonesage
'
,
meta
:
{
meta
:
{
...
@@ -41,28 +47,28 @@ const routes = [{
...
@@ -41,28 +47,28 @@ const routes = [{
hideBack
:
true
hideBack
:
true
},
},
component
:
()
=>
import
(
'
../views/tabbar/modifyPhone.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/modifyPhone.vue
'
)
},
},
// 登录
// 登录
{
{
path
:
'
/login
'
,
path
:
'
/login
'
,
name
:
'
login
'
,
name
:
'
login
'
,
meta
:
{
meta
:
{
title
:
'
机构
登录
'
,
title
:
'
登录
'
,
hideBack
:
true
hideBack
:
true
},
},
component
:
()
=>
import
(
'
@/views/login/login.vue
'
)
component
:
()
=>
import
(
'
@/views/login/login.vue
'
)
},
},
{
{
path
:
'
/againLogin
'
,
path
:
'
/againLogin
'
,
name
:
'
againLogin
'
,
name
:
'
againLogin
'
,
meta
:
{
meta
:
{
title
:
'
机构
登录
'
,
title
:
'
登录
'
,
hideBack
:
true
hideBack
:
true
},
},
component
:
()
=>
import
(
'
@/views/login/againlogin.vue
'
)
component
:
()
=>
import
(
'
@/views/login/againlogin.vue
'
)
},
},
// 个人中心
// 个人中心
{
{
path
:
'
/charge
'
,
path
:
'
/charge
'
,
name
:
'
charge
'
,
name
:
'
charge
'
,
meta
:
{
meta
:
{
...
@@ -70,23 +76,23 @@ const routes = [{
...
@@ -70,23 +76,23 @@ const routes = [{
hideBack
:
true
hideBack
:
true
},
},
component
:
()
=>
import
(
'
@/views/my/charge.vue
'
)
component
:
()
=>
import
(
'
@/views/my/charge.vue
'
)
},
},
{
{
path
:
'
/relationUsers
'
,
path
:
'
/relationUsers
'
,
name
:
'
relationUsers
'
,
name
:
'
relationUsers
'
,
meta
:
{
meta
:
{
title
:
'
我的
'
title
:
'
我的
'
},
},
component
:
()
=>
import
(
'
@/views/my/relation-users.vue
'
)
component
:
()
=>
import
(
'
@/views/my/relation-users.vue
'
)
},
},
{
{
path
:
'
/addRelation
'
,
path
:
'
/addRelation
'
,
name
:
'
addRelation
'
,
name
:
'
addRelation
'
,
meta
:
{
meta
:
{
title
:
'
绑定机构
'
title
:
'
绑定机构
'
},
},
component
:
()
=>
import
(
'
@/views/my/add-relation.vue
'
)
component
:
()
=>
import
(
'
@/views/my/add-relation.vue
'
)
}
}
]
]
const
router
=
new
VueRouter
({
const
router
=
new
VueRouter
({
...
...
src/views/login/login.vue
View file @
af1fd72c
...
@@ -49,6 +49,7 @@ export default {
...
@@ -49,6 +49,7 @@ export default {
return
false
return
false
},
},
getCode
()
{
getCode
()
{
console
.
log
(
111
);
if
(
this
.
isSending
)
return
if
(
this
.
isSending
)
return
if
(
this
.
tel
.
length
!==
11
)
{
if
(
this
.
tel
.
length
!==
11
)
{
this
.
$toast
(
'
请正确输入手机号码
'
)
this
.
$toast
(
'
请正确输入手机号码
'
)
...
@@ -84,8 +85,7 @@ export default {
...
@@ -84,8 +85,7 @@ export default {
// const _this = this
// const _this = this
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
.
then
(
res
=>
{
.
then
(
res
=>
{
window
.
localStorage
.
removeItem
(
'
againLogin
'
)
this
.
$router
.
replace
(
'
/home
'
)
window
.
document
.
location
=
this
.
$myApi
.
WINDOWHREF_ASK
// url-
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
...
...
src/views/my/charge.vue
View file @
af1fd72c
<
template
>
<
template
>
<div
class=
"cont"
>
<div
class=
"cont"
v-if=
"order"
>
<div
class=
"top"
>
<div
class=
"top"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"title"
>
维修类目:
</div>
<div
class=
"title"
>
维修类目:
</div>
<div
class=
"title"
>
供水
</div>
<div
class=
"title"
>
{{
order
.
repair_type
.
type_name
}}
</div>
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
重点水房类-水房的阀门关不紧
</div>
<div
class=
"item-desc que-desc"
>
{{
order
.
description
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
>
公寓区-16号楼-东侧水房
</div>
<div
class=
"item-desc"
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-desc"
>
张三三
</div>
<div
class=
"item-desc"
>
{{
order
.
realname
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc phone"
>
186787867463
</div>
<div
class=
"item-desc phone"
>
{{
order
.
telephone
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-title"
>
提交时间:
</div>
...
@@ -25,9 +27,8 @@
...
@@ -25,9 +27,8 @@
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img flex-h"
>
<div
class=
"img flex-h"
v-for=
"(child, index) in order.image"
:key=
"index"
>
<img
src=
"https://img01.yzcdn.cn/vant/cat.jpeg"
alt
/>
<img
:src=
"child.url"
alt
/>
<img
src=
"https://img01.yzcdn.cn/vant/cat.jpeg"
alt
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -116,9 +117,33 @@ export default {
...
@@ -116,9 +117,33 @@ export default {
hc_name
:
'
请选择
'
,
hc_name
:
'
请选择
'
,
hcPicker
:
false
,
hcPicker
:
false
,
hcNum
:
''
,
hcNum
:
''
,
repair_order_id
:
''
,
order
:
''
,
}
}
},
},
created
(){
console
.
log
(
'
change页面
'
)
this
.
repair_order_id
=
this
.
$route
.
query
.
id
console
.
log
(
this
.
$route
.
query
.
id
,
'
接收的id
'
);
this
.
getDetail
()
},
// mounted(){
// this.getDetail()
// },
methods
:{
methods
:{
getDetail
(){
let
repair_order_id
=
this
.
repair_order_id
.
toString
()
const
curParams
=
{
repair_order_id
:
this
.
repair_order_id
}
// const _this = this
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_ORDER_DETAIL
,
curParams
)
.
then
(
res
=>
{
this
.
order
=
res
.
order
console
.
log
(
this
.
order
,
123456
);
})
.
catch
(()
=>
{})
},
showZl
(
index
){
showZl
(
index
){
this
.
addList
[
index
].
zlSelect
=
true
this
.
addList
[
index
].
zlSelect
=
true
},
},
...
...
src/views/tabbar/Home.vue
View file @
af1fd72c
...
@@ -4,8 +4,9 @@
...
@@ -4,8 +4,9 @@
<div
class=
"point"
></div>
<div
class=
"point"
></div>
<div
class=
"status"
>
工作中
</div>
<div
class=
"status"
>
工作中
</div>
</div>
</div>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<div
class=
"menu flex-h flex-hb"
>
<div
class=
"menu flex-h flex-hb"
>
<div
class=
"hc_total"
>
共3
个工单
</div>
<div
class=
"hc_total"
>
共
{{
count
}}
个工单
</div>
<div
class=
"options"
@
click=
"show"
>
<div
class=
"options"
@
click=
"show"
>
{{
currentName
}}
{{
currentName
}}
<div
class=
"option-box"
v-show=
"xianshi"
>
<div
class=
"option-box"
v-show=
"xianshi"
>
...
@@ -19,48 +20,50 @@
...
@@ -19,48 +20,50 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"order-item
"
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"item.id
"
>
<div
class=
"title"
>
已派工
</div>
<div
class=
"title"
>
{{
item
.
order_status_display
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
预约时间:
</div>
<div
class=
"item-title"
>
预约时间:
</div>
<div
class=
"item-desc"
>
2021-6-20 10:00-12:00
</div>
<div
class=
"item-desc"
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
重点水房类-水房的阀门关不紧
</div>
<div
class=
"item-desc que-desc"
>
{{
item
.
description
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-desc"
>
公寓区-16号楼-东侧水房
</div>
<div
class=
"item-desc"
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
address
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-desc"
>
张三三
</div>
<div
class=
"item-desc"
>
{{
item
.
realname
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc phone"
>
186787867463
</div>
<div
class=
"item-desc phone"
>
{{
item
.
telephone
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-title"
>
提交时间:
</div>
<div
class=
"item-desc"
>
2021-06-17 09:28:43
</div>
<div
class=
"item-desc"
>
{{
item
.
created_at
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img flex-h"
>
<div
class=
"img flex-h"
v-for=
"(child, index) in item.image"
:key=
"index"
>
<img
src=
"https://img01.yzcdn.cn/vant/cat.jpeg"
alt
/>
<img
:src=
"child.url"
alt
/>
<img
src=
"https://img01.yzcdn.cn/vant/cat.jpeg"
alt
/>
</div>
</div>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-title"
>
派工对象:
</div>
<div
class=
"item-desc"
>
王振海
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
name
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc"
>
13180043554
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"material"
v-if=
"item.no_pay_order != null"
>
<div
class=
"material"
>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
class=
"ma-item flex-h flex-hb"
>
<div
class=
"ma-item flex-h flex-hb"
>
<div
class=
"one"
>
洁具
</div>
<div
class=
"one"
>
洁具
</div>
...
@@ -70,15 +73,22 @@
...
@@ -70,15 +73,22 @@
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"btn flex-h flex-hr"
>
<div
class=
"btn flex-h flex-hr"
>
<div
class=
"btn-item bz-btn"
@
click=
"bz_click"
>
备注耗材
</div>
<div
v-if=
"item.is_can_remark_material==1"
class=
"btn-item bz-btn"
@
click=
"bz_click(item.id)"
>
备注耗材
</div>
<!--
<div
class=
"btn-item qr-btn"
>
确认完成
</div>
-->
<div
v-if=
"item.is_can_confirm_complete==1"
class=
"btn-item qr-btn"
>
确认完成
</div>
<div
class=
"btn-item sf-btn"
@
click=
"tz_charge"
>
发起收费
</div>
<div
v-if=
"item.is_can_initiate_charge==1"
class=
"btn-item sf-btn"
@
click=
"tz_charge(item.id)"
>
发起收费
</div>
<div
class=
"btn-item"
@
click=
"zd_click"
>
发起转单
</div>
<div
v-if=
"item.is_can_initiate_transfer_order==1"
class=
"btn-item"
@
click=
"zd_click"
>
发起转单
</div>
<!--
<div
class=
"btn-item"
>
开始维修
</div>
-->
<div
<!--
<div
class=
"btn-item"
>
查看评价
</div>
-->
v-if=
"item.is_can_begin_repair==1"
<div
class=
"btn-item sf-btn"
@
click=
"look_click"
>
查看耗材
</div>
class=
"btn-item"
@
click=
"starRepir(item.id,index)"
>
开始维修
</div>
<div
v-if=
"item.is_can_see_appraisal==1"
class=
"btn-item"
>
查看评价
</div>
<div
v-if=
"item.is_can_see_material==1"
class=
"btn-item sf-btn"
@
click=
"look_click"
>
查看耗材
</div>
</div>
</div>
</div>
</div>
<!-- 空数据 -->
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
</van-pull-refresh>
<div
class=
"blank"
></div>
<div
class=
"blank"
></div>
<!-- 发起转单弹窗 -->
<!-- 发起转单弹窗 -->
<van-popup
v-model=
"zdShow"
close-icon=
"close"
>
<van-popup
v-model=
"zdShow"
close-icon=
"close"
>
...
@@ -97,7 +107,7 @@
...
@@ -97,7 +107,7 @@
<input
class=
"input"
v-model=
"item.sl"
type=
"text"
placeholder=
"请输入耗材个数"
/>
<input
class=
"input"
v-model=
"item.sl"
type=
"text"
placeholder=
"请输入耗材个数"
/>
</div>
</div>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
class=
"del-btn"
@
click=
"delMeth"
>
-删除
</div>
<div
v-if=
"addList.length>1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除
</div>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增
</div>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增
</div>
</div>
</div>
<div
class=
"btnItem flex-h"
>
<div
class=
"btnItem flex-h"
>
...
@@ -135,6 +145,8 @@ export default {
...
@@ -135,6 +145,8 @@ export default {
},
},
data
(){
data
(){
return
{
return
{
count
:
''
,
imgList
:
[],
addList
:[
addList
:[
{
{
hc
:
''
,
hc
:
''
,
...
@@ -142,7 +154,7 @@ export default {
...
@@ -142,7 +154,7 @@ export default {
}
}
],
],
xianshi
:
false
,
xianshi
:
false
,
currentName
:
'
今日
'
,
currentName
:
'
本月
'
,
optionList
:
[{
optionList
:
[{
time_type
:
'
1
'
,
time_type
:
'
1
'
,
name
:
'
今日
'
name
:
'
今日
'
...
@@ -156,14 +168,85 @@ export default {
...
@@ -156,14 +168,85 @@ export default {
time_type
:
'
4
'
,
time_type
:
'
4
'
,
name
:
'
自定义
'
name
:
'
自定义
'
}],
}],
activeStatus
:
''
,
activeStatus
:
3
,
zdShow
:
false
,
//发起转单弹窗
zdShow
:
false
,
//发起转单弹窗
hcShow
:
false
,
//耗材弹窗
hcShow
:
false
,
//耗材弹窗
lookShow
:
false
,
//查看耗材弹窗
lookShow
:
false
,
//查看耗材弹窗
list
:
[],
isloading
:
false
,
page
:
1
,
more
:
true
,
locked
:
false
,
limit
:
10
,
status
:
{},
}
}
},
},
created
(){
this
.
getList
()
// this.getStatus()
},
methods
:
{
methods
:
{
// 初始化
initData
()
{
this
.
list
=
[]
this
.
page
=
1
this
.
more
=
true
this
.
locked
=
false
this
.
isloading
=
false
},
getStatus
(){
const
curParams
=
{}
this
.
$http
.
get
(
this
.
$myApi
.
ORDER_STATUS
)
.
then
(
res
=>
{
console
.
log
(
res
);
this
.
status
=
res
})
.
catch
(()
=>
{})
},
getList
()
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
this
.
isloading
=
true
const
curParams
=
{
time_type
:
this
.
activeStatus
,
page
:
this
.
page
,
limit
:
this
.
limit
}
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
.
then
(
data
=>
{
this
.
list
=
this
.
page
===
1
?
data
.
list
:
this
.
list
.
concat
(
data
.
list
)
this
.
page
=
data
.
page
this
.
more
=
data
.
more
this
.
locked
=
false
this
.
isloading
=
false
,
this
.
count
=
data
.
count
console
.
log
(
data
,
1111
);
})
.
catch
(()
=>
{
this
.
locked
=
false
this
.
isloading
=
false
})
}
},
onRefresh
()
{
this
.
initData
()
if
(
!
this
.
locked
)
{
this
.
locked
=
true
this
.
getList
()
}
},
starRepir
(
id
,
index
){
console
.
log
(
id
);
let
repair_order_id
=
id
.
toString
()
const
curParams
=
{
repair_order_id
:
repair_order_id
}
// const _this = this
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_BEGIN
,
curParams
)
.
then
(
res
=>
{
})
.
catch
(()
=>
{})
},
addMeth
(){
addMeth
(){
this
.
addList
.
push
({
this
.
addList
.
push
({
hc
:
''
,
hc
:
''
,
...
@@ -187,14 +270,15 @@ export default {
...
@@ -187,14 +270,15 @@ export default {
}
}
this
.
activeStatus
=
time_type
;
this
.
activeStatus
=
time_type
;
this
.
currentName
=
name
this
.
currentName
=
name
// setTimeout(() => {
setTimeout
(()
=>
{
// this.getList()
this
.
initData
()
// }, 0);
this
.
getList
()
},
0
);
},
},
//备注耗材弹窗
//备注耗材弹窗
bz_click
(){
bz_click
(
id
){
console
.
log
(
id
,
'
nfnsohnfgvdosrgvf
'
);
this
.
hcShow
=
true
this
.
hcShow
=
true
console
.
log
(
'
111
'
);
},
},
//转单弹窗
//转单弹窗
zd_click
(){
zd_click
(){
...
@@ -215,16 +299,19 @@ export default {
...
@@ -215,16 +299,19 @@ export default {
console
.
log
(
111
)
console
.
log
(
111
)
},
},
//备注提交
//备注提交
bz_submit
(){
bz_submit
(
id
){
console
.
log
(
id
,
1111
);
console
.
log
(
'
六点十分
'
,
this
.
addList
);
console
.
log
(
'
六点十分
'
,
this
.
addList
);
this
.
hcShow
=
false
this
.
hcShow
=
false
this
.
lookShow
=
false
this
.
lookShow
=
false
console
.
log
(
'
111
'
);
console
.
log
(
'
111
'
);
},
},
//发起收费
//发起收费
tz_charge
(){
tz_charge
(
id
){
console
.
log
(
id
,
'
jaeofne
'
);
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'
charge
'
path
:
'
/charge
'
,
query
:
{
id
}
})
})
},
},
},
},
...
@@ -235,11 +322,12 @@ export default {
...
@@ -235,11 +322,12 @@ export default {
.cont
{
.cont
{
min-height
:
100vh
;
min-height
:
100vh
;
background
:
#fff
;
background
:
#fff
;
padding
:
0
.4rem
0
.3
rem
;
padding
:
0
.4rem
0rem
;
}
}
.top
{
.top
{
height
:
0
.36rem
;
height
:
0
.36rem
;
margin-bottom
:
0
.38rem
;
margin-bottom
:
0
.38rem
;
margin-left
:
0
.3rem
;
}
}
.top
.point
{
.top
.point
{
width
:
0
.1rem
;
width
:
0
.1rem
;
...
@@ -268,9 +356,10 @@ export default {
...
@@ -268,9 +356,10 @@ export default {
line-height
:
0
.58rem
;
line-height
:
0
.58rem
;
text-align
:
center
;
text-align
:
center
;
position
:
relative
;
position
:
relative
;
margin-right
:
0
.3rem
;
}
}
.menu
.options
.option-box
{
.menu
.options
.option-box
{
width
:
1
.7
6
rem
;
width
:
1
.7rem
;
// height: 2rem;
// height: 2rem;
background
:
#fff
;
background
:
#fff
;
border
:
1px
solid
#0054ff
;
border
:
1px
solid
#0054ff
;
...
@@ -287,6 +376,7 @@ export default {
...
@@ -287,6 +376,7 @@ export default {
margin-top
:
0
.4rem
;
margin-top
:
0
.4rem
;
padding
:
0
.4rem
0
.3rem
;
padding
:
0
.4rem
0
.3rem
;
margin-bottom
:
0
.2rem
;
margin-bottom
:
0
.2rem
;
margin-left
:
0
.3rem
;
}
}
.title
{
.title
{
color
:
#0054ff
;
color
:
#0054ff
;
...
@@ -323,7 +413,7 @@ export default {
...
@@ -323,7 +413,7 @@ export default {
margin-left
:
0
.16rem
;
margin-left
:
0
.16rem
;
margin-right
:
0
.16rem
;
margin-right
:
0
.16rem
;
}
}
.list-item
{
.list-item
{
margin-bottom
:
0
.4rem
;
margin-bottom
:
0
.4rem
;
}
}
.line
{
.line
{
...
...
src/views/tabbar/mine.vue
View file @
af1fd72c
<
template
>
<
template
>
<div
class=
"cont"
>
<div
class=
"cont"
v-if=
"user"
>
<div
class=
"top"
></div>
<div
class=
"top"
></div>
<div
class=
"info-item"
>
<div
class=
"info-item"
>
<div
class=
"photo"
>
<div
class=
"photo"
>
<img
src=
"@assets/images/my/touxiang.png"
alt=
""
>
<img
src=
"@assets/images/my/touxiang.png"
alt
/
>
</div>
</div>
<div
class=
"btn"
>
工作中
</div>
<div
class=
"btn"
>
工作中
</div>
<div
class=
"name"
>
张初一
</div>
<div
class=
"name"
>
{{
user
.
name
}}
</div>
<div
class=
"group"
>
能源保障组
</div>
<div
class=
"group"
>
{{
user
.
department
.
name
}}
</div>
<div
class=
"tel flex-h"
>
<div
class=
"tel flex-h"
>
<div
class=
"telNumber"
>
13180043557
</div>
<div
class=
"telNumber"
>
{{
user
.
phone
}}
</div>
<img
src=
"@assets/images/my/bianji.png"
alt=
""
>
<img
src=
"@assets/images/my/bianji.png"
alt
/
>
</div>
</div>
</div>
</div>
<!-- tabbar -->
<!-- tabbar -->
...
@@ -25,6 +25,23 @@ export default {
...
@@ -25,6 +25,23 @@ export default {
components
:
{
components
:
{
myTabbar
myTabbar
},
},
data
(){
return
{
user
:
''
,
}
},
created
()
{
this
.
getUserInfo
()
},
methods
:
{
getUserInfo
()
{
this
.
$http
.
get
(
this
.
$myApi
.
USERINFO
)
.
then
(
res
=>
{
this
.
user
=
res
})
.
catch
(()
=>
{})
},
}
}
}
</
script
>
</
script
>
...
@@ -69,28 +86,28 @@ export default {
...
@@ -69,28 +86,28 @@ export default {
line-height
:
0
.48rem
;
line-height
:
0
.48rem
;
margin
:
1
.13rem
auto
0
.59rem
;
margin
:
1
.13rem
auto
0
.59rem
;
}
}
.name
{
.name
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.38rem
;
font-size
:
0
.38rem
;
margin-bottom
:
0
.27rem
;
margin-bottom
:
0
.27rem
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.group
{
.group
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.3rem
;
font-size
:
0
.3rem
;
margin-bottom
:
0
.48rem
;
margin-bottom
:
0
.48rem
;
}
}
.tel
{
.tel
{
width
:
2rem
;
width
:
2rem
;
height
:
0
.28rem
;
height
:
0
.28rem
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
.tel
.telNumber
{
.tel
.telNumber
{
color
:
#000000
;
color
:
#000000
;
font-size
:
0
.3rem
;
font-size
:
0
.3rem
;
margin-right
:
0
.2rem
;
margin-right
:
0
.2rem
;
}
}
.tel
img
{
.tel
img
{
width
:
0
.28rem
;
width
:
0
.28rem
;
height
:
0
.28rem
;
height
:
0
.28rem
;
}
}
...
...
vue.config.js
View file @
af1fd72c
...
@@ -61,8 +61,8 @@ module.exports = {
...
@@ -61,8 +61,8 @@ module.exports = {
proxy
:
{
proxy
:
{
'
/api/
'
:
{
'
/api/
'
:
{
// todo: url
// todo: url
// target: 'https://fhxmtest.xueyoubang
edu.com/api', // 测试
target
:
'
https://repairtest.zerui
edu.com/api
'
,
// 测试
target
:
'
https://fenghexm.xueyoubang
edu.com/api
'
,
// 正式
// target: 'https://repair.zerui
edu.com/api', // 正式
autoRewrite
:
true
,
autoRewrite
:
true
,
changeOrigin
:
true
,
changeOrigin
:
true
,
ws
:
true
,
ws
:
true
,
...
...
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