|
@@ -93,6 +93,7 @@ export default {
|
|
|
created() {
|
|
|
this.initFun();
|
|
|
this.getLanXinSignature();
|
|
|
+ this.getLanXinCode();
|
|
|
},
|
|
|
watch: {
|
|
|
// 监听:首页切换tab的下标
|
|
@@ -225,6 +226,30 @@ export default {
|
|
|
this.$store.commit("toggleLoading", false);
|
|
|
});
|
|
|
},
|
|
|
+ // 获取蓝信免登陆授权吗
|
|
|
+ getLanXinCode() {
|
|
|
+ console.log("getLanXinCode--code-");
|
|
|
+ lx.biz
|
|
|
+ .getAuthCode({
|
|
|
+ appId: process.env.VUE_APP_LANXIN_APPID
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ let authCode = res.authCode;
|
|
|
+ this.getLanXinUserInfo(authCode);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取蓝信用户信息
|
|
|
+ getLanXinUserInfo(authCode) {
|
|
|
+ let params = { authCode: authCode };
|
|
|
+ this.$_http
|
|
|
+ .get(this.$_API.JTXT_GET_LAN_XIN_USER_INFO, { params })
|
|
|
+ .then(res => {
|
|
|
+ console.log("蓝信用户信息---" + JSON.stringify(res));
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$store.commit("toggleLoading", false);
|
|
|
+ });
|
|
|
+ },
|
|
|
// 蓝信API调用例子
|
|
|
lanXinTest() {
|
|
|
lx.biz.chooseContacts(
|