| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-48d6d2db"],{"055f":function(t,e,i){},"4e40":function(t,e,i){"use strict";i("055f")},"62f0":function(t,e,i){},"6b1a":function(t,e,i){"use strict";i("a790")},"82bb":function(t,e,i){"use strict";i.d(e,"f",(function(){return a})),i.d(e,"e",(function(){return o})),i.d(e,"d",(function(){return r})),i.d(e,"c",(function(){return l})),i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return c}));var s=i("f175");const a=()=>s.a.get("/settings.shop.shop_setting/getShopInfo"),o=t=>s.a.post("/settings.shop.shop_setting/setShopInfo",t),r=()=>s.a.get("/settings.shop.shop_setting/getRecordInfo"),l=t=>s.a.post("/settings.shop.shop_setting/setRecordInfo",t),n=()=>s.a.get("/settings.shop.shop_setting/getPolicyAgreement"),c=t=>s.a.post("/settings.shop.shop_setting/setPolicyAgreement",t)},a790:function(t,e,i){},a897:function(t,e,i){"use strict";i("e9f5"),i("7d54");var s=i("9ab4"),a=i("1b40"),o=i("6fad"),r=i.n(o),l=i("b3ad"),n=i("6ddb"),c=i("d70b");let d=class extends a.e{constructor(){super(...arguments),this.firstData=!0,this.identify=""}get editStyle(){return this.width?{width:this.width+"px"}:{}}valueChange(t){(this.firstData||this.decorate)&&(this.firstData=!1,this.editor.txt.html(t))}handeleChange(t){t.forEach(t=>{this.editor.cmd.do("insertHTML",`<img src="${t}" style="max-width:100%;"/>`)})}created(){this.identify="editor-"+Object(n.g)(3)}handleDecorate(t){this.editor.txt.html(t)}mounted(){this.editor=new r.a("#"+this.identify),this.editor.config.height=this.height,this.editor.config.menus=this.menu,this.editor.config.menuTooltipPosition="down",this.editor.config.showFullScreen=!1,this.editor.config.showLinkImg=!1,this.editor.config.uploadImgShowBase64=!0,this.editor.config.zIndex=1,this.editor.config.uploadImgFromMedia=()=>{this.$refs.materialSelect.showDialog()},this.editor.config.onchange=t=>{this.$emit("input",t)},this.editor.config.uploadVideoServer=c.a.baseURL+"/adminapi/upload/video",this.editor.config.uploadVideoHeaders={token:this.$store.getters.token,version:c.a.version},this.editor.config.uploadVideoName="file",this.editor.config.uploadVideoHooks={fail:(t,e,i)=>{this.$message.error("上传视频失败")},timeout:t=>{this.$message.error("上传视频超时")},customInsert:(t,e)=>{1==e.code?t(e.data.uri):this.$message.error(e.msg)}},this.editor.create(),this.firstData&&this.decorate&&(this.firstData=!1,this.editor.txt.html(this.value))}beforeDestroy(){this.editor.destroy()}};Object(s.a)([Object(a.c)()],d.prototype,"value",void 0),Object(s.a)([Object(a.c)({default:()=>["head","bold","fontSize","fontName","italic","underline","strikeThrough","indent","lineHeight","foreColor","link","list","justify","quote","emoticon","image","video","undo","redo"]})],d.prototype,"menu",void 0),Object(s.a)([Object(a.c)({default:600})],d.prototype,"height",void 0),Object(s.a)([Object(a.c)({default:!1})],d.prototype,"decorate",void 0),Object(s.a)([Object(a.c)()],d.prototype,"width",void 0),Object(s.a)([Object(a.f)("value")],d.prototype,"valueChange",null),d=Object(s.a)([Object(a.a)({components:{MaterialSelect:l.a}})],d);var h=d,m=(i("6b1a"),i("2877")),u=Object(m.a)(h,(function(){var t=this._self._c;this._self._setupProxy;return t("div",{staticClass:"ls-editor"},[t("div",{staticClass:"editor",style:[this.editStyle],attrs:{id:this.identify}}),t("material-select",{ref:"materialSelect",attrs:{limit:null,"hidden-trigger":!0},on:{change:this.handeleChange}})],1)}),[],!1,null,"892d2c26",null);e.a=u.exports},b3ad:function(t,e,i){"use strict";i("e9f5"),i("ab43");var s=i("9ab4"),a=i("1b40"),o=i("0a6d"),r=i("c6fe"),l=i("e915"),n=i("b76a"),c=i.n(n);let d=class extends a.e{constructor(){super(...arguments),this.isAdd=!0,this.fileList=[]}get showUpload(){const{fileList:t,limit:e}=this;return e-t.length>0}get meterialLimit(){return this.isAdd?this.limit?this.limit-this.fileList.length:null:1}get tipsText(){switch(this.type){case"image":return"图片";case"video":return"视频"}}get imageUri(){return t=>this.enableDomain?t:this.$getImageUri(t)}valueChange(t){this.fileList=Array.isArray(t)?t:""==t?[]:[t]}showDialog(t=!0,e){var i;this.disabled||(this.isAdd=t,void 0!==e&&(this.currentIndex=e),null===(i=this.$refs.materialDialog)||void 0===i||i.onTrigger())}selectChange(t){this.select=t}handleConfirm(){this.$refs.material.clearSelectList();const t=this.select.map(t=>this.enableDomain?t.uri:t.url);this.isAdd?this.fileList=this.fileList.concat(t):this.fileList.splice(this.currentIndex,1,t.shift()),this.handleChange()}delImage(t){this.fileList.splice(t,1),this.handleChange()}handleChange(){const t=1!=this.limit?this.fileList:this.fileList[0]||"";this.$emit("input",t),this.$emit("change",t),this.fileList=[]}};Object(s.a)([Object(a.c)({default:()=>[]})],d.prototype,"value",void 0),Object(s.a)([Object(a.c)({default:1})],d.prototype,"limit",void 0),Object(s.a)([Object(a.c)({default:"100"})],d.prototype,"size",void 0),Object(s.a)([Object(a.c)({default:!1})],d.prototype,"disabled",void 0),Object(s.a)([Object(a.c)({default:!1})],d.prototype,"dragDisabled",void 0),Object(s.a)([Object(a.c)({default:!1})],d.prototype,"hiddenTrigger",void 0),Object(s.a)([Object(a.c)({default:"image"})],d.prototype,"type",void 0),Object(s.a)([Object(a.c)({default:"transparent"})],d.prototype,"uploadBg",void 0),Object(s.a)([Object(a.c)({default:!0})],d.prototype,"enableDomain",void 0),Object(s.a)([Object(a.c)({default:!0})],d.prototype,"enableDelete",void 0),Object(s.a)([Object(a.f)("value",{immediate:!0})],d.prototype,"valueChange",null),d=Object(s.a)([Object(a.a)({components:{LsDialog:o.a,LsMaterial:r.a,Draggable:c.a,FileItem:l.a}})],d);var h=d,m=(i("4e40"),i("2877")),u=Object(m.a)(h,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("ls-dialog",{ref:"materialDialog",staticClass:"material-select",attrs:{title:"选择"+t.tipsText,width:"1050px",top:"15vh"},on:{confirm:t.handleConfirm}},[t.hiddenTrigger?t._e():e("div",{staticClass:"material-select__trigger clearfix",attrs:{slot:"trigger"},on:{click:function(t){t.stopPropagation()}},slot:"trigger"},[e("draggable",{staticClass:"ls-draggable",attrs:{animation:"300",disabled:t.disabled||t.dragDisabled},on:{update:t.handleChange},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}},t._l(t.fileList,(function(i,s){return e("div",{key:i+s,staticClass:"material-preview ls-del-wrap",class:{"is-disabled":t.disabled,"is-one":1==t.limit},on:{click:function(e){return t.showDialog(!1,s)}}},[t.$scopedSlots.preview?e("div",[t._t("preview",null,{item:t.imageUri(i)})],2):e("file-item",{attrs:{type:t.type,item:{uri:t.imageUri(i)},size:t.size}}),t.enableDelete?e("i",{staticClass:"el-icon-close ls-icon-del",on:{click:function(e){return e.stopPropagation(),t.delImage(s)}}}):t._e()],1)})),0),e("div",{directives:[{name:"show",rawName:"v-show",value:t.showUpload,expression:"showUpload"}],staticClass:"material-upload",class:{"is-disabled":t.disabled,"is-one":1==t.limit},on:{click:function(e){return t.showDialog(!0)}}},[t.$slots.upload?e("div",[t._t("upload")],2):e("div",{staticClass:"upload-btn flex row-center",style:{width:t.size+"px",height:t.size+"px",background:t.uploadBg}},[t._t("default"),t.$slots.default?t._e():e("span",[t._v("添加"+t._s(t.tipsText))])],2)])],1),e("div",{staticClass:"material-wrap"},[e("ls-material",{ref:"material",attrs:{"page-size":15,type:t.type,limit:t.meterialLimit},on:{change:t.selectChange}})],1)])}),[],!1,null,"62c92359",null);e.a=u.exports},dc15:function(t,e,i){"use strict";i.r(e);var s=i("9ab4"),a=i("1b40"),o=i("a897"),r=i("82bb");let l=class extends a.e{constructor(){super(...arguments),this.form={service_agreement_name:"",service_agreement_content:"",privacy_policy_name:"",privacy_policy_content:"",user_delete_content:"",user_delete_name:""}}initFormData(){Object(r.b)().then(t=>{for(const e in t)this.form.hasOwnProperty(e)&&(this.form[e]=t[e])}).catch(()=>{this.$message.error("数据加载失败,请刷新重载")})}onResetFrom(){this.initFormData(),this.$message.info("已重置数据")}onSubmitFrom(t){this.$refs[t].validate(t=>{if(!t)return;const e=this.$loading({text:"保存中"});Object(r.a)({...this.form}).then(()=>{this.$message.success("保存成功")}).catch(()=>{this.$message.error("保存失败")}).finally(()=>{e.close()})})}created(){this.initFormData()}};l=Object(s.a)([Object(a.a)({components:{LsEditor:o.a}})],l);var n=l,c=(i("e8caf"),i("2877")),d=Object(c.a)(n,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"setting-protocol"},[e("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px",size:"small"}},[e("div",{staticClass:"ls-card"},[e("div",{staticClass:"card-title"},[e("div",[t._v("服务协议")]),e("div",{staticClass:"muted xs m-l-16"},[t._v("用户登录注册页面显示服务协议")])]),e("div",{staticClass:"card-content m-t-24"},[e("el-form-item",{attrs:{label:"协议名称"}},[e("el-input",{staticClass:"ls-input",attrs:{"show-word-limit":""},model:{value:t.form.service_agreement_name,callback:function(e){t.$set(t.form,"service_agreement_name",e)},expression:"form.service_agreement_name"}})],1),e("el-form-item",{attrs:{label:"协议内容"}},[e("ls-editor",{model:{value:t.form.service_agreement_content,callback:function(e){t.$set(t.form,"service_agreement_content",e)},expression:"form.service_agreement_content"}})],1)],1)]),e("div",{staticClass:"ls-card m-t-16"},[e("div",{staticClass:"card-title"},[e("div",[t._v("隐私协议")]),e("div",{staticClass:"muted xs m-l-16"},[t._v("用户登录注册页面显示隐私政策")])]),e("div",{staticClass:"card-content m-t-24"},[e("el-form-item",{attrs:{label:"协议名称"}},[e("el-input",{staticClass:"ls-input",attrs:{"show-word-limit":""},model:{value:t.form.privacy_policy_name,callback:function(e){t.$set(t.form,"privacy_policy_name",e)},expression:"form.privacy_policy_name"}})],1),e("el-form-item",{attrs:{label:"协议内容"}},[e("ls-editor",{model:{value:t.form.privacy_policy_content,callback:function(e){t.$set(t.form,"privacy_policy_content",e)},expression:"form.privacy_policy_content"}})],1)],1)]),e("div",{staticClass:"ls-card m-t-16"},[e("div",{staticClass:"card-title"},[e("div",[t._v("注销协议")]),e("div",{staticClass:"muted xs m-l-16"},[t._v("用户注销页面显示注销协议")])]),e("div",{staticClass:"card-content m-t-24"},[e("el-form-item",{attrs:{label:"协议名称"}},[e("el-input",{staticClass:"ls-input",attrs:{"show-word-limit":""},model:{value:t.form.user_delete_name,callback:function(e){t.$set(t.form,"user_delete_name",e)},expression:"form.user_delete_name"}})],1),e("el-form-item",{attrs:{label:"协议内容"}},[e("ls-editor",{model:{value:t.form.user_delete_content,callback:function(e){t.$set(t.form,"user_delete_content",e)},expression:"form.user_delete_content"}})],1)],1)])]),e("div",{staticClass:"bg-white ls-fixed-footer"},[e("div",{staticClass:"row-center flex",staticStyle:{height:"100%"}},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.onSubmitFrom("form")}}},[t._v("保存")])],1)])],1)}),[],!1,null,"6e7ba4c6",null);e.default=d.exports},e8caf:function(t,e,i){"use strict";i("62f0")}}]);
|