Giter Club home page Giter Club logo

wx2ali's People

Contributors

foxitdog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wx2ali's Issues

建议增加对文件引用的转换

微信小程序是require的方式引用外部文件的,支付宝这边是import方式,建议对这个进行转换。包括module.export到export default这样的转换也希望能支持一下

getStorageSync转换有问题

const userCity = wx.getStorageSync('userinfo')

应该转换为

const userCity = my.getStorageSync({key:'userCity'}).data;

现在转成了
const userCity = my.getStorageSync({key:'userCity'});缺少了data

转换完之后部分出错。

  1. page 文件夹内的*_list 会在 app.json 内的变为*_items
  2. 部分 <import src="../../wxParse/wxParse.wxml"/> 没有变成 <import src="../../wxParse/wxParse.axml"/>

wx.getStorageSync 转换出错

源代码 if (wx.getStorageSync('buyType')=='buy'){}
转换结果 if(my.getStorageSync({key:'buyType')=='group'}){}

源代码 that.setData({ id: options.id, scrollHeight: wx.getStorageSync('scrollHeight')});
转换结果 that.setData({ id: options.id, scrollHeight: my.getStorageSync({key:'scrollHeight')}})

转换出错

Parse Error: ReferenceError: Unknown plugin "transform-object-rest-spread" specified in "base" at 0, attempted to resolve relative to "/Users/levent/coding/AntProjects/MegoTest"
at /usr/local/lib/node_modules/wx2ali/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
at Array.map ()
at Function.normalisePlugins (/usr/local/lib/node_modules/wx2ali/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/usr/local/lib/node_modules/wx2ali/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/usr/local/lib/node_modules/wx2ali/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/usr/local/lib/node_modules/wx2ali/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/usr/local/lib/node_modules/wx2ali/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/usr/local/lib/node_modules/wx2ali/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at Object.module.exports.replace (/usr/local/lib/node_modules/wx2ali/lib/JSApiPropReplace.js:10:19)
at wx2ant (/usr/local/lib/node_modules/wx2ali/index.js:370:27)

缓存取值问题

如果存储的是一个简单类型,wx.getLocaStorage的返回值为一个string,而支付宝则为Object({data: '',success: true }),建议优化下,否则转换后会出现大量取值错误。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.