后台拿数据

onLoad:function(options){

console.log(options);

that.setData{{list:res.data.items}};               //从列表页传来一个key

<view class="list" bindtap=onload News data-key="{{item.key}}">                 //拿index模板列表页中的hotapp对应的后台数据

<view class="info">

  <view class="title">

    {{item.value.title}}

</view>

onLoadNews:function(e){

//  console.log (e.currentTarget.dataset.key)                    //点击取dataset.key

wx.navigateTo({console.log(e.currentTarget.dataset.key)

url:"../description/index?key=+e.currentTarget.dataset.key,

success:function(res){

          },

          fail:function(){

          },

          complete:function(){

          }

         })

        },

原文地址:https://www.cnblogs.com/aivnfjgj/p/6344508.html