支付宝小程序支持id写法

#Test{background: #000}

<view ></view>

带参数跳转

catchTap,ontap
<view class="li-text {{nav[0].style}}" data-hi="Alipay" onTap="urlH">
 
urlH:function(e){
console.log(e);
},
 
页面跳转(导航栏):navigateTo,
url:function(url){
    my.navigateTo({
      url:url
    })
  },

 

 
远程获取数据 httpRequest
my.httpRequest({
  url: 'http://httpbin.org/post',
  method: 'POST',
  data: {
    from: '支付宝',
    production: 'AlipayJSAPI',
  },
  dataType: 'json',
  success: function(res) {
    my.alert({content: 'success'});
  },
  fail: function(res) {
    my.alert({content: 'fail'});
  },
  complete: function(res) {
    my.hideLoading();
    my.alert({content: 'complete'});
  }
});

 

 
 
缓存
 

相关文章:

  • 2021-06-27
  • 2021-07-09
  • 2021-12-29
  • 2021-10-07
  • 2021-11-22
  • 2021-06-12
  • 2021-06-01
  • 2021-06-17
猜你喜欢
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案