| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- // index.js
- const { API } = require('../../service/api.js');
- const App = getApp();
- Page({
- data: {
- brandList: [
- {
- name: "全部IP",
- },
- {
- name: "火影忍者",
- },
- {
- name: "原神",
- },
- {
- name: "柯南",
- },
- {
- name: "非人哉",
- },
- {
- name: "海贼王",
- },
- {
- name: "初音",
- },
- {
- name: "千与千寻",
- },
- {
- name: "樱木花道",
- },
- {
- name: "原神",
- },
- ],
- categoryList: [
- {
- name: "立绘",
- },
- {
- name: "立绘",
- },
- {
- name: "立绘",
- },
- {
- name: "立绘",
- },
- {
- name: "立绘",
- },
- {
- name: "立绘",
- },
- {
- name: "立绘",
- },
- {
- name: "立绘",
- },
- ],
- showAddCartModal: false,
- currentProduct: null
- },
- // 显示商品属性模态框
- showAddCartModal(e) {
- const product = e.detail;
- this.setData({
- showAddCartModal: true,
- currentProduct:product
- });
- },
- // 关闭商品属性模态框
- handleCloseAddCartModal() {
- this.setData({ showAddCartModal: false });
- },
- methods: {
- onLoad: async function (options) {
- // 生命周期函数--监听页面加载
- console.log("onLoad");
- console.log('App.globalData', App.globalData);
- const res = await API.getBanners({});
- console.log('res', res);
- },
- },
- })
|