index.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. const app = getApp();
  2. Page({
  3. data: {
  4. CustomBar: app.globalData.CustomBar,
  5. // 通知栏
  6. tips: [
  7. { key: 1, value: "一二三111122221112211222111222111122221112211222111222" },
  8. { key: 2, value: "四五六" },
  9. { key: 3, value: "七八九" }
  10. ],
  11. // 商品
  12. value: [
  13. { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: "Only the guilty need fear me." },
  14. { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "暗裔剑魔", detail: "我必须连同希望一起毁坏……" },
  15. { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: " Only the guilty need fear me." },
  16. { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: " Only the guilty need fear me." },
  17. { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: " Only the guilty need fear me." },
  18. { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: " Only the guilty need fear me." },
  19. ]
  20. },
  21. // 通知栏
  22. tipsFunc (e) {
  23. let { index } = e.currentTarget.dataset, { tips } = this.data;
  24. console.log(tips[index])
  25. },
  26. onLoad: async function (options) {
  27. try {
  28. let res = await wx.$request({ method: "get", url: "/order/productDict/" });
  29. console.log(res)
  30. } catch (err) { wx.$err(err) }
  31. },
  32. onReady: function () {
  33. },
  34. onShow: function () {
  35. },
  36. onHide: function () {
  37. },
  38. onUnload: function () {
  39. },
  40. onPullDownRefresh: function () {
  41. },
  42. onReachBottom: function () {
  43. },
  44. onShareAppMessage: function () {
  45. }
  46. })