Commit 1b761faa by 无尘

fix: 修改上传图片限制

parent 65e13131
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-集团后台</title><link href=./static/css/app.d09666b551b61a53e82a152c4b9afcaa.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.3a23380c7c0f227b7670.js></script><script type=text/javascript src=./static/js/vendor.634a4bfa2fa26d2b4636.js></script><script type=text/javascript src=./static/js/app.0fcc0941e287b69becdc.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-集团后台</title><link href=./static/css/app.f6a5039ab0f9faebbdf160fd694a05a8.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.6a37dcb72a57f67df8bb.js></script><script type=text/javascript src=./static/js/vendor.634a4bfa2fa26d2b4636.js></script><script type=text/javascript src=./static/js/app.9ffa97438e5d2651a884.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([20],{"1WGE":function(e,t){},"Z9/t":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("3Xzz"),o=a("P9l9"),s={name:"nearStoreSet",data:function(){return{projectName:"gic-clique",navpath:[{name:"首页",path:"/"},{name:"附近门店",path:""}],nearStoreSwithFlag:!0}},created:function(){},methods:{changeRoute:function(e){console.log("route-change"),this.$router.push(e)},nearStoreSwitch:function(){console.log(this.nearStoreSwithFlag),this.setNearStore()},setNearStore:function(){var e=this,t={requestProject:e.projectName,isShowCliqueStore:1==e.nearStoreSwithFlag?1:0};Object(o.e)("/api-admin/save-clique-show-store",t).then(function(t){var a=t.data;0!=a.errorCode?(e.nearStoreSwithFlag=!1,e.$message.error({duration:1e3,message:a.message})):e.$message({message:"修改附近门店显示配置成功",type:"success"})}).catch(function(t){console.log(t),e.nearStoreSwithFlag=!1,e.$message.error({duration:1e3,message:t.message})})},getNearStore:function(){var e=this,t={requestProject:e.projectName};Object(o.e)("/api-admin/clique-show-store",t).then(function(t){var a=t.data;0!=a.errorCode?e.$message.error({duration:1e3,message:error.message}):e.nearStoreSwithFlag=1==a.result.isShowCliqueStore}).catch(function(t){console.log(t),e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getNearStore()},components:{topNav:r.a}},n={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"right-wrap near-store-contain"},[a("topNav",{attrs:{navpath:e.navpath}}),e._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("div",{staticClass:"attention-wrap"},[a("label",{staticClass:"near-store-tip"},[e._v("单商户小程序中附近门店是否展示集团其他商户门店")]),e._v(" "),a("div",{staticClass:"item-label"},[a("span",[e._v("展示")]),e._v(" "),a("el-switch",{on:{change:e.nearStoreSwitch},model:{value:e.nearStoreSwithFlag,callback:function(t){e.nearStoreSwithFlag=t},expression:"nearStoreSwithFlag"}})],1)])])]),e._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var i=a("VU/8")(s,n,!1,function(e){a("1WGE")},"data-v-4dda24e3",null);t.default=i.exports}});
//# sourceMappingURL=20.188dd04a00d83fd7df06.js.map
\ No newline at end of file
webpackJsonp([21],{"1WGE":function(e,t){},"Z9/t":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("3Xzz"),o=a("P9l9"),s={name:"nearStoreSet",data:function(){return{projectName:"gic-clique",navpath:[{name:"首页",path:"/"},{name:"附近门店",path:""}],nearStoreSwithFlag:!0}},created:function(){},methods:{changeRoute:function(e){console.log("route-change"),this.$router.push(e)},nearStoreSwitch:function(){console.log(this.nearStoreSwithFlag),this.setNearStore()},setNearStore:function(){var e=this,t={requestProject:e.projectName,isShowCliqueStore:1==e.nearStoreSwithFlag?1:0};Object(o.e)("/api-admin/save-clique-show-store",t).then(function(t){var a=t.data;0!=a.errorCode?(e.nearStoreSwithFlag=!1,e.$message.error({duration:1e3,message:a.message})):e.$message({message:"修改附近门店显示配置成功",type:"success"})}).catch(function(t){console.log(t),e.nearStoreSwithFlag=!1,e.$message.error({duration:1e3,message:t.message})})},getNearStore:function(){var e=this,t={requestProject:e.projectName};Object(o.e)("/api-admin/clique-show-store",t).then(function(t){var a=t.data;0!=a.errorCode?e.$message.error({duration:1e3,message:error.message}):e.nearStoreSwithFlag=1==a.result.isShowCliqueStore}).catch(function(t){console.log(t),e.$message.error({duration:1e3,message:t.message})})}},mounted:function(){this.getNearStore()},components:{topNav:r.a}},n={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"right-wrap near-store-contain"},[a("topNav",{attrs:{navpath:e.navpath}}),e._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("div",{staticClass:"attention-wrap"},[a("label",{staticClass:"near-store-tip"},[e._v("单商户小程序中附近门店是否展示集团其他商户门店")]),e._v(" "),a("div",{staticClass:"item-label"},[a("span",[e._v("展示")]),e._v(" "),a("el-switch",{on:{change:e.nearStoreSwitch},model:{value:e.nearStoreSwithFlag,callback:function(t){e.nearStoreSwithFlag=t},expression:"nearStoreSwithFlag"}})],1)])])]),e._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var i=a("VU/8")(s,n,!1,function(e){a("1WGE")},"data-v-4dda24e3",null);t.default=i.exports}});
//# sourceMappingURL=21.2d9d159547fd48b0ad9c.js.map
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,t,d){for(var f,o,b,i=0,u=[];i<a.length;i++)o=a[i],n[o]&&u.push(n[o][0]),n[o]=0;for(f in t)Object.prototype.hasOwnProperty.call(t,f)&&(e[f]=t[f]);for(c&&c(a,t,d);u.length;)u.shift()();if(d)for(i=0;i<d.length;i++)b=r(r.s=d[i]);return b};var a={},n={33:0};function r(c){if(a[c])return a[c].exports;var n=a[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var c=n[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,r){c=n[e]=[a,r]});c[2]=a;var t=document.getElementsByTagName("head")[0],d=document.createElement("script");d.type="text/javascript",d.charset="utf-8",d.async=!0,d.timeout=12e4,r.nc&&d.setAttribute("nonce",r.nc),d.src=r.p+"static/js/"+e+"."+{0:"941b7928ac3ec125dffe",1:"d84116ddb7da8d636dae",2:"898e902c03247d4950cd",3:"c2dbaee2092c89d6bb92",4:"b4dcc6aadf91150f66db",5:"5b1afe039b0196c0894f",6:"2a27b6ee8413b8c3f627",7:"f356c8f6136a4f23a8aa",8:"d57c4669ad7e30c60e4a",9:"4aedd9d9f32e5bd5b794",10:"3b6408b1d99252eda551",11:"f0b71dac5722ed6c4628",12:"b8af2fcb45c72480bdb0",13:"fe6ae03c95a9571f97a5",14:"e7a642abb172a6eeda8c",15:"75b9f569824348cabdf0",16:"c3cd0e9a4f74e7fe1908",17:"d87c97f00c0f75e2f86d",18:"a64255b1fd390deb552e",19:"25cc6ae04400c7a37631",20:"188dd04a00d83fd7df06",21:"f448e9cd451ad6f97d60",22:"56576b6f7bc17b601c2e",23:"3c6f4c7ebe626e824f1e",24:"c48c0d80cea5ac5e96c0",25:"5071d842c7e8695018b6",26:"3d2c1d84db0a5c488169",27:"b9fd5f8677a43cab4a3f",28:"44deebcea6ccd096081f",29:"9339e8311b77c469e738",30:"ebb71c6a502890f047f8"}[e]+".js";var f=setTimeout(o,12e4);function o(){d.onerror=d.onload=null,clearTimeout(f);var c=n[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return d.onerror=d.onload=o,t.appendChild(d),a},r.m=e,r.c=a,r.d=function(e,c,a){r.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},r.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(c,"a",c),c},r.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},r.p="./",r.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.3a23380c7c0f227b7670.js.map
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,t,f){for(var d,o,b,i=0,u=[];i<a.length;i++)o=a[i],n[o]&&u.push(n[o][0]),n[o]=0;for(d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d]);for(c&&c(a,t,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=r(r.s=f[i]);return b};var a={},n={33:0};function r(c){if(a[c])return a[c].exports;var n=a[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var c=n[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,r){c=n[e]=[a,r]});c[2]=a;var t=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,r.nc&&f.setAttribute("nonce",r.nc),f.src=r.p+"static/js/"+e+"."+{0:"941b7928ac3ec125dffe",1:"d84116ddb7da8d636dae",2:"898e902c03247d4950cd",3:"c2dbaee2092c89d6bb92",4:"b4dcc6aadf91150f66db",5:"5b1afe039b0196c0894f",6:"2a27b6ee8413b8c3f627",7:"f356c8f6136a4f23a8aa",8:"d57c4669ad7e30c60e4a",9:"4aedd9d9f32e5bd5b794",10:"3b6408b1d99252eda551",11:"f0b71dac5722ed6c4628",12:"b8af2fcb45c72480bdb0",13:"fe6ae03c95a9571f97a5",14:"e7a642abb172a6eeda8c",15:"75b9f569824348cabdf0",16:"c3cd0e9a4f74e7fe1908",17:"d87c97f00c0f75e2f86d",18:"a64255b1fd390deb552e",19:"6750f278930e019e7d78",20:"5ca1dc2a926da3f19f62",21:"2d9d159547fd48b0ad9c",22:"f68b7dbd357d65f46fca",23:"c3d64d2c7ba03967c4a8",24:"56f2057036ab22585e0e",25:"2133fdde82de7785cbc4",26:"30fb9f14c41e89141c15",27:"b9fd5f8677a43cab4a3f",28:"44deebcea6ccd096081f",29:"9339e8311b77c469e738",30:"ebb71c6a502890f047f8"}[e]+".js";var d=setTimeout(o,12e4);function o(){f.onerror=f.onload=null,clearTimeout(d);var c=n[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return f.onerror=f.onload=o,t.appendChild(f),a},r.m=e,r.c=a,r.d=function(e,c,a){r.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},r.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(c,"a",c),c},r.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},r.p="./",r.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.6a37dcb72a57f67df8bb.js.map
\ No newline at end of file
......@@ -40,7 +40,7 @@
<img v-if="ruleForm.qcloudImageUrl" :src="ruleForm.qcloudImageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<p class="upload-tip">只能上传规格为1:1的jpg/png图片,且不超过1Mb</p>
<p class="upload-tip">只能上传规格为1:1的 jpg 图片,且不超过1Mb</p>
</div>
</el-form-item>
<el-form-item label="关联商户">
......@@ -301,13 +301,13 @@ export default {
beforeAvatarUpload(file) {
var that = this
const isJPG = file.type === 'image/jpeg';
const isLt2M = file.size / 1024 / 1024 < 2;
const isLt2M = file.size / 1024 / 1024 <= 1;
if (!isJPG) {
that.$message.error('上传头像图片只能是 JPG 格式!');
}
if (!isLt2M) {
that.$message.error('上传头像图片大小不能超过 2MB!');
that.$message.error('上传头像图片大小不能超过 1MB!');
}
return isJPG && isLt2M && new Promise(function(resolve, reject) {
let reader = new FileReader();
......@@ -318,8 +318,8 @@ export default {
let height = this.height;
console.log(width,height)
if (width !== 750 && height !== 750){
that.$message.error('图片尺寸必须为750px*750px!');
if (width !== height){
that.$message.error('图片比例必须为1:1的');
reject();
}
......
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