wxmp2antmp 是一个微信小程序转支付宝小程序的命令行工具
npm i -g wxmp2antmp
w2a 微信小程序目录 支付宝小程序目录
- 支付宝小程序中的路径解析和微信小程序中的路径解析是不同的,路径必须为相对路径,如: import a from './a',wxml中的路径会被自动处理,js 和 css 中需要自行处理。
- js 中的 wx 变量会被赋值为 my
- 微信小程序和支付宝小程序的 api 存在差异,建议自行写一套兼容库,暂无 todo 计划
打赏 | 加小助手进微信群 |
---|---|
微信小程序转支付宝小程序命令行工具
License: MIT License
感觉有点不太靠谱啊,如果需要手动修改的地方太多,那这就是个鸡肋
wxml中引号会全部转成双引号
{{order_prize<prize_show?'¥'+prize_show+'-¥'+_prize_show:'¥'+prize_show}}
这样提示错误
改成
{{order_prize < prize_show ? '¥'+prize_show+'-¥'+_prize_show : '¥'+prize_show}}
就可以了(加了空格)
看了代码,大概做法是:用parse5将wxml模版parse成dom树,然后替换成axml标签?这有什么用吗?你有测过真实的例子吗?微信的那么多接口,也没见代码中做转换啊?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.