webpackJsonp([50],{LQe7:function(e,t){},Z3Aa:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("3E4D"),n=a("Ch4/"),o=a("PI0u"),r=a("P9l9"),i={name:"app-detail",props:{brandId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",wxEnterpriseRelatedId:JSON.parse(sessionStorage.getItem("userInfos")).wxEnterpriseId,myCustomData:{searchFlag:!1},activeId:"1",loading:!1}},methods:{submit:Object(o.a)(function(e){this.loading=!0,this.setData(e)},500),setData:function(e){var t=this,a={enterpriseId:t.brandId,wxEnterpriseRelatedId:t.wxEnterpriseRelatedId},o=void 0;"showFlag"!=e&&(a[e]=t.myCustomData[e]?1:0,o="/haoban-app-customer-web/customer/save-online-chat-setting","searchFlag"===e&&(o="/haoban-app-customer-web/customer/save-customer-setting")),Object(r.f)(o,a).then(function(e){var a=e.data;t.loading=!1,1!=a.errorCode?n.a.errorMsg(a):s.a.showmsg("保存成功","success")}).catch(function(e){t.loading=!1,t.$message.error({duration:1e3,message:e.message})})},changeAllowGuide:function(e){this.myCustomData.allowGuideMobile=e,this.myCustomData.allowGuideMessage=e,this.myCustomData.allowGuideOnlineChat=e},changeContact:function(){this.myCustomData.allowGuideMobile||this.myCustomData.allowGuideMessage||this.myCustomData.allowGuideOnlineChat||(this.myCustomData.allowGuideContact=!1)},getCustomerSet:function(e){var t=this,a={enterpriseId:t.brandId,wxEnterpriseRelatedId:t.wxEnterpriseRelatedId};Object(r.f)("/haoban-app-customer-web/customer/find-customer-setting",a).then(function(e){var a=e.data;1!=a.errorCode?n.a.errorMsg(a):a.result&&(t.myCustomData.searchFlag=!!a.result.searchFlag)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(e,t){this.getCustomerSet(this.brandId)}},mounted:function(){this.getCustomerSet(this.brandId)},components:{}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"app-detail-pane border-box p-20"},[a("el-checkbox",{model:{value:e.myCustomData.searchFlag,callback:function(t){e.$set(e.myCustomData,"searchFlag",t)},expression:"myCustomData.searchFlag"}},[e._v("允许全品牌搜索")]),e._v(" "),a("div",{staticClass:"m-t-46"},[e.$getButtonLimit(e.$buttonCode.searchSetSave)?a("el-button",{attrs:{"limit-code":e.$buttonCode.searchSetSave,type:"primary",loading:e.loading,disabled:e.$store.state.wxEnterpriseType},on:{click:function(t){return e.submit("searchFlag")}}},[e._v("保 存")]):e._e()],1)],1)])},staticRenderFns:[]};var c=a("VU/8")(i,u,!1,function(e){a("LQe7")},"data-v-ba346f02",null);t.default=c.exports}});