Commit a11e9d7e authored by xulili's avatar xulili

大屏

parents b94f9aa7 792d319a
<template> <template>
<div class="floor-header"> <div class="floor-header">
<span class="back" @click="handleClose"> <span class="back" @click="handleClose">
<img src= "images/applets/back.png" > <img src= "@/assets/images/applets/back.png" >
</span> </span>
<span>{{ title }}</span> <span>{{ title }}</span>
......
...@@ -45,32 +45,32 @@ export default { ...@@ -45,32 +45,32 @@ export default {
url: "/commit", url: "/commit",
title: "观影互动", title: "观影互动",
icon: { icon: {
inactive: "images/applets/commit.png", inactive: require("@/assets/images/applets/commit.png"),
active: "images/applets/commit-active.png" active: require("@/assets/images/applets/commit-active.png")
} }
}, },
{ {
url: "/learn", url: "/learn",
title: "学习项目", title: "学习项目",
icon: { icon: {
inactive: "images/applets/learn.png", inactive: require("@/assets/images/applets/learn.png"),
active: "images/applets/learn-active.png" active: require("@/assets/images/applets/learn-active.png")
} }
}, },
{ {
url: "/admin", url: "/admin",
title: "管理员信息", title: "管理员信息",
icon: { icon: {
inactive: "images/applets/admin.png", inactive: require("@/assets/images/applets/admin.png"),
active: "images/applets/admin-active.png" active: require("@/assets/images/applets/admin-active.png")
} }
}, },
{ {
url: "/editPsd", url: "/editPsd",
title: "修改密码", title: "修改密码",
icon: { icon: {
inactive: "images/applets/editpsd.png", inactive: require("@/assets/images/applets/editpsd.png"),
active: "images/applets/editpsd-active.png" active: require("@/assets/images/applets/editpsd-active.png")
} }
} }
] ]
......
...@@ -75,21 +75,23 @@ const routes = [ ...@@ -75,21 +75,23 @@ const routes = [
}, },
] ]
function getAbsolutePath () {
let path = location.pathname
return path.substring(0, path.lastIndexOf('/') + 1)
}
const router = new VueRouter({ const router = new VueRouter({
routes: routes, routes: routes,
mode: "history" mode: "history",
base: getAbsolutePath()
}) })
const whiteList =['/login','/success','/screen']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
let user = localStorage.getItem("token"); let user = localStorage.getItem("token");
if (to.path !== '/screen') { if (!user && !whiteList.includes(to.path)) { // 通过vuex state获取当前的token是否存在
if (!user && to.path !== '/login' && to.path !== '/success') { // 通过vuex state获取当前的token是否存在
next({ next({
path: '/login', path: '/login',
}) })
} else { }else {
next();
}
} else {
next(); next();
} }
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
content: ""; content: "";
width: 100%; width: 100%;
height: 106px; height: 106px;
background: url("/images/topBox/bg-bottom.png") no-repeat; background: url("~@/assets/images/topBox/bg-bottom.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
content: ""; content: "";
width: 100%; width: 100%;
height: 421px; height: 421px;
background: url("/images/topBox/bg-top.png") no-repeat; background: url("~@/assets/images/topBox/bg-top.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
position: absolute; position: absolute;
top: 0; top: 0;
......
<template> <template>
<div class="success-container"> <div class="success-container">
<img src="images/applets/success.png" alt="" /> <img src="@/assets/images/applets/success.png" alt="" />
<p>{{txt}}</p> <p>{{txt}}</p>
<van-button type="default" @click="sureBtn">确定</van-button> <van-button type="default" @click="sureBtn">确定</van-button>
</div> </div>
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<span>{{ item.userName }}</span> <span>{{ item.userName }}</span>
<img <img
v-if="item.id === currentUserId" v-if="item.id === currentUserId"
src="/images/applets/edit.png" src="@/assets/images/applets/edit.png"
alt alt
/> />
<img <img
v-if="item.id !== currentUserId" v-if="item.id !== currentUserId"
src="/images/applets/detail.png" src="@/assets/images/applets/detail.png"
alt alt
/> />
</li> </li>
......
...@@ -33,7 +33,6 @@ export default { ...@@ -33,7 +33,6 @@ export default {
return { return {
activeTab: 1, activeTab: 1,
form: {}, form: {},
cellIcon: "/images/applets/date.png",
show: false, show: false,
fileList: [], fileList: [],
imgFileList: [], imgFileList: [],
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</van-uploader> </van-uploader>
</div> </div>
<div class="tips"> <div class="tips">
<img src="/images/applets/tip.png" alt /> <img src="@/assets/images/applets/tip.png" alt />
<span> <span>
最多支持上传 最多支持上传
<b>3</b> 段视频,每段时长 <b>20s</b> <b>3</b> 段视频,每段时长 <b>20s</b>
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
</van-uploader> </van-uploader>
</div> </div>
<div class="tips"> <div class="tips">
<img src="/images/applets/tip.png" alt /> <img src="@/assets/images/applets/tip.png" alt />
<span> <span>
最多支持上传 最多支持上传
<b>6</b> 张照片 <b>6</b> 张照片
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
boardList: [], boardList: [],
boardNameList: [], boardNameList: [],
showBoard: false, showBoard: false,
cellIcon: "/images/applets/date.png", cellIcon: require("@/assets/images/applets/date.png"),
show: false, show: false,
fileList: [], // 预览 fileList: [], // 预览
imgFileList: [],// 预览 imgFileList: [],// 预览
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<van-collapse v-model="activeNames"> <van-collapse v-model="activeNames">
<van-collapse-item :name="item.id"> <van-collapse-item :name="item.id">
<template #title> <template #title>
<div>{{item.name||'妹纸'}}<span class="author">{{item.username}}</span> <div>{{item.boardName}}<span class="author">{{item.username}}</span>
</div> </div>
</template> </template>
<div class="content"> <div class="content">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="learn-title">学习视频</div> <div class="learn-title">学习视频</div>
<div class="learn-body" v-if="item.videos.length"> <div class="learn-body" v-if="item.videos.length">
<span v-for="(s,i) in item.videos" :key="i"> <span v-for="(s,i) in item.videos" :key="i">
<video controls width='100%' height='100%' poster="images/applets/video.png"> <video controls width='100%' height='100%' poster="@/assets/images/applets/video.png">
<source :src="s" /> <source :src="s" />
</video> </video>
<!-- autoplay="autoplay" <!-- autoplay="autoplay"
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
content: ""; content: "";
height: 16px; height: 16px;
width: 16px; width: 16px;
background-image: url('/images/applets/timer.png'); background-image: url('~@/assets/images/applets/timer.png');
background-size: cover; background-size: cover;
position: absolute; position: absolute;
left: 0; left: 0;
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
controls controls
width="100%" width="100%"
height="100%" height="100%"
poster="images/applets/video.png" poster="@/assets/images/applets/video.png"
> >
<source :src="s.fileUrl" /> <source :src="s.fileUrl" />
</video> </video>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
controls controls
width="100%" width="100%"
height="100%" height="100%"
poster="images/applets/audio.png" poster="@/assets/images/applets/audio.png"
> >
<source :src="s.fileUrl" /> <source :src="s.fileUrl" />
</audio> </audio>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
@click="goDetail(item)" @click="goDetail(item)"
> >
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<img src="/images/applets/coming.png" alt /> <img src="@/assets/images/applets/coming.png" alt />
</van-cell> </van-cell>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>
......
...@@ -8,13 +8,15 @@ const fs = require('fs') ...@@ -8,13 +8,15 @@ const fs = require('fs')
process.env.VUE_APP_VERSION = require('./package.json').version process.env.VUE_APP_VERSION = require('./package.json').version
// 基础路径 注意发布之前要先修改这里 // 基础路径 注意发布之前要先修改这里
const publicPath = '/' const publicPath = '/h5/'
module.exports = { module.exports = {
publicPath, // 根据你的实际情况更改这里 publicPath, // 根据你的实际情况更改这里
lintOnSave: true, lintOnSave: true,
productionSourceMap: false,
devServer: { devServer: {
publicPath, // 和 publicPath 保持一致 publicPath, // 和 publicPath 保持一致
open: true,
disableHostCheck: false, disableHostCheck: false,
https: false, https: false,
hotOnly: false, // See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#configuring-proxy hotOnly: false, // See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#configuring-proxy
...@@ -30,7 +32,6 @@ module.exports = { ...@@ -30,7 +32,6 @@ module.exports = {
} }
}, },
css: { css: {
}, },
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js // 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
......
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 to comment