zoukankan      html  css  js  c++  java
  • 【转】反编译微信小程序错误: $gwx is not defined和__vd_version_info__ is not defined 已解决

    修改wxappUnpacker文件中的 wuWxss.js

    function runVM(name, code) {
          // let wxAppCode = {}, handle = {cssFile: name};
          // let vm = new VM({
          //    sandbox: Object.assign(new GwxCfg(), {
          //       __wxAppCode__: wxAppCode,
          //       setCssToHead: cssRebuild.bind(handle)
          //    })
          // });
          // vm.run(code);
          // for (let name in wxAppCode) if (name.endsWith(".wxss")) {
          //    handle.cssFile = path.resolve(frameName, "..", name);
          //    wxAppCode[name]();
          // }
     
          let wxAppCode = {};
          let handle = {cssFile: name};
          let gg = new GwxCfg();
          let tsandbox = {
             $gwx: GwxCfg.prototype["$gwx"],
             __mainPageFrameReady__: GwxCfg.prototype["$gwx"],   //解决 $gwx is not defined
             __vd_version_info__: GwxCfg.prototype["$gwx"],  //解决 __vd_version_info__ is not defined
             __wxAppCode__: wxAppCode,
             setCssToHead: cssRebuild.bind(handle)
          }
     
          let vm = new VM({sandbox: tsandbox});
          vm.run(code);
          for (let name in wxAppCode) {
             if (name.endsWith(".wxss")) {
                handle.cssFile = path.resolve(frameName, "..", name);
                wxAppCode[name]();
             }
          }
       }
    

    from:https://blog.csdn.net/weixin_34342992/article/details/91383119

  • 相关阅读:
    加载与隐藏显示
    Task 自我总结认知
    修复SDF数据库引擎C#代码
    Windows防火墙开启后 ping不通了 的解决方案
    C# 串口
    WPF DataGrid中单元格运用Combobox的示例
    组合模式
    适配器模式
    【转载】.net 动态代理
    python数组操作
  • 原文地址:https://www.cnblogs.com/xuan52rock/p/11251775.html
Copyright © 2011-2022 走看看