Commit 0859fccb authored by 李俊赕's avatar 李俊赕

edit-take

parent 3af0d458
<template>
<view>
<view class="contentView">
<image class="pic" :src="files[0]" mode="aspectFill" @click="showPreviewFn"></image>
<image class="pic" :src="files[0]" mode="aspectFit" @click="showPreviewFn"></image>
</view>
<view class="bottomView">
<image class="btn" :src="btn_remake" @click="remakePhoto"></image>
......
......@@ -13,8 +13,8 @@
<camera class="camera-box" v-if="cameraChange&&!standardShow" :device-position="cameraInfo.devicePosition"
:flash="cameraInfo.flash" :style="{'height':cameraHeight + 'rpx'}" @error="cameraError">
<cover-view class="mark-box">
<cover-view class="txt big u-m-t-20" >{{titleTxt}}</cover-view>
<cover-view class="txt u-m-t-20" v-for="(txt,index) in settingTxtArr" :key="index">{{txt}}</cover-view>
<cover-view class="txt big" >{{titleTxt}}</cover-view>
<cover-view class="txt" v-for="(txt,index) in settingTxtArr" :key="index">{{txt || '获取中'}}</cover-view>
<!-- <cover-view class="txt u-m-t-10">维度:{{waterInfo.latitude || '正在获取中...'}}</cover-view>
<cover-view class="txt u-m-t-10">地址:{{waterInfo.address || '正在获取中...'}}</cover-view>
<cover-view class="txt u-m-t-10">时间:{{waterInfo.date || '正在获取中...'}}</cover-view> -->
......@@ -112,7 +112,7 @@
let arr = []
// 包含经纬度
const waterInfo = this.waterInfo
arr = ['经度: ' + waterInfo.longitude, '纬度: ' + waterInfo.latitude, '地址: ' + waterInfo.address, '时间: ' +
arr = ['经度嘟嘟嘟激励大家了杰拉德杰拉德了大量聚集的决定立即登录: ' + waterInfo.longitude, '纬度: ' + waterInfo.latitude, '地址: ' + waterInfo.address, '时间: ' +
waterInfo.date
]
let settingTxtArr = []
......@@ -355,24 +355,30 @@
canvas.rect(0, 0, canvasWidth, canvasHeight)
canvas.drawImage(tempPath, 0, 0, canvasWidth, canvasHeight)
// this.canvas.draw()
let txtHeight = 18
let h = 1
let txtHeight = 20
//加入 水印文字
for (let i = settingTxtArr.length-1; i >=0; i--) {
txtHeight = 18
canvas.setFontSize(14)
canvas.setFillStyle('#f2f2f2')
let txt = settingTxtArr[i]
if(txt.length>14){
canvas.fillText(txt.substr(0,14), 10, canvasHeight - txtHeight * h++);
canvas.fillText(txt.substr(14,14), 10, canvasHeight - txtHeight * h++);
}else{
canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
const title = this.titleTxt
if(title){
txtHeight = 20
canvas.setFontSize(20)
canvas.setFillStyle('#f2f2f2')
canvas.fillText(title, 10, canvasHeight - txtHeight * h++);
}
//加入 水印文字
txtHeight = 18
for (let i = 0; i < settingTxtArr.length; i++) {
canvas.setFontSize(14)
canvas.setFillStyle('#f2f2f2')
const txt = settingTxtArr[i]
canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
if(this.waterSetting && this.waterSetting.mid_text){
//加入 水印图片
canvas.drawImage(this.tempImgs.markImage, canvasWidth / 2 - 100, canvasHeight / 2 - 25, 200, 50)
......@@ -492,6 +498,9 @@
padding: 20rpx;
.txt {
margin-top:5rpx;
line-height: 40rpx;
white-space: normal;
font-size: 28rpx;
color: #fff;
.big{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment