소스 검색

更新2

消息界面
mulioid 4 년 전
부모
커밋
e0d8e45767

+ 3 - 2
miniprogram/app.json

@@ -1,7 +1,7 @@
 {
   "pages": [
-    "pages/setting/setting",
     "pages/main/main",
+    "pages/setting/setting",
     "pages/activity/activity",
     "pages/myFollow/myFollow",
     "pages/publisher/publisher",
@@ -18,7 +18,8 @@
     "pages/opinion/opinion",
     "pages/myPublish/myPublish",
     "pages/administratorSetting/administratorSetting",
-    "pages/myColor/myColor"
+    "pages/myColor/myColor",
+    "pages/myFavor/myFavor"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 0 - 6
miniprogram/components/myLikePublisher/myLikePublisher.json

@@ -1,6 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "itemmyLikePublisher":"../itemmyLikePublisher/itemmyLikePublisher"
-  }
-}

+ 0 - 6
miniprogram/components/myNews/myNews.json

@@ -1,6 +0,0 @@
-{
-  "component":true,
-  "usingComponents": {
-    "itemmyNews":"../itemmyNews/itemmyNews"
-  }
-}

+ 0 - 41
miniprogram/pages/message/message.js

@@ -1,41 +0,0 @@
-// pages/navi/navi.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    currentTab: 0,
-    winWidth: 0,
-    winHeight: 0
-  },
-
-  switchNav:function(e){
-    var id = e.currentTarget.id;
-    this.setData({currentTab:id});
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (e) {
-    var page = this;
-    wx.getSystemInfo({
-      success: (res) => {
-        page.setData({winWidth:res.windowWidth});
-        page.setData({winHeight:res.windowHeight});
-      },
-    })
-  },
-
-  switchNav:function(e){
-    var id = e.currentTarget.id;
-    this.setData({currentTab:id});
-  },
-  
-  updatePage: function(e) {
-    this.setData({
-      currentTab: e.detail.current
-    })
-  }
-})

+ 2 - 2
miniprogram/pages/message/message.json

@@ -1,6 +1,6 @@
 {
+  "component":true,
   "usingComponents": {
-    "followNews":"../../components/followNews/followNews",
-    "myNews":"../../components/myNews/myNews"
+    "itemmyNews":"/components/itemmyNews/itemmyNews"
   }
 }

+ 0 - 24
miniprogram/pages/message/message.wxml

@@ -1,24 +0,0 @@
-<!-- 为消息的导航栏 两个component界面:“关注动态”followNews “我的消息”myNews-->
-<!-- 修改:将关注动态转移到首页,消息页面删除导航栏-->
-<view class="nav default-primary-color">
-  <view id="0" class="{{currentTab == 0?'select text-primary-color':'normal secondary-text-color'}}" bindtap="switchNav">关注者动态</view>
-  <view class="line dark-primary-color-font">|</view>
-  <view id="1" class="{{currentTab == 1?'select text-primary-color':'normal secondary-text-color'}}" bindtap="switchNav">我的消息</view>
-</view>
-<swiper current="{{currentTab}}" style="height:{{winHeight-48}}px" bindchange="updatePage">
-  <swiper-item>
-    <scroll-view scroll-y="true" style="height: 100%;">
-      <followNews></followNews>
-    </scroll-view>
-  </swiper-item>
-  <swiper-item>
-    <scroll-view scroll-y="true" style="height: 100%;">
-      <myNews></myNews>
-    </scroll-view>
-  </swiper-item>
-  <swiper-item>
-    <scroll-view scroll-y="true"  style="height: 100%;">
-      <users></users>
-    </scroll-view>
-  </swiper-item>
-</swiper>

+ 0 - 28
miniprogram/pages/message/message.wxss

@@ -1,28 +0,0 @@
-.nav{
-  display: flex;
-  flex-direction: row;
-  height: 40px;
-}
-
-.select{
-  width: 50%;
-  height: 35px;
-  line-height: 35px;
-  text-align: center;
-  font-size: 14px;
-  border-bottom: 5px solid #e6e6e6;
-}
-
-.normal{
-  width: 50%;
-  height: 35px;
-  line-height: 35px;
-  text-align: center;
-  font-size: 14px;
-}
-
-.line{
-  height: 40px;
-  line-height: 35px;
-  font-size: 18px;
-}

+ 0 - 0
miniprogram/components/myLikeMessage/myLikeMessage.js → miniprogram/pages/myFavor/myFavor.js


+ 0 - 0
miniprogram/components/myLikeMessage/myLikeMessage.json → miniprogram/pages/myFavor/myFavor.json


+ 0 - 0
miniprogram/components/myLikeMessage/myLikeMessage.wxml → miniprogram/pages/myFavor/myFavor.wxml


+ 7 - 7
miniprogram/components/myNews/myNews.wxss → miniprogram/pages/myFavor/myFavor.wxss

@@ -1,7 +1,7 @@
-.page{
-  display: flex;
-  flex-direction: column;
-  justify-content: flex-start;
-  align-items: center;
-  margin: 0%;
-}
+.page{
+  display: flex;
+  flex-direction: column;
+  justify-content: flex-start;
+  align-items: center;
+  margin: 0%;
+}

+ 0 - 41
miniprogram/pages/myFollow/myFollow.js

@@ -1,41 +0,0 @@
-// pages/navi/navi.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    currentTab: 0,
-    winWidth: 0,
-    winHeight: 0
-  },
-
-  switchNav:function(e){
-    var id = e.currentTarget.id;
-    this.setData({currentTab:id});
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (e) {
-    var page = this;
-    wx.getSystemInfo({
-      success: (res) => {
-        page.setData({winWidth:res.windowWidth});
-        page.setData({winHeight:res.windowHeight});
-      },
-    })
-  },
-
-  switchNav:function(e){
-    var id = e.currentTarget.id;
-    this.setData({currentTab:id});
-  },
-  
-  updatePage: function(e) {
-    this.setData({
-      currentTab: e.detail.current
-    })
-  }
-})

+ 2 - 2
miniprogram/pages/myFollow/myFollow.json

@@ -1,6 +1,6 @@
 {
+  "component": true,
   "usingComponents": {
-    "myLikeMessage": "/components/myLikeMessage/myLikeMessage",
-    "myLikePublisher": "/components/myLikePublisher/myLikePublisher"
+    "itemmyLikePublisher":"/components/itemmyLikePublisher/itemmyLikePublisher"
   }
 }

+ 0 - 23
miniprogram/pages/myFollow/myFollow.wxml

@@ -1,23 +0,0 @@
-<!-- 为消息的导航栏 两个component界面:“关注动态”followNews “我的消息”myNews-->
-<view class="nav default-primary-color">
-  <view id="0" class="{{currentTab == 0?'select text-primary-color':'normal secondary-text-color'}}" bindtap="switchNav">收藏信息</view>
-  <view class="line dark-primary-color-font">|</view>
-  <view id="1" class="{{currentTab == 1?'select text-primary-color':'normal secondary-text-color'}}" bindtap="switchNav">组织/社团</view>
-</view>
-<swiper current="{{currentTab}}" style="height:{{winHeight-48}}px" bindchange="updatePage">
-  <swiper-item>
-    <scroll-view scroll-y="true" style="height: 100%;">
-      <myLikeMessage></myLikeMessage>
-    </scroll-view>
-  </swiper-item>
-  <swiper-item>
-    <scroll-view scroll-y="true" style="height: 100%;">
-      <myLikePublisher></myLikePublisher>
-    </scroll-view>
-  </swiper-item>
-  <swiper-item>
-    <scroll-view scroll-y="true"  style="height: 100%;">
-      <users></users>
-    </scroll-view>
-  </swiper-item>
-</swiper>

+ 0 - 28
miniprogram/pages/myFollow/myFollow.wxss

@@ -1,28 +0,0 @@
-.nav{
-  display: flex;
-  flex-direction: row;
-  height: 40px;
-}
-
-.select{
-  width: 50%;
-  height: 35px;
-  line-height: 35px;
-  text-align: center;
-  font-size: 14px;
-  border-bottom: 5px solid #e6e6e6;
-}
-
-.normal{
-  width: 50%;
-  height: 35px;
-  line-height: 35px;
-  text-align: center;
-  font-size: 14px;
-}
-
-.line{
-  height: 40px;
-  line-height: 35px;
-  font-size: 18px;
-}

+ 6 - 0
miniprogram/pages/user/user.js

@@ -36,6 +36,12 @@ Page({
     })
   },
 
+  myFavor:function(){
+    wx.navigateTo({
+      url: '/pages/myFavor/myFavor',
+    })
+  },
+
   setting:function(){
     wx.navigateTo({
       url: '/pages/setting/setting',

+ 9 - 1
miniprogram/pages/user/user.wxml

@@ -9,9 +9,17 @@
 <view wx:if="{{hasUserInfo}}">
   <view class="gap"></view>
 
+  <view class="btn block-background-color" hover-class="btn-hover" bindtap="myFavor">
+    <image class="btn-icon" mode="aspectFit" src="/images/user/follow.png"></image>
+    <view class="btn-text primary-text">我的收藏</view>
+    <view class="btn-arrow secondary-text">></view>
+  </view>
+
+  <view class="line"></view>
+
   <view class="btn block-background-color" hover-class="btn-hover" bindtap="myFollow">
     <image class="btn-icon" mode="aspectFit" src="/images/user/follow.png"></image>
-    <view class="btn-text primary-text">我的喜欢</view>
+    <view class="btn-text primary-text">我的关注</view>
     <view class="btn-arrow secondary-text">></view>
   </view>