From c57e7b00aa2771a6de11e4e661963abda50e5f4c Mon Sep 17 00:00:00 2001 From: Ge Hao Date: Tue, 1 Nov 2016 15:47:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=B7=B4=E7=88=B7=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E8=B5=84=E4=BA=A7=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mine/mine.js | 2 +- pages/mine/mine.wxml | 31 ++++++++++----------- pages/mine/mine.wxss | 64 ++++++++++++++++++++++++++++++++++++++++++-- utils/profile.js | 6 ++--- 4 files changed, 82 insertions(+), 21 deletions(-) diff --git a/pages/mine/mine.js b/pages/mine/mine.js index 87236be..99c2ec8 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -17,7 +17,7 @@ Page({ that.setData({userInfo:userInfo}) }) - profile.getSlides(function(result) { + profile.getZichanSlides({}, function(result) { var data = getApp().store.sync(result.data) that.setData({'zichan_slides': data}) wx.setStorage({ diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index 3d75990..727b3af 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -1,4 +1,3 @@ - {{userInfo.nickName}} @@ -12,21 +11,23 @@ 查看全部资产》 - - - - - - {{slide.title}} - {{slide.amount}} - {{slide.inventory}} + + + + + + + {{slide.name}} + {{slide['asset-count']}} + {{slide.inventory}} + - - - + + + - + + diff --git a/pages/mine/mine.wxss b/pages/mine/mine.wxss index ecb08a3..c52a7f8 100644 --- a/pages/mine/mine.wxss +++ b/pages/mine/mine.wxss @@ -31,15 +31,75 @@ display: flex; flex-direction: row; justify-content: space-between; + font-size: 27rpx; + margin-left: 20rpx; + margin-top: 20rpx; + margin-bottom: 20rpx; } .zichan .second-line { + padding-top: 15rpx; + padding-bottom: 15rpx; + border-top: 1rpx solid #F6F6F6; + border-bottom: 1rpx solid #F6F6F6; +} + +.long-view { display: flex; flex-direction: row; + width: 1850rpx; +} + +.zichan .second-line .item { + width: 560rpx; + height: 250rpx; + margin-left: 20rpx; +} + +.zichan .second-line .desc { + position: relative; + top: -255rpx; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.3); + border-radius: 5px; + text-align: center; + color: #fff; + + display: flex; + flex-direction: column; + justify-content: center; + + font-size: 25rpx; +} + +.desc-line { + margin-top: 5rpx; + margin-bottom: 5rpx; +} + +.desc-line.asset-count { + font-size: 32rpx; + color: #FFC800; } -.zichan .third-line { +.slide-img { + border-radius: 5px; + width: 560rpx; + height: 250rpx; +} + +/*.zichan .third-line { display: flex; flex-direction: row; justify-content: space-between; -} \ No newline at end of file + font-size: 27rpx; + margin-left: 20rpx; + margin-top: 20rpx; + margin-bottom: 20rpx; +}*/ + +.blank { + width: 500rpx; +} diff --git a/utils/profile.js b/utils/profile.js index 7363753..3497e06 100644 --- a/utils/profile.js +++ b/utils/profile.js @@ -1,6 +1,6 @@ const API_URL = 'http://localhost:3000' -function getZichanSlides (resolve) { +function getZichanSlides (data, resolve) { wx.request({ url: `${API_URL}/profiles/zichan_sildes`, data: data, @@ -11,7 +11,7 @@ function getZichanSlides (resolve) { } module.exports = { - getZichanSlides (resolve) { - return getZichanSlides(resolve) + getZichanSlides (data, resolve) { + return getZichanSlides(data, resolve) } } \ No newline at end of file