index.js 1.2 KB

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