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