Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

xiongzhu 7 lat temu
rodzic
commit
6fe204549c

+ 3 - 3
src/main/webapp/dancer/component/player.jsp

@@ -83,11 +83,11 @@
         props: ['info'],
         props: ['info'],
         template: `<div class="player">
         template: `<div class="player">
                     <div class="playImg"
                     <div class="playImg"
-                         style="background-image: url('http://bpic.588ku.com/illus_pic/18/10/19/4626940d3255104abf3aa5e470dcb878.jpg')">
-                        <div class="ad">06号-2358礼物</div>
+                         :style="{backgroundImage: 'url(../'+info.pic+')'}">
+                        <div class="ad">{{info.PK}}号-{{info.gift}}礼物</div>
                     </div>
                     </div>
                     <div class="title">
                     <div class="title">
-                        <div class="name">余果</div>
+                        <div class="name">{{info.Pet}}</div>
                         <div class="btn">
                         <div class="btn">
                             <img src="${pageContext.request.contextPath}/image/dancer/icon_liwu_baise.png" alt="">
                             <img src="${pageContext.request.contextPath}/image/dancer/icon_liwu_baise.png" alt="">
                             <span>礼物</span>
                             <span>礼物</span>

+ 3 - 5
src/main/webapp/dancer/component/searchResult.jsp

@@ -48,12 +48,10 @@
 
 
 <script>
 <script>
     var searchResult = {
     var searchResult = {
-        props: {
-
-        },
+        props: ['info'],
         template: `<div class="result-item">
         template: `<div class="result-item">
-                    <div class="image" style="background-image: url('http://img2.imgtn.bdimg.com/it/u=2689129216,994344352&fm=15&gp=0.jpg')"></div>
-                    <div class="name">粉条</div>
+                    <div class="image" :style="{backgroundImage: 'url(../'+info.hPhoto+')'}"></div>
+                    <div class="name">{{info.Pet}}</div>
                     <div class="tip">
                     <div class="tip">
                         模特
                         模特
                     </div>
                     </div>

+ 49 - 7
src/main/webapp/dancer/index.jsp

@@ -206,7 +206,7 @@
     </style>
     </style>
 </head>
 </head>
 <body>
 <body>
-<div class="container" id="app">
+<div class="container" id="app" @scroll="menu">
     <template>
     <template>
         <div class="content-top">
         <div class="content-top">
             <div class="message">
             <div class="message">
@@ -223,7 +223,7 @@
             </div>
             </div>
             <div class="swiper-container">
             <div class="swiper-container">
                 <div class="swiper-wrapper">
                 <div class="swiper-wrapper">
-                    <div class="swiper-slide" v-for="item in swiperList"></div>
+                    <a href="brandDetail.jsp" class="swiper-slide" v-for="item in swiperList"></a>
 
 
                 </div>
                 </div>
                 <div class="swiper-pagination"></div>
                 <div class="swiper-pagination"></div>
@@ -259,16 +259,16 @@
             </div>
             </div>
 
 
             <div class="list">
             <div class="list">
-                <player-item v-for="item in 4"></player-item>
+                <player-item v-for="item in joinList" :info="item"></player-item>
 
 
             </div>
             </div>
 
 
-            <div class="mainTitle" style="margin-top:40px">
+            <div class="mainTitle" style="margin-top:40px" v-if="notJoin.length>0">
                 • 已淘汰选手 •
                 • 已淘汰选手 •
             </div>
             </div>
 
 
             <div class="list">
             <div class="list">
-                <player-item v-for="item in 2"></player-item>
+                <player-item v-for="item in notJoin"></player-item>
             </div>
             </div>
         </div>
         </div>
         <a href="rankingList.jsp?activitypk=<%=activitypk%>&memberpk=<%=memberpk%>">
         <a href="rankingList.jsp?activitypk=<%=activitypk%>&memberpk=<%=memberpk%>">
@@ -290,7 +290,11 @@
                 join: 263,
                 join: 263,
                 watch: 38648,
                 watch: 38648,
                 swiperList: [{}, {}, {}],
                 swiperList: [{}, {}, {}],
-                joinList: []
+                joinList: [],
+                currentPage:1,
+                notJoin:[],
+                joinFlag:true,
+                notFlag:true
             }
             }
         },
         },
         mounted() {
         mounted() {
@@ -301,11 +305,49 @@
                     clickable: true,
                     clickable: true,
                 },
                 },
             })
             })
+            this.getJoinPlayer()
         },
         },
         components: {
         components: {
             'player-item': playerComponent
             'player-item': playerComponent
         },
         },
-        methods: {}
+        methods: {
+            getJoinPlayer(){
+                if(!this.joinFlag){
+                    return
+                }
+                if(this.currentPage==1){
+                    this.joinList=[]
+                }
+                $.get({
+                    url: '',
+                    data: {
+                        modelpk: '322',
+                        memberpk: 858,
+                        activitypk:8,
+                        operator:'signList',
+                        page:this.currentPage
+                    },
+                    success: function(res){
+                        if(res.length==0){
+                            this.joinFlag=false
+                        }
+                        this.joinList=this.joinList.concat(res)
+                    }.bind(this)
+                })
+            },
+            getNot(){},
+            menu(){
+                if($('#app').scrollTop()+$('#app').height()+50>=document.getElementById('app').scrollHeight){
+                    if(this.joinFlag){
+                        this.currentPage++
+                        this.getJoinPlayer()
+                    }else if(this.notFlag){
+                        this.getNot()
+                    }
+
+                }
+            }
+        }
     })
     })
 </script>
 </script>
 </html>
 </html>

+ 20 - 4
src/main/webapp/dancer/search.jsp

@@ -243,9 +243,12 @@
                 <div class="resultTitle">搜索结果</div>
                 <div class="resultTitle">搜索结果</div>
 
 
                 <div class="resultList">
                 <div class="resultList">
-                    <search-result v-for="item in 2"></search-result>
+                    <template v-if="resultList.length>0">
+                        <search-result v-for="item in resultList" :info="item"></search-result>
+                    </template>
 
 
-                    <div class="nothing">
+
+                    <div class="nothing" v-else>
                         <img src="${pageContext.request.contextPath}/image/dancer/kong_sousuo.png" alt="">
                         <img src="${pageContext.request.contextPath}/image/dancer/kong_sousuo.png" alt="">
                         <p>什么都没有搜到哦~</p>
                         <p>什么都没有搜到哦~</p>
                     </div>
                     </div>
@@ -266,7 +269,8 @@
                 searchVal: "",
                 searchVal: "",
                 isFocus: false,
                 isFocus: false,
                 history: [],
                 history: [],
-                showHistory: true
+                showHistory: true,
+                resultList:[]
             }
             }
         },
         },
         mounted() {
         mounted() {
@@ -309,8 +313,20 @@
                     this.getSearch(this.searchVal)
                     this.getSearch(this.searchVal)
                 }
                 }
             },
             },
-            getSearch() {
+            getSearch(keyword) {
                 this.showHistory = false
                 this.showHistory = false
+                this.searchVal=keyword
+                $.get({
+                    url: '',
+                    data: {
+                        operator: 'search',
+                        keyword: keyword,
+                        page: 1
+                    },
+                    success: function(res){
+                        this.resultList=res
+                    }.bind(this)
+                })
             }
             }
         }
         }
     })
     })