Commit b1b7212c by yuzhenWang

Merge branch 'feature-20250710wyz-修复验证码倒计时' into 'dev'

修改签名最长时间到1分钟

See merge request !46
parents 4a76ed1b 11536b9d
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
validationError: '', // 新增验证错误信息 validationError: '', // 新增验证错误信息
strokeCount: 0, // 新增笔画计数 strokeCount: 0, // 新增笔画计数
lastStrokeTime: null, // 新增最后笔画时间 lastStrokeTime: null, // 新增最后笔画时间
minSignDuration: 1000, // 最小签名持续时间(毫秒) // minSignDuration: 1000, // 最小签名持续时间(毫秒)
signStartTime: null,// 签名开始时间 signStartTime: null,// 签名开始时间
minStrokes: 5, // 最小笔画数增加到5 minStrokes: 5, // 最小笔画数增加到5
minSignDuration: 2000, // 最小签名持续时间增加到2秒 minSignDuration: 2000, // 最小签名持续时间增加到2秒
maxSignDuration: 10000, // 最大签名持续时间 maxSignDuration: 60000, // 最大签名持续时间
minDirectionChanges: 4, // 最小方向变化次数 minDirectionChanges: 4, // 最小方向变化次数
minSignatureWidth: 100, // 最小签名宽度 minSignatureWidth: 100, // 最小签名宽度
minSignatureHeight: 50, // 最小签名高度 minSignatureHeight: 50, // 最小签名高度
...@@ -86,29 +86,7 @@ ...@@ -86,29 +86,7 @@
this.ctx.lineCap = 'round'; this.ctx.lineCap = 'round';
this.ctx.lineJoin = 'round'; this.ctx.lineJoin = 'round';
}, },
// touchstart(e) {
// this.isDrawing = true;
// // 记录签名开始时间
// if (!this.signStartTime) {
// this.signStartTime = Date.now();
// }
// let startX = e.changedTouches[0].x;
// let startY = e.changedTouches[0].y;
// let startPoint = {
// X: startX,
// Y: startY
// };
// this.points.push(startPoint);
// this.ctx.beginPath();
// // 笔画计数
// this.strokeCount++;
// this.lastStrokeTime = Date.now();
// e.stopPropagation();
// return false;
// },
// 修改touchstart方法 // 修改touchstart方法
touchstart(e) { touchstart(e) {
this.isDrawing = true; this.isDrawing = true;
...@@ -138,24 +116,7 @@ ...@@ -138,24 +116,7 @@
e.stopPropagation(); e.stopPropagation();
return false; return false;
}, },
// touchmove(e) {
// if (!this.isDrawing) return;
// let moveX = e.changedTouches[0].x;
// let moveY = e.changedTouches[0].y;
// let movePoint = {
// X: moveX,
// Y: moveY
// };
// this.points.push(movePoint);
// let len = this.points.length;
// if (len >= 2) {
// this.draw();
// }
// e.stopPropagation();
// return false;
// },
// 修改touchmove方法 // 修改touchmove方法
touchmove(e) { touchmove(e) {
if (!this.isDrawing) return; if (!this.isDrawing) return;
...@@ -246,21 +207,6 @@ ...@@ -246,21 +207,6 @@
this.showValidationError = false; // 有绘制动作时隐藏错误提示 this.showValidationError = false; // 有绘制动作时隐藏错误提示
}, },
//清空画布 //清空画布
// clear() {
// this.hasSign = false;
// this.strokeCount = 0;
// this.signStartTime = null;
// this.showValidationError = false;
// let that = this;
// uni.getSystemInfo({
// success: function(res) {
// let canvasw = res.windowWidth;
// let canvash = res.windowHeight;
// that.ctx.clearRect(0, 0, canvasw, canvash);
// that.ctx.draw(true);
// }
// });
// },
// 修改clear方法 // 修改clear方法
clear() { clear() {
this.hasSign = false; this.hasSign = false;
...@@ -288,37 +234,7 @@ ...@@ -288,37 +234,7 @@
}); });
}, },
// 验证签名是否符合要求 // 验证签名是否符合要求
// validateSignature() {
// // 1. 检查是否有签名
// if (!this.hasSign) {
// this.showValidationError = true;
// this.validationError = this.emptyTxt;
// this.$emit('validationError', this.emptyTxt);
// return false;
// }
// // 2. 检查笔画数是否足够
// if (this.strokeCount < this.minStrokes) {
// this.showValidationError = true;
// this.validationError = this.validationTxt;
// this.$emit('validationError', this.validationTxt);
// return false;
// }
// // 3. 检查签名时间是否足够
// const signDuration = Date.now() - this.signStartTime;
// if (signDuration < this.minSignDuration) {
// this.showValidationError = true;
// this.validationError = this.validationTxt;
// this.$emit('validationError', this.validationTxt);
// return false;
// }
// // 验证通过
// this.showValidationError = false;
// this.$emit('validationError', '');
// return true;
// },
// 修改validateSignature方法 // 修改validateSignature方法
validateSignature() { validateSignature() {
// 1. 检查是否有签名 // 1. 检查是否有签名
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
if (!signatureValid) { if (!signatureValid) {
return; return;
} }
return
// 如果验证通过,再执行完成签名 // 如果验证通过,再执行完成签名
this.$refs.signatureComponent.finish(); this.$refs.signatureComponent.finish();
}); });
......
...@@ -80,10 +80,19 @@ ...@@ -80,10 +80,19 @@
</view> </view>
</template> </template>
<template v-if="userCourses && tabType===2"> <template v-if="userCourses && tabType===2">
<view class="orderItemDetailBox" v-for="item in userShareCourseOrders" :key="index"> <view class="orderItemDetailBox" v-for="(item,index) in userShareCourseOrders" :key="index">
<view><text>订单编号</text><text>{{item.orderNo}}</text></view> <view >
<view><text>产品名称</text><text>{{item.fileTitle}}</text></view> <text>订单编号</text>
<view><text>购买人</text><text>{{item.userName}}</text></view> <text class="orderNum">{{item.orderNo}}</text>
</view>
<view>
<text>产品名称</text>
<text>{{item.fileTitle}}</text>
</view>
<view>
<text>购买人</text>
<text>{{item.userName}}</text>
</view>
<view class="orderDetailLine"> <view class="orderDetailLine">
<text class="infoBtn" @click="viewDetail(item)">订单详情</text> <text class="infoBtn" @click="viewDetail(item)">订单详情</text>
</view> </view>
...@@ -463,6 +472,13 @@ ...@@ -463,6 +472,13 @@
background-color: #20269B; background-color: #20269B;
} }
} }
.orderNum{
/* 新增以下样式 */
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis; /* 显示省略号 */
flex: 1; /* 占据剩余空间 */
}
} }
} }
.orderItemDetailBox:last-child{ .orderItemDetailBox:last-child{
......
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