diff --git a/src/apps/AppNotification/AppNotification.vue b/src/apps/AppNotification/AppNotification.vue
index 731e3b9d..e26f26ae 100644
--- a/src/apps/AppNotification/AppNotification.vue
+++ b/src/apps/AppNotification/AppNotification.vue
@@ -57,9 +57,9 @@
关闭
-
+ @confirm="confirm" :closeOnClickOverlay="true" @cancel="modal=false">
@@ -143,6 +143,7 @@
}).then(res => {
if (res.code == 0) {
this.$u.toast(this.content + "成功");
+ this.modal = false;
this.getList();
}
})
@@ -160,9 +161,13 @@
if (item.val == 0) {
this.show = false;
- return uni.navigateTo({
- url: "/pages/notification/components/detail?id=" + this.detail.id
- });
+ this.comp = "detail";
+ this.params = {
+ id: this.detail.id,
+ flag: true
+ };
+ this.showList = false;
+ return
}
if ([1, 2, 4].includes(item.val)) {
@@ -171,9 +176,13 @@
if (item.val == 3) {
this.show = false;
- return uni.navigateTo({
- url: "/pages/notification/components/add?id=" + this.detail.id + "&flag=" + false
- });
+ this.comp = "add";
+ this.params = {
+ id: this.detail.id,
+ flag: false
+ };
+ this.showList = false;
+ return
}
},
color(status) {
@@ -199,6 +208,10 @@
},
add() {
this.comp = "add";
+ this.params = {
+ id: null,
+ flag: false
+ };
this.showList = false;
},
change(val) {
diff --git a/src/apps/AppNotification/components/add.vue b/src/apps/AppNotification/components/add.vue
index f8526ae2..5d01efd0 100644
--- a/src/apps/AppNotification/components/add.vue
+++ b/src/apps/AppNotification/components/add.vue
@@ -61,7 +61,7 @@
-
+
@@ -74,6 +74,9 @@
export default {
name: "add",
components: {AiBack,AiSelectEnterprise,AiUploader},
+ props:{
+ params:Object
+ },
data() {
return {
show: false,
@@ -88,7 +91,7 @@
files: [],
},
userSelect: false,
- params: {
+ options: {
year: true,
month: true,
day: true,
@@ -100,10 +103,19 @@
flag: null,
}
},
- onLoad(opt) {
- if(opt.id) {
- this.form.id = opt.id;
- this.flag = opt.flag;
+ watch:{
+ params:{
+ handler:function (v) {
+ if(this.params?.id){
+ this.form.id = this.params?.id;
+ this.flag = this.params?.flag;
+ }
+ },
+ immediate:true
+ }
+ },
+ created() {
+ if(this.params?.id){
this.getDetail();
}
},