Skip to content

Commit

Permalink
hzuapps#2 hzuapps#95 第2次实验代码
Browse files Browse the repository at this point in the history
  • Loading branch information
linhaohong committed Nov 5, 2017
1 parent b370557 commit a280e73
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 9 deletions.
40 changes: 37 additions & 3 deletions 1514080901115/app.json
Original file line number Diff line number Diff line change
@@ -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": "个人主页"
}
]

}
}
56 changes: 53 additions & 3 deletions 1514080901115/pages/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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
});
}*/
})
8 changes: 8 additions & 0 deletions 1514080901115/pages/index/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@
<text class="user-motto">{{motto}}</text>
</view>
</view>

<view class="index">
<view class="index-hd">
<image class="index-logo" src="../../image/logo.png"></image>
<view class="index-desc">您还没有完善名片信息。</view>
</view>

</view>
35 changes: 32 additions & 3 deletions 1514080901115/pages/index/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
}

.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
width: 158rpx;
height: 158rpx;
margin: -150rpx 100rpx 10rpx 100rpx;
border-radius: 50%;
}

Expand All @@ -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;
}

0 comments on commit a280e73

Please sign in to comment.