Administrator 4 vuotta sitten
vanhempi
commit
3b595f624e

+ 179 - 0
src/main/resources/static/css/supplier-center/dashboard.css

@@ -0,0 +1,179 @@
+/*左侧导航*/
+.left {
+    float: left;
+    width: 200px;
+    line-height: 50px;
+    white-space: nowrap;
+    text-indent: 16px;
+    font-size: 16px;
+    background: #FFF;
+}
+#dashboard.left .title{color:#22272e;font-weight:bold;border-bottom:1px solid #f5f5f5}
+ .navList .tab{display:block;color:#22272e;position:relative}
+ .navList .tab:before{content:'\276F';font-weight:normal;position:absolute;right:10px;top:0;transform:rotate(90deg);width:32px;height:32px;line-height:32px;text-align:center;color:#bec2c9}
+ .navList .con{position:relative;}
+ .navList .con:before,.navLayout .navList .con:after{content:'';position:absolute;width:168px;border-top:1px solid #f5f5f5;left:16px}
+ .navList .con:before{top:0}
+ .navList .con:after{bottom:0}
+ .navList .con a{display:block;font-size:14px;color:#627386;text-indent:32px}
+ .navList.on .tab:before{top:18px;transform:rotate(270deg);color:#e15616}
+ .navList.on .tab{color:#e15616}
+ .navList .con a.on{color:#e15616;background-color:#ffe6dc}
+ .right{float:right;width:968px}
+.pageContent{background:#FFF;padding:16px}
+.pageContent form{
+    width: 498px;
+    margin: 0 auto;
+    padding: 50px 0;
+}
+.right{
+    float: right;
+    width: 968px;
+}
+
+
+/**/
+#dashboard li{
+    list-style: none;
+}
+.information{
+    background: #fff;
+    padding: 20px;
+    overflow: hidden;
+    box-shadow: 0px 3px 6px 0px
+		rgba(0, 0, 0, 0.07);
+}
+.head{
+    width: 112px;
+	height: 80px;
+	border-radius: 2px;
+	border: solid 1px #f5f5f5;
+	float: left;
+    margin-right: 10px;
+}
+.head img{
+    width: 100%;
+    height: 100%;
+}
+.info_main{
+    float: left;
+}
+.username{
+    color: #627386;
+    font-size: 12px;
+    margin: 10px 0;
+}
+.perfect{
+    width: 64px;
+	height: 22px;
+	background-color: #627386;
+	border-radius: 2px;
+	color: #ffffff;
+	font-size: 12px;
+	line-height: 22px;
+	text-align: center;
+	display: inline-block;
+}
+.ziliao{
+	font-size: 14px;
+    color: #22272e;
+}
+.ziliao span{
+    color: #f94b4b;
+}
+.message{
+    float: right;
+    width: 30px;
+    height: 30px;
+    cursor: pointer;
+}
+.msg_num{
+    width: 20px;
+    height: 20px;
+    line-height: 20px;
+    display: block;
+    background: red;
+    border-radius: 50%;
+    color: #fff;
+    font-size: 10px;
+    text-align: center;
+    position: relative;
+    top: 10px;
+    right: 9px;
+}
+.icon.msg:before{
+    width: 25px;
+    height: 25px;
+    background-position: -240px -371px
+}
+.product{
+    margin: 20px 0;
+}
+.product p{
+    font-size: 16px;
+	font-weight: normal;
+	font-stretch: normal;
+	line-height: 21px;
+	letter-spacing: 0px;
+	color: #22272e;
+	padding: 10px;
+}
+.product ul{
+	height: 50px;
+    line-height: 80px;
+    background-color: #ffffff;
+    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);
+    padding: 15px;
+}
+.product li{
+
+    display: inline-block;
+    margin-right: 20px;
+    width: 110px;
+    text-align: center;
+    color: #333333;
+    position: relative;
+    cursor: pointer;
+}
+.icon.confirm:before{
+    width: 34px;
+    height: 35px;
+    background-position: -266px -371px;
+    position: absolute
+}
+.icon.other:before{
+    background-position: -300px -371px;
+}
+.rank_top p{
+   font-size: 16px;
+   color: #22272e;
+   display: inline-block;
+}
+.rank_top span{
+    color: #627386;
+    font-size: 16px;
+}
+.rank_top a{
+    float: right;
+    color: #333333;
+    cursor: pointer
+}
+.sales-ranke ul li{
+    display: inline-block;
+    width: 10%;
+}
+.sales-ranke ul li:nth-child(2){
+    width: 79%;
+}
+.sales-ranke{
+    height: 54px;
+    background: #fff;
+    line-height: 54px;
+    color: #627386;
+}
+.sales-ranke ul{
+    padding: 0 15px;
+}
+.rank_top{
+    padding: 10px;
+}

BIN
src/main/resources/static/img/base/icon.png


+ 7 - 0
src/main/resources/static/js/common/serviceapi/supplier.service.js

@@ -156,5 +156,12 @@ var SupplierApi = {
                 .then(function(res){
                     callback(res);
                 });
+        },
+        homePageData: function (params, callback) {//供应商 首页个人中心
+            Http.AjaxService({ url:'/supplier/homePageData', type:'get', data:params, json:false, mask:true,replace:true})
+                .then(function(res){
+                    callback(res);
+                });
         }
+
 };

+ 1 - 1
src/main/resources/static/js/help/help.js

@@ -44,7 +44,7 @@ var helpSuggestion = new Vue({
                 };
                 console.log(JSON.stringify(params));
                 $.post("/help/suggestion", params, function(res){
-                    alertInfo(res.msg);
+                     alertInfo(res.msg);
                     _self.btnLoading = false;
                 });
             });

+ 66 - 0
src/main/resources/static/js/supplier-center/dashboard.js

@@ -0,0 +1,66 @@
+jqMultipleShow("click", ".navList", ".tab", ".con");
+var dashboard = new Vue({
+    el:'#dashboard',
+    data:{
+        Tab:[
+            {title:'我的交易',
+            List:[
+                {name:'我的首页',path:'/supplier/dashboard.html'},
+                {name:'我的订单',path:'/supplier/order/list.html'},
+                {name:'结算管理',path:'/supplier/order/settlement.html'},
+                {name:'评价管理',path:''},
+            ]},
+            {title:'我的店铺',
+            List:[
+                {name:'查看店铺',path:''},
+                {name:'装扮主页',path:'/supplier/decoration.html'},
+                {name:'发布商品',path:'/supplier/release.html'},
+                {name:'我的商品',path:'/supplier/goods.html'},
+                {name:'品牌管理',path:''},
+            ]},
+            {title:'管理中心',
+             List:[
+                {name:'资料信息',path:'/supplier/setting/information.html'},
+                {name:'员工管理',path:'/supplier/operation/list.html'},
+             ]
+            },
+            {title:'账户设置',List:[
+                {name:'重置密码',path:'/supplier/setting/password.html'},
+                {name:'更换手机',path:'/supplier/setting/phone.html'},
+            ]},
+        ],
+        userId:'',
+        homeData:'',
+        shopinfo:{},
+        promotions:{},
+        msgFlag:false,
+
+    },
+     methods: {
+
+    },
+    mounted:function () {
+        var _this = this;
+        var userInfo = CAIMEI.Storage.getItem('userInfo');
+        _this.userId =JSON.parse(userInfo).userId
+        console.log(_this.userId)
+        SupplierApi.homePageData({userId:_this.userId},function (res) {
+        if(res.code==0){
+             _this.homeData = res.data;
+             _this.shopinfo = res.data.shop;
+             _this.promotions = res.data.promotions;
+             if (res.data.unReadMessageCount>99){
+                 res.data.unReadMessageCount = '99+';
+                 _this.msgFlag = true
+             }else if(res.data.unReadMessageCount == 0){
+                 _this.msgFlag = false
+             }else {
+               _this.msgFlag = true
+             }
+             console.log(res)
+        }
+
+
+        })
+    }
+})

+ 83 - 3
src/main/resources/templates/supplier-center/dashboard.html

@@ -4,20 +4,100 @@
 <head>
     <title>采美365网-中国美业全方位线上交易服务互动平台,做美业,上采美</title>
     <template th:replace="components/head-link"></template>
-
+    <link th:if="${pageId==1026}" th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
+    <link th:href="@{/css/supplier-center/dashboard.css(v=${version})}" rel="stylesheet" type="text/css">
 </head>
 <body>
 <!-- 引用头部 -->
 <template th:replace="components/header"></template>
 
 <!-- 我的采美 -->
-<div>
+<div id="dashboard">
+    <div class="crumbs">
+        <span>我的交易</span>
+        <span>&gt;</span>
+        <span>我的首页</span>
+    </div>
+    <div class="wrap clear mf">
+        <div class="left">
+            <div class="title">我的交易</div>
+                <div class="navList" v-for="(tab,index) in Tab">
+                <span class="tab">{{tab.title}}</span>
+                <div class="con">
+                    <a :href="item.path" v-for="(item,index) in tab.List">{{item.name}}</a>
+                </div>
+            </div>
+        </div>
+        <div class="right">
+            <div class="information">
+                <div class="head">
+                    <img src="">
+                </div>
+                <div class="info_main">
+                    <div class="">
+                         <h3>{{shopinfo.sname}}</h3>
+                         <span></span>
+                    </div>
+                    <p class="username">用户名:{{shopinfo.name}}</p>
+                    <span class="perfect">立即完善</span>
+                    <span class="ziliao">资料完整度:<span>{{homeData.dataIntegrity}}</span></span>
+                </div>
+                <div class="message">
+                    <span class="msg_num" v-if="msgFlag">{{homeData.unReadMessageCount}}</span>
+                    <span class="icon mIcon msg"></span>
+                </div>
+            </div>
+            <div class="product">
+                <p>商品数据</p>
+                 <ul>
+                     <li class="icon confirm">
+                         <a>待确认</a>
+                     </li>
+                      <li class="icon other confirm">
+                         <a>待付款</a>
+                     </li>
+                     <li class="icon other confirm">
+                         <a>待发货</a>
+                     </li>
+                     <li class="icon other confirm">
+                         <a>已发货</a>
+                     </li>
+                     <li class="icon other confirm">
+                         <a>退货/款</a>
+                     </li>
+                 </ul>
+            </div>
+            <div class="ranking">
+                <div class="rank_top">
+                    <p>单品销售排名</p>
+                    <span>(统计标准:已确认的订单)</span>
+                    <a>查看全部 > </a>
+                </div>
+                <div class="sales-ranke">
+                <ul>
+                    <li>排名</li>
+                    <li>商品信息</li>
+                    <li>销量</li>
+                </ul>
+            </div>
+
+
+            </div>
+
+        </div>
 
+
+
+
+    </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/ajax.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/supplier.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/utils.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/supplier-center/dashboard.js(v=${version})}"></script>
 </body>
 </html>