bztang-admin/addons/yun_shop/static/app/js/chunk-931eb40a.98789b3a.js

3 lines
21 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-931eb40a","chunk-2d0d83d6"],{"1da1":function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));i("d3b7");function a(t,e,i,a,r,n,o){try{var s=t[n](o),c=s.value}catch(l){return void i(l)}s.done?e(c):Promise.resolve(c).then(a,r)}function r(t){return function(){var e=this,i=arguments;return new Promise((function(r,n){var o=t.apply(e,i);function s(t){a(o,r,n,s,c,"next",t)}function c(t){a(o,r,n,s,c,"throw",t)}s(void 0)}))}}},"5cb7":function(t,e,i){"use strict";i("da34")},"79db":function(t,e,i){t.exports=i.p+"static/app/img/empty-image-search.ef236a93.png"},9340:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"speech-lib-wrap"},[i("van-tabs",{staticStyle:{width:"30%"},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[i("van-tab",{attrs:{title:"话术库",name:"a"}})],1),i("van-divider",{staticStyle:{margin:"0"},attrs:{hairline:""}}),i("div",{staticClass:"search-box"},[i("van-search",{attrs:{shape:"round",background:"#ffffff",placeholder:"请输入搜索关键词","show-action":""},scopedSlots:t._u([{key:"action",fn:function(){return[i("div",{staticClass:"search-btn",on:{click:t.searchMaterial}},[t._v("搜索")])]},proxy:!0}]),model:{value:t.wordKey,callback:function(e){t.wordKey=e},expression:"wordKey"}})],1),i("div",{staticClass:"contain"},[t.groupData.length>0?i("div",{staticClass:"left-sidebar-box"},t._l(t.groupData,(function(e,a){return i("div",{key:a,class:["side-item",{active:t.groupId==e.id}],on:{click:function(i){return t.changeGroup(e.id)}}},[t._v(t._s(e.group_name))])})),0):t._e(),i("div",{staticClass:"right-content"},[t.materialList.length>0?i("div",{staticClass:"material-box"},t._l(t.materialList,(function(e){return i("div",{key:e.id,staticClass:"material-item"},[i("div",{staticClass:"top"},[i("div",{staticClass:"material-name"},[i("span",[t._v(t._s(e.material_name))]),i("span",[t._v(""+t._s(e.content_list.length)+"")])]),t.fun.isPc()?i("div",{staticClass:"btn sendAll-btn",on:{click:function(i){return t.batchSendMessage(e.id)}}},[t._v("一键发送")]):t._e()]),t._l(e.content_list,(function(a,r){return i("div",{key:r,staticClass:"message-list"},[i("div",{staticClass:"message-item"},[i("div",{staticClass:"message-content"},["text"==a.type?i("div",{staticClass:"message-text",domProps:{innerHTML:t._s(a.news)}}):t._e(),"image"==a.type?i("div",{staticClass:"img-box",on:{click:function(e){return t.imagePreview(a.link_img)}}},[i("img",{attrs:{src:a.link_img,alt:""}})]):t._e(),"link"==a.type?i("div",{staticClass:"h5-box"},[i("img",{staticClass:"h5-img",attrs:{src:a.link_img,alt:""}}),i("div",{staticClass:"h5-text"},[i("p",{staticClass:"h5-title"},[t._v(t._s(a.title))]),i("span",{staticClass:"desc"},[t._v(t._s(a.describe))])])]):t._e(),"applet"==a.type?i("div",{staticClass:"min-pro-box"},[i("div",{staticClass:"min-title"},[t._v(t._s(a.title))]),i("img",{staticClass:"min-img",attrs:{src:a.link_img,alt:""}}),t._m(0,!0)]):t._e(),"video"==a.type?i("div",{staticClass:"video-box"},[i("video",{attrs:{controls:""}},[i("source",{attrs:{src:a.link_video}}),t._v(" 您的浏览器不支持 video 标签。 ")])]):t._e(),"file"==a.type?i("div",{staticClass:"file-box"},[i("van-icon",{attrs:{name:"description"}}),i("span",[t._v(t._s(t.getFileNameByPath(a.link_file)))])],1):t._e()]),i("div",{staticClass:"btn send-btn",on:{click:function(i){return t.sendMessage(e.id,r)}}},[t._v("发送")])])])}))],2)})),0):t._e(),i("yz-blank",{attrs:{datas:t.materialList,text:"空空如也"}})],1)])],1)},r=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"min-icon"},[i("i",{staticClass:"iconfont icon-all_smallprogram"}),t._v(" 小程序 ")])}],n=(i("4662"),i("28a2")),o=(i("e7e5"),i("d399")),s=(i("99af"),i("d3b7"),i("159b"),i("9911"),i("eb17")),c=i("d76c"),l={mixins:[c["a"]],data:function(){return{wordKey:"",groupData:[],groupId:0,userId:"",page:1,loading:!1,finished:!1,materialList:[]}},created:function(){var t=this;this.appjsApiList=["getCurExternalContact","sendChatMessage"],this.agentConfigUrl="plugin.speechcraft-library.frontend.controller.member.login.getConfig",this.appSignSuccess=function(){wx.invoke("getCurExternalContact",{},(function(e){"getCurExternalContact:ok"==e.err_msg&&(t.userId=e.userId)}))}},activated:function(){this.getGroupData()},methods:{getGroupData:function(){var t=this;$http.get("plugin.speechcraft-library.frontend.controller.member.Material.getGroupList").then((function(e){if(1!==e.result)return t.$toast(e.msg);t.groupData=e.data,t.groupData.unshift({id:0,group_name:"全部分组"}),t.groupId=0,t.getMaterialData()}))},getMaterialData:function(){var t=this;if(this.finished)return!1;var e={page:this.page,group_id:this.groupId,search:{material_name:this.wordKey}};$http.post("plugin.speechcraft-library.frontend.controller.member.Material.getGroupMaterialList",e,"loading").then((function(e){if(1!==e.result)return t.$toast(e.msg);var i=e.data;t.materialList=t.page>1?t.materialList.concat(i.data):i.data,(t.page>=i.last_page||i.data.length<i.per_page)&&(t.finished=!0),t.page++}))},changeGroup:function(t){if(this.groupId==t)return!1;this.groupId=t,this.page=1,this.finished=!1,this.getMaterialData()},searchMaterial:function(){this.page=1,this.finished=!1,this.getMaterialData()},getFileNameByPath:function(t){var e=t.lastIndexOf("/"),i=t.substr(e+1);return i},batchSendMessage:function(t){var e=this;if(!this.isSignWorkApp)return this.$dialog.confirm({title:"提示",message:"企业应用未授权成功!"});this.$dialog.confirm({title:"提示",message:"该操作将发送当前素材的全部话术,确认全部发送吗?"}).then((function(){e.getMediaId(t)}))},sendMessage:function(t,e){if(!this.isSignWorkApp)return this.$dialog.confirm({title:"提示",message:"企业应用未授权成功!"});this.getMediaId(t,e)},getMediaId:function(t,e){var i=this;return $http.get("plugin.speechcraft-library.frontend.controller.member.Material.getMaterialContent",{material_id:t,external_userid:this.userId}).then((function(t){if(1!=t.result)return i.$toast(t.msg);i.sendChatMessage(t.data,e)}))},sendChatMessage:function(t,e){var i=this,a=o["a"].loading();if(void 0!==e&&""!==e&&"number"==typeof e){var r=t[e],n=this.messageConfig(r);wx.invoke("sendChatMessage",n,(function(t){"sendChatMessage:ok"==t.err_msg?o["a"].success("话术已生成,请点击聊天框发送按钮!"):o["a"].fail("话术发送失败"),a.close()}))}else t.forEach((function(t,e){var r=i.messageConfig(t);wx.invoke("sendChatMessage",r,(function(t){"sendChatMessage:ok"==t.err_msg?e===contentList.length-1&&(a.close(),o["a"].success("话术已生成,请点击聊天框发送按钮!")):(a.close(),o["a"].fail("话术发送失败"))}))}))},messageConfig:function(t){var e={};return"text"==t.type?e={msgtype:"text",text:{content:t.news}}:"link"==t.type?e={msgtype:"news",news:{link:t.link,title:t.title?t.title:"",desc:t.describe,imgUrl:t.link_img}}:"applet"==t.type?e={msgtype:"miniprogram",miniprogram:{appid:t.appid,title:t.title,imgUrl:t.link_img,page:t.page}}:"image"==t.type?e={msgtype:"image",image:{mediaid:t.media_id}}:"video"==t.type?e={msgtype:"video",video:{mediaid:t.media_id}}:"file"==t.type&&(e={msgtype:"file",file:{mediaid:t.media_id}}),e},imagePreview:function(t){Object(n["a"])([t])}},components:{yzBlank:s["default"]}},d=l,u=(i("5cb7"),i("2877")),p=Object(u["a"])(d,a,r,!1,null,"5728de05",null);e["default"]=p.exports},c7eb:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));i("a4d3"),i("e01a"),i("d3b7"),i("d28b"),i("3ca3"),i("ddb0"),i("b636"),i("944a"),i("0c47"),i("23dc"),i("d9e2"),i("3410"),i("159b"),i("b0c0"),i("131a"),i("fb6a");var a=i("53ca");function r(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
r=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";function l(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(E){l=function(t,e,i){return t[e]=i}}function d(t,e,i,a){var r=e&&e.prototype instanceof f?e:f,n=Object.create(r.prototype),o=new L(a||[]);return n._invoke=function(t,e,i){var a="suspendedStart";return function(r,n){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw n;return S()}for(i.method=r,i.arg=n;;){var o=i.delegate;if(o){var s=k(o,i);if(s){if(s===p)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var c=u(t,e,i);if("normal"===c.type){if(a=i.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(a="completed",i.method="throw",i.arg=c.arg)}}}(t,i,o),n}function u(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(E){return{type:"throw",arg:E}}}t.wrap=d;var p={};function f(){}function g(){}function h(){}var m={};l(m,o,(function(){return this}));var b=Object.getPrototypeOf,v=b&&b(b(j([])));v&&v!==e&&i.call(v,o)&&(m=v);var w=h.prototype=f.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){function r(n,o,s,c){var l=u(t[n],t,o);if("throw"!==l.type){var d=l.arg,p=d.value;return p&&"object"==Object(a["a"])(p)&&i.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(p).then((function(t){d.value=t,s(d)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}var n;this._invoke=function(t,i){function a(){return new e((function(e,a){r(t,i,e,a)}))}return n=n?n.then(a,a):a()}}function k(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var a=u(i,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,p;var r=a.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,r=function e(){for(;++a<t.length;)if(i.call(t,a))return e.value=t[a],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:S}}function S(){return{value:void 0,done:!0}}return g.prototype=h,l(w,"constructor",h),l(h,"constructor",g),g.displayName=l(h,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(y.prototype),l(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,i,a,r,n){void 0===n&&(n=Promise);var o=new y(d(e,i,a,r),n);return t.isGeneratorFunction(i)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},x(w),l(w,c,"Generator"),l(w,o,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var a=e.pop();if(a in t)return i.value=a,i.done=!1,i}return i.done=!0,i}},t.values=j,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function a(i,a){return o.type="throw",o.arg=t,e.next=i,a&&(e.method="next",e.arg=void 0),!!a}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],o=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var s=i.call(n,"catchLoc"),c=i.call(n,"finallyLoc");if(s&&c){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(s){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(t,e){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var o=n?n.completion:{};return o.type=t,o.arg=e,n?(this.method="next",this.next=n.finallyLoc,p):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),C(i),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var r=a.arg;C(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:j(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),p}},t}},c84d:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,'.speech-lib-wrap[data-v-5728de05]{background-color:#fff}.speech-lib-wrap .search-box[data-v-5728de05] .van-search{padding:.84rem}.speech-lib-wrap .search-box .search-btn[data-v-5728de05]{color:#f15353;cursor:default}.speech-lib-wrap .btn[data-v-5728de05]{cursor:pointer}.speech-lib-wrap .contain[data-v-5728de05]{font-size:12px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:calc(100vh - 99px)}.speech-lib-wrap .contain .left-sidebar-box[data-v-5728de05]{width:5rem;height:100%;overflow-x:hidden;overflow-y:auto;text-align:center}.speech-lib-wrap .contain .left-sidebar-box .active[data-v-5728de05]{color:#f15353}.speech-lib-wrap .contain .left-sidebar-box .side-item[data-v-5728de05]{cursor:default;padding:1rem 0;word-break:break-all}.speech-lib-wrap .contain .right-content[data-v-5728de05]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;height:100%;padding:0 .5rem;background-color:#f6f6f6;overflow-y:auto;overflow-x:hidden}.speech-lib-wrap .contain .right-content .material-box .material-item[data-v-5728de05]{margin:1rem 0}.speech-lib-wrap .contain .right-content .material-box .top[data-v-5728de05]{margin-bottom:.8rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.speech-lib-wrap .contain .right-content .material-box .sendAll-btn[data-v-5728de05]{padding:.41rem .63rem;font-size:.63rem;color:#fff;background-color:#5ab79c;border-radius:.13rem}.speech-lib-wrap .contain .right-content .material-box .message-list[data-v-5728de05]{background-color:#fff;border-radius:.13rem;border-bottom:1px solid #efefef}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item[data-v-5728de05]{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:.63rem;color:#242424}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .message-content[data-v-5728de05]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;max-width:11rem;text-align:left}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .img-box[data-v-5728de05]{width:4.5rem;height:4.5rem;overflow:hidden;background-color:#ccc;border-radius:.13rem}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .img-box img[data-v-5728de05]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .h5-box[data-v-5728de05]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .h5-box .h5-img[data-v-5728de05]{width:2.81rem;height:2.81rem;background-color:#ccc;border-radius:.13rem;-o-object-fit:cover;object-fit:cover}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .h5-box .h5-text[data-v-5728de05]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;margin-left:.5rem;font-size:.75rem;color:#242424}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .h5-box .desc[data-v-5728de05]{margin-top:.5rem;font-size:.69rem;color:#666}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .min-pro-box .min-img[data-v-5728de05]{margin-top:.3rem;width:4.97rem;height:4.97rem;background-color:#b8b8b8;border-radius:.13rem}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .min-pro-box .icon-all_smallprogram[data-v-5728de05]{color:#7879f0}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .video-box[data-v-5728de05]{width:10.97rem;height:6.97rem;background-color:#b8b8b8;border-radius:.13rem}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .video-box video[data-v-5728de05]{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .file-box[data-v-5728de05]{color:#606266;word-break:break-all}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item .send-btn[data-v-5728de05]{padding:.34rem .66rem;background-color:#f14e4e;border-radius:.13rem;font-size:.63rem;color:#fff}.speech-lib-wrap .contain .right-content .material-box .message-list .message-item[data-v-5728de05]:after{content:"";position:absolute;left:0;bottom:0;width:100%;height:1px;-webkit-transform:scaleY(.5);transform:scaleY(.5);background-color:#f6f6f6}',""]),t.exports=e},d76c:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var a=i("c7eb"),r=i("1da1"),n=(i("e9c4"),{data:function(){return{agentConfigUrl:null,isSignWorkApp:!1,agentData:{agent_secret:"",agentid:"",corpid:""},get_token:{},appjsApiList:[],appSignCallback:null,appSignError:null}},created:function(){if(this.fun.getKey("crop_id")){var t=this.fun.getKey("crop_id");window.localStorage.setItem("crop_id",t),this.corp_id=t}else this.corp_id=window.localStorage.getItem("crop_id")||"0"},activated:function(){this.getAgentConfig()},methods:{getAgentConfig:function(){var t=this;return Object(r["a"])(Object(a["a"])().mark((function e(){var i,r,n,o,s;return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t,r=t.agentConfigUrl||"plugin.wechat-chat-sidebar.frontend.controller.index.get-config",n="ios"===t.fun.isIosOrAndroid()?window.initUrl:document.location.href,e.prev=3,e.next=6,$http.post(r,{crop_id:t.corp_id,url:n},"loading");case 6:if(o=e.sent,1!=o.result){e.next=11;break}t.agentData=o.data,e.next=12;break;case 11:return e.abrupt("return",t.$toast(o.msg));case 12:t.get_token=t.agentData.get_token,s={debug:!1,beta:!0,jsApiList:["agentConfig","closeWindow"],openTagList:["ww-open-data"],appId:t.agentData.corpid,nonceStr:t.get_token.noncestr,timestamp:t.get_token.timestamp,signature:t.get_token.token},wx.config(s),wx.ready((function(){setTimeout((function(){t.getAgentSign(s,t.get_token.app_token)}),500)})),wx.error((function(t){i.$toast(JSON.stringify(t))})),e.next=22;break;case 19:e.prev=19,e.t0=e["catch"](3),t.$toast(e.t0);case 22:case"end":return e.stop()}}),e,null,[[3,19]])})))()},getAgentSign:function(t,e){var i=this;wx.agentConfig({debug:!1,corpid:t.appId,agentid:this.agentData.agentid,timestamp:t.timestamp,nonceStr:t.nonceStr,signature:e,jsApiList:i.appjsApiList,success:function(){i.isSignWorkApp=!0,i.appSignSuccess&&i.appSignSuccess()},fail:function(t){i.appSignError&&i.appSignError(),t.errMsg.indexOf("function not exist")>-1?i.$toast("版本过低请升级"):i.$toast("企业应用授权失败,请联系管理员重新配置!")}})}}})},da34:function(t,e,i){var a=i("c84d");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var r=i("499e").default;r("7cb2963b",a,!0,{sourceMap:!1,shadowMode:!1})}}]);