页面切图
This commit is contained in:
59
pages/user/head.vue
Normal file
59
pages/user/head.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view slot='body'>
|
||||
<view class='head'>
|
||||
<image class="head-img" src="/static/head.png"></image>
|
||||
<view class="head-setup">
|
||||
<view class="head-setup-item" @click="take('album')">从相册选一张</view>
|
||||
<view class="head-setup-item" @click="take('camera')">拍一张照片</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
take (type) {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: [type],
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.head {
|
||||
|
||||
.head-img {
|
||||
height: 750rpx;
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
.head-setup {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 750rpx;
|
||||
padding-bottom: 60rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.head-setup-item{
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
border-top: 1rpx solid #e8e8e8;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user