This commit is contained in:
曹辉 2023-04-12 17:18:33 +08:00
parent e2c8a2ec50
commit f3483776c0
4 changed files with 292 additions and 288 deletions

View File

@ -7,7 +7,6 @@ export function personRevenue(nurseStationPersonId, monthTime, monthStartTime, m
method: 'GET'
})
}
// 个人中心 我的收益 订单列表分页
export function personRevenueDetails(pageNum, pageSize, nurseStationPersonId, monthTime, monthStartTime, monthEndTime) {
return request({

View File

@ -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,

View File

@ -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>

View File

@ -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 + *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>