乡村乡村
This commit is contained in:
@@ -1,37 +1,86 @@
|
||||
<template>
|
||||
<div class="Watermark6" @click="linkTo('./WatermarkConfig')">
|
||||
<div class="title">
|
||||
<h2>我是标题</h2>
|
||||
<h2>{{ title }}</h2>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="info-item">
|
||||
<label>时间:</label>
|
||||
<span>{{ date }}</span>
|
||||
<span>{{ date }} {{ weekCn}} {{ time }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<label>地点:</label>
|
||||
<span>武汉市·绿地蓝海A座</span>
|
||||
<span>{{ address }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapActions} from 'vuex'
|
||||
import { mapActions } from 'vuex'
|
||||
|
||||
export default {
|
||||
props: ['config'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
date: '',
|
||||
timer: null
|
||||
timer: null,
|
||||
week: '',
|
||||
title: '定格在这一刻',
|
||||
address: '武汉市·绿地蓝海A座',
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
weekCn() {
|
||||
if (this.week === 1) {
|
||||
return '星期一'
|
||||
}
|
||||
if (this.week === 2) {
|
||||
return '星期二'
|
||||
}
|
||||
if (this.week === 3) {
|
||||
return '星期三'
|
||||
}
|
||||
if (this.week === 4) {
|
||||
return '星期四'
|
||||
}
|
||||
if (this.week === 5) {
|
||||
return '星期五'
|
||||
}
|
||||
|
||||
if (this.week === 6) {
|
||||
return '星期六'
|
||||
}
|
||||
|
||||
return '星期天'
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
configList: {
|
||||
handler: function (v) {
|
||||
if (v.length) {
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
|
||||
created () {
|
||||
this.date = this.$dayjs().format('YYYY-MM-DD HH:mm')
|
||||
this.configList = JSON.parse(JSON.stringify(this.config))
|
||||
this.date = this.$dayjs(new Date).format('YYYY-MM-DD')
|
||||
this.time = this.$dayjs().format('HH:mm')
|
||||
this.week = new Date().getDay()
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
this.date = this.$dayjs().format('YYYY-MM-DD HH:mm')
|
||||
this.time = this.$dayjs().format('HH:mm')
|
||||
}, 1000)
|
||||
|
||||
uni.$on('change', e => {
|
||||
this.configList = e
|
||||
})
|
||||
},
|
||||
|
||||
destroyed () {
|
||||
@@ -42,6 +91,7 @@
|
||||
...mapActions(['injectJWeixin']),
|
||||
|
||||
linkTo (url) {
|
||||
uni.setStorageSync('waterConfig', this.configList)
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
@@ -52,7 +102,7 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.Watermark6 {
|
||||
width: 440px;
|
||||
width: 450px;
|
||||
box-sizing: border-box;
|
||||
|
||||
h2 {
|
||||
|
||||
Reference in New Issue
Block a user