Github项目地址
https://github.com/dubaiyouyue/xcx

//2017.03.29
更新:
1.图片保存到本地
2.图片长按操作
3.打开远程图片
4.图片预加载
5.代码优化
index.js

index.wxml

index.wxss

源代码下载
//end 更新
旧版本:
index.js

index.wxml

GDScript3
7 行
<!--index.wxml-->
<view class="title">
  <text class="titlesize">{{title}}</text>
  <icon type="info" size="6" />
  <icon type="download" size="6" />
</view>
<view style="text-align: center;"><image mode="widthFix" class="nnnss{{imgcss}}" src="{{src}}" bindload="imgload" binderror="imgerror"></image></view>

微信小程序开发文档
在微信小程序里实现图片预加载组件

小程序运行效果

article image

Github微信小程序示例 - 小相册
微信小程序《美女图集》Demo下载(调用远程API获取图片,本地保存图片)html51.com-MeinvPic.zip