Skip to content

Commit

Permalink
修复视频选择的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
小闹钟 committed Nov 16, 2016
1 parent 0a15eb1 commit aee2bfa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pages/entry/entry.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@

.content .footer .left {
display: inline-block;
float: left;
height: 40rpx;
margin: 10rpx 0;
}
Expand All @@ -94,7 +93,7 @@
height: 40rpx;
margin-left: 20rpx;
background-color: #E5E7ED;
font-size: 10rpx;
font-size: 20rpx;
}

.content .footer .right image {
Expand Down
2 changes: 1 addition & 1 deletion pages/mine/mine.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var tabs = [
},
]
var userInfo = {
avatar: "http://tva3.sinaimg.cn/crop.0.0.540.540.50/6cbb1ee0jw8ej0zou5e71j20f00f0q3b.jpg",
avatar: "https://pic4.zhimg.com/e515adf3b_xl.jpg",
nickname: "小闹钟",
sex: "♂", // 0, male; 1, female
meta: '1篇日记',
Expand Down
7 changes: 6 additions & 1 deletion pages/new/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,18 @@ Page({
writeContent(res, type) {
let diary = this.data.diary;

if (type === IMAGE || type === VIDEO) {
if (type === IMAGE) {
res.tempFilePaths.forEach((element, index, array) => {
// TODO 内容上传至服务器
diary.list.push(this.makeContent(type, element, ''))
});
}

if (type === VIDEO) {
// TODO 内容上传至服务器
diary.list.push(this.makeContent(type, res.tempFilePath, ''))
}

// 设置日记封面
if (type === IMAGE && !this.data.diary.meta.cover) {
this.setData({'diary.meta.cover': res.tempFilePaths[0]});
Expand Down

0 comments on commit aee2bfa

Please sign in to comment.