乡村相册

This commit is contained in:
yanran200730
2022-05-17 14:58:10 +08:00
parent 905e487269
commit 8e3113f00d
11 changed files with 941 additions and 224 deletions

View File

@@ -46,10 +46,7 @@
"target": "https://apis.map.qq.com", "target": "https://apis.map.qq.com",
"changeOrigin": true, "changeOrigin": true,
"secure": false, "secure": false,
"ws": true, "ws": true
"pathRewrite": {
"^/tmap": ""
}
} }
} }
}, },
@@ -67,4 +64,4 @@
} }
} }
} }
} }

View File

@@ -1,23 +1,21 @@
<template> <template>
<div class="photo" ref="waterMarker" :class="[isHide ? 'home-active' : '']" :style="{height: height + 'px'}"> <div class="photo" ref="waterMarker" :class="[isHide ? 'home-active' : '']" :style="{height: height + 'px'}">
<div class="photo-top" data-html2canvas-ignore> <div class="photo-top" data-html2canvas-ignore>
<image src="./images/gengduo1.png" /> <!-- <image src="./images/gengduo1.png" @click="back" /> -->
<u-icon name="close" color="#fff" size="28" @click="back"></u-icon>
<div class="photo-top__middle"> <div class="photo-top__middle">
<span>保存至默认相册</span> <span>保存至默认相册</span>
<image src="./images/gengduo1.png" /> <image src="./images/gengduo1.png" />
</div> </div>
<span @click="save">保存</span> <span @click="save">保存</span>
</div> </div>
<image <image :src="img" mode="aspectFit" />
mode="aspectFit" <div class="watermark" v-if="currIndex > -1">
crossorigin="anonymous"
src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/64f71761d2b04746ad640a43706a92e4~tplv-k3u1fbpfcp-zoom-crop-mark:1304:1304:1304:734.awebp?" />
<div class="watermark">
<component :is="'Watermark' + (currIndex + 1)"></component> <component :is="'Watermark' + (currIndex + 1)"></component>
</div> </div>
<div class="photo-bottom" v-if="!isHide"> <div class="photo-bottom" v-if="!isHide">
<div class="photo-bottom__top"> <div class="photo-bottom__top">
<image src="./images/gengduo1.png" /> <image src="./images/gengduo1.png" @click="isHide = true, currIndex = -1" />
<h2>水印</h2> <h2>水印</h2>
<span>确定</span> <span>确定</span>
</div> </div>
@@ -67,7 +65,7 @@
data () { data () {
return { return {
src: '', img: '',
config, config,
currIndex: 0, currIndex: 0,
isHide: false, isHide: false,
@@ -76,7 +74,8 @@
} }
}, },
onLoad () { onLoad (query) {
this.img = query.url
this.height = uni.getSystemInfoSync().windowHeight this.height = uni.getSystemInfoSync().windowHeight
}, },
@@ -88,20 +87,21 @@
setTimeout(() => { setTimeout(() => {
html2canvas(this.$refs.waterMarker, { html2canvas(this.$refs.waterMarker, {
allowTaint: true, allowTaint: true,
useCORS: true, useCORS: true
backgroundColor: '#fff',
width: this.$refs.waterMarker.offsetWidth,
height: this.$refs.waterMarker.offsetHeight,
scale: 1
}).then((canvas) => { }).then((canvas) => {
let dataURL = canvas.toDataURL("image/png"); let dataURL = canvas.toDataURL('image/png')
this.waterSrc = dataURL this.waterSrc = dataURL
console.log(dataURL)
}).catch(e => { }).catch(e => {
console.log(e) console.log(e)
}) })
}, 2000) }, 2000)
}) })
},
back () {
uni.navigateBack({
delta: 1
})
} }
} }
} }

View File

@@ -0,0 +1,156 @@
<template>
<div class="AttendanceFiexdTime">
<div class="form-group">
<div class="form-group__item">
<div class="left">
<switch color="#1088F9" checked />
<div class="left-right">
<h2>大标题</h2>
<p>打卡</p>
</div>
</div>
<div class="right">
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
</div>
</div>
<div class="form-group__item">
<div class="left">
<switch color="#1088F9" disabled checked />
<div class="left-right">
<h2>时间</h2>
<p>2022-01-03</p>
</div>
</div>
<div class="right">
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
</div>
</div>
<div class="form-group__item">
<div class="left">
<switch color="#1088F9" checked />
<div class="left-right">
<h2>地点</h2>
<p>绿地蓝海</p>
</div>
</div>
<div class="right">
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
</div>
</div>
<div class="form-group__item">
<div class="left">
<switch color="#1088F9" checked />
<div class="left-right">
<h2>拍摄人</h2>
<p>陶白白</p>
</div>
</div>
<div class="right">
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
</div>
</div>
<div class="form-group__item">
<div class="left">
<switch color="#1088F9" checked />
<div class="left-right">
<h2>天气</h2>
<p>雨夹雪 北风3</p>
</div>
</div>
<div class="right">
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
</div>
</div>
</div>
<div class="form-btn" hover-class="text-hover">保存</div>
</div>
</template>
<script>
export default {
data () {
return {
}
},
onLoad () {
},
methods: {
linkTo (url) {
uni.navigateTo({
url
})
}
}
}
</script>
<style lang="scss" scoped>
.AttendanceFiexdTime {
padding-bottom: 130px;
* {
line-height: 1;
box-sizing: border-box;
}
.form-btn {
position: fixed;
bottom: 0;
left: 0;
z-index: 1;
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
color: #fff;
font-size: 32px;
background: #1365DD;
&:active {
opacity: 0.8;
}
}
.form-group {
margin-bottom: 16px;
padding: 0 32px;
background: #fff;
.form-group__item {
display: flex;
align-items: center;
justify-content: space-between;
height: 160px;
font-size: 32px;
color: #333333;
border-bottom: 1px solid #DDDDDD;
&:last-child {
border: none;
}
.left {
display: flex;
align-items: center;
.left-right {
margin-left: 36px;
h2 {
margin-bottom: 12px;
color: #999999;
font-size: 28px;
}
p {
font-size: 34px;
color: #333;
}
}
}
}
}
}
</style>

View File

@@ -19,7 +19,7 @@
</div> </div>
<div class="album-operate"> <div class="album-operate">
<div class="left"> <div class="left">
<div class="left-item" @click="linkTo('./Watermark')"> <div class="left-item" @click="addPhoto">
<image src="../images/paizhao.png" /> <image src="../images/paizhao.png" />
<span>拍照</span> <span>拍照</span>
</div> </div>
@@ -92,6 +92,23 @@
uni.navigateTo({ uni.navigateTo({
url url
}) })
},
addPhoto () {
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
success: res => {
console.log(res.tempFiles[0])
let formData = new FormData()
formData.append('file', res.tempFiles[0])
this.$http.post('/admin/file/add2?type=image', formData).then(res => {
if (res.code === 0) {
this.linkTo(`./Watermark?url=${res.data.url}`)
}
})
}
})
} }
} }
} }

View File

@@ -1,11 +1,11 @@
<template> <template>
<div class="Watermark1"> <div class="Watermark1" @click="linkTo('./WatermarkConfig')">
<div class="top"> <div class="top">
<h2>打卡记录</h2> <h2>打卡记录</h2>
<p>09:45</p> <p>{{ time }}</p>
</div> </div>
<div class="info"> <div class="info">
<p>2022.02.25 星期五</p> <p>{{ date }} {{ weekCn }}</p>
<p>武汉市·绿地蓝海国际A座</p> <p>武汉市·绿地蓝海国际A座</p>
<p> 7</p> <p> 7</p>
</div> </div>
@@ -14,9 +14,95 @@
</template> </template>
<script> <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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -1,26 +1,86 @@
<template> <template>
<div class="Watermark1"> <div class="Watermark2" @click="linkTo('./WatermarkConfig')">
<div class="top"> <div class="top">
<h2>打卡记录2</h2> <div class="left">
<p>09:45</p> <h2>{{ time }}</h2>
</div> </div>
<div class="info"> <div class="right">
<p>2022.02.25 星期五</p> <h2>{{ date }} </h2>
<p>武汉市·绿地蓝海国际A座</p> <p>{{ weekCn }} 7</p>
<p> 7</p> </div>
</div> </div>
<p>武汉市·绿地蓝海国际A座</p>
<div class="text">#这是一条备注信息</div> <div class="text">#这是一条备注信息</div>
</div> </div>
</template> </template>
<script> <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)
},
destroyed () {
clearInterval(this.timer)
},
methods: {
...mapActions(['injectJWeixin']),
linkTo (url) {
uni.navigateTo({
url
})
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.Watermark1 { .Watermark2 {
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
@@ -31,33 +91,57 @@ export default {
line-height: 48px; line-height: 48px;
padding: 0 16px; padding: 0 16px;
font-size: 28px; font-size: 28px;
background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%); background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
} }
.top { .top {
width: 184px; display: flex;
background: #FEFFFE; align-items: center;
border-radius: 16px;
text-align: center;
overflow: hidden;
h2 { .left {
height: 64px; position: relative;
line-height: 64px; margin-right: 38px;
background: #1ABDA6;
font-size: 34px; &:after {
font-weight: normal; position: absolute;
top: 50%;
right: -16px;
z-index: 1;
width: 6px;
height: 72px;
background: #F8BC58;
transform: translateY(-50%);
content: '';
}
h2 {
font-size: 68px;
font-weight: 500;
color: #FFFFFF;
line-height: 80px;
}
} }
p { .right {
height: 72px; font-size: 24px;
line-height: 72px; font-weight: 500;
font-weight: 600; color: #FFFFFF;
color: #333333;
font-size: 48px; h2 {
margin-bottom: 8px;
font-weight: 500;
font-size: 24px;
}
} }
} }
& > p {
margin: 20px 0 16px;
font-weight: 600;
color: #fff;
font-size: 24px;
}
.info { .info {
line-height: 40px; line-height: 40px;
margin: 32px 0; margin: 32px 0;

View File

@@ -1,71 +1,156 @@
<template> <template>
<div class="Watermark1"> <div class="Watermark3" @click="linkTo('./WatermarkConfig')">
<div class="top"> <div class="top">
<h2>打卡记录3</h2> <h2>巡查</h2>
<p>09:45</p> <span>陶白白</span>
</div> </div>
<div class="info"> <div class="middle">
<p>2022.02.25 星期五</p> <h2>{{ time }}</h2>
<p>武汉市·绿地蓝海国际A座</p> <span> 7</span>
<p> 7</p> </div>
<p>{{ date }} {{ weekCn }}</p>
<div class="text">
<span>铁路巡检</span>
<image src="./../../images/quotes.png" />
</div> </div>
<div class="text">#这是一条备注信息</div>
</div> </div>
</template> </template>
<script> <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)
},
destroyed () {
clearInterval(this.timer)
},
methods: {
...mapActions(['injectJWeixin']),
linkTo (url) {
uni.navigateTo({
url
})
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.Watermark1 { .Watermark3 {
width: 348px;
line-height: 1;
padding: 16px;
background: rgba(56, 167, 255, 0.6);
border-radius: 4px;
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
.text { .text {
min-width: 274px; position: relative;
height: 48px; margin-top: 20px;
line-height: 48px; padding-left: 10px;
padding: 0 16px;
font-size: 28px; font-size: 28px;
background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
image {
position: absolute;
bottom: 14px;
left: 0;
width: 28px;
height: 24px;
}
} }
.top { .middle {
width: 184px; display: flex;
background: #FEFFFE; align-items: center;
border-radius: 16px; justify-content: space-between;
text-align: center; margin-top: 10px;
overflow: hidden;
h2 { h2 {
height: 64px; font-size: 68px;
line-height: 64px;
background: #1ABDA6;
font-size: 34px;
font-weight: normal; font-weight: normal;
} }
p { span {
height: 72px; color: #53FBFF;
line-height: 72px; font-size: 28px;
font-weight: 600;
color: #333333;
font-size: 48px;
} }
} }
.info { & > p {
line-height: 40px; margin-top: 16px;
margin: 32px 0; font-weight: 500;
padding-left: 22px; font-size: 28px;
border-left: 6px solid #F8BC58; }
p:nth-of-type(2) { .top {
margin: 8px 0; display: flex;
align-items: center;
justify-content: space-between;
border-radius: 6px 0 0 6px;
border-bottom: 4px solid #FFE97A;
h2 {
width: 100px;
height: 56px;
line-height: 56px;
text-align: center;
color: #498abe;
font-size: 32px;
border-radius: 6px 6px 0 0;
background: #FFE97A;
}
span {
font-size: 28px;
} }
} }
} }

View File

@@ -1,71 +1,167 @@
<template> <template>
<div class="Watermark1"> <div class="Watermark4" @click="linkTo('./WatermarkConfig')">
<div class="top"> <div class="top">
<h2>打卡记录4</h2> <image src="./../../images/fangyishuiyin.png" />
<p>09:45</p> <h2>日常消杀</h2>
</div> </div>
<div class="info"> <div class="Watermark4-body">
<p>2022.02.25 星期五</p> <h2>{{ time }}</h2>
<p>武汉市·绿地蓝海国际A座</p> <p>{{ date }} {{ weekCn }}</p>
<p> 7</p> <div class="info">
<div class="info-item">
<label>地点</label>
<span>武汉市·绿地蓝海A座</span>
</div>
<div class="info-item">
<label>人员</label>
<span>陶白白</span>
</div>
<div class="info-item">
<label>备注</label>
<span>这是一条很长的备注信息</span>
</div>
</div>
</div> </div>
<div class="text">#这是一条备注信息</div>
</div> </div>
</template> </template>
<script> <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)
},
destroyed () {
clearInterval(this.timer)
},
methods: {
...mapActions(['injectJWeixin']),
linkTo (url) {
uni.navigateTo({
url
})
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.Watermark1 { .Watermark4 {
width: 400px;
line-height: 1;
border-radius: 4px;
* { * {
box-sizing: border-box; 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 { .top {
width: 184px; position: relative;
background: #FEFFFE; width: 400px;
border-radius: 16px; height: 60px;
text-align: center; line-height: 60px;
overflow: hidden; padding-left: 60px;
background: linear-gradient(270deg, rgba(67, 60, 255, 0) 0%, rgba(60, 163, 255, 0.8) 50%, #3B92FF 100%);
image {
position: absolute;
left: -32px;
top: -16px;
z-index: 1;
width: 92px;
height: 112px;
}
h2 { h2 {
height: 64px; font-weight: 500;
line-height: 64px; font-size: 32px;
background: #1ABDA6; color: #fff;
font-size: 34px;
font-weight: normal;
}
p {
height: 72px;
line-height: 72px;
font-weight: 600;
color: #333333;
font-size: 48px;
} }
} }
.info { .Watermark4-body {
line-height: 40px; padding: 24px 20px;
margin: 32px 0; background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.5) 100%);
padding-left: 22px;
border-left: 6px solid #F8BC58;
p:nth-of-type(2) { & > h2 {
margin: 8px 0; line-height: 56px;
font-size: 48px;
font-weight: bold;
color: #FFFFFF;
}
& > p {
line-height: 36px;
margin-bottom: 16px;
font-size: 26px;
color: #FFFFFF;
}
.info {
.info-item {
display: flex;
line-height: 1.4;
margin-bottom: 8px;
&:last-child {
margin-bottom: 0;
}
label {
color: #BADCFF;
font-size: 28px;
}
span {
flex: 1;
font-size: 28px;
}
}
} }
} }
} }

View File

@@ -1,71 +1,207 @@
<template> <template>
<div class="Watermark1"> <div class="Watermark5" @click="linkTo('./WatermarkConfig')">
<div class="top"> <div class="top">
<h2>打卡记录5</h2> <h2>走访慰问</h2>
<p>09:45</p> <div class="right">
<h2>{{ time }}</h2>
<p>{{ date }}</p>
</div>
</div> </div>
<div class="info"> <div class="info">
<p>2022.02.25 星期五</p> <div class="info-item">
<p>武汉市·绿地蓝海国际A座</p> <label>人员</label>
<p> 7</p> <span>陶白白</span>
</div>
<div class="info-item">
<label>网格</label>
<span>迁延街第一网格</span>
</div>
<div class="info-item">
<label>地点</label>
<span>武汉市·绿地蓝海A座</span>
</div>
<div class="info-item">
<label>服务对象</label>
<span>王一一</span>
</div>
</div> </div>
<div class="text">#这是一条备注信息</div> <div class="bottom">
<span>工作纪实</span>
<i>网格员工作纪实</i>
</div>
<div class="line"></div>
</div> </div>
</template> </template>
<script> <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)
},
destroyed () {
clearInterval(this.timer)
},
methods: {
...mapActions(['injectJWeixin']),
linkTo (url) {
uni.navigateTo({
url
})
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.Watermark1 { .Watermark5 {
width: 440px;
padding: 0 16px 22px;
color: #000;
box-sizing: border-box;
background: #fff;
h2 {
font-weight: normal;
}
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
.text { .line {
min-width: 274px; margin-top: 4px;
height: 48px; height: 4px;
line-height: 48px; background: #2145C4;
padding: 0 16px;
font-size: 28px;
background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
} }
.top { .bottom {
width: 184px; display: flex;
background: #FEFFFE; align-items: center;
border-radius: 16px; border: 3px solid #2145C4;
text-align: center;
overflow: hidden;
h2 { span {
height: 64px; width: 120px;
line-height: 64px; height: 48px;
background: #1ABDA6; line-height: 48px;
font-size: 34px; text-align: center;
font-weight: normal; color: #fff;
font-size: 26px;
background: #2145C4;
} }
p { i {
height: 72px; flex: 1;
line-height: 72px; color: #2145C4;
font-weight: 600; font-size: 26px;
color: #333333; font-style: normal;
font-size: 48px; text-align: center;
} }
} }
.info { .info {
line-height: 40px; margin-bottom: 16px;
margin: 32px 0;
padding-left: 22px;
border-left: 6px solid #F8BC58;
p:nth-of-type(2) { .info-item {
margin: 8px 0; display: flex;
line-height: 1.3;
margin-bottom: 8px;
&:last-child {
margin-bottom: 0;
}
label {
color: #333;
font-size: 26px;
}
span {
color: #000000;
font-size: 26px;
font-weight: 600;
}
}
}
.top {
display: flex;
align-items: center;
justify-content: space-between;
height: 90px;
margin-bottom: 20px;
color: #2145C4;
border-bottom: 4px solid #2145C4;
& > h2 {
font-size: 32px;
font-weight: 600;
}
.right {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
h2 {
width: 96px;
height: 40px;
line-height: 40px;
text-align: center;
color: #fff;
font-size: 30px;
background: #2145C4;
}
p {
font-size: 24px;
}
} }
} }
} }

View File

@@ -1,71 +1,131 @@
<template> <template>
<div class="Watermark1"> <div class="Watermark6" @click="linkTo('./WatermarkConfig')">
<div class="top"> <div class="title">
<h2>打卡记录6</h2> <h2>我是标题</h2>
<p>09:45</p>
</div> </div>
<div class="info"> <div class="info">
<p>2022.02.25 星期五</p> <div class="info-item">
<p>武汉市·绿地蓝海国际A座</p> <label>时间</label>
<p> 7</p> <span>{{ date }}</span>
</div>
<div class="info-item">
<label>地点</label>
<span>武汉市·绿地蓝海A座</span>
</div>
</div> </div>
<div class="text">#这是一条备注信息</div>
</div> </div>
</template> </template>
<script> <script>
export default { import {mapActions} from 'vuex'
export default {
data () {
return {
date: '',
timer: null
}
},
} created () {
this.date = this.$dayjs().format('YYYY-MM-DD HH:mm')
this.timer = setInterval(() => {
this.date = this.$dayjs().format('YYYY-MM-DD HH:mm')
}, 1000)
},
destroyed () {
clearInterval(this.timer)
},
methods: {
...mapActions(['injectJWeixin']),
linkTo (url) {
uni.navigateTo({
url
})
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.Watermark1 { .Watermark6 {
width: 440px;
box-sizing: border-box;
h2 {
font-weight: normal;
}
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
.text { .info {
min-width: 274px; padding: 24px;
height: 48px; background: rgba(255, 255, 255, 0.7);
line-height: 48px;
padding: 0 16px; .info-item {
font-size: 28px; display: flex;
background: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%); line-height: 1.3;
margin-bottom: 8px;
&:last-child {
margin-bottom: 0;
}
label {
color: #333;
font-size: 28px;
}
span {
flex: 1;
text-align: justify;
color: #000000;
font-size: 28px;
}
}
} }
.top { .title {
width: 184px; position: relative;
background: #FEFFFE; height: 60px;
border-radius: 16px; line-height: 60px;
text-align: center; text-align: center;
overflow: hidden; color: #fff;
background: rgba(23, 91, 255, 0.7);
h2 { h2 {
height: 64px; font-size: 32px;
line-height: 64px;
background: #1ABDA6;
font-size: 34px;
font-weight: normal;
} }
p { &::after {
height: 72px; position: absolute;
line-height: 72px; left: 16px;
font-weight: 600; top: 50%;
color: #333333; z-index: 1;
font-size: 48px; width: 12px;
height: 12px;
border-radius: 50%;
background: #FFCA32;
content: ' ';
transform: translateY(-50%);
} }
}
.info { &::before {
line-height: 40px; position: absolute;
margin: 32px 0; right: 16px;
padding-left: 22px; top: 50%;
border-left: 6px solid #F8BC58; z-index: 1;
width: 12px;
p:nth-of-type(2) { height: 12px;
margin: 8px 0; border-radius: 50%;
background: #FFCA32;
content: ' ';
transform: translateY(-50%);
} }
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B