做过微信小程序的伙伴都知道,当我们需要实现一个小程序中类似于新闻资讯的功能时,需要我们调用一个外部实时更新的新闻数据接口,从而将数据展示在我们的手机页面上。那么我们该如何实现这个功能呢?下面我们来实现一下:
新闻列表wxml:
<view class="read" wx:for="{
{readList}}" wx:key="{
{index}}">
<image src='{
{item.img_url}}' class='news-img'></image>
<view class='read-info'>
<view class='news-title' bindtap='titleComment' data-newsid="{
{item.id}}">{
{item.title}}</view>
<view class='vin'>
<text class='content&#
版权声明:本文为qq_44538331原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。