tanyanfei 3 years ago
parent
commit
a10fe464c6
7 changed files with 114 additions and 4 deletions
  1. 1 1
      app.json
  2. BIN
      images/about.png
  3. 66 0
      pages/aboutus/aboutus.js
  4. 3 0
      pages/aboutus/aboutus.json
  5. 6 0
      pages/aboutus/aboutus.wxml
  6. 22 0
      pages/aboutus/aboutus.wxss
  7. 16 3
      pages/list/list.js

+ 1 - 1
app.json

@@ -7,7 +7,7 @@
     "pages/user/user",
     "pages/myMatchDetail/myMatchDetail",
     "pages/record/record",
-    
+    "pages/aboutus/aboutus",
     "pages/mymatch/mymatch",
     "pages/follow/follow",
     "pages/day/day",

BIN
images/about.png


+ 66 - 0
pages/aboutus/aboutus.js

@@ -0,0 +1,66 @@
+// pages/aboutus/aboutus.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
pages/aboutus/aboutus.json

@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "关于我们"
+}

File diff suppressed because it is too large
+ 6 - 0
pages/aboutus/aboutus.wxml


+ 22 - 0
pages/aboutus/aboutus.wxss

@@ -0,0 +1,22 @@
+/* pages/aboutus/aboutus.wxss */
+page{
+  background: #F4F6F8;
+}
+.bg{
+  padding: 24rpx;
+}
+.bg image{
+  position: relative;
+  z-index: 3;
+}
+.bg view{
+  padding:48rpx 24rpx;
+  background: #fff;
+  font-size: 28rpx;
+  line-height: 48rpx;
+  border-radius: 16px;
+  position: relative;
+  top: -30rpx;
+  z-index: 2;
+  font-weight: 500;
+}

+ 16 - 3
pages/list/list.js

@@ -11,6 +11,7 @@ Page({
     total:0,
     order1:1,
     order2: 1,
+    order_by:'',
     list:[]
   },
 
@@ -27,8 +28,10 @@ Page({
     var data={
       id: this.data.id,
       page: this.data.page,
-      page_size:20
+      page_size:20,
+      order_by: this.data.order_by
     }
+    
     const list = this.data.list;
     wx.showNavigationBarLoading();
     $api.getRankList(data).then(res=>{
@@ -64,13 +67,23 @@ Page({
   //排序
   changeOrder1(){
     this.setData({
-      order1:!this.data.order1
+      order1:!this.data.order1,
+      order_by: this.data.order1 ? 'today_income__asc' :'today_income__desc',
+      page:1,
+      total:0,
+      list:[]
     })
+    this.getData()
   },
   changeOrder2() {
     this.setData({
-      order2: !this.data.order2
+      order2: !this.data.order2,
+      order_by: this.data.order2 ? 'total_income__asc' : 'total_income__desc',
+      page: 1,
+      total: 0,
+      list: []
     })
+    this.getData()
   },