bztang-admin/addons/yun_shop/static/app/js/chunk-712cd4ae.aac4618f.js

1 line
15 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-712cd4ae"],{"39ad0":function(a,t){a.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqwAAAFkCAYAAADlkWl0AAAG6UlEQVR4nO3WMQHAIADAsDGL+BeBAnDAS49EQc+ONef+AAAg6n8dAAAAN4YVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQJphBQAgzbACAJBmWAEASDOsAACkGVYAANIMKwAAaYYVAIA0wwoAQNoBqp8FXhaIK5MAAAAASUVORK5CYII="},"4f7dd":function(a,t,e){var A=e("552b");A.__esModule&&(A=A.default),"string"===typeof A&&(A=[[a.i,A,""]]),A.locals&&(a.exports=A.locals);var o=e("499e").default;o("21910fc6",A,!0,{sourceMap:!1,shadowMode:!1})},"552b":function(a,t,e){var A=e("24fb");t=A(!1),t.push([a.i,'#baseInfo[data-v-542a14a3]{position:relative;width:100%;height:100%}#baseInfo .bottom-btn[data-v-542a14a3]{margin-top:1.25rem}#baseInfo .bottom-btn .bg-btn[data-v-542a14a3],#baseInfo .bottom-btn button[data-v-542a14a3]{margin-top:.625rem;width:80%;height:2.25rem;border:.0625rem solid #ccc;border-radius:.25rem;margin-left:10%;color:#333;line-height:2.25rem;text-align:center}#baseInfo .avatar-uploader .el-upload[data-v-542a14a3]{border:.0625rem dashed #d9d9d9;border-radius:.375rem;cursor:pointer;position:relative;overflow:hidden}#baseInfo .avatar-uploader .el-upload[data-v-542a14a3]:hover{border-color:#20a0ff}#baseInfo .avatar-uploader-icon[data-v-542a14a3]{font-size:28px;color:#8c939d;width:11.125rem;height:11.125rem;line-height:11.125rem;text-align:center}#baseInfo .avatar[data-v-542a14a3]{width:100%;max-height:16rem;display:block}#baseInfo .popupInput[data-v-542a14a3]{position:relative;text-align:left}#baseInfo .popupInput .notes[data-v-542a14a3]{width:100%;background-color:#ebebeb;height:2.5rem;padding:0 .75rem}#baseInfo .popupInput p[data-v-542a14a3]{color:#f15353;line-height:2.5rem;font-size:14px}#baseInfo .popupInput .inputBox[data-v-542a14a3]{background:#fff;height:15.625rem}#baseInfo .popupInput .inputBox .avatar-uploader[data-v-542a14a3]{position:relative}#baseInfo .popupInput .inputBox .avatar-uploader i[data-v-542a14a3]{font-style:normal;position:absolute;top:.9375rem;color:#00f;right:.9375rem}#baseInfo .popupInput .inputBox .avatar-uploader div[data-v-542a14a3]{width:5rem;height:5rem;background:#f15353}#baseInfo .popupInput .inputBox .avatar-uploader img[data-v-542a14a3]{width:100%}#baseInfo .popupInput span[data-v-542a14a3]{display:inline-block;margin-right:1.875rem}#baseInfo .m_header[data-v-542a14a3]{width:100%;height:2.5rem;padding:0 .75rem;-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:.0625rem solid #e2e2e2;line-height:2.5rem;text-align:left;font-size:14px}#baseInfo .m_header button[data-v-542a14a3]{color:#fff;background:green;border-radius:.25rem;width:3.75rem;border:none;font-size:12px;float:right;line-height:2.25rem}#baseInfo .m_header span[data-v-542a14a3]{display:inline-block;float:left;font-size:28px}#baseInfo .m_header i[data-v-542a14a3]{font-size:14px;float:right;font-style:normal}#baseInfo .nav[data-v-542a14a3]{padding:.9375rem .75rem}#baseInfo .nav li[data-v-542a14a3]{width:calc(50% - .125rem);display:inline-block;text-align:center;font-size:14px;line-height:2.5rem;background:#fff;color:#f15353}#baseInfo .nav li[data-v-542a14a3]:first-child{border-radius:.3125rem 0 0 .3125rem}#baseInfo .nav li[data-v-542a14a3]:last-child{border-radius:0 .3125rem .3125rem 0}#baseInfo .info li[data-v-542a14a3]:after{content:"";display:block;clear:both}#baseInfo .info li[data-v-542a14a3]:first-child{border-bottom:.0625rem solid #ccc}#baseInfo .info li[data-v-542a14a3]{padding:.75rem;font-size:14px;text-align:left;background:#fff;line-height:1.25rem;margin-top:.625rem}#baseInfo .info li .right[data-v-542a14a3]{float:right;text-align:right;border:none!important}#baseInfo .info li .right .img[data-v-542a14a3]{width:2.1875rem;height:2.1875rem;border:none!important}#baseInfo .info li .right .img img[data-v-542a14a3]{width:2.1875rem;height:2.1875rem;vertical-align:middle;border:0;margin-top:-.1875rem}#baseInfo .info li input[data-v-542a14a3]{width:70%;border:none;outline:none;line-height:1.25rem;float:right;text-align:right;font-size:14px;position:relative;top:-.125rem}#baseInfo .info .tou[data-v-542a14a3]{line-height:2.25rem;padding-bottom:.625rem}#baseInfo .info .list[data-v-542a14a3]{padding-left:.75rem;background-color:#fff}#baseInfo .info .list .tou2[data-v-542a14a3]{height:2.75rem;padding-right:.75rem}#baseInfo .info .list .tou2 span[data-v-542a14a3]{line-height:2.75rem;float:left;font-size:15px;color:#333}#baseInfo .info .list .tou2 i[data-v-542a14a3]{line-height:2.75rem;float:right;font-size:1.5rem;color:#c9c9c9}#baseInfo .info textarea[data-v-542a14a3]{width:100%;height:7.5rem;border:.0625rem solid #e2e2e2;background-color:#f9f9f9;border-radius:.25rem;line-height:1.5rem;padding:.625rem;color:#8c8c8c;margin-top:.75rem}#baseInfo .info .btn[data-v-542a14a3]{margin:1.25rem auto;border-radius:.25rem;width:80%;height:2.875rem;line-height:2.875rem;text-align:center;background:#f15353;font-size:16px;color:#fff}#baseInfo .selectGoods[data-v-542a14a3]{overflow:hidden}#baseInfo .selectGoods .selectedGood li[data-v-542a14a3]{float:left;width:2.5rem;margin:.625rem}#baseInfo .selectGoods .selectedGood li img[data-v-542a14a3]{width:2.5rem}#baseInfo .selectGoods .selectedGood[data-v-542a14a3]:after{content:"";display:block;clear:both}#baseInfo .selectGoods .content[data-v-542a14a3]{font-size:14px;background:#fff;text-align:center}#baseInfo .selectGoods .content img[data-v-542a14a3]{width:100%}#baseInfo .selectGoods p[data-v-542a14a3]{padding:0 .9375rem}#baseInfo .selectGoods .add[data-v-542a14a3]{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:1.25rem}#baseInfo .selectGoods .add div[data-v-542a14a3]{width:80%;font-size:16px;color:#fff;background-color:#f15353;margin:0 auto;border-radius:.25rem;height:2.5rem}#baseInfo .selectGoods .add div i[data-v-542a14a3]{font-size:1.5rem;display:inline-block;top:.125rem;position:relative;z-index:22}#baseInfo .selectGoods .add div .font[data-v-542a14a3]{line-height:2.5rem}#baseInfo .selectGoods .btn[data-v-542a14a3]{margin:1.25rem auto;border-radius:.25rem;width:80%;padding:.75rem;text-align:center;background:#f15353;font-size:20px;color:#fff}#baseInfo .selectGoods p[data-v-542a14a3]{margin-top:.9375rem;line-height:1.25rem;text-align:left;font-size:12px}.active22[data-v-542a14a3]{color:#fff!important;background:#f15353!important}',""]),a.exports=t},75222:function(a,t,e){"use strict";e.r(t);var A=function(){var a=this,t=a.$createElement,A=a._self._c||t;return A("div",{attrs:{id:"baseInfo"}},["main"==a.showBox?A("div",[A("c-title",{attrs:{hide:!1,text:(a.shoplang?a.shoplang:"微店")+"设置"}}),A("ul",{staticClass:"nav"},[A("li",{class:{active22:a.showInfo},on:{click:function(t){return a.changeActive(!0)}}},[a._v(" 基本信息 ")]),A("li",{class:{active22:!a.showInfo},on:{click:function(t){return a.changeActive(!1)}}},[a._v(" 自选商品 ")])]),a.showInfo?A("div",{staticClass:"info"},[A("div",{staticClass:"list"},[A("div",{staticClass:" tou2",staticStyle:{"border-bottom":"solid 0.0625rem #ebebeb"},on:{click:function(t){return a.manageShop()}}},[A("span",[a._v("商品管理")]),A("i",{staticClass:"fa fa-angle-right"})]),A("div",{staticClass:" tou2",on:{click:function(t){return a.changeShowBox("店招背景")}}},[A("span",[a._v("店招背景")]),A("i",{staticClass:"fa fa-angle-right"})])]),A("li",[a._v(" 个性签名 "),A("textarea",{directives:[{name:"model",rawName:"v-model",value:a.shopModle.signature,expression:"shopModle.signature"}],attrs:{name:"个性签名",id:"个性签名",cols:"30",rows:"10",maxlength:"120"},domProps:{value:a.shopModle.signature},on:{input:function(t){t.target.composing||a.$set(a.shopModle,"signature",t.target.value)}}})]),A("div",{staticClass:"btn",on:{click:function(t){return a.changeActive(!1,1)}}},[a._v(" 确 定 ")])]):A("div",{staticClass:"selectGoods"},[A("div",{staticClass:"content"},[A("img",{attrs:{src:a.bannerImg,alt:""}})]),A("router-link",{attrs:{to:a.fun.getUrl("micro_shop_add_category")}},[A("div",{staticClass:"add"},[A("div",[A("i",[a._v("+")]),A("span",{staticClass:"font"},[a._v("  选择 商品")])])])]),A("p",[a._v(" "+a._s("店主可以通过选择商品就可以生成"+(a.shoplang?a.shoplang:"微店")+",将"+(a.shoplang?a.shoplang:"微店")+"分享给好友,好友通过自己的"+(a.shoplang?a.shoplang:"微店")+"链接进入购买商品就可以获得分红啦~")+" "),A("br"),a._v(a._s("快去选择您的"+(a.shoplang?a.shoplang:"微店")+"商品吧!")+" ")])],1)],1):"upLoadBox"==a.showBox?A("div",{staticClass:"popupInput"},[A("c-title",{attrs:{hide:!1,text:"店招背景"}}),A("div",{staticStyle:{width:"100%",height:"2.5rem"}}),A("div",{staticClass:"m_header"},[A("span",{staticClass:"iconfont icon-left",on:{click:function(t){return a.closePopInput()}}}),a._v(" 修改"+a._s(a.changeType)+" ")]),A("div",{staticClass:"inputBox"},[A("van-uploader",{attrs:{"after-read":a.onRead}},[a.bgImg?A("img",{staticClass:"avatar",attrs:{src:"0"==a.bgImg?e("39ad0"):a.bgImg}}):A("div",{staticStyle:{width:"100%",height:"100%"}})])],1),a._m(0),A("div",{staticClass:"bottom-btn"},[A("van-uploader",{staticClass:"bg-btn",attrs:{"after-read":a.onRead}},[A("em",[a._v("更换背景")])]),A("button",{on:{click:a.closePopInput}},[a._v("保存")])],1)],1):a._e()])},o=[function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{staticClass:"notes"},[e("p",[a._v("请上传不大于4M的jpeg或者png格式的图片。")])])}],i=(e("e7e5"),e("d399")),n=(e("b64b"),e("e9c4"),e("d3b7"),e("3ca3"),e("ddb0"),e("2b3d"),e("9861"),e("88a7"),e("271a"),e("5494"),e("14d9"),e("ac1f"),e("00b4"),e("6968")),s=document.createElement("canvas"),r=s.getContext("2d"),d={data:function(){return{photosize:4194304,showInfo:!0,shopName:"",userName:"",signName:"",showBox:"main",changeType:"",changeVal:"",imageUrl:"",imageUrl1:"",imageUrl2:"",bgImg:"",temp:!1,bannerImg:"",postUrl:"",shopModle:{shop_background:"",signature:""},shoplang:""}},created:function(){var a=JSON.parse(localStorage.getItem("mailLanguage"));a.micro?this.fun.setWXTitle("".concat(a.micro.title,"设置")):this.fun.setWXTitle("微店设置")},activated:function(){var a=JSON.parse(localStorage.getItem("mailLanguage"));a.micro?this.fun.setWXTitle("".concat(a.micro.title,"设置")):this.fun.setWXTitle("微店设置"),this.temp=this.$route.params.showSelectGood,this.showInfo=!0,this.init(),this.showBox="main"},methods:{init:function(){var a=this;$http.get("plugin.micro.frontend.controllers.MicroShop.set-shop").then((function(t){var e=t.data.micro_shop;1==t.result&&(a.shopName=e.shop_name,a.username=e.has_one_member.nickname,a.signName=e.signature,a.imageUrl1=e.shop_avatar,a.imageUrl2=e.has_one_member.avatar,a.postUrl=e.api,a.bannerImg=t.data.select_goods_thumb,a.bgImg=e.shop_background,a.action=t.data.api+"&type="+a.fun.getTyep(),a.shopModle.shop_background=t.data.micro_shop.shop_background,a.shopModle.signature=t.data.micro_shop.signature,a.shoplang=t.data.lang)}),(function(a){}))},changeShowBox:function(a){this.changeType=a,this.showBox="店招背景"==a?"upLoadBox":"个性签名"==a||"微店名称"==a||"店主昵称"==a?"inputBox":"main"},changeActive:function(a,t){if(1==t){var e=this;if(this.fun.isTextEmpty(this.shopModle.shop_background))return void Object(i["a"])("微店背景不能为空");if(this.fun.isTextEmpty(this.shopModle.signature))return void Object(i["a"])("微店个性签名不能为空");var A={shop_set:JSON.stringify(this.shopModle)};$http.get("plugin.micro.frontend.controllers.MicroShop.set-shop.edit",A,"设置中").then((function(a){1===a.result?e.$router.go(-1):Object(i["a"])({message:a.msg,duration:2500})}),(function(a){}))}else this.showInfo=a},closePopInput:function(){this.showBox="main",this.changeVal=""},handleAvatarSuccess:function(a,t){this.imageUrl=URL.createObjectURL(t.raw),"微店头像"==this.changeType?this.imageUrl1=a.data.img:"店招背景"==this.changeType&&(this.bgImg=a.data.img,this.shopModle.shop_background=this.bgImg)},beforeAvatarUpload:function(a){var t="image/jpeg"===a.type||"image/png"===a.type,e=a.size/1024/1024<4;return t||this.$notify("上传图片只能是 JPG 或PNG格式!"),e||this.$notify("上传图片大小不能超过 4MB!"),t&&e},manageShop:function(){this.$router.push(this.fun.getUrl("manage_shop",{}))},imgPreview:function(a,t){var e=this;if(a&&window.FileReader&&/^image/.test(a.type)){var A=new FileReader;A.readAsDataURL(a),A.onloadend=function(){var A=this.result,o=new Image;o.src=A,o.onload=function(){var A=this.width,i=this.height,n=400,d=400,l=A,h=i;(A>n||i>d)&&(A/i>n/d?(l=n,h=Math.round(n*(i/A))):(h=d,l=Math.round(d*(A/i)))),s.width=l,s.height=h,r.clearRect(0,0,l,h),r.drawImage(o,0,0,l,h),s.toBlob((function(a){1===t&&e.onRead(a,!0)}),a.type||"image/png")}}}},onRead:function(a,t){var e=new FormData;!0===t?e.append("file",a):e.append("file",a.file);var A=this;axios.post(this.action,e,{headers:{"Content-Type":"multipart/form-data"}}).then((function(e){var o=e.data;1===o.result&&(A.imageUrl=!0===t?URL.createObjectURL(a):URL.createObjectURL(a.file),"微店头像"==A.changeType?A.imageUrl1=o.data.img_url:"店招背景"==A.changeType&&(A.bgImg=o.data.img_url,A.shopModle.shop_background=A.bgImg))})).catch((function(a){}))},onphotosize:function(a){this.imgPreview(a.file,1)}},components:{cTitle:n["a"]}},l=d,h=l,p=(e("85ff"),e("2877")),g=Object(p["a"])(h,A,o,!1,null,"542a14a3",null);t["default"]=g.exports},"85ff":function(a,t,e){"use strict";e("4f7dd")}}]);