乡村相册

This commit is contained in:
yanran200730
2022-05-17 16:13:03 +08:00
parent 8e3113f00d
commit c38c92f19a
9 changed files with 600 additions and 114 deletions

View File

@@ -1,72 +1,171 @@
<template>
<div class="Watermark1">
<div class="top">
<h2>打卡记录7</h2>
<p>09:45</p>
<div class="Watermark7" @click="linkTo('./WatermarkConfig')">
<image src="../../images/hjws.png" />
<h2>整好环境卫生</h2>
<div class="middle">
<div class="top">
<h2>{{ time }}</h2>
<span>多云 7</span>
</div>
<div class="bottom">{{ date }} {{ weekCn }}</div>
</div>
<div class="info">
<p>2022.02.25 星期五</p>
<p>武汉市·绿地蓝海国际A座</p>
<p> 7</p>
</div>
<div class="text">#这是一条备注信息</div>
<div class="bottom">武汉市·绿地蓝海A座</div>
</div>
</template>
<script>
export default {
import {mapActions} from 'vuex'
export default {
data () {
return {
date: '',
time: '',
week: '',
timer: null
}
},
}
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 '星期天'
}
},
created () {
this.date = this.$dayjs(new Date).format('YYYY-MM-DD')
this.time = this.$dayjs().format('HH:mm')
this.timer = setInterval(() => {
this.date = this.$dayjs().format('YYYY-MM-DD')
this.time = this.$dayjs().format('HH:mm')
this.week = new Date().getDay()
}, 1000)
this.injectJWeixin(['getLocation']).then(res => {
console.log(res)
wx.getLocation({
type: 'wgs84',
success: function (res) {
var latitude = res.latitude
var longitude = res.longitude
var speed = res.speed
var accuracy = res.accuracy
}
});
})
},
destroyed () {
clearInterval(this.timer)
},
methods: {
...mapActions(['injectJWeixin']),
getLocation () {
uni.getLocation({
type: 'wgs84',
success: res => {
console.log(res)
this.$http.get('https://apis.map.qq.com/ws/geocoder/v1/?location=39.984154,116.307490&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1').then(res => {
console.log(res)
})
},
fail: error => {
console.log(error)
}
})
},
linkTo (url) {
uni.navigateTo({
url
})
}
}
}
</script>
<style lang="scss" scoped>
.Watermark1 {
.Watermark7 {
width: 400px;
font-size: 0;
box-sizing: border-box;
h2 {
font-weight: normal;
}
* {
box-sizing: border-box;
}
.text {
min-width: 274px;
height: 48px;
line-height: 48px;
padding: 0 16px;
font-size: 28px;
background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
& > image {
width: 100%;
height: 64px;
}
.top {
width: 184px;
background: #FEFFFE;
border-radius: 16px;
& > .bottom {
line-height: 1.3;
padding: 10px 16px;
font-size: 26px;
text-align: justify;
background: rgba(27, 120, 65, 0.8);
}
.middle {
line-height: 1;
padding: 16px;
background: rgba(0, 0, 0, 0.5);
.top {
display: flex;
align-items: center;
margin-bottom: 6px;
h2 {
margin-right: 16px;
color: #FFFFFF;
font-size: 48px;
}
span {
color: #62CD8B;
font-size: 26px;
}
}
.bottom {
font-size: 26px;
}
}
& > h2 {
height: 64px;
line-height: 64px;
text-align: center;
overflow: hidden;
h2 {
height: 64px;
line-height: 64px;
background: #1ABDA6;
font-size: 34px;
font-weight: normal;
}
p {
height: 72px;
line-height: 72px;
font-weight: 600;
color: #333333;
font-size: 48px;
}
}
.info {
line-height: 40px;
margin: 32px 0;
padding-left: 22px;
border-left: 6px solid #F8BC58;
p:nth-of-type(2) {
margin: 8px 0;
}
color: #fff;
font-size: 32px;
background: #1B7841;
}
}
</style>

View File

@@ -1,72 +1,132 @@
<template>
<div class="Watermark1">
<div class="top">
<h2>打卡记录8</h2>
<p>09:45</p>
</div>
<div class="info">
<p>2022.02.25 星期五</p>
<p>武汉市·绿地蓝海国际A座</p>
<p> 7</p>
</div>
<div class="text">#这是一条备注信息</div>
<div class="Watermark8" @click="linkTo('./WatermarkConfig')">
<h2>{{ date }}</h2>
<div>{{ day }}</div>
<p>{{ lunar }} {{ weekCn }}</p>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
.Watermark1 {
* {
box-sizing: border-box;
}
.text {
min-width: 274px;
height: 48px;
line-height: 48px;
padding: 0 16px;
font-size: 28px;
background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
}
.top {
width: 184px;
background: #FEFFFE;
border-radius: 16px;
text-align: center;
overflow: hidden;
h2 {
height: 64px;
line-height: 64px;
background: #1ABDA6;
font-size: 34px;
font-weight: normal;
import {mapActions} from 'vuex'
import lunar from '../../config/calendar'
export default {
data () {
return {
date: '',
week: '',
day: '',
lunar: '',
timer: null
}
},
p {
height: 72px;
line-height: 72px;
font-weight: 600;
color: #333333;
font-size: 48px;
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 '星期天'
}
}
},
.info {
line-height: 40px;
margin: 32px 0;
padding-left: 22px;
border-left: 6px solid #F8BC58;
created () {
const date = this.$dayjs(new Date)
const result = lunar.solarToLunar(date.format('YYYY'), date.format('MM'), date.format('DD'))
p:nth-of-type(2) {
margin: 8px 0;
this.date = date.format('YYYY年MM月')
this.day = date.format('DD')
this.lunar = `${result.monthStr}${result.dayStr}`
this.week = new Date().getDay()
this.injectJWeixin(['getLocation']).then(res => {
console.log(res)
wx.getLocation({
type: 'wgs84',
success: function (res) {
var latitude = res.latitude
var longitude = res.longitude
var speed = res.speed
var accuracy = res.accuracy
}
});
})
},
destroyed () {
clearInterval(this.timer)
},
methods: {
...mapActions(['injectJWeixin']),
getLocation () {
uni.getLocation({
type: 'wgs84',
success: res => {
console.log(res)
this.$http.get('https://apis.map.qq.com/ws/geocoder/v1/?location=39.984154,116.307490&key=3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY&get_poi=1').then(res => {
console.log(res)
})
},
fail: error => {
console.log(error)
}
})
},
linkTo (url) {
uni.navigateTo({
url
})
}
}
}
</script>
<style lang="scss" scoped>
.Watermark8 {
width: 292px;
height: 376px;
color: #FF5643;
box-sizing: border-box;
text-align: center;
background-image: url(../../images/rili.png);
background-size: 100% 100%;
h2 {
height: 68px;
padding-top: 106px;
text-align: center;
font-size: 32px;
color: #fff;
font-weight: normal;
}
div {
line-height: 1;
margin: 10px 0 8px;
font-size: 100px;
font-weight: 600;
}
p {
font-size: 26px;
}
}
</style>