所属栏目:发布日期:2018-11-14 09:04浏览量:2948作者:admin
小程序:
1. 小程序中的组件使用:
1.1 view组件-块元素
1.2 swiper 轮播图组件等;
1.3 navigateTo 链接跳转(只能打开非tabBar页面);
1.4 redirectTo 链接跳转 配合bindtap绑定事件 wx.reLaunch功能建立function
2. for数据循环输出页面
2.1
{{变量名.字段名}}
3.文件引用:
3.1 import:
3.2 include:
4. 小程序接口格式:
var that = this;
wx.request({
url: 'http://18.0731pgy.com/Api.php/Case/case_detail?id=' + options.id + '&cid=' + options.cid,
header: {'content-type': 'application/json'}, // 默认值
success(res) {
console.log(res);
});
)}
5. js页面data值设置:
5.1 data:{
arr:[
{索引:值},
{索引:值},
{索引:值}
], //数组格式
lists:’123’ // 普通格式
}