From a280e7373ae68c3b7eaff33da4450783333b93ee Mon Sep 17 00:00:00 2001 From: linhaohong <1834469680@qq.com> Date: Sun, 5 Nov 2017 11:06:14 +0800 Subject: [PATCH] =?UTF-8?q?#2=20#95=20=E7=AC=AC2=E6=AC=A1=E5=AE=9E?= =?UTF-8?q?=E9=AA=8C=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1514080901115/app.json | 40 ++++++++++++++++++-- 1514080901115/pages/index/index.js | 56 ++++++++++++++++++++++++++-- 1514080901115/pages/index/index.wxml | 8 ++++ 1514080901115/pages/index/index.wxss | 35 +++++++++++++++-- 4 files changed, 130 insertions(+), 9 deletions(-) diff --git a/1514080901115/app.json b/1514080901115/app.json index 69ee7066..1abaa709 100644 --- a/1514080901115/app.json +++ b/1514080901115/app.json @@ -1,12 +1,46 @@ { "pages":[ "pages/index/index", - "pages/logs/logs" + "pages/logs /logs" ], "window":{ "backgroundTextStyle":"light", - "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "实验一", + "navigationBarBackgroundColor": "#1296db", + "navigationBarTitleText": "社交名片", "navigationBarTextStyle":"black" + }, + "tabBar": { + "color": "#a9b7b7", + "selectedColor": "#1296db", + "borderStyle": "black", + "list": [ + { + "selectedIconPath": "image/mingpian_xz.png", + "iconPath": "image/mingpian.png", + "pagePath": "pages/index/index", + "text": "我的名片" + + }, + { + "selectedIconPath": "image/mingpianjia_xz.png", + "iconPath": "image/mingpianjia.png", + "pagePath": "pages/logs/logs", + "text": "名片夹" + + }, + { + "selectedIconPath": "image/sousuo_xz.png", + "iconPath": "image/sousuo.png", + "pagePath": "pages/index/index", + "text": "找名片" + }, + { + "selectedIconPath": "image/zhuye_xz.png", + "iconPath": "image/zhuye.png", + "pagePath": "pages/logs/logs", + "text": "个人主页" + } + ] + } } diff --git a/1514080901115/pages/index/index.js b/1514080901115/pages/index/index.js index 608a282e..28311b70 100644 --- a/1514080901115/pages/index/index.js +++ b/1514080901115/pages/index/index.js @@ -4,11 +4,48 @@ const app = getApp() Page({ data: { - motto: 'Hello World', + /* motto: 'Hello World', userInfo: {}, hasUserInfo: false, - canIUse: wx.canIUse('button.open-type.getUserInfo') + canIUse: wx.canIUse('button.open-type.getUserInfo')*/ + list: [ + { + id: 'view', + name: '视图容器', + open: false, + pages: ['view', 'scroll-view', 'swiper'] + }, { + id: 'content', + name: '基础内容', + open: false, + pages: ['text', 'icon', 'progress'] + }, { + id: 'form', + name: '表单组件', + open: false, + pages: ['button', 'checkbox', 'form', 'input', 'label', 'picker', 'radio', 'slider', 'switch', 'textarea'] + }, { + id: 'nav', + name: '导航', + open: false, + pages: ['navigator'] + }, { + id: 'media', + name: '媒体组件', + open: false, + pages: ['image', 'audio', 'video'] + }, { + id: 'map', + name: '地图', + pages: ['map'] + }, { + id: 'canvas', + name: '画布', + pages: ['canvas'] + } + ] }, + //事件处理函数 bindViewTap: function() { wx.navigateTo({ @@ -50,5 +87,18 @@ Page({ userInfo: e.detail.userInfo, hasUserInfo: true }) - } + }, + /*kindToggle: function (e) { + var id = e.currentTarget.id, list = this.data.list; + for (var i = 0, len = list.length; i < len; ++i) { + if (list[i].id == id) { + list[i].open = !list[i].open + } else { + list[i].open = false + } + } + this.setData({ + list: list + }); + }*/ }) diff --git a/1514080901115/pages/index/index.wxml b/1514080901115/pages/index/index.wxml index c5d09192..4bf05e89 100644 --- a/1514080901115/pages/index/index.wxml +++ b/1514080901115/pages/index/index.wxml @@ -11,3 +11,11 @@ {{motto}} + + + + + 您还没有完善名片信息。 + + + diff --git a/1514080901115/pages/index/index.wxss b/1514080901115/pages/index/index.wxss index ce30de01..19f2c3af 100644 --- a/1514080901115/pages/index/index.wxss +++ b/1514080901115/pages/index/index.wxss @@ -6,9 +6,9 @@ } .userinfo-avatar { - width: 128rpx; - height: 128rpx; - margin: 20rpx; + width: 158rpx; + height: 158rpx; + margin: -150rpx 100rpx 10rpx 100rpx; border-radius: 50%; } @@ -18,4 +18,33 @@ .usermotto { margin-top: 200px; +} + +.index-logo { + width: 86rpx; + height: 86rpx; + margin: -450rpx 100rpx 400rpx 100rpx; +} + +.index-hd { + padding: -50rpx; + text-align: center; +} +/* +.index-bd { + padding: 0 30rpx 40rpx; +} +.index-ft { + padding-bottom: 20rpx; + text-align: center; +} +.index-logo { + width: 86rpx; + height: 86rpx; +}*/ +.index-desc { + margin-top: -300rpx; + margin-bottom:10rpx; + color: #888888; + font-size: 35rpx; } \ No newline at end of file