armg преди 3 седмици
родител
ревизия
5e0497dd9e
променени са 1 файла, в които са добавени 2 реда и са изтрити 53 реда
  1. 2 53
      src/views/AIDesign/design.vue

+ 2 - 53
src/views/AIDesign/design.vue

@@ -381,7 +381,7 @@ import { Component, Vue } from "vue-property-decorator";
 import { CreateDesign, GetEntity, GetReadState, UpdateReadState, GetProjectlist, GetDictList } from "@/api/indexAI";
 import { ImagePreview, Popover } from 'vant';
 import { Dialog } from 'vant';
-import { getWecomType, toLBHome } from '@/utils/index';
+import { getWecomType, toLBHome ,toXiaoChengxu } from '@/utils/index';
 declare let wx: any;
 import axios from "axios";
 
@@ -1099,7 +1099,7 @@ export default class extends Vue {
 
   //跳转小程序
   private toXiaoCX() {
-    this.toXiaoChengxu(`${process.env.VUE_APP_BASE_DISID6}`);
+    toXiaoChengxu(`${process.env.VUE_APP_BASE_DISID6}`);
   }
 
   //跳转项目报备链接
@@ -1210,57 +1210,6 @@ export default class extends Vue {
     // }
   }
 
-  //跳转微信小程序
-  toXiaoChengxu(appid) {
-    let url = window.location.href.split("#")[0];
-    wx.ready(function () {
-      wx.checkJsApi({
-        jsApiList: ["agentConfig", "launchMiniprogram"], // 需要检测的JS接口列表
-        success: function (res) {
-          axios.get(`${process.env.VUE_APP_BASE_API}standard/aidesign/wecom/auth`, {
-            params: {
-              url: url,
-              agent: 1
-            }
-          }).then(response => {
-            if (response.status == 200) {
-              let yingyongData = response.data.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("版本过低请升级");
-                  }
-                }
-              });
-            }
-          });
-        }
-      });
-    });
-  }
 }
 </script>
 <style>