Commit 2518cd19 by hank

优化

parent 413afeb1
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
......@@ -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) {
/**
* 添加模板临时
......
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: {}
});
}
......@@ -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 } },
{
......
......@@ -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.getList();
this.getDtail();
},
methods: {
callback() {},
getList() {
getFilmList().then(res => {
console.log(res);
this.list = res.data.list;
});
getDtail() {
getDeviceDetail(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() {
}
}
};
......
......@@ -166,6 +166,7 @@ export default {
background: white;
width: 165px;
font-size: 15px;
margin-bottom: 15px;
.thumb {
height: 92.5px;
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