微信 | 支付宝 | |
---|---|---|
文件名 | xx.wxml、xx.wxss、xx.json、xx.js |
xx.axml、xx.acss、xx.jso、xx.js |
事件 | bind 事件绑定不会阻止冒泡事件向上冒泡,catch事件绑定可以阻止冒泡事件向上冒泡。 |
on 事件绑定不会阻止冒泡事件向上冒泡,catch事件绑定可以阻止冒泡事件向上冒泡。 |
样式表中if for
|
wx:if wx:for |
a:if a:for |
api调用对象 | wx. eg: wx.navigateTo |
my. eg: my.navigateTo |
网络请求接口 | wx.request |
my.httpRequest |
审核 | 审核相对比较简单 | 审核比较严格,会对程序进行功能测试 |
app.json中区别
微信:
"window": {
"backgroundTextStyle": "light", //下拉背景字体
"navigationBarBackgroundColor": "#d0501f", //导航栏背景颜色
"navigationBarTitleText": "", //导航栏标题文字内容
"navigationBarTextStyle": "white", //导航栏标题文字样式
"enablePullDownRefresh": true, //是否开启下拉刷新
"onReachBottomDistance": 50 //页面上拉触底事件触发时距页面底部距离,单位为px。
},
支付宝
"window": {
"defaultTitle": "支付宝", //页面标题
"titleBarColor": "#d05021", //导航栏背景色
"pullRefresh":true, //是否允许下拉刷新 默认false
"allowsBounceVertical": yes, //页面是否支持纵向拽拉超出实际内容。默认 YES
},
微信
"tabBar": {
"selectedColor": "#d0501f", //选中字体颜色
"backgroundColor": "#fff", //背景颜色
"color": "#333", //未选中字体颜色
"list": [
{
"pagePath": "/pages/home/home", //页面路径
"text": "首页", //页面标题
"iconPath": "/pages/images/shouye@2x.png", //未选中图标
"selectedIconPath": "/pages/images/fill@2x.png" //选中图标
},
支付宝
"tabBar": {
"textColor":"#000", //未选中字体颜色
"selectedColor":"#d81e06", //选中的字体颜色
"backgroundColor":"#fff", //背景色
"items": [{
"pagePath": "pages/index/index" , //页面路径
"name": "首页", //页面标题
"icon": "pages/icon/index.png", //为选中图标
"activeIcon": "pages/icon/index_1.png" //选中图标
}
网友评论