3 lines
15 KiB
JavaScript
3 lines
15 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0dc5ef9a","chunk-2d0d83d6"],{"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("d3b7");function n(t,e,r,n,i,a,o){try{var c=t[a](o),s=c.value}catch(l){return void r(l)}c.done?e(s):Promise.resolve(s).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,a){var o=t.apply(e,r);function c(t){n(o,i,a,c,s,"next",t)}function s(t){n(o,i,a,c,s,"throw",t)}c(void 0)}))}}},"21a6":function(t,e,r){"use strict";r("2fa6")},"2c15":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,".cell-item[data-v-958a916a]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;text-align:left;padding:.4rem;word-break:break-all}.cell-item .cell-label[data-v-958a916a]{font-size:.75rem;color:#666;white-space:nowrap}",""]),t.exports=e},"2fa6":function(t,e,r){var n=r("2c15");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=r("499e").default;i("58bd35dc",n,!0,{sourceMap:!1,shadowMode:!1})},3549:function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,".member-record-detail[data-v-839e3d00]{padding:.625rem .85rem}.member-record-detail .plane-block[data-v-839e3d00]{margin:.63rem 0;padding:.875rem;border-radius:.53rem;background-color:#fff}.member-record-detail .plane-block .member-detail[data-v-839e3d00]{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}.member-record-detail .plane-block .member-detail .avatar[data-v-839e3d00]{width:2.688rem;height:2.688rem;border-radius:50%}.member-record-detail .plane-block .member-detail .member-info[data-v-839e3d00]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;margin-left:.5rem;text-align:left}.member-record-detail .plane-block .member-detail .member-info .member-nickname[data-v-839e3d00]{max-width:10rem;height:2rem;font-size:.813rem;color:#222}.member-record-detail .plane-block .member-detail .member-info .member-id[data-v-839e3d00]{font-size:.688rem;color:#666}.member-record-detail .plane-block .member-detail .open-chat-btn[data-v-839e3d00]{padding:.5rem .9rem;font-size:.688rem;color:#fff;background-color:#0b8dfe;border-radius:1rem;cursor:default}.member-record-detail .record-block[data-v-839e3d00]{margin:.63rem 0;padding:.4rem .875rem;border-radius:.53rem;background-color:#fff}.member-record-detail .record-block .page-link[data-v-839e3d00]{color:#0b8dfe}.member-record-detail .record-block .visit-num[data-v-839e3d00]{color:#ec0f0f}",""]),t.exports=e},"478de":function(t,e,r){"use strict";r("a3f8")},"79db":function(t,e,r){t.exports=r.p+"static/app/img/empty-image-search.ef236a93.png"},"9d5c":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("c-title",{attrs:{hide:!1,text:"访问记录"}}),t.memberInfo?r("div",{staticClass:"member-record-detail"},[r("div",{staticClass:"plane-block"},[r("div",{staticClass:"member-detail"},[r("img",{staticClass:"avatar",attrs:{src:t.memberInfo.avatar,alt:""}}),r("div",{staticClass:"member-info"},[r("p",{staticClass:"member-nickname van-ellipsis"},[t._v(t._s(t.memberInfo.nickname))]),r("p",{staticClass:"member-id"},[t._v("ID:"+t._s(t.memberInfo.id))])]),r("div",{staticClass:"open-chat-btn",on:{click:function(e){return t.openEnterpriseChat(t.memberInfo.external_userid)}}},[t._v("发起会话")])])]),t._l(t.logList,(function(e,n){return r("div",{key:n,staticClass:"record-block"},[r("cell-item",{attrs:{title:"访问时间:"}},[r("span",[t._v(t._s(e.date))])]),r("cell-item",{attrs:{title:"页面类型:"}},[r("span",[t._v(t._s(e.page_type))])]),r("cell-item",{attrs:{title:"页面标题:"}},[r("span",[t._v(t._s(e.title))])]),r("cell-item",{attrs:{title:"页面URL:"}},[r("span",{staticClass:"page-link"},[t._v(t._s(e.url))])]),r("cell-item",{attrs:{title:"访问端口:"}},[r("span",[t._v(t._s(e.port_type))])]),r("cell-item",{attrs:{title:"访问次数:"}},[r("span",[t._v("当天第 "),r("span",{staticClass:"visit-num"},[t._v(t._s(e.count))]),t._v(" 次访问")])])],1)})),r("yz-blank",{attrs:{datas:t.logList,text:"空空如也"}})],2):t._e()],1)},i=[],a=r("d76c"),o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"cell-item"},[r("div",{staticClass:"cell-label"},[t._v(t._s(t.title))]),t._t("default")],2)},c=[],s={props:["title"],data:function(){return{}},methods:{},components:{}},l=s,u=(r("21a6"),r("2877")),d=Object(u["a"])(l,o,c,!1,null,"958a916a",null),f=d.exports,p=r("eb17"),m={mixins:[a["a"]],data:function(){return{id:"",memberInfo:null,logList:null}},created:function(){this.appjsApiList=["openEnterpriseChat"],this.agentConfigUrl="plugin.customer-radar.frontend.controller.member.login.getConfig"},activated:function(){this.id=this.$route.params.id,this.time=1*this.$route.query.time,this.getData()},methods:{getData:function(){var t=this;$http.post("plugin.customer-radar.frontend.controller.member.browse-statistics.getStatisticsByMember",{member_id:this.id,date:new Date(this.time)}).then((function(e){if(1!=e.result)return t.$toast(e.msg);t.memberInfo=e.data.member_info,t.logList=e.data.log_list}))},openEnterpriseChat:function(t){if(!this.isSignWorkApp)return this.$dialog.confirm({title:"提示",message:"企业应用未授权!"});wx.openEnterpriseChat({externalUserIds:t,success:function(t){},fail:function(t){t.errMsg.indexOf("function not exist")>-1&&alert("版本过低请升级")}})}},components:{cellItem:f,yzBlank:p["default"]}},h=m,g=(r("478de"),Object(u["a"])(h,n,i,!1,null,"839e3d00",null));e["default"]=g.exports},a3f8:function(t,e,r){var n=r("3549");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=r("499e").default;i("b5fdeb68",n,!0,{sourceMap:!1,shadowMode:!1})},c7eb:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("d9e2"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var n=r("53ca");function i(){
|
||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(C){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),o=new E(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return j()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var c=_(o,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=d(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,o),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(C){return{type:"throw",arg:C}}}t.wrap=u;var f={};function p(){}function m(){}function h(){}var g={};l(g,o,(function(){return this}));var v=Object.getPrototypeOf,b=v&&v(v(S([])));b&&b!==e&&r.call(b,o)&&(g=b);var y=h.prototype=p.prototype=Object.create(g);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(a,o,c,s){var l=d(t[a],t,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Object(n["a"])(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return i("throw",t,c,s)}))}s(l.arg)}var a;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}}function _(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=d(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(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 n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}return m.prototype=h,l(y,"constructor",h),l(h,"constructor",m),m.displayName=l(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new x(u(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(y),l(y,s,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,E.prototype={constructor:E,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(L),!t)for(var e in this)"t"===e.charAt(0)&&r.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 n(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;L(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}},d76c:function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r("c7eb"),i=r("1da1"),a=(r("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(i["a"])(Object(n["a"])().mark((function e(){var r,i,a,o,c;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=t,i=t.agentConfigUrl||"plugin.wechat-chat-sidebar.frontend.controller.index.get-config",a="ios"===t.fun.isIosOrAndroid()?window.initUrl:document.location.href,e.prev=3,e.next=6,$http.post(i,{crop_id:t.corp_id,url:a},"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,c={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(c),wx.ready((function(){setTimeout((function(){t.getAgentSign(c,t.get_token.app_token)}),500)})),wx.error((function(t){r.$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 r=this;wx.agentConfig({debug:!1,corpid:t.appId,agentid:this.agentData.agentid,timestamp:t.timestamp,nonceStr:t.nonceStr,signature:e,jsApiList:r.appjsApiList,success:function(){r.isSignWorkApp=!0,r.appSignSuccess&&r.appSignSuccess()},fail:function(t){r.appSignError&&r.appSignError(),t.errMsg.indexOf("function not exist")>-1?r.$toast("版本过低请升级"):r.$toast("企业应用授权失败,请联系管理员重新配置!")}})}}})}}]); |