index.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // index.js
  2. // 获取应用实例
  3. const app = getApp()
  4. Page({
  5. data: {
  6. swiperImgs: [
  7. './images/5.png',
  8. './images/6.png',
  9. './images/7.png',
  10. './images/1.png'
  11. ],
  12. show: true,
  13. },
  14. showPopup() {
  15. this.setData({ show: true });
  16. },
  17. onClose() {
  18. this.setData({ show: false });
  19. },
  20. CompleteInformation() {
  21. wx.navigateTo({
  22. url: '../logs/logs'
  23. })
  24. },
  25. clickBtn(e) {
  26. console.log(e);
  27. if (this.data.show) {
  28. this.setData({
  29. show: !this.data.show,
  30. caiMing: '',
  31. caiCount: '',
  32. expire: '',
  33. imagePath: '',
  34. })
  35. }
  36. },
  37. clickBtnDelete() {
  38. this.setData({
  39. show: !this.data.show,
  40. caiMing: '',
  41. caiCount: '',
  42. expire: '',
  43. imagePath: '',
  44. })
  45. },
  46. // 事件处理函数
  47. bindViewTap() {
  48. wx.navigateTo({
  49. url: '../logs/logs'
  50. })
  51. },
  52. onLoad() {
  53. if (wx.getUserProfile) {
  54. this.setData({
  55. canIUseGetUserProfile: true
  56. })
  57. }
  58. wx.setNavigationBarTitle({ title: '外卖小程序' })
  59. },
  60. })