Commit 6430913f by 无尘

fix:修改上传图片部分

parent 81564c42
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-集团后台</title><link href=./static/css/app.6fcf8a2873f4a0c76eff5a5ec825eb40.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.62b2a7c6f4e74c29a0f3.js></script><script type=text/javascript src=./static/js/vendor.634a4bfa2fa26d2b4636.js></script><script type=text/javascript src=./static/js/app.e7ab4ee5ec8eaab26de2.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.5beb295110a985fd3f20d99974c6b7a1.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.9273ddd326fdc002c9b5.js></script><script type=text/javascript src=./static/js/vendor.634a4bfa2fa26d2b4636.js></script><script type=text/javascript src=./static/js/app.7cb20456a13884462de7.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.
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,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:"25cc6ae04400c7a37631",20:"188dd04a00d83fd7df06",21:"f448e9cd451ad6f97d60",22:"56576b6f7bc17b601c2e",23:"4c7508ab3c750c162192",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.62b2a7c6f4e74c29a0f3.js.map
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,t,d){for(var f,o,b,i=0,u=[];i<c.length;i++)o=c[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(a&&a(c,t,d);u.length;)u.shift()();if(d)for(i=0;i<d.length;i++)b=r(r.s=d[i]);return b};var c={},n={33:0};function r(a){if(c[a])return c[a].exports;var n=c[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var a=n[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,r){a=n[e]=[c,r]});a[2]=c;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:"e098e85a0326ac5e10f6",9:"4aedd9d9f32e5bd5b794",10:"3b6408b1d99252eda551",11:"f0b71dac5722ed6c4628",12:"b8af2fcb45c72480bdb0",13:"aeb35c8a0dafd5d162c6",14:"b3cb63d509fb1a06a935",15:"d4d84253d926c74f4aa9",16:"0deb7014f6e949104733",17:"3b9e1540c21a66e580d6",18:"a007799596487757e1ca",19:"ae6a42bb58a2bff32ae2",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 f=setTimeout(o,12e4);function o(){d.onerror=d.onload=null,clearTimeout(f);var a=n[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return d.onerror=d.onload=o,t.appendChild(d),c},r.m=e,r.c=c,r.d=function(e,a,c){r.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},r.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(a,"a",a),a},r.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},r.p="./",r.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.9273ddd326fdc002c9b5.js.map
\ No newline at end of file
......@@ -37,8 +37,10 @@
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="ruleForm.qcloudImageUrl" :src="ruleForm.qcloudImageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<div class="avatar-uploader-wrap" v-loading="uploadLoading">
<img v-if="ruleForm.qcloudImageUrl" :src="ruleForm.qcloudImageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</div>
</el-upload>
<p class="upload-tip">只能上传规格为1:1的 jpg 图片,且不超过1Mb</p>
</div>
......@@ -144,9 +146,7 @@ export default {
],
upUrl: '',// 上传地址
uploadLoading: false,
ruleForm: {
cliqueName: '',
enterpriseName: '',
......@@ -287,9 +287,10 @@ export default {
// 上传
handleAvatarSuccess(res, file) {
var that = this
that.uploadLoading = false;
console.log("上传成功回调:",res)
if (res.errorCode == 0) {
that.ruleForm.qcloudImageUrl = res.result[0].qcloudImageUrl;//URL.createObjectURL(file.raw);
that.ruleForm.imageFiledCode = res.result[0].imageFiledCode;
that.ruleForm.imageUrl = res.result[0].wxImg;
......@@ -325,6 +326,7 @@ export default {
resolve();
};
that.uploadLoading = true;
image.src = event.target.result;
console.log("上传成功:",event.target.result)
};
......@@ -663,6 +665,9 @@ export default {
border-radius: 6px;
cursor: pointer;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
&:hover {
border-color: #1890ff;
......@@ -680,12 +685,25 @@ export default {
line-height: 100px;
text-align: center;
}
.avatar-uploader-wrap {
width: 128px;
height: 128px;
padding: 8px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.avatar {
width: 100px;
height: 100px;
width: 100%;
// height: 120px;
display: block;
}
.el-icon-loading {
}
.link-shop {
width: 800px;
font-size: 0;
......
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