(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_manage/components/manageIndex"],{692:function(e,n,t){"use strict";t.r(n);var o=t(693),s=t(695);for(var i in s)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return s[e]}))}(i);t(697);var a,r=t(34),u=Object(r["default"])(s["default"],o["render"],o["staticRenderFns"],!1,null,"29966bf6",null,!1,o["components"],a);u.options.__file="pages_manage/components/manageIndex.vue",n["default"]=u.exports},693:function(e,n,t){"use strict";t.r(n);var o=t(694);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},694:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return s})),t.d(n,"staticRenderFns",(function(){return a})),t.d(n,"recyclableRender",(function(){return i})),t.d(n,"components",(function(){return o}));try{o={uAvatar:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-avatar/u-avatar")]).then(t.bind(null,639))},uPopup:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(t.bind(null,656))},uOverlay:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-overlay/u-overlay")]).then(t.bind(null,951))},uModal:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-modal/u-modal")]).then(t.bind(null,800))},uLoadingPage:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-loading-page/u-loading-page")]).then(t.bind(null,739))}}}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,t=(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:t}})},i=!1,a=[];s._withStripped=!0},695:function(e,n,t){"use strict";t.r(n);var o=t(696),s=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=s.a},696:function(e,n,t){"use strict";(function(e,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=t(232),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,t=location.href,o=t.split("/#")[0]||"";setTimeout((function(){e.setClipboardData({data:o+"/#/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){o.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;o.ready((function(){o.updateAppMessageShareData({title:n.user.userName+"邀请您成为销售",desc:n.user.deptName,link:n.copyLinks,imgUrl:n.codeLink.url||n.imgs,success:function(t){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 t={code:"",companyId:this.user.companyId,companyUserId:this.user.userId};becomeVipuserImg(t).then((function(t){200==t.code?(n.codeLink=t.data,n.getlink()):e.showToast({title:t.msg,icon:"none",duration:2e3})}))},getlink:function(e){var n=this,t={companyId:this.user.companyId,companyUserId:this.user.userId,tagids:"",limitTime:this.time};becomeVipuser(t).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,t={};(0,s.getCompanyUser)(t).then((function(t){200==t.code&&(n.viewload=!1,console.log(t),n.user=t.user,n.balance=t.balance,t.user.posts&&(n.user.postname=t.user.posts.map((function(e){return e.postName})).join(",")),t.user.roles&&(n.user.rolesname=t.user.roles.map((function(e){return e.roleName})).join(",")),n.user.avatar?n.user.avatar=e.getStorageSync("requestPath")+t.user.avatar:n.user.avatar,console.log("头像",n.user.avatar))}))}}};n.default=i}).call(this,t(2)["default"],t(1)["default"])},697:function(e,n,t){"use strict";t.r(n);var o=t(698),s=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=s.a},698:function(e,n,t){}}]); //# 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__(692)) }) }, [['pages_manage/components/manageIndex-create-component']] ]);