lifuxiong 4 years ago
parent
commit
cb8db89b68

+ 1 - 1
components/newCell/newCell.wxml

@@ -8,7 +8,7 @@
     <view class="flex flex-col flex-bet">
     <view class="flex flex-col flex-bet">
       <text class="title {{(historyObj[data.id] || isLook) && !isHistory ? 'normal' : ''}}">{{ data.title }}</text>
       <text class="title {{(historyObj[data.id] || isLook) && !isHistory ? 'normal' : ''}}">{{ data.title }}</text>
       <view class="imgs-wrap" wx:if="{{ data.imgsUrl.length >= 3 }}">
       <view class="imgs-wrap" wx:if="{{ data.imgsUrl.length >= 3 }}">
-        <image class="img" lazy-load="{{true}}" wx:for="{{ data.imgsUrl }}" wx:key="index" mode="aspectFill"
+        <image class="img img-three" lazy-load="{{true}}" wx:for="{{ data.imgsUrl }}" wx:key="index" mode="aspectFill"
           src="{{ item }}"></image>
           src="{{ item }}"></image>
       </view>
       </view>
     </view>
     </view>

+ 3 - 3
components/newCell/newCell.wxss

@@ -47,8 +47,8 @@
 .new-cell .cover-img {
 .new-cell .cover-img {
   flex-shrink: 0;
   flex-shrink: 0;
   margin-left: 10rpx;
   margin-left: 10rpx;
-  width: 184rpx;
-  height: 138rpx;
+  width: 180rpx;
+  height: 120rpx;
   background-color: #f5f5f5;
   background-color: #f5f5f5;
   margin-top: 14rpx;
   margin-top: 14rpx;
   vertical-align: bottom;
   vertical-align: bottom;
@@ -88,7 +88,7 @@
 
 
 .imgs-wrap .img {
 .imgs-wrap .img {
   width: 216rpx;
   width: 216rpx;
-  height: 196rpx;
+  height: 144rpx;
   background-color: #f6f6f6;
   background-color: #f6f6f6;
   margin-top: 20rpx;
   margin-top: 20rpx;
   margin-right: 20rpx;
   margin-right: 20rpx;

+ 5 - 6
components/postCell/postCell.wxss

@@ -28,12 +28,11 @@
 .post-cell::before {
 .post-cell::before {
   content: "";
   content: "";
   position: absolute;
   position: absolute;
-  height: 2rpx;
-  left: 30rpx;
-  right: 30rpx;
+  height: 6rpx;
+  left: 0;
+  right: 0;
   bottom: 0;
   bottom: 0;
-  transform: scaleY(0.5);
-  background-color: #efefef;
+  background-color: #f6f6f6;
 }
 }
 
 
 .top-wrap {
 .top-wrap {
@@ -113,7 +112,7 @@
 .imgs-wrap .img-four,
 .imgs-wrap .img-four,
 .imgs-wrap .img {
 .imgs-wrap .img {
   width: 216rpx;
   width: 216rpx;
-  height: 162rpx;
+  height: 216rpx;
   margin-top: 20rpx;
   margin-top: 20rpx;
   margin-right: 20rpx;
   margin-right: 20rpx;
 }
 }

+ 36 - 24
components/poster/poster.js

@@ -2,44 +2,56 @@ Component({
   properties: {
   properties: {
     obj: {
     obj: {
       type: Object,
       type: Object,
-      value: {}
+      value: {},
     },
     },
     barcodeImgUrl: {
     barcodeImgUrl: {
       type: String,
       type: String,
-      value: 'https://discuz.hoolihome.com/defaults/barcode2.jpg'
-    }
+      value: "https://discuz.hoolihome.com/defaults/barcode2.jpg",
+    },
   },
   },
   data: {
   data: {
     dataArr: [],
     dataArr: [],
-    logoImgUrl: 'https://static.hoolihome.com/weapp/hoolihome/slogan.png?v=1'
+    logoImgUrl: "https://static.hoolihome.com/weapp/hoolihome/slogan.png?v=1",
   },
   },
   methods: {
   methods: {
     getElementInfo: function () {
     getElementInfo: function () {
       const query = wx.createSelectorQuery().in(this); //fields
       const query = wx.createSelectorQuery().in(this); //fields
-      query.selectAll('.canvas-part').fields({
-        dataset: true,
-        rect: true,
-        id: true,
-        size: true,
-        computedStyle: ['color', 'backgroundColor', 'fontSize', 'fontWeight', 'borderRadius'],
-        context: true,
-      }, function (res) {
-        let pages = getCurrentPages();
-        let curPage = pages[pages.length - 1];
-        if (res && curPage && curPage.posterCallack) {
-          curPage.posterCallack(res);
-        } else {
-          curPage.posterCallack(null);
-        }
-      }).exec()
+      query
+        .selectAll(".canvas-part")
+        .fields(
+          {
+            dataset: true,
+            rect: true,
+            id: true,
+            size: true,
+            computedStyle: [
+              "color",
+              "backgroundColor",
+              "fontSize",
+              "fontWeight",
+              "borderRadius",
+            ],
+            context: true,
+          },
+          function (res) {
+            let pages = getCurrentPages();
+            let curPage = pages[pages.length - 1];
+            if (res && curPage && curPage.posterCallack) {
+              curPage.posterCallack(res);
+            } else {
+              curPage.posterCallack(null);
+            }
+          }
+        )
+        .exec();
     },
     },
     photoLoaded: function (e) {
     photoLoaded: function (e) {
       this.getElementInfo();
       this.getElementInfo();
-    }
+    },
   },
   },
   lifetimes: {
   lifetimes: {
     ready: function () {
     ready: function () {
       // this.getElementInfo();
       // this.getElementInfo();
-    }
-  }
-})
+    },
+  },
+});

+ 6 - 2
components/poster/poster.wxml

@@ -1,5 +1,5 @@
-<!-- type = 1 文章  type = 2 视频  type = 2 帖子   -->
-<view class="poster-global">
+<!-- type = 1 文章  type = 2 视频  type =  帖子   -->
+<view class="poster-global {{obj.type != 3 ? 'is-visibility ':''}}">
   <view id="container" class="poster-container canvas-part">
   <view id="container" class="poster-container canvas-part">
     <view id="above" class="poster-above canvas-part">
     <view id="above" class="poster-above canvas-part">
       <view id="rect" class="poster-photo-wrapper canvas-part">
       <view id="rect" class="poster-photo-wrapper canvas-part">
@@ -7,6 +7,10 @@
           src="{{ obj.coverImg || 'https://static.hoolihome.com/weapp/daily/poster-cover.png' }}"
           src="{{ obj.coverImg || 'https://static.hoolihome.com/weapp/daily/poster-cover.png' }}"
           data-what="{{ obj.coverImg || 'https://static.hoolihome.com/weapp/daily/poster-cover.png' }}"
           data-what="{{ obj.coverImg || 'https://static.hoolihome.com/weapp/daily/poster-cover.png' }}"
           bindload="photoLoaded"></image>
           bindload="photoLoaded"></image>
+        <image id="image" class="poster-slogo canvas-part" mode="widthFix"
+          data-what="https://static.hoolihome.com/weapp/daily/poster-slogo.png"
+          src="https://static.hoolihome.com/weapp/daily/poster-slogo.png">
+        </image>
         <block wx:if="{{obj.type == 2 }}">
         <block wx:if="{{obj.type == 2 }}">
           <image id="image" class="poster-video-play canvas-part"
           <image id="image" class="poster-video-play canvas-part"
             data-what="https://static.hoolihome.com/weapp/daily/play.png"
             data-what="https://static.hoolihome.com/weapp/daily/play.png"

+ 13 - 2
components/poster/poster.wxss

@@ -1,13 +1,16 @@
 .poster-global {
 .poster-global {
-  position: absolute;
+  position: fixed;
   top: 2000px;
   top: 2000px;
   left: 0;
   left: 0;
   z-index: -2;
   z-index: -2;
-  /* visibility: hidden; */
   background-color: transparent;
   background-color: transparent;
   height: auto;
   height: auto;
   overflow: hidden;
   overflow: hidden;
 }
 }
+.is-visibility {
+  top: 0;
+  visibility: hidden;
+}
 
 
 .poster-container {
 .poster-container {
   width: 646rpx;
   width: 646rpx;
@@ -45,6 +48,14 @@
   transform: translate(-50%, -50%);
   transform: translate(-50%, -50%);
 }
 }
 
 
+.poster-slogo {
+  position: absolute;
+  top: 20rpx;
+  right: 22rpx;
+  width: 170rpx;
+  height: 48rpx;
+}
+
 .poster-video-time {
 .poster-video-time {
   position: absolute;
   position: absolute;
   bottom: 10px;
   bottom: 10px;

+ 1 - 1
pages/history/history.wxml

@@ -12,7 +12,7 @@
                 <new-cell wx:else data="{{ item }}"></new-cell>
                 <new-cell wx:else data="{{ item }}"></new-cell>
             </block>
             </block>
         </block>
         </block>
-        <view wx:if="{{!isEmpty && isEnd}}" class="end-txt">已显示全部内容</view>
+        <view wx:if="{{listData.length && isEnd}}" class="end-txt">已显示全部内容</view>
     </scroll-view>
     </scroll-view>
     <empty wx:if="{{isEmpty}}" tips="暂无此内容浏览" top="200"></empty>
     <empty wx:if="{{isEmpty}}" tips="暂无此内容浏览" top="200"></empty>
 </view>
 </view>

+ 4 - 0
pages/history/history.wxss

@@ -1,4 +1,8 @@
 /* pages/history/history.wxss */
 /* pages/history/history.wxss */
+page {
+  background-color: #ffffff;
+}
+
 .end-txt {
 .end-txt {
   height: 60rpx;
   height: 60rpx;
   line-height: 60rpx;
   line-height: 60rpx;

+ 23 - 1
pages/index/index.js

@@ -17,12 +17,34 @@ Page({
     isEnd: false,
     isEnd: false,
   },
   },
 
 
-  onLoad: function () {
+  onLoad: function (options) {
+    const { shareUid } = options;
+    // 分享用户id
+    if (shareUid && shareUid.length) {
+      util.setStorageSync("SHAREUID", shareUid);
+    }
     this.loadNewsData({ isRefresh: true });
     this.loadNewsData({ isRefresh: true });
     this.loadCategoryListData();
     this.loadCategoryListData();
     this.getNavBarHeight();
     this.getNavBarHeight();
     this.getStorageHistoryObj();
     this.getStorageHistoryObj();
   },
   },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+    let path = `/pages/index/index`;
+    const userInfo = util.getStorageSync("USERINFO");
+    if (userInfo && userInfo.userCode && userInfo.userCode.length) {
+      // 分享用户id
+      path = path + "?shareUid=" + userInfo.userCode;
+    }
+    return {
+      title: "留学daily",
+      path: path,
+    };
+  },
+
   getScrollH() {
   getScrollH() {
     const _this = this;
     const _this = this;
     wx.createSelectorQuery()
     wx.createSelectorQuery()

+ 1 - 2
pages/index/index.wxml

@@ -15,10 +15,9 @@
     <block wx:if="{{ newList[selectTab].length }}">
     <block wx:if="{{ newList[selectTab].length }}">
       <new-cell wx:for="{{ newList[selectTab] }}" wx:key="index" data="{{ item }}" history-obj="{{ historyObj }}">
       <new-cell wx:for="{{ newList[selectTab] }}" wx:key="index" data="{{ item }}" history-obj="{{ historyObj }}">
       </new-cell>
       </new-cell>
+      <view wx:if="{{newList[selectTab].length && isEnd}}" class="end-txt">已显示全部内容</view>
     </block>
     </block>
     <empty wx:elif="{{ !!newList[selectTab] }}" top="200"></empty>
     <empty wx:elif="{{ !!newList[selectTab] }}" top="200"></empty>
-
-    <view wx:if="{{newList[selectTab].length && isEnd}}" class="end-txt">已显示全部内容</view>
   </scroll-view>
   </scroll-view>
   <!-- </block> -->
   <!-- </block> -->
 </view>
 </view>

+ 3 - 6
pages/index/index.wxss

@@ -1,7 +1,8 @@
 /**index.wxss**/
 /**index.wxss**/
 page {
 page {
-  background-color: #f6f6f6;
+  background-color: #ffffff;
 }
 }
+
 .index-page {
 .index-page {
   position: relative;
   position: relative;
   display: flex;
   display: flex;
@@ -9,11 +10,7 @@ page {
 }
 }
 .index-page .tabs-wrap {
 .index-page .tabs-wrap {
   background-color: #ffffff;
   background-color: #ffffff;
-  padding-bottom: 20rpx;
-}
-
-.index-page .tabs__placeholder {
-  height: 60rpx;
+  padding-bottom: 10rpx;
 }
 }
 
 
 .container {
 .container {

+ 0 - 1
pages/login/login.js

@@ -1,7 +1,6 @@
 const net = require("../../utils/net.js");
 const net = require("../../utils/net.js");
 const util = require("../../utils/util.js");
 const util = require("../../utils/util.js");
 const { api_wx_login, api_user_update } = require("../../utils/api.js");
 const { api_wx_login, api_user_update } = require("../../utils/api.js");
-const app = getApp();
 Page({
 Page({
   /**
   /**
    * 页面的初始数据
    * 页面的初始数据

+ 6 - 2
pages/message/message.wxss

@@ -1,4 +1,8 @@
 /* pages/message/message.wxss */
 /* pages/message/message.wxss */
+page {
+  background-color: #ffffff;
+}
+
 .cell {
 .cell {
   display: flex;
   display: flex;
   margin: 0 30rpx;
   margin: 0 30rpx;
@@ -28,8 +32,8 @@
 
 
 .cell .name {
 .cell .name {
   font-size: 32rpx;
   font-size: 32rpx;
-  font-family: PingFangSC-Medium, PingFang SC;
-  font-weight: 500;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
   color: rgba(51, 51, 51, 1);
   color: rgba(51, 51, 51, 1);
 }
 }
 
 

+ 1 - 1
pages/my/my.wxml

@@ -12,7 +12,7 @@
           <view class="info-head-right">
           <view class="info-head-right">
             <view class="info-head-name">
             <view class="info-head-name">
               <text>{{userData.userInfo.userName}}</text>
               <text>{{userData.userInfo.userName}}</text>
-              <image class="edit" src="../../images/edit.png" catch:tap="tapUserInfoAction"></image>
+              <text class="edit" catch:tap="tapUserInfoAction">编辑</text>
             </view>
             </view>
             <view class="info-head-center">个人主页 <image class="arrow-icon" src='../../images/arrow-right.png'></image>
             <view class="info-head-center">个人主页 <image class="arrow-icon" src='../../images/arrow-right.png'></image>
             </view>
             </view>

+ 5 - 3
pages/my/my.wxss

@@ -132,7 +132,9 @@ page {
 }
 }
 
 
 .edit {
 .edit {
-  width: 44rpx;
-  height: 44rpx;
-  padding: 10rpx;
+  font-size: 26rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: rgba(102, 102, 102, 1);
+  padding: 6rpx 10rpx 0 16rpx;
 }
 }

+ 1 - 1
pages/myAttention/myAttention.wxml

@@ -40,7 +40,7 @@
                 </view>
                 </view>
             </block>
             </block>
         </block>
         </block>
-        <view wx:if="{{isEnd}}" class="end-txt">已显示全部内容</view>
+        <view wx:if="{{listData.length && isEnd}}" class="end-txt">已显示全部内容</view>
     </scroll-view>
     </scroll-view>
     <empty wx:if="{{isEmpty}}" tips="{{selectTab == 0 ? '还没有关注任何用户' :'还没有关注任何话题'}}" top="200"></empty>
     <empty wx:if="{{isEmpty}}" tips="{{selectTab == 0 ? '还没有关注任何用户' :'还没有关注任何话题'}}" top="200"></empty>
 </view>
 </view>

+ 4 - 0
pages/myAttention/myAttention.wxss

@@ -1,4 +1,8 @@
 /* pages/myAttention/myAttention.wxss */
 /* pages/myAttention/myAttention.wxss */
+page {
+  background-color: #ffffff;
+}
+
 .user-card {
 .user-card {
   position: relative;
   position: relative;
   display: flex;
   display: flex;

+ 1 - 1
pages/myfans/myfans.wxml

@@ -12,7 +12,7 @@
                 catch:attention="tapAttentionAction"></attention-btn>
                 catch:attention="tapAttentionAction"></attention-btn>
         </view>
         </view>
     </view>
     </view>
-    <view wx:if="{{isEnd}}" class="end-txt">已显示全部内容</view>
+    <view wx:if="{{listData.length && isEnd}}" class="end-txt">已显示全部内容</view>
     <empty wx:if="{{isEmpty}}" tips="还没有粉丝哦" sub-tips="听说多发表评论可以吸粉!" top="200"></empty>
     <empty wx:if="{{isEmpty}}" tips="还没有粉丝哦" sub-tips="听说多发表评论可以吸粉!" top="200"></empty>
 
 
 </view>
 </view>

+ 4 - 0
pages/myfans/myfans.wxss

@@ -1,4 +1,8 @@
 /* pages/myfans/myfans.wxss */
 /* pages/myfans/myfans.wxss */
+page {
+  background-color: #ffffff;
+}
+
 .user-card {
 .user-card {
   position: relative;
   position: relative;
   display: flex;
   display: flex;

+ 35 - 6
pages/newDetail/newDetail.js

@@ -88,10 +88,28 @@ Page({
       path = path + "&shareUid=" + userInfo.userCode;
       path = path + "&shareUid=" + userInfo.userCode;
     }
     }
 
 
+    let coverImgUrl = "";
+    if (detailData.coverImgUrl) {
+      coverImgUrl = detailData.coverImgUrl;
+    } else if (detailData.imgsUrl.length) {
+      coverImgUrl = detailData.imgsUrl[0];
+    } else {
+      coverImgUrl = "https://static.hoolihome.com/weapp/daily/poster-cover.png";
+    }
+
+    let title = "留学daily";
+    if (detailData.title) {
+      title = detailData.title;
+    } else if (detailData.content) {
+      title = detailData.content;
+    } else {
+      title = "留学daily";
+    }
+
     return {
     return {
-      title: detailData.title,
+      title: title,
       path: path,
       path: path,
-      imageUrl: detailData.coverImgUrl,
+      imageUrl: coverImgUrl,
     };
     };
   },
   },
 
 
@@ -428,9 +446,9 @@ Page({
         if (data.qrImg && data.qrImg.length) {
         if (data.qrImg && data.qrImg.length) {
           this.setData(
           this.setData(
             {
             {
+              isShowQRPoster: true,
               postImgSrc: data.qrImg,
               postImgSrc: data.qrImg,
               extendObj: extendObj,
               extendObj: extendObj,
-              isShowQRPoster: true,
             },
             },
             () => {
             () => {
               wx.showLoading({
               wx.showLoading({
@@ -462,9 +480,10 @@ Page({
 
 
   posterCallack: function (arr) {
   posterCallack: function (arr) {
     if (!arr) return;
     if (!arr) return;
+    let isFirstTop = 0;
     arr.forEach((v, i, a) => {
     arr.forEach((v, i, a) => {
-      let { id, dataset } = v;
-      if (id.indexOf("img") !== -1) {
+      let { id, dataset, top } = v;
+      if (id.indexOf("image") !== -1) {
         wx.getImageInfo({
         wx.getImageInfo({
           src: dataset.what,
           src: dataset.what,
           success: (res) => {
           success: (res) => {
@@ -472,6 +491,16 @@ Page({
           },
           },
         });
         });
       }
       }
+      if (i == 0 && top < 0) {
+        isFirstTop = Math.abs(top);
+        v.top = 0;
+      } else if (isFirstTop) {
+        v.top += isFirstTop;
+      }
+      // 圈子显示三行是,css 设置了top:2000px;所以需要减去2000
+      if (top >= 2000) {
+        v.top -= 2000;
+      }
     });
     });
     if (Array.isArray(arr) && arr.length) {
     if (Array.isArray(arr) && arr.length) {
       this.setData(
       this.setData(
@@ -528,7 +557,7 @@ Page({
           success: function (res) {
           success: function (res) {
             if (res.confirm) {
             if (res.confirm) {
               wx.openSetting({
               wx.openSetting({
-                success(res) { },
+                success(res) {},
               });
               });
             }
             }
           },
           },

+ 1 - 1
pages/newDetail/newDetail.wxss

@@ -1,6 +1,6 @@
 /* pages/newDetail/newDetail.wxss */
 /* pages/newDetail/newDetail.wxss */
 page {
 page {
-  background-color: #fff;
+  background-color: #ffffff;
 }
 }
 
 
 .new-detail {
 .new-detail {

+ 2 - 1
pages/personal/personal.wxml

@@ -1,7 +1,8 @@
 <!--pages/personal/personal.wxml-->
 <!--pages/personal/personal.wxml-->
 <view class="personal">
 <view class="personal">
     <view id="fixedTop">
     <view id="fixedTop">
-        <nav-bar id="navBar" bind:back="tapNavBarAction" background="#B4DBFE" left-btn-bg-color="#E0EFFD"></nav-bar>
+        <nav-bar id="navBar" bind:back="tapNavBarAction" background="#B4DBFE" left-btn-bg-color="rgba(255,255,255,0.6)">
+        </nav-bar>
         <view class="user-info">
         <view class="user-info">
             <view class="user-info-inner">
             <view class="user-info-inner">
                 <view class="info-top">
                 <view class="info-top">

+ 21 - 0
pages/postList/postList.js

@@ -17,9 +17,30 @@ Page({
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */
   onLoad: function (options) {
   onLoad: function (options) {
+    const { shareUid } = options;
+    // 分享用户id
+    if (shareUid && shareUid.length) {
+      util.setStorageSync("SHAREUID", shareUid);
+    }
     this.loadPostsData({ isRefresh: true });
     this.loadPostsData({ isRefresh: true });
   },
   },
 
 
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+    let path = `/pages/postList/postList`;
+    const userInfo = util.getStorageSync("USERINFO");
+    if (userInfo && userInfo.userCode && userInfo.userCode.length) {
+      // 分享用户id
+      path = path + "?shareUid=" + userInfo.userCode;
+    }
+    return {
+      title: "留学daily",
+      path: path,
+    };
+  },
+
   /**
   /**
    * 页面上拉触底事件的处理函数
    * 页面上拉触底事件的处理函数
    */
    */

+ 2 - 1
pages/postList/postList.wxss

@@ -1,7 +1,8 @@
 /* pages/post/post.wxss */
 /* pages/post/post.wxss */
 page {
 page {
-  background-color: #f6f6f6;
+  background-color: #ffffff;
 }
 }
+
 .end-txt {
 .end-txt {
   height: 60rpx;
   height: 60rpx;
   line-height: 60rpx;
   line-height: 60rpx;

+ 39 - 4
pages/selectTags/selectTags.js

@@ -1,12 +1,18 @@
 // pages/tags/tags.js
 // pages/tags/tags.js
 const net = require("../../utils/net.js");
 const net = require("../../utils/net.js");
 const { api_topic_list } = require("../../utils/api.js");
 const { api_topic_list } = require("../../utils/api.js");
+const util = require("../../utils/util.js");
+
 Page({
 Page({
   /**
   /**
    * 页面的初始数据
    * 页面的初始数据
    */
    */
   data: {
   data: {
     tagsArr: [],
     tagsArr: [],
+    page: 1,
+    limit: 20,
+    inputValue: "",
+    scrollH: 64,
   },
   },
 
 
   /**
   /**
@@ -16,6 +22,7 @@ Page({
     this.loadTagsData({
     this.loadTagsData({
       isRefresh: true,
       isRefresh: true,
     });
     });
+    this.bindSearch = util.debounce(this.bindSearch);
   },
   },
 
 
   /**
   /**
@@ -23,16 +30,42 @@ Page({
    */
    */
   onReachBottom: function () {
   onReachBottom: function () {
     if (this._isload) {
     if (this._isload) {
-      return 0;
+      return false;
     }
     }
-    this._isload = true;
     this.data.page += 1;
     this.data.page += 1;
     this.loadTagsData({
     this.loadTagsData({
       isRefresh: false,
       isRefresh: false,
     });
     });
   },
   },
 
 
-  loadTagsData(obj) {
+  bindSearch: function (e) {
+    const { value } = e.detail;
+    const keyword = value.trim();
+    if (keyword.length) {
+      this.data.inputValue = keyword;
+      this.data.page = 1;
+      this.loadTagsData(
+        {
+          isRefresh: true,
+        },
+        keyword
+      );
+    }
+  },
+
+  tapCancelAction() {
+    const { inputValue } = this.data;
+    if (inputValue.length) {
+      this.setData({
+        inputValue: "",
+      });
+      this.loadTagsData({
+        isRefresh: true,
+      });
+    }
+  },
+
+  loadTagsData(obj, keyword) {
     const { page, limit, tagsArr } = this.data;
     const { page, limit, tagsArr } = this.data;
     let params = {};
     let params = {};
     params.url = api_topic_list;
     params.url = api_topic_list;
@@ -40,12 +73,14 @@ Page({
       page: page,
       page: page,
       limit: limit,
       limit: limit,
     };
     };
+    keyword && keyword.length && (params.data.keyword = keyword);
     net.req(params, true).then(
     net.req(params, true).then(
       (data) => {
       (data) => {
         if (obj.isRefresh) {
         if (obj.isRefresh) {
           this.setData({
           this.setData({
             tagsArr: data.list,
             tagsArr: data.list,
           });
           });
+          this._isload = false;
           this._refresh = false;
           this._refresh = false;
         } else {
         } else {
           if (data.list.length) {
           if (data.list.length) {
@@ -53,7 +88,7 @@ Page({
               tagsArr: tagsArr.concat(data.list),
               tagsArr: tagsArr.concat(data.list),
             });
             });
           }
           }
-          this._isload = false;
+          this._isload = data.list.length < limit;
         }
         }
       },
       },
       (e) => {
       (e) => {

+ 16 - 7
pages/selectTags/selectTags.wxml

@@ -1,12 +1,21 @@
 <!--pages/tags/tags.wxml-->
 <!--pages/tags/tags.wxml-->
 <view class="tags-pages">
 <view class="tags-pages">
-    <nav-bar title="选择话题"></nav-bar>
-    <view class="tag-item" wx:for="{{tagsArr}}" wx:key="index" data-item="{{item}}" bind:tap="tapCellAction">
-        <image wx:if="{{item.imgUrl}}" class="img" src="{{item.imgUrl}}"></image>
-        <text class="tag-txt" wx:else>{{item.firstWord}}</text>
-        <view class="flex-col">
-            <text class="name">{{item.tagName}}</text>
-            <text wx:if="{{item.content}}" class="desc singleline">{{item.content}}</text>
+    <nav-bar id="navBar" title="选择话题"></nav-bar>
+    <view class="search-wrap">
+        <view class="search-inner">
+            <input bindinput="bindSearch" value="{{inputValue}}" placeholder-style="color:#999999"
+                placeholder="输入关键词搜索" />
+        </view>
+        <view class="cancel" bind:tap="tapCancelAction">取消</view>
+    </view>
+    <view class="tag-group">
+        <view class="tag-item" wx:for="{{tagsArr}}" wx:key="index" data-item="{{item}}" bind:tap="tapCellAction">
+            <image wx:if="{{item.imgUrl}}" class="img" src="{{item.imgUrl}}"></image>
+            <text class="tag-txt" wx:else>{{item.firstWord}}</text>
+            <view class="flex-col">
+                <text class="name">{{item.tagName}}</text>
+                <text wx:if="{{item.content}}" class="desc singleline">{{item.content}}</text>
+            </view>
         </view>
         </view>
     </view>
     </view>
 </view>
 </view>

+ 42 - 1
pages/selectTags/selectTags.wxss

@@ -1,6 +1,10 @@
 /* pages/tags/tags.wxss */
 /* pages/tags/tags.wxss */
 page {
 page {
-  background-color: #f6f6f6;
+  background-color: #ffffff;
+}
+
+.tag-group {
+  padding-top: 74rpx;
 }
 }
 
 
 .tag-item {
 .tag-item {
@@ -63,3 +67,40 @@ page {
   color: rgba(102, 102, 102, 1);
   color: rgba(102, 102, 102, 1);
   margin-top: 10rpx;
   margin-top: 10rpx;
 }
 }
+
+.search-wrap {
+  position: fixed;
+  left: 0;
+  right: 0;
+  z-index: 10;
+  display: flex;
+  align-items: center;
+  height: 74rpx;
+  background-color: #fff;
+  box-sizing: border-box;
+}
+
+.search-inner {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  height: 64rpx;
+  padding: 0 28rpx;
+  margin-left: 30rpx;
+  background-color: #fafafa;
+  border-radius: 32rpx;
+}
+
+.search-inner input {
+  flex: 1;
+  font-size: 28rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #333333;
+}
+
+.search-wrap .cancel {
+  color: #666666;
+  font-size: 28rpx;
+  padding: 20rpx 30rpx;
+}

+ 1 - 1
pages/tagDetail/tagDetail.wxml

@@ -2,7 +2,7 @@
 <view class="tag-detail-page">
 <view class="tag-detail-page">
     <view id="fixedTop">
     <view id="fixedTop">
         <nav-bar id="navBar" bind:back="tapNavBarAction" background="#12264D" background-color-top="#12264D"
         <nav-bar id="navBar" bind:back="tapNavBarAction" background="#12264D" background-color-top="#12264D"
-            left-btn-bg-color="#E0EFFD">
+            left-btn-bg-color="rgba(255,255,255,0.6)">
         </nav-bar>
         </nav-bar>
         <view class="topic-info-wrap">
         <view class="topic-info-wrap">
             <view class="flex flex-center flex-bet margin-bottom-18">
             <view class="flex flex-center flex-bet margin-bottom-18">

+ 2 - 1
pages/tagDetail/tagDetail.wxss

@@ -1,7 +1,8 @@
 /* pages/tagDetail/tagDetail.wxss */
 /* pages/tagDetail/tagDetail.wxss */
 page {
 page {
-  background-color: #12264d;
+  background-color: #ffffff;
 }
 }
+
 .flex {
 .flex {
   display: flex;
   display: flex;
 }
 }

+ 1 - 1
utils/api.js

@@ -39,7 +39,7 @@ const apis = {
 };
 };
 
 
 for (const key in apis) {
 for (const key in apis) {
-  apis[key] = `${apis[key]}?v=1`;
+  apis[key] = `${apis[key]}?apiVersion=1.1.1`;
 }
 }
 
 
 module.exports = apis;
 module.exports = apis;

+ 1 - 1
utils/poster.js

@@ -22,7 +22,7 @@ export default class Poster {
 
 
         fontSize = fontSize.replace("px", "");
         fontSize = fontSize.replace("px", "");
         fontSize = Math.ceil(Number(fontSize) * pixelRatio) + "px";
         fontSize = Math.ceil(Number(fontSize) * pixelRatio) + "px";
-        top = Math.ceil((top >= 2000 ? top - 2000 : top) * pixelRatio);
+        top = Math.ceil(top * pixelRatio);
         left = Math.ceil(left * pixelRatio);
         left = Math.ceil(left * pixelRatio);
         if (pixelRatio > 3) {
         if (pixelRatio > 3) {
           // 曲面屏做适配
           // 曲面屏做适配