(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_manage/components/manageIndex"],{776:function(e,n,o){"use strict";o.r(n);var t=o(777),s=o(779);for(var i in s)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return s[e]}))}(i);o(781);var a,r=o(34),u=Object(r["default"])(s["default"],t["render"],t["staticRenderFns"],!1,null,"29966bf6",null,!1,t["components"],a);u.options.__file="pages_manage/components/manageIndex.vue",n["default"]=u.exports},777:function(e,n,o){"use strict";o.r(n);var t=o(778);o.d(n,"render",(function(){return t["render"]})),o.d(n,"staticRenderFns",(function(){return t["staticRenderFns"]})),o.d(n,"recyclableRender",(function(){return t["recyclableRender"]})),o.d(n,"components",(function(){return t["components"]}))},778:function(e,n,o){"use strict";var t;o.r(n),o.d(n,"render",(function(){return s})),o.d(n,"staticRenderFns",(function(){return a})),o.d(n,"recyclableRender",(function(){return i})),o.d(n,"components",(function(){return t}));try{t={uAvatar:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-avatar/u-avatar")]).then(o.bind(null,652))},uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(o.bind(null,694))},uPopup:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(o.bind(null,740))},uOverlay:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-overlay/u-overlay")]).then(o.bind(null,1046))},uModal:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-modal/u-modal")]).then(o.bind(null,853))},uLoadingPage:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-loading-page/u-loading-page")]).then(o.bind(null,815))}}}catch(r){if(-1===r.message.indexOf("Cannot find module")||-1===r.message.indexOf(".vue"))throw r;console.error(r.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var s=function(){var e=this,n=e.$createElement,o=(e._self._c,!e.viewload&&e.balance?e.balance.toFixed(2):null);e._isMounted||(e.e0=function(n){e.showzhidao=!1}),e.$mp.data=Object.assign({},{$root:{g0:o}})},i=!1,a=[];s._withStripped=!0},779:function(e,n,o){"use strict";o.r(n);var t=o(780),s=o.n(t);for(var i in t)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return t[e]}))}(i);n["default"]=s.a},780:function(e,n,o){"use strict";(function(e,t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=o(290),i={data:function(){return{viewload:!0,loadingtext:"数据加载中...",show:!1,user:null,showShare:!1,copyLinks:"",setTimeShow:!1,time:"",setImg:!1,codeLink:"",showzhidao:!1,imgs:this.$store.state.imgpath+"/app/image/logo.png",balance:0}},onShow:function(){console.log(this.imgs)},onShareAppMessage:function(){return{title:this.$store.state.logoname+"小程序的"+this.user.nickName+"邀请您成为销售",path:"/pages_course/course/becomeSale?id="+this.user.companyId,imageUrl:this.user.avatar||this.imgs,success:function(e){console.log("分享成功",e)},fail:function(e){console.log("分享失败",e)}}},computed:{imgPath:function(){return this.$store.state.imgpath}},mounted:function(){this.getCompanyUsers()},methods:{shareSale:function(){var n=this,o=location.href,t=o.split("/#")[0]||"";setTimeout((function(){e.setClipboardData({data:t+"/#/pages_course/course/becomeSale?id="+n.user.companyId+"&companyUserId="+n.user.userId,success:function(){e.showToast({title:"邀请链接已复制",icon:"none",duration:2e3}),n.showShare=!1},fail:function(){e.showToast({title:"复制失败",icon:"none"})}})}),100)},getjssdklist:function(){var e={url:window.location.href.split("#")[0]};getSDK(e).then((function(e){t.config({debug:!1,appId:e.data.appId,timestamp:e.data.timestamp,nonceStr:e.data.nonceStr,signature:e.data.signature,jsApiList:["updateAppMessageShareData","onMenuShareAppMessage"]})}))},shareimg:function(){var n=this;t.ready((function(){t.updateAppMessageShareData({title:n.user.userName+"邀请您成为销售",desc:n.user.deptName,link:n.copyLinks,imgUrl:n.codeLink.url||n.imgs,success:function(o){n.showzhidao=!0,n.setImg=!1,n.showShare=!1,e.showToast({title:"卡片已生成",icon:"none",duration:1e3})},fail:function(n){e.showToast({title:"卡片生成失败,请重试",icon:"none",duration:2e3})}})}))},handleShare:function(){this.showShare=!0;var e="/pages_course/becomeSale?id="+this.user.companyId+"&companyUserId="+this.user.userId;this.$emit("childsales",e)},confirmTime:function(){this.setTimeShow=!1,this.showShare=!1,this.getlink("preload"),this.copyLink()},closeimg:function(){this.setImg=!1,this.showShare=!1},buildimg:function(){this.setImg=!this.setImg,this.getshareimg()},getshareimg:function(){var n=this;e.showLoading({title:"正在生成中..."});var o={code:"",companyId:this.user.companyId,companyUserId:this.user.userId};becomeVipuserImg(o).then((function(o){200==o.code?(n.codeLink=o.data,n.getlink()):e.showToast({title:o.msg,icon:"none",duration:2e3})}))},getlink:function(e){var n=this,o={companyId:this.user.companyId,companyUserId:this.user.userId,tagids:"",limitTime:this.time};becomeVipuser(o).then((function(e){200==e.code&&(n.copyLinks=e.data,n.copyLinks.startsWith("http://")&&(n.copyLinks=n.copyLinks.replace("http://","https://")))}))},copyLink:function(){var n=this;console.log(this.showShare),setTimeout((function(){e.setClipboardData({data:n.copyLinks,success:function(){e.showToast({title:"链接已复制",icon:"none",duration:2e3}),n.showShare=!1},fail:function(){e.showToast({title:"复制失败",icon:"none"})}})}),100)},closeShare:function(){this.showShare=!1},openShare:function(){},showLogout:function(){this.show=!0},hideLogout:function(){this.show=!1},logout:function(){e.removeStorageSync("ManageToken");var n="";n="/pages_manage/login",e.navigateTo({url:n})},navTo:function(n){e.navigateTo({url:n})},getCompanyUsers:function(){var n=this,o={};(0,s.getCompanyUser)(o).then((function(o){200==o.code&&(n.viewload=!1,console.log(o),n.user=o.user,n.balance=o.balance,o.user.posts&&(n.user.postname=o.user.posts.map((function(e){return e.postName})).join(",")),o.user.roles&&(n.user.rolesname=o.user.roles.map((function(e){return e.roleName})).join(",")),n.user.avatar?n.user.avatar=e.getStorageSync("requestPath")+o.user.avatar:n.user.avatar,console.log("头像",n.user.avatar))}))}}};n.default=i}).call(this,o(2)["default"],o(1)["default"])},781:function(e,n,o){"use strict";o.r(n);var t=o(782),s=o.n(t);for(var i in t)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return t[e]}))}(i);n["default"]=s.a},782:function(e,n,o){}}]); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages_manage/components/manageIndex.js.map ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([ 'pages_manage/components/manageIndex-create-component', { 'pages_manage/components/manageIndex-create-component':(function(module, exports, __webpack_require__){ __webpack_require__('2')['createComponent'](__webpack_require__(776)) }) }, [['pages_manage/components/manageIndex-create-component']] ]);