index.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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: false,
  13. showCard: false,
  14. },
  15. showPopup() {
  16. this.setData({ show: true });
  17. },
  18. goSerch(){
  19. wx.navigateTo({
  20. url: '../serch-outcome/serch-outcome',
  21. })
  22. },
  23. onClose() {
  24. this.setData({ show: false });
  25. },
  26. CompleteInformation() {
  27. wx.navigateTo({
  28. url: '../new/new'
  29. })
  30. this.setData({
  31. show: !this.data.show,
  32. });
  33. },
  34. clickBtn(e) {
  35. console.log(e);
  36. if (this.data.showCard) {
  37. if (this.data.show) {
  38. this.setData({
  39. show: !this.data.show,
  40. showCard:!this.data.showCard,
  41. caiMing: "",
  42. caiCount: "",
  43. expire: "",
  44. imagePath: "",
  45. });
  46. }
  47. }
  48. },
  49. clickBtnDelete() {
  50. this.setData({
  51. show: !this.data.show,
  52. caiMing: "",
  53. caiCount: "",
  54. expire: "",
  55. imagePath: "",
  56. showCard: !this.data.showCard,
  57. });
  58. },
  59. // 事件处理函数
  60. bindViewTap() {
  61. wx.navigateTo({
  62. url: "../logs/logs",
  63. });
  64. },
  65. onLoad() {
  66. if (wx.getUserProfile) {
  67. this.setData({
  68. canIUseGetUserProfile: true,
  69. });
  70. }
  71. wx.setNavigationBarTitle({ title: "外卖小程序" });
  72. },
  73. });