var app = getApp();
var $ = require('../../../js/util.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    info: [],
    other: [],
    user: [],
    param: {
    },
    header_img: '/images/header_1.jpg',
    is_true:0,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getIndex();
  },
  onShow:function(){
    this.getIndex();
  },
  getIndex: function () {
    var self = this;
    var action = 'c=LittleShop&a=index';
    app.showLoading('加载中...');
    app.ajaxRequest(action, 'GET', '', function (ret) {
      // console.log(ret); console.log('2--------');
      if (ret.status == 1 && ret.data.info) {
        self.setData({
          info: ret.data.info,
          is_true:1,
        });
        if (ret.data.info.logo){
          self.setData({header_img: ret.data.info.logo,});
        }
      }
    }, true);
  },
  //我的订单
  go_order:function(){
    app.HCnavigateTo('../order/order');
  },
  //店铺装修
  go_fixup:function(){
    app.HCnavigateTo('../editinfo/editinfo');
  },
  //商品管理
  go_goods:function(){
    app.HCnavigateTo('../my_goods_up/my_goods_up');
   
  },
  //我的小店
  go_myshop:function(){
    app.HCswitchTab('../../../pages/choice_list/choice_list');
  },
})