zhengjinyi 4 lat temu
rodzic
commit
108c2309f0

+ 37 - 50
src/main/resources/static/css/document/details.css

@@ -5,62 +5,49 @@ li{list-style:none}
  * PC端
  */
 @media screen and (min-width:768px){
-footer .footTop{display:none;}
-.loginWrap{width:950px;height:366px;overflow:hidden;background:#FFF url(/img/account/login.png) no-repeat 30px center;margin:95px auto;box-sizing:border-box;box-shadow:0 10px 20px 0 rgba(255,180,150,0.17);border-radius:2px}
-.loginForm{float:right;width:400px;padding:20px 24px;font-size:14px;position:relative}
-.loginForm h1{color:#22272e;font-size:24px;font-weight:bold;line-height:30px}
-.loginForm h2{color:#22272e;font-size:16px;font-weight:normal;line-height:24px}
-.loginForm form{margin-top:60px}
-.loginForm .formLine{height:70px;padding:0;}
-.loginForm input{height:48px;line-height:48px;}
-.loginForm .checked{top:14px;}
-.loginForm .forget{text-align:right;color:#4a4f58;font-size:14px;line-height:14px;margin-top:-10px}
-.loginForm .submit{height:44px;line-height:0;font-size:0;text-align:justify;margin-top:20px}
-.loginForm .submit:after{content:'';display:inline-block;width:100%}
-.loginForm .submit .btn{display:inline-block;box-sizing:border-box;width:192px;height:44px;line-height:44px;background-color:#ffe6dc;border-radius:2px;border:solid 1px #e15616;text-align:center;color:#e15616;font-size:14px;cursor:pointer}
-.loginForm .submit button.btn{background-color:#e15616;color:#FFF}
-.loginForm .submit .btn:hover{opacity:.8}
-.loginForm .codeBtn{position:absolute;right:0;top:0;width:100px;height:100px}
-.loginForm .codeBtn:before{width:100px;height:100px;background-position:-138px -146px}
-.loginForm .qrCodeBox{text-align:center}
-.loginForm .qrCode{width:168px;height:168px;border-radius:2px;border:solid 1px #ffb496;margin:27px auto 0 auto}
-.loginForm .qrInfo{text-align:center;height:44px;line-height:44px;font-size:16px;color:#93979f}
-.loginForm .changeBtn{display:inline-block;height:24px;line-height:24px;color:#e15616;font-size:16px;position:absolute;right:24px;top:20px}
-.loginForm .changeBtn:before{width:24px;height:24px;background-position:-175px -251px;vertical-align:top;margin-right:6px}
-.loginForm .showPwd{position:absolute;right:22px;top:16px;width:22px;height:16px;cursor:pointer}
-.loginForm .showPwd:before{width:22px;height:20px;background-position:-240px -299px}
-.loginForm .showPwd.on:before{width:22px;height:20px;background-position:-205px -299px}
-#qrCodeWrap{position:relative}
-#qrCodeWrap .model{position:absolute;width:200px;height:200px;top:15px;left:98px;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,1);color:#000;z-index:99999;cursor:pointer;border:1px solid #EBEBEB}
-#qrCodeWrap .model .refresh{width:21px;height:21px;display:block;margin:0 auto 3px}
-#qrCodeWrap .model .refresh-div{width:100px;height:64px;display:block}
-#qrCodeWrap .model .refresh-div p{text-align:center;font-size:14px;line-height:20px}
-.baseHeadCenter.account .accountLogin{display:none}
-
-
+    body{background-color: #F7F7F7;}
+    ::-webkit-input-placeholder {
+        color: #ffffff;
+    }
+    :-moz-placeholder {/* Firefox 18- */
+        color: #ffffff;
+    }
+    ::-moz-placeholder{/* Firefox 19+ */
+        color: #ffffff;
+    }
+    :-ms-input-placeholder {
+        color: #ffffff;
+    }
+    .header{width: 100%;height: 80px;background: linear-gradient(90deg, #FF8B45, #E15616);box-sizing: border-box;padding: 18px 0;}
+    .wrap{width: 1200px;height: 100%;line-height: 44px;font-size: 20px;color: #ffffff;}
+    .wrap .logo{width: 52px;height: 44px;margin-right: 10px;}
+    .wrap .search{width: 400px;height: 44px;float: right;border-radius: 22px;background-color: rgba(255,255,255,0.16);box-sizing: border-box;padding: 0 20px;}
+    .wrap .search .input{width: 316px;height: 44px;background-color: rgba(255,255,255,0);box-sizing: border-box;border: none;font-size: 16px;color: #ffffff;}
+    .wrap .search .icon-search{width: 44px;height: 44px;float: right;box-sizing: border-box;padding: 10px;}
+    .wrap .search .icon-search img{width: 22px;height: 22px;display: block;}
+    .document-content{width: 100%;height: auto;float: left;}
+    .document-content .inner{width: 1200px;margin: 0 auto;}
+    .document-content .document-list{width: 100%;height: auto;margin-top: 40px;}
+    .document-list .list-item{width: 100%;min-height: 160px;background-color: #FFFFFF;border-radius: 4px;box-sizing: border-box;padding: 20px 20px 0 20px ;float: left;margin-bottom: 20px;}
+    .document-list .list-item .list-item-top{width: 100%;height:auto;float: left;padding-bottom:20px; position: relative;}
+    .document-list .list-item .list-item-top .image{width: 140px;height: 120px;float: left;border: 1px solid #F3F6F9;border-radius: 4px;margin-right: 20px;}
+    .document-list .list-item .list-item-top .image img{width: 140px;height: 120px;display: block;}
+    .document-list .list-item .list-item-top .icon{width: 24px;height: 24px;border-radius: 2px;background-color: #FFF5F1;position: absolute;bottom: 20px;right: 0;cursor: pointer;}
+    .document-list .list-item .list-item-top .icon:before{width: 24px;height: 24px;background-position: -148px 2px;}
+    .document-list .list-item .list-item-top .icon.top:before{width: 24px;height: 24px;background-position: -178px 2px;}
+    .document-list .list-item .list-item-top .main {width: 800px;height: 120px;float: left;}
+    .document-list .list-item .list-item-top .main h1{font-weight: normal;font-size: 20px;line-height: 40px;color: #E15616;text-align: left;}
+    .document-list .list-item .list-item-top .main p{font-weight: normal;font-size: 16px;line-height: 34px;color: #666666;text-align: left;}
+    .document-list .list-item .list-item-top .main p span{color: #E15616;cursor: pointer;}
+    .document-list .list-item .list-item-bot{width: 100%;min-height: 1185px;padding: 20px 0;border-top: 1px solid #CFDBE2;float: left;margin-bottom: 120px;}
+    iframe{width: 1160px !important;height: 1185px !important;}
 }
 
 /**
 * 移动端
 */
 @media screen and (max-width:768px){
-body{background:#FFF}
-footer{display:none}
-.loginForm .showPwd{display:none;}
-.loginForm{padding-top:4vw;text-align:center;background:#FFF url(/img/account/login_m.png) no-repeat center 25vw;background-size:57vw 43.2vw}
-.loginForm h1{color:#22272e;font-size:6.4vw;font-weight:bold;line-height:10vw}
-.loginForm h2{font-size:3.1vw;font-weight:normal;line-height:5.4vw;color:#627386}
-.loginForm form{width:93.4vw;margin:54vw auto 0}
-.loginForm .formLine{height:16.4vw;padding:0;}
-.loginForm input{height:11.2vw;line-height:6vw;padding: 2.6vw 0;box-sizing: border-box;}
-.loginForm .checked{top:3.6vw;right:3.6vw;}
-.loginForm .forget{text-align:right;color:#4a4f58;font-size:3.4vw;line-height:3.4vw;margin-bottom:4.8vw}
-.loginForm .submit{line-height:11.2vw;font-size:3.4vw;text-align:center;color:#22272e;}
-.loginForm .submit .btn{display:inline-block;box-sizing:border-box;width:100%;height:11.2vw;border:solid 1px #b8bfca;border-radius:2px;margin-bottom:4.8vw}
-.loginForm .submit button.btn{border-color:#e15616;background:#e15616;color:#FFF;}
-.loginForm .submit .weChat{display:block;margin:6vw auto;width:50vw;color:#627386;line-height:8vw}
-.loginForm .submit .weChat span{display:inline-block;width:100%}
-.loginForm .submit .weChat .mIcon:before{width:12vw;height:12vw;background-position:0 -77.8vw}
+
 
 
 

+ 7 - 4
src/main/resources/static/css/document/list.css

@@ -24,21 +24,24 @@ li{list-style:none}
     .wrap .search{width: 400px;height: 44px;float: right;border-radius: 22px;background-color: rgba(255,255,255,0.16);box-sizing: border-box;padding: 0 20px;}
     .wrap .search .input{width: 316px;height: 44px;background-color: rgba(255,255,255,0);box-sizing: border-box;border: none;font-size: 16px;color: #ffffff;}
     .wrap .search .icon-search{width: 44px;height: 44px;float: right;box-sizing: border-box;padding: 10px;}
-    .wrap .search .icon-search img{width: 22px;height: 22px;display: block;}
+    .wrap .search .icon-search img{width: 22px;height: 22px;display: block;cursor: pointer;}
     .document-content{width: 100%;height: auto;float: left;}
     .document-content .inner{width: 1200px;margin: 0 auto;}
     .document-content .document-list{width: 100%;height: auto;margin-top: 40px;}
     .document-list .list-item{width: 100%;min-height: 160px;background-color: #FFFFFF;border-radius: 4px;box-sizing: border-box;padding: 20px 20px 0 20px ;float: left;margin-bottom: 20px;}
-    .document-list .list-item .list-item-top{width: 100%;height:auto;float: left;padding-bottom:20px; }
+    .document-list .list-item .list-item-top{width: 100%;height:auto;float: left;padding-bottom:20px; position: relative;}
     .document-list .list-item .list-item-top .image{width: 140px;height: 120px;float: left;border: 1px solid #F3F6F9;border-radius: 4px;margin-right: 20px;}
     .document-list .list-item .list-item-top .image img{width: 140px;height: 120px;display: block;}
+    .document-list .list-item .list-item-top .icon{width: 24px;height: 24px;border-radius: 2px;background-color: #FFF5F1;position: absolute;bottom: 20px;right: 0;cursor: pointer;}
+    .document-list .list-item .list-item-top .icon:before{width: 24px;height: 24px;background-position: -148px 2px;}
+    .document-list .list-item .list-item-top .icon.top:before{width: 24px;height: 24px;background-position: -178px 2px;}
     .document-list .list-item .list-item-top .main {width: 800px;height: 120px;float: left;}
     .document-list .list-item .list-item-top .main h1{font-weight: normal;font-size: 20px;line-height: 40px;color: #E15616;text-align: left;}
     .document-list .list-item .list-item-top .main p{font-weight: normal;font-size: 16px;line-height: 34px;color: #666666;text-align: left;}
     .document-list .list-item .list-item-bot{width: 100%;height: auto;padding: 20px 0;border-top: 1px solid #CFDBE2;float: left;}
     .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 30px;line-height: 30px;font-size: 14px;color: #999999;float: left;margin: 5px 0;}
-    .document-list .list-item .list-item-bot .pdf-li .img{width: 30px;height: 30px;display: block;float: left;}
-    .document-list .list-item .list-item-bot .pdf-li .name{float: left;margin-left: 15px;cursor: pointer;}
+    .document-list .list-item .list-item-bot .pdf-li .img{width: 18px;height: 20px;display: block;float: left;margin-top: 5px;}
+    .document-list .list-item .list-item-bot .pdf-li .name{float: left;margin-left: 10px;cursor: pointer;}
     .document-list .list-item .list-item-bot .pdf-li .name:hover{color: #E15616;}
     .document-list .list-item .list-item-bot .pdf-li .time{float: right;}
 

+ 1 - 0
src/main/resources/static/css/document/login.css

@@ -24,6 +24,7 @@ li{list-style:none}
     .loginForm .submit .btn:hover{opacity:.8}
     .formLine.code input{width: 230px;float: left;}
     .formLine.code .code-btn{width: 120px;height: 46px;background: #FFF8F3;border: 1px solid #E15616;border-radius: 4px;float: right;display: block;line-height: 48px;text-align: center;}
+    .formLine.code .checked{left:200px;}
     #codeMsg{display: inline-block;float: left;}
     .loginForm .codeBtn{position:absolute;right:0;top:0;width:100px;height:100px;}
     .loginForm .codeBtn:before{width:100px;height:100px;background-position:-138px -146px}

+ 40 - 49
src/main/resources/static/css/document/more-content.css

@@ -5,38 +5,45 @@ li{list-style:none}
  * PC端
  */
 @media screen and (min-width:768px){
-footer .footTop{display:none;}
-.loginWrap{width:950px;height:366px;overflow:hidden;background:#FFF url(/img/account/login.png) no-repeat 30px center;margin:95px auto;box-sizing:border-box;box-shadow:0 10px 20px 0 rgba(255,180,150,0.17);border-radius:2px}
-.loginForm{float:right;width:400px;padding:20px 24px;font-size:14px;position:relative}
-.loginForm h1{color:#22272e;font-size:24px;font-weight:bold;line-height:30px}
-.loginForm h2{color:#22272e;font-size:16px;font-weight:normal;line-height:24px}
-.loginForm form{margin-top:60px}
-.loginForm .formLine{height:70px;padding:0;}
-.loginForm input{height:48px;line-height:48px;}
-.loginForm .checked{top:14px;}
-.loginForm .forget{text-align:right;color:#4a4f58;font-size:14px;line-height:14px;margin-top:-10px}
-.loginForm .submit{height:44px;line-height:0;font-size:0;text-align:justify;margin-top:20px}
-.loginForm .submit:after{content:'';display:inline-block;width:100%}
-.loginForm .submit .btn{display:inline-block;box-sizing:border-box;width:192px;height:44px;line-height:44px;background-color:#ffe6dc;border-radius:2px;border:solid 1px #e15616;text-align:center;color:#e15616;font-size:14px;cursor:pointer}
-.loginForm .submit button.btn{background-color:#e15616;color:#FFF}
-.loginForm .submit .btn:hover{opacity:.8}
-.loginForm .codeBtn{position:absolute;right:0;top:0;width:100px;height:100px}
-.loginForm .codeBtn:before{width:100px;height:100px;background-position:-138px -146px}
-.loginForm .qrCodeBox{text-align:center}
-.loginForm .qrCode{width:168px;height:168px;border-radius:2px;border:solid 1px #ffb496;margin:27px auto 0 auto}
-.loginForm .qrInfo{text-align:center;height:44px;line-height:44px;font-size:16px;color:#93979f}
-.loginForm .changeBtn{display:inline-block;height:24px;line-height:24px;color:#e15616;font-size:16px;position:absolute;right:24px;top:20px}
-.loginForm .changeBtn:before{width:24px;height:24px;background-position:-175px -251px;vertical-align:top;margin-right:6px}
-.loginForm .showPwd{position:absolute;right:22px;top:16px;width:22px;height:16px;cursor:pointer}
-.loginForm .showPwd:before{width:22px;height:20px;background-position:-240px -299px}
-.loginForm .showPwd.on:before{width:22px;height:20px;background-position:-205px -299px}
-#qrCodeWrap{position:relative}
-#qrCodeWrap .model{position:absolute;width:200px;height:200px;top:15px;left:98px;display:flex;justify-content:center;align-items:center;background:rgba(255,255,255,1);color:#000;z-index:99999;cursor:pointer;border:1px solid #EBEBEB}
-#qrCodeWrap .model .refresh{width:21px;height:21px;display:block;margin:0 auto 3px}
-#qrCodeWrap .model .refresh-div{width:100px;height:64px;display:block}
-#qrCodeWrap .model .refresh-div p{text-align:center;font-size:14px;line-height:20px}
-.baseHeadCenter.account .accountLogin{display:none}
-
+    body{background-color: #F7F7F7;}
+    ::-webkit-input-placeholder {
+        color: #ffffff;
+    }
+    :-moz-placeholder {/* Firefox 18- */
+        color: #ffffff;
+    }
+    ::-moz-placeholder{/* Firefox 19+ */
+        color: #ffffff;
+    }
+    :-ms-input-placeholder {
+        color: #ffffff;
+    }
+    .header{width: 100%;height: 80px;background: linear-gradient(90deg, #FF8B45, #E15616);box-sizing: border-box;padding: 18px 0;}
+    .wrap{width: 1200px;height: 100%;line-height: 44px;font-size: 20px;color: #ffffff;}
+    .wrap .logo{width: 52px;height: 44px;margin-right: 10px;}
+    .wrap .search{width: 400px;height: 44px;float: right;border-radius: 22px;background-color: rgba(255,255,255,0.16);box-sizing: border-box;padding: 0 20px;}
+    .wrap .search .input{width: 316px;height: 44px;background-color: rgba(255,255,255,0);box-sizing: border-box;border: none;font-size: 16px;color: #ffffff;}
+    .wrap .search .icon-search{width: 44px;height: 44px;float: right;box-sizing: border-box;padding: 10px;}
+    .wrap .search .icon-search img{width: 22px;height: 22px;display: block;cursor: pointer;}
+    .document-content{width: 100%;height: auto;float: left;}
+    .document-content .inner{width: 1200px;margin: 0 auto;}
+    .document-content .document-list{width: 100%;height: auto;margin-top: 40px;}
+    .document-list .list-item{width: 100%;min-height: 160px;background-color: #FFFFFF;border-radius: 4px;box-sizing: border-box;padding: 20px 20px 0 20px ;float: left;margin-bottom: 20px;}
+    .document-list .list-item .list-item-top{width: 100%;height:auto;float: left;padding-bottom:20px; position: relative;}
+    .document-list .list-item .list-item-top .image{width: 140px;height: 120px;float: left;border: 1px solid #F3F6F9;border-radius: 4px;margin-right: 20px;}
+    .document-list .list-item .list-item-top .image img{width: 140px;height: 120px;display: block;}
+    .document-list .list-item .list-item-top .icon{width: 24px;height: 24px;border-radius: 2px;background-color: #FFF5F1;position: absolute;bottom: 20px;right: 0;cursor: pointer;}
+    .document-list .list-item .list-item-top .icon:before{width: 24px;height: 24px;background-position: -148px 2px;}
+    .document-list .list-item .list-item-top .icon.top:before{width: 24px;height: 24px;background-position: -178px 2px;}
+    .document-list .list-item .list-item-top .main {width: 800px;height: 120px;float: left;}
+    .document-list .list-item .list-item-top .main h1{font-weight: normal;font-size: 20px;line-height: 40px;color: #E15616;text-align: left;}
+    .document-list .list-item .list-item-top .main p{font-weight: normal;font-size: 16px;line-height: 34px;color: #666666;text-align: left;}
+    .document-list .list-item .list-item-bot{width: 100%;height: auto;padding: 20px 0;border-top: 1px solid #CFDBE2;float: left;}
+    .document-list .list-item .list-item-bot .pdf-li{width: 100%;height: 30px;line-height: 30px;font-size: 14px;color: #999999;float: left;margin: 5px 0;}
+    .document-list .list-item .list-item-bot .pdf-li .img{width: 18px;height: 20px;display: block;float: left;margin-top: 5px;}
+    .document-list .list-item .list-item-bot .pdf-li .name{float: left;margin-left: 10px;cursor: pointer;}
+    .document-list .list-item .list-item-bot .pdf-li .name:hover{color: #E15616;}
+    .document-list .list-item .list-item-bot .pdf-li .time{float: right;}
 
 }
 
@@ -44,23 +51,7 @@ footer .footTop{display:none;}
 * 移动端
 */
 @media screen and (max-width:768px){
-body{background:#FFF}
-footer{display:none}
-.loginForm .showPwd{display:none;}
-.loginForm{padding-top:4vw;text-align:center;background:#FFF url(/img/account/login_m.png) no-repeat center 25vw;background-size:57vw 43.2vw}
-.loginForm h1{color:#22272e;font-size:6.4vw;font-weight:bold;line-height:10vw}
-.loginForm h2{font-size:3.1vw;font-weight:normal;line-height:5.4vw;color:#627386}
-.loginForm form{width:93.4vw;margin:54vw auto 0}
-.loginForm .formLine{height:16.4vw;padding:0;}
-.loginForm input{height:11.2vw;line-height:6vw;padding: 2.6vw 0;box-sizing: border-box;}
-.loginForm .checked{top:3.6vw;right:3.6vw;}
-.loginForm .forget{text-align:right;color:#4a4f58;font-size:3.4vw;line-height:3.4vw;margin-bottom:4.8vw}
-.loginForm .submit{line-height:11.2vw;font-size:3.4vw;text-align:center;color:#22272e;}
-.loginForm .submit .btn{display:inline-block;box-sizing:border-box;width:100%;height:11.2vw;border:solid 1px #b8bfca;border-radius:2px;margin-bottom:4.8vw}
-.loginForm .submit button.btn{border-color:#e15616;background:#e15616;color:#FFF;}
-.loginForm .submit .weChat{display:block;margin:6vw auto;width:50vw;color:#627386;line-height:8vw}
-.loginForm .submit .weChat span{display:inline-block;width:100%}
-.loginForm .submit .weChat .mIcon:before{width:12vw;height:12vw;background-position:0 -77.8vw}
+
 
 
 

BIN
src/main/resources/static/img/document/pdf.png


+ 50 - 0
src/main/resources/static/js/common/locallhostAjax.service.js

@@ -0,0 +1,50 @@
+
+/*
+*封装的ajax函数
+* Created by ZHJY on 2020/06/03.
+* @param  option.type     请求类型  get 和 post
+* @param  option.json     数据请求方式,
+* @param  option.url(必选) 请求的url地址   相同域名下的页面(此函数不支持跨域请求)
+* @param  option.data(必选) 请求协带的参数  以js对象的形式定义,如:{name:'张三'}
+* @param  option.replace  是否更新续签
+* @param  option.mask     是否使用模态层加载动画
+*/
+var LocakkHost = {
+        AjaxService : function(option){
+            var loading = '';
+            var def = $.Deferred();
+            console.log(option.json);
+            $.ajax({
+                url: option.url,
+                data: option.data,
+                xhrFields: {//此处为跨域后台保持session一致,切勿删除!!!
+                    withCredentials: true
+                },
+                type: option.type,
+                dataType: "json",
+                async:false,
+                cache:false,
+                contentType: option.json ? 'application/json;charset=UTF-8' : 'application/x-www-form-urlencoded',
+                beforeSend:function () {
+                    // if (option.mask) {
+                    //     loading = layer.load(0,{shade: [0.1,'#000']}); //0.1透明度的白色背景
+                    // }
+                }
+            }).then(function(res) {
+                if(res.code== -99){
+                    CAIMEI.Alert('登录已失效,请重新登录','去登录',true,function () {
+                        CAIMEI.Storage.clear();
+                        location.href = "/login.html";
+                    });
+                }else{
+                    def.resolve(res);
+                }
+            }, function(error) {
+                CAIMEI.Alert('网络请求超时,请重试~','确定',true,function () {
+                    window.location.reload();
+                });
+                def.reject(error);
+            });
+            return def;
+        }
+};

+ 17 - 5
src/main/resources/static/js/common/serviceapi/document.service.js

@@ -1,17 +1,29 @@
-/* HTTP API 二手业务模块
+/* HTTP API 采美资料库业务模块
  * Copyright 2020, CAIMEI365
  * Date   2020/11/10
  * auther zhj
  */
 var DocumentApi = {
-        SecondHandProduct: function (params, callback) {//发布信息
-            Http.AjaxService({ url:'/product/releaseSecondHandProduct', type:'post', data:params, json:false, mask:true,replace:false})
+        GetAuthorization: function (params, callback) {//资料库登录初始化
+            LocakkHost.AjaxService({ url:'/document/authorization', type:'get', data:params, json:false})
             .then(function(res){
                 callback(res);
             });
         },
-        SeconHandProductList: function (params, callback) {//商品列表
-            Http.AjaxService({ url:'/product/getSecondHandProductList', type:'get', data:params, json:true, mask:true,replace:false})
+        GetImgVerifyCode: function (params, callback) {//资料库获取图形验证码
+            LocakkHost.AjaxService({ url:'/document/getImgVerifyCode', type:'get', data:params, json:false})
+            .then(function(res){
+                callback(res);
+            });
+        },
+        DocumentNote: function (params, callback) {//资料库获取短信验证码
+            LocakkHost.AjaxService({ url:'/document/note', type:'get', data:params, json:true})
+            .then(function(res){
+                callback(res);
+            });
+        },
+        MobileCodeLogin: function (params, callback) {//资料库获取短信验证码
+            LocakkHost.AjaxService({ url:'/document/mobileCodeLogin', type:'POST', data:params, json:false})
             .then(function(res){
                 callback(res);
             });

+ 225 - 172
src/main/resources/static/js/document/details.js

@@ -1,209 +1,262 @@
-var loginPage = new Vue({
-    el: "#loginPage",
+var documentList = new Vue({
+    el: "#documentList",
     data: {
-        maxtime:60,
-        loginLoading: false,
-        qrCodeLogin: false,
-        loginAccount: '',
-        loginPassword: '',
-        rule:{
-            account: "(^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$)|(^\\d{6,12}$)",
-            password: "^[^\\u4e00-\\u9fa5]{6,30}$"
+        requestFlag: true,
+        userId: 0,
+        supplierInfo:{},
+        supplierBanner: [],
+        mainProducts:[],
+        params: {
+            size: 12,
+            num: 1,
+            id: 0,
+            keyword: ''
         },
-        userData: {
-            account: '',
-            email: '',
-            phone: '',
-            name: '',
-            userName: '',
-            userId: '',
-            spId: '',
-            clubId: '',
-            shopId: '',
-            identity: '',
-            permission: '',
-            token: ''
+        listRecord:0,
+        productLists:[],
+        ziliaoobjectL: {
+            "id":6,
+            "type":null,
+            "title":"品牌仪器",
+            "detail":"科医人 赛诺龙 路创丽 Jeisys 华熙生物",
+            "link":null,
+            "subFloors":false,
+            "image":"https://img.caimei365.com/group1/M00/03/C2/Cmis2F-b03iAbm6AAAB-3AQ2ab4270.jpg",
+            "floorData":[
+                {
+                    "id":19,
+                    "status":null,
+                    "title":"脸部抗衰仪器系列",
+                    "detail":null,
+                    "link":"http://www.caimei365.com/cmpage/info-1-22.html",
+                    "image":"https://img.caimei365.com/group1/M00/03/C2/Cmis2F-b03iAbm6AAAB-3AQ2ab4270.jpg",
+                    "beginTime":'2020-11-10 17:10',
+                    "endTime":null
+                },
+                {
+                    "id":23,
+                    "status":null,
+                    "title":"脱毛嫩肤仪器系列",
+                    "detail":null,
+                    "link":"https://www.caimei365.com/cmpage/info-1-20.html",
+                    "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R9kaAE5-iAACBMZJBjPU450.jpg",
+                    "beginTime":'2020-11-10 17:10',
+                    "endTime":null
+                },
+                {
+                    "id":22,
+                    "status":null,
+                    "title":"瘦身塑形仪器系列",
+                    "detail":null,
+                    "link":"https://www.caimei365.com/cmpage/info-1-49.html",
+                    "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R9HeAP5lxAACLzIoow4k828.jpg",
+                    "beginTime":'2020-11-10 17:10',
+                    "endTime":null
+                },
+                {
+                    "id":56,
+                    "status":null,
+                    "title":"激光仪器系列",
+                    "detail":null,
+                    "link":"https://www.caimei365.com/cmpage/info-1-228.html",
+                    "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R9GuAQslKAABsHxQEqMs728.jpg",
+                    "beginTime":'2020-11-10 17:10',
+                    "endTime":null
+                },
+                {
+                    "id":55,
+                    "status":null,
+                    "title":"光子嫩肤仪器系列",
+                    "detail":null,
+                    "link":"https://www.caimei365.com/cmpage/info-1-227.html",
+                    "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R9IWAPcPfAACGRRPiWNI482.jpg",
+                    "beginTime":'2020-11-10 17:10',
+                    "endTime":null
+                }
+            ]
         },
-        isWeChat: false
     },
     computed: {
 
     },
     methods: {
-        toQrCodeLogin: function(){//切换微信登录二维码
+        getShopInfo: function(){
             var _self = this;
-            var timeClock = null;
-            this.qrCodeLogin = true;
-            UserApi.ToWechatLogin({},function(response){
-                var wxLogin = new WxLogin({
-                        self_redirect: true,
-                        id: "qrCodeWrap",
-                        appid: response.data.AppId,
-                        scope: 'snsapi_login',
-                        redirect_uri: response.data.redirect_uri,
-                        state: response.data.state,
-                        style: "black",
-                        href: "https://www.caimei365.com/css/base/base.pc.css"
-                });
-                timeClock = setInterval(function(){
-                    _self.maxtime--;
-                    if (_self.maxtime == 0) {
-                        clearInterval(timeClock);
-                    };
-                },1000);
-                _self.getWrchatStatusData({uuid:response.data.state})
+            $.getJSON(spiServer + "/supplier/home/detail",{supplierId: this.params.id}).done(function (r) {
+                if (r.code === 0 && r.data) {
+                    _self.supplierInfo = r.data;
+                }
             });
         },
-        getWrchatStatusData:function(params){//轮询查询用户是否扫描过二维码登录
+        getBanners: function(){
             var _self = this;
-            var timer = null;
-            UserApi.ToWechatPolling(params,function(response){
-                if(response.code == -90){
-                    if(_self.maxtime == 0){
-                        clearInterval(timer);
-                        _self.maxtime = 60;
-                        $('#qrCodeWrap').append('<div class="model"><div class="refresh-div"><img class="refresh" src="/img/base/shua.png" alt=""><p>二维码已失效,点击刷新</p></div></div>');
-                        $('#qrCodeWrap .model').click(function () {
-                            $(this).remove();
-                            _self.toQrCodeLogin();
-                        })
-                    }else{
-                        timer = setTimeout(function(){
-                            _self.getWrchatStatusData(params);
-                        },3000)
-                    }
-                }else {
-                    clearTimeout(timer); //清理定时任务
-                    if(response.code == 0){
-                        _self.userData = {
-                            account: response.data.account,
-                            email: response.data.email,
-                            phone: response.data.bindMobile,
-                            name: response.data.name,
-                            userName: response.data.userName,
-                            userId: response.data.userID,
-                            spId: response.data.serviceProviderID,
-                            clubId: response.data.clubID,
-                            shopId: response.data.shopID,
-                            userIdentity: response.data.userIdentity,
-                            permission: response.data.userPermission,
-                            token: response.data.token
-                        };
-                        _self.setStorages( _self.userData);
-                        // 登录成功页面跳转
-                        var loginBeforePath = getBaseCookie("loginBeforePath");
-                        if (loginBeforePath && loginBeforePath!='undefined' && loginBeforePath.indexOf('.html')>0) {
-                            delBaseCookie("loginBeforePath");
-                            window.location.href = loginBeforePath;
-                        } else if (_self.userData.userIdentity*1 === 3) {
-                            location.href = '/supplier/dashboard.html';
-                        } else if (_self.userData.userIdentity*1 === 2 || _self.userData.userIdentity*1 === 4) {
-                            location.href = '/user/dashboard.html';
+            $.getJSON(spiServer + "/supplier/home/images",{supplierId: this.params.id}).done(function (r) {
+                if (r.code === 0 && r.data) {
+                    _self.supplierBanner = r.data;
+                    _self.supplierBanner = r.data;
+                    setTimeout(function(){
+                        if (isPC) {
+                            $('#supplierBanner').slide({
+                                mainCell:".swiper-wrapper"
+                                ,titCell:".swiper-pagination span"
+                                ,effect: "leftLoop"
+                                ,prevCell:".swiper-button-prev"
+                                ,nextCell:".swiper-button-next"
+                                ,interTime: 2000
+                                ,autoPlay: true
+                                ,autoPage: false
+                                ,trigger: "mouseover"
+                            });
                         } else {
-                            location.href="/index.html";
+                            var swiper = new Swiper('#supplierBanner', {
+                                loop : true,
+                                autoplay: {
+                                    delay: 2000,
+                                    disableOnInteraction: false
+                                },
+                                navigation: {
+                                    nextEl: '.swiper-button-next',
+                                    prevEl: '.swiper-button-prev'
+                                },
+                                pagination: {
+                                    el: '.swiper-pagination',
+                                    clickable :true
+                                }
+                            });
                         }
-                    }else if(response.code == -4){
-                        window.location.href = '/bind.html';
-                    }
+                    },500);
                 }
             });
         },
-        // 微信公众号授权登录
-        weChatLogin: function(){
-            if (this.isWeChat) {
-                // 微信浏览器自动授权登录
-                var urlForWeChat = 'https://www.caimei365.com/we_chat/redirect_uri.html';
-                $.get(spiServer+'/user/authorizationLink?mode=2&redirectUri='+urlForWeChat, function(r){
-                    if(r.code===0 && r.data){
-                        setBaseCookie("weChatAutoLogin", 2);
-                        window.location.href = r.data;
+        getMainProducts: function(){
+            var _self = this;
+            $.getJSON(spiServer + "/supplier/home/products",{supplierId: this.params.id}).done(function (r) {
+                if (r.code === 0 && r.data) {
+                    if(_self.userId && _self.userId>0){
+                        var productIdArr = [];
+                        r.data.map(function (item) {
+                            // 0公开价格 1不公开价格 2仅对会员机构公开
+                            if (item.priceFlag !== 1) {
+                                productIdArr.push(item.id)
+                            }
+                        });
+                        setProductPrice(r.data, productIdArr.join(","), _self.userId, function () {
+                            _self.$forceUpdate();
+                            setTimeout(function(){
+                                // 图片懒加载
+                                $("img[data-original]").lazyload();
+                            },500);
+                        });
                     }
-                });
-            }
+                    _self.mainProducts = r.data;
+                }
+            });
         },
-        toNormalLogin: function(){
-            this.qrCodeLogin = false;
+        getProductLists: function(){
+            var _self = this;
+            $.getJSON(spiServer + "/search/query/product/supplier",{
+                keyword: _self.params.keyword,
+                pageSize: _self.params.size,
+                pageNum: _self.params.num,
+                id:_self.params.id
+            }, function (r) {
+                if (r.code === 0 && r.data) {
+                    var result = JSON.parse(r.data);
+                    _self.listRecord = result.total;
+                    var resultData = setSearchProductList(result.items, _self.userId, function(){
+                        _self.$forceUpdate();
+                        setTimeout(function(){
+                            // 图片懒加载
+                            $("img[data-original]").lazyload();
+                        },500);
+                    });
+                    _self.productLists = _self.productLists.concat(resultData);
+                }
+                _self.requestFlag = true;
+            })
         },
-        showPassword: function(event) {
-            var el = event.currentTarget;
-            var pwdEle = $(el).siblings('input');
-            if(pwdEle.attr('type') === 'password') {
-                $(el).addClass('on');
-                pwdEle.attr('type','text');
-            } else {
-                $(el).removeClass('on');
-                pwdEle.attr('type','password');
+        keyupSearch: function(event) {
+            // 搜索输入框 按回车键搜索
+            var keyCode = event.keyCode || event.which;
+            if(keyCode === 13){
+                this.supplierSearch();
             }
         },
-        blurHandle: function(event) {  // 失去焦点校验
-            var el = event.currentTarget;
-            verifyHandle(el);
-        },
-        loginSubmit: function () {  // 账号登录
-            var _self = this;
-            var pass = verifyForm();
-            if (this.loginLoading) { return false; }
-            this.$nextTick(function(){
-                if (!pass) { return false; }
-                _self.loginLoading = true;
-                var params =  {mobileOrEmail: _self.loginAccount,password: _self.loginPassword,source: 'www'};
-                UserApi.PostLoginAccount(params,function(response){
-                    _self.loginLoading = false;
-                    if(response.code === 0){
-                        _self.userData = {
-                            account: response.data.account,
-                            email: response.data.email,
-                            phone: response.data.bindMobile,
-                            name: response.data.name,
-                            userName: response.data.userName,
-                            userId: response.data.userID,
-                            spId: response.data.serviceProviderID,
-                            clubId: response.data.clubID,
-                            shopId: response.data.shopID,
-                            userIdentity: response.data.userIdentity,
-                            permission: response.data.userPermission,
-                            token: response.data.token
-                        };
-                        _self.setStorages( _self.userData);
-                        // 登录成功页面跳转
-                        var loginBeforePath = getBaseCookie("loginBeforePath");
-                        if (loginBeforePath && loginBeforePath!='undefined' && loginBeforePath.indexOf('.html')>0) {
-                            delBaseCookie("loginBeforePath");
-                            window.location.href = loginBeforePath;
-                        } else if (_self.userData.userIdentity*1 === 3) {
-                            location.href = '/supplier/dashboard.html';
-                        } else if (_self.userData.userIdentity*1 === 2 || _self.userData.userIdentity*1 === 4) {
-                            location.href = '/user/dashboard.html';
-                        } else {
-                            location.href="/index.html";
+        supplierSearch: function(){
+            if (this.params.keyword.length < 2) {
+                $.confirm({
+                    useBootstrap: false,
+                    boxWidth: (isPC?'300px':'70%'),
+                    title:'提示',
+                    content:'请至少输入两个关键字!',
+                    closeIcon: true,
+                    animation: 'opacity',
+                    closeAnimation: 'opacity',
+                    animateFromElement: false,
+                    buttons: {
+                        close: {
+                            text: '确定',
+                            btnClass: 'btn-confirm'
                         }
-                    } else {// 登录失败
-                        CAIMEI.Alert(response.msg,'确定',false);
                     }
                 });
-            });
+                return false;
+            }
+            this.productLists = [];
+            this.getProductLists();
+            var floorScroll = $('#supProduct').offset().top;
+            $('html,body').animate({scrollTop: floorScroll},600);
+        },
+        showPdfList:function(item){
+            item.subFloors = !item.subFloors;
         },
-        setStorages:function(data){//存储本地数据
-            localStorage.setItem('userInfo',JSON.stringify(data));
+        upgrade: function () {
+            location.href='/upgrade.html';
         }
     },
     created: function () {
-        var userAgent = navigator.userAgent.toLowerCase();
-        this.isWeChat = userAgent.match(/MicroMessenger/i);
-        // this.weChatAutoLogin();
+        this.params.id = getUrlParam("id") ? getUrlParam("id") * 1 : 0;
+        if(this.params.id !== 0) {
+            this.getShopInfo();
+            this.getBanners();
+        }
     },
     mounted: function () {
+        if(this.params.id !== 0) {
+            this.getMainProducts();
+            this.getProductLists();
+        }
+        var userInfo = localStorage.getItem('userInfo');
+        if(userInfo){
+            this.userId = JSON.parse(userInfo).userId;
+        }
         var _self = this;
-        $('body').on("focus",'[needverify]:visible',function(){
-            $(this).siblings('.errTips').removeClass("show").siblings('.checked').removeClass("show");
+        $('.supplierInfo').slide({
+            mainCell:".tabCon"
+            ,titCell:".tabTit span"
+            ,trigger: "click"
         });
-        //enter键登录
-        $(document).keyup(function (e) {
-            var e = e || event;
-            e.stopPropagation();
-            if (e.keyCode === 13) {
-                _self.loginSubmit();
+        //上垃加载更多
+        $(window).on('scroll', function(){
+            var scrollTop = $(this).scrollTop();
+            var scrollHeight = $(document).height();
+            var windowHeight = window.innerHeight + $("footer").height();
+            if (scrollTop + windowHeight >= scrollHeight) {
+                //此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作
+                var totalPage = Math.ceil(_self.listRecord / _self.params.size)?Math.ceil(_self.listRecord / _self.params.size):1;
+                var next = _self.params.num+1;
+                if(next <= totalPage){
+                    if (_self.requestFlag){
+                        _self.params.num = next;
+                        // 获取列表数据
+                        _self.getProductLists();
+                    }
+                    _self.requestFlag = false;
+                }
             }
         });
+        $('body').on("click", '.showSearch', function(){
+            $('.supplierTit .search').show();
+        })
     }
 });

+ 3 - 0
src/main/resources/static/js/document/list.js

@@ -575,6 +575,9 @@ var documentList = new Vue({
             var floorScroll = $('#supProduct').offset().top;
             $('html,body').animate({scrollTop: floorScroll},600);
         },
+        showPdfList:function(item){
+            item.subFloors = !item.subFloors;
+        },
         upgrade: function () {
             location.href='/upgrade.html';
         }

+ 14 - 10
src/main/resources/static/js/document/login.js

@@ -29,6 +29,11 @@ var loginPage = new Vue({
 
     },
     methods: {
+        GetAuthorization:function(){//授权登录
+            DocumentApi.GetAuthorization({},function(response){
+                console.log(response)
+            })
+        },
         getMobileImage:function() {//获取图形验证码
             var _self = this;
             var pass = verifyCheack('.massageBtn');
@@ -37,7 +42,7 @@ var loginPage = new Vue({
                 if (!pass) {
                     return false;
                 }
-                PublicApi.getImgVerifyCode({platformType: 0},function(response){
+                DocumentApi.GetImgVerifyCode({},function(response){
                     if(response.code == 0){
                         _self.imageCode = '';
                         _self.codeImagePath = response.data.baseImage;
@@ -49,17 +54,15 @@ var loginPage = new Vue({
                 })
             });
         },
-        getMobileCodeFn:function(){//机构注册获取注册短信验证码
+        getMobileCodeFn:function(){//获取登录短信验证码
             var _self = this;
             var params = {
-                mobile:_self.phonePwd.mobileOrEmail,
-                imgCode:_self.imageCode,
-                token:_self.codeImageToken,
-                activateCodeType:1,
-                platformType:0
+                    mobile:_self.loginAccount,
+                    imgCode:_self.imageCode,
+                    token:_self.codeImageToken
             };
             _self.isMobileDisabled = true;
-            UserApi.getRegisterMobileCode(params,function (response) {
+            DocumentApi.DocumentNote(params,function (response) {
                 if(response.code == 0){
                     _self.isCodeModel = false;
                     CAIMEI.dialog('验证短信已发送',false,function () {});
@@ -103,8 +106,8 @@ var loginPage = new Vue({
             this.$nextTick(function(){
                 if (!pass) { return false; }
                 _self.loginLoading = true;
-                var params =  {mobileOrEmail: _self.loginAccount,password: _self.loginPassword,source: 'www'};
-                UserApi.PostLoginAccount(params,function(response){
+                var params =  {mobile: _self.loginAccount,code: _self.activateCode};
+                DocumentApi.MobileCodeLogin(params,function(response){
                     _self.loginLoading = false;
                     if(response.code === 0){
                         _self.userData = {
@@ -154,6 +157,7 @@ var loginPage = new Vue({
         $('body').on("focus",'[needverify]:visible',function(){
             $(this).siblings('.errTips').removeClass("show").siblings('.checked').removeClass("show");
         });
+        _self.GetAuthorization();
         //enter键登录
         $(document).keyup(function (e) {
             var e = e || event;

+ 228 - 173
src/main/resources/static/js/document/more-content.js

@@ -1,209 +1,264 @@
-var loginPage = new Vue({
-    el: "#loginPage",
+var documentList = new Vue({
+    el: "#documentList",
     data: {
-        maxtime:60,
-        loginLoading: false,
-        qrCodeLogin: false,
-        loginAccount: '',
-        loginPassword: '',
-        rule:{
-            account: "(^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$)|(^\\d{6,12}$)",
-            password: "^[^\\u4e00-\\u9fa5]{6,30}$"
+        requestFlag: true,
+        userId: 0,
+        supplierInfo:{},
+        supplierBanner: [],
+        mainProducts:[],
+        params: {
+            size: 12,
+            num: 1,
+            id: 0,
+            keyword: ''
         },
-        userData: {
-            account: '',
-            email: '',
-            phone: '',
-            name: '',
-            userName: '',
-            userId: '',
-            spId: '',
-            clubId: '',
-            shopId: '',
-            identity: '',
-            permission: '',
-            token: ''
-        },
-        isWeChat: false
+        listRecord:0,
+        productLists:[],
+        pagesProductList:[
+            {
+                "id":6,
+                "type":null,
+                "title":"品牌仪器",
+                "detail":"科医人 赛诺龙 路创丽 Jeisys 华熙生物",
+                "link":null,
+                "subFloors":false,
+                "image":"https://img.caimei365.com/group1/M00/03/C2/Cmis2F-b03iAbm6AAAB-3AQ2ab4270.jpg",
+                "floorData":[
+                    {
+                        "id":19,
+                        "status":null,
+                        "title":"脸部抗衰仪器系列",
+                        "detail":null,
+                        "link":"http://www.caimei365.com/cmpage/info-1-22.html",
+                        "image":"https://img.caimei365.com/group1/M00/03/C2/Cmis2F-b03iAbm6AAAB-3AQ2ab4270.jpg",
+                        "beginTime":'2020-11-10 17:10',
+                        "endTime":null
+                    },
+                    {
+                        "id":23,
+                        "status":null,
+                        "title":"脱毛嫩肤仪器系列",
+                        "detail":null,
+                        "link":"https://www.caimei365.com/cmpage/info-1-20.html",
+                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R9kaAE5-iAACBMZJBjPU450.jpg",
+                        "beginTime":'2020-11-10 17:10',
+                        "endTime":null
+                    },
+                    {
+                        "id":22,
+                        "status":null,
+                        "title":"瘦身塑形仪器系列",
+                        "detail":null,
+                        "link":"https://www.caimei365.com/cmpage/info-1-49.html",
+                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R9HeAP5lxAACLzIoow4k828.jpg",
+                        "beginTime":'2020-11-10 17:10',
+                        "endTime":null
+                    },
+                    {
+                        "id":56,
+                        "status":null,
+                        "title":"激光仪器系列",
+                        "detail":null,
+                        "link":"https://www.caimei365.com/cmpage/info-1-228.html",
+                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R9GuAQslKAABsHxQEqMs728.jpg",
+                        "beginTime":'2020-11-10 17:10',
+                        "endTime":null
+                    },
+                    {
+                        "id":55,
+                        "status":null,
+                        "title":"光子嫩肤仪器系列",
+                        "detail":null,
+                        "link":"https://www.caimei365.com/cmpage/info-1-227.html",
+                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R9IWAPcPfAACGRRPiWNI482.jpg",
+                        "beginTime":'2020-11-10 17:10',
+                        "endTime":null
+                    }
+                ]
+            },
+        ],
     },
     computed: {
 
     },
     methods: {
-        toQrCodeLogin: function(){//切换微信登录二维码
+        getShopInfo: function(){
             var _self = this;
-            var timeClock = null;
-            this.qrCodeLogin = true;
-            UserApi.ToWechatLogin({},function(response){
-                var wxLogin = new WxLogin({
-                        self_redirect: true,
-                        id: "qrCodeWrap",
-                        appid: response.data.AppId,
-                        scope: 'snsapi_login',
-                        redirect_uri: response.data.redirect_uri,
-                        state: response.data.state,
-                        style: "black",
-                        href: "https://www.caimei365.com/css/base/base.pc.css"
-                });
-                timeClock = setInterval(function(){
-                    _self.maxtime--;
-                    if (_self.maxtime == 0) {
-                        clearInterval(timeClock);
-                    };
-                },1000);
-                _self.getWrchatStatusData({uuid:response.data.state})
+            $.getJSON(spiServer + "/supplier/home/detail",{supplierId: this.params.id}).done(function (r) {
+                if (r.code === 0 && r.data) {
+                    _self.supplierInfo = r.data;
+                }
             });
         },
-        getWrchatStatusData:function(params){//轮询查询用户是否扫描过二维码登录
+        getBanners: function(){
             var _self = this;
-            var timer = null;
-            UserApi.ToWechatPolling(params,function(response){
-                if(response.code == -90){
-                    if(_self.maxtime == 0){
-                        clearInterval(timer);
-                        _self.maxtime = 60;
-                        $('#qrCodeWrap').append('<div class="model"><div class="refresh-div"><img class="refresh" src="/img/base/shua.png" alt=""><p>二维码已失效,点击刷新</p></div></div>');
-                        $('#qrCodeWrap .model').click(function () {
-                            $(this).remove();
-                            _self.toQrCodeLogin();
-                        })
-                    }else{
-                        timer = setTimeout(function(){
-                            _self.getWrchatStatusData(params);
-                        },3000)
-                    }
-                }else {
-                    clearTimeout(timer); //清理定时任务
-                    if(response.code == 0){
-                        _self.userData = {
-                            account: response.data.account,
-                            email: response.data.email,
-                            phone: response.data.bindMobile,
-                            name: response.data.name,
-                            userName: response.data.userName,
-                            userId: response.data.userID,
-                            spId: response.data.serviceProviderID,
-                            clubId: response.data.clubID,
-                            shopId: response.data.shopID,
-                            userIdentity: response.data.userIdentity,
-                            permission: response.data.userPermission,
-                            token: response.data.token
-                        };
-                        _self.setStorages( _self.userData);
-                        // 登录成功页面跳转
-                        var loginBeforePath = getBaseCookie("loginBeforePath");
-                        if (loginBeforePath && loginBeforePath!='undefined' && loginBeforePath.indexOf('.html')>0) {
-                            delBaseCookie("loginBeforePath");
-                            window.location.href = loginBeforePath;
-                        } else if (_self.userData.userIdentity*1 === 3) {
-                            location.href = '/supplier/dashboard.html';
-                        } else if (_self.userData.userIdentity*1 === 2 || _self.userData.userIdentity*1 === 4) {
-                            location.href = '/user/dashboard.html';
+            $.getJSON(spiServer + "/supplier/home/images",{supplierId: this.params.id}).done(function (r) {
+                if (r.code === 0 && r.data) {
+                    _self.supplierBanner = r.data;
+                    _self.supplierBanner = r.data;
+                    setTimeout(function(){
+                        if (isPC) {
+                            $('#supplierBanner').slide({
+                                mainCell:".swiper-wrapper"
+                                ,titCell:".swiper-pagination span"
+                                ,effect: "leftLoop"
+                                ,prevCell:".swiper-button-prev"
+                                ,nextCell:".swiper-button-next"
+                                ,interTime: 2000
+                                ,autoPlay: true
+                                ,autoPage: false
+                                ,trigger: "mouseover"
+                            });
                         } else {
-                            location.href="/index.html";
+                            var swiper = new Swiper('#supplierBanner', {
+                                loop : true,
+                                autoplay: {
+                                    delay: 2000,
+                                    disableOnInteraction: false
+                                },
+                                navigation: {
+                                    nextEl: '.swiper-button-next',
+                                    prevEl: '.swiper-button-prev'
+                                },
+                                pagination: {
+                                    el: '.swiper-pagination',
+                                    clickable :true
+                                }
+                            });
                         }
-                    }else if(response.code == -4){
-                        window.location.href = '/bind.html';
-                    }
+                    },500);
                 }
             });
         },
-        // 微信公众号授权登录
-        weChatLogin: function(){
-            if (this.isWeChat) {
-                // 微信浏览器自动授权登录
-                var urlForWeChat = 'https://www.caimei365.com/we_chat/redirect_uri.html';
-                $.get(spiServer+'/user/authorizationLink?mode=2&redirectUri='+urlForWeChat, function(r){
-                    if(r.code===0 && r.data){
-                        setBaseCookie("weChatAutoLogin", 2);
-                        window.location.href = r.data;
+        getMainProducts: function(){
+            var _self = this;
+            $.getJSON(spiServer + "/supplier/home/products",{supplierId: this.params.id}).done(function (r) {
+                if (r.code === 0 && r.data) {
+                    if(_self.userId && _self.userId>0){
+                        var productIdArr = [];
+                        r.data.map(function (item) {
+                            // 0公开价格 1不公开价格 2仅对会员机构公开
+                            if (item.priceFlag !== 1) {
+                                productIdArr.push(item.id)
+                            }
+                        });
+                        setProductPrice(r.data, productIdArr.join(","), _self.userId, function () {
+                            _self.$forceUpdate();
+                            setTimeout(function(){
+                                // 图片懒加载
+                                $("img[data-original]").lazyload();
+                            },500);
+                        });
                     }
-                });
-            }
+                    _self.mainProducts = r.data;
+                }
+            });
         },
-        toNormalLogin: function(){
-            this.qrCodeLogin = false;
+        getProductLists: function(){
+            var _self = this;
+            $.getJSON(spiServer + "/search/query/product/supplier",{
+                keyword: _self.params.keyword,
+                pageSize: _self.params.size,
+                pageNum: _self.params.num,
+                id:_self.params.id
+            }, function (r) {
+                if (r.code === 0 && r.data) {
+                    var result = JSON.parse(r.data);
+                    _self.listRecord = result.total;
+                    var resultData = setSearchProductList(result.items, _self.userId, function(){
+                        _self.$forceUpdate();
+                        setTimeout(function(){
+                            // 图片懒加载
+                            $("img[data-original]").lazyload();
+                        },500);
+                    });
+                    _self.productLists = _self.productLists.concat(resultData);
+                }
+                _self.requestFlag = true;
+            })
         },
-        showPassword: function(event) {
-            var el = event.currentTarget;
-            var pwdEle = $(el).siblings('input');
-            if(pwdEle.attr('type') === 'password') {
-                $(el).addClass('on');
-                pwdEle.attr('type','text');
-            } else {
-                $(el).removeClass('on');
-                pwdEle.attr('type','password');
+        keyupSearch: function(event) {
+            // 搜索输入框 按回车键搜索
+            var keyCode = event.keyCode || event.which;
+            if(keyCode === 13){
+                this.supplierSearch();
             }
         },
-        blurHandle: function(event) {  // 失去焦点校验
-            var el = event.currentTarget;
-            verifyHandle(el);
-        },
-        loginSubmit: function () {  // 账号登录
-            var _self = this;
-            var pass = verifyForm();
-            if (this.loginLoading) { return false; }
-            this.$nextTick(function(){
-                if (!pass) { return false; }
-                _self.loginLoading = true;
-                var params =  {mobileOrEmail: _self.loginAccount,password: _self.loginPassword,source: 'www'};
-                UserApi.PostLoginAccount(params,function(response){
-                    _self.loginLoading = false;
-                    if(response.code === 0){
-                        _self.userData = {
-                            account: response.data.account,
-                            email: response.data.email,
-                            phone: response.data.bindMobile,
-                            name: response.data.name,
-                            userName: response.data.userName,
-                            userId: response.data.userID,
-                            spId: response.data.serviceProviderID,
-                            clubId: response.data.clubID,
-                            shopId: response.data.shopID,
-                            userIdentity: response.data.userIdentity,
-                            permission: response.data.userPermission,
-                            token: response.data.token
-                        };
-                        _self.setStorages( _self.userData);
-                        // 登录成功页面跳转
-                        var loginBeforePath = getBaseCookie("loginBeforePath");
-                        if (loginBeforePath && loginBeforePath!='undefined' && loginBeforePath.indexOf('.html')>0) {
-                            delBaseCookie("loginBeforePath");
-                            window.location.href = loginBeforePath;
-                        } else if (_self.userData.userIdentity*1 === 3) {
-                            location.href = '/supplier/dashboard.html';
-                        } else if (_self.userData.userIdentity*1 === 2 || _self.userData.userIdentity*1 === 4) {
-                            location.href = '/user/dashboard.html';
-                        } else {
-                            location.href="/index.html";
+        supplierSearch: function(){
+            if (this.params.keyword.length < 2) {
+                $.confirm({
+                    useBootstrap: false,
+                    boxWidth: (isPC?'300px':'70%'),
+                    title:'提示',
+                    content:'请至少输入两个关键字!',
+                    closeIcon: true,
+                    animation: 'opacity',
+                    closeAnimation: 'opacity',
+                    animateFromElement: false,
+                    buttons: {
+                        close: {
+                            text: '确定',
+                            btnClass: 'btn-confirm'
                         }
-                    } else {// 登录失败
-                        CAIMEI.Alert(response.msg,'确定',false);
                     }
                 });
-            });
+                return false;
+            }
+            this.productLists = [];
+            this.getProductLists();
+            var floorScroll = $('#supProduct').offset().top;
+            $('html,body').animate({scrollTop: floorScroll},600);
         },
-        setStorages:function(data){//存储本地数据
-            localStorage.setItem('userInfo',JSON.stringify(data));
+        showPdfList:function(item){
+            item.subFloors = !item.subFloors;
+        },
+        upgrade: function () {
+            location.href='/upgrade.html';
         }
     },
     created: function () {
-        var userAgent = navigator.userAgent.toLowerCase();
-        this.isWeChat = userAgent.match(/MicroMessenger/i);
-        // this.weChatAutoLogin();
+        this.params.id = getUrlParam("id") ? getUrlParam("id") * 1 : 0;
+        if(this.params.id !== 0) {
+            this.getShopInfo();
+            this.getBanners();
+        }
     },
     mounted: function () {
+        if(this.params.id !== 0) {
+            this.getMainProducts();
+            this.getProductLists();
+        }
+        var userInfo = localStorage.getItem('userInfo');
+        if(userInfo){
+            this.userId = JSON.parse(userInfo).userId;
+        }
         var _self = this;
-        $('body').on("focus",'[needverify]:visible',function(){
-            $(this).siblings('.errTips').removeClass("show").siblings('.checked').removeClass("show");
+        $('.supplierInfo').slide({
+            mainCell:".tabCon"
+            ,titCell:".tabTit span"
+            ,trigger: "click"
         });
-        //enter键登录
-        $(document).keyup(function (e) {
-            var e = e || event;
-            e.stopPropagation();
-            if (e.keyCode === 13) {
-                _self.loginSubmit();
+        //上垃加载更多
+        $(window).on('scroll', function(){
+            var scrollTop = $(this).scrollTop();
+            var scrollHeight = $(document).height();
+            var windowHeight = window.innerHeight + $("footer").height();
+            if (scrollTop + windowHeight >= scrollHeight) {
+                //此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作
+                var totalPage = Math.ceil(_self.listRecord / _self.params.size)?Math.ceil(_self.listRecord / _self.params.size):1;
+                var next = _self.params.num+1;
+                if(next <= totalPage){
+                    if (_self.requestFlag){
+                        _self.params.num = next;
+                        // 获取列表数据
+                        _self.getProductLists();
+                    }
+                    _self.requestFlag = false;
+                }
             }
         });
+        $('body').on("click", '.showSearch', function(){
+            $('.supplierTit .search').show();
+        })
     }
 });

+ 511 - 0
src/main/resources/static/lib/js/jquery.media.js

@@ -0,0 +1,511 @@
+/*
+ * jQuery Media Plugin for converting elements into rich media content.
+ *
+ * Examples and documentation at: http://malsup.com/jquery/media/
+ * Copyright (c) 2007-2010 M. Alsup
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * @author: M. Alsup
+ * @version: 0.99 (05-JUN-2013)
+ * @requires jQuery v1.1.2 or later
+ * $Id: jquery.media.js 2460 2007-07-23 02:53:15Z malsup $
+ *
+ * Supported Media Players:
+ *	- Flash
+ *	- Quicktime
+ *	- Real Player
+ *	- Silverlight
+ *	- Windows Media Player
+ *	- iframe
+ *
+ * Supported Media Formats:
+ *	 Any types supported by the above players, such as:
+ *	 Video: asf, avi, flv, mov, mpg, mpeg, mp4, qt, smil, swf, wmv, 3g2, 3gp
+ *	 Audio: aif, aac, au, gsm, mid, midi, mov, mp3, m4a, snd, rm, wav, wma
+ *	 Other: bmp, html, pdf, psd, qif, qtif, qti, tif, tiff, xaml
+ *
+ * Thanks to Mark Hicken and Brent Pedersen for helping me debug this on the Mac!
+ * Thanks to Dan Rossi for numerous bug reports and code bits!
+ * Thanks to Skye Giordano for several great suggestions!
+ * Thanks to Richard Connamacher for excellent improvements to the non-IE behavior!
+ */
+/*global SWFObject alert Sys */
+/*jshint forin:false */
+;(function($) {
+"use strict";	
+
+var mode = document.documentMode || 0;
+var msie = /MSIE/.test(navigator.userAgent);
+var lameIE = msie && (/MSIE (6|7|8)\.0/.test(navigator.userAgent) || mode < 9);
+
+/**
+ * Chainable method for converting elements into rich media.
+ *
+ * @param options
+ * @param callback fn invoked for each matched element before conversion
+ * @param callback fn invoked for each matched element after conversion
+ */
+$.fn.media = function(options, f1, f2) {
+	if (options == 'undo') {
+		return this.each(function() {
+			var $this = $(this);
+			var html = $this.data('media.origHTML');
+			if (html)
+				$this.replaceWith(html);
+		});
+	}
+	
+	return this.each(function() {
+		if (typeof options == 'function') {
+			f2 = f1;
+			f1 = options;
+			options = {};
+		}
+		var o = getSettings(this, options);
+		// pre-conversion callback, passes original element and fully populated options
+		if (typeof f1 == 'function') f1(this, o);
+
+		var r = getTypesRegExp();
+		var m = r.exec(o.src.toLowerCase()) || [''];
+		var fn;
+
+		if (o.type)
+			m[0] = o.type;
+		else
+			m.shift();
+
+		for (var i=0; i < m.length; i++) {
+			fn = m[i].toLowerCase();
+			if (isDigit(fn[0])) fn = 'fn' + fn; // fns can't begin with numbers
+			if (!$.fn.media[fn])
+				continue;  // unrecognized media type
+			// normalize autoplay settings
+			var player = $.fn.media[fn+'_player'];
+			if (!o.params) o.params = {};
+			if (player) {
+				var num = player.autoplayAttr == 'autostart';
+				o.params[player.autoplayAttr || 'autoplay'] = num ? (o.autoplay ? 1 : 0) : o.autoplay ? true : false;
+			}
+			var $div = $.fn.media[fn](this, o);
+
+			$div.css('backgroundColor', o.bgColor).width(o.width);
+			
+			if (o.canUndo) {
+				var $temp = $('<div></div>').append(this);
+				$div.data('media.origHTML', $temp.html()); // store original markup
+			}
+			
+			// post-conversion callback, passes original element, new div element and fully populated options
+			if (typeof f2 == 'function') f2(this, $div[0], o, player.name);
+			break;
+		}
+	});
+};
+
+/**
+ * Non-chainable method for adding or changing file format / player mapping
+ * @name mapFormat
+ * @param String format File format extension (ie: mov, wav, mp3)
+ * @param String player Player name to use for the format (one of: flash, quicktime, realplayer, winmedia, silverlight or iframe
+ */
+$.fn.media.mapFormat = function(format, player) {
+	if (!format || !player || !$.fn.media.defaults.players[player]) return; // invalid
+	format = format.toLowerCase();
+	if (isDigit(format[0])) format = 'fn' + format;
+	$.fn.media[format] = $.fn.media[player];
+	$.fn.media[format+'_player'] = $.fn.media.defaults.players[player];
+};
+
+// global defautls; override as needed
+$.fn.media.defaults = {
+	standards:  true,       // use object tags only (no embeds for non-IE browsers)
+	canUndo:    true,       // tells plugin to store the original markup so it can be reverted via: $(sel).mediaUndo()
+	width:		400,
+	height:		400,
+	autoplay:	0,			// normalized cross-player setting
+	bgColor:	'#ffffff',	// background color
+	params:		{ wmode: 'transparent'},	// added to object element as param elements; added to embed element as attrs
+	attrs:		{},			// added to object and embed elements as attrs
+	flvKeyName: 'file',		// key used for object src param (thanks to Andrea Ercolino)
+	flashvars:	{},			// added to flash content as flashvars param/attr
+	flashVersion:	'7',	// required flash version
+	expressInstaller: null,	// src for express installer
+
+	// default flash video and mp3 player (@see: http://jeroenwijering.com/?item=Flash_Media_Player)
+	flvPlayer:	 'mediaplayer.swf',
+	mp3Player:	 'mediaplayer.swf',
+
+	// @see http://msdn2.microsoft.com/en-us/library/bb412401.aspx
+	silverlight: {
+		inplaceInstallPrompt: 'true', // display in-place install prompt?
+		isWindowless:		  'true', // windowless mode (false for wrapping markup)
+		framerate:			  '24',	  // maximum framerate
+		version:			  '0.9',  // Silverlight version
+		onError:			  null,	  // onError callback
+		onLoad:			      null,   // onLoad callback
+		initParams:			  null,	  // object init params
+		userContext:		  null	  // callback arg passed to the load callback
+	}
+};
+
+// Media Players; think twice before overriding
+$.fn.media.defaults.players = {
+	flash: {
+		name:		 'flash',
+		title:		 'Flash',
+		types:		 'flv,mp3,swf',
+		mimetype:	 'application/x-shockwave-flash',
+		pluginspage: 'http://www.adobe.com/go/getflashplayer',
+		ieAttrs: {
+			classid:  'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
+			type:	  'application/x-oleobject',
+			codebase: 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + $.fn.media.defaults.flashVersion
+		}
+	},
+	quicktime: {
+		name:		 'quicktime',
+		title:		 'QuickTime',
+		mimetype:	 'video/quicktime',
+		pluginspage: 'http://www.apple.com/quicktime/download/',
+		types:		 'aif,aiff,aac,au,bmp,gsm,mov,mid,midi,mpg,mpeg,mp4,m4a,psd,qt,qtif,qif,qti,snd,tif,tiff,wav,3g2,3gp',
+		ieAttrs: {
+			classid:  'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
+			codebase: 'http://www.apple.com/qtactivex/qtplugin.cab'
+		}
+	},
+	realplayer: {
+		name:		  'real',
+		title:		  'RealPlayer',
+		types:		  'ra,ram,rm,rpm,rv,smi,smil',
+		mimetype:	  'audio/x-pn-realaudio-plugin',
+		pluginspage:  'http://www.real.com/player/',
+		autoplayAttr: 'autostart',
+		ieAttrs: {
+			classid: 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'
+		}
+	},
+	winmedia: {
+		name:		  'winmedia',
+		title:		  'Windows Media',
+		types:		  'asx,asf,avi,wma,wmv',
+		mimetype:	  isFirefoxWMPPluginInstalled() ? 'application/x-ms-wmp' : 'application/x-mplayer2',
+		pluginspage:  'http://www.microsoft.com/Windows/MediaPlayer/',
+		autoplayAttr: 'autostart',
+		oUrl:		  'url',
+		ieAttrs: {
+			classid:  'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6',
+			type:	  'application/x-oleobject'
+		}
+	},
+	// special cases
+	img: {
+		name:  'img',
+		title: 'Image',
+		types: 'gif,png,jpg'
+	},
+	iframe: {
+		name:  'iframe',
+		types: 'html,pdf'
+	},
+	silverlight: {
+		name:  'silverlight',
+		types: 'xaml'
+	}
+};
+
+//
+//	everything below here is private
+//
+
+
+// detection script for FF WMP plugin (http://www.therossman.org/experiments/wmp_play.html)
+// (hat tip to Mark Ross for this script)
+function isFirefoxWMPPluginInstalled() {
+	var plugs = navigator.plugins || [];
+	for (var i = 0; i < plugs.length; i++) {
+		var plugin = plugs[i];
+		if (plugin['filename'] == 'np-mswmp.dll')
+			return true;
+	}
+	return false;
+}
+
+var counter = 1;
+
+for (var player in $.fn.media.defaults.players) {
+	var types = $.fn.media.defaults.players[player].types;
+	$.each(types.split(','), function(i,o) {
+		if (isDigit(o[0])) o = 'fn' + o;
+		$.fn.media[o] = $.fn.media[player] = getGenerator(player);
+		$.fn.media[o+'_player'] = $.fn.media.defaults.players[player];
+	});
+}
+
+function getTypesRegExp() {
+	var types = '';
+	for (var player in $.fn.media.defaults.players) {
+		if (types.length) types += ',';
+		types += $.fn.media.defaults.players[player].types;
+	}
+	return new RegExp('\\.(' + types.replace(/,/ig,'|') + ')\\b');
+}
+
+function getGenerator(player) {
+	return function(el, options) {
+		return generate(el, options, player);
+	};
+}
+
+function isDigit(c) {
+	return '0123456789'.indexOf(c) > -1;
+}
+
+// flatten all possible options: global defaults, meta, option obj
+function getSettings(el, options) {
+	options = options || {};
+	var a, n;
+	var $el = $(el);
+	var cls = el.className || '';
+	// support metadata plugin (v1.0 and v2.0)
+	var meta = $.metadata ? $el.metadata() : $.meta ? $el.data() : {};
+	meta = meta || {};
+	var w = meta.width  || parseInt(((cls.match(/\bw:(\d+)/)||[])[1]||0),10) || parseInt(((cls.match(/\bwidth:(\d+)/)||[])[1]||0),10);
+	var h = meta.height || parseInt(((cls.match(/\bh:(\d+)/)||[])[1]||0),10) || parseInt(((cls.match(/\bheight:(\d+)/)||[])[1]||0),10);
+
+	if (w) meta.width = w;
+	if (h) meta.height = h;
+	if (cls) meta.cls = cls;
+	
+	// crank html5 style data attributes
+	var dataName = 'data-';
+    for (var i=0; i < el.attributes.length; i++) {
+        a = el.attributes[i], n = $.trim(a.name);
+        var index = n.indexOf(dataName);
+        if (index === 0) {
+			n = n.substring(dataName.length);
+			meta[n] = a.value;
+        }
+    }
+
+	a = $.fn.media.defaults;
+	var b = options;
+	var c = meta;
+
+	var p = { params: { bgColor: options.bgColor || $.fn.media.defaults.bgColor } };
+	var opts = $.extend({}, a, b, c);
+	$.each(['attrs','params','flashvars','silverlight'], function(i,o) {
+		opts[o] = $.extend({}, p[o] || {}, a[o] || {}, b[o] || {}, c[o] || {});
+	});
+
+	if (typeof opts.caption == 'undefined') opts.caption = $el.text();
+
+	// make sure we have a source!
+	opts.src = opts.src || $el.attr('href') || $el.attr('src') || 'unknown';
+	return opts;
+}
+
+//
+//	Flash Player
+//
+
+// generate flash using SWFObject library if possible
+$.fn.media.swf = function(el, opts) {
+	var f, p;
+	if (!window.SWFObject && !window.swfobject) {
+		// roll our own
+		if (opts.flashvars) {
+			var a = [];
+			for (f in opts.flashvars)
+				a.push(f + '=' + opts.flashvars[f]);
+			if (!opts.params) opts.params = {};
+			opts.params.flashvars = a.join('&');
+		}
+		return generate(el, opts, 'flash');
+	}
+
+	var id = el.id ? (' id="'+el.id+'"') : '';
+	var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
+	var $div = $('<div' + id + cls + '>');
+
+	// swfobject v2+
+	if (window.swfobject) {
+		$(el).after($div).appendTo($div);
+		if (!el.id) el.id = 'movie_player_' + counter++;
+
+		// replace el with swfobject content
+		window.swfobject.embedSWF(opts.src, el.id, opts.width, opts.height, opts.flashVersion,
+			opts.expressInstaller, opts.flashvars, opts.params, opts.attrs);
+	}
+	// swfobject < v2
+	else {
+		$(el).after($div).remove();
+		var so = new SWFObject(opts.src, 'movie_player_' + counter++, opts.width, opts.height, opts.flashVersion, opts.bgColor);
+		if (opts.expressInstaller) so.useExpressInstall(opts.expressInstaller);
+
+		for (p in opts.params)
+			if (p != 'bgColor') so.addParam(p, opts.params[p]);
+		for (f in opts.flashvars)
+			so.addVariable(f, opts.flashvars[f]);
+		so.write($div[0]);
+	}
+
+	if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
+	return $div;
+};
+
+// map flv and mp3 files to the swf player by default
+$.fn.media.flv = $.fn.media.mp3 = function(el, opts) {
+	var src = opts.src;
+	var player = /\.mp3\b/i.test(src) ? opts.mp3Player : opts.flvPlayer;
+	var key = opts.flvKeyName;
+	src = encodeURIComponent(src);
+	opts.src = player;
+	opts.src = opts.src + '?'+key+'=' + (src);
+	var srcObj = {};
+	srcObj[key] = src;
+	opts.flashvars = $.extend({}, srcObj, opts.flashvars );
+	return $.fn.media.swf(el, opts);
+};
+
+//
+//	Silverlight
+//
+$.fn.media.xaml = function(el, opts) {
+	if (!window.Sys || !window.Sys.Silverlight) {
+		if ($.fn.media.xaml.warning) return;
+		$.fn.media.xaml.warning = 1;
+		alert('You must include the Silverlight.js script.');
+		return;
+	}
+
+	var props = {
+		width: opts.width,
+		height: opts.height,
+		background: opts.bgColor,
+		inplaceInstallPrompt: opts.silverlight.inplaceInstallPrompt,
+		isWindowless: opts.silverlight.isWindowless,
+		framerate: opts.silverlight.framerate,
+		version: opts.silverlight.version
+	};
+	var events = {
+		onError: opts.silverlight.onError,
+		onLoad: opts.silverlight.onLoad
+	};
+
+	var id1 = el.id ? (' id="'+el.id+'"') : '';
+	var id2 = opts.id || 'AG' + counter++;
+	// convert element to div
+	var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
+	var $div = $('<div' + id1 + cls + '>');
+	$(el).after($div).remove();
+
+	Sys.Silverlight.createObjectEx({
+		source: opts.src,
+		initParams: opts.silverlight.initParams,
+		userContext: opts.silverlight.userContext,
+		id: id2,
+		parentElement: $div[0],
+		properties: props,
+		events: events
+	});
+
+	if (opts.caption) $('<div>').appendTo($div).html(opts.caption);
+	return $div;
+};
+
+//
+// generate object/embed markup
+//
+function generate(el, opts, player) {
+	var $el = $(el);
+	var o = $.fn.media.defaults.players[player];
+	var a, key, v;
+
+	if (player == 'iframe') {
+		o = $('<iframe' + ' width="' + opts.width + '" height="' + opts.height + '" >');
+		o.attr('src', opts.src);
+		o.css('backgroundColor', o.bgColor);
+	}
+	else if (player == 'img') {
+		o = $('<img>');
+		o.attr('src', opts.src);
+		if (opts.width)
+			o.attr('width', opts.width);
+		if (opts.height)
+			o.attr('height', opts.height);
+		o.css('backgroundColor', o.bgColor);
+	}
+	else if (lameIE) {
+		a = ['<object width="' + opts.width + '" height="' + opts.height + '" '];
+		for (key in opts.attrs)
+			a.push(key + '="'+opts.attrs[key]+'" ');
+		for (key in o.ieAttrs || {}) {
+			v = o.ieAttrs[key];
+			if (key == 'codebase' && window.location.protocol == 'https:')
+				v = v.replace('http','https');
+			a.push(key + '="'+v+'" ');
+		}
+		a.push('></ob'+'ject'+'>');
+		var p = ['<param name="' + (o.oUrl || 'src') +'" value="' + opts.src + '">'];
+		for (key in opts.params)
+			p.push('<param name="'+ key +'" value="' + opts.params[key] + '">');
+		o = document.createElement(a.join(''));
+		for (var i=0; i < p.length; i++)
+			o.appendChild(document.createElement(p[i]));
+	}
+	else if (opts.standards) {
+		// Rewritten to be standards compliant by Richard Connamacher
+		a = ['<object type="' + o.mimetype +'" width="' + opts.width + '" height="' + opts.height +'"'];
+		if (opts.src) a.push(' data="' + opts.src + '" ');
+		if (msie) {
+			for (key in o.ieAttrs || {}) {
+				v = o.ieAttrs[key];
+				if (key == 'codebase' && window.location.protocol == 'https:')
+					v = v.replace('http','https');
+				a.push(key + '="'+v+'" ');
+			}
+		}
+		a.push('>');
+		a.push('<param name="' + (o.oUrl || 'src') +'" value="' + opts.src + '">');
+		for (key in opts.params) {
+			if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode
+				continue;
+			a.push('<param name="'+ key +'" value="' + opts.params[key] + '">');
+		}
+		// Alternate HTML
+		a.push('<div><p><strong>'+o.title+' Required</strong></p><p>'+o.title+' is required to view this media. <a href="'+o.pluginspage+'">Download Here</a>.</p></div>');
+		a.push('</ob'+'ject'+'>');
+	}
+	 else {
+	        a = ['<embed width="' + opts.width + '" height="' + opts.height + '" style="display:block"'];
+	        if (opts.src) a.push(' src="' + opts.src + '" ');
+	        for (key in opts.attrs)
+	            a.push(key + '="'+opts.attrs[key]+'" ');
+	        for (key in o.eAttrs || {})
+	            a.push(key + '="'+o.eAttrs[key]+'" ');
+	        for (key in opts.params) {
+	            if (key == 'wmode' && player != 'flash') // FF3/Quicktime borks on wmode
+					continue;
+	            a.push(key + '="'+opts.params[key]+'" ');
+	        }
+	        a.push('></em'+'bed'+'>');
+	    }	
+	// convert element to div
+	var id = el.id ? (' id="'+el.id+'"') : '';
+	var cls = opts.cls ? (' class="' + opts.cls + '"') : '';
+	var $div = $('<div' + id + cls + '>');
+	$el.after($div).remove();
+	if (lameIE || player == 'iframe' || player == 'img')
+		$div.append(o);
+	else
+		$div.html(a.join(''));
+	
+	if (opts.caption) 
+		$('<div>').appendTo($div).html(opts.caption);
+	return $div;
+}
+
+
+})(jQuery);

+ 10 - 0
src/main/resources/templates/components/document-link.html

@@ -0,0 +1,10 @@
+<script charset="utf-8" type="text/javascript" src="/lib/jquery-3.5.1.min.js"></script>
+<script charset="utf-8" type="text/javascript" src="/lib/jquery.slide-2.1.3.js"></script>
+<script charset="utf-8" type="text/javascript" src="/lib/swiper.min.js"></script>
+<script charset="utf-8" type="text/javascript" src="/lib/viewer.min.js"></script>
+<script charset="utf-8" type="text/javascript" src="/lib/jquery-confirm.min.js"></script>
+<script charset="utf-8" type="text/javascript" src="/lib/vue2.6.11.min.js"></script>
+<script charset="utf-8" type="text/javascript" src="/lib/lazyload.js"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/locallhostAjax.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/utils.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/base.js(v=${version})}"></script>

+ 42 - 46
src/main/resources/templates/document/details.html

@@ -4,62 +4,58 @@
 <head>
     <title>采美365网--医疗美容生活美容正品采购平台</title>
     <template th:replace="components/head-link"></template>
-    <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
-    <link th:href="@{/css/account/login.css(v=${version})}" rel="stylesheet" type="text/css">
+    <link th:href="@{/css/document/details.css(v=${version})}" rel="stylesheet" type="text/css">
 </head>
 <body>
-<!-- 引用头部 -->
-<template th:replace="account/components/header"></template>
-
 <!-- 二级页面 -->
-<div id="loginPage">
-    <div class="loginWrap clear">
-        <div class="loginForm">
-            <div class="title">
-                <h1>欢迎登录</h1>
-                <h2>生美 / 医美采购服务平台</h2>
-            </div>
-            <form v-show="!qrCodeLogin">
-                <div class="formLine">
-                    <input type="text" v-model="loginAccount" placeholder="请输入邮箱或手机号" :rule="rule.account" maxlength="30" @blur="blurHandle($event)" needverify>
-                    <i class="checked icon mIcon"></i>
-                    <span class="errTips icon mIcon" tips="请提供正确的邮箱或手机号码"></span>
-                </div>
-                <div class="formLine">
-                    <input type="password" v-model="loginPassword" placeholder="请输入密码" :rule="rule.password" maxlength="30" @blur="blurHandle($event)" needverify>
-                    <i class="checked icon mIcon"></i>
-                    <span class="errTips icon mIcon" tips="请输入正确的密码"></span>
-                    <i class="icon showPwd" @click="showPassword($event)"></i>
-                </div>
-                <div class="forget">
-                    <a href="/forget.html">忘记密码?</a>
+<div id="documentList">
+    <!-- 引用头部 -->
+    <header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml">
+        <div class="header document">
+            <div class="wrap clear">
+                <img class="logo" src="/img/document/document_logo.png" alt="采美 生美/医美采购服务平台"/>
+                <span>采美资料库</span>
+                <div class="search">
+                    <input class="input" type="text" placeholder="请输入商品名/资料库名/资料名">
+                    <div class="icon-search">
+                        <img src="/img/document/icon-search.png" alt="">
+                    </div>
                 </div>
-                <div class="submit clear">
-                    <a v-if="isPC" class="btn" href="/register.html">免费注册</a>
-                    <button class="btn" type="button" @click="loginSubmit()">登录</button>
-                    <a v-if="!isPC" class="btn" href="/register.html">免费注册</a>
-                    <a v-if="!isPC && isWeChat" class="weChat" @click="weChatLogin()" href="javascript:void(0);">
-                        <span>微信授权登录</span><i class="mIcon"></i>
-                    </a>
-                </div>
-                <a v-if="isPC" href="javascript:void(0);" class="codeBtn icon" @click="toQrCodeLogin()"></a>
-            </form>
-            <div v-if="isPC" v-show="qrCodeLogin" class="qrCodeBox">
-                <a href="javascript:void(0);" class="changeBtn icon" @click="toNormalLogin()">账号登录</a>
-                <div id="qrCodeWrap">
-                    <div class="qrCode"><img src="" alt=""></div>
-                    <div class="qrInfo">请使用微信扫描二维码登录“采美365网”</div>
+            </div>
+        </div>
+        <input type="hidden" th:value="${spiServer}" id="spiServer">
+        <input type="hidden" th:value="${agent}" id="userAgent">
+    </header>
+    <div class="document-content">
+        <div class="inner">
+            <div class="document-list">
+                <div class="list-item">
+                    <div class="list-item-top">
+                        <div class="image"><img :src="ziliaoobjectL.image" alt=""></div>
+                        <div class="main">
+                            <h1>供应商:{{ ziliaoobjectL.title }}</h1>
+                            <p>商品名称:{{ ziliaoobjectL.detail }}</p>
+                            <p>资料库名称:{{ ziliaoobjectL.detail }} <span>更多资料</span></p>
+                        </div>
+                    </div>
+                    <div class="list-item-bot">
+                        <a class="media" href="https://caimei-oss.oss-cn-shenzhen.aliyuncs.com/4ad2d011ddd042eeb67bbf0c98b8676f.pdf?Expires=1605003414&OSSAccessKeyId=TMP.3Ke2igY3FDxGQRWsktJiWquqp6zhVrN5kVy6GmajMz4dGkYEsz7ZcYCF73NRFuUvi7wjyqHEuH74CSQ22DrgEZSKMjSuSZ&Signature=6l%2FX5C1uaYYRALW0bRSqPauCzow%3D"></a>
+                    </div>
                 </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" src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
-<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/account/login.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/lib/js/jquery.media.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/document/details.js(v=${version})}"></script>
+<script type="text/javascript">
+    $(function() {
+        $('a.media').media({width:1160, height:1158});
+        $('a.mediase').media({width:1160, height:1158});
+    });
+</script>
 </body>
 </html>

+ 2 - 1
src/main/resources/templates/document/list.html

@@ -37,10 +37,11 @@
                             <p>商品名称:{{ item.detail }}</p>
                             <p>资料库名称:{{ item.detail }}</p>
                         </div>
+                        <i class="icon mIcon" @click="showPdfList(item)" :class="item.subFloors ? 'top' : ''"></i>
                     </div>
                     <div class="list-item-bot" v-if="item.subFloors">
                         <div class="pdf-li" v-for="(pdf,idx) in item.floorData" :key="idx">
-                            <img class="img" src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3803097572,3132492008&fm=26&gp=0.jpg" alt="">
+                            <img class="img" src="/img/document/pdf.png" alt="">
                             <p class="name">{{ pdf.title }}</p>
                             <p class="time">{{ pdf.beginTime }}</p>
                         </div>

+ 3 - 3
src/main/resources/templates/document/login.html

@@ -30,9 +30,9 @@
                 <div class="title">
                     <h1>欢迎登录</h1>
                 </div>
-                <form v-show="!qrCodeLogin">
+                <form>
                     <div class="formLine">
-                        <input type="text" v-model="loginAccount" placeholder="请输入手机号" :rule="rule.phone" maxlength="30" @blur="blurHandle($event)" needverify>
+                        <input class="massageBtn" type="text" v-model="loginAccount" placeholder="请输入手机号" :rule="rule.phone" maxlength="11" @blur="blurHandle($event)" needverify>
                         <i class="checked icon mIcon"></i>
                         <span class="errTips icon mIcon" tips="请输入正确的手机号"></span>
                     </div>
@@ -69,7 +69,7 @@
     </div>
 </div>
 <!-- 引入底部 -->
-<template th:replace="components/foot-link"></template>
+<template th:replace="components/document-link"></template>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/document/login.js(v=${version})}"></script>
 </body>

+ 40 - 46
src/main/resources/templates/document/more-content.html

@@ -4,62 +4,56 @@
 <head>
     <title>采美365网--医疗美容生活美容正品采购平台</title>
     <template th:replace="components/head-link"></template>
-    <link th:href="@{/css/base/form.css(v=${version})}" rel="stylesheet" type="text/css">
-    <link th:href="@{/css/account/login.css(v=${version})}" rel="stylesheet" type="text/css">
+    <link th:href="@{/css/document/more-content.css(v=${version})}" rel="stylesheet" type="text/css">
 </head>
 <body>
-<!-- 引用头部 -->
-<template th:replace="account/components/header"></template>
-
 <!-- 二级页面 -->
-<div id="loginPage">
-    <div class="loginWrap clear">
-        <div class="loginForm">
-            <div class="title">
-                <h1>欢迎登录</h1>
-                <h2>生美 / 医美采购服务平台</h2>
-            </div>
-            <form v-show="!qrCodeLogin">
-                <div class="formLine">
-                    <input type="text" v-model="loginAccount" placeholder="请输入邮箱或手机号" :rule="rule.account" maxlength="30" @blur="blurHandle($event)" needverify>
-                    <i class="checked icon mIcon"></i>
-                    <span class="errTips icon mIcon" tips="请提供正确的邮箱或手机号码"></span>
-                </div>
-                <div class="formLine">
-                    <input type="password" v-model="loginPassword" placeholder="请输入密码" :rule="rule.password" maxlength="30" @blur="blurHandle($event)" needverify>
-                    <i class="checked icon mIcon"></i>
-                    <span class="errTips icon mIcon" tips="请输入正确的密码"></span>
-                    <i class="icon showPwd" @click="showPassword($event)"></i>
-                </div>
-                <div class="forget">
-                    <a href="/forget.html">忘记密码?</a>
+<div id="documentList">
+    <!-- 引用头部 -->
+    <header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml">
+        <div class="header document">
+            <div class="wrap clear">
+                <img class="logo" src="/img/document/document_logo.png" alt="采美 生美/医美采购服务平台"/>
+                <span>采美资料库</span>
+                <div class="search">
+                    <input class="input" type="text" placeholder="请输入商品名/资料库名/资料名">
+                    <div class="icon-search">
+                        <img src="/img/document/icon-search.png" alt="">
+                    </div>
                 </div>
-                <div class="submit clear">
-                    <a v-if="isPC" class="btn" href="/register.html">免费注册</a>
-                    <button class="btn" type="button" @click="loginSubmit()">登录</button>
-                    <a v-if="!isPC" class="btn" href="/register.html">免费注册</a>
-                    <a v-if="!isPC && isWeChat" class="weChat" @click="weChatLogin()" href="javascript:void(0);">
-                        <span>微信授权登录</span><i class="mIcon"></i>
-                    </a>
-                </div>
-                <a v-if="isPC" href="javascript:void(0);" class="codeBtn icon" @click="toQrCodeLogin()"></a>
-            </form>
-            <div v-if="isPC" v-show="qrCodeLogin" class="qrCodeBox">
-                <a href="javascript:void(0);" class="changeBtn icon" @click="toNormalLogin()">账号登录</a>
-                <div id="qrCodeWrap">
-                    <div class="qrCode"><img src="" alt=""></div>
-                    <div class="qrInfo">请使用微信扫描二维码登录“采美365网”</div>
+            </div>
+        </div>
+        <input type="hidden" th:value="${spiServer}" id="spiServer">
+        <input type="hidden" th:value="${agent}" id="userAgent">
+    </header>
+    <div class="document-content">
+        <div class="inner">
+            <div class="document-list">
+                <div class="list-item" v-for="(item,index) in pagesProductList" :key="index">
+                    <div class="list-item-top">
+                        <div class="image"><img :src="item.image" alt=""></div>
+                        <div class="main">
+                            <h1>供应商:{{ item.title }}</h1>
+                            <p>商品名称:{{ item.detail }}</p>
+                            <p>资料库名称:{{ item.detail }}</p>
+                        </div>
+                        <i class="icon mIcon" @click="showPdfList(item)" :class="item.subFloors ? 'top' : ''"></i>
+                    </div>
+                    <div class="list-item-bot" v-if="item.subFloors">
+                        <div class="pdf-li" v-for="(pdf,idx) in item.floorData" :key="idx">
+                            <img class="img" src="/img/document/pdf.png" alt="">
+                            <p class="name">{{ pdf.title }}</p>
+                            <p class="time">{{ pdf.beginTime }}</p>
+                        </div>
+                    </div>
                 </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" src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
-<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/account/login.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/document.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/document/more-content.js(v=${version})}"></script>
 </body>
 </html>