addset.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // pages/help/rtuhelp/addSet/addSet.js
  2. var app = getApp()
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. addSet1:'',
  9. addSet2:'',
  10. addSet3:''
  11. },
  12. /**
  13. * 生命周期函数--监听页面加载
  14. */
  15. onLoad: function (options) {
  16. this.setData({
  17. addSet1:app.globalData.cloudBase + "/ts/source/img/rtu/addSet-01.jpg",
  18. addSet2:app.globalData.cloudBase + "/ts/source/img/rtu/addSet-02.jpg",
  19. addSet3:app.globalData.cloudBase + "/ts/source/img/rtu/addSet-03.jpg"
  20. })
  21. wx.setNavigationBarColor({
  22. frontColor: '#000000',
  23. backgroundColor: '#ffffff',
  24. })
  25. },
  26. /**
  27. * 生命周期函数--监听页面初次渲染完成
  28. */
  29. onReady: function () {
  30. },
  31. /**
  32. * 生命周期函数--监听页面显示
  33. */
  34. onShow: function () {
  35. },
  36. /**
  37. * 生命周期函数--监听页面隐藏
  38. */
  39. onHide: function () {
  40. },
  41. /**
  42. * 生命周期函数--监听页面卸载
  43. */
  44. onUnload: function () {
  45. },
  46. /**
  47. * 页面相关事件处理函数--监听用户下拉动作
  48. */
  49. onPullDownRefresh: function () {
  50. },
  51. /**
  52. * 页面上拉触底事件的处理函数
  53. */
  54. onReachBottom: function () {
  55. },
  56. /**
  57. * 用户点击右上角分享
  58. */
  59. onShareAppMessage: function () {
  60. },
  61. previewImg:function(e){
  62. console.log(e.currentTarget.dataset.src);
  63. let that = this;
  64. wx.previewImage({
  65. current:e.currentTarget.dataset.src, //当前图片地址
  66. urls: that.data.imgArr, //所有要预览的图片的地址集合 数组形式
  67. })
  68. }
  69. })