瀏覽代碼

页面修改

lijj 2 年之前
父節點
當前提交
e9c4f7bfc7

+ 6 - 0
miniapp/pages.json

@@ -89,6 +89,12 @@
         "navigationBarTitleText": "资讯",
         "enablePullDownRefresh": false
       }
+    }, {
+      "path": "pages/yuecai/usercenter/aboutus/index",
+      "style": {
+        "navigationBarTitleText": "关于我们",
+        "enablePullDownRefresh": false
+      }
     }, {
       "path": "pages/yuecai/usercenter/protocol/index",
       "style": {

+ 36 - 12
miniapp/pages/yuecai/collection/index.vue

@@ -2,14 +2,20 @@
   <view class="width-100 height-100 view-page">
     <u-tabs ref="tabs" :list="tabList" :scrollable="false" :current="currentTab" @change="tabChange" lineColor="#65371b"
       :activeStyle="{color:'#65371b'}" inactiveStyle="{color:'#65371b'}"></u-tabs>
-    <view class="info-list">
-      <view class="info-item" v-for="(item, index) in 10" :key="index">
-        <view class="info-pic"></view>
-        <view class="info-title">
-          标题标题标题标
+    <u-list @scrolltolower="scrolltolower" height="calc(100% - 91px)" lowerThreshold="10">
+      <view class="info-list">
+        <view class="info-item" v-for="(item, index) in list" :key="index" @click="toDetail(item.id)">
+          <view class="info-pic">
+            <u-image width="96px" height="96px" mode="aspectFill" :src="item.cover"></u-image>
+          </view>
+          <view class="info-title">
+            {{item.name}}
+          </view>
         </view>
       </view>
-    </view>
+      <u-loadmore :status="page.status" :loading-text="page.loadingText" :loadmore-text="page.loadmoreText"
+        :nomore-text="page.nomoreText" />
+    </u-list>
   </view>
 </template>
 
@@ -33,9 +39,9 @@
         keyword: '',
         list: [],
         tabList: [{
-          name: '名'
+          name: '名'
         }, {
-          name: '名',
+          name: '名',
         }, {
           name: '名点',
         }],
@@ -43,27 +49,45 @@
       }
     },
     onLoad(options) {
-      this.collectionType = options.type || '';
+      this.collectionType = options.type || 'restaurant'
+      switch (options.type) {
+        case 'restaurant':
+          this.currentTab = 0;
+          break;
+        case 'dish':
+          this.currentTab = 1;
+          break;
+        case 'snacks':
+          this.currentTab = 2;
+          break;
+        default:
+          this.currentTab = 0;
+          break;
+      }
     },
     onShow() {
       this.keyword = '';
       this.doRefresh();
     },
     methods: {
+      tabChange(e) {
+        this.currentTab = e.index;
+        this.doRefresh();
+      },
       scrolltolower() {
         this.loadmore()
       },
       loadmore() {
         this.page.current++;
-        this.getCollectionList();
+        this.getList();
       },
       doRefresh() {
         this.page.current = 1;
         this.page.status = 'loadmore'
         this.list = [];
-        this.getCollectionList();
+        this.getList();
       },
-      getCollectionList() {
+      getList() {
         if (this.page.status == 'loading' || this.page.status == 'nomore') {
           // 防止重复下拉
           return;

+ 2 - 2
miniapp/pages/yuecai/home/index.vue

@@ -42,11 +42,11 @@
 
       </view>
       <view class="info-list">
-        <view class="dis-flex flex-x-between info-item" v-for="(item, index) in list" :key="index">
+        <view class="dis-flex flex-x-between info-item" v-for="(item, index) in list" :key="index"  @click="goDetail(item.id)">
           <view class="info-pic">
             <u-image width="96px" height="96px" mode="aspectFill" :src="item.cover"></u-image>
           </view>
-          <view class="info-view" @click="goDetail(item.id)">
+          <view class="info-view">
             <view class="info-title">
               {{item.subTitle}}
             </view>

+ 66 - 8
miniapp/pages/yuecai/professional_style/index.vue

@@ -1,13 +1,27 @@
 <template>
   <view class="width-100 height-100 view-page">
-    <u-swiper :list="bannerList" @click="clickInfo" keyName="cover"></u-swiper>
-    <u-list @scrolltolower="scrolltolower" height="calc(100% - 50px)" lowerThreshold="10">
-      <u-list-item v-for="(item, index) in list" :key="index">
-        <u-cell :title="item.title" @click="toDetail(item.id)">
-          <u-avatar slot="icon" shape="square" size="35" :src="item.cover"
-            customStyle="margin: -3px 5px -3px 0"></u-avatar>
-        </u-cell>
-      </u-list-item>
+    <u-swiper height="185" :list="bannerList" @click="clickInfo" keyName="cover"></u-swiper>
+    <u-list @scrolltolower="scrolltolower" height="calc(100% - 47px)" lowerThreshold="10">
+      <view class="info-list">
+        <view class="dis-flex flex-x-between info-item" v-for="(item, index) in list" :key="index"
+          @click="toDetail(item.id)">
+          <view class="info-pic">
+            <u-image width="96px" height="96px" mode="aspectFill" :src="item.cover"></u-image>
+          </view>
+          <view class="info-view">
+            <view class="info-title">
+              {{item.subTitle}}
+            </view>
+            <view class="dis-flex info-bottom">
+              <view style="margin-right: 20rpx;">{{item.createTime?item.createTime.substring(0,10):''}}</view>
+              <u-icon name="thumb-up" color="#7f7f7f" size="18"></u-icon>
+              <view style="margin-right: 20rpx;">{{item.likeNum || 0}}点赞</view>
+              <u-icon name="eye" color="#7f7f7f" size="18"></u-icon>
+              <view>{{item.views || 0}}阅读量</view>
+            </view>
+          </view>
+        </view>
+      </view>
       <u-loadmore :status="page.status" :loading-text="page.loadingText" :loadmore-text="page.loadmoreText"
         :nomore-text="page.nomoreText" />
     </u-list>
@@ -97,4 +111,48 @@
 </script>
 
 <style scoped lang="scss">
+  .info-list {
+    height: calc(100% - 95px);
+    overflow: auto;
+    background-color: #f4f6f8;
+
+    .info-item {
+      padding: 20rpx;
+      border-bottom: 2rpx solid white;
+
+      .info-pic {
+        width: 175rpx;
+        height: 175rpx;
+        background: bisque;
+      }
+
+      .info-view {
+        width: calc(100% - 195rpx);
+
+        .info-title {
+          height: 75px;
+          word-break: break-all;
+          color: #65371b;
+          font-size: 24rpx;
+          font-weight: 300;
+          line-height: 47rpx;
+          word-spacing: 2rpx;
+          overflow: hidden;
+          text-overflow: -o-ellipsis-lastline;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          display: -webkit-box;
+          -webkit-line-clamp: 3;
+          line-clamp: 3;
+          -webkit-box-orient: vertical;
+        }
+
+        .info-bottom {
+          color: #7f7f7f;
+          font-size: 24rpx;
+          margin-top: 10rpx;
+        }
+      }
+    }
+  }
 </style>

File diff suppressed because it is too large
+ 133 - 0
miniapp/pages/yuecai/usercenter/aboutus/index.vue


+ 5 - 5
miniapp/pages/yuecai/usercenter/index.vue

@@ -50,6 +50,10 @@
         version: version,
         allCells: [
           [{
+            icon: '',
+            text: '名店收藏',
+            url: '/pages/yuecai/collection/index?type=restaurant',
+          }, {
             icon: '',
             text: '名菜收藏',
             url: '/pages/yuecai/collection/index?type=dish',
@@ -57,10 +61,6 @@
             icon: '',
             text: '名点收藏',
             url: '/pages/yuecai/collection/index?type=snacks',
-          }, {
-            icon: '',
-            text: '名店收藏',
-            url: '/pages/yuecai/collection/index?type=restaurant',
           }],
           [{
             icon: '',
@@ -73,7 +73,7 @@
           }, {
             icon: '',
             text: '关于我们',
-            url: './aboutus',
+            url: '/pages/yuecai/usercenter/aboutus/index',
           }],
         ],
       }

File diff suppressed because it is too large
+ 28 - 28
miniapp/pages/yuecai/usercenter/privacy/index.vue


File diff suppressed because it is too large
+ 25 - 25
miniapp/pages/yuecai/usercenter/protocol/index.vue