diff --git a/pages/Viewprescription/Viewprescription.vue b/pages/Viewprescription/Viewprescription.vue
index fa8495b..61b5b94 100644
--- a/pages/Viewprescription/Viewprescription.vue
+++ b/pages/Viewprescription/Viewprescription.vue
@@ -152,7 +152,7 @@
lookbook(item) {
if (item.existFlag == false) {
this.$refs.uToast.show({
- title: "暂无报告",
+ message: "暂无报告",
type: 'error',
duration: 1000
})
diff --git a/pages/grade/grade.vue b/pages/grade/grade.vue
index 82669a3..03cf62e 100644
--- a/pages/grade/grade.vue
+++ b/pages/grade/grade.vue
@@ -24,12 +24,15 @@
{{item.totalFraction}}
分
-
+
-
- 查看报告
- 查看报告
+ 暂无报告
+ 查看报告
+
+
+ 查看报告
+
@@ -70,42 +73,42 @@
},
methods: {
- showToast() {
- this.$refs.uToast.show({
- message: "暂无报告",
- type: 'error',
- duration: 1000
- })
- },
-
lookbook(item) {
- uni.showLoading({
- title: '获取报告中'
- });
- var that = this
- wx.downloadFile({
- url: baseurl + item.downloadAddress,
- success: function(res) {
- var filePath = res.tempFilePath;
- wx.openDocument({
- filePath: filePath,
- showMenu: true,
- success: function(res) {
- uni.hideLoading();
- },
- fail: function(err) {
- uni.hideLoading();
- }
- });
- },
- fail: function(err) {
- uni.hideLoading();
- that.$refs.uToast.show({
- title: '请求报告失败',
- type: 'error'
- })
- }
- });
+ if (item.existFlag == false) {
+ this.$refs.uToast.show({
+ message: "暂无报告",
+ type: 'error',
+ duration: 1000
+ })
+ } else {
+ uni.showLoading({
+ title: '获取报告中'
+ });
+ var that = this
+ wx.downloadFile({
+ url: baseurl + item.downloadAddress,
+ success: function(res) {
+ var filePath = res.tempFilePath;
+ wx.openDocument({
+ filePath: filePath,
+ showMenu: true,
+ success: function(res) {
+ uni.hideLoading();
+ },
+ fail: function(err) {
+ uni.hideLoading();
+ }
+ });
+ },
+ fail: function(err) {
+ uni.hideLoading();
+ that.$refs.uToast.show({
+ title: '请求报告失败',
+ type: 'error'
+ })
+ }
+ });
+ }
},
getPhoneNumberp(val) {
wx.login({
diff --git a/pages/prescription/prescription.vue b/pages/prescription/prescription.vue
index 896b666..1437a92 100644
--- a/pages/prescription/prescription.vue
+++ b/pages/prescription/prescription.vue
@@ -202,7 +202,7 @@
lookbook(item) {
if (item.existFlag == false) {
this.$refs.uToast.show({
- title: "暂无报告",
+ message: "暂无报告",
type: 'error',
duration: 1000
})