Ver Fonte

资料库

zhengjinyi há 4 anos atrás
pai
commit
af8a8462e4

+ 1 - 1
src/main/resources/static/css/document/details.css

@@ -23,7 +23,7 @@ li{list-style:none}
     .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{width: 44px;height: 44px;float: right;box-sizing: border-box;padding: 10px;cursor: pointer;}
     .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;}

+ 1 - 1
src/main/resources/static/css/document/list.css

@@ -23,7 +23,7 @@ li{list-style:none}
     .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{width: 44px;height: 44px;float: right;box-sizing: border-box;padding: 10px;cursor: pointer;}
     .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;}

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

@@ -23,7 +23,7 @@ li{list-style:none}
     .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{width: 44px;height: 44px;float: right;box-sizing: border-box;padding: 10px;cursor: pointer;}
     .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;}

+ 1 - 2
src/main/resources/static/js/common/locallhostAjax.service.js

@@ -33,8 +33,7 @@ var LocakkHost = {
             }).then(function(res) {
                 if(res.code== -99){
                     CAIMEI.Alert('登录已失效,请重新登录','去登录',true,function () {
-                        CAIMEI.Storage.clear();
-                        location.href = "/login.html";
+                        location.href = "/document/login.html";
                     });
                 }else{
                     def.resolve(res);

+ 19 - 1
src/main/resources/static/js/common/serviceapi/document.service.js

@@ -22,10 +22,28 @@ var DocumentApi = {
                 callback(res);
             });
         },
-        MobileCodeLogin: function (params, callback) {//资料库获取短信验证码
+        MobileCodeLogin: function (params, callback) {//资料库登录
             LocakkHost.AjaxService({ url:'/document/mobileCodeLogin', type:'POST', data:params, json:false})
             .then(function(res){
                 callback(res);
             });
         },
+        GetDocumentDataList: function (params, callback) {//资料库获取列表
+            LocakkHost.AjaxService({ url:'/document/dataList', type:'GET', data:params, json:false})
+            .then(function(res){
+                callback(res);
+            });
+        },
+        GetDocumentDataDetails: function (params, callback) {//资料库获取详情
+            LocakkHost.AjaxService({ url:'/document/dataDetails', type:'GET', data:params, json:false})
+            .then(function(res){
+                callback(res);
+            });
+        },
+        GetDocumentMoreData: function (params, callback) {//资料库获取详情
+            LocakkHost.AjaxService({ url:'/document/moreData', type:'GET', data:params, json:false})
+            .then(function(res){
+                callback(res);
+            });
+        },
 };

+ 31 - 242
src/main/resources/static/js/document/details.js

@@ -1,262 +1,51 @@
 var documentList = new Vue({
     el: "#documentList",
     data: {
-        requestFlag: true,
-        userId: 0,
-        supplierInfo:{},
-        supplierBanner: [],
-        mainProducts:[],
-        params: {
-            size: 12,
-            num: 1,
-            id: 0,
-            keyword: ''
-        },
-        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
-                }
-            ]
-        },
+        pdfId:0,
+        ossArchive:{},
+        ossArchivePdf: {},
+        keyWord:'',
     },
     computed: {
 
     },
     methods: {
-        getShopInfo: function(){
+        GetDocumentDataDetailsInfo:function(){//查询资料详情
             var _self = this;
-            $.getJSON(spiServer + "/supplier/home/detail",{supplierId: this.params.id}).done(function (r) {
-                if (r.code === 0 && r.data) {
-                    _self.supplierInfo = r.data;
+            DocumentApi.GetDocumentDataDetails({pdfId:_self.pdfId},function(response){
+                if(response.code == 0){
+                    var data = response.data;
+                    _self.ossArchive = data.ossArchive;
+                    _self.ossArchivePdf = data.ossArchivePdf;
+                    setTimeout(function () {
+                        $('a.media').media({width:1160, height:1158});
+                        $('a.mediase').media({width:1160, height:1158});
+                    },0);
+                }else{
+                    CAIMEI.Alert(response.msg, '确定', false);
                 }
-            });
-        },
-        getBanners: function(){
-            var _self = this;
-            $.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 {
-                            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
-                                }
-                            });
-                        }
-                    },500);
-                }
-            });
-        },
-        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;
-                }
-            });
-        },
-        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;
             })
         },
-        keyupSearch: function(event) {
-            // 搜索输入框 按回车键搜索
-            var keyCode = event.keyCode || event.which;
-            if(keyCode === 13){
-                this.supplierSearch();
-            }
-        },
-        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'
-                        }
-                    }
-                });
-                return false;
+        searchKeyWord:function(){//搜索
+            var _self = this;
+            if (_self.keyWord ==''){
+                CAIMEI.dialog('请输入搜索关键字',false,function () {});
+                return;
             }
-            this.productLists = [];
-            this.getProductLists();
-            var floorScroll = $('#supProduct').offset().top;
-            $('html,body').animate({scrollTop: floorScroll},600);
+            location.href = '/document/list.html?keyWord='+encodeURI(_self.keyWord);
         },
-        showPdfList:function(item){
-            item.subFloors = !item.subFloors;
-        },
-        upgrade: function () {
-            location.href='/upgrade.html';
+        MoreDetails:function(){
+            var _self = this;
+            location.href = '/document/more-content.html?id='+_self.ossArchive.id;
         }
-    },
+    }
+
+    ,
     created: function () {
-        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;
-        $('.supplierInfo').slide({
-            mainCell:".tabCon"
-            ,titCell:".tabTit span"
-            ,trigger: "click"
-        });
-        //上垃加载更多
-        $(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();
-        })
+        this.pdfId = CAIMEI.getUrlParam('id');
+        this.GetDocumentDataDetailsInfo();
     }
 });

+ 40 - 582
src/main/resources/static/js/document/list.js

@@ -6,625 +6,83 @@ var documentList = new Vue({
         supplierInfo:{},
         supplierBanner: [],
         mainProducts:[],
-        params: {
-            size: 12,
-            num: 1,
-            id: 0,
-            keyword: ''
+        listQuery: {
+            name: '',
+            pageNum: 1,
+            pageSize: 20
         },
-        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
-                    }
-                ]
-            },
-            {
-                "id":10,
-                "type":null,
-                "title":"科学护肤品",
-                "detail":"敏感肌  痘痘肌  黑色素  多效修复  净化角质",
-                "link":null,
-                "subFloors":false,
-                "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R6kGAedqnAAEFz7A20Dk764.jpg",
-                "floorData":[
-                    {
-                        "id":45,
-                        "status":null,
-                        "title":"华熙米蓓尔皮肤护理系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/product/search/list/0-0-0-1-0.html?wd=%25E7%25B1%25B3%25E8%2593%2593%25E5%25B0%2594&amp;searchTypeID=0",
-                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R6kGAedqnAAEFz7A20Dk764.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":26,
-                        "status":null,
-                        "title":"优斐斯液体敷料系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/supplier/prolist-1285.html?brandID=67",
-                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R6fiALawUAAC9Gw_OU98595.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":29,
-                        "status":null,
-                        "title":"肌本演绎舒缓系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/web/supplier/view/supplierHomePage.jsp?shopId=1248",
-                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R6bmAaIdDAAD3eoag-y4911.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":57,
-                        "status":null,
-                        "title":"上海汇融舜华颜冻干安瓶",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/web/supplier/view/supplierHomePage.jsp?shopId=1259",
-                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R6ZSACbCsAACzgFjQRcs111.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":62,
-                        "status":null,
-                        "title":"韩国恩盛VITAL水光面膜",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/product-3893.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/D1/Cmis21-aHICADWnZAAGWiXX_syA466.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    }
-                ]
-            },
-            {
-                "id":11,
-                "type":null,
-                "title":"高端院用产品",
-                "detail":"皮肤护理  紧致抗衰  玻尿酸补水嫩肤 ",
-                "link":null,
-                "subFloors":false,
-                "image":"https://img.caimei365.com/group1/M00/03/B4/Cmis2F9XMo2AELI3AAO-S150ml8816.jpg",
-                "floorData":[
-                    {
-                        "id":32,
-                        "status":null,
-                        "title":"德玛莉肌活系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/supplier/prolist-1267.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B4/Cmis2F9XMo2AELI3AAO-S150ml8816.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":58,
-                        "status":null,
-                        "title":"美生美稚龄长效童颜",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/product-3669.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R6tqAb9oFAAEnv5BPpTA032.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":61,
-                        "status":null,
-                        "title":"BIOLINE高端护肤系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/supplier/index.html?id=1225",
-                        "image":"https://img.caimei365.com/group1/M00/03/BF/Cmis2F-Gcn6AKqTSAAEhEKsbcVs589.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":31,
-                        "status":null,
-                        "title":"肌本演绎高端护肤系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/web/supplier/view/supplierHomePage.jsp?shopId=1248",
-                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R6qyAB2CTAAC4XyL7zAg816.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":51,
-                        "status":null,
-                        "title":"优斐斯护肤系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/supplier/prolist-1285.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B2/Cmis2F9R6qOAREllAADzyGgdFoY829.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    }
-                ]
-            },
-            {
-                "id":4,
-                "type":null,
-                "title":"术后修护",
-                "detail":"皮肤屏障修复 净肤  美白 私密养护",
-                "link":null,
-                "subFloors":false,
-                "image":"https://img.caimei365.com/group1/M00/03/BF/Cmis2F-GcJCAWAqdAB7ucSzYvvA841.jpg",
-                "floorData":[
-                    {
-                        "id":60,
-                        "status":null,
-                        "title":"肌本演绎修护系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/supplier/index.html?id=1248",
-                        "image":"https://img.caimei365.com/group1/M00/03/BF/Cmis2F-GcJCAWAqdAB7ucSzYvvA841.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":59,
-                        "status":null,
-                        "title":"优斐斯修护系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/supplier/index.html?id=1285",
-                        "image":"https://img.caimei365.com/group1/M00/03/BF/Cmis2F-GcFqAXiioAAFxGLPuidY392.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":36,
-                        "status":null,
-                        "title":"伯纳赫点斗修护系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/cmpage/info-1-132.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R_5eAOfXIAADU3Nytmv0342.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":47,
-                        "status":null,
-                        "title":"Reyoungel瑞漾修护系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/supplier/prolist-1211.html?brandID=0",
-                        "image":"https://img.caimei365.com/group1/M00/03/3C/Cmis21y-xz2AHSu0AAGcagKhNL0844.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":53,
-                        "status":null,
-                        "title":"UPLANT宫龄修护系列",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/supplier/prolist-1247.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/5C/Cmis211CTB2ARsSXAACVJxRbLsc158.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    }
-                ]
-            },
-            {
-                "id":12,
-                "type":null,
-                "title":"导入液 针剂 ",
-                "detail":"水光导入液 塑形针剂 配套耗材",
-                "link":null,
-                "subFloors":false,
-                "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R-XKAGQppAADFs1u-igo687.jpg",
-                "floorData":[
-                    {
-                        "id":50,
-                        "status":null,
-                        "title":"青春抗衰动能素",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/cmpage/info-1-182.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R-XKAGQppAADFs1u-igo687.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":39,
-                        "status":null,
-                        "title":"无针水光导入液",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/cmpage/info-1-138.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R-WmAJ48rAAChfUHq0jE879.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":43,
-                        "status":null,
-                        "title":"补水 塑形针剂",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/cmpage/info-1-141.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R-V2ADyOEAAEnv5BPpTA478.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":40,
-                        "status":null,
-                        "title":"小气泡溶液",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/cmpage/info-1-139.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9R-VCACzDVAADJ7-QlA04237.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":42,
-                        "status":null,
-                        "title":"治疗头",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/cmpage/info-1-142.html",
-                        "image":"https://img.caimei365.com/group1/M00/01/17/Cmis21vESJGAJ-L8AACdGTWUK_Y617.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    }
-                ]
-            },
-            {
-                "id":3,
-                "type":null,
-                "title":"项目仪器",
-                "detail":"紧致抗衰 私密养护 美白祛斑 减脂塑形",
-                "link":null,
-                "subFloors":false,
-                "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SAH6ASXTuAAB-HRqRRMI866.jpg",
-                "floorData":[
-                    {
-                        "id":11,
-                        "status":null,
-                        "title":"除皱抗衰项目系列",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/cmpage/info-1-39.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SAH6ASXTuAAB-HRqRRMI866.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":10,
-                        "status":null,
-                        "title":"美白祛斑项目系列",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/cmpage/info-1-38.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/9A/Cmis2F8H3g6AZrebAAB-P2l3KJQ806.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":9,
-                        "status":null,
-                        "title":"祛妊娠纹项目系列",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/cmpage/info-1-40.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/9A/Cmis2F8H3gWASntuAADIG70r2WM840.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":7,
-                        "status":null,
-                        "title":"瘦身塑形项目系列",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/cmpage/info-1-7.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SDIyADjOuAAChTjRFOmI030.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":6,
-                        "status":null,
-                        "title":"私密养护项目系列",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/cmpage/info-1-41.html",
-                        "image":"https://img.caimei365.com/group1/M00/03/9A/Cmis2F8H3fOAE8UeAABaHH4JaDo889.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    }
-                ]
-            },
-            {
-                "id":5,
-                "type":null,
-                "title":"会所常用品",
-                "detail":"面膜粉 洁面巾 卸妆棉 按摩精油",
-                "link":null,
-                "subFloors":false,
-                "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SCp6AbxEmAACsLXphp3o046.jpg",
-                "floorData":[
-                    {
-                        "id":12,
-                        "status":null,
-                        "title":"按摩精油",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/product/search/list/0-0-0-1-0.html?wd=%25E6%258C%2589%25E6%2591%25A9%25E7%25B2%25BE%25E6%25B2%25B9&amp;searchTypeID=0",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SCp6AbxEmAACsLXphp3o046.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":13,
-                        "status":null,
-                        "title":"软膜粉",
-                        "detail":null,
-                        "link":"https://www.caimei365.com/product/search/list/0-0-0-1-0.html?wd=%2520%25E8%25BD%25AF%25E8%2586%259C%25E7%25B2%2589&amp;searchTypeID=0",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SCpiALQVKAADRAwxVJyU552.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":15,
-                        "status":null,
-                        "title":"卸妆棉",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/product/search/list/0-0-0-1-0.html?wd=%25E5%258C%2596%25E5%25A6%2586%25E6%25A3%2589&amp;searchTypeID=0",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SCpGAAnfkAACLsfmvAUM980.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":14,
-                        "status":null,
-                        "title":"无纺布制品",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/product/search/list/0-0-0-1-0.html?wd=%25E6%2597%25A0%25E7%25BA%25BA%25E5%25B8%2583&amp;searchTypeID=0",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SCouABo2yAABoFVyTJ3A443.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    },
-                    {
-                        "id":8,
-                        "status":null,
-                        "title":"洁面巾",
-                        "detail":null,
-                        "link":"http://www.caimei365.com/product/search/list/0-0-0-1-0.html?wd=%25E6%25B4%2581%25E9%259D%25A2%25E5%25B7%25BE&amp;searchTypeID=0",
-                        "image":"https://img.caimei365.com/group1/M00/03/B3/Cmis2F9SCoaAf0xsAADEJHhV2oM348.jpg",
-                        "beginTime":'2020-11-10 17:10',
-                        "endTime":null
-                    }
-                ]
-            }
-        ],
+        hasNextPage:false,
+        pdfDataList:[],
     },
     computed: {
 
     },
     methods: {
-        getShopInfo: function(){
+        GetDocumentDataListInfo:function(more){
             var _self = this;
-            $.getJSON(spiServer + "/supplier/home/detail",{supplierId: this.params.id}).done(function (r) {
-                if (r.code === 0 && r.data) {
-                    _self.supplierInfo = r.data;
-                }
-            });
-        },
-        getBanners: function(){
-            var _self = this;
-            $.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 {
-                            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
-                                }
-                            });
-                        }
-                    },500);
-                }
-            });
-        },
-        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);
-                        });
+            DocumentApi.GetDocumentDataList(_self.listQuery,function(response){
+                if(response.code == 0){
+                    var data = response.data;
+                    _self.hasNextPage = data.hasNextPage;
+                    if(more){
+                        _self.pdfDataList = _self.pdfDataList.concat(data.list);
+                    }else{
+                        _self.pdfDataList = data.list
                     }
-                    _self.mainProducts = r.data;
+                }else{
+                    CAIMEI.Alert(response.msg, '确定', false);
                 }
-            });
+            })
         },
-        getProductLists: function(){
+        searchKeyWord: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;
-            })
+            if (_self.listQuery.name ==''){
+                CAIMEI.dialog('请输入搜索关键字',false,function () {});
+                return;
+            }
+            this.GetDocumentDataListInfo();
+        },
+        PdfDetails:function(id){//跳转
+            location.href = '/document/details.html?id='+id;
         },
         keyupSearch: function(event) {
             // 搜索输入框 按回车键搜索
             var keyCode = event.keyCode || event.which;
+            console.log(keyCode)
             if(keyCode === 13){
-                this.supplierSearch();
-            }
-        },
-        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'
-                        }
-                    }
-                });
-                return false;
+                this.GetDocumentDataListInfo();
             }
-            this.productLists = [];
-            this.getProductLists();
-            var floorScroll = $('#supProduct').offset().top;
-            $('html,body').animate({scrollTop: floorScroll},600);
         },
         showPdfList:function(item){
-            item.subFloors = !item.subFloors;
-        },
-        upgrade: function () {
-            location.href='/upgrade.html';
+            item.isShowDowns = !item.isShowDowns;
         }
     },
     created: function () {
-        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;
-        $('.supplierInfo').slide({
-            mainCell:".tabCon"
-            ,titCell:".tabTit span"
-            ,trigger: "click"
-        });
+        if(CAIMEI.getUrlParam('keyWord')){
+            _self.listQuery.name = decodeURI(CAIMEI.getUrlParam('keyWord'));
+        }
+        _self.GetDocumentDataListInfo();
         //上垃加载更多
         $(window).on('scroll', function(){
             var scrollTop = $(this).scrollTop();
             var scrollHeight = $(document).height();
-            var windowHeight = window.innerHeight + $("footer").height();
+            var windowHeight = window.innerHeight;
             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){
+                var next = _self.listQuery.pageNum+1;
+                if(_self.hasNextPage){
                     if (_self.requestFlag){
-                        _self.params.num = next;
+                        _self.listQuery.pageNum = next;
                         // 获取列表数据
-                        _self.getProductLists();
+                        _self.GetDocumentDataListInfo(true);
                     }
                     _self.requestFlag = false;
                 }
             }
         });
-        $('body').on("click", '.showSearch', function(){
-            $('.supplierTit .search').show();
-        })
     }
 });

+ 1 - 32
src/main/resources/static/js/document/login.js

@@ -29,11 +29,6 @@ var loginPage = new Vue({
 
     },
     methods: {
-        GetAuthorization:function(){//授权登录
-            DocumentApi.GetAuthorization({},function(response){
-                console.log(response)
-            })
-        },
         getMobileImage:function() {//获取图形验证码
             var _self = this;
             var pass = verifyCheack('.massageBtn');
@@ -110,33 +105,8 @@ var loginPage = new Vue({
                 DocumentApi.MobileCodeLogin(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";
-                        }
+                        location.href = '/document/list.html';
                     } else {// 登录失败
                         CAIMEI.Alert(response.msg,'确定',false);
                     }
@@ -157,7 +127,6 @@ 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;

+ 21 - 243
src/main/resources/static/js/document/more-content.js

@@ -1,264 +1,42 @@
 var documentList = new Vue({
     el: "#documentList",
     data: {
-        requestFlag: true,
-        userId: 0,
-        supplierInfo:{},
-        supplierBanner: [],
-        mainProducts:[],
-        params: {
-            size: 12,
-            num: 1,
-            id: 0,
-            keyword: ''
-        },
-        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
-                    }
-                ]
-            },
-        ],
+        pdfId:0,
+        ossArchive:{},
+        keyWord:''
     },
     computed: {
 
     },
     methods: {
-        getShopInfo: function(){
-            var _self = this;
-            $.getJSON(spiServer + "/supplier/home/detail",{supplierId: this.params.id}).done(function (r) {
-                if (r.code === 0 && r.data) {
-                    _self.supplierInfo = r.data;
-                }
-            });
-        },
-        getBanners: function(){
-            var _self = this;
-            $.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 {
-                            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
-                                }
-                            });
-                        }
-                    },500);
-                }
-            });
-        },
-        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;
-                }
-            });
-        },
-        getProductLists: function(){
+        GetDocumentMoreDataInfo: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);
+            DocumentApi.GetDocumentMoreData({archiveId:_self.archiveId},function(response){
+                if(response.code ==0){
+                    var data = response.data;
+                    _self.ossArchive = data;
+                }else{
+                    CAIMEI.Alert(response.msg, '确定', false);
                 }
-                _self.requestFlag = true;
             })
         },
-        keyupSearch: function(event) {
-            // 搜索输入框 按回车键搜索
-            var keyCode = event.keyCode || event.which;
-            if(keyCode === 13){
-                this.supplierSearch();
-            }
+        PdfDetails:function(id){//跳转
+            location.href = '/document/details.html?id='+id;
         },
-        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'
-                        }
-                    }
-                });
-                return false;
+        searchKeyWord:function(){//搜索
+            var _self = this;
+            if (_self.keyWord ==''){
+                CAIMEI.dialog('请输入搜索关键字',false,function () {});
+                return;
             }
-            this.productLists = [];
-            this.getProductLists();
-            var floorScroll = $('#supProduct').offset().top;
-            $('html,body').animate({scrollTop: floorScroll},600);
+            location.href = '/document/list.html?keyWord='+encodeURI(_self.keyWord);
         },
-        showPdfList:function(item){
-            item.subFloors = !item.subFloors;
-        },
-        upgrade: function () {
-            location.href='/upgrade.html';
-        }
     },
     created: function () {
-        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;
-        $('.supplierInfo').slide({
-            mainCell:".tabCon"
-            ,titCell:".tabTit span"
-            ,trigger: "click"
-        });
-        //上垃加载更多
-        $(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();
-        })
+        this.archiveId = CAIMEI.getUrlParam('id');
+        this.GetDocumentMoreDataInfo();
     }
 });

+ 11 - 12
src/main/resources/templates/document/details.html

@@ -10,14 +10,14 @@
 <!-- 二级页面 -->
 <div id="documentList">
     <!-- 引用头部 -->
-    <header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml">
+    <div>
         <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">
+                    <input class="input"  v-model="keyWord" type="text" placeholder="请输入商品名/资料库名/资料名">
+                    <div class="icon-search" @click="searchKeyWord">
                         <img src="/img/document/icon-search.png" alt="">
                     </div>
                 </div>
@@ -25,21 +25,21 @@
         </div>
         <input type="hidden" th:value="${spiServer}" id="spiServer">
         <input type="hidden" th:value="${agent}" id="userAgent">
-    </header>
+    </div>
     <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="image"><img :src="ossArchive.mainImage" alt=""></div>
                         <div class="main">
-                            <h1>供应商:{{ ziliaoobjectL.title }}</h1>
-                            <p>商品名称:{{ ziliaoobjectL.detail }}</p>
-                            <p>资料库名称:{{ ziliaoobjectL.detail }} <span>更多资料</span></p>
+                            <h1>供应商:{{ ossArchive.shopName }}</h1>
+                            <p>商品名称:{{ ossArchive.productName }}</p>
+                            <p>资料库名称:{{ ossArchive.name }} <span @click="MoreDetails()">更多资料</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>
+                        <a class="media" :href="ossArchivePdf.url"></a>
                     </div>
                 </div>
             </div>
@@ -47,14 +47,13 @@
     </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="@{/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>

+ 15 - 15
src/main/resources/templates/document/list.html

@@ -10,14 +10,14 @@
 <!-- 二级页面 -->
 <div id="documentList">
     <!-- 引用头部 -->
-    <header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml">
+    <div class="header-content">
         <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">
+                    <input class="input" v-model="listQuery.name" type="text" placeholder="请输入商品名/资料库名/资料名">
+                    <div class="icon-search" @click="searchKeyWord" @keyup="keyupSearch()">
                         <img src="/img/document/icon-search.png" alt="">
                     </div>
                 </div>
@@ -25,25 +25,25 @@
         </div>
         <input type="hidden" th:value="${spiServer}" id="spiServer">
         <input type="hidden" th:value="${agent}" id="userAgent">
-    </header>
+    </div>
     <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" v-for="(item,index) in pdfDataList" :key="index">
                     <div class="list-item-top">
-                        <div class="image"><img :src="item.image" alt=""></div>
+                        <div class="image"><img :src="item.mainImage" alt=""></div>
                         <div class="main">
-                            <h1>供应商:{{ item.title }}</h1>
-                            <p>商品名称:{{ item.detail }}</p>
-                            <p>资料库名称:{{ item.detail }}</p>
+                            <h1>供应商:{{ item.shopName }}</h1>
+                            <p>商品名称:{{ item.productName }}</p>
+                            <p>资料库名称:{{ item.name }}</p>
                         </div>
-                        <i class="icon mIcon" @click="showPdfList(item)" :class="item.subFloors ? 'top' : ''"></i>
+                        <i class="icon mIcon" v-if="item.pdfList.length>0.0" @click="showPdfList(item)" :class="item.isShowDowns ? '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">
+                    <div class="list-item-bot" v-if="item.isShowDowns">
+                        <div class="pdf-li" v-for="(pdf,idx) in item.pdfList" :key="idx" @click="PdfDetails(pdf.id)">
                             <img class="img" src="/img/document/pdf.png" alt="">
-                            <p class="name">{{ pdf.title }}</p>
-                            <p class="time">{{ pdf.beginTime }}</p>
+                            <p class="name">{{ pdf.name }}</p>
+                            <p class="time">{{ pdf.url }}</p>
                         </div>
                     </div>
                 </div>
@@ -52,7 +52,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/list.js(v=${version})}"></script>
 </body>

+ 14 - 15
src/main/resources/templates/document/more-content.html

@@ -10,14 +10,14 @@
 <!-- 二级页面 -->
 <div id="documentList">
     <!-- 引用头部 -->
-    <header id="globalHead" xmlns:th="http://www.w3.org/1999/xhtml">
+    <div>
         <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">
+                    <input class="input" v-model="keyWord" type="text" placeholder="请输入商品名/资料库名/资料名">
+                    <div class="icon-search" @click="searchKeyWord">
                         <img src="/img/document/icon-search.png" alt="">
                     </div>
                 </div>
@@ -25,25 +25,24 @@
         </div>
         <input type="hidden" th:value="${spiServer}" id="spiServer">
         <input type="hidden" th:value="${agent}" id="userAgent">
-    </header>
+    </div>
     <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">
                     <div class="list-item-top">
-                        <div class="image"><img :src="item.image" alt=""></div>
+                        <div class="image"><img :src="ossArchive.mainImage" alt=""></div>
                         <div class="main">
-                            <h1>供应商:{{ item.title }}</h1>
-                            <p>商品名称:{{ item.detail }}</p>
-                            <p>资料库名称:{{ item.detail }}</p>
+                            <h1>供应商:{{ ossArchive.shopName }}</h1>
+                            <p>商品名称:{{ ossArchive.productName }}</p>
+                            <p>资料库名称:{{ ossArchive.name }}</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">
+                    <div class="list-item-bot">
+                        <div class="pdf-li" v-for="(pdf,index) in ossArchive.pdfList" :key="index" >
                             <img class="img" src="/img/document/pdf.png" alt="">
-                            <p class="name">{{ pdf.title }}</p>
-                            <p class="time">{{ pdf.beginTime }}</p>
+                            <p class="name" @click="PdfDetails(pdf.id)">{{ pdf.name }}</p>
+                            <p class="time">{{ pdf.uploadTime }}</p>
                         </div>
                     </div>
                 </div>
@@ -52,7 +51,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/more-content.js(v=${version})}"></script>
 </body>