<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="https://www.thymeleaf.org ">
<head>
    <title>采美365网-中国美业全方位线上交易服务互动平台，做美业，上采美</title>
    <template th:replace="components/head-link"></template>
    <link th:href="@{/css/base/center.css(v=${version})}" rel="stylesheet" type="text/css">
    <link th:href="@{/css/user-center/dashboard.css(v=${version})}" rel="stylesheet" type="text/css">
</head>
<body>
<!-- 引用头部 -->
<template th:replace="components/header"></template>

<!-- 我的采美 -->
<div id="dashboard">
    <div class="navLayout" v-cloak>
        <div v-if="isPC" class="crumbs">
            <span>我的采美</span>
        </div>
        <div class="wrap clear">
            <!--左侧导航-->
            <template th:replace="user-center/components/tableft"></template>
            <div class="right">
                <div class="user-header">
                    <div class="header-ml">
                        <div class="logo">
                            <input ref="clubUseLogo"  class="logo-file" type="file" accept="image/png,image/jpeg,image/gif,image/jpg"  @change="uploadUserPuploadAvatar">
                            <i class="file" v-if="userInfo.image == null"></i>
                            <img v-else :src="userInfo.image == null ? '' : userInfo.image" alt="">
                        </div>
                        <div class="account">
                            <div class="name"><span>{{userInfo.name}}</span><a href="/" v-if="userInfo.userIdentity === 4">去升级会员机构</a></div>
                            <div class="msg"><span>资料完整度:<em class="red">{{degree}}</em></span><a href="/user/setting/information.html">立即完善</a></div>
                        </div>
                    </div>
                    <div class="header-mr">
                        <div class="message">
                            <a href="/user/message/list.html">
                                <i class="icon mIcon">
                                    <span  v-if="unReadMessageCount>0" :class="[unReadMessageCount < 10 ? 'circular':'ellipse']">{{unReadMessageCount == 99 ? '99+' : unReadMessageCount}}</span>
                                </i>
                            </a>
                        </div>
                        <div class="money">余额: <span>{{toFixedFn(userInfo.ableUserMoney)}}</span> 元</div>
                    </div>
                </div>
                <div class="user-content clear">
                    <div class="title">我的订单</div>
                    <div class="section">
                        <div class="user-main tabs">
                            <div class="tabs-left">
                                <div class="item">
                                    <a href="javascript:void(0);" @click="orderListPath(1)">
                                        <i class="icon mIcon icon-1">
                                            <span v-if="confirmedCount>0" :class="[confirmedCount < 10 ? 'circular':'ellipse']">{{confirmedCount == 99 ? '99+' : confirmedCount}}</span>
                                        </i>
                                        <p>待确认</p>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="javascript:void(0);" @click="orderListPath(2)">
                                        <i class="icon mIcon icon-2">
                                            <span v-if="paymentCount>0" :class="[paymentCount < 10 ? 'circular':'ellipse']">{{paymentCount == 99 ? '99+' : paymentCount}}</span>
                                        </i>
                                        <p>待付款</p>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="javascript:void(0);" @click="orderListPath(3)">
                                        <i class="icon mIcon icon-3">
                                            <span v-if="waitShipmentsCount>0" :class="[waitShipmentsCount < 10 ? 'circular':'ellipse']">{{waitShipmentsCount == 99 ? '99+' : waitShipmentsCount}}</span>
                                        </i>
                                        <p>待发货</p>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="javascript:void(0);" @click="orderListPath(4)">
                                        <i class="icon mIcon icon-4">
                                            <span v-if="shipmentsCount>0" :class="[shipmentsCount < 10 ? 'circular':'ellipse']">{{shipmentsCount == 99 ? '99+' : shipmentsCount}}</span>
                                        </i>
                                        <p>已发货</p>
                                    </a>
                                </div>
                                <div class="item">
                                    <a href="javascript:void(0);" @click="orderListPath(5)">
                                        <i class="icon mIcon icon-5">
                                            <span v-if="salesReturnCount>0" :class="[salesReturnCount < 10 ? 'circular':'ellipse']">{{salesReturnCount == 99 ? '99+' : salesReturnCount}}</span>
                                        </i>
                                        <p>退货/款</p>
                                    </a>
                                </div>
                            </div>
                            <div class="tabs-right"><a href="javascript:void(0);" @click="orderListPath(0)">全部订单<span class="icon mIcon"></span></a></div>
                        </div>
                    </div>
                </div>
                <div class="user-content">
                    <div class="title">今日推荐</div>
                    <div class="section">
                        <div class="user-main product">
                            <a class="product-item" v-for="(item, index) in productList" :key="index" :href="item.link" target="_blank">
                                <div class="product-img">
                                    <img :src="item.image" :alt="item.title">
                                </div>
                                <div class="product-name"><p>{{item.title}}</p></div>
                            </a>
                        </div>
                    </div>
                </div>
                <div class="user-content">
                    <div class="title">最新动态<a href="/info/center-3-1.html" target="_blank">全部动态<i class="icon mIcon"></i></a></div>
                    <div class="section">
                        <div class="user-main news">
                            <a class="new-list" v-for="(item, index) in newsList" :key="index" :href="item.link" target="_blank">
                                <p class="text">{{item.title}}</p>
                                <p class="time">{{item.addTime}}</p>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--loading-->
    <div v-else class="loading">
        <img src="/img/base/loading.gif">
    </div>
</div>

<!-- 引入底部 -->
<template th:replace="components/footer"></template>
<template th:replace="components/foot-link"></template>
<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/user.service.js(v=${version})}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/user-center/dashboard.js(v=${version})}"></script>
</body>
</html>
