-
14common/styles/iconfont.css
-
8components/lf-userList/lf-userList.vue
-
29pages.json
-
9pages/find/find.vue
-
6pages/index/index.vue
-
17pages/messageCenter/index.vue
-
25pages/personalTailor/personalTailor.vue
-
163pages/saySomething/saySomething.vue
-
BINstatic/tabbar/customized-active.png
-
BINstatic/tabbar/customized.png
-
BINstatic/tabbar/find-active.png
-
BINstatic/tabbar/find.png
-
BINstatic/tabbar/home-active.png
-
BINstatic/tabbar/home.png
-
BINstatic/tabbar/message-active.png
-
BINstatic/tabbar/message.png
-
BINstatic/tabbar/my-active.png
-
BINstatic/tabbar/my.png
-
BINstatic/tabbar/recomm-active.png
-
BINstatic/tabbar/recomm.png
@ -0,0 +1,25 @@ |
|||
<template> |
|||
<view style="width: 100vw; height: 100vh; background-color: #E31193; padding-top: 100rpx;"> |
|||
<view style="text-align: center; font-size: 38rpx; color: beige;">私人定制 TODO</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data(){ |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped="scoped"> |
|||
|
|||
</style> |
|||
@ -0,0 +1,163 @@ |
|||
<template> |
|||
<view class="content"> |
|||
<!-- 文本输入 --> |
|||
<textarea class="textarea" placeholder="这一刻的想法…" v-model="content"></textarea> |
|||
<!-- 上传图片 --> |
|||
<view class="my-images"> |
|||
<view class="my-image-item" @click="uploadImage" v-if="image_list.length < 6"> |
|||
<text class="lf-iconfont icon-jia my-image-item-after"></text> |
|||
</view> |
|||
<view class="my-image-item" v-for="(item, index) in image_list" :key="index" @click="lookImage(index)"> |
|||
<image :src="item" mode="aspectFill"></image> |
|||
<view class="remove-image" @click.stop="removeInage(index)"> |
|||
<text class="lf-iconfont icon-shanchu"></text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- 发表按钮 --> |
|||
<button class="my-btn" hover-class="lf-opacity">发表</button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data(){ |
|||
return { |
|||
image_list: [], |
|||
image_count: 6, |
|||
content: '' |
|||
} |
|||
}, |
|||
watch: { |
|||
// #ifdef MP-WEIXIN |
|||
content(val){ |
|||
if(String(val).length){ |
|||
// 监听微信小程序页面返回,弹出询问框 |
|||
wx.enableAlertBeforeUnload({ |
|||
message: '您已输入文字,但未发表,离开后已输入的文字将清空,确定离开?', |
|||
complete: result => { |
|||
console.log("result", result); |
|||
} |
|||
}) |
|||
}else{ |
|||
wx.disableAlertBeforeUnload(); // 关闭监听 |
|||
} |
|||
} |
|||
// #endif |
|||
}, |
|||
onLoad(){ |
|||
|
|||
}, |
|||
methods: { |
|||
// 上传凭证图片 |
|||
uploadImage(){ |
|||
let current_count = this.image_count - this.image_list.length; |
|||
if(current_count == 0) return; |
|||
uni.chooseImage({ |
|||
count: current_count, |
|||
complete: result => { |
|||
let tempFiles = result.tempFiles; |
|||
let image_list = []; |
|||
let overstep = false; |
|||
tempFiles.map(item => { |
|||
// 上传的图片需小于10MB |
|||
if(item.size < 10464788){ |
|||
image_list.push(item.path); |
|||
}else{ |
|||
overstep = true; |
|||
} |
|||
}) |
|||
if(overstep){ |
|||
uni.showModal({ |
|||
title: '温馨提示', |
|||
content: '您上传的图片含有超出10M大小的限制,请优化大小后再上传!', |
|||
showCancel: false |
|||
}) |
|||
} |
|||
this.image_list.push(...image_list); |
|||
} |
|||
}) |
|||
}, |
|||
// 预览图片 |
|||
lookImage(current){ |
|||
if(this.image_list.length <= 0) return; |
|||
this.$u.throttle(() => { |
|||
uni.previewimage({ |
|||
images: this.image_list, |
|||
current: current |
|||
}); |
|||
}, 500); |
|||
}, |
|||
// 移除图片 |
|||
removeInage(current){ |
|||
this.image_list.splice(current, 1); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped="scoped"> |
|||
.content{ |
|||
width: 750rpx; |
|||
height: max-content; |
|||
box-sizing: border-box; |
|||
padding: 30rpx 32rpx; |
|||
.textarea{ |
|||
width: 100%; |
|||
height: 160rpx; |
|||
padding: 10rpx 0; |
|||
} |
|||
} |
|||
|
|||
.my-images{ |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
margin-top: 30rpx; |
|||
margin-bottom: 18rpx; |
|||
.my-image-item{ |
|||
width: 220rpx; |
|||
height: 220rpx; |
|||
background: #DDDDDD; |
|||
position: relative; |
|||
margin-right: 12rpx; |
|||
&:nth-child(3n){ |
|||
margin-right: 0rpx; |
|||
} |
|||
&:nth-child(n+4){ |
|||
margin-top: 12rpx; |
|||
} |
|||
image{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
.remove-image{ |
|||
position: absolute; |
|||
right: -4rpx; |
|||
top: -18rpx; |
|||
color: #e74c3c; |
|||
font-size: 40rpx; |
|||
padding: 8rpx; |
|||
} |
|||
} |
|||
.my-image-item-after{ |
|||
position: absolute; |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
font-size: 60rpx; |
|||
color: #999999; |
|||
} |
|||
} |
|||
|
|||
.my-btn{ |
|||
margin-top: 30rpx; |
|||
background-color: #E21196; |
|||
color: #FFFFFF; |
|||
} |
|||
|
|||
/deep/.textarea-placeholder{ |
|||
color: #999999; |
|||
} |
|||
</style> |
|||
|
After Width: 96 | Height: 96 | Size: 4.1 KiB |
|
After Width: 96 | Height: 96 | Size: 3.9 KiB |
|
Before Width: 48 | Height: 48 | Size: 840 B After Width: 96 | Height: 96 | Size: 4.5 KiB |
|
Before Width: 48 | Height: 48 | Size: 875 B After Width: 96 | Height: 96 | Size: 4.4 KiB |
|
Before Width: 48 | Height: 48 | Size: 1.0 KiB After Width: 96 | Height: 96 | Size: 3.1 KiB |
|
Before Width: 48 | Height: 48 | Size: 1.0 KiB After Width: 96 | Height: 96 | Size: 3.0 KiB |
|
After Width: 96 | Height: 96 | Size: 3.0 KiB |
|
After Width: 96 | Height: 96 | Size: 2.9 KiB |
|
Before Width: 48 | Height: 48 | Size: 1.4 KiB After Width: 96 | Height: 96 | Size: 4.2 KiB |
|
Before Width: 48 | Height: 48 | Size: 1.4 KiB After Width: 96 | Height: 96 | Size: 4.0 KiB |
|
Before Width: 48 | Height: 48 | Size: 971 B |
|
Before Width: 48 | Height: 48 | Size: 1009 B |