Explorar el Código

Merge branch 'master' of http://gogs.chelvc.com/Tim_Walker/chelvc-custom

Tim_Walker hace 2 años
padre
commit
b31826efb5
Se han modificado 4 ficheros con 306 adiciones y 18 borrados
  1. 74 0
      src/client/CommunitySearch/index.vue
  2. 210 0
      src/client/allComments/index.vue
  3. 12 0
      src/pages.json
  4. 10 18
      src/pages/community/index.vue

+ 74 - 0
src/client/CommunitySearch/index.vue

@@ -0,0 +1,74 @@
+
+<template>
+  <view class="search">
+    <view class="searchItem">
+      <u-search :showAction="true" actionText="取消" />
+    </view>
+
+    <view class="history">
+      <view class="historyTop">
+        <h3>推荐搜索</h3>
+      </view>
+      <view class="label">
+        <u-tag text="标签" type="warning" shape="circle"></u-tag>
+        <u-tag text="标签" type="warning" shape="circle"></u-tag>
+        <u-tag text="标签" type="warning" shape="circle"></u-tag>
+        <u-tag text="标签" type="warning" shape="circle"></u-tag>
+        <u-tag text="标签" type="warning" shape="circle"></u-tag>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style lang="scss" scoped>
+.search {
+  height: 1400rpx;
+  background-color: #efefef;
+
+  .searchItem {
+    padding: 0 20rpx;
+    height: 90rpx;
+    line-height: 90rpx;
+    background-color: #fff;
+    margin-bottom: 10rpx;
+  }
+
+  .history {
+    padding: 20rpx;
+    margin-bottom: 50rpx;
+
+    .historyTop {
+      display: flex;
+      justify-content: space-between;
+      margin-bottom: 20rpx;
+      .historyRight {
+        margin-top: 10rpx;
+        display: flex;
+        font-size:24rpx;
+        .icon-sanjiaoxing1{
+          margin: 5rpx 5rpx 0 0;
+          font-size: 26rpx; 
+        }
+      }
+      h3 {
+        font-size: 34rpx;
+        font-weight: bold;
+        color:#404045;
+      }
+    }
+    .label{
+      display: flex;
+      width: 120rpx;
+      .labelItem{
+        margin-right: 20rpx;
+      }
+    }
+  }
+}
+</style>

+ 210 - 0
src/client/allComments/index.vue

@@ -0,0 +1,210 @@
+<template>
+    <view>
+      <view>
+        <view class="top-nav">
+          <view class="nav-left" @click="backTop">
+            <u-icon name="arrow-left"></u-icon>
+            <view class="left-text">返回</view>
+          </view>
+          <u-tabs v-if="isAllReply" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
+          <u-icon name="search" size="25" @click="searchTop"></u-icon>
+        </view>
+        <view>
+          <view class="album">
+            <view class="album__avatar">
+              <image src="/static/uview/common/logo.png" style="width: 32px; height: 32px"></image>
+            </view>
+            <view class="album__content">
+              <u--text :text="niackName" bold size="17"></u--text>
+              <u--text
+                margin="0 0 8px 0"
+                style="padding-top: 7px"
+                text="全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水"
+              >
+              </u--text>
+              <u-album :urls="urls2"></u-album>
+            </view>
+          </view>
+          <view class="reply-info">
+            <view class="reply-left">
+              <u-icon name="red-packet" size="30px"></u-icon>
+              <u--text :text="followNum" size="22px"></u--text>
+            </view>
+            <view class="reply-right">
+              <u-icon name="thumb-up-fill" size="30px"></u-icon>
+              <u-icon name="chat-fill" size="30px" @click="allReply"></u-icon>
+              <u-icon name="share-fill" size="30px"></u-icon>
+            </view>
+          </view>
+        </view>
+        <view v-if="showAllCom">
+          <view class="all-comments">
+            <view>
+              <u--text sizi="15px" text="全部评论"> </u--text>
+            </view>
+            <view class="comment-order">
+              <u-subsection fontSize="15px" :list="subsectionList" :current="subsectionListCurrent" @change="changeCom"></u-subsection>
+            </view>
+          </view>
+          <view class="album">
+            <view class="album__avatar">
+              <image src="/static/uview/common/logo.png" style="width: 32px; height: 32px"></image>
+            </view>
+            <view class="album__content">
+              <u--text :text="niackName" bold size="17"></u--text>
+              <u--text
+                margin="0 0 8px 0"
+                style="padding-top: 9px"
+                text="全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水全面的组件和便捷的工具会让您信手拈来,如鱼得水"
+              >
+              </u--text>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </template>
+  <script>
+  export default {
+    data() {
+      return {
+        list: [
+          {
+            name: '关注',
+          },
+          {
+            name: '推荐',
+          },
+        ],
+        current: 0,
+        subsectionListCurrent: 0,
+        subsectionList: ['最新', '推荐'],
+        isAllReply: true,
+        showAllCom: false,
+        searching: false,
+        isSearch: true,
+        followNum: 111111,
+        urls2: [
+          'https://cdn.uviewui.com/uview/album/1.jpg',
+          'https://cdn.uviewui.com/uview/album/2.jpg',
+          'https://cdn.uviewui.com/uview/album/3.jpg',
+          'https://cdn.uviewui.com/uview/album/4.jpg',
+          'https://cdn.uviewui.com/uview/album/5.jpg',
+          'https://cdn.uviewui.com/uview/album/6.jpg',
+          'https://cdn.uviewui.com/uview/album/7.jpg',
+          'https://cdn.uviewui.com/uview/album/8.jpg',
+          'https://cdn.uviewui.com/uview/album/9.jpg',
+          'https://cdn.uviewui.com/uview/album/10.jpg',
+        ],
+        niackName: '昵称昵称昵称',
+        followInfo: '昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称昵称',
+        keyword: '123',
+        searchCon: '',
+        src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
+      };
+    },
+    methods: {
+      change(index) {
+        this.current = index;
+      },
+      backTop() {
+        this.isAllReply = true;
+        this.showAllCom = true;
+      },
+      searchTop() {
+        // this.isSearch = false;
+        // this.searching = true;
+        uni.navigateTo({
+          url: "/client/CommunitySearch/index",
+        })
+      },
+      allReply() {
+        this.isAllReply = false;
+        this.showAllCom = true;
+      },
+      changeCom(index) {
+        this.subsectionListCurrent = index;
+      },
+      getFocus() {},
+      cancelSearch() {
+        this.isSearch = true;
+        this.searching = false;
+      },
+    },
+  };
+  </script>
+  <style lang="scss" scoped>
+  .top-nav {
+    width: 100%;
+    height: 50px;
+    display: flex;
+    justify-content: space-between;
+  }
+  
+  .nav-left {
+    display: flex;
+  }
+  
+  .left-text {
+    font-size: 15px;
+    padding-top: 22%;
+    padding-left: 5px;
+  }
+  
+  .album {
+    display: flex;
+  }
+  
+  .album__avatar {
+    padding: 5px;
+    border-radius: 3px;
+  }
+  
+  .album__content {
+    margin-left: 10px;
+    flex: 1;
+  }
+  
+  .reply-info {
+    margin-top: 15px;
+    margin-left: 15px;
+    display: flex;
+    justify-content: space-between;
+  }
+  
+  .reply-left {
+    display: flex;
+  }
+  
+  .reply-right {
+    display: flex;
+  }
+  
+  .all-comments {
+    margin: 15px 0 10px 12px;
+    display: flex;
+    justify-content: space-between;
+  }
+  
+  .comment-order {
+    width: 100px;
+  }
+  
+  .comment-order .u-subsection__item {
+    display: flex;
+    justify-content: center;
+  }
+  
+  .comment-order .u-subsection--button {
+    border: 0.2px solid;
+    border-radius: 55px;
+  }
+  .search-content {
+    display: flex;
+  }
+  .search-tags {
+    display: flex;
+    justify-content: space-around;
+  }
+  </style>
+  

+ 12 - 0
src/pages.json

@@ -44,6 +44,18 @@
     {
       "root": "client",
       "pages": [
+        {
+          "path": "CommunitySearch/index",
+          "style": {
+            "navigationBarTitleText": "社区搜索"
+          }
+        },
+        {
+          "path": "allComments/index",
+          "style": {
+            "navigationBarTitleText": "全部评论"
+          }
+        },
         {
           "path": "chooseCity/index",
           "style": {

+ 10 - 18
src/pages/community/index.vue

@@ -1,13 +1,13 @@
 <template>
   <view>
-    <view v-show="isSearch">
+    <view>
       <view class="top-nav">
         <view class="nav-left" @click="backTop">
           <u-icon name="arrow-left"></u-icon>
           <view class="left-text">返回</view>
         </view>
         <u-tabs v-if="isAllReply" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
-        <u-icon v-if="isAllReply" name="search" size="25" @click="searchTop"></u-icon>
+        <u-icon name="search" size="25" @click="searchTop"></u-icon>
       </view>
       <view>
         <view class="album">
@@ -62,18 +62,6 @@
         </view>
       </view>
     </view>
-    <view v-if="searching">
-      <view class="search-content">
-        <u-search placeholder="请输入搜索内容" v-model="searchCon" :showAction="false" @focus="getFocus"></u-search>
-        <u-button text="取消" style="width: 40px" @click="cancelSearch"></u-button>
-      </view>
-      <view class="search-tags">
-        <u-tag text="时间"></u-tag>
-        <u-tag text="保养"></u-tag>
-        <u-tag text="维修"></u-tag>
-        <u-tag text="旅游"></u-tag>
-      </view>
-    </view>
   </view>
 </template>
 <script>
@@ -124,12 +112,16 @@ export default {
       this.showAllCom = true;
     },
     searchTop() {
-      this.isSearch = false;
-      this.searching = true;
+      // this.isSearch = false;
+      // this.searching = true;
+      uni.navigateTo({
+        url: "/client/CommunitySearch/index",
+      })
     },
     allReply() {
-      this.isAllReply = false;
-      this.showAllCom = true;
+      uni.navigateTo({
+        url: "/client/allComments/index",
+      })
     },
     changeCom(index) {
       this.subsectionListCurrent = index;