bug
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
},
|
||||
|
||||
save () {
|
||||
uni.$emit('change', this.config)
|
||||
uni.$emit('filedChange', this.config)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
week: '',
|
||||
title: '定格在这一刻',
|
||||
address: '',
|
||||
configList: []
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<div class="top">
|
||||
<h2>{{ title }}</h2>
|
||||
<div class="right">
|
||||
<h2 v-if="isShowTime">{{ time }}</h2>
|
||||
<p v-if="isShowDate">{{ date }}</p>
|
||||
<h2>{{ time }}</h2>
|
||||
<p>{{ date }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user