|
@@ -92,7 +92,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.initFun();
|
|
|
- this.lanXinTest();
|
|
|
+ this.getLanXinSignature();
|
|
|
},
|
|
|
watch: {
|
|
|
// 监听:首页切换tab的下标
|
|
@@ -204,11 +204,45 @@ export default {
|
|
|
this.$store.commit("toggleLoading", false);
|
|
|
});
|
|
|
},
|
|
|
+ // 获取蓝信签名和鉴权
|
|
|
+ getLanXinSignature() {
|
|
|
+ this.$store.commit("toggleLoading", true);
|
|
|
+ let params = {
|
|
|
+ url: this.$route.fullPath
|
|
|
+ };
|
|
|
+ this.$_http
|
|
|
+ .get(this.$_API.JTXT_GET_LAN_XIN_SIGNATURE, { params })
|
|
|
+ .then(res => {
|
|
|
+ console.log("蓝信签名---" + JSON.stringify(res));
|
|
|
+ lx.config({
|
|
|
+ appId: process.env.VUE_APP_LANXIN_APPID,
|
|
|
+ timestamp: res.data.timestamp,
|
|
|
+ nonceStr: res.data.noncestr,
|
|
|
+ signature: res.data.signature
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$store.commit("toggleLoading", false);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 蓝信API调用例子
|
|
|
lanXinTest() {
|
|
|
- console.log(JSON.stringify(lx));
|
|
|
- lx.biz.getAuthCode({
|
|
|
- appId: "String"
|
|
|
- });
|
|
|
+ lx.biz.chooseContacts(
|
|
|
+ {
|
|
|
+ title: "选择人员", // 选择窗体标题
|
|
|
+ multiple: true, // 是否允许多选
|
|
|
+ type: ["friend", "staff", "sector"], // 选择人员窗体tab选项卡类型,friend 好友,staff 组织人员, sector 组织部门
|
|
|
+ canChooseExternal: false, // 是否可以选择跨组织的外部人员
|
|
|
+ max: 10, // 可选最大数量,当允许多选时生效,默认根据当前组织云控配置
|
|
|
+ maxTip: "最多选择10人", // 选择数量超出最大限制提示
|
|
|
+ existentStaffs: [], // 已选择的人员staffId列表
|
|
|
+ existentSectors: [], // 已选择的部门sectorId列表
|
|
|
+ requiredStaffs: [], // 默认选中的人员staffId列表,不可取消选中
|
|
|
+ selectGroupMembers: false // 是否默认选中群成员,仅在群入口生效,默认false
|
|
|
+ },
|
|
|
+ success => {},
|
|
|
+ fail => {}
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
};
|