const app = getApp(); Page({ data: { CustomBar: app.globalData.CustomBar, // 通知栏 tips: [ { key: 1, value: "一二三111122221112211222111222111122221112211222111222" }, { key: 2, value: "四五六" }, { key: 3, value: "七八九" } ], // 商品 value: [ { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: "Only the guilty need fear me." }, { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "暗裔剑魔", detail: "我必须连同希望一起毁坏……" }, { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: " Only the guilty need fear me." }, { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: " Only the guilty need fear me." }, { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: " Only the guilty need fear me." }, { img: "https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg", title: "钢铁之翼", detail: " Only the guilty need fear me." }, ] }, // 通知栏 tipsFunc (e) { let { index } = e.currentTarget.dataset, { tips } = this.data; console.log(tips[index]) }, onLoad: async function (options) { try { let res = await wx.$request({ method: "get", url: "/order/productDict/" }); console.log(res) } catch (err) { wx.$err(err) } }, onReady: function () { }, onShow: function () { }, onHide: function () { }, onUnload: function () { }, onPullDownRefresh: function () { }, onReachBottom: function () { }, onShareAppMessage: function () { } })