(self.webpackChunk_client_app_store=self.webpackChunk_client_app_store||[]).push([[7219],{23768:function(t,e,n){"use strict";n.d(e,{Z:function(){return _}});var r=function(){var t=this,e=t._self._c;return e("AuthLayout",{staticClass:"appBatchSelect_stage"},[e("div",{staticClass:"connect_batchapp_top"},[e("div",{staticClass:"title"},[t._v("\n      "+t._s(t.title)+"\n    ")])]),t._v(" "),e("CntSection",[e("div",{staticClass:"section_title"},[t._v(n(11974).nI().t("应用"))]),t._v(" "),t._l(t.appSelectList,function(n){return e("div",{key:n.thirdapp_id,staticClass:"section_item",on:{click:function(e){return t.sectionItemAction(n)}}},[e("div",{staticClass:"section_item_left"},[e("Checkbox",{staticStyle:{"margin-right":"12px"},attrs:{disabled:n.disabled,shape:"square","icon-size":"16px"},model:{value:n.checked,callback:function(e){t.$set(n,"checked",e)},expression:"app.checked"}}),t._v(" "),e("img",{attrs:{src:n.logo}}),t._v(" "),e("span",{staticClass:"app_name"},[t._v(t._s(n.app_name))]),t._v(" "),1===n.app_type?e("MiniApp"):t._e()],1),t._v(" "),e("div",{staticClass:"app_version"},[t._v("\n        "+t._s(n.disabled?n.statusMsg:t.getAppVersionName(n.thirdapp_id))+"\n      ")])])})],2),t._v(" "),e("div",{staticClass:"connect_footer"},[e("Button",{staticClass:"connect_footer_btn",attrs:{color:"blue",disabled:t.isAllDisabled},on:{click:t.footerSubmit}},[t._v("\n      "+n(11974).nI().t("批量添加")+"\n    ")])],1)],1)};r._withStripped=!0,n(3082),n(11277);var i=n(963),o=n(79394),a=n(97161),s=n(17266),c=n.n(s),l=n(93646),u=n(79736),p=n(2271),f=n(82483);function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r,i;r=t,i=n[e],e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i})}return t}function y(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}}var v={components:{AuthLayout:l.Z,CntSection:f.Z,Checkbox:i.Z,MiniApp:c(),Button:o.zx},mixins:[u.BG],props:{title:{type:String},appList:{type:Array},batchPreCheck:{type:Object},batchPriceInfo:{type:Object},isAdminAuth:{type:Boolean,default:!1},batchSelectApps:{type:Array}},data:function(){return{appSelectList:[],isCommonCase:!0}},computed:{appCheckedList:function(){return this.appSelectList.filter(function(t){return t.checked})},isAllDisabled:function(){return this.appSelectList.every(function(t){return t.disabled})}},watch:{appList:function(){this.genAppSelectList()}},created:function(){this.genAppSelectList()},methods:{genAppSelectList:function(){var t=this,e=(0,a.chain)(this.appList).map(function(e){var n,r,i=!0;return t.batchSelectApps.length&&(i=!!(0,a.find)(t.batchSelectApps,{thirdapp_id:e.thirdapp_id})),h((n=h({},e),r=r={checked:i},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n})(Object(r)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}),n),t.checkAppStatus(e))}).groupBy(function(t){return t.disabled?"disabled":"unDisabled"}).value();this.appSelectList=y(e.unDisabled||[]).concat(y(e.disabled||[]))},sectionItemAction:function(t){t.disabled||(t.checked=!t.checked)},checkAppStatus:function(t){var e,r=this.batchPreCheck[t.thirdapp_id];if(t.is_forbidden)return{disabled:!0,statusMsg:n(11974).nI().t("已禁用"),checked:!1};if(this.isAdminAuth&&t.app_install_mode||!this.isAdminAuth&&t.is_installed)return{disabled:!0,statusMsg:n(11974).nI().t("已添加"),checked:!1};var i=r.is_can_add_order_info[p.zi.Buy];return"84135"===String(i)?{disabled:!1,statusMsg:""}:p.Ty[i]?{disabled:!0,statusMsg:(function(t){if(Array.isArray(t))return t}(e=p.Ty[i])||function(t,e){var n,r,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(n=i.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(c){s=!0,r=c}finally{try{a||null==i.return||i.return()}finally{if(s)throw r}}return o}}(e,1)||b(e,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],checked:!1}:{disabled:!1,statusMsg:""}},footerSubmit:function(){this.$emit("submit",this.appCheckedList)}}},_=(0,n(6080).Z)(v,r,[],!1,null,"050bbf59",null).exports},2777:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=function(){var t=this,e=t._self._c;return e("AuthLayout",[e("div",{staticClass:"connect_batchapp_top"},[e("div",{staticClass:"title"},[t._v("\n      "+t._s(t.title)+"\n    ")])]),t._v(" "),e("CntSection",t._l(t.appList,function(r){return e("div",{key:r.thirdapp_id,staticClass:"section_item"},[e("div",{staticClass:"section_item_left"},[e("img",{attrs:{src:r.logo}}),t._v(" "),e("span",{staticClass:"app_name"},[t._v(t._s(r.app_name))]),t._v(" "),r.miniprogram_appid?e("MiniApp"):t._e()],1),t._v(" "),e("div",{staticClass:"section_item_right"},[t.failAppsMap[r.thirdapp_id]?e("div",{staticClass:"section_item_right_fail",on:{click:function(e){return t.showFailInfo(t.failAppsMap[r.thirdapp_id])}}},[e("IconFailInfo"),t._v(" "),e("span",{staticClass:"auth_fail"},[t._v(n(11974).nI().t("添加失败"))])],1):e("span",{staticClass:"auth_suc"},[t._v(n(11974).nI().t("添加成功"))])])])}),0),t._v(" "),e("div",{staticClass:"connect_footer"},[e("div",{staticClass:"connect_footer_desc"},[t.isAllFail?[t.telephone?[t._v("\n          "+n(11974).nI().t("添加失败的应用，请联系服务商客服，电话 {0}",[t.telephone])+"\n        ")]:t._e()]:[t._v("\n        "+n(11974).nI().t("已添加成功的应用，可前往工作台查看和使用")),e("br"),t._v(" "),t.telephone?[t._v("\n          "+n(11974).nI().t("添加失败的应用，请联系服务商客服，电话 {0}",[t.telephone])+"\n        ")]:t._e()]],2),t._v(" "),e("Button",{staticClass:"connect_footer_btn",attrs:{color:"blue"},on:{click:t.footerSubmit}},[t._v("\n      "+n(11974).nI().t("返回方案详情")+"\n    ")])],1)],1)};r._withStripped=!0;var i=n(79394),o=n(75485),a=n.n(o),s=n(17266),c=n.n(s),l=n(93646),u=n(82483);n(3082);var p={components:{AuthLayout:l.Z,CntSection:u.Z,IconFailInfo:a(),Button:i.zx,MiniApp:c()},props:{telephone:{type:String},appList:{type:Array},batchErrInfo:{type:Object}},data:function(){return{appSelectList:[]}},computed:{humanMessageMap:function(){var t;return null===(t=this.batchErrInfo)||void 0===t?void 0:t.humanMessageMap},failAppsMap:function(){var t,e,r=this,i={};return null===(t=this.batchErrInfo)||void 0===t||null===(e=t.err_info)||void 0===e||e.app_list.forEach(function(t){var e,o;i[t.thirdapp_id]=(e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r,i;r=t,i=n[e],e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i})}return t}({},t),o=o={errmsg:t.errmsg||r.humanMessageMap[t.errcode]||n(11974).nI().t("错误码：{0}",[t.errcode])},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n})(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}),e)}),i},isAllFail:function(){var t=this;return this.appList.every(function(e){return t.failAppsMap[e.thirdapp_id]})},title:function(){return this.isAllFail?n(11974).nI().t("应用添加失败"):n(11974).nI().t("部分应用添加失败")}},methods:{footerSubmit:function(){this.$emit("submit")},showFailInfo:function(t){i.Vq.alert({title:t.title||n(11974).nI().t("安装失败"),message:t.errmsg})}}},f=(0,n(6080).Z)(p,r,[],!1,null,"beb732f8",null).exports},75485:function(t){t.exports={functional:!0,render:function(t,e){var n=e._c,r=(e._v,e.data),i=e.children,o=r.class,a=r.staticClass,s=r.style,c=r.staticStyle,l=r.attrs,u=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(r,["class","staticClass","style","staticStyle","attrs"]);return n("svg",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r,i;r=t,i=n[e],e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i})}return t}({class:[o,a],style:[s,c],attrs:Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0===l?{}:l)},u),(void 0===i?[]:i).concat([n("circle",{attrs:{cx:"8",cy:"8",r:"7.5",stroke:"#F04A3E"}}),n("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 3a1 1 0 100 2 1 1 0 000-2zm0 4a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z",fill:"#F04A3E"}})]))}}},17266:function(t){t.exports={functional:!0,render:function(t,e){var n=e._c,r=(e._v,e.data),i=e.children,o=r.class,a=r.staticClass,s=r.style,c=r.staticStyle,l=r.attrs,u=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(r,["class","staticClass","style","staticStyle","attrs"]);return n("svg",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r,i;r=t,i=n[e],e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i})}return t}({class:[o,a],style:[s,c],attrs:Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0===l?{}:l)},u),(void 0===i?[]:i).concat([n("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.6 1.5c-.661 0-1.277.179-1.8.484-.96.559-1.6 1.547-1.6 2.673v4.686c0 .843-.806 1.527-1.8 1.527s-1.8-.684-1.8-1.527c0-.6.41-1.119 1.003-1.369.043-.018.086-.035.13-.05.375-.152.695-.44.814-.772.176-.492-.151-.89-.73-.89-.145 0-.291.024-.432.069h-.002a3.374 3.374 0 00-1.956 1.484A2.963 2.963 0 001 9.343c0 1.74 1.525 3.157 3.4 3.157.661 0 1.277-.18 1.8-.484.959-.559 1.6-1.547 1.6-2.673V4.657c0-.843.806-1.527 1.8-1.527s1.8.684 1.8 1.527c0 .627-.444 1.165-1.08 1.4-.409.14-.745.443-.873.8-.175.49.151.887.728.887.13 0 .262-.023.39-.06l.064-.019a3.374 3.374 0 001.944-1.48c.271-.453.427-.973.427-1.528C13 2.917 11.475 1.5 9.6 1.5z",fill:"#09101A","fill-opacity":".4"}})]))}}},79736:function(t,e,n){"use strict";n.d(e,{Gy:function(){return y},aC:function(){return d},BG:function(){return h}});var r=n(32970),i=n(53930),o=n(97161),a=n(58092),s=(0,n(66519).LC)("appStore/price",{name:"wwopen",host:"open.work.weixin.qq.com",prefix:"/wwopen/monoApi"},"BatchGetPaidAppInfoDetail"),c=n(2271);function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(l){n(l);return}s.done?e(c):Promise.resolve(c).then(r,i)}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,r,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(n=i.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(c){s=!0,r=c}finally{try{a||null==i.return||i.return()}finally{if(s)throw r}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var f=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},d=(0,r.a)({data:function(){return{showBatchSelect:!0,showBatchFail:!1,batchSelectApps:[],batchErrInfo:void 0,batchRangeMode:!0}},computed:{telephone:function(){var t;return null===(t=this.servicecorpInfo)||void 0===t?void 0:t.telephone}},beforeRouteUpdate:function(t,e,n){this.routeHandle(t),n()},created:function(){this.routeHandle(this.$route)},methods:{routeHandle:function(t){var e=1===this.promotionCaseInfo.case_type?{showBatchSelect:!1,showBatchFail:!1}:{showBatchSelect:!t.query.selected||(!t.query.selected||!this.batchSelectApps.length)&&!!t.query.selected&&!this.batchSelectApps.length&&(this.$router.replace({path:t.path,query:o.omit(t.query,["selected","fail"])}),!0),showBatchFail:!!t.query.fail&&(!!t.query.fail&&!!this.batchErrInfo||(t.query.fail&&!this.batchErrInfo&&this.$router.replace({path:t.path,query:o.omit(t.query,["fail"])}),!1))},n=e.showBatchSelect,r=e.showBatchFail;this.showBatchSelect=n,this.showBatchFail=r}}}),h=(0,r.a)({computed:{industryPaidAppInfo:function(){var t,e,n;return(null===(t=null===(e=this.authPriceInfo)||void 0===e?void 0:null===(n=e.paid_app_info_list)||void 0===n?void 0:n.list[0])||void 0===t?void 0:t.paid_app_info)||{}},industryVerisons:function(){var t,e;return(0,c.ko)((null===(t=this.authPriceInfo)||void 0===t?void 0:null===(e=t.case_price_info_list)||void 0===e?void 0:e.list)||[])},displayIndustryVersions:function(){return this.isPayAccountRegisted?this.industryVerisons:this.industryVerisons.filter(function(t){return t.priceinfo_type===i.y})},industryCurrentVersion:function(){return this.ctrl.getPriceInfo({versions:this.industryVerisons,paidInfo:this.industryPaidAppInfo})},industryContainAppVersionMap:function(){var t;return(0,o.keyBy)(null===(t=this.industryCurrentVersion)||void 0===t?void 0:t.app_price_info_list,"str_thirdapp_id")}},watch:{batchSelectApps:function(){var t,e=(null===(t=this.batchSelectApps)||void 0===t?void 0:t.length)||0;this.batchRangeMode=e>1,this.canChangeMode=e>1}},methods:{getPaidAppInfo:function(t){var e;return null===(e=this.batchPriceInfo[t])||void 0===e?void 0:e.paidAppInfo},getAppVersions:function(t){var e,n,r;return null===(e=this.batchPriceInfo[t])||void 0===e?void 0:null===(n=e.priceInfo)||void 0===n?void 0:null===(r=n.list)||void 0===r?void 0:r.standardpriceinfo},getAppCurrentVersion:function(t){var e=this.getPaidAppInfo(t),n=this.getAppVersions(t),r=(null==n?void 0:n[0])||{};if(this.isCommonCase)return(null==e?void 0:e.cur_priceinfoid)&&(r=(0,o.find)(n,{standardpriceinfoid:e.cur_priceinfoid})||{}),r;var i=(this.industryContainAppVersionMap[t]||{}).standardpriceinfoid;return i&&(r=(0,o.find)(n,{standardpriceinfoid:i})||{}),r},getAppVersionName:function(t){var e=this.getAppCurrentVersion(t);return null==e?void 0:e.name}}});function y(t,e){return b.apply(this,arguments)}function b(){var t;return t=function(t,e){var n,r,i,o,c;return f(this,function(l){switch(l.label){case 0:return n={},r={},[4,Promise.all([t.$request(s,{caseApps:e}),t.$request(a.CF,{caseApps:e})])];case 1:return o=(i=p.apply(void 0,[l.sent(),2]))[0],c=i[1],o.forEach(function(t){n[t.appUid]=t}),c.forEach(function(t){r[t.appUid]=t}),[2,{batchPriceInfo:n,batchPreCheck:r}]}})},(b=function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)})}).apply(this,arguments)}}}]);