{"version":3,"sources":["webpack:///./src/views/mixins/sign-in.js","webpack:///./src/common/mixins/oauth-mixins.js","webpack:///./src/common/mixins/qywxCommon.js","webpack:///./src/common/mixins/common-mixin.js"],"names":["name","mixins","OauthMixin","commonMixin","qywxCommon","data","ready","admin_login","background_images","login","id","password","show_wechat","this","$organization","use_wechat","error_message","show_login_error","icons","icon","subject","title","mounted","_this","sso","$api","then","res","length","map","item","path","images","qywxHandler","computed","should_show_admin","window","location","href","indexOf","methods","resetPassword","vm","$affirm","$messageBox","success","$notice","error","submitForm","credential","mixToken","c","response","setUserInfo","jumpBack","created","$route","hash","query","ticket","code","admin","$nextTick","jumpToSSO","_this2","oauth","ret","text","state","_t","message","jumpToSignIn","catch","from","jumpToOAuth2","sjtu_app","return_url","signin_url","encodeURIComponent","replace","$router","push","url","decodeURIComponent","is_wx_state","substring","redirect","redirectPath","msg","$isWechat","wx_redirect","wechat_appid","wechat_agentid","_objectSpread","mapState","mapGetters","en","$english","english","is_mobile","$isMobile","mapMutations"],"mappings":"2GAAA,2DAKe,cACXA,KAAM,UACNC,OAAQ,CAACC,OAAYC,OAAaC,QAClCC,KAAI,WACA,MAAO,CACHC,OAAO,EACPC,aAAa,EACbC,kBAAkB,GAClBC,MAAO,CACHC,GAAI,GACJC,SAAU,IAEdC,YAAaC,KAAKC,cAAcC,WAChCC,cAAe,gBACfC,kBAAkB,EAClBC,MAAO,CACH,CAACC,KAAM,YAAaC,QAAS,KAAMC,MAAO,iDAC1C,CAACF,KAAM,YAAaC,QAAS,KAAMC,MAAO,4CAC1C,CAACF,KAAM,YAAaC,QAAS,KAAMC,MAAO,4CAC1C,CAACF,KAAM,YAAaC,QAAS,KAAMC,MAAO,kDAItDC,QAAO,WAAG,IAAAC,EAAA,KACDV,KAAKC,cAAcU,KACpBX,KAAKY,KAAK,2BAA4B,IAAI,GAAMC,MAAK,SAAAC,GACjD,GAAIA,EAAItB,KAAKA,MAAQsB,EAAItB,KAAKA,KAAKuB,OAC/BL,EAAK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K8D,OAAmBqB,EAAM7D,EAAItB,KAAK8D,MAChEzB,EAAGE,YAAYG,MAAMyC,GACrB,IAAIF,EAAW/D,EAAKgE,eACpBD,EAAYA,EAAyB,eAAiBA,EAA/B,WACvB5C,EAAGsC,QAAQD,QAAQO,GACnB5C,EAAGpC,OAAQ,WAGhB,GAAIO,KAAK4E,aAAe5E,KAAKC,cAAcC,WAAY,CAG1D,IAAIqD,EAAQ,KACRvD,KAAK2C,OAAOE,MAAMW,KAClBD,EAAQ,MAAQU,mBAAmBjE,KAAK2C,OAAOE,MAAMW,KAEzD,IAAMqB,EAAc,6DACL7E,KAAKC,cAAc6E,aAC9B,iBAAmBb,mBAAmBjE,KAAKC,cAAc+D,YACzD,qDAAuDhE,KAAKC,cAAc8E,eAC1E,UAAYxB,EAAQ,mBACxBhC,OAAOC,SAASC,KAAOoD,OAEvB7E,KAAKP,OAAQ,GAGrBiF,aAAY,WACR,IAAID,EAAW,KAIf,MAH+C,QAA3CzE,KAAK2C,OAAOE,MAAMU,MAAMiB,UAAU,EAAE,KACpCC,EAAYH,mBAAmBtE,KAAK2C,OAAOE,MAAMU,MAAMiB,UAAU,KAE9DC,M,0qBClDJ,QACXpD,SAAQ2D,QAAA,GACDC,eAAS,CAAC,UAAU,YACpBC,eAAW,UAAU,CAAC,cAAc,cACpCA,eAAW,OAAO,CAAC,UAAQ,IAC9BC,GAAE,WACE,OAAOnF,KAAKoF,YAEhBC,QAAO,WACH,OAAOrF,KAAKoF,YAEhBE,UAAS,WACL,OAAOtF,KAAKuF,eAGpB5D,QAAOqD,IAAA,GACAQ,eAAa,OAAQ,CAAC,QAAQ,iBAC9BA,eAAa,UAAW,CAAC,eAAe","file":"js/about79.86f3c215.js","sourcesContent":["import OauthMixin from \"../../common/mixins/oauth-mixins\"\nimport commonMixin from \"../../common/mixins/common-mixin\";\nimport qywxCommon from \"../../common/mixins/qywxCommon\";\nimport {mixToken} from \"../../plugins/common-functions\"\n\nexport default {\n name: \"sign-in\",\n mixins: [OauthMixin, commonMixin, qywxCommon],\n data() {\n return {\n ready: false,\n admin_login: false,\n background_images:[],\n login: {\n id: '',\n password: ''\n },\n show_wechat: this.$organization.use_wechat,\n error_message: 'error message',\n show_login_error: false,\n icons: [\n {icon: \"feature-1\", subject: '稳健', title: \"基于流行的视频会议系统,透过API,提供稳健的视频会议建会,查询,报告和录像自动收集等功能\"},\n {icon: \"feature-2\", subject: '高效', title: \"合理安排资源,提高视频会议资源的效率,监控资源使用情况,同时管理多个视频会议平台\"},\n {icon: \"feature-3\", subject: '协作', title: \"自由灵活分享屏幕,支持聊天、分组讨论,投票,同传,标注、直播、电子白板和影音分享\"},\n {icon: \"feature-4\", subject: '安全', title: \"会管平台私有化部署,有SSO对接登录、视频会议有等候室,锁定会议等手段保障会议信息安全\"},\n ]\n }\n },\n mounted() {\n if (!this.$organization.sso) { // 如果设置的是sso 那么就直接跳转连管理员输入都不显示\n this.$api('Query.BackgroundPictures', {}, true).then(res => {\n if (res.data.data && res.data.data.length) {\n this.background_images = res.data.data.map(item => item.path);\n } else {\n let images = ['tsi-ad-banner-0.jpg', 'tsi-ad-banner-1.jpg', 'tsi-ad-banner-2.jpg'];\n if (this.$organization.background_images) {\n images = this.$organization.background_images;\n }\n this.background_images = images.map(item => '/assets/images/' + item);\n }\n });\n }\n if (this.$organization.use_wechat) {\n this.qywxHandler();\n }\n },\n computed:{\n should_show_admin(){\n // 判断uri中是否包含了#admin,\n if (this.$organization.should_show_admin) return true;\n return window.location.href.indexOf('#admin') > -1;\n }\n },\n methods: {\n resetPassword() {\n const vm = this;\n if (vm.login.id) {\n vm.$affirm('我们将向您的邮箱发送一份包含有密码的邮件, 是否继续?').then(() => {\n vm.$api('ResetPassword', vm.login, true).then(() => {\n vm.$messageBox.success('密码已经发出,请检查您的邮箱。');\n })\n })\n } else {\n vm.$notice.error('请重新输入账号/邮箱');\n }\n },\n submitForm() {\n const vm = this;\n if (!vm.login.id) {\n vm.$notice.error('请重新输入账号/邮箱');\n } else {\n const credential = mixToken(vm.login.id + ':' + vm.login.password, true)\n vm.$api('SignIn', {c:credential}, true).then(response => {\n vm.setUserInfo(response.data.data);\n vm.jumpBack();\n });\n }\n },\n },\n}\n","export default {\n created() {\n //判断访问路径是否是 https://domain/sign-in#admin 如果是就显示管理员登录界面\n if (this.$route.hash === '#admin') {\n this.admin_login = true;\n } else {\n if (this.$organization.sso) { // 如果设置的是sso 那么就直接跳转连管理员输入都不显示\n if (!this.$route.query.ticket && !this.$route.query.code) { // read user info\n if (this.$route.query.admin) {\n this.admin_login = true;\n this.ready = true;\n } else {\n this.$nextTick(() => {\n this.jumpToSSO();\n });\n }\n }\n }\n }\n },\n mounted() {\n const vm=this;\n if (!this.oauth && !this.$organization.sso) this.admin_login=true;\n if (this.$organization.oauth || this.$organization.sso) { // 这是显示管理员界面+单点登录界面\n if (this.$route.query.ticket ) { // read user info\n //console.log('CAS Ticket is Comming in',this.$route.query.ticket);\n this.$api('SSO' + '?ticket=' + this.$route.query.ticket, null).then(res => {\n //console.log('CAS Ticket result',res);\n if (res.data.success) {\n vm.setUserInfo(res.data.data);\n vm.jumpBack();\n } else {\n const ret = res.data.text ? res.data.text : '错误的SSO返回信息,重新登录';\n vm.$messageBox.error( ret === \"INVALID\" ? '错误的SSO返回信息,重新登录' : ret ,null,()=>{\n window.location.href = this.$organization.sso;\n });\n }\n });\n } else if (this.$route.query.code ){ // && this.$route.query.state && this.$route.query.state === 'zoom') {\n //console.log('OAUTH Code is Comming in',this.$route.query.code);\n this.$api('SSO', {code: this.$route.query.code,state:this.$route.query.state,_t:this.$route.query._t},1).then(res => {\n //console.log('OAUTH Code result',res);\n if (res.data.success) {\n if (res.data.data.error) {\n this.show_login_error = true;\n this.error_message = res.data.data.message;\n } else {\n vm.setUserInfo(res.data.data);\n vm.jumpBack();\n }\n } else {\n this.$messageBox.error(res.data.text,null,()=>{\n this.jumpToSignIn()\n })\n }\n }).catch(()=>{\n this.ready = true;\n });\n } else if (this.$route.query.from === 'portal') {\n this.ready = false;\n vm.jumpToOAuth2();\n } else if (this.sjtu_app) {\n //交大的app交我办进来就直接跳转\n vm.jumpToOAuth2();\n }else {\n this.ready = true;\n }\n } else if (!this.$organization.use_wechat) {\n this.ready = true;\n }\n },\n computed: {\n oauth(){\n return !!this.$organization.oauth;\n },\n },\n methods: {\n jumpToOAuth2() {\n this.ready = false;\n const return_url = this.$organization.signin_url;\n window.location.href = this.$organization.oauth\n + encodeURIComponent(return_url);\n },\n jumpToSSO() {\n this.ready = false;\n const return_url = this.$organization.signin_url;\n let sso = this.$organization.sso;\n if (this.$route.query._t) {\n sso = sso.replace('zoom',encodeURIComponent(this.$route.query._t));\n }\n window.location.href = sso + encodeURIComponent(return_url);\n },\n jumpToSignIn(){\n this.$router.push('/sign-in');\n this.show_login_error = false;\n },\n jumpBack(){\n const return_url = '/';\n const url = this.$route.query.state?decodeURIComponent(this.$route.query.state):return_url;\n this.$router.replace(url);\n }\n },\n}\n","export default {\n /* 需要添加\n mounted() {\n this.qywxHandler();\n },\n */\n methods: {\n qywxHandler() {\n const vm = this;\n const is_wx_state = this.$route.query.state && this.$route.query.state.substring(0,2) === 'wx';\n if (this.$organization.use_wechat && this.$route.query.code && is_wx_state) {// read user info\n this.$api('Wechat.QYWeb', {code: this.$route.query.code, state: this.$route.query.state}).then(res => {\n if (res.data.success) {\n vm.setUserInfo(res.data.data);\n\n let redirect = this.redirectPath();\n if (!redirect) redirect = \"/\";\n vm.$router.replace(redirect);\n\n } else {\n let msg = '错误的企业微信返回信息,请用其他方式登录!';\n if (res.data.text && res.data.text != 'INVALID') msg = res.data.text;\n vm.$messageBox.error(msg);\n let redirect = this.redirectPath();\n redirect = !redirect ? \"/sign-in\" : (\"/sign-in?_t=\" + redirect);\n vm.$router.replace(redirect);\n vm.ready = true;\n }\n });\n } else if (this.$isWechat() && this.$organization.use_wechat) { // 微信客户端\n // 构建微信跳转地址\n // https://open.weixin.qq.com/connect/oauth2/authorize?appid=appid&redirect_uri=%2F&response_type=code&scope=snsapi_userinfo&agentid=1000013&state=STATE#wechat_redirect\n let state = 'wx';\n if (this.$route.query._t) {\n state = 'wx_' + encodeURIComponent(this.$route.query._t);\n }\n const wx_redirect = \"https://open.weixin.qq.com/connect/oauth2/authorize?\" +\n \"appid=\" + this.$organization.wechat_appid +\n \"&redirect_uri=\" + encodeURIComponent(this.$organization.signin_url) +\n \"&response_type=code&scope=snsapi_userinfo&agentid=\" + this.$organization.wechat_agentid +\n \"&state=\" + state + \"#wechat_redirect\";\n window.location.href = wx_redirect;\n } else {\n this.ready = true;\n }\n },\n redirectPath(){\n let redirect = null;\n if (this.$route.query.state.substring(0,3) === 'wx_') {\n redirect = decodeURIComponent(this.$route.query.state.substring(3));\n }\n return redirect;\n }\n }\n}\n","import {mapState,mapGetters,mapMutations} from \"vuex\"\nexport default {\n computed:{\n ...mapState(['process','preset']),\n ...mapGetters('process',['isCollapsed','pageSize']),\n ...mapGetters('user',['user']),\n en(){\n return this.$english();\n },\n english(){\n return this.$english();\n },\n is_mobile(){\n return this.$isMobile();\n },\n },\n methods:{\n ...mapMutations('user', ['clear',\"setUserInfo\"]),\n ...mapMutations('process', ['setCollapsed','setPageSize']),\n }\n}\n"],"sourceRoot":""}