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