|
@@ -4,7 +4,6 @@ import IAAEnv from "./env";
|
|
const IAA = IAAEnv.detectMiniProgramEnvironment() === 'tt' ? tt : wx
|
|
const IAA = IAAEnv.detectMiniProgramEnvironment() === 'tt' ? tt : wx
|
|
|
|
|
|
window.qcIAASdk = {
|
|
window.qcIAASdk = {
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 初始化配置
|
|
* 初始化配置
|
|
* @param {*} options
|
|
* @param {*} options
|
|
@@ -53,7 +52,7 @@ window.qcIAASdk = {
|
|
success() {
|
|
success() {
|
|
console.log("检测session_key未过期");
|
|
console.log("检测session_key未过期");
|
|
IAAApi.tokenCheck().then((res) => {
|
|
IAAApi.tokenCheck().then((res) => {
|
|
- if (res.data) {
|
|
|
|
|
|
+ if (res.data && res.data.result) {
|
|
that.startTimer()
|
|
that.startTimer()
|
|
resolve({ code: 200, data: userInfo, msg: "success", success: true });
|
|
resolve({ code: 200, data: userInfo, msg: "success", success: true });
|
|
} else {
|
|
} else {
|
|
@@ -99,14 +98,14 @@ window.qcIAASdk = {
|
|
IAA.showShareMenu(); //设置开启当前页面分享按钮
|
|
IAA.showShareMenu(); //设置开启当前页面分享按钮
|
|
return IAAApi.getShareInfo().then((res) => {
|
|
return IAAApi.getShareInfo().then((res) => {
|
|
// 设置分享信息
|
|
// 设置分享信息
|
|
- let { path, shareImg, title, query } = res.data;
|
|
|
|
- console.log("设置分享信息====>", path);
|
|
|
|
|
|
+ let { path, img, title, query } = res.data;
|
|
|
|
+ console.log("设置分享信息======================>", path);
|
|
if (IAAEnv.detectMiniProgramEnvironment() === 'wx') {
|
|
if (IAAEnv.detectMiniProgramEnvironment() === 'wx') {
|
|
wx.onShareAppMessage(() => {
|
|
wx.onShareAppMessage(() => {
|
|
return {
|
|
return {
|
|
title,
|
|
title,
|
|
path,
|
|
path,
|
|
- imageUrl: shareImg,
|
|
|
|
|
|
+ imageUrl: img,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -114,7 +113,7 @@ window.qcIAASdk = {
|
|
return {
|
|
return {
|
|
title,
|
|
title,
|
|
query,
|
|
query,
|
|
- imageUrl: shareImg,
|
|
|
|
|
|
+ imageUrl: img,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
}
|
|
}
|