123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- const util = require('../../utils/util.js');
- const api = require('../../config/api.js');
- const user = require('../../services/user.js');
- const app = getApp()
- Page({
- data: {
- banner: [],
- channel: [],
- indexGoods: []
-
-
-
-
-
-
-
- },
- onShareAppMessage: function () {
- return {
- title: '古早交易平台',
- desc: '一款开源仿闲鱼交易平台!',
- path: '/pages/index/index'
- }
- },
- getIndexData: function () {
- let that = this;
- util.request(api.IndexUrl).then(function (res) {
- console.log(res.data)
-
-
- if (res.errno === 0) {
- that.setData({
-
-
-
-
-
- indexGoods: res.data.indexGoodsList,
- banner: res.data.banner,
- channel: res.data.channel
- });
- }
- });
- },
- onLoad: function (options) {
- this.getIndexData();
- },
- onReady: function () {
-
- },
- onShow: function () {
-
- },
- onHide: function () {
-
- },
- onUnload: function () {
-
- },
- })
|