Commit 8d35ac73 by 胡悦

Merge branch 'kuangyq_v2.10.0' of http://192.168.3.233:8090/saas/mini-program/ai…

…-card into kuangyq_v2.10.0
2 parents b2c36a0e 910a011e
import api from './request'
import ssoApi from './ssoApi'
import wechantApi from './wechantApi'
import entmicroApi from './entmicroApi'
const common = 'scrm.api.carlife.common.'
module.exports = {
ssoApi,
entmicroApi,
wechantApi,
commonApi: {
/**上传图片
......
import api from "./request";
module.exports = {
// 智能名片详情
getCardDetail(data) {
return api.post(
{
method: `entmicro.api.business.card.cardDetail`,
...data,
},
true
);
},
}
\ No newline at end of file
const target = [
'ip',
'dev',
'uat',
'prod'
]
const target = ["ip", "dev", "uat", "prod"];
/**
*
0本地
......@@ -11,35 +6,35 @@ const target = [
2测试
3生产
*/
const index = 2
const index = 1;
const secretKey = {
ip: {},
dev: {
sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
}
appKey: "8b31ae1009ccb0f96130ca4bd90e3d89",
secret: "02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b",
},
},
uat: {
sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
}
appKey: "8b31ae1009ccb0f96130ca4bd90e3d89",
secret: "02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b",
},
},
prod: {
sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
}
appKey: "8b31ae1009ccb0f96130ca4bd90e3d89",
secret: "02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b",
},
},
} [target[index]]
}[target[index]];
const domain = {
ip: 'http://192.168.3.181:8394',
dev: 'https://scrm.dev.glsx.com.cn',
uat: 'https://scrm.test.glsx.com.cn',
prod: 'https://scrm.glsx.com.cn',
} [target[index]]
ip: "http://192.168.3.181:8394",
dev: "https://scrm.dev.glsx.com.cn",
uat: "https://scrm.test.glsx.com.cn",
prod: "https://scrm.glsx.com.cn",
}[target[index]];
const pathEnum = {
sso: '/rop-scrm-sso/',
......@@ -51,4 +46,4 @@ module.exports = {
domain,
pathEnum,
secretKey,
}
\ No newline at end of file
};
......@@ -7,8 +7,9 @@
*/
// pages/tab/index/index.js
import { menuMixin } from "../../../mixins/index";
import Draw from '../../../utils/Draw';
import { ssoApi } from '../../../api/api';
import Draw from "../../../utils/Draw";
import { ssoApi, entmicroApi } from "../../../api/api";
import util from "../../../utils/util";
import {trackData} from '../../../utils/data'
Page({
behaviors: [menuMixin],
......@@ -72,14 +73,16 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// getApp().login().then(res => {
// console.log(res)
// if(res.data && res.data.nickName) {
// this.setData({
// hasUserInfo: true
// })
// }
// })
console.log(this.data.hasUserInfo);
// 获取员工名片信息
const sessionId = util.getSessionId();
let params = {};
params.cardId = 21;
params.sessionId = sessionId;
console.log(params, "+++");
// entmicroApi.getCardDetail(params).then((res) => {
// console.log(res);
// });
},
/**
......@@ -255,9 +258,8 @@ Page({
// 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: '用于完善资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
console.log(res)
console.log(this.data.hasUserInfo)
ssoApi.authUserInfo({
...res
......@@ -277,5 +279,5 @@ Page({
})
}
})
},
});
}
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!