diff --git a/xuan-deduct-uniapp/src/pages/daliuren/daliuren.vue b/xuan-deduct-uniapp/src/pages/daliuren/daliuren.vue index 4c57f1c..7b24220 100644 --- a/xuan-deduct-uniapp/src/pages/daliuren/daliuren.vue +++ b/xuan-deduct-uniapp/src/pages/daliuren/daliuren.vue @@ -139,6 +139,42 @@ export default { async calculate() { if (this.loading) return + if (!this.name || this.name.trim() === '') { + uni.showToast({ + title: '请输入姓名', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.occupy || this.occupy.trim() === '') { + uni.showToast({ + title: '请输入占事', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.solarDate) { + uni.showToast({ + title: '请选择占卜日期', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.birthTime) { + uni.showToast({ + title: '请选择占卜时间', + icon: 'none', + duration: 2000 + }) + return + } + this.loading = true uni.showLoading({ diff --git a/xuan-deduct-uniapp/src/pages/liuyao/liuyao.vue b/xuan-deduct-uniapp/src/pages/liuyao/liuyao.vue index 487c580..dd5d779 100644 --- a/xuan-deduct-uniapp/src/pages/liuyao/liuyao.vue +++ b/xuan-deduct-uniapp/src/pages/liuyao/liuyao.vue @@ -135,6 +135,42 @@ export default { async calculate() { if (this.loading) return + if (!this.name || this.name.trim() === '') { + uni.showToast({ + title: '请输入姓名', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.occupy || this.occupy.trim() === '') { + uni.showToast({ + title: '请输入占事', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.solarDate) { + uni.showToast({ + title: '请选择占卜日期', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.birthTime) { + uni.showToast({ + title: '请选择占卜时间', + icon: 'none', + duration: 2000 + }) + return + } + this.loading = true uni.showLoading({ diff --git a/xuan-deduct-uniapp/src/pages/meihua/meihua.vue b/xuan-deduct-uniapp/src/pages/meihua/meihua.vue index 3be1e3e..460e696 100644 --- a/xuan-deduct-uniapp/src/pages/meihua/meihua.vue +++ b/xuan-deduct-uniapp/src/pages/meihua/meihua.vue @@ -153,6 +153,42 @@ export default { async calculate() { if (this.loading) return + if (!this.name || this.name.trim() === '') { + uni.showToast({ + title: '请输入姓名', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.occupy || this.occupy.trim() === '') { + uni.showToast({ + title: '请输入占事', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.solarDate) { + uni.showToast({ + title: '请选择占卜日期', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.birthTime) { + uni.showToast({ + title: '请选择占卜时间', + icon: 'none', + duration: 2000 + }) + return + } + this.loading = true uni.showLoading({ diff --git a/xuan-deduct-uniapp/src/pages/qimen/qimen.vue b/xuan-deduct-uniapp/src/pages/qimen/qimen.vue index 2794b9b..242813e 100644 --- a/xuan-deduct-uniapp/src/pages/qimen/qimen.vue +++ b/xuan-deduct-uniapp/src/pages/qimen/qimen.vue @@ -171,6 +171,42 @@ export default { async calculate() { if (this.loading) return + if (!this.name || this.name.trim() === '') { + uni.showToast({ + title: '请输入姓名', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.occupy || this.occupy.trim() === '') { + uni.showToast({ + title: '请输入占事', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.solarDate) { + uni.showToast({ + title: '请选择占卜日期', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.birthTime) { + uni.showToast({ + title: '请选择占卜时间', + icon: 'none', + duration: 2000 + }) + return + } + this.loading = true uni.showLoading({ diff --git a/xuan-deduct-uniapp/src/pages/taluo/taluo.vue b/xuan-deduct-uniapp/src/pages/taluo/taluo.vue index 95950ee..0807b35 100644 --- a/xuan-deduct-uniapp/src/pages/taluo/taluo.vue +++ b/xuan-deduct-uniapp/src/pages/taluo/taluo.vue @@ -78,6 +78,15 @@ export default { async startDivine() { if (this.loading) return + if (!this.question || this.question.trim() === '') { + uni.showToast({ + title: '请输入您的问题', + icon: 'none', + duration: 2000 + }) + return + } + this.loading = true uni.showLoading({ diff --git a/xuan-deduct-uniapp/src/pages/zhanxing/zhanxing.vue b/xuan-deduct-uniapp/src/pages/zhanxing/zhanxing.vue index 1d92336..4621eb6 100644 --- a/xuan-deduct-uniapp/src/pages/zhanxing/zhanxing.vue +++ b/xuan-deduct-uniapp/src/pages/zhanxing/zhanxing.vue @@ -91,6 +91,42 @@ export default { async calculate() { if (this.loading) return + if (!this.name || this.name.trim() === '') { + uni.showToast({ + title: '请输入姓名', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.solarDate) { + uni.showToast({ + title: '请选择出生日期', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.birthTime) { + uni.showToast({ + title: '请选择出生时间', + icon: 'none', + duration: 2000 + }) + return + } + + if (!this.birthPlace || this.birthPlace.trim() === '') { + uni.showToast({ + title: '请输入出生地点', + icon: 'none', + duration: 2000 + }) + return + } + this.loading = true uni.showLoading({