Selaa lähdekoodia

Merge branch 'test' of git.oschina.net:yiguanjia/php into test

north 7 vuotta sitten
vanhempi
sitoutus
4a6ec7516b

+ 16 - 5
www/webapp/housekeeping/src/components/Home.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="home-box">
-    <scroller>
+    <div class="h-box">
       <!--banner-->
       <div class="banner">
         <img :src="banner" alt="">
@@ -9,7 +9,7 @@
       <div class="home">
         <img :src="yuesao" alt="" @click='demand(1)'>
         <img src="http://odulvej8l.bkt.clouddn.com/2018-01-08-3.jpg" alt="">
-        <img src="http://odulvej8l.bkt.clouddn.com/2018-01-08-4.jpg" alt="" @click='demand(2)'>
+        <img style="width: 99.99%;" src="http://odulvej8l.bkt.clouddn.com/2018-01-08-4.jpg" alt="" @click='demand(2)'>
         <div class="category">
           <div>
             <img src="http://odulvej8l.bkt.clouddn.com/2018-01-08-5.jpg" alt="" @click='demand(0)'>
@@ -22,7 +22,7 @@
           </div>
         </div>
       </div>
-    </scroller>
+    </div>
     <!--导航-->
     <div class="footer">
       <img :src="footer" alt="">
@@ -43,7 +43,7 @@
       }
     },
     methods: {
-      demand(type){
+      demand(type) {
         config.serviceType = null;
         config.serviceType = type;
       },
@@ -60,14 +60,25 @@
     },
     created() {
 //      console.log(config)
+      init()
     }
   }
+
+  function init() {
+    setTimeout(function () {
+      let hBox = document.querySelector('.h-box').clientHeight;
+      let footer = document.querySelector('.footer');
+      let clientHeight = document.documentElement.clientHeight;
+      if (clientHeight - hBox < footer.clientHeight) {
+        footer.style.position = 'static';
+      }
+    }, 200)
+  }
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style scoped lang="less">
   .home-box {
-    padding-bottom: 15%;
   }
 
   .banner {

+ 1 - 0
www/webapp/housekeeping/src/config/index.js

@@ -109,6 +109,7 @@ setTimeout(function () {
 let u = navigator.userAgent, app = navigator.appVersion;
 let isAndroid = (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) && (app.indexOf('Android') > -1 || app.indexOf('Linux') > -1); //android终端或者uc浏览器
 let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) && !!app.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+
 export default {
   user_id: userId,
   apiPath: apiPath,