妹纸图:微信API打开图片长按保存图片实例.rar

上传者: 39840515 | 上传时间: 2022-08-16 03:39:28 | 文件大小: 8.88MB | 文件类型: RAR
妹纸图:微信API打开图片长按保存图片实例,定义几个数组用来存取item中的数据,主要是引入utils包下的js文件,将获得的各种数据写入itemList,用于setData,绑定接口中返回的数据,保存图片请参见以下代码:
  function saveImage(mUrl) {
  that.setData({
   hidden: false,
   toastHidden: true,
   modalHidden: true,
   loadingText: "下载中..."
  });
  wx.downloadFile({
   url: mUrl,
   type: 'image',
   success: function (res) {
   console.log("download success");
   that.setData({
   hidden: true,
   toastHidden: false,
   toastText: "恭喜你,图片保存成功"
   });
   },
   fail: function (res) {
   console.log("download fail");
   that.setData({
   hidden: true,
   toastHidden: false,
   toastText: "保存失败,请稍后再试"
   });
   },
   complete: function (res) {
   console.log("download complete");
   }
  })
  }

文件下载

资源详情

[{"title":"( 18 个子文件 8.88MB ) 妹纸图:微信API打开图片长按保存图片实例.rar","children":[{"title":"srcfans.com","children":[{"title":"WeChatMeiZhi-master","children":[{"title":"README.md <span style='color:#111;'> 398B </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"util.js <span style='color:#111;'> 473B </span>","children":null,"spread":false},{"title":"constant.js <span style='color:#111;'> 234B </span>","children":null,"spread":false}],"spread":true},{"title":"app.wxss <span style='color:#111;'> 15B </span>","children":null,"spread":false},{"title":"project.config.json <span style='color:#111;'> 448B </span>","children":null,"spread":false},{"title":"screenshots","children":[{"title":"meizhi04.png <span style='color:#111;'> 111.72KB </span>","children":null,"spread":false},{"title":"meizhi03.png <span style='color:#111;'> 187.93KB </span>","children":null,"spread":false},{"title":"meizhi01.png <span style='color:#111;'> 282.03KB </span>","children":null,"spread":false},{"title":"meizhi02.png <span style='color:#111;'> 188.34KB </span>","children":null,"spread":false},{"title":"meizhi.gif <span style='color:#111;'> 8.16MB </span>","children":null,"spread":false}],"spread":true},{"title":"app.js <span style='color:#111;'> 719B </span>","children":null,"spread":false},{"title":"pages","children":[{"title":"image","children":[{"title":"image.wxss <span style='color:#111;'> 175B </span>","children":null,"spread":false},{"title":"image.js <span style='color:#111;'> 1.93KB </span>","children":null,"spread":false},{"title":"image.wxml <span style='color:#111;'> 502B </span>","children":null,"spread":false}],"spread":true},{"title":"index","children":[{"title":"index.wxml <span style='color:#111;'> 283B </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 2.42KB </span>","children":null,"spread":false},{"title":"index.wxss <span style='color:#111;'> 440B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"app.json <span style='color:#111;'> 245B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明