|
|
@@ -163,7 +163,7 @@ export const toXiaoChengxu = async (appid) => {
|
|
|
wx.checkJsApi({
|
|
|
jsApiList: ["launchMiniprogram"],
|
|
|
success: function (res) {
|
|
|
- // console.log("checkJsApi结果:", res);
|
|
|
+ console.log("checkJsApi结果:", res);
|
|
|
// 检查接口是否真的可用
|
|
|
if (res.checkResult.launchMiniprogram !== true) {
|
|
|
reject(new Error("当前环境不支持launchMiniprogram接口,请确认企业微信版本和应用权限"));
|
|
|
@@ -209,7 +209,7 @@ export const getWxconfig = () => {
|
|
|
if (isAgentConfigSuccess) {
|
|
|
return;
|
|
|
}
|
|
|
- const jsApiList = ['getSetting', 'authorize', 'showModal', 'openSetting', 'downloadFile', 'saveImageToPhotosAlbum', 'closeWindow', 'hideMenuItems', 'launchMiniprogram'];
|
|
|
+ const jsApiList = ['downloadFile', 'saveImageToPhotosAlbum', 'closeWindow', 'hideMenuItems', 'launchMiniprogram'];
|
|
|
let url = window.location.href.split("#")[0];
|
|
|
const formData = new FormData();
|
|
|
formData.append('url', url);
|
|
|
@@ -235,22 +235,18 @@ export const getWxconfig = () => {
|
|
|
isAgentConfigSuccess = true; // 标记配置成功
|
|
|
wx.hideMenuItems({
|
|
|
menuList: [
|
|
|
- "menuItem:share:appMessage", // 转发给朋友/同事
|
|
|
"menuItem:share:wechat",
|
|
|
"menuItem:openWithBrowser",
|
|
|
"menuItem:share:email", // 通过邮件转发
|
|
|
"menuItem:copyUrl",
|
|
|
"menuItem:share:wechat_friend",
|
|
|
- "menuItem:share:timeline",
|
|
|
- "menuItem:openWithBrowser", // PC端浏览器打开
|
|
|
- "menuItem:openWithSafari", // 移动端iOS
|
|
|
- "menuItem:openWithChrome" // 移动端Android
|
|
|
+ "menuItem:share:timeline"
|
|
|
],
|
|
|
success: () => {
|
|
|
- // console.log('菜单隐藏成功');
|
|
|
+ console.log('菜单隐藏成功');
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
- // console.log('菜单隐藏失败:', err);
|
|
|
+ console.log('菜单隐藏失败:', err);
|
|
|
}
|
|
|
});
|
|
|
},
|