Browse Source

fix: 添加长者信息提示

develop
song 4 years ago
parent
commit
c30cdc222b
  1. 1
      CHANGELOG.md
  2. 2
      src/components/Info/Info.vue
  3. 12
      src/pagesYanyuan/add-info/add-info.vue

1
CHANGELOG.md

@ -197,6 +197,7 @@
- | 时间轴骨架屏修改 | [ca78d02](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/ca78d02) - | 时间轴骨架屏修改 | [ca78d02](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/ca78d02)
- | 测试页面标题修改 | [decbcf1](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/decbcf1) - | 测试页面标题修改 | [decbcf1](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/decbcf1)
- | 添加canvas | [9bc13c7](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/9bc13c7) - | 添加canvas | [9bc13c7](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/9bc13c7)
- | 添加分享功能 | [b882484](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/b882484)
- | 添加绑定WiFi | [c523022](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/c523022) - | 添加绑定WiFi | [c523022](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/c523022)
- | 监听时间基本点 | [033fca0](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/033fca0) - | 监听时间基本点 | [033fca0](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/033fca0)
- | 答题时记录做到第几题 | [547eb6e](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/547eb6e) - | 答题时记录做到第几题 | [547eb6e](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/547eb6e)

2
src/components/Info/Info.vue

@ -668,8 +668,10 @@ export default {
const info = this.infoList[i]; const info = this.infoList[i];
for (let j = 0; j < info.length; j++) { for (let j = 0; j < info.length; j++) {
const item = info[j]; const item = info[j];
console.log('item: ', item);
if (item.type !== 5) { if (item.type !== 5) {
if (item.value === null) { if (item.value === null) {
console.log('item.name', item.name);
this.$emit('showToast', 'default', `请填写${item.name}`, false); this.$emit('showToast', 'default', `请填写${item.name}`, false);
isComplete = false; isComplete = false;
break; break;

12
src/pagesYanyuan/add-info/add-info.vue

@ -1,9 +1,10 @@
<template> <template>
<view> <view>
<u-top-tips ref="uTips" type="success"></u-top-tips> <u-top-tips ref="uTips" type="success"></u-top-tips>
<Info class="bg-white" @submit="submit" @setEmptyInfo="setEmptyInfo" /> <Info class="bg-white" @submit="submit" @setEmptyInfo="setEmptyInfo" @showToast="showToast" />
<view class="w-full bg text-gray-200 text-center pt-4 pb-12">----------我也是有底线的----------</view> <view class="w-full bg text-gray-200 text-center pt-4 pb-12">----------我也是有底线的----------</view>
<u-toast ref="uToast"></u-toast>
</view> </view>
</template> </template>
@ -82,6 +83,15 @@ export default {
}); });
}); });
}, },
//
showToast(type, title, icon) {
this.$refs.uToast.show({
type,
title,
icon,
});
},
}, },
}; };
</script> </script>

Loading…
Cancel
Save