Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2518cd19
authored
Aug 23, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
413afeb1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
56 deletions
+40
-56
.env.test
+2
-2
src/api/api.js
+5
-0
src/api/login.js
+12
-14
src/router/index.js
+2
-1
src/views/device/detail.vue
+18
-39
src/views/tempaltes/index.vue
+1
-0
No files found.
.env.test
View file @
2518cd19
NODE_ENV
=
'production'
VUE_APP_BASE_API
=
'//server.bdideal.com'
\ No newline at end of file
VUE_APP_BASE_API
=
'https://server.bdideal.com'
\ No newline at end of file
src/api/api.js
View file @
2518cd19
...
...
@@ -32,6 +32,11 @@ export function getTempalteDetail (templateId) {
// 获取模板详情
return
get
(
`/template/get/info/
${
templateId
}
`
)
}
// window.DELETET = deleteTempalte
export
function
deleteTempalte
(
templateId
)
{
return
get
(
`template/del/
${
templateId
}
`
)
}
export
function
createTempalte
(
data
)
{
/**
* 添加模板临时
...
...
src/api/login.js
View file @
2518cd19
import
{
apiRequest
,
post
,
get
}
from
'./index'
import
{
apiRequest
,
post
,
get
}
from
"./index"
;
export
function
login
(
userPhone
,
codeInfo
)
{
return
post
(
'/publics/login/info'
,
{
const
userTerminal
=
process
.
env
.
NODE_ENV
===
"production"
?
"APP"
:
"PC"
;
console
.
log
(
userTerminal
,
"userTerminal"
,
process
.
env
);
return
post
(
"/publics/login/info"
,
{
userPhone
,
codeInfo
,
"userTerminal"
:
"APP"
})
userTerminal
:
userTerminal
});
}
export
function
sendCode
(
phone
)
{
return
get
(
`/publics/login/send/code/
${
phone
}
`
)
return
get
(
`/publics/login/send/code/
${
phone
}
`
)
;
}
export
function
loginout
()
{
return
apiRequest
({
url
:
'loginOut'
,
method
:
'post'
,
data
:
{
}
})
}
\ No newline at end of file
url
:
"loginOut"
,
method
:
"post"
,
data
:
{}
});
}
src/router/index.js
View file @
2518cd19
...
...
@@ -40,7 +40,7 @@ const router = new Router({
{
path
:
'/tempaltes'
,
name
:
'Tempaltes'
,
component
:
Tempaltes
,
meta
:
{
keepAlive
:
true
}
},
{
path
:
'/groups'
,
name
:
'Groups'
,
component
:
Groups
,
meta
:
{
keepAlive
:
true
}
},
{
path
:
'/device'
,
name
:
'Device'
,
component
:
Device
,
meta
:
{
keepAlive
:
true
}
},
{
path
:
'/device/detail'
,
name
:
'DeviceDetail'
,
component
:
DeviceDetail
,
meta
:
{
keepAlive
:
false
}
},
{
path
:
'/device/add'
,
name
:
'DeviceAdd'
,
component
:
DeviceAdd
,
meta
:
{
keepAlive
:
false
}
},
{
path
:
'/user'
,
name
:
'User'
,
component
:
User
,
meta
:
{
keepAlive
:
true
}
},
{
path
:
'/user/help'
,
name
:
'Help'
,
component
:
Help
,
meta
:
{
keepAlive
:
true
}
},
...
...
@@ -50,6 +50,7 @@ const router = new Router({
{
path
:
'/tempaltes/filmdetail'
,
name
:
'FilmDetail'
,
component
:
FilmDetail
,
meta
:
{
keepAlive
:
false
}
},
{
path
:
'/tempaltes/filmdevice'
,
name
:
'FilmDetail'
,
component
:
FilmDevice
,
meta
:
{
keepAlive
:
false
}
},
{
path
:
'/tempaltes/edit'
,
name
:
'TempaltesEdit'
,
component
:
TempalteEdit
,
meta
:
{
keepAlive
:
false
}
},
{
path
:
'/device/detail'
,
name
:
'DeviceDetail'
,
component
:
DeviceDetail
,
meta
:
{
keepAlive
:
false
}
},
{
path
:
'/user/device'
,
name
:
'UserDevice'
,
component
:
UserDevice
,
meta
:
{
keepAlive
:
true
}
},
{
path
:
'/user/films'
,
name
:
'UserFilms'
,
component
:
Userfilms
,
meta
:
{
keepAlive
:
true
}
},
{
...
...
src/views/device/detail.vue
View file @
2518cd19
...
...
@@ -10,12 +10,12 @@
<span>
设备名称
</span>
</div>
<div
class=
"bottom"
>
<span>
Maxrocky
</span>
<span>
{{
detail
.
equipmentName
}}
</span>
<!--
<span
class=
"p-btn"
>
[修改]
</span>
-->
</div>
</div>
<div
class=
"icon"
>
<img
src=
"@/assets/img/box.png
"
alt
/>
<img
:src=
"detail.equipmentUrl
"
alt
/>
</div>
<div
class=
"right-item"
>
<div
class=
"right-item-title"
>
...
...
@@ -23,14 +23,14 @@
<span>
设备状态
</span>
</div>
<div
class=
"bottom"
>
<span>
在线
</span>
<span>
{{
detail
.
equipmentState
===
'ONLINE'
?
'在线'
:
'离线'
}}
</span>
<!--
<span
class=
"p-btn"
>
[离线该设备]
</span>
<span
class=
"del-btn"
>
[解除绑定]
</span>
-->
</div>
<div
class=
"view-film"
>
<div
class=
"right-item-title"
>
<span>
正在播放的视片:
</span>
<span>
aaa
</span>
<span>
{{
detail
.
filmName
?
detail
.
filmName
:
'无'
}}
</span>
</div>
</div>
...
...
@@ -43,54 +43,33 @@
<
script
>
import
NavBar
from
"@/views/layout/navbar"
;
import
"swiper/dist/css/swiper.css"
;
import
{
getFilmList
,
deleteFilm
}
from
"@/api/api"
;
import
{
getDeviceDetail
}
from
"@/api/device"
;
export
default
{
data
()
{
return
{
swiperOption
:
{
slidesPerView
:
"auto"
},
list
:
[]
detail
:
{
equipmentName
:
''
,
equipmentUrl
:
''
,
equipmentState
:
''
}
};
},
components
:
{
NavBar
,
},
computed
:
{
swiper
()
{
return
this
.
$refs
.
mySwiper
.
swiper
;
}
},
created
()
{
this
.
get
List
();
this
.
get
Dtail
();
},
methods
:
{
callback
()
{},
get
List
()
{
get
FilmList
(
).
then
(
res
=>
{
console
.
log
(
res
);
this
.
list
=
res
.
data
.
list
;
})
;
get
Dtail
()
{
get
DeviceDetail
(
this
.
$route
.
query
.
equipmentId
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
this
.
detail
=
res
.
data
})
},
addTemplate
()
{
this
.
$router
.
push
({
path
:
"/tempaltes"
});
},
deleteFilm
(
item
)
{
deleteFilm
(
item
.
filmId
).
then
(
res
=>
{
console
.
log
(
res
.
data
);
this
.
getList
();
});
},
editFilm
(
item
)
{
this
.
$router
.
push
({
path
:
"/tempaltes/edit"
,
query
:
{
filmId
:
item
.
filmId
}
});
deleteFilm
()
{
}
}
};
...
...
src/views/tempaltes/index.vue
View file @
2518cd19
...
...
@@ -166,6 +166,7 @@ export default {
background
:
white
;
width
:
165px
;
font-size
:
15px
;
margin-bottom
:
15px
;
.thumb
{
height
:
92.5px
;
img
{
...
...
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