-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #636 from MuZiL1/master
- Loading branch information
Showing
4 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 照片回忆录 | ||
|
||
## 二维码: | ||
![image](http://m.qpic.cn/psb?/V10XSgjf0rbmVk/X5wEgRBGesiWCorO4StcB5TYGH.z6jM5XpcI9.Vg8hs!/b/dGUBAAAAAAAA&bo=yQC3AAAAAAADB1w!&rf=viewer_4) | ||
|
||
## 说明: | ||
照片回忆录,主要是让每个人想珍藏的照片放入其中,有时间可以拿出来看看,未必不是一件美好的事,而且也能记录周围过去的一些你觉得可以回忆的点点滴滴。 | ||
|
||
|
||
## 页面设计: | ||
首页是介绍小程序的主要功能,可以通过首页的背景以及滚动的内容进行合理的照片收藏。 | ||
|
||
第二页的表单创建,可以记录收藏照片的数量,提交后可以获取相应的信息。 | ||
|
||
第三页是回收站页面,可以通过这里删除一些让人不开心的记录。 | ||
|
||
进入小程序就会获取用户的信息,如头像、昵称、地理位置,便于后台发送当地的数据给用户。 | ||
|
||
|
||
## 主要截图 | ||
### 首页 | ||
![image] | ||
(http://m.qpic.cn/psb?/V10XSgjf0rbmVk/HIRUP2Og1D*hnhCVdFflcETKHdW6BacOuAZREz0RdN4!/b/dPcAAAAAAAAA&bo=FgHeAQAAAAADF*o!&rf=viewer_4 | ||
|
||
) | ||
|
||
### 表单 | ||
![image] | ||
(http://m.qpic.cn/psb?/V10XSgjf0rbmVk/Q89Li8uc*3TQW1rkH1HczohHN6XgduBUOJ1lmjBhehw!/b/dPcAAAAAAAAA&bo=EQHjAQAAAAADF8A!&rf=viewer_4 | ||
|
||
) | ||
|
||
### 回收站 | ||
![image] | ||
(http://m.qpic.cn/psb?/V10XSgjf0rbmVk/enqZrygD87SS6*4FDOXGoQtYcA2xCVCLEZjAgRYDRAw!/b/dP0AAAAAAAAA&bo=DgG5AQAAAAADF4U!&rf=viewer_4 | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const app = getApp() | ||
|
||
Page({ | ||
data: { | ||
motto: '你最想删除照片', | ||
result: [], | ||
userInfo: {}, | ||
hasUserInfo: false, | ||
canIUse: wx.canIUse('button.open-type.getUserInfo') | ||
}, | ||
//事件处理函数 | ||
bindViewTap: function () { | ||
wx.navigateTo({ | ||
url: '../logs/logs' | ||
}) | ||
}, | ||
|
||
|
||
onLoad: function () { | ||
var that = this; | ||
wx.request({ | ||
url: 'https://infoaas.com/data/hzc.json', | ||
method: 'GET', | ||
header: { | ||
'content-type': 'application/json' | ||
}, | ||
success: function (res) { | ||
that.setData({ | ||
result: res.data | ||
}) | ||
} | ||
}) | ||
}, | ||
getUserInfo: function (e) { | ||
console.log(e) | ||
app.globalData.userInfo = e.detail.userInfo | ||
this.setData({ | ||
userInfo: e.detail.userInfo, | ||
hasUserInfo: true | ||
}) | ||
} | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!--pages/Creatdata/Creatdata.wxml--> | ||
|
||
<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}}" background-size="cover"></image> | ||
<text class="userinfo-nickname">{{userInfo.nickName}}</text> | ||
</block> | ||
</view> | ||
<view class="usermotto"> | ||
<text class="user-motto">{{motto}}</text> | ||
</view> | ||
|
||
<view wx:for="{{result}}" wx:for-item="item"> | ||
<view>{{index}}:{{item}}</view> | ||
</view> | ||
|
||
</view> | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* pages/Creatdata/Creatdata.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; | ||
height: 128rpx; | ||
color:red; | ||
|
||
} | ||
|
||
/*背景*/ | ||
page{ | ||
background-image:url("https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=426595056,3152484396&fm=27&gp=0.jpg"); | ||
background-repeat:no-repeat; | ||
|
||
background-size: 650px 700px; | ||
opacity: 1; | ||
} | ||
.weui-footer{ | ||
margin-bottom: 50px; | ||
} | ||
.weui-footer_fixed-bottom{ | ||
margin-bottom: 0; | ||
} | ||
|
||
.usermotto { | ||
margin-top: 200px; | ||
} | ||
.weui-media-box__thumb{ | ||
width:350px; | ||
} | ||
.weui-media-box__thumb{ | ||
height:250px; | ||
} |