Commit 8fcd6b52 by hank

build config

parent 11aed0ba
NODE_ENV='production'
VUE_APP_BASE_API='//127.0.0.1:8081'
\ No newline at end of file
VUE_APP_BASE_API='http://39.105.231.218:8090'
\ No newline at end of file
module.exports = {
plugins: {
'autoprefixer': {
browsers: ['Android >= 4.0', 'iOS >= 7']
// browsers: ['Android >= 4.0', 'iOS >= 7']
},
'postcss-pxtorem': {
rootValue: 130,
......
......@@ -139,6 +139,12 @@
var width = window.innerWidth
var height = window.innerHeight
var zoom = height/450
if(width/height <= 16/9) {
zoom = width/800
}
if(width/height >= 16/9) {
zoom = height/450
}
document.documentElement.style.zoom = zoom
}
setZoom()
......
......@@ -60,6 +60,17 @@ const router = new Router({
router.beforeEach((from, to , next) => {
// 路由拦截
console.log(from, to)
next()
if(window.localStorage.getItem('login') || from.path === '/login') {
next()
} else {
// router.redirect()
if(to.path === '/login') {
console.log('11212')
next()
} else {
next('/login?' + Date.now())
}
}
})
export default router
......@@ -84,7 +84,7 @@
</swiper>
</div>
<div class="device-history-use">
<div class="device-history-use" v-show="false">
<div class="title-tip">
最近使用模板
</div>
......
......@@ -12,11 +12,11 @@
</div>
<div class="device-item">
<div class="device-item-top" @click="goDetail">
<div class="device-item-img" style="background: url(../../../img/ps/img.png) no-repeat center">
<div class="device-item-img" style="background: url(./img/ps/img.png) no-repeat center">
</div>
<div class="device-status">
<div class="device-icon" style="background-image: url(../../../img/ps/box.png) ">
<div class="device-icon" style="background-image: url(./img/ps/box.png)">
</div>
<div class="status">
......
......@@ -12,10 +12,10 @@
<div class="device-item-top">
<div
class="device-item-img"
style="background: url(../../../img/ps/img.png) no-repeat center"
style="background: url(./img/ps/img.png) no-repeat center"
></div>
<div class="device-status">
<div class="device-icon" style="background-image: url(../../../img/ps/box.png) "></div>
<div class="device-icon" style="background-image: url(./img/ps/box.png) "></div>
<div class="status" @click="delGroup">解散设备组</div>
</div>
</div>
......
......@@ -76,15 +76,15 @@ export default {
},
index: 0,
list: [
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
{ templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
// { templateName: '1', templateUrl: "http://visual-clouds.bdideal.com/html/1560506687401a2e66e46b6ac4f71bae6429994fd1a99.jpg" },
]
}
},
......
......@@ -2,7 +2,7 @@
<div class="about">
<NavBar title="关于我们" left-arrow></NavBar>
<div class="content">
<img src="/img/ps/aboutbg.png" alt="">
<img src="../../../public/img/ps/aboutbg.png" alt="">
</div>
</div>
</template>
......
......@@ -20,19 +20,19 @@
</div>
<div class="bottom-btn">
<div class="btn-item">
<div class="icon" style="background-image: url(/img/ps/uplv.png)">
<div class="icon" style="background-image: url(./img/ps/uplv.png)">
</div>
<div class="des">固件升级</div>
</div>
<div class="btn-item">
<div class="icon" style="background-image: url(/img/ps/about.png)">
<div class="icon" style="background-image: url(./img/ps/about.png)">
</div>
<div class="des">帮助反馈</div>
</div>
<div class="btn-item" @click="goAbout">
<div class="icon" style="background-image: url(/img/ps/help.png)">
<div class="icon" style="background-image: url(./img/ps/help.png)">
</div>
<div class="des">关于我们</div>
......
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
publicPath: './',
// 生产环境是否生成 sourceMap 文件
productionSourceMap: false,
//是否为 Babel 或 TypeScript 使用 thread-loader。该选项在系统的 CPU 有多于一个内核时自动启用,仅作用于生产构建。
......@@ -51,8 +52,8 @@ module.exports = {
//添加代码压缩工具,及设置生产环境自动删除console
new UglifyJsPlugin({
uglifyOptions: {
warnings: false,
compress: {
warnings: false,
drop_debugger: true,
drop_console: true,
},
......
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