|
@@ -14,16 +14,19 @@
|
|
title="宝宝信息"
|
|
title="宝宝信息"
|
|
@deleteBaby="deleteBaby"
|
|
@deleteBaby="deleteBaby"
|
|
></headerTitle>
|
|
></headerTitle>
|
|
- <headerTitle v-else title="宝宝信息" @deleteBaby="deleteBaby"></headerTitle>
|
|
|
|
|
|
+ <headerTitle v-else title="宝宝信息"></headerTitle>
|
|
|
|
|
|
<view class="avatar-wrapper">
|
|
<view class="avatar-wrapper">
|
|
|
|
+ <!-- 头像 -->
|
|
<view class="card-container" @click="photoBtn">
|
|
<view class="card-container" @click="photoBtn">
|
|
<view class="info-profile"><image :src="camera" /></view>
|
|
<view class="info-profile"><image :src="camera" /></view>
|
|
- <view class="info-camera"><image src="/src/static/icon/camera.svg" /></view>
|
|
|
|
|
|
+ <view class="info-camera">
|
|
|
|
+ <!-- <image src="/src/static/icon/camera.svg" /> -->
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="card-item">
|
|
<view class="card-item">
|
|
<!-- 昵称 -->
|
|
<!-- 昵称 -->
|
|
- <view class="section" @click="nicknameBtn">
|
|
|
|
|
|
+ <view class="section">
|
|
<view class="section-left">
|
|
<view class="section-left">
|
|
<view class="label">宝宝昵称</view>
|
|
<view class="label">宝宝昵称</view>
|
|
<view class="nickname">
|
|
<view class="nickname">
|
|
@@ -38,7 +41,7 @@
|
|
:columns="columns"
|
|
:columns="columns"
|
|
v-model:value="genderValue"
|
|
v-model:value="genderValue"
|
|
title="性别"
|
|
title="性别"
|
|
- @confirm="handleConfirm"
|
|
|
|
|
|
+ @confirm="handleGenderBtn"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</ItemForm>
|
|
</ItemForm>
|
|
@@ -56,7 +59,7 @@
|
|
:columns="columnsBlood"
|
|
:columns="columnsBlood"
|
|
title="血型"
|
|
title="血型"
|
|
v-model:value="bloodValue"
|
|
v-model:value="bloodValue"
|
|
- @confirm="handleConfirm"
|
|
|
|
|
|
+ @confirm="handleBloodBtn"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</ItemForm>
|
|
</ItemForm>
|
|
@@ -66,7 +69,7 @@
|
|
<wd-button @click="addBaby">保存</wd-button>
|
|
<wd-button @click="addBaby">保存</wd-button>
|
|
</view>
|
|
</view>
|
|
<view class="baby-Bottom" v-else>
|
|
<view class="baby-Bottom" v-else>
|
|
- <wd-button @click="addBaby">开始育人</wd-button>
|
|
|
|
|
|
+ <wd-button @click="startBtn">开始育人</wd-button>
|
|
</view>
|
|
</view>
|
|
<wd-message-box />
|
|
<wd-message-box />
|
|
</view>
|
|
</view>
|
|
@@ -78,6 +81,8 @@
|
|
import ItemForm from './item-form.vue'
|
|
import ItemForm from './item-form.vue'
|
|
import pickerUser from './pickerUser.vue'
|
|
import pickerUser from './pickerUser.vue'
|
|
import { formateDate } from '../../../utils/times'
|
|
import { formateDate } from '../../../utils/times'
|
|
|
|
+ import { useMessage } from 'wot-design-uni'
|
|
|
|
+ const message = useMessage()
|
|
const queryList = ref({}) // 宝宝信息
|
|
const queryList = ref({}) // 宝宝信息
|
|
const columns = ref(['男', '女', '保密'])
|
|
const columns = ref(['男', '女', '保密'])
|
|
const columnsBlood = ref(['A型', 'B型', 'AB型', 'O型'])
|
|
const columnsBlood = ref(['A型', 'B型', 'AB型', 'O型'])
|
|
@@ -87,23 +92,68 @@
|
|
const datetimeValue = ref('') // 生日
|
|
const datetimeValue = ref('') // 生日
|
|
|
|
|
|
const camera = 'https://ai-public.mastergo.com/ai/img_res/d2b4d6b8d90031e1134ed22cfb120081.jpg'
|
|
const camera = 'https://ai-public.mastergo.com/ai/img_res/d2b4d6b8d90031e1134ed22cfb120081.jpg'
|
|
|
|
+
|
|
// 删除
|
|
// 删除
|
|
- const deleteBaby = () => {}
|
|
|
|
- const handleConfirm = () => {
|
|
|
|
- console.log(genderValue.value)
|
|
|
|
|
|
+ const deleteBaby = () => {
|
|
|
|
+ message
|
|
|
|
+ .confirm({
|
|
|
|
+ msg: '确定删除宝宝信息吗?',
|
|
|
|
+ cancelButtonProps: {
|
|
|
|
+ customClass: 'custom-one',
|
|
|
|
+ },
|
|
|
|
+ confirmButtonProps: {
|
|
|
|
+ customClass: 'custom-two',
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ console.log('点击了确定按钮')
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ console.log('点击了取消按钮')
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- const nicknameBtn = () => {}
|
|
|
|
|
|
+
|
|
|
|
+ // 换头像
|
|
const photoBtn = () => {
|
|
const photoBtn = () => {
|
|
- console.log('换头像')
|
|
|
|
|
|
+ uni.chooseImage({
|
|
|
|
+ count: 1, // 最多选择1张
|
|
|
|
+ sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
|
|
|
+ sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
|
|
|
+ success: (res) => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ },
|
|
|
|
+ fail: (err) => {
|
|
|
|
+ console.error(err)
|
|
|
|
+ },
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- // 开始育人
|
|
|
|
- const addBaby = () => {
|
|
|
|
- console.log('开始育人')
|
|
|
|
|
|
+
|
|
|
|
+ // 性别
|
|
|
|
+ const handleGenderBtn = () => {
|
|
|
|
+ console.log(genderValue.value)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 血型
|
|
|
|
+ const handleBloodBtn = () => {
|
|
|
|
+ console.log(11)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 生日
|
|
const handleTimes = ({ value }) => {
|
|
const handleTimes = ({ value }) => {
|
|
formateDate(value)
|
|
formateDate(value)
|
|
console.log(formateDate(value), 'formattedDateformattedDate')
|
|
console.log(formateDate(value), 'formattedDateformattedDate')
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 保存数据
|
|
|
|
+ const addBaby = () => {
|
|
|
|
+ console.log('保存数据')
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 开始育人
|
|
|
|
+ const startBtn = () => {
|
|
|
|
+ console.log('开始育人')
|
|
|
|
+ }
|
|
|
|
+
|
|
// 计算属性判断 queryList 是否为空
|
|
// 计算属性判断 queryList 是否为空
|
|
const isQueryListEmpty = computed(() => Object.keys(queryList.value).length === 0)
|
|
const isQueryListEmpty = computed(() => Object.keys(queryList.value).length === 0)
|
|
onLoad((query) => {
|
|
onLoad((query) => {
|
|
@@ -123,7 +173,7 @@
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
- height: 320rpx;
|
|
|
|
|
|
+ height: 240rpx;
|
|
padding-top: 32rpx;
|
|
padding-top: 32rpx;
|
|
background: #fff;
|
|
background: #fff;
|
|
}
|
|
}
|
|
@@ -137,8 +187,8 @@
|
|
}
|
|
}
|
|
.info-camera {
|
|
.info-camera {
|
|
position: absolute;
|
|
position: absolute;
|
|
- top: 240rpx;
|
|
|
|
- left: 410rpx;
|
|
|
|
|
|
+ top: 204rpx;
|
|
|
|
+ left: 400rpx;
|
|
background: #f88842;
|
|
background: #f88842;
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
image {
|
|
image {
|
|
@@ -152,7 +202,7 @@
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
- padding: 32rpx 32rpx 0px 32rpx;
|
|
|
|
|
|
+ padding: 12rpx 32rpx 32rpx 32rpx;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
}
|
|
}
|
|
.section-left {
|
|
.section-left {
|
|
@@ -187,4 +237,20 @@
|
|
::v-deep .wd-picker__cell {
|
|
::v-deep .wd-picker__cell {
|
|
padding: 12rpx 0px;
|
|
padding: 12rpx 0px;
|
|
}
|
|
}
|
|
|
|
+ ::v-deep .wd-button {
|
|
|
|
+ gap: 10px;
|
|
|
|
+ flex: 1 0 0;
|
|
|
|
+ }
|
|
|
|
+ ::v-deep .wd-message-box__actions {
|
|
|
|
+ .custom-one {
|
|
|
|
+ color: #000 !important;
|
|
|
|
+ border: none;
|
|
|
|
+ background: #fff !important;
|
|
|
|
+ }
|
|
|
|
+ .custom-two {
|
|
|
|
+ color: #fb4848 !important;
|
|
|
|
+ border: none;
|
|
|
|
+ background: #fff !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|