Commit 8b50ad52 authored by wangwei's avatar wangwei

编辑器大小限制去除

parent 9a4c5c92
...@@ -12,8 +12,8 @@ module.exports = { ...@@ -12,8 +12,8 @@ module.exports = {
//本地代理设置 //本地代理设置
proxyTable: { proxyTable: {
'/api': { '/api': {
// target: 'http://local.base-api.sing.com', // 接口的域名 target: 'http://local.base-api.sing.com', // 接口的域名
target: 'https://wechat-test.changchangenglish.com/', // target: 'https://wechat-test.changchangenglish.com/',
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置 changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
} }
}, },
...@@ -42,7 +42,6 @@ module.exports = { ...@@ -42,7 +42,6 @@ module.exports = {
build: { build: {
// Template for index.html // Template for index.html
index: process.env.NODE_ENV === 'production' ? path.resolve(__dirname, '../dist/index.html') : path.resolve(__dirname, '../dev/index.html'), index: process.env.NODE_ENV === 'production' ? path.resolve(__dirname, '../dist/index.html') : path.resolve(__dirname, '../dev/index.html'),
// Paths // Paths
assetsRoot: process.env.NODE_ENV === 'production' ? path.resolve(__dirname, '../dist') : path.resolve(__dirname, '../dev'), assetsRoot: process.env.NODE_ENV === 'production' ? path.resolve(__dirname, '../dist') : path.resolve(__dirname, '../dev'),
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
......
...@@ -140,14 +140,10 @@ ...@@ -140,14 +140,10 @@
methods:{ methods:{
beforeAvatarUploadImg(file){ beforeAvatarUploadImg(file){
const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png' ); const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png' );
const isLt2M = file.size / 1024 < 150;
if (!isJPG) { if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!'); this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
} }
if (!isLt2M) { return isJPG;
this.$message.error('上传头像图片大小不能超过 150KB!');
}
return isJPG && isLt2M;
}, },
beforeAvatarUploadAudio(file){ beforeAvatarUploadAudio(file){
const isJPG = (file.type === 'audio/mp3' ); const isJPG = (file.type === 'audio/mp3' );
......
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