From cb5e8ba83391eaabfc66ce82204fed3ce98a9620 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 25 May 2022 18:14:07 +0800 Subject: [PATCH] bug --- src/saas/AppCountryAlbum/Form.vue | 2 +- src/saas/AppCountryAlbum/WatermarkConfig.vue | 2 +- .../components/watermark/Watermark4.vue | 1 + .../components/watermark/Watermark6.vue | 18 +++++++----------- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/saas/AppCountryAlbum/Form.vue b/src/saas/AppCountryAlbum/Form.vue index 2052857a..581caae6 100644 --- a/src/saas/AppCountryAlbum/Form.vue +++ b/src/saas/AppCountryAlbum/Form.vue @@ -55,7 +55,7 @@ }, save () { - uni.$emit('change', this.config) + uni.$emit('filedChange', this.config) uni.navigateBack({ delta: 1 }) diff --git a/src/saas/AppCountryAlbum/WatermarkConfig.vue b/src/saas/AppCountryAlbum/WatermarkConfig.vue index 34af5647..64c77db3 100644 --- a/src/saas/AppCountryAlbum/WatermarkConfig.vue +++ b/src/saas/AppCountryAlbum/WatermarkConfig.vue @@ -49,7 +49,7 @@ onLoad () { this.config = uni.getStorageSync('waterConfig') - uni.$on('change', e => { + uni.$on('filedChange', e => { this.config.forEach((v, index) => { if (v.type === e.type) { this.$set(this.config[index], 'defaultValue', e.defaultValue) diff --git a/src/saas/AppCountryAlbum/components/watermark/Watermark4.vue b/src/saas/AppCountryAlbum/components/watermark/Watermark4.vue index b680ef7f..4871ff2e 100644 --- a/src/saas/AppCountryAlbum/components/watermark/Watermark4.vue +++ b/src/saas/AppCountryAlbum/components/watermark/Watermark4.vue @@ -29,6 +29,7 @@ week: '', title: '定格在这一刻', address: '', + configList: [] } }, diff --git a/src/saas/AppCountryAlbum/components/watermark/Watermark6.vue b/src/saas/AppCountryAlbum/components/watermark/Watermark6.vue index ee513860..3a7a3ecc 100644 --- a/src/saas/AppCountryAlbum/components/watermark/Watermark6.vue +++ b/src/saas/AppCountryAlbum/components/watermark/Watermark6.vue @@ -3,8 +3,8 @@

{{ title }}

-

{{ time }}

-

{{ date }}

+

{{ time }}

+

{{ date }}

@@ -56,6 +56,7 @@ isServiceName: false, text: '', isShowText: '', + configList: [] } }, @@ -90,20 +91,15 @@ handler: function (v) { if (v.length) { const address = v.filter(v => v.type === '3')[0] - const date = v.filter(v => v.type === '1')[0] - const time = v.filter(v => v.type === '0')[0] const gridUserName = v.filter(v => v.type === '9')[0] const gridName = v.filter(v => v.type === '10')[0] const title = v.filter(v => v.type === '8')[0] const serviceName = v.filter(v => v.type === '11')[0] const text = v.filter(v => v.type === '12')[0] this.isShowAddress = address.status === '1' - this.isShowDate = date.status === '1' this.isShowGridName = gridName.status === '1' this.isServiceName = serviceName.status === '1' this.isShowText = text.status === '1' - this.isShowDate = date.status === '1' - this.isShowTime = time.status === '1' this.title = title.defaultValue || '' this.gridUserName = gridUserName.defaultValue || '' this.gridName = gridName.defaultValue || '' @@ -125,6 +121,9 @@ return v }) + uni.$on('change', e => { + this.configList = e + }) this.date = this.$dayjs(new Date).format('YYYY-MM-DD') this.time = this.$dayjs().format('HH:mm') @@ -133,14 +132,11 @@ this.time = this.$dayjs().format('HH:mm') this.week = new Date().getDay() }, 1000) - - uni.$on('change', e => { - this.configList = e - }) }, destroyed () { clearInterval(this.timer) + uni.$off('change') }, methods: {