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