|
|
@@ -6,64 +6,9 @@ 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: "立绘",
|
|
|
- },
|
|
|
- ],
|
|
|
+ bannerList: [],
|
|
|
+ ipInfoList: [],
|
|
|
+ prodClassList: [],
|
|
|
showAddCartModal: false,
|
|
|
currentProduct: null
|
|
|
},
|
|
|
@@ -79,15 +24,28 @@ Page({
|
|
|
handleCloseAddCartModal() {
|
|
|
this.setData({ showAddCartModal: false });
|
|
|
},
|
|
|
- methods: {
|
|
|
- onLoad: async function (options) {
|
|
|
+ onLoad: async function (options) {
|
|
|
|
|
|
- // 生命周期函数--监听页面加载
|
|
|
- console.log("onLoad");
|
|
|
- console.log('App.globalData', App.globalData);
|
|
|
+ // 生命周期函数--监听页面加载
|
|
|
+ console.log("onLoad");
|
|
|
+ console.log('App.globalData', App.globalData);
|
|
|
+
|
|
|
+ const resBanner = await API.getBanners({});
|
|
|
+ console.log('resBanner', resBanner);
|
|
|
+ this.setData({
|
|
|
+ bannerList : resBanner.bannerList
|
|
|
+ });
|
|
|
+
|
|
|
+ const resBrand = await API.getIpInfos({});
|
|
|
+ console.log('resBrand', resBrand);
|
|
|
+ this.setData({
|
|
|
+ ipInfoList : resBrand.ipInfoList
|
|
|
+ });
|
|
|
+ const resCategory = await API.getProdClasses({});
|
|
|
+ console.log('resCategory', resCategory);
|
|
|
+ this.setData({
|
|
|
+ prodClassList : resCategory.prodClassList
|
|
|
+ });
|
|
|
|
|
|
- const res = await API.getBanners({});
|
|
|
- console.log('res', res);
|
|
|
- },
|
|
|
},
|
|
|
})
|