<template>
  <view class="warehouse-container">
    <status-bar :backgroundColor="'#fff'" v-if="true"></status-bar>
    <view class="shop-name"><u-icon name="home" size="18"></u-icon>{{ dashboardInfo.store_info.store_name }}</view>
    <view class="myui_card warehouse-content">
      <view class="warehouse-list">
        <view class="warehouse-item" @click="skipu('productList')">
          <view class="warehouse-item-img">
            <u--image
              src="../../static/warehouse/brand-2.png"
              :width="32"
              :height="32"
            ></u--image>
          </view>
          <view class="warehouse-item-name">商品管理</view>
        </view>
        <view class="warehouse-item" @click="skipu('specification')">
          <view class="warehouse-item-img">
            <u--image
              src="../../static/warehouse/specification.png"
              :width="32"
              :height="32"
            ></u--image>
          </view>
          <view class="warehouse-item-name">规格管理</view>
        </view>
        <view
          class="warehouse-item warehouse-item-2"
          @click="skipu('typeManagement')"
        >
          <view class="warehouse-item-img">
            <u--image
              src="../../static/warehouse/commodity-type.png"
              :width="32"
              :height="32"
            ></u--image>
          </view>
          <view class="warehouse-item-name">类型管理</view>
        </view>
        <view class="warehouse-item" @click="skipu('classifyList')">
          <view class="warehouse-item-img">
            <u--image
              src="../../static/warehouse/classify.png"
              :width="32"
              :height="32"
            ></u--image>
          </view>
          <view class="warehouse-item-name">分类管理</view>
        </view>
      </view>
      <!-- <view class="warehouse-list warehouse-list-2">
        <view class="warehouse-item" @click="skipu('brandList')">
          <view class="warehouse-item-img">
            <u--image
              src="../../static/warehouse/brand-3.png"
              :width="32"
              :height="32"
            ></u--image>
          </view>
          <view class="warehouse-item-name">品牌管理</view>
        </view>
        <view
          class="warehouse-item warehouse-item-2"
          @click="skipu('photoGallery')"
        >
          <view class="warehouse-item-img">
            <u--image
              src="../../static/warehouse/photo-gallery-1.png"
              :width="32"
              :height="32"
            ></u--image>
          </view>
          <view class="warehouse-item-name">商品图库</view>
        </view>
      </view> -->
    </view>
    <tabbar tabbarName="warehouse"></tabbar>
  </view>
</template>

<script>
import tabbar from "@/components/tabbar/tabbar.vue";
import statusBar from "@/components/status-bar.vue";
import { GetAccountDashboard } from "../../api/user";
import { mapState } from "vuex";
export default {
  name: "warehouse",
  components: {
    statusBar,
    tabbar,
  },
  data() {
    return {
      dashboardInfo: {
        store_info: {
          store_name: "",
        },
      },
    };
  },
  computed: {},
  onReady() {},
  onShow() {
    this.getAccountDashboard();
  },

  mounted() {},
  methods: {
    async getAccountDashboard() {
      let res = await GetAccountDashboard();

      if (res && res.status == 200) {
        this.dashboardInfo = res.data;
      }
    },
    skipu(url) {
      uni.navigateTo({
        url: `/pages/warehouse/manage/${url}`,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
@import "@/styles/variables.scss";
.warehouse-container {
  height: calc(100vh - 120rpx);

  .shop-name {
    display: flex;
    align-items: center;
    gap: 10rpx;
    padding: 20rpx;
    font-size: 32rpx;
    background: #fff;
  }

  .warehouse-content {
    margin: 32rpx;

    .warehouse-list {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 10rpx;

      .warehouse-item {
        display: flex;
        flex-flow: column;
        align-items: center;

        .warehouse-item-img {
          margin-bottom: 10rpx;
        }
        .warehouse-item-name{
          font-size: 24rpx;
        }
      }
    }

    .warehouse-list-2 {
      margin-top: 40rpx;
      justify-content: flex-start;

      .warehouse-item-2 {
        margin-left: 48rpx;
      }
    }
  }
}
</style>
