armg 3 روز پیش
والد
کامیت
8ed17a824b
1فایلهای تغییر یافته به همراه3 افزوده شده و 54 حذف شده
  1. 3 54
      src/utils/index.ts

+ 3 - 54
src/utils/index.ts

@@ -144,57 +144,6 @@ export const toLBHome = () => {
   }
 }
 
-
-// export const toXiaoChengxu = (appid) => {
-//   let url = window.location.href.split("#")[0];
-//   wx.ready(function () {
-//     wx.checkJsApi({
-//       jsApiList: ["agentConfig", "launchMiniprogram"], // 需要检测的JS接口列表
-//       success: function (res) {
-//         const formData = new FormData();
-//         formData.append('url', url);
-//         formData.append('agent', '1');
-//         wecomTicket(formData).then(response => {
-//           if (response.StatusCode == 200) {
-//             let yingyongData = response.Data;
-//             wx.agentConfig({
-//               corpid: yingyongData.appid, // 必填,企业微信的corpid,必须与当前登录的企业一致
-//               agentid: yingyongData.agentID, // 必填,企业微信的应用id (e.g. 1000247)
-//               timestamp: yingyongData.timestamp, // 必填,生成签名的时间戳
-//               nonceStr: yingyongData.noncestr, // 必填,生成签名的随机串
-//               signature: yingyongData.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
-//               jsApiList: ["launchMiniprogram"], //必填,传入需要使用的接口名称
-//               success: function (res) {
-//                 wx.invoke(
-//                   "launchMiniprogram",
-//                   {
-//                     appid: appid, // 需跳转的小程序appid
-//                     path: "" // 所需跳转的小程序内页面路径及参数。非必填
-//                   },
-//                   function (res) {
-//                     if (res.err_msg == "launchMiniprogram:ok") {
-//                       // 正常
-//                       console.log("正常");
-//                     } else {
-//                       // 错误处理
-//                     }
-//                   }
-//                 );
-//               },
-//               fail: function (res) {
-//                 if (res.errMsg.indexOf("function not exist") > -1) {
-//                   alert("版本过低请升级");
-//                 }
-//               }
-//             });
-//           }
-//         });
-//       }
-//     });
-//   });
-// }
-
-
 export const toXiaoChengxu = (appid) => {
   let url = window.location.href.split("#")[0];
   const formData = new FormData();
@@ -204,7 +153,7 @@ export const toXiaoChengxu = (appid) => {
     if (response.StatusCode == 200) {
       let qiyeData = response.Data;
       wx.agentConfig({
-        debug: true,
+        debug: false,
         corpid: qiyeData.appid,
         agentid: qiyeData.agentID,
         timestamp: qiyeData.timestamp,
@@ -240,7 +189,7 @@ export const toXiaoChengxu = (appid) => {
 
 // 获取微信API授权信息
 export const getWxconfig = () => {
-  // const jsApiList = ['ready', 'downloadFile', 'saveImageToPhotosAlbum', 'closeWindow', 'hideMenuItems'];
+  // const jsApiList = [ 'downloadFile', 'saveImageToPhotosAlbum', 'closeWindow', 'hideMenuItems'];
   let url = window.location.href.split("#")[0];
   const formData = new FormData();
   formData.append('url', url);
@@ -249,7 +198,7 @@ export const getWxconfig = () => {
     if (response.StatusCode == 200) {
       let qiyeData = response.Data;
       wx.agentConfig({
-        debug: true,
+        debug: false,
         corpid: qiyeData.appid,
         agentid: qiyeData.agentID,
         timestamp: qiyeData.timestamp,