index on master: 88cecbb Initial Commit

1
zjh19990323 6 years ago
parent 88cecbb2b1
commit 1ff4a694b5

@ -1,12 +1,53 @@
{
"pages":[
"pages/index/index",
"pages/logs/logs"
"pages": [
"shouye/shouye",
"chazhao/chazhao",
"jieyue/jieyue",
"wode/wode"
],
"window":{
"backgroundTextStyle":"light",
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle":"black"
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#000000",
"selectedColor": "#fd9941",
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "shouye/shouye",
"text": "首页",
"iconPath": "image/shouye.png",
"selectedIconPath": "image/shouye-hl.png"
},
{
"pagePath": "chazhao/chazhao",
"text": "查找",
"iconPath": "image/chazhao.png",
"selectedIconPath": "image/chazhao-hl.png"
},
{
"pagePath": "jieyue/jieyue",
"text": "借阅",
"iconPath":"image/jieyue.png",
"selectedIconPath":"image/jieyue-hl.png"
},
{
"pagePath": "wode/wode",
"text": "我的",
"iconPath": "image/wode.png",
"selectedIconPath": "image/wode-hl.png"
}
]
}
}
}

@ -5,6 +5,6 @@
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
padding: 100rpx 0;
box-sizing: border-box;
}

@ -0,0 +1,23 @@
// chazhao/chazhao.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,2 @@
<!--chazhao/chazhao.wxml-->
<text>chazhao/chazhao.wxml</text>

@ -0,0 +1 @@
/* chazhao/chazhao.wxss */

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@ -0,0 +1,23 @@
// jieyue/jieyue.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,2 @@
<!--jieyue/jieyue.wxml-->
<text>jieyue/jieyue.wxml</text>

@ -0,0 +1 @@
/* jieyue/jieyue.wxss */

@ -1,21 +0,0 @@
/**index.wxss**/
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
.usermotto {
margin-top: 200px;
}

@ -1,15 +0,0 @@
//logs.js
const util = require('../../utils/util.js')
Page({
data: {
logs: []
},
onLoad: function () {
this.setData({
logs: (wx.getStorageSync('logs') || []).map(log => {
return util.formatTime(new Date(log))
})
})
}
})

@ -1,3 +0,0 @@
{
"navigationBarTitleText": "查看启动日志"
}

@ -1,6 +0,0 @@
<!--logs.wxml-->
<view class="container log-list">
<block wx:for="{{logs}}" wx:for-item="log">
<text class="log-item">{{index + 1}}. {{log}}</text>
</block>
</view>

@ -1,8 +0,0 @@
.log-list {
display: flex;
flex-direction: column;
padding: 40rpx;
}
.log-item {
margin: 10rpx;
}

@ -0,0 +1,23 @@
// shouye/shouye.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,2 @@
<!--shouye/shouye.wxml-->
<text>shouye/shouye.wxml</text>

@ -0,0 +1 @@
/* shouye/shouye.wxss */

@ -1,10 +1,9 @@
//index.js
//获取应用实例
// 首页/shouye.js
const app = getApp()
Page({
data: {
motto: 'Hello World',
motto: 'Hello',
userInfo: {},
hasUserInfo: false,
canIUse: wx.canIUse('button.open-type.getUserInfo')

@ -0,0 +1,4 @@
{
"usingComponents": {}
}

@ -1,13 +1,19 @@
<!--index.wxml-->
<page>
<view class="container">
<view class="userinfo">
<button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button>
<block wx:else>
<image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
<text class="userinfo-nickname">{{userInfo.nickName}}</text>
<text class="userinfo-nickname">欢迎,{{userInfo.nickName}}</text>
</block>
</view>
<view class="usermotto">
<text class="user-motto">{{motto}}</text>
</view>
</view>
<button class='button1'><view>个人信息</view></button>
<button class='button2'><view>借阅记录</view></button>
<button class='button3'><view>退出登录</view></button>
</page>

@ -0,0 +1,64 @@
/* 首页/shouye.wxss */
.button1{
width: 80%;
margin-top: 0rpx;
background-color:rgba(253, 153, 65, 0.67);
color: white;
border-radius: 98rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.button1::after
{
border: 0;
}
.button2{
width: 80%;
margin-top: 50rpx;
background-color:rgba(253, 153, 65, 0.67);
color: white;
border-radius: 98rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.button2:after
{
border: 0;
}
.button3{
width: 80%;
margin-top: 50rpx;
background-color:rgba(253, 153, 65, 0.67);
color: white;
border-radius: 98rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.button3::after
{
border: 0;
}
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin-top: 0rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #000;
}
Loading…
Cancel
Save