Commit 2518cd19 by hank

优化

parent 413afeb1
NODE_ENV='production' NODE_ENV='production'
VUE_APP_BASE_API='//server.bdideal.com' VUE_APP_BASE_API='https://server.bdideal.com'
\ No newline at end of file \ No newline at end of file
...@@ -32,6 +32,11 @@ export function getTempalteDetail (templateId) { ...@@ -32,6 +32,11 @@ export function getTempalteDetail (templateId) {
// 获取模板详情 // 获取模板详情
return get(`/template/get/info/${templateId}`) return get(`/template/get/info/${templateId}`)
} }
// window.DELETET = deleteTempalte
export function deleteTempalte(templateId) {
return get(`template/del/${templateId}`)
}
export function createTempalte(data) { export function createTempalte(data) {
/** /**
* 添加模板临时 * 添加模板临时
......
import { apiRequest, post, get } from './index' import { apiRequest, post, get } from "./index";
export function login(userPhone, codeInfo) { 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, userPhone,
codeInfo, codeInfo,
"userTerminal": "APP" userTerminal: userTerminal
});
})
} }
export function sendCode(phone) { export function sendCode(phone) {
return get(`/publics/login/send/code/${phone}`) return get(`/publics/login/send/code/${phone}`);
} }
export function loginout() { export function loginout() {
return apiRequest({ return apiRequest({
url: 'loginOut', url: "loginOut",
method: 'post', method: "post",
data: { data: {}
});
} }
})
}
\ No newline at end of file
...@@ -40,7 +40,7 @@ const router = new Router({ ...@@ -40,7 +40,7 @@ const router = new Router({
{ path: '/tempaltes', name: 'Tempaltes', component: Tempaltes, meta: { keepAlive: true } }, { path: '/tempaltes', name: 'Tempaltes', component: Tempaltes, meta: { keepAlive: true } },
{ path: '/groups', name: 'Groups', component: Groups, meta: { keepAlive: true } }, { path: '/groups', name: 'Groups', component: Groups, meta: { keepAlive: true } },
{ path: '/device', name: 'Device', component: Device, 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: '/device/add', name: 'DeviceAdd', component: DeviceAdd, meta: { keepAlive: false } },
{ path: '/user', name: 'User', component: User, meta: { keepAlive: true } }, { path: '/user', name: 'User', component: User, meta: { keepAlive: true } },
{ path: '/user/help', name: 'Help', component: Help, meta: { keepAlive: true } }, { path: '/user/help', name: 'Help', component: Help, meta: { keepAlive: true } },
...@@ -50,6 +50,7 @@ const router = new Router({ ...@@ -50,6 +50,7 @@ const router = new Router({
{ path: '/tempaltes/filmdetail', name: 'FilmDetail', component: FilmDetail, meta: { keepAlive: false } }, { path: '/tempaltes/filmdetail', name: 'FilmDetail', component: FilmDetail, meta: { keepAlive: false } },
{ path: '/tempaltes/filmdevice', name: 'FilmDetail', component: FilmDevice, meta: { keepAlive: false } }, { path: '/tempaltes/filmdevice', name: 'FilmDetail', component: FilmDevice, meta: { keepAlive: false } },
{ path: '/tempaltes/edit', name: 'TempaltesEdit', component: TempalteEdit, 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/device', name: 'UserDevice', component: UserDevice, meta: { keepAlive: true } },
{ path: '/user/films', name: 'UserFilms', component: Userfilms, meta: { keepAlive: true } }, { path: '/user/films', name: 'UserFilms', component: Userfilms, meta: { keepAlive: true } },
{ {
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
<span>设备名称</span> <span>设备名称</span>
</div> </div>
<div class="bottom"> <div class="bottom">
<span>Maxrocky</span> <span>{{detail.equipmentName}}</span>
<!-- <span class="p-btn">[修改]</span> --> <!-- <span class="p-btn">[修改]</span> -->
</div> </div>
</div> </div>
<div class="icon"> <div class="icon">
<img src="@/assets/img/box.png" alt /> <img :src="detail.equipmentUrl" alt />
</div> </div>
<div class="right-item"> <div class="right-item">
<div class="right-item-title"> <div class="right-item-title">
...@@ -23,14 +23,14 @@ ...@@ -23,14 +23,14 @@
<span>设备状态</span> <span>设备状态</span>
</div> </div>
<div class="bottom"> <div class="bottom">
<span>在线</span> <span>{{detail.equipmentState === 'ONLINE' ? '在线' : '离线'}}</span>
<!-- <span class="p-btn">[离线该设备]</span> <!-- <span class="p-btn">[离线该设备]</span>
<span class="del-btn">[解除绑定]</span>--> <span class="del-btn">[解除绑定]</span>-->
</div> </div>
<div class="view-film"> <div class="view-film">
<div class="right-item-title"> <div class="right-item-title">
<span>正在播放的视片:</span> <span>正在播放的视片:</span>
<span>aaa</span> <span>{{detail.filmName ? detail.filmName : '无'}}</span>
</div> </div>
</div> </div>
...@@ -43,54 +43,33 @@ ...@@ -43,54 +43,33 @@
<script> <script>
import NavBar from "@/views/layout/navbar"; import NavBar from "@/views/layout/navbar";
import "swiper/dist/css/swiper.css"; import { getDeviceDetail } from "@/api/device";
import { getFilmList, deleteFilm } from "@/api/api";
export default { export default {
data() { data() {
return { return {
swiperOption: { detail: {
slidesPerView: "auto" equipmentName: '',
}, equipmentUrl: '',
list: [] equipmentState: ''
}
}; };
}, },
components: { components: {
NavBar, NavBar,
}, },
computed: {
swiper() {
return this.$refs.mySwiper.swiper;
}
},
created() { created() {
this.getList(); this.getDtail();
}, },
methods: { methods: {
callback() {}, callback() {},
getList() { getDtail() {
getFilmList().then(res => { getDeviceDetail(this.$route.query.equipmentId).then(res => {
console.log(res); console.log(res.data)
this.list = res.data.list; this.detail = res.data
}); })
}, },
addTemplate() { deleteFilm() {
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
}
});
} }
} }
}; };
......
...@@ -166,6 +166,7 @@ export default { ...@@ -166,6 +166,7 @@ export default {
background: white; background: white;
width: 165px; width: 165px;
font-size: 15px; font-size: 15px;
margin-bottom: 15px;
.thumb { .thumb {
height: 92.5px; height: 92.5px;
img { img {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment