index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // index.js
  2. // 获取应用实例
  3. const app = getApp()
  4. Page({
  5. data: {
  6. swiperImgs: [
  7. 'https://img.zcool.cn/community/0124335d234357a801207640051686.jpg@1280w_1l_2o_100sh.jpg',
  8. 'https://img.zcool.cn/community/01bac95d233e81a80121376323538b.jpg@1280w_1l_2o_100sh.jpg',
  9. 'https://img.zcool.cn/community/01731a5d234357a801213763876d7f.jpg@1280w_1l_2o_100sh.jpg',
  10. './images/1.png'
  11. ],
  12. show: true,
  13. },
  14. clickBtn(e) {
  15. console.log(e);
  16. if(this.data.show){
  17. this.setData({
  18. show: !this.data.show,
  19. caiMing: '',
  20. caiCount: '',
  21. expire: '',
  22. imagePath: '',
  23. })
  24. }
  25. },
  26. clickBtnDelete() {
  27. this.setData({
  28. show: !this.data.show,
  29. caiMing: '',
  30. caiCount: '',
  31. expire: '',
  32. imagePath: '',
  33. })
  34. },
  35. // 事件处理函数
  36. bindViewTap() {
  37. wx.navigateTo({
  38. url: '../logs/logs'
  39. })
  40. },
  41. onLoad() {
  42. if (wx.getUserProfile) {
  43. this.setData({
  44. canIUseGetUserProfile: true
  45. })
  46. }
  47. wx.setNavigationBarTitle({ title: '外卖小程序' })
  48. },
  49. })