| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <template>
- <view class="content">
- <view class="row1">
- <text class="tit">头像</text>
- <view class="background-img"><image class="background-img" v-model="avatar" :src="avatar" mode="aspectFill"></image></view>
- </view>
- <view class="row">
- <text class="tit">家长</text>
- <input class="input" type="text" v-model="patriarch" placeholder-class="placeholder" />
- </view>
- <view class="row">
- <text class="tit">学生</text>
- <input class="input" type="text" v-model="student" placeholder-class="placeholder" />
- </view>
- <view class="row">
- <text class="tit">手机号</text>
- <input class="input" type="text" v-model="phone" placeholder-class="placeholder" />
- </view>
- </view>
- </template>
- <script>
- import { mapState } from 'vuex';
- export default{
- data(){
- return{
- avatar: '',
- patriarch: '',
- student: '',
- phone: ''
- }
- },
- computed: {
- ...mapState('user', ['userInfo'])
- },
- onShow(option) {
- // 获取生日日期
- this.patriarch = this.userInfo.real_name || '';
- this.avatar = this.userInfo.avatar || '';
- this.phone = this.userInfo.phone || '';
- },
- }
- </script>
- <style lang="scss">
- .row1 {
- display: flex;
- align-items: center;
- justify-content: space-between;
- position: relative;
- padding: 0 30upx;
- height: 110upx;
- background: #fff;
- margin-bottom: 20upx;
- .tit {
- flex-shrink: 0;
- width: 120upx;
- font-size: $font-lg;
- color: $font-color-dark;
- }
-
- .background-img {
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- background: #f2f2f2;
- }
- }
- .row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- position: relative;
- padding: 0 30upx;
- height: 110upx;
- background: #fff;
-
- .tit {
- flex-shrink: 0;
- width: 120upx;
- font-size: $font-lg;
- color: $font-color-dark;
- }
- .tit1 {
- flex-shrink: 0;
- width: 150upx;
- font-size: $font-lg;
- color: $font-color-dark;
-
- }
- .input {
- flex: 1;
- font-size: $font-base;
- color: $color-gray;
- }
- }
- </style>
|