修改
This commit is contained in:
parent
e2c8a2ec50
commit
f3483776c0
@ -7,7 +7,6 @@ export function personRevenue(nurseStationPersonId, monthTime, monthStartTime, m
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
// 个人中心 我的收益 订单列表分页
|
||||
export function personRevenueDetails(pageNum, pageSize, nurseStationPersonId, monthTime, monthStartTime, monthEndTime) {
|
||||
return request({
|
||||
|
||||
@ -102,9 +102,9 @@
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-mask :show="show" @click="show = false">
|
||||
<view style="position:absolute;bottom:0;height:800rpx;width:100%;background-color: #fff;" v-if='show'>
|
||||
<view style="position:absolute;bottom:0;height:800rpx;width:100%;background-color: #F4F5F7;" v-if='show'>
|
||||
<signature @userSignaturePictureUrl='userSignaturePicture' @click.native.stop
|
||||
style='background-color: #F4F5F7;width: 100%;height: 800rpx;'></signature>
|
||||
style='width: 100%;height: 800rpx;'></signature>
|
||||
</view>
|
||||
</u-mask>
|
||||
<u-toast ref="uToast" />
|
||||
@ -131,7 +131,6 @@
|
||||
serviceEndPictureUrl: null,
|
||||
userSignaturePictureUrl: null,
|
||||
list: {
|
||||
res: {},
|
||||
id: null,
|
||||
serviceLocationName: null,
|
||||
onDutyPictureUrl: null,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="signature" style="background-color: #F4F5F7;height: 400rpx;">
|
||||
<view class="signature" style="background-color: #F4F5F7;height: 800rpx;width: 100%;">
|
||||
<Signature @init="onSignInit" style='background-color: #fff;height: 700rpx;width: 100%;'></Signature>
|
||||
<view class="btns">
|
||||
<button @click="clear">清空</button>
|
||||
|
||||
@ -1,14 +1,7 @@
|
||||
<template>
|
||||
<view class="signature-wrap">
|
||||
<canvas
|
||||
:canvas-id="cid"
|
||||
:id="cid"
|
||||
@touchstart="onTouchStart"
|
||||
@touchmove="onTouchMove"
|
||||
@touchend="onTouchEnd"
|
||||
disable-scroll
|
||||
style="width: 100%;height: 600rpx;"
|
||||
></canvas>
|
||||
<canvas :canvas-id="cid" :id="cid" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd"
|
||||
disable-scroll style="width: 100%;height: 600rpx;"></canvas>
|
||||
<slot />
|
||||
</view>
|
||||
</template>
|
||||
@ -28,7 +21,9 @@
|
||||
* @event {Function} init 当创建完 canvas 实例后触发,向外提供 canvas实例,撤回,清空方法
|
||||
* @example <v-sign @init="signInit"></v-sign>
|
||||
*/
|
||||
import { formatSize } from '../../utils'
|
||||
import {
|
||||
formatSize
|
||||
} from '../../utils'
|
||||
|
||||
export default {
|
||||
name: 'v-sign',
|
||||
@ -85,7 +80,10 @@ export default {
|
||||
},
|
||||
created() {
|
||||
// 获取窗口宽高
|
||||
const { windowWidth, windowHeight } = uni.getSystemInfoSync()
|
||||
const {
|
||||
windowWidth,
|
||||
windowHeight
|
||||
} = uni.getSystemInfoSync()
|
||||
this.winWidth = windowWidth
|
||||
this.winHeight = windowHeight
|
||||
},
|
||||
@ -111,13 +109,11 @@ export default {
|
||||
width: this.penLineWidth || this.lineWidth
|
||||
},
|
||||
// 屏幕坐标
|
||||
coordinates: [
|
||||
{
|
||||
coordinates: [{
|
||||
type: e.type,
|
||||
x: pos.x,
|
||||
y: pos.y
|
||||
}
|
||||
]
|
||||
}]
|
||||
})
|
||||
this.drawLine()
|
||||
},
|
||||
@ -240,8 +236,7 @@ export default {
|
||||
// canvas 保存为临时图片路径,h5返回 base64
|
||||
canvasToTempFilePath(conf = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.canvasToTempFilePath(
|
||||
{
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: this.cid,
|
||||
...conf,
|
||||
success: res => {
|
||||
@ -293,9 +288,18 @@ export default {
|
||||
* y = (1-t)²*y0 + 2t(1-t)*y1 + t²*y2
|
||||
*/
|
||||
caculateBezier(P0, P2, B, t = 0.5) {
|
||||
const { x: x0, y: y0 } = P0
|
||||
const { x: x2, y: y2 } = P2
|
||||
const { x, y } = B
|
||||
const {
|
||||
x: x0,
|
||||
y: y0
|
||||
} = P0
|
||||
const {
|
||||
x: x2,
|
||||
y: y2
|
||||
} = P2
|
||||
const {
|
||||
x,
|
||||
y
|
||||
} = B
|
||||
let x1 = (x - (1 - t) * (1 - t) * x0 - t * t * x2) / (2 * t * (1 - t))
|
||||
let y1 = (y - (1 - t) * (1 - t) * y0 - t * t * y2) / (2 * t * (1 - t))
|
||||
return {
|
||||
@ -310,5 +314,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.signature-wrap {
|
||||
position: relative;
|
||||
height: 600rpx;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user