소스 검색

fix(home): 首页布局问题

18285564342 1 년 전
부모
커밋
14c112c596
5개의 변경된 파일1개의 추가작업 그리고 279개의 파일을 삭제
  1. 0 6
      src/pages.json
  2. 0 112
      src/pages/client/chooseCity/index copy 3.vue
  3. 0 48
      src/pages/client/chooseCity/index copy.vue
  4. 0 112
      src/pages/client/chooseCity/index.vue
  5. 1 1
      src/pages/tabbar/home/index.vue

+ 0 - 6
src/pages.json

@@ -56,12 +56,6 @@
             "navigationBarTitleText": "全部评论"
           }
         },
-        {
-          "path": "chooseCity/index",
-          "style": {
-            "navigationBarTitleText": "选择城市"
-          }
-        },
         {
           "path": "settings/index",
           "style": {

+ 0 - 112
src/pages/client/chooseCity/index copy 3.vue

@@ -1,112 +0,0 @@
-<template>
-  <view class="chooseCity">
-    <view class="map">
-			<view class="page-section page-section-gap">
-				<map style="width: 100%; height: 300px;" :latitude="latitude" :longitude="longitude" :markers="covers">
-				</map>
-			</view>
-		</view>
-    <view class="nearsMap">附近地址</view>
-    <view class="city">
-      <view class="citeItem1">某某省某某市某某区某某</view>
-      <view class="citeItem2">某某省某某市</view>
-    </view>
-    <view class="city">
-      <view class="citeItem1">某某省某某市某某区某某</view>
-      <view class="citeItem2">某某省某某市</view>
-    </view>
-    <view class="city">
-      <view class="citeItem1">某某省某某市某某区某某</view>
-      <view class="citeItem2">某某省某某市</view>
-    </view>
-    <view class="city">
-      <view class="citeItem1">某某省某某市某某区某某</view>
-      <view class="citeItem2">某某省某某市</view>
-    </view>
-  </view>
-</template>
-
-<script>
-import { getHomePage } from '@/api/home';
-export default {
-  data() {
-		return {
-			id:0, // 使用 marker点击事件 需要填写id
-			title: 'map',
-			latitude: 0,
-			longitude: 0,
-			covers: [{
-				latitude: 0,
-				longitude: 0,
-				iconPath: '../../../static/location.png'
-			}, {
-				latitude: 0,
-				longitude: 0,
-				iconPath: '../../../static/location.png'
-			}]
-		}
-	},
-	methods: {
-    onShow() {
-      uni.getLocation({
-        type: 'gcj02',
-        success: res => {
-          console.log('当前位置的经度:' + res.longitude);
-          console.log('当前位置的纬度:' + res.latitude);
-          this.location.longitude = res.longitude;
-          this.location.latitude = res.latitude;
-          this.$store.commit('SET_LOCATION', { longitude: res.longitude, latitude: res.latitude });
-          getHomePage(this.location)
-            .then(res => {
-              console.log(res);
-            })
-            .catch(err => {
-              console.log(err);
-            });
-        },
-      });
-    },
-	}
-}
-</script>
-
-<style lang="scss" scoped>
-.chooseCity {
-  background-color: #fff;
-
-  .map {
-    width: 100%;
-    height: 600rpx;
-    text-align: center;
-    line-height: 600rpx;
-  }
-
-  .nearsMap {
-    font-size: 36rpx;
-    padding: 30rpx;
-    border-bottom: 2rpx solid #d9d9d9;
-  }
-
-  .city {
-    width: 100%;
-    height: 150rpx;
-    padding: 30rpx;
-    box-sizing: border-box;
-
-    .citeItem1 {
-      font-size: 34rpx;
-      color: #343434;
-      margin-bottom: 20rpx;
-    }
-
-    .citeItem2 {
-      font-size: 26rpx;
-      color: #999999;
-    }
-  }
-
-  .city:nth-of-type(2n) {
-    background-color: #efefef;
-  }
-}
-</style>

+ 0 - 48
src/pages/client/chooseCity/index copy.vue

@@ -1,48 +0,0 @@
-<template>
-  <view>
-    <u-search></u-search>
-    <u-index-list :index-list="indexList" class="text-pink-800">
-      <view v-for="(item, index) in list" :key="index">
-        <u-index-item class="text-pink-800">
-          <u-index-anchor :text="item.letter" />
-          <view class="list-cell u-border-bottom" v-for="(item1, index) in item.data" :key="index">
-            {{ item1 }}
-          </view>
-        </u-index-item>
-      </view>
-    </u-index-list>
-  </view>
-</template>
-
-<script>
-import indexList from '@/data/citylist.json';
-const letterArr = indexList.map(val => {
-  return val.letter;
-});
-export default {
-  data() {
-    return {
-      scrollTop: 0,
-      indexList: letterArr,
-      list: indexList,
-    };
-  },
-  onPageScroll(e) {
-    this.scrollTop = e.scrollTop;
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.list-cell {
-  display: flex;
-  box-sizing: border-box;
-  width: 100%;
-  padding: 10px 24rpx;
-  overflow: hidden;
-  color: #323233;
-  font-size: 14px;
-  line-height: 24px;
-  background-color: #fff;
-}
-</style>

+ 0 - 112
src/pages/client/chooseCity/index.vue

@@ -1,112 +0,0 @@
-<template>
-  <view class="chooseCity">
-    <view class="map">
-			<view class="page-section page-section-gap">
-				<map style="width: 100%; height: 300px;" :latitude="latitude" :longitude="longitude" :markers="covers">
-				</map>
-			</view>
-		</view>
-    <view class="nearsMap">附近地址</view>
-    <view class="city">
-      <view class="citeItem1">某某省某某市某某区某某</view>
-      <view class="citeItem2">某某省某某市</view>
-    </view>
-    <view class="city">
-      <view class="citeItem1">某某省某某市某某区某某</view>
-      <view class="citeItem2">某某省某某市</view>
-    </view>
-    <view class="city">
-      <view class="citeItem1">某某省某某市某某区某某</view>
-      <view class="citeItem2">某某省某某市</view>
-    </view>
-    <view class="city">
-      <view class="citeItem1">某某省某某市某某区某某</view>
-      <view class="citeItem2">某某省某某市</view>
-    </view>
-  </view>
-</template>
-
-<script>
-import { getHomePage } from '@/api/home';
-export default {
-  data() {
-		return {
-			id:0, // 使用 marker点击事件 需要填写id
-			title: 'map',
-			latitude: 0,
-			longitude: 0,
-			covers: [{
-				latitude: 0,
-				longitude: 0,
-				iconPath: '../../../static/location.png'
-			}, {
-				latitude: 0,
-				longitude: 0,
-				iconPath: '../../../static/location.png'
-			}]
-		}
-	},
-	methods: {
-    onShow() {
-      uni.getLocation({
-        type: 'gcj02',
-        success: res => {
-          console.log('当前位置的经度:' + res.longitude);
-          console.log('当前位置的纬度:' + res.latitude);
-          this.location.longitude = res.longitude;
-          this.location.latitude = res.latitude;
-          this.$store.commit('SET_LOCATION', { longitude: res.longitude, latitude: res.latitude });
-          getHomePage(this.location)
-            .then(res => {
-              console.log(res);
-            })
-            .catch(err => {
-              console.log(err);
-            });
-        },
-      });
-    },
-	}
-}
-</script>
-
-<style lang="scss" scoped>
-.chooseCity {
-  background-color: #fff;
-
-  .map {
-    width: 100%;
-    height: 600rpx;
-    text-align: center;
-    line-height: 600rpx;
-  }
-
-  .nearsMap {
-    font-size: 36rpx;
-    padding: 30rpx;
-    border-bottom: 2rpx solid #d9d9d9;
-  }
-
-  .city {
-    width: 100%;
-    height: 150rpx;
-    padding: 30rpx;
-    box-sizing: border-box;
-
-    .citeItem1 {
-      font-size: 34rpx;
-      color: #343434;
-      margin-bottom: 20rpx;
-    }
-
-    .citeItem2 {
-      font-size: 26rpx;
-      color: #999999;
-    }
-  }
-
-  .city:nth-of-type(2n) {
-    background-color: #efefef;
-  }
-}
-</style>

+ 1 - 1
src/pages/tabbar/home/index.vue

@@ -243,7 +243,7 @@ export default {
 
   .hot-item {
     height: 300rpx;
-    width: calc(50% - 10rpx);
+    width: calc(50% - 20rpx);
     margin: 0 20rpx 20rpx 0;
     background-color: #fff;