Commit a11e9d7e authored by xulili's avatar xulili

大屏

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