• 微信小程序


    简易教程  https://mp.weixin.qq.com/debug/wxadoc/dev/
    
    框架(路由)  https://mp.weixin.qq.com/debug/wxadoc/dev/framework/performance.html
    
    api(接口)
    https://mp.weixin.qq.com/debug/wxadoc/dev/api/api-map.html#wxcreatemapcontextmapid
    
    前端组件
    https://mp.weixin.qq.com/debug/wxadoc/dev/component/video.html
    
    ------------------

    var app = getApp() Page({ data: { motto: 'Hello World', userInfo: {} }, //事件处理函数 bindViewTap: function() { wx.navigateTo({ url: '../logs/logs' }) }, onLoad: function () { console.log('onLoad') var that = this //调用应用实例的方法获取全局数据 app.getUserInfo(function(userInfo){ console.dir(userInfo); //更新数据 that.setData({ userInfo:userInfo }) }) } }) -------------------------- 试图 <view class="container"> <view bindtap="bindViewTap" class="userinfo"> <image class="userinfo-avatar" src="{{userInfo.avatarUrl}}" background-size="cover"></image> <text class="userinfo-nickname">{{userInfo.nickName}}</text> </view> <view class="usermotto"> <text class="user-motto">{{motto}}</text> </view> </view> ---------------------------------------------- data: { //相当于 display bindViewTap: function() { //相当于类方法 onLoad: function () { //相当于构造函数 bindtap="bindViewTap" //相当于页面上调用方法的a链接 action="{:U('news/add')}" bindViewTap: function() { wx.navigateTo({ //指定链接跳转地址
    发送请求
    wx.request({
      url: 'test.php', //仅为示例,并非真实的接口地址
      data: {
         x: '' ,
         y: ''
      },
      header: {
          'content-type': 'application/json'
      },
      success: function(res) {
        console.log(res.data)
      }
    })

     
  • 相关阅读:
    MongoCola Web化
    Qsys在系统集成中的应用
    js浏览器和浏览器插件检测的方法总结
    搭建一个简单的Struts2应用
    Moon.ORM最便捷轻盈的ORM
    如何从 Winform 移植到 Webform [自己搞定HTTP协议]
    细细品味Hadoop_Hadoop集群(目录)
    微软SQL Server 2012新特性Silverlight报表客户端 Power View
    json入门实例
    项目经理
  • 原文地址:https://www.cnblogs.com/suxiaolong/p/6882184.html
Copyright © 2020-2023  润新知