|
@@ -17,14 +17,7 @@
|
|
|
<el-form-item class="login-button" style="width:100%;">
|
|
|
<el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{ $t('login') }}</el-button>
|
|
|
</el-form-item>
|
|
|
- <div class="additional" v-if="wxHrefFlg">
|
|
|
- <el-divider content-position="center">或</el-divider>
|
|
|
- </div>
|
|
|
- <div class="externalLanding" v-if="wxHrefFlg">
|
|
|
- <div class="externalLanding_img" @click="wxworkCli()">
|
|
|
- <img src="../assets/image/qiyeweix.png" alt="">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+
|
|
|
<div class="toRegister">
|
|
|
<el-link type="primary" class="btn" style="float:left;" :underline="false">{{ $t('lian-xi-ke-fu') }}
|
|
|
<div class="service">
|
|
@@ -88,8 +81,6 @@
|
|
|
},
|
|
|
wxworkFlg: false,
|
|
|
bindingqywx: false,
|
|
|
-
|
|
|
- wxHrefFlg: false,
|
|
|
appName: localStorage.appName,
|
|
|
appLogo: localStorage.appLogo,
|
|
|
};
|
|
@@ -131,7 +122,6 @@
|
|
|
this.isCorpWX = true;
|
|
|
}
|
|
|
let href = window.location.href;
|
|
|
- this.wxHrefFlg = href.indexOf('//devworkshop.ttkuaiban.com') != '-1'
|
|
|
if (this.isCorpWX) {
|
|
|
//企业微信环境下,尝试自动登录
|
|
|
//判断企业微信,是否存在授权
|
|
@@ -155,13 +145,8 @@
|
|
|
} else {
|
|
|
if (localStorage.userInfo != null) {
|
|
|
var user = JSON.parse(localStorage.userInfo);
|
|
|
- if (user.company.packageSimple == 1) {
|
|
|
- //简易模式,直接进入工时统计表
|
|
|
- this.$router.push({ path: '/simple' });
|
|
|
- } else {
|
|
|
- if(user.moduleList.length > 0) {
|
|
|
- this.$router.push({ path: user.moduleList[0].path })
|
|
|
- }
|
|
|
+ if(user.moduleList.length > 0) {
|
|
|
+ this.$router.push({ path: user.moduleList[0].path })
|
|
|
}
|
|
|
} else if (href.indexOf('errorMsg=') > 0) {
|
|
|
var errorMsg = href.split('errorMsg=')[1].split('#')[0];
|
|
@@ -187,13 +172,8 @@
|
|
|
this.loginByUserId(loginUserId, path);
|
|
|
} else if (localStorage.userInfo != null) {
|
|
|
var user = JSON.parse(localStorage.userInfo);
|
|
|
- if (user.company.packageSimple == 1) {
|
|
|
- //简易模式,直接进入工时统计表
|
|
|
- this.$router.push({ path: '/simple' });
|
|
|
- } else {
|
|
|
- if(user.moduleList.length > 0) {
|
|
|
- this.$router.push({ path: user.moduleList[0].path })
|
|
|
- }
|
|
|
+ if(user.moduleList.length > 0) {
|
|
|
+ this.$router.push({ path: user.moduleList[0].path })
|
|
|
}
|
|
|
} else {
|
|
|
if(href.indexOf("corpid") > 0) {
|
|
@@ -203,7 +183,6 @@
|
|
|
var jumpkey = '&jumpto=';
|
|
|
var url = location.href;
|
|
|
console.log('jumpto',location);
|
|
|
- // var url = "https://devworkshop.ttkuaiban.com/?corpid=$CORPID$&jumpto=/info/21#/index"
|
|
|
var that = this;
|
|
|
if (url.indexOf(key) > 0) {
|
|
|
var corpId = ''
|
|
@@ -267,21 +246,7 @@
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- wxworkCli() {
|
|
|
- // this.wxworkFlg = true
|
|
|
- // this.$nextTick(()=>{
|
|
|
- // var obj = new WxLogin({
|
|
|
- // id: 'wxcode', // 登录页面显示二维码的容器id
|
|
|
- // appid: 'wwf11426cf618e1703', // 企业微信的CorpID,在企业微信管理端查看
|
|
|
- // redirect_uri: encodeURIComponent('http://localhost:10086/#/login'), // 重定向的地址,需要进行encode
|
|
|
- // usertype: 'member'
|
|
|
- // })
|
|
|
- // })
|
|
|
- var appId = "wwf11426cf618e1703";//企业微信第三方的SUIT ID
|
|
|
- var url = "https://devworkshop.ttkuaiban.com/api/corpWXScanningAuth";//授权回调页面
|
|
|
- var weixinUrl=`https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?appid=${appId}&redirect_uri=${url}&state=0&usertype=member`;
|
|
|
- window.location.href = weixinUrl;
|
|
|
- },
|
|
|
+
|
|
|
getStaffInfo() {
|
|
|
console.log('执行了没')
|
|
|
},
|
|
@@ -311,8 +276,13 @@
|
|
|
},
|
|
|
|
|
|
tryAutoLogin() {
|
|
|
- var appId = "wwf11426cf618e1703";//私有化部署的企业CORPID
|
|
|
- var url = "http://devworkshop.ttkuaiban.com/api/corpInsideWXAuth";//授权回调页面
|
|
|
+ // var appId = "wwf11426cf618e1703";//私有化部署的企业CORPID
|
|
|
+ // var url = "http://devworkshop.ttkuaiban.com/api/corpInsideWXAuth";//授权回调页面
|
|
|
+
|
|
|
+ //雷尔伟的企业配置
|
|
|
+ var appId = "wwf295c4f04cba0076";//私有化部署的企业CORPID
|
|
|
+ var url = "http://workshop.njlew.com.cn:16080/api/corpInsideWXAuth";//授权回调页面
|
|
|
+
|
|
|
var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
|
|
|
window.location.href = weixinUrl;
|
|
|
},
|