11
This commit is contained in:
parent
c8cab3d2a5
commit
76ed492c09
api
components/am-sign-input
pages
activity/promotionList
goods_cate/components
goods_details
goods_list
goods_search
index
users
static/other
15
api/api.js
15
api/api.js
|
@ -332,11 +332,16 @@ export function loginConfigApi() {
|
|||
|
||||
// 保存用户身份信息
|
||||
export function getInformation(data) {
|
||||
return request.post('identity/save', data, {
|
||||
return request.post('identity/saveWithVerifyIdentity', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
// 保存用户身份信息
|
||||
export function getInformationSave(data) {
|
||||
return request.post('identity/save ', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 分期套餐列表
|
||||
export function getfenqilist(data) {
|
||||
|
@ -351,6 +356,12 @@ export function getreceivable(data) {
|
|||
noAuth: true
|
||||
});
|
||||
}
|
||||
// 身份证检验
|
||||
export function idcardCheck(data) {
|
||||
return request.get('user/idcardCheck', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
// 分期详情--查询用户分期账单(未签约)
|
||||
export function getinstallment(data) {
|
||||
|
|
|
@ -83,6 +83,7 @@ export function getCategoryList() {
|
|||
* @param object data
|
||||
*/
|
||||
export function getProductslist(data) {
|
||||
|
||||
return request.get('products', data, {
|
||||
noAuth: true
|
||||
});
|
||||
|
|
|
@ -98,6 +98,14 @@ export function getSignConfig(){
|
|||
export function getSignList(data){
|
||||
return request.get('user/sign/list',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否存在分期订单
|
||||
* @param object data
|
||||
*/
|
||||
export function getOrderstause(data){
|
||||
return request.get('user/isExistOrder',data);
|
||||
}
|
||||
/**
|
||||
* 校验openid
|
||||
* @param object data
|
||||
|
|
83
components/am-sign-input/README.md
Normal file
83
components/am-sign-input/README.md
Normal file
|
@ -0,0 +1,83 @@
|
|||
### 使用方法
|
||||
* 注意
|
||||
+ 同一个页面不同的输入框需要设置不同的canvasId和canvasIds,否则在同一个页面会出现冲突
|
||||
```
|
||||
<template>
|
||||
<view class="content">
|
||||
<signInput ref="sign" canvasId="twoDrowCanvas" canvasIds="twoRotateCanvas" :header="header" :action="action"
|
||||
@signToUrl="signToUrl">
|
||||
</signInput>
|
||||
</view>
|
||||
</template>
|
||||
```
|
||||
```
|
||||
<script>
|
||||
import signInput from "@/components/am-sign-input/am-sign-input.vue"
|
||||
export default {
|
||||
components: {
|
||||
signInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
action: "", //上传服务器的地址
|
||||
header: {}, //图片上传携带头部信息
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @param {Object} e
|
||||
* 签名完成回调
|
||||
*/
|
||||
signToUrl(e) {
|
||||
if (e.error_code && e.error_code === '201') {
|
||||
uni.showToast({
|
||||
title: e.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
```
|
||||
```
|
||||
<style lang="scss">
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
#### 实际效果演示H5
|
||||
- 打开演示后,按F12调整到手机调试模式查看效果
|
||||
[实际效果演示](https://static-mp-2766f90e-0e50-4c71-87fb-0ab51aedcf85.next.bspapp.com/signInput/#/)
|
||||
|
||||
### 参数说明Props
|
||||
|
||||
参数|类型|说明|必传
|
||||
---|---|---|---
|
||||
action|String|生成图片后上传的接口地址|true
|
||||
canvasId|String|canvasId|true
|
||||
canvasIds|String|canvasIds与上一个id不可重复|true
|
||||
header|Object|文件上传携带的头部属性|true
|
||||
outSignWidth|Number|输出图片文件大小-宽度|false
|
||||
outSignHeight|Number|输出图片文件大小-高度|false
|
||||
minSpeed|Number|画笔最小速度|false
|
||||
minWidth|Number|线条最小粗度|false
|
||||
maxWidth|Number|线条最大粗度|false
|
||||
openSmooth|Boolean|开启平滑线条(笔锋)|false
|
||||
maxHistoryLength|Number|历史最大长度(用于撤销的步数)|false
|
||||
maxWidthDiffRate|Number|最大差异率|false
|
||||
undoScan|Number|撤销重新渲染偏移缩放校准|false
|
||||
bgColor|String|背景色如#ffffff 不传则为透明|false
|
||||
|
||||
### 相关同源插件
|
||||
- 以页面形式展现
|
||||
- [电子签名组件](https://ext.dcloud.net.cn/plugin?id=5768)
|
||||
|
||||
### 相关致谢
|
||||
- 插件参考 [大佬的npm库](https://github.com/linjc/smooth-signature)
|
862
components/am-sign-input/am-sign-input.vue
Normal file
862
components/am-sign-input/am-sign-input.vue
Normal file
|
@ -0,0 +1,862 @@
|
|||
<template>
|
||||
<view class="sign">
|
||||
<view class="imgBox">
|
||||
<view class="nom_img" v-if="!showImg" @click="signModShow=true">
|
||||
<image v-if="!showImg" src="/static/other/signs.png" style="width: 34px;height: 34px;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="across_img" v-if="showImg">
|
||||
<view v-if="showImg" class="delete_icon" @click.stop="deleteImg">
|
||||
x
|
||||
</view>
|
||||
<image v-if="showImg" :src="showImg" style="width: 140px;height: 80px;" >
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<umask :show="signModShow" @click="signModShow=false" :duration="0">
|
||||
<view class="warp">
|
||||
<view class="signBox" @tap.stop>
|
||||
<view class="wrapper">
|
||||
<view class="handBtn">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image @click="selectColorEvent('black','#1A1A1A')"
|
||||
:src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
|
||||
class="black-select"></image>
|
||||
<image @click="selectColorEvent('red','#ca262a')"
|
||||
:src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
|
||||
class="red-select"></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<!-- <view class="color_pic" :style="{background:lineColor}" @click="showPickerColor=true">
|
||||
</view> -->
|
||||
<!-- #endif -->
|
||||
<!-- <button @click="clear" class="delBtn">清空</button>
|
||||
<button @click="saveCanvasAsImg" class="saveBtn">保存</button>
|
||||
<button @click="previewCanvasImg" class="previewBtn">预览</button> -->
|
||||
<button @click="subCanvas" class="subBtn">完成</button>
|
||||
<button @click="undo" class="undoBtn">撤销</button>
|
||||
<span class="emptyInfo" style="color: red;" v-if="emptyShow">你还没有绘制任何东西哦</span>
|
||||
</view>
|
||||
<view class="handCenter" :style="{left:canvasLeft+'px'}">
|
||||
<canvas :disable-scroll="true" @touchstart="uploadScaleStart" @touchmove="uploadScaleMove"
|
||||
@touchend="uploadScaleEnd" :style="{width:'100%',height:'calc(85vh - 8rpx)'}"
|
||||
:canvas-id="canvasId"></canvas>
|
||||
</view>
|
||||
|
||||
<view class="handCenters">
|
||||
<canvas :canvas-id="canvasIds"
|
||||
:style="{width:outSignWidth+'px',height:outSignHeight+'px'}"></canvas>
|
||||
</view>
|
||||
<view class="handRight">
|
||||
<view class="handTitle">请签名
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</umask>
|
||||
<pickerColor :isShow="showPickerColor" :bottom="0" @callback='getPickerColor' />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
pathToBase64,
|
||||
base64ToPath
|
||||
} from './image-tools/index.js'
|
||||
import umask from "./u-mask/u-mask.vue"
|
||||
import pickerColor from "./pickerColor.vue"
|
||||
export default {
|
||||
components: {
|
||||
umask,
|
||||
pickerColor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
canvasLeft: 10000,
|
||||
emptyShow: false,
|
||||
signModShow: false,
|
||||
showImg: "",
|
||||
showPickerColor: false,
|
||||
ctx: '',
|
||||
ctxs: '',
|
||||
canvasWidth: 0,
|
||||
canvasHeight: 0,
|
||||
selectColor: 'black',
|
||||
lineColor: '#1A1A1A',
|
||||
points: [],
|
||||
historyList: [],
|
||||
canAddHistory: true,
|
||||
getImagePath: () => {
|
||||
let that = this
|
||||
return new Promise((resolve) => {
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: that.canvasId,
|
||||
fileType: 'png',
|
||||
quality: 1, //图片质量
|
||||
success: res => resolve(res.tempFilePath)
|
||||
}, this)
|
||||
})
|
||||
},
|
||||
requestAnimationFrame: void 0,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
signModShow(newValue, oldValue) {
|
||||
newValue ? this.canvasLeft = 74 : this.canvasLeft = 10000
|
||||
}
|
||||
},
|
||||
props: { //可用于修改的参数放在props里 也可单独放在外面做成组件调用 传值
|
||||
action: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
canvasId: {
|
||||
type: String,
|
||||
default: 'canvasDr'
|
||||
},
|
||||
canvasIds: {
|
||||
type: String,
|
||||
default: 'canvasRo'
|
||||
},
|
||||
header: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
outSignWidth: {
|
||||
type: Number,
|
||||
default: 54
|
||||
},
|
||||
outSignHeight: {
|
||||
type: Number,
|
||||
default: 24
|
||||
},
|
||||
minSpeed: { //画笔最小速度
|
||||
type: Number,
|
||||
default: 1.5
|
||||
},
|
||||
minWidth: { //线条最小粗度
|
||||
type: Number,
|
||||
default: 3,
|
||||
},
|
||||
maxWidth: { //线条最大粗度
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
openSmooth: { //开启平滑线条(笔锋)
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
maxHistoryLength: { //历史最大长度
|
||||
type: Number,
|
||||
default: 20
|
||||
},
|
||||
maxWidthDiffRate: { //最大差异率
|
||||
type: Number,
|
||||
default: 20
|
||||
},
|
||||
undoScan: { //撤销重新渲染偏移缩放校准
|
||||
type: Number,
|
||||
default: 0.83
|
||||
},
|
||||
bgColor: { //背景色
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (!this.ctx) {
|
||||
this.ctx = uni.createCanvasContext(this.canvasId, this);
|
||||
}
|
||||
if (!this.ctxs) {
|
||||
this.ctxs = uni.createCanvasContext(this.canvasIds, this);
|
||||
}
|
||||
let that = this
|
||||
this.$nextTick(() => {
|
||||
uni.createSelectorQuery().in(this).select('.handCenter').boundingClientRect(rect => {
|
||||
that.canvasWidth = rect.width;
|
||||
that.canvasHeight = rect.height;
|
||||
that.drawBgColor()
|
||||
})
|
||||
.exec();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getPickerColor(color) {
|
||||
this.showPickerColor = false;
|
||||
if (color) {
|
||||
this.lineColor = color;
|
||||
}
|
||||
},
|
||||
// 笔迹开始
|
||||
uploadScaleStart(e) {
|
||||
this.canAddHistory = true
|
||||
this.ctx.setStrokeStyle(this.lineColor)
|
||||
this.ctx.setLineCap("round") //'butt'、'round'、'square'
|
||||
},
|
||||
// 笔迹移动
|
||||
uploadScaleMove(e) {
|
||||
let temX = e.changedTouches[0].x
|
||||
let temY = e.changedTouches[0].y
|
||||
this.initPoint(temX, temY)
|
||||
this.onDraw()
|
||||
},
|
||||
/**
|
||||
* 触摸结束
|
||||
*/
|
||||
uploadScaleEnd() {
|
||||
this.canAddHistory = true;
|
||||
this.points = [];
|
||||
},
|
||||
/**
|
||||
* 记录点属性
|
||||
*/
|
||||
initPoint(x, y) {
|
||||
var point = {
|
||||
x: x,
|
||||
y: y,
|
||||
t: Date.now()
|
||||
};
|
||||
var prePoint = this.points.slice(-1)[0];
|
||||
if (prePoint && (prePoint.t === point.t || prePoint.x === x && prePoint.y === y)) {
|
||||
return;
|
||||
}
|
||||
if (prePoint && this.openSmooth) {
|
||||
var prePoint2 = this.points.slice(-2, -1)[0];
|
||||
point.distance = Math.sqrt(Math.pow(point.x - prePoint.x, 2) + Math.pow(point.y - prePoint.y, 2));
|
||||
point.speed = point.distance / (point.t - prePoint.t || 0.1);
|
||||
point.lineWidth = this.getLineWidth(point.speed);
|
||||
if (prePoint2 && prePoint2.lineWidth && prePoint.lineWidth) {
|
||||
var rate = (point.lineWidth - prePoint.lineWidth) / prePoint.lineWidth;
|
||||
var maxRate = this.maxWidthDiffRate / 100;
|
||||
maxRate = maxRate > 1 ? 1 : maxRate < 0.01 ? 0.01 : maxRate;
|
||||
if (Math.abs(rate) > maxRate) {
|
||||
var per = rate > 0 ? maxRate : -maxRate;
|
||||
point.lineWidth = prePoint.lineWidth * (1 + per);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.points.push(point);
|
||||
this.points = this.points.slice(-3);
|
||||
},
|
||||
/**
|
||||
* @param {Object}
|
||||
* 线宽
|
||||
*/
|
||||
getLineWidth(speed) {
|
||||
var minSpeed = this.minSpeed > 10 ? 10 : this.minSpeed < 1 ? 1 : this.minSpeed; //1.5
|
||||
var addWidth = (this.maxWidth - this.minWidth) * speed / minSpeed;
|
||||
var lineWidth = Math.max(this.maxWidth - addWidth, this.minWidth);
|
||||
return Math.min(lineWidth, this.maxWidth);
|
||||
},
|
||||
/**
|
||||
* 绘画逻辑
|
||||
*/
|
||||
onDraw() {
|
||||
if (this.points.length < 2) return;
|
||||
this.addHistory();
|
||||
var point = this.points.slice(-1)[0];
|
||||
var prePoint = this.points.slice(-2, -1)[0];
|
||||
let that = this
|
||||
var onDraw = function onDraw() {
|
||||
if (that.openSmooth) {
|
||||
that.drawSmoothLine(prePoint, point);
|
||||
} else {
|
||||
that.drawNoSmoothLine(prePoint, point);
|
||||
}
|
||||
};
|
||||
if (typeof this.requestAnimationFrame === 'function') {
|
||||
this.requestAnimationFrame(function() {
|
||||
return onDraw();
|
||||
});
|
||||
} else {
|
||||
onDraw();
|
||||
}
|
||||
},
|
||||
//添加历史图片地址
|
||||
addHistory() {
|
||||
if (!this.maxHistoryLength || !this.canAddHistory) return;
|
||||
this.canAddHistory = false;
|
||||
if (!this.getImagePath) {
|
||||
this.historyList.length++;
|
||||
return;
|
||||
}
|
||||
//历史地址 (暂时无用)
|
||||
let that = this
|
||||
that.getImagePath().then(function(url) {
|
||||
if (url) {
|
||||
that.historyList.push(url)
|
||||
that.historyList = that.historyList.slice(-that.maxHistoryLength);
|
||||
}
|
||||
});
|
||||
},
|
||||
//画平滑线
|
||||
drawSmoothLine(prePoint, point) {
|
||||
var dis_x = point.x - prePoint.x;
|
||||
var dis_y = point.y - prePoint.y;
|
||||
|
||||
if (Math.abs(dis_x) + Math.abs(dis_y) <= 2) {
|
||||
point.lastX1 = point.lastX2 = prePoint.x + dis_x * 0.5;
|
||||
point.lastY1 = point.lastY2 = prePoint.y + dis_y * 0.5;
|
||||
} else {
|
||||
point.lastX1 = prePoint.x + dis_x * 0.3;
|
||||
point.lastY1 = prePoint.y + dis_y * 0.3;
|
||||
point.lastX2 = prePoint.x + dis_x * 0.7;
|
||||
point.lastY2 = prePoint.y + dis_y * 0.7;
|
||||
}
|
||||
point.perLineWidth = (prePoint.lineWidth + point.lineWidth) / 2;
|
||||
if (typeof prePoint.lastX1 === 'number') {
|
||||
this.drawCurveLine(prePoint.lastX2, prePoint.lastY2, prePoint.x, prePoint.y, point.lastX1, point
|
||||
.lastY1, point.perLineWidth);
|
||||
if (prePoint.isFirstPoint) return;
|
||||
if (prePoint.lastX1 === prePoint.lastX2 && prePoint.lastY1 === prePoint.lastY2) return;
|
||||
var data = this.getRadianData(prePoint.lastX1, prePoint.lastY1, prePoint.lastX2, prePoint.lastY2);
|
||||
var points1 = this.getRadianPoints(data, prePoint.lastX1, prePoint.lastY1, prePoint.perLineWidth / 2);
|
||||
var points2 = this.getRadianPoints(data, prePoint.lastX2, prePoint.lastY2, point.perLineWidth / 2);
|
||||
this.drawTrapezoid(points1[0], points2[0], points2[1], points1[1]);
|
||||
} else {
|
||||
point.isFirstPoint = true;
|
||||
}
|
||||
},
|
||||
//画不平滑线
|
||||
drawNoSmoothLine(prePoint, point) {
|
||||
point.lastX = prePoint.x + (point.x - prePoint.x) * 0.5;
|
||||
point.lastY = prePoint.y + (point.y - prePoint.y) * 0.5;
|
||||
if (typeof prePoint.lastX === 'number') {
|
||||
this.drawCurveLine(prePoint.lastX, prePoint.lastY, prePoint.x, prePoint.y, point.lastX, point.lastY,
|
||||
this.maxWidth);
|
||||
}
|
||||
},
|
||||
//画线
|
||||
drawCurveLine(x1, y1, x2, y2, x3, y3, lineWidth) {
|
||||
lineWidth = Number(lineWidth.toFixed(1));
|
||||
this.ctx.setLineWidth && this.ctx.setLineWidth(lineWidth);
|
||||
this.ctx.lineWidth = lineWidth;
|
||||
this.ctx.beginPath();
|
||||
this.ctx.moveTo(Number(x1.toFixed(1)), Number(y1.toFixed(1)));
|
||||
this.ctx.quadraticCurveTo(Number(x2.toFixed(1)), Number(y2.toFixed(1)), Number(x3.toFixed(1)), Number(y3
|
||||
.toFixed(1)));
|
||||
this.ctx.stroke();
|
||||
this.ctx.draw && this.ctx.draw(true);
|
||||
},
|
||||
//画梯形
|
||||
drawTrapezoid(point1, point2, point3, point4) {
|
||||
this.ctx.beginPath();
|
||||
this.ctx.moveTo(Number(point1.x.toFixed(1)), Number(point1.y.toFixed(1)));
|
||||
this.ctx.lineTo(Number(point2.x.toFixed(1)), Number(point2.y.toFixed(1)));
|
||||
this.ctx.lineTo(Number(point3.x.toFixed(1)), Number(point3.y.toFixed(1)));
|
||||
this.ctx.lineTo(Number(point4.x.toFixed(1)), Number(point4.y.toFixed(1)));
|
||||
this.ctx.setFillStyle && this.ctx.setFillStyle(this.lineColor);
|
||||
this.ctx.fillStyle = this.lineColor;
|
||||
this.ctx.fill();
|
||||
this.ctx.draw && this.ctx.draw(true);
|
||||
},
|
||||
//获取弧度
|
||||
getRadianData(x1, y1, x2, y2) {
|
||||
var dis_x = x2 - x1;
|
||||
var dis_y = y2 - y1;
|
||||
if (dis_x === 0) {
|
||||
return {
|
||||
val: 0,
|
||||
pos: -1
|
||||
};
|
||||
}
|
||||
if (dis_y === 0) {
|
||||
return {
|
||||
val: 0,
|
||||
pos: 1
|
||||
};
|
||||
}
|
||||
var val = Math.abs(Math.atan(dis_y / dis_x));
|
||||
if (x2 > x1 && y2 < y1 || x2 < x1 && y2 > y1) {
|
||||
return {
|
||||
val: val,
|
||||
pos: 1
|
||||
};
|
||||
}
|
||||
return {
|
||||
val: val,
|
||||
pos: -1
|
||||
};
|
||||
},
|
||||
//获取弧度点
|
||||
getRadianPoints(radianData, x, y, halfLineWidth) {
|
||||
if (radianData.val === 0) {
|
||||
if (radianData.pos === 1) {
|
||||
return [{
|
||||
x: x,
|
||||
y: y + halfLineWidth
|
||||
}, {
|
||||
x: x,
|
||||
y: y - halfLineWidth
|
||||
}];
|
||||
}
|
||||
return [{
|
||||
y: y,
|
||||
x: x + halfLineWidth
|
||||
}, {
|
||||
y: y,
|
||||
x: x - halfLineWidth
|
||||
}];
|
||||
}
|
||||
var dis_x = Math.sin(radianData.val) * halfLineWidth;
|
||||
var dis_y = Math.cos(radianData.val) * halfLineWidth;
|
||||
if (radianData.pos === 1) {
|
||||
return [{
|
||||
x: x + dis_x,
|
||||
y: y + dis_y
|
||||
}, {
|
||||
x: x - dis_x,
|
||||
y: y - dis_y
|
||||
}];
|
||||
}
|
||||
return [{
|
||||
x: x + dis_x,
|
||||
y: y - dis_y
|
||||
}, {
|
||||
x: x - dis_x,
|
||||
y: y + dis_y
|
||||
}];
|
||||
},
|
||||
/**
|
||||
* 背景色
|
||||
*/
|
||||
drawBgColor() {
|
||||
if (!this.bgColor) return;
|
||||
this.ctx.setFillStyle && this.ctx.setFillStyle(this.bgColor);
|
||||
this.ctx.fillStyle = this.bgColor;
|
||||
this.ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight);
|
||||
this.ctx.draw && this.ctx.draw(true);
|
||||
},
|
||||
//图片绘制
|
||||
drawByImage(url) {
|
||||
this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
|
||||
try {
|
||||
this.ctx.drawImage(url, 0, 0, this.canvasWidth * this.undoScan, this.canvasHeight * this.undoScan);
|
||||
this.ctx.draw && this.ctx.draw(true);
|
||||
} catch (e) {
|
||||
this.historyList.length = 0;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 清空
|
||||
*/
|
||||
clear() {
|
||||
this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
|
||||
this.ctx.draw && this.ctx.draw();
|
||||
this.drawBgColor();
|
||||
this.historyList.length = 0;
|
||||
},
|
||||
//撤消
|
||||
undo() {
|
||||
if (!this.getImagePath || !this.historyList.length) return;
|
||||
var pngURL = this.historyList.splice(-1)[0];
|
||||
this.drawByImage(pngURL);
|
||||
if (this.historyList.length === 0) {
|
||||
this.clear();
|
||||
}
|
||||
},
|
||||
//是否为空
|
||||
isEmpty() {
|
||||
return this.historyList.length === 0;
|
||||
},
|
||||
/**
|
||||
* @param {Object} str
|
||||
* @param {Object} color
|
||||
* 选择颜色
|
||||
*/
|
||||
selectColorEvent(str, color) {
|
||||
this.selectColor = str;
|
||||
this.lineColor = color;
|
||||
this.ctx.setStrokeStyle(this.lineColor)
|
||||
},
|
||||
base64ToBlob(base64Data) {
|
||||
let arr = base64Data.split(','), mime = arr[0].match(/:(.*?);/)[1];
|
||||
let bstr = atob(arr[1]);
|
||||
let n = bstr.length;
|
||||
let u8arr = new Uint8Array(n);
|
||||
while (n--) {
|
||||
u8arr[n] = bstr.charCodeAt(n);
|
||||
}
|
||||
return new Blob([u8arr], { type: mime });
|
||||
},
|
||||
//完成
|
||||
subCanvas() {
|
||||
let that = this
|
||||
if (that.isEmpty()) {
|
||||
that.emptyShow = true
|
||||
setTimeout(function() {
|
||||
that.emptyShow = false
|
||||
}, 1000)
|
||||
return
|
||||
}
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: that.canvasId,
|
||||
fileType: 'png',
|
||||
quality: 1, //图片质量
|
||||
success(res) {
|
||||
that.ctxs.translate(0, that.outSignHeight);
|
||||
that.ctxs.rotate(-90 * Math.PI / 180)
|
||||
that.ctxs.drawImage(res.tempFilePath, 0, 0, that.outSignHeight, that.outSignWidth)
|
||||
that.ctxs.draw()
|
||||
setTimeout(() => {
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: that.canvasIds,
|
||||
fileType: 'png',
|
||||
quality: 1, //图片质量
|
||||
success: function(res1) {
|
||||
if (that.action) {
|
||||
uni.showLoading()
|
||||
// base64ToPath(res1.tempFilePath).then(e => {
|
||||
// console.log(e);
|
||||
// }).catch(e => {
|
||||
// console.log(JSON.stringify(e))
|
||||
// })
|
||||
// 将 base64 数据转换为 Blob 对象
|
||||
// const byteCharacters = atob(res1.tempFilePath.replace(/^data:image\/(png|jpeg);base64,/, ''));
|
||||
// const byteNumbers = new Array(byteCharacters.length);
|
||||
// for (let i = 0; i < byteCharacters.length; i++) {
|
||||
// byteNumbers[i] = byteCharacters.charCodeAt(i);
|
||||
// }
|
||||
// const byteArray = new Uint8Array(byteNumbers);
|
||||
// const blob = new Blob([byteArray], { type: 'image/png' });
|
||||
|
||||
|
||||
// 创建FormData对象
|
||||
// let formData = new FormData();
|
||||
// // 将二进制数据添加到FormData中
|
||||
// formData.append('file', that.base64ToBlob(res1.tempFilePath), 'image.png');
|
||||
// let abb=
|
||||
|
||||
// console.log(uni.base64ToArrayBuffer(res1.tempFilePath),'formData');
|
||||
// const base64String = res1.tempFilePath;
|
||||
// const arrayBuffer = uni.base64ToArrayBuffer(base64String);
|
||||
|
||||
// const blob = new Blob([arrayBuffer], { type: "image/png" }); // 例如 "image/jpeg"
|
||||
// const file = new File([blob], "filename.image.png"); // 例如 "image.jpg"
|
||||
|
||||
// const formData = new FormData();
|
||||
// formData.append("fileKey", file); // "fileKey" 是你上传时指定的文件字段名
|
||||
|
||||
// const dataObj = {};
|
||||
// formData.forEach((value, key) => {
|
||||
// dataObj[key] = value;
|
||||
// });
|
||||
|
||||
var base64String = res1.tempFilePath.replace(/^data:image\/(png|jpg|jpeg);base64,/, '');
|
||||
uni.request({
|
||||
url: that.action, // Replace with your actual upload endpoint
|
||||
method: 'POST',
|
||||
header: that.header,
|
||||
data: base64String,
|
||||
success: (uploadFileRes) => {
|
||||
uni.hideLoading()
|
||||
that.showImg = res1.tempFilePath
|
||||
that.$emit('signToUrl',
|
||||
uploadFileRes)
|
||||
that.signModShow = false
|
||||
that.clear()
|
||||
},
|
||||
fail: (error) => {
|
||||
uni.hideLoading()
|
||||
}
|
||||
});
|
||||
// uni.uploadFile({
|
||||
// url: "http://192.168.2.26:20411/api/front/upload/image?model=maintain&pid=0", // 你的上传 URL
|
||||
// filePath: file.path, // Blob 对象的路径,通常可以通过 file.path 获取
|
||||
// name: "fileKey", // 对应的 FormData 中的字段名
|
||||
// formData: dataObj, // FormData 对象
|
||||
// header: that.header,
|
||||
// success: (uploadFileRes) => {
|
||||
// console.log(uploadFileRes);
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.error(err);
|
||||
// },
|
||||
// });
|
||||
// uni.uploadFile({
|
||||
// url: that.action, //图片上传post请求的地址
|
||||
// filePath: res1.tempFilePath,
|
||||
// name: "file",
|
||||
// header: that.header,
|
||||
// success: (uploadFileRes) => {
|
||||
// uni.hideLoading()
|
||||
// that.showImg = res1.tempFilePath
|
||||
// that.$emit('signToUrl',
|
||||
// uploadFileRes)
|
||||
// that.signModShow = false
|
||||
// that.clear()
|
||||
// },
|
||||
// fail: (error) => {
|
||||
// uni.hideLoading()
|
||||
// }
|
||||
// });
|
||||
} else {
|
||||
that.showImg = res1.tempFilePath
|
||||
that.$emit('signToUrl', {
|
||||
error_code: "201",
|
||||
msg: "请配置上传文件接口参数action"
|
||||
})
|
||||
that.signModShow = false
|
||||
that.clear()
|
||||
}
|
||||
},
|
||||
fail: (err) => {}
|
||||
}, that)
|
||||
}, 200);
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
//保存到相册
|
||||
saveCanvasAsImg() {
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: this.canvasId,
|
||||
fileType: 'png',
|
||||
quality: 1, //图片质量
|
||||
success(res) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success(res) {
|
||||
uni.showToast({
|
||||
title: '已保存到相册',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
//预览
|
||||
previewCanvasImg() {
|
||||
uni.canvasToTempFilePath({
|
||||
canvasId: this.canvasId,
|
||||
fileType: 'jpg',
|
||||
quality: 1, //图片质量
|
||||
success(res) {
|
||||
uni.previewImage({
|
||||
urls: [res.tempFilePath] //预览图片 数组
|
||||
});
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
deleteImg() {
|
||||
this.showImg = ""
|
||||
},
|
||||
|
||||
previewImg(img) {
|
||||
uni.previewImage({
|
||||
urls: [img] //预览图片 数组
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// page {
|
||||
// background: #d9d9d9;
|
||||
// height: auto;
|
||||
// overflow: hidden;
|
||||
// }
|
||||
|
||||
.imgBox {
|
||||
width: 280rpx;
|
||||
height: 160rpx;
|
||||
position: relative;
|
||||
|
||||
.nom_img {
|
||||
border-radius: 8px;
|
||||
border: 1px dashed;
|
||||
border-color: #a3a3a3;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 80px;
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.nom_img:hover {
|
||||
border-color: #008ef6 !important;
|
||||
}
|
||||
|
||||
.across_img {
|
||||
border: 1px dashed #a3a3a3;
|
||||
border-radius: 8px;
|
||||
height: 80px;
|
||||
width: 140px;
|
||||
|
||||
.delete_icon {
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
right: -12px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
background: #ff3c0c;
|
||||
border-radius: 25px;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.signBox {
|
||||
width: 85vw;
|
||||
height: 85vh;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 85vw;
|
||||
height: 85vh;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-content: center;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.handRight {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.handCenter {
|
||||
position: fixed;
|
||||
border: 4rpx dashed #e9e9e9;
|
||||
flex: 5;
|
||||
margin-top: 4rpx;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
width: calc(100% - 84rpx - 200rpx);
|
||||
height: calc(85vh - 8rpx)
|
||||
}
|
||||
|
||||
.handCenters {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 10000rpx;
|
||||
flex: 5;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
.handTitle {
|
||||
transform: rotate(90deg);
|
||||
flex: 1;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.handBtn button {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.handBtn {
|
||||
height: 85vh;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-content: space-between;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.delBtn {
|
||||
position: absolute;
|
||||
top: 380rpx;
|
||||
left: 46rpx;
|
||||
transform: rotate(90deg);
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.subBtn {
|
||||
padding: 4rpx 10rpx;
|
||||
position: absolute;
|
||||
bottom: 158rpx;
|
||||
left: 65rpx;
|
||||
display: inline-flex;
|
||||
transform: rotate(90deg);
|
||||
background: #008ef6;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/*Peach - 新增 - 保存*/
|
||||
|
||||
.saveBtn {
|
||||
position: absolute;
|
||||
top: 650rpx;
|
||||
left: 46rpx;
|
||||
transform: rotate(90deg);
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.previewBtn {
|
||||
position: absolute;
|
||||
top: 516rpx;
|
||||
left: 46rpx;
|
||||
transform: rotate(90deg);
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.undoBtn {
|
||||
position: absolute;
|
||||
bottom: 260rpx;
|
||||
left: 75rpx;
|
||||
transform: rotate(90deg);
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.emptyInfo {
|
||||
position: absolute;
|
||||
bottom: 418rpx;
|
||||
left: -56rpx;
|
||||
transform: rotate(90deg);
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.color_pic {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 25px;
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 62rpx;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
/*Peach - 新增 - 保存*/
|
||||
|
||||
.black-select {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
position: absolute;
|
||||
top: 150rpx;
|
||||
left: 70rpx;
|
||||
}
|
||||
|
||||
.red-select {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
position: absolute;
|
||||
top: 260rpx;
|
||||
left: 70rpx;
|
||||
}
|
||||
</style>
|
76
components/am-sign-input/image-tools/README.md
Normal file
76
components/am-sign-input/image-tools/README.md
Normal file
|
@ -0,0 +1,76 @@
|
|||
# image-tools
|
||||
图像转换工具,可用于如下环境:uni-app、微信小程序、5+APP、浏览器(需允许跨域)
|
||||
|
||||
## 使用方式
|
||||
|
||||
### NPM
|
||||
|
||||
```
|
||||
npm i image-tools --save
|
||||
```
|
||||
|
||||
```js
|
||||
import { pathToBase64, base64ToPath } from 'image-tools'
|
||||
```
|
||||
|
||||
### 直接下载
|
||||
|
||||
```js
|
||||
// 以下路径需根据项目实际情况填写
|
||||
import { pathToBase64, base64ToPath } from '../../js/image-tools/index.js'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### pathToBase64
|
||||
|
||||
从图像路径转换为base64,uni-app、微信小程序和5+APP使用的路径不支持网络路径,如果是网络路径需要先使用下载API下载下来。
|
||||
|
||||
```js
|
||||
pathToBase64(path)
|
||||
.then(base64 => {
|
||||
console.log(base64)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
})
|
||||
```
|
||||
|
||||
### base64ToPath
|
||||
|
||||
将图像base64保存为文件,返回文件路径。
|
||||
|
||||
```js
|
||||
base64ToPath(base64)
|
||||
.then(path => {
|
||||
console.log(path)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
})
|
||||
```
|
||||
|
||||
## 提示
|
||||
|
||||
可以利用promise来串行和并行的执行多个任务
|
||||
|
||||
```js
|
||||
// 并行
|
||||
Promise.all(paths.map(path => pathToBase64(path)))
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
// [base64, base64...]
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
})
|
||||
// 串行
|
||||
paths.reduce((promise, path) => promise.then(res => pathToBase64(path).then(base64 => (res.push(base64), res))), Promise.resolve([]))
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
// [base64, base64...]
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
})
|
||||
```
|
196
components/am-sign-input/image-tools/index.js
Normal file
196
components/am-sign-input/image-tools/index.js
Normal file
|
@ -0,0 +1,196 @@
|
|||
function getLocalFilePath(path) {
|
||||
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
|
||||
return path
|
||||
}
|
||||
if (path.indexOf('file://') === 0) {
|
||||
return path
|
||||
}
|
||||
if (path.indexOf('/storage/emulated/0/') === 0) {
|
||||
return path
|
||||
}
|
||||
if (path.indexOf('/') === 0) {
|
||||
var localFilePath = plus.io.convertAbsoluteFileSystem(path)
|
||||
if (localFilePath !== path) {
|
||||
return localFilePath
|
||||
} else {
|
||||
path = path.substr(1)
|
||||
}
|
||||
}
|
||||
return '_www/' + path
|
||||
}
|
||||
|
||||
function dataUrlToBase64(str) {
|
||||
var array = str.split(',')
|
||||
return array[array.length - 1]
|
||||
}
|
||||
|
||||
var index = 0
|
||||
function getNewFileId() {
|
||||
return Date.now() + String(index++)
|
||||
}
|
||||
|
||||
function biggerThan(v1, v2) {
|
||||
var v1Array = v1.split('.')
|
||||
var v2Array = v2.split('.')
|
||||
var update = false
|
||||
for (var index = 0; index < v2Array.length; index++) {
|
||||
var diff = v1Array[index] - v2Array[index]
|
||||
if (diff !== 0) {
|
||||
update = diff > 0
|
||||
break
|
||||
}
|
||||
}
|
||||
return update
|
||||
}
|
||||
|
||||
export function pathToBase64(path) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
if (typeof window === 'object' && 'document' in window) {
|
||||
if (typeof FileReader === 'function') {
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.open('GET', path, true)
|
||||
xhr.responseType = 'blob'
|
||||
xhr.onload = function() {
|
||||
if (this.status === 200) {
|
||||
let fileReader = new FileReader()
|
||||
fileReader.onload = function(e) {
|
||||
resolve(e.target.result)
|
||||
}
|
||||
fileReader.onerror = reject
|
||||
fileReader.readAsDataURL(this.response)
|
||||
}
|
||||
}
|
||||
xhr.onerror = reject
|
||||
xhr.send()
|
||||
return
|
||||
}
|
||||
var canvas = document.createElement('canvas')
|
||||
var c2x = canvas.getContext('2d')
|
||||
var img = new Image
|
||||
img.onload = function() {
|
||||
canvas.width = img.width
|
||||
canvas.height = img.height
|
||||
c2x.drawImage(img, 0, 0)
|
||||
resolve(canvas.toDataURL())
|
||||
canvas.height = canvas.width = 0
|
||||
}
|
||||
img.onerror = reject
|
||||
img.src = path
|
||||
return
|
||||
}
|
||||
if (typeof plus === 'object') {
|
||||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
|
||||
entry.file(function(file) {
|
||||
var fileReader = new plus.io.FileReader()
|
||||
fileReader.onload = function(data) {
|
||||
resolve(data.target.result)
|
||||
}
|
||||
fileReader.onerror = function(error) {
|
||||
reject(error)
|
||||
}
|
||||
fileReader.readAsDataURL(file)
|
||||
}, function(error) {
|
||||
reject(error)
|
||||
})
|
||||
}, function(error) {
|
||||
reject(error)
|
||||
})
|
||||
return
|
||||
}
|
||||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
|
||||
wx.getFileSystemManager().readFile({
|
||||
filePath: path,
|
||||
encoding: 'base64',
|
||||
success: function(res) {
|
||||
resolve('data:image/png;base64,' + res.data)
|
||||
},
|
||||
fail: function(error) {
|
||||
reject(error)
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
reject(new Error('not support'))
|
||||
})
|
||||
}
|
||||
|
||||
export function base64ToPath(base64) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
if (typeof window === 'object' && 'document' in window) {
|
||||
base64 = base64.split(',')
|
||||
var type = base64[0].match(/:(.*?);/)[1]
|
||||
var str = atob(base64[1])
|
||||
var n = str.length
|
||||
var array = new Uint8Array(n)
|
||||
while (n--) {
|
||||
array[n] = str.charCodeAt(n)
|
||||
}
|
||||
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
|
||||
}
|
||||
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/)
|
||||
if (extName) {
|
||||
extName = extName[1]
|
||||
} else {
|
||||
reject(new Error('base64 error'))
|
||||
}
|
||||
var fileName = getNewFileId() + '.' + extName
|
||||
if (typeof plus === 'object') {
|
||||
var basePath = '_doc'
|
||||
var dirPath = 'uniapp_temp'
|
||||
var filePath = basePath + '/' + dirPath + '/' + fileName
|
||||
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) {
|
||||
plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
|
||||
entry.getDirectory(dirPath, {
|
||||
create: true,
|
||||
exclusive: false,
|
||||
}, function(entry) {
|
||||
entry.getFile(fileName, {
|
||||
create: true,
|
||||
exclusive: false,
|
||||
}, function(entry) {
|
||||
entry.createWriter(function(writer) {
|
||||
writer.onwrite = function() {
|
||||
resolve(filePath)
|
||||
}
|
||||
writer.onerror = reject
|
||||
writer.seek(0)
|
||||
writer.writeAsBinary(dataUrlToBase64(base64))
|
||||
}, reject)
|
||||
}, reject)
|
||||
}, reject)
|
||||
}, reject)
|
||||
return
|
||||
}
|
||||
var bitmap = new plus.nativeObj.Bitmap(fileName)
|
||||
bitmap.loadBase64Data(base64, function() {
|
||||
bitmap.save(filePath, {}, function() {
|
||||
bitmap.clear()
|
||||
resolve(filePath)
|
||||
}, function(error) {
|
||||
bitmap.clear()
|
||||
reject(error)
|
||||
})
|
||||
}, function(error) {
|
||||
bitmap.clear()
|
||||
reject(error)
|
||||
})
|
||||
return
|
||||
}
|
||||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
|
||||
var filePath = wx.env.USER_DATA_PATH + '/' + fileName
|
||||
wx.getFileSystemManager().writeFile({
|
||||
filePath: filePath,
|
||||
data: dataUrlToBase64(base64),
|
||||
encoding: 'base64',
|
||||
success: function() {
|
||||
resolve(filePath)
|
||||
},
|
||||
fail: function(error) {
|
||||
reject(error)
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
reject(new Error('not support'))
|
||||
})
|
||||
}
|
25
components/am-sign-input/image-tools/package.json
Normal file
25
components/am-sign-input/image-tools/package.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "image-tools",
|
||||
"version": "1.4.0",
|
||||
"description": "图像转换工具,可用于如下环境:uni-app、微信小程序、5+APP、浏览器",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhetengbiji/image-tools.git"
|
||||
},
|
||||
"keywords": [
|
||||
"base64"
|
||||
],
|
||||
"author": "Shengqiang Guo",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhetengbiji/image-tools/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zhetengbiji/image-tools#readme",
|
||||
"devDependencies": {
|
||||
"@types/html5plus": "^1.0.0"
|
||||
}
|
||||
}
|
143
components/am-sign-input/pickerColor.vue
Normal file
143
components/am-sign-input/pickerColor.vue
Normal file
|
@ -0,0 +1,143 @@
|
|||
<template>
|
||||
<view v-show="isShow">
|
||||
<view class="shade" @tap="hide">
|
||||
<view class="pop">
|
||||
<view class="list flex_col" v-for="(item,index) in colorArr" :key="index">
|
||||
<view v-for="(v,i) in item" :key="i" :style="{'backgroundColor':v}" :data-color="v"
|
||||
:data-index="index" :data-i="i" :class="{'active':(index==pickerArr[0] && i==pickerArr[1])}"
|
||||
@tap.stop="picker"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'picker-color',
|
||||
props: {
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
bottom: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
colorArr: [
|
||||
['#000000', '#111111', '#222222', '#333333', '#444444', '#666666', '#999999', '#CCCCCC', '#EEEEEE',
|
||||
'#FFFFFF'
|
||||
],
|
||||
['#ff0000', '#ff0033', '#ff3399', '#ff33cc', '#cc00ff', '#9900ff', '#cc00cc', '#cc0099', '#cc3399',
|
||||
'#cc0066'
|
||||
],
|
||||
['#cc3300', '#cc6600', '#ff9933', '#ff9966', '#ff9999', '#ff99cc', '#ff99ff', '#cc66ff', '#9966ff',
|
||||
'#cc33ff'
|
||||
],
|
||||
['#663300', '#996600', '#996633', '#cc9900', '#a58800', '#cccc00', '#ffff66', '#ffff99', '#ffffcc',
|
||||
'#ffcccc'
|
||||
],
|
||||
['#336600', '#669900', '#009900', '#009933', '#00cc00', '#66ff66', '#339933', '#339966', '#009999',
|
||||
'#33cccc'
|
||||
],
|
||||
['#003366', '#336699', '#3366cc', '#0099ff', '#000099', '#0000cc', '#660066', '#993366', '#993333',
|
||||
'#800000'
|
||||
]
|
||||
],
|
||||
pickerColor: '',
|
||||
pickerArr: [-1, -1]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
picker(e) {
|
||||
let data = e.currentTarget.dataset;
|
||||
this.pickerColor = data.color;
|
||||
this.pickerArr = [data.index, data.i];
|
||||
this.$emit("callback", this.pickerColor);
|
||||
},
|
||||
hide() {
|
||||
this.$emit("callback", '');
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.shade {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 10080;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.pop {
|
||||
border-radius: 8px;
|
||||
background-color: #fff;
|
||||
z-index: 100;
|
||||
padding: 12upx;
|
||||
font-size: 32upx;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.flex_col {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.list {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.list>view {
|
||||
width: 60upx;
|
||||
height: 60upx;
|
||||
margin: 5upx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 0 2px #ccc;
|
||||
}
|
||||
|
||||
.list .active {
|
||||
box-shadow: 0 0 2px #09f;
|
||||
transform: scale(1.05, 1.05);
|
||||
}
|
||||
|
||||
.preview {
|
||||
width: 180upx;
|
||||
height: 60upx;
|
||||
}
|
||||
|
||||
.value {
|
||||
margin: 0 40upx;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.ok {
|
||||
width: 160upx;
|
||||
height: 60upx;
|
||||
line-height: 60upx;
|
||||
text-align: center;
|
||||
background-color: #ff9933;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
letter-spacing: 3px;
|
||||
font-size: 32upx;
|
||||
}
|
||||
|
||||
.ok:active {
|
||||
background-color: rgb(255, 107, 34);
|
||||
}
|
||||
</style>
|
124
components/am-sign-input/u-mask/u-mask.vue
Normal file
124
components/am-sign-input/u-mask/u-mask.vue
Normal file
|
@ -0,0 +1,124 @@
|
|||
<template>
|
||||
<view class="u-mask" hover-stop-propagation :style="[maskStyle, zoomStyle]" @tap="click"
|
||||
@touchmove.stop.prevent="() => {}" :class="{
|
||||
'u-mask-zoom': zoom,
|
||||
'u-mask-show': show
|
||||
}">
|
||||
<slot />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* mask 遮罩
|
||||
* @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
|
||||
* @tutorial https://www.uviewui.com/components/mask.html
|
||||
* @property {Boolean} show 是否显示遮罩(默认false)
|
||||
* @property {String Number} z-index z-index 层级(默认1070)
|
||||
* @property {Object} custom-style 自定义样式对象,见上方说明
|
||||
* @property {String Number} duration 动画时长,单位毫秒(默认300)
|
||||
* @property {Boolean} zoom 是否使用scale对遮罩进行缩放(默认true)
|
||||
* @property {Boolean} mask-click-able 遮罩是否可点击,为false时点击不会发送click事件(默认true)
|
||||
* @event {Function} click mask-click-able为true时,点击遮罩发送此事件
|
||||
* @example <u-mask :show="show" @click="show = false"></u-mask>
|
||||
*/
|
||||
export default {
|
||||
name: "u-mask",
|
||||
props: {
|
||||
// 是否显示遮罩
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 层级z-index
|
||||
zIndex: {
|
||||
type: [Number, String],
|
||||
default: '10070'
|
||||
},
|
||||
// 用户自定义样式
|
||||
customStyle: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 遮罩的动画样式, 是否使用使用zoom进行scale进行缩放
|
||||
zoom: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 遮罩的过渡时间,单位为ms
|
||||
duration: {
|
||||
type: [Number, String],
|
||||
default: 300
|
||||
},
|
||||
// 是否可以通过点击遮罩进行关闭
|
||||
maskClickAble: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
zoomStyle: {
|
||||
transform: ''
|
||||
},
|
||||
scale: 'scale(1.2, 1.2)'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(n) {
|
||||
if (n && this.zoom) {
|
||||
// 当展示遮罩的时候,设置scale为1,达到缩小(原来为1.2)的效果
|
||||
this.zoomStyle.transform = 'scale(1, 1)';
|
||||
} else if (!n && this.zoom) {
|
||||
// 当隐藏遮罩的时候,设置scale为1.2,达到放大(因为显示遮罩时已重置为1)的效果
|
||||
this.zoomStyle.transform = this.scale;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
maskStyle() {
|
||||
let style = {};
|
||||
style.backgroundColor = "rgba(0, 0, 0, 0.6)";
|
||||
if (this.show) style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.mask;
|
||||
else style.zIndex = -1;
|
||||
style.transition = `all ${this.duration / 1000}s ease-in-out`;
|
||||
// 判断用户传递的对象是否为空,不为空就进行合并
|
||||
if (Object.keys(this.customStyle).length) style = {
|
||||
...style,
|
||||
...this.customStyle
|
||||
};
|
||||
return style;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
click() {
|
||||
if (!this.maskClickAble) return;
|
||||
this.$emit('click');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// @import "../../libs/css/style.components.scss";
|
||||
|
||||
.u-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
opacity: 0;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.u-mask-show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.u-mask-zoom {
|
||||
transform: scale(1.2, 1.2);
|
||||
}
|
||||
</style>
|
|
@ -102,7 +102,17 @@
|
|||
})
|
||||
},
|
||||
getProductRank(){
|
||||
productRank().then(res=>{
|
||||
let abb=0
|
||||
if(uni.getStorageSync('channelId')){
|
||||
abb=uni.getStorageSync('channelId')
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
let data ={
|
||||
channelId:abb
|
||||
}
|
||||
productRank(data).then(res=>{
|
||||
this.tempArr = res.data;
|
||||
})
|
||||
},
|
||||
|
|
|
@ -65,7 +65,8 @@
|
|||
page: 1,
|
||||
limit: 10,
|
||||
cid: 0,
|
||||
hostProduct: []
|
||||
hostProduct: [],
|
||||
channelId:0,
|
||||
}
|
||||
},
|
||||
created(){
|
||||
|
@ -106,10 +107,18 @@
|
|||
if (that.loading) return;
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
|
||||
if(uni.getStorageSync('channelId')){
|
||||
that.channelId=uni.getStorageSync('channelId')
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
getProductslist({
|
||||
page: that.page,
|
||||
limit: that.limit,
|
||||
cid: that.cid
|
||||
cid: that.cid,
|
||||
channelId: that.channelId,
|
||||
}).then(res => {
|
||||
let list = res.data.list,
|
||||
loadend = list.length < that.limit;
|
||||
|
|
|
@ -198,7 +198,8 @@
|
|||
cartCount: 0,
|
||||
totalPrice: 0.00,
|
||||
lengthCart: 0,
|
||||
theme:'theme1'
|
||||
theme:'theme1',
|
||||
channelId:0
|
||||
}
|
||||
},
|
||||
created(){
|
||||
|
@ -397,11 +398,16 @@
|
|||
if (that.loading) return;
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
if(uni.getStorageSync('channelId')){
|
||||
that.channelId=uni.getStorageSync('channelId')
|
||||
}
|
||||
|
||||
getProductslist({
|
||||
page: that.page,
|
||||
limit: that.limit,
|
||||
type: 1,
|
||||
cid: that.sid,
|
||||
channelId: that.channelId
|
||||
}).then(res => {
|
||||
let list = res.data.list,
|
||||
loadend = list.length < that.limit;
|
||||
|
|
|
@ -393,11 +393,19 @@
|
|||
if (that.loading) return;
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
let abb =0
|
||||
if(uni.getStorageSync('channelId')){
|
||||
abb=uni.getStorageSync('channelId')
|
||||
}else{
|
||||
|
||||
}
|
||||
console.log('3调用的');
|
||||
getProductslist({
|
||||
page: that.page,
|
||||
limit: that.limit,
|
||||
type: 1,
|
||||
cid: that.sid
|
||||
cid: that.sid,
|
||||
channelId:abb,
|
||||
}).then(res => {
|
||||
let list = res.data.list,
|
||||
loadend = list.length < that.limit; //返回列表长度小于请求分页长度为true,反之为false
|
||||
|
|
|
@ -376,7 +376,7 @@
|
|||
} from "@/utils";
|
||||
import parser from "@/components/jyf-parser/jyf-parser";
|
||||
import {
|
||||
computeUser
|
||||
computeUser,getOrderstause
|
||||
} from "@/api/user.js";
|
||||
// #ifdef MP
|
||||
import {
|
||||
|
@ -538,7 +538,8 @@
|
|||
},
|
||||
couponType: 0,//优惠券类型 类型,1-通用,2-商品,3-品类
|
||||
fenqlist:[],//分期
|
||||
isshim:false
|
||||
isshim:false,
|
||||
stause:false,
|
||||
};
|
||||
},
|
||||
computed: mapGetters(['isLogin', 'uid', 'chatUrl', 'productType']),
|
||||
|
@ -554,6 +555,7 @@
|
|||
//校验token是否有效,true为有效,false为无效
|
||||
this.getTokenIsExist();
|
||||
this.getshiminfo()
|
||||
this.getstause()
|
||||
},
|
||||
onLoad(options) {
|
||||
// console.log(JSON.stringify(options),"options.spread")
|
||||
|
@ -669,7 +671,25 @@
|
|||
},
|
||||
methods: {
|
||||
//
|
||||
|
||||
getstause(){
|
||||
let data ={
|
||||
uid: this.$store.getters.uid,
|
||||
}
|
||||
getOrderstause(data).then(res => {
|
||||
|
||||
if (res.code== '200') {
|
||||
this.stause=res.data
|
||||
// this.isshim=res.data
|
||||
|
||||
}
|
||||
|
||||
}).catch(error => {
|
||||
|
||||
this.$util.Tips({
|
||||
title: error
|
||||
});
|
||||
});
|
||||
},
|
||||
getshiminfo(){
|
||||
let data={
|
||||
uid: this.$store.getters.uid,
|
||||
|
@ -1366,7 +1386,14 @@
|
|||
// })
|
||||
} else {
|
||||
if(this.isshim){
|
||||
this.goCat(0);
|
||||
if(this.stause){
|
||||
this.$util.Tips({
|
||||
title: '您有正在进行的订单,请还款后再继续'
|
||||
});
|
||||
}else{
|
||||
this.goCat(0);
|
||||
}
|
||||
|
||||
}else{
|
||||
this.$util.Tips({
|
||||
title: '请在我的页面完成实名认证'
|
||||
|
|
|
@ -104,7 +104,8 @@
|
|||
loading: false,
|
||||
loadTitle: '加载更多',
|
||||
title: '',
|
||||
theme:app.globalData.theme
|
||||
theme:app.globalData.theme,
|
||||
channelId:0
|
||||
};
|
||||
},
|
||||
onLoad: function(options) {
|
||||
|
@ -189,6 +190,11 @@
|
|||
if (isPage === true) that.$set(that, 'productList', []);
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
if(uni.getStorageSync('channelId')){
|
||||
that.channelId=uni.getStorageSync('channelId')
|
||||
}
|
||||
|
||||
that.where.channelId=that.channelId
|
||||
getProductslist(that.where).then(res => {
|
||||
let list = res.data.list;
|
||||
let productList = that.$util.SplitArray(list, that.productList);
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
loadTitle: '加载更多',
|
||||
isbastList: false,
|
||||
theme:app.globalData.theme,
|
||||
channelId:0,
|
||||
};
|
||||
},
|
||||
onShow: function() {
|
||||
|
@ -85,7 +86,15 @@
|
|||
if (that.loading) return;
|
||||
that.loading = true;
|
||||
that.loadTitle = '';
|
||||
let abb = 0
|
||||
if(uni.getStorageSync('channelId')){
|
||||
that.channelId=uni.getStorageSync('channelId')
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
getProductslist({
|
||||
channelId: that.channelId,
|
||||
keyword: that.searchValue,
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
|
|
|
@ -655,7 +655,7 @@
|
|||
that.latitude = lb.latitude;
|
||||
that.longitude = lb.longitude;
|
||||
|
||||
that.$jsonp( 'https://api.map.baidu.com/reverse_geocoding/v3/?ak=E8WVg8s0zMvu3Bb3A9SQTy7xPzTJrX4c&output=json&coordtype=wgs84&location='+lb.latitude+ ',' + lb.longitude,
|
||||
that.$jsonp('https://api.map.baidu.com/reverse_geocoding/v3/?ak=E8WVg8s0zMvu3Bb3A9SQTy7xPzTJrX4c&output=json&coordtype=wgs84&location='+lb.latitude+ ',' + lb.longitude,
|
||||
).then(res => {
|
||||
console.log(res,'百度')
|
||||
let add=res.result.addressComponent
|
||||
|
@ -666,7 +666,15 @@
|
|||
console.log(data.address,111)
|
||||
})
|
||||
})
|
||||
|
||||
.catch(error => {
|
||||
console.log(error,'errorerror');
|
||||
data.longitude=lb.longitude
|
||||
data.latitude=lb.latitude
|
||||
// 处理接口请求错误的情况
|
||||
getip(data).then(res => {
|
||||
console.log(data.address,111)
|
||||
})
|
||||
});
|
||||
},
|
||||
fail:function(err){
|
||||
console.log(err);
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
||||
<input type="number" placeholder="填写验证码" class="codeIput" v-model="captcha" maxlength="6" />
|
||||
<button class="code main_color" :disabled="disabled" :class="disabled === true ? 'on' : ''"
|
||||
@click="code">
|
||||
{{ text }}
|
||||
<button class="code main_color" @click="code">
|
||||
<template v-if="!isCountdownStarted">{{ text }}</template>
|
||||
<template v-else>{{ countdown }}s</template>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -104,7 +104,9 @@
|
|||
appleUserInfo: null,
|
||||
appleShow: false, // 苹果登录版本必须要求ios13以上的
|
||||
theme: app.globalData.theme,
|
||||
text: '获取验证码'
|
||||
text: '获取验证码',
|
||||
countdown: 0,
|
||||
isCountdownStarted: false,
|
||||
|
||||
}
|
||||
},
|
||||
|
@ -114,7 +116,7 @@
|
|||
this.getjmauthCode()
|
||||
},
|
||||
methods: {
|
||||
getjmauthCode(){
|
||||
getjmauthCode() {
|
||||
my.postMessage({
|
||||
data: {
|
||||
action: 'getjmCode'
|
||||
|
@ -144,7 +146,7 @@
|
|||
console.log(that.authCode, 'that.authCodethat.authCode');
|
||||
// uni.setStorageSync('aliOpenid',this.openId)
|
||||
that.alicode()
|
||||
}else if(e.type=='jmcodeResult'){
|
||||
} else if (e.type == 'jmcodeResult') {
|
||||
that.authCode = e.data
|
||||
that.jmalicode()
|
||||
}
|
||||
|
@ -157,26 +159,26 @@
|
|||
}
|
||||
// console.log('调用了');
|
||||
uni.request({
|
||||
url: 'https://yruibao.com/prod/api/front/login/aliOauthLogin',
|
||||
url: 'https://yruibao.com/prod/api/front/login/aliOauthLogin',
|
||||
// url: 'http://192.168.2.26:20411/api/front/login/aliOauthLogin', //仅为示例,并非真实接口地址。
|
||||
data: data,
|
||||
method: 'POST',
|
||||
|
||||
|
||||
success: (res) => {
|
||||
|
||||
|
||||
if (res.data.code == 200) {
|
||||
this.openId=res.data.data.alipaySystemOauthTokenResponse.openId
|
||||
this.openId = res.data.data.alipaySystemOauthTokenResponse.openId
|
||||
console.log(res, 'resres');
|
||||
uni.setStorageSync('openids',this.openId)
|
||||
if (res.data.data.isEXist==false) {
|
||||
|
||||
uni.setStorageSync('openids', this.openId)
|
||||
if (res.data.data.isEXist == false) {
|
||||
|
||||
} else {
|
||||
let data = res.data.data.loginResponse;
|
||||
let newTime = Math.round(new Date() / 1000);
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': res.data.data.loginResponse.token
|
||||
});
|
||||
|
||||
|
||||
this.getUserInfo(data);
|
||||
}
|
||||
} else {
|
||||
|
@ -184,7 +186,7 @@
|
|||
title: res.data.message
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
fail: (err) => {
|
||||
this.$util.Tips({
|
||||
|
@ -199,18 +201,18 @@
|
|||
}
|
||||
// console.log('调用了');
|
||||
uni.request({
|
||||
url: 'https://yruibao.com/prod/api/front/login/aliOauthLogin',
|
||||
url: 'https://yruibao.com/prod/api/front/login/aliOauthLogin',
|
||||
// url: 'http://192.168.2.26:20411/api/front/login/aliOauthLogin', //仅为示例,并非真实接口地址。
|
||||
data: data,
|
||||
method: 'POST',
|
||||
|
||||
success: (res) => {
|
||||
|
||||
|
||||
if (res.data.code == 200) {
|
||||
this.openId=res.data.data.alipaySystemOauthTokenResponse.openId
|
||||
this.openId = res.data.data.alipaySystemOauthTokenResponse.openId
|
||||
console.log(res, 'resres');
|
||||
uni.setStorageSync('openids',this.openId)
|
||||
if (res.data.data.isEXist==false) {
|
||||
uni.setStorageSync('openids', this.openId)
|
||||
if (res.data.data.isEXist == false) {
|
||||
this.showphone = true
|
||||
} else {
|
||||
let data = res.data.data.loginResponse;
|
||||
|
@ -247,36 +249,7 @@
|
|||
|
||||
// });
|
||||
},
|
||||
async code() {
|
||||
let that = this;
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if (that.formItem == 2) that.type = "register";
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
await registerVerify(that.account)
|
||||
.then(res => {
|
||||
|
||||
that.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
uni.hideLoading();
|
||||
that.sendCode();
|
||||
let login = true
|
||||
uni.setStorageSync('loginstause', login);
|
||||
})
|
||||
.catch(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
again() {
|
||||
this.codeUrl =
|
||||
VUE_APP_API_URL +
|
||||
|
@ -324,11 +297,11 @@
|
|||
captcha: that.captcha,
|
||||
spread_spid: that.$Cache.get("spread"),
|
||||
channel_id: channelId,
|
||||
aliOpenid:that.openId
|
||||
aliOpenid: that.openId
|
||||
|
||||
})
|
||||
.then(res => {
|
||||
if(res.code==200){
|
||||
if (res.code == 200) {
|
||||
let data = res.data;
|
||||
let newTime = Math.round(new Date() / 1000);
|
||||
this.$store.commit("LOGIN", {
|
||||
|
@ -336,12 +309,12 @@
|
|||
});
|
||||
uni.hideLoading();
|
||||
that.getUserInfo(data);
|
||||
}else{
|
||||
} else {
|
||||
that.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
|
@ -390,36 +363,52 @@
|
|||
});
|
||||
});
|
||||
},
|
||||
async code() {
|
||||
let that = this;
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if (that.formItem == 2) that.type = "register";
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
await registerVerify(that.account)
|
||||
.then(res => {
|
||||
|
||||
that.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
uni.hideLoading();
|
||||
that.sendCode();
|
||||
let login = true
|
||||
uni.setStorageSync('loginstause', login);
|
||||
})
|
||||
.catch(err => {
|
||||
uni.hideLoading();
|
||||
return that.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
});
|
||||
},
|
||||
async code() {
|
||||
if (!this.account) {
|
||||
this.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.account)) {
|
||||
this.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.isCountdownStarted) return; // Prevent multiple clicks during countdown
|
||||
|
||||
this.isCountdownStarted = true;
|
||||
this.countdown = 60; // Set initial countdown value
|
||||
|
||||
// Start countdown
|
||||
const countdownInterval = setInterval(() => {
|
||||
if (this.countdown > 0) {
|
||||
this.countdown--; // Decrease countdown value
|
||||
} else {
|
||||
clearInterval(countdownInterval); // Stop countdown when it reaches 0
|
||||
this.isCountdownStarted = false; // Enable the button
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
await registerVerify(this.account);
|
||||
this.$util.Tips({
|
||||
title: '验证码已发送'
|
||||
});
|
||||
} catch (err) {
|
||||
this.$util.Tips({
|
||||
title: err.message || '发送验证码失败'
|
||||
});
|
||||
} finally {
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
navTap: function(index) {
|
||||
this.current = index;
|
||||
},
|
||||
|
@ -444,6 +433,8 @@
|
|||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #fff;
|
||||
|
|
|
@ -334,13 +334,25 @@
|
|||
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res,'resres');
|
||||
if(res.code==500){
|
||||
console.log('提示了');
|
||||
that.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
let data = res.data;
|
||||
let newTime = Math.round(new Date() / 1000);
|
||||
this.$store.commit("LOGIN", {
|
||||
'token': res.data.token
|
||||
});
|
||||
uni.hideLoading();
|
||||
that.getUserInfo(data);
|
||||
|
||||
if(res.code==200){
|
||||
that.getUserInfo(data);
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
.catch(res => {
|
||||
uni.hideLoading();
|
||||
|
|
|
@ -50,15 +50,15 @@
|
|||
请拍摄身份证正面与反面照片
|
||||
</view>
|
||||
<view class="img_boxs">
|
||||
<view class="img_box">
|
||||
<image :src="upLoadPositiveImg" @click.stop='uploadpic'>
|
||||
<view class="img_box" @click.stop='uploadpic'>
|
||||
<image :src="upLoadPositiveImg">
|
||||
</image>
|
||||
<view class="text">
|
||||
上传身份证人像面
|
||||
</view>
|
||||
</view>
|
||||
<view class="img_box">
|
||||
<image :src="upLoadReverseImg" @click.stop='uploadpics'>
|
||||
<view class="img_box" @click.stop='uploadpics'>
|
||||
<image :src="upLoadReverseImg">
|
||||
</image>
|
||||
<view class="text">
|
||||
上传身份证国徽面
|
||||
|
@ -111,6 +111,7 @@
|
|||
下一步
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="upidcard" v-if="currentindex==1">
|
||||
<view class="tip">
|
||||
|
@ -120,11 +121,11 @@
|
|||
拍摄或上传身份证原件照片,请确保照片的真实性!
|
||||
</view>
|
||||
<view class="uploadbox" style="box-shadow: 0rpx 0rpx 0rpx 0rpx rgba(0,0,0,0.08);">
|
||||
<view class="upself">
|
||||
<view class="upself" @click.stop='uploadpicss'>
|
||||
<view class="box_tip">
|
||||
请拍摄手持身份证照片
|
||||
</view>
|
||||
<image :src="handIdCard " @click.stop='uploadpicss'>
|
||||
<image :src="handIdCard ">
|
||||
</image>
|
||||
</view>
|
||||
<view class="box_tip">
|
||||
|
@ -153,6 +154,11 @@
|
|||
下一步
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<view class="btn" @click="backStep()">
|
||||
上一步
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="infopage" v-if="currentindex==2">
|
||||
<view class="info_box">
|
||||
|
@ -205,7 +211,7 @@
|
|||
</view>
|
||||
<view class="input">
|
||||
<u-radio-group v-model="insurance">
|
||||
<u-radio v-for="(item, index) in list" :key="index" :name="item.name"
|
||||
<u-radio v-for="(item, index) in list" :key="index" :name="item.name"
|
||||
:disabled="item.disabled">
|
||||
{{item.name}}
|
||||
</u-radio>
|
||||
|
@ -221,11 +227,11 @@
|
|||
<view class="text">
|
||||
紧急联系人
|
||||
</view>
|
||||
<view class="input" @click="openPopup('bottom')">
|
||||
<view class="input" @click="openPopup('bottom')" style="width: 70%;">
|
||||
<view class="texts" style="color: #A6A6A6;font-size: 26rpx;" v-if="lxrmoren==''">
|
||||
请选择您与联系人1的关系
|
||||
</view>
|
||||
<view class="texts" style="font-size: 26rpx;" v-if="lxrmoren!=''">
|
||||
<view class="texts" style="font-size: 26rpx;" v-if="lxrmoren!=''">
|
||||
{{lxrmoren}}
|
||||
</view>
|
||||
<!-- <input type="text" placeholder-style='color: #A6A6A6;font-size: 26rpx;' v-model="lxrmoren"
|
||||
|
@ -257,11 +263,11 @@
|
|||
<view class="text">
|
||||
紧急联系人
|
||||
</view>
|
||||
<view class="input" @click="openPopups('bottoms')">
|
||||
<view class="texts" style="color: #A6A6A6;font-size: 26rpx;" v-if="lxrmorens==''">
|
||||
<view class="input" @click="openPopups('bottoms')" style="width: 70%;">
|
||||
<view class="texts" style="color: #A6A6A6;font-size: 26rpx;" v-if="lxrmorens==''">
|
||||
请选择您与联系人2的关系
|
||||
</view>
|
||||
<view class="texts" style="font-size: 26rpx;" v-if="lxrmorens!=''">
|
||||
<view class="texts" style="font-size: 26rpx;" v-if="lxrmorens!=''">
|
||||
{{lxrmorens}}
|
||||
</view>
|
||||
<!-- <input type="text" placeholder-style='color: #A6A6A6;font-size: 26rpx;' v-model="lxrmorens"
|
||||
|
@ -289,13 +295,14 @@
|
|||
|
||||
</view>
|
||||
|
||||
<view class="info_box">
|
||||
<view class="info_box" v-if="false">
|
||||
<view class="info_li">
|
||||
<view class="text">
|
||||
紧急联系人
|
||||
</view>
|
||||
<view class="input" @click.stop="openPopupadd('bottomadd')">
|
||||
<view class="texts" style="color: #A6A6A6;font-size: 26rpx;" @click="openPopup('bottom')" v-if="lxrmorenss==''">
|
||||
<view class="input" @click.stop="openPopupadd('bottomadd')" style="width: 70%;">
|
||||
<view class="texts" style="color: #A6A6A6;font-size: 26rpx;" @click="openPopup('bottom')"
|
||||
v-if="lxrmorenss==''">
|
||||
请选择您与联系人3的关系
|
||||
</view>
|
||||
<view class="texts" style="font-size: 26rpx;" v-if="lxrmorenss!=''">
|
||||
|
@ -325,11 +332,55 @@
|
|||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view class="tip" style="padding: 0 16rpx;">
|
||||
为了维护您的权益,我们提醒您确认了《个人信用报告授权书》,并对本授权书各项条款的含义及相应的法律后果已全部通晓并充分理解,同意接受本授权书的约束。
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
|
||||
1、同意被授权人在办理下列业务时,通过中国人民银行金融信用信息基础数据库查询本人信用报告:
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
(1)审核本人贷款及其他信贷业务申请的;
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
(2)审核本人作为担保人或共同还款人的;
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
(3)对已发放的本人贷款进行贷后风险管理的;
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
(4)受理法人、其他组织或自然人(以下合称“融资申请人”)的融资申请或对融资申请人在被授权人处的融资进行贷后管理时,需要查询本人作为融资申请人的法定代表人、出资人或关联方的信用状况的;
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
(5)审核本人财产租赁或融资租赁业务申请的。
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
2、同意将本人的基本信息和信用信息报送中国人民银行金融信用信息基础数据库。
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
同意被授权人提供因相应业务产生的本人的信息(包括本人在本业务中产生的不良信息);
|
||||
</view>
|
||||
<view class="word" style="padding: 0 16rpx;">
|
||||
签署电子签名即代表同意上述文字内容
|
||||
</view>
|
||||
<view class="content" >
|
||||
<signInput ref="sign" :header="header" :action="action" @signToUrl="signToUrl" v-if="showsign">
|
||||
</signInput>
|
||||
<view class="imgbox">
|
||||
<image :src="signUrl" v-if="showsign==false" @click.stop="showsign=true"></image>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<view class="btnbox" @click="btnclick()">
|
||||
<view class="btn">
|
||||
提交
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<view class="btn" @click="backStep()">
|
||||
上一步
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rzpage" v-if="currentindex==3">
|
||||
<view class="topbox">
|
||||
|
@ -404,7 +455,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<view class="btn" @click="readyTest()">
|
||||
<view class="btn" @click="readyTest()">
|
||||
开始认证
|
||||
</view>
|
||||
</view>
|
||||
|
@ -431,14 +482,28 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import signInput from "@/components/am-sign-input/am-sign-input.vue"
|
||||
import {
|
||||
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app.js';
|
||||
import store from '@/store';
|
||||
import {
|
||||
getInformation,
|
||||
getocr,
|
||||
getfaceToken
|
||||
getfaceToken,
|
||||
getInformationSave,
|
||||
idcardCheck
|
||||
} from '@/api/api.js'
|
||||
import{
|
||||
getidentity
|
||||
}from '@/api/myapi.js';
|
||||
// import config from '@/config/app.js'
|
||||
// const baseUrl = config.domain
|
||||
export default {
|
||||
components: {
|
||||
signInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [{
|
||||
|
@ -449,7 +514,7 @@
|
|||
name: '无',
|
||||
disabled: false
|
||||
},
|
||||
|
||||
|
||||
],
|
||||
currentindex: 0,
|
||||
numList: [{
|
||||
|
@ -508,14 +573,247 @@
|
|||
lxindexss: '',
|
||||
isup: false,
|
||||
ocrData: {},
|
||||
facetoken:''
|
||||
facetoken: '',
|
||||
pollingInterval: null, // 用于存放轮询定时器的引用\
|
||||
identification:{},
|
||||
action: "", //上传服务器的地址
|
||||
header: {
|
||||
|
||||
}, //图片上传携带头部信息
|
||||
signUrl:'',
|
||||
showsign:true,
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
|
||||
this.getidentityq()
|
||||
this.header={
|
||||
// #ifdef MP
|
||||
"Content-Type": "multipart/form-data",
|
||||
// #endif
|
||||
'Authori-Zation': store.state.app.token
|
||||
}
|
||||
let pid =0
|
||||
this.action= HTTP_REQUEST_URL + '/api/front/upload/image64?model=sign&pid=10'
|
||||
},
|
||||
watch: {
|
||||
currentindex(newIndex, oldIndex) {
|
||||
if (newIndex === 2 && newIndex !== oldIndex) {
|
||||
// 当currentIndex变为2时且不等于旧值时开始轮询
|
||||
this.startPolling();
|
||||
} else {
|
||||
// 当currentIndex不为2时停止轮询
|
||||
this.stopPolling();
|
||||
}
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
// 页面隐藏时停止轮询
|
||||
// this.updateInfo();
|
||||
this.stopPolling();
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
// 在离开当前页面时停止轮询
|
||||
// this.updateInfo();
|
||||
this.stopPolling();
|
||||
next();
|
||||
},
|
||||
onUnload() {
|
||||
// this.updateInfo();
|
||||
// 页面卸载时停止轮询
|
||||
this.stopPolling();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.stopPolling();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 开始轮询
|
||||
startPolling() {
|
||||
// 先停止之前的轮询,防止重复启动
|
||||
this.stopPolling();
|
||||
// 设置轮询定时器,每3秒调用一次this.updateInfo()方法
|
||||
this.pollingInterval = setInterval(() => {
|
||||
this.updateInfo();
|
||||
}, 3000);
|
||||
},
|
||||
// signToUrl(e) {
|
||||
// if(e.data.code==200){
|
||||
// this.signUrl=e.data.data.url
|
||||
// }
|
||||
|
||||
// },
|
||||
// 停止轮询
|
||||
stopPolling() {
|
||||
clearInterval(this.pollingInterval);
|
||||
},
|
||||
backStep() {
|
||||
if (this.currentindex != 0) {
|
||||
this.currentindex = this.currentindex - 1
|
||||
this.updateInfo()
|
||||
}
|
||||
|
||||
},
|
||||
getidentityq:function(){
|
||||
let data = {
|
||||
uid: this.$store.getters.uid
|
||||
}
|
||||
getidentity(data).then(res=>{
|
||||
if ( res.data != null) {
|
||||
|
||||
this.identification = res.data
|
||||
this.realName=res.data.realName
|
||||
this.idcard=res.data.idCardNumber
|
||||
|
||||
this.upLoadPositiveImg=res.data.idCardFrontPhoto
|
||||
this.upLoadReverseImg=res.data.idCardBackPhoto
|
||||
this.emitext=res.data.email
|
||||
this.tel=res.data.commonPhoneNumber
|
||||
|
||||
this.handIdCard=res.data.handIdCard
|
||||
this.company=res.data.company
|
||||
this.salary=res.data.salary
|
||||
this.insurance=res.data.insurance
|
||||
this.ocrData.authority=res.data.authority
|
||||
this.ocrData.day=res.data.day
|
||||
this.ocrData.month=res.data.month
|
||||
this.ocrData.nation=res.data.nation
|
||||
this.ocrData.sex=res.data.sex
|
||||
this.ocrData.year=res.data.year
|
||||
// if(res.data.signUrl){
|
||||
// this.signUrl=res.data.signUrl
|
||||
// }
|
||||
|
||||
// if(this.signUrl==''||this.signUrl==null){
|
||||
// this.showsign=true
|
||||
// }else{
|
||||
// this.showsign=false
|
||||
// }
|
||||
// if(res.data.step){
|
||||
// this.currentindex=res.data.step
|
||||
// }else{
|
||||
// this.currentindex=0
|
||||
// }
|
||||
// console.log(this.signUrl,'this.signUrl');
|
||||
this.timelimit=res.data.timelimit
|
||||
this.ocrData.address=res.data.address
|
||||
if(this.ocrData.sex!=''){
|
||||
this.isup=true
|
||||
}
|
||||
|
||||
if(res.data.userEmergencyContactsList.length==1){
|
||||
this.lxindex=res.data.userEmergencyContactsList[0].relationship
|
||||
this.realNameone=res.data.userEmergencyContactsList[0].contactName
|
||||
this.telone=res.data.userEmergencyContactsList[0].phoneNumber
|
||||
}else if(res.data.userEmergencyContactsList.leng==2){
|
||||
this.lxindex=res.data.userEmergencyContactsList[0].relationship
|
||||
this.realNameone=res.data.userEmergencyContactsList[0].contactName
|
||||
this.telone=res.data.userEmergencyContactsList[0].phoneNumber
|
||||
this.lxindexs=res.data.userEmergencyContactsList[1].relationship
|
||||
this.realNametwo=res.data.userEmergencyContactsList[1].contactName
|
||||
this.teltwo=res.data.userEmergencyContactsList[1].phoneNumber
|
||||
|
||||
}
|
||||
else if(res.data.userEmergencyContactsList.length==3){
|
||||
this.lxindex=res.data.userEmergencyContactsList[0].relationship
|
||||
this.realNameone=res.data.userEmergencyContactsList[0].contactName
|
||||
this.telone=res.data.userEmergencyContactsList[0].phoneNumber
|
||||
this.lxindexs=res.data.userEmergencyContactsList[1].relationship
|
||||
this.realNametwo=res.data.userEmergencyContactsList[1].contactName
|
||||
this.teltwo=res.data.userEmergencyContactsList[1].phoneNumber
|
||||
this.lxindexss=res.data.userEmergencyContactsList[2].relationship
|
||||
this.realNametre=res.data.userEmergencyContactsList[2].contactName
|
||||
this.telthre=res.data.userEmergencyContactsList[2].phoneNumber
|
||||
}
|
||||
this.lxrmoren=this.getRelationship(this.lxindex)
|
||||
this.lxrmorens=this.getRelationship(this.lxindexs)
|
||||
// this.lxrmorenss=this.getRelationship(this.lxindexss)
|
||||
}
|
||||
})
|
||||
},
|
||||
getRelationship(value) {
|
||||
console.log(value, 'valuevaluevaluevalue');
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '父母';
|
||||
case '1':
|
||||
return '子女';
|
||||
case '2':
|
||||
return '兄弟';
|
||||
case '3':
|
||||
return '姐妹';
|
||||
case '4':
|
||||
return '亲戚';
|
||||
case '5':
|
||||
return '朋友';
|
||||
case '6':
|
||||
return '配偶';
|
||||
case '7':
|
||||
return '同事';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
},
|
||||
updateInfo() {
|
||||
let data = {
|
||||
realName: this.realName,
|
||||
idCardNumber: this.idcard,
|
||||
// phoneNumber: this.tel,
|
||||
idCardFrontPhoto: this.upLoadPositiveImg,
|
||||
idCardBackPhoto: this.upLoadReverseImg,
|
||||
email: this.emitext,
|
||||
commonPhoneNumber: this.tel,
|
||||
uid: this.$store.getters.uid,
|
||||
handIdCard: this.handIdCard,
|
||||
company: this.company,
|
||||
salary: this.salary,
|
||||
insurance: this.insurance,
|
||||
authority: this.ocrData.authority,
|
||||
day: this.ocrData.day,
|
||||
month: this.ocrData.month,
|
||||
nation: this.ocrData.nation,
|
||||
sex: this.ocrData.sex,
|
||||
step: this.currentindex,
|
||||
year: this.ocrData.year,
|
||||
timelimit: this.timelimit,
|
||||
address: this.ocrData.address,
|
||||
// signUrl:this.signUrl,
|
||||
userEmergencyContactsList: [{
|
||||
relationship: this.lxindex, //与紧急联系人关系
|
||||
contactName: this.realNameone, //紧急联系人姓名
|
||||
phoneNumber: this.telone, //紧急联系人手机号
|
||||
},
|
||||
{
|
||||
relationship: this.lxindexs, //与紧急联系人关系
|
||||
contactName: this.realNametwo, //紧急联系人姓名
|
||||
phoneNumber: this.teltwo, //紧急联系人手机号
|
||||
}, {
|
||||
relationship: this.lxindexss, //与紧急联系人关系
|
||||
contactName: this.realNametre, //紧急联系人姓名
|
||||
phoneNumber: this.telthre, //紧急联系人手机号
|
||||
}
|
||||
]
|
||||
}
|
||||
console.log(data, 'dadadadada');
|
||||
getInformationSave(data).then(res => {
|
||||
let data = res.data;
|
||||
console.log(res, 'rerererere');
|
||||
if (res.code == 500) {
|
||||
|
||||
this.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
// 在这里进行处理,例如记录日志、展示错误信息等
|
||||
} else {
|
||||
|
||||
}
|
||||
}).catch(error => {
|
||||
// this.$util.Tips({
|
||||
// title: '输入的身份证、手机号、姓名不匹配,请重新输入'
|
||||
// });
|
||||
});
|
||||
|
||||
},
|
||||
// ocr识别
|
||||
testIdcard() {
|
||||
if (this.upLoadPositiveImg ==
|
||||
|
@ -536,15 +834,16 @@
|
|||
});
|
||||
} else {
|
||||
this.currentindex = 1
|
||||
this.updateInfo()
|
||||
uni.pageScrollTo({
|
||||
scrollTop:0
|
||||
scrollTop: 0
|
||||
})
|
||||
}
|
||||
},
|
||||
testhandid() {
|
||||
if (this.handIdCard ==
|
||||
'https://api.yruibao.com/crmebimage/public/content/2024/03/12/7367213efc6f4676be58a4f034fec6b50e8s80rddd.png'
|
||||
) {
|
||||
) {
|
||||
return this.$util.Tips({
|
||||
title: '请上传手持身份证照片'
|
||||
});
|
||||
|
@ -555,14 +854,14 @@
|
|||
} else {
|
||||
this.currentindex = 2
|
||||
uni.pageScrollTo({
|
||||
scrollTop:0
|
||||
scrollTop: 0
|
||||
})
|
||||
|
||||
this.updateInfo()
|
||||
}
|
||||
},
|
||||
readyTest(){
|
||||
readyTest() {
|
||||
console.log('dianjil');
|
||||
let linkUrl='https://liveness.shumaidata.com/index?token=' +this.facetoken
|
||||
let linkUrl = 'https://liveness.shumaidata.com/index?token=' + this.facetoken
|
||||
window.location.href = linkUrl
|
||||
// uni.navigateTo({
|
||||
// url: 'https://liveness.shumaidata.com/index?token=' +this.facetoken // 要跳转的外部链接地址
|
||||
|
@ -590,11 +889,11 @@
|
|||
console.log(res);
|
||||
|
||||
console.log(this.realName);
|
||||
if(res.code==500){
|
||||
if (res.code == 500) {
|
||||
this.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
}else if (res.data.result_msg == '识别结果错误') {
|
||||
} else if (res.data.result_msg == '识别结果错误') {
|
||||
return that.$util.Tips({
|
||||
title: '识别结果错误,请重新上传'
|
||||
});
|
||||
|
@ -819,21 +1118,21 @@
|
|||
this.lxrmorenss = val
|
||||
this.personflagb = false
|
||||
},
|
||||
getfacetoken(){
|
||||
|
||||
getfacetoken() {
|
||||
|
||||
getfaceToken().then(res => {
|
||||
|
||||
if (res.code== 200) {
|
||||
this.facetoken=res.data
|
||||
let token =res.data
|
||||
uni.setStorageSync('faceToken',token)
|
||||
|
||||
if (res.code == 200) {
|
||||
this.facetoken = res.data
|
||||
let token = res.data
|
||||
uni.setStorageSync('faceToken', token)
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
// 点击确定调用判断
|
||||
btnclick() {
|
||||
|
||||
|
||||
let namepatten = /^[\u4e00-\u9fa5a-zA-Z\s\-]+$/ //姓名正则
|
||||
let result = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dX]$/ //身份证正则
|
||||
let photopatten = /^1[3456789]\d{9}$/ //手机号正则
|
||||
|
@ -870,7 +1169,27 @@
|
|||
// title: '请填写正确的身份证'
|
||||
// });
|
||||
// }
|
||||
|
||||
// else if (this.lxrmorenss == '') {
|
||||
// return this.$util.Tips({
|
||||
// title: '请选择联系人3与您的关系'
|
||||
// })
|
||||
// } else if (this.realNametre == '') {
|
||||
// return this.$util.Tips({
|
||||
// title: '联系人3姓名不能为空'
|
||||
// });
|
||||
// } else if (!namepatten.test(this.realNametre)) {
|
||||
// return this.$util.Tips({
|
||||
// title: '请填写正确的联系人3姓名'
|
||||
// });
|
||||
// } else if (this.telthre == '') {
|
||||
// return this.$util.Tips({
|
||||
// title: '联系人3手机号不能为空'
|
||||
// });
|
||||
// } else if (!photopatten.test(this.telthre)) {
|
||||
// return this.$util.Tips({
|
||||
// title: '请填写正确的联系人3手机号'
|
||||
// });
|
||||
// }
|
||||
|
||||
console.log(this.handIdCard, '1111')
|
||||
if (this.emitext == '') {
|
||||
|
@ -941,27 +1260,7 @@
|
|||
return this.$util.Tips({
|
||||
title: '请填写正确的联系人2手机号'
|
||||
});
|
||||
} else if (this.lxrmorenss == '') {
|
||||
return this.$util.Tips({
|
||||
title: '请选择联系人3与您的关系'
|
||||
})
|
||||
} else if (this.realNametre == '') {
|
||||
return this.$util.Tips({
|
||||
title: '联系人3姓名不能为空'
|
||||
});
|
||||
} else if (!namepatten.test(this.realNametre)) {
|
||||
return this.$util.Tips({
|
||||
title: '请填写正确的联系人3姓名'
|
||||
});
|
||||
} else if (this.telthre == '') {
|
||||
return this.$util.Tips({
|
||||
title: '联系人3手机号不能为空'
|
||||
});
|
||||
} else if (!photopatten.test(this.telthre)) {
|
||||
return this.$util.Tips({
|
||||
title: '请填写正确的联系人3手机号'
|
||||
});
|
||||
} else if (this.flaglxr == true) {
|
||||
}else if (this.flaglxr == true) {
|
||||
let data = {
|
||||
realName: this.realName,
|
||||
idCardNumber: this.idcard,
|
||||
|
@ -1012,9 +1311,9 @@
|
|||
// 处理其他情况
|
||||
// uni.navigateBack
|
||||
this.getfacetoken()
|
||||
this.currentindex=3
|
||||
this.currentindex = 3
|
||||
uni.pageScrollTo({
|
||||
scrollTop:0
|
||||
scrollTop: 0
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
|
@ -1065,7 +1364,7 @@
|
|||
month: this.ocrData.month,
|
||||
nation: this.ocrData.nation,
|
||||
sex: this.ocrData.sex,
|
||||
|
||||
// signUrl:this.signUrl,
|
||||
year: this.ocrData.year,
|
||||
timelimit: this.timelimit,
|
||||
address: this.ocrData.address,
|
||||
|
@ -1097,8 +1396,9 @@
|
|||
// 在这里进行处理,例如记录日志、展示错误信息等
|
||||
} else {
|
||||
// 处理其他情况
|
||||
this.getfacetoken()
|
||||
this.currentindex=3
|
||||
// this.getfacetoken()
|
||||
// this.currentindex = 3
|
||||
this.checkid()
|
||||
// uni.navigateBack()
|
||||
}
|
||||
}).catch(error => {
|
||||
|
@ -1119,7 +1419,29 @@
|
|||
// });
|
||||
}
|
||||
},
|
||||
|
||||
checkid(){
|
||||
let data ={
|
||||
idcard:this.idcard
|
||||
}
|
||||
idcardCheck(data).then(res => {
|
||||
|
||||
console.log(res, 'rerererere');
|
||||
if (res.code != 200) {
|
||||
|
||||
this.$util.Tips({
|
||||
title: res.message
|
||||
});
|
||||
// 在这里进行处理,例如记录日志、展示错误信息等
|
||||
} else {
|
||||
this.getfacetoken()
|
||||
this.currentindex = 3
|
||||
}
|
||||
}).catch(error => {
|
||||
// this.$util.Tips({
|
||||
// title: '输入的身份证、手机号、姓名不匹配,请重新输入'
|
||||
// });
|
||||
});
|
||||
},
|
||||
|
||||
// 点击继续添加联系人
|
||||
btnadd() {
|
||||
|
@ -1177,11 +1499,29 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #FFFFFF;
|
||||
background: #FFFFFF !important;
|
||||
}
|
||||
.content {
|
||||
|
||||
background: #ffffff;
|
||||
padding: 60px 0px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
.imgbox{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
image{
|
||||
width: 280rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 16rpx;
|
||||
border: 1px dashed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lxrlist {
|
||||
width: 100%;
|
||||
padding: 20rpx 30rpx !important;
|
||||
|
@ -1189,7 +1529,7 @@
|
|||
color: gray;
|
||||
|
||||
view:hover {
|
||||
background-color: aqua;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
|
@ -1320,12 +1660,13 @@
|
|||
}
|
||||
|
||||
.infopage {
|
||||
background: #fff;
|
||||
.btnbox {
|
||||
margin-top: 50rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -1385,13 +1726,13 @@
|
|||
}
|
||||
|
||||
.upidcard {
|
||||
|
||||
background-color: #fff;
|
||||
.btnbox {
|
||||
margin-top: 50rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
background: #fff;
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,49 +1,87 @@
|
|||
<template>
|
||||
<view class="repaymentbox">
|
||||
<!-- <view class="toreturn" @click="toreturn()">
|
||||
111111111
|
||||
</view> -->
|
||||
<view class="repaymenttext">
|
||||
<a href="javascript:;" :class="index == 0 ? 'active' : ''" v-model="index" @click="btnhk">待还款</a>
|
||||
<a href="javascript:;" :class="index == 1 ? 'active' : ''" v-model="index" @click="btnjq">已结清</a>
|
||||
<view class="topbox">
|
||||
<image src="https://api.yruibao.com/crmebimage/public/store/2024/03/16/ad166479de254390ac5a423f6d18ba4bn0iscpvty1.png" mode=""></image>
|
||||
<view class="price">
|
||||
待还账单:¥{{orderData.sumPrice ? Number(orderData.sumPrice).toFixed(2) : 0}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="repaymentlist" v-for="(item,index) in binglist" :key="index">
|
||||
<view class="lt">
|
||||
<view class="bh">
|
||||
<text>订单编号:</text><text>{{item.orderId}}</text>
|
||||
<view class="rebox">
|
||||
<!-- <view class="repaymenttext">
|
||||
<a href="javascript:;" :class="index == 0 ? 'active' : ''" v-model="index" @click="btnhk">待还款</a>
|
||||
<a href="javascript:;" :class="index == 1 ? 'active' : ''" v-model="index" @click="btnjq">已结清</a>
|
||||
</view> -->
|
||||
<view class="tabbox">
|
||||
<view class="tans" @click="changeindx(0)">
|
||||
<view class="txt" :class="index==0?'act1':''">
|
||||
全部
|
||||
</view>
|
||||
|
||||
<div class="line" v-if="index==0">
|
||||
</div>
|
||||
</view>
|
||||
<view class="rq">
|
||||
<text>还款日期:</text><text>{{item.repaymentDeadline}}</text>
|
||||
</view>
|
||||
<view class="xuhuan">
|
||||
<text>须还金额:</text><text>¥{{item.repaymentAmount}}</text>
|
||||
<view class="yuqi" v-if="item.repaymentStatus=='Pending'">
|
||||
<view class="tans" @click="changeindx(1)">
|
||||
<view class="txt" :class="index==1?'act1':''">
|
||||
待还款
|
||||
</view>
|
||||
<view class="yuqi" v-if="item.repaymentStatus=='Partial'">
|
||||
部分还款
|
||||
</view>
|
||||
<view class="yuqi" v-if="item.repaymentStatus=='Paid'">
|
||||
已还款
|
||||
</view>
|
||||
<view class="yuqi" v-if="item.repaymentStatus=='Late'">
|
||||
逾期
|
||||
</view>
|
||||
<!-- 'Pending'? '待还款' : 'Partial' ? '部分还款' : 'Paid' ? '已还款' : '逾期' -->
|
||||
|
||||
<div class="line" v-if="index==1">
|
||||
|
||||
</div>
|
||||
</view>
|
||||
<view class="tans" @click="changeindx(2)">
|
||||
<view class="txt" :class="index==2?'act1':''">
|
||||
已结清
|
||||
</view>
|
||||
|
||||
<div class="line" v-if="index==2">
|
||||
|
||||
</div>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="rt">
|
||||
<a href="javascript:;" @click='goPay(item.repaymentAmount,item.id)'>{{title}}</a>
|
||||
<!-- <view class='bnt bg_color' v-if="!item.paid" @click='goPay(item.payPrice,item.orderId)'>立即付款</view> -->
|
||||
<view class="repaymentlist" v-for="(item,index) in binglist" :key="index">
|
||||
<view class="lt">
|
||||
<view class="bh">
|
||||
<text>订单编号:</text><text>{{item.orderId}}</text>
|
||||
</view>
|
||||
<view class="rq">
|
||||
<text>还款日期:</text><text>{{item.repaymentDeadline}}</text>
|
||||
</view>
|
||||
<view class="xuhuan">
|
||||
<text>须还金额:</text><text>¥{{item.repaymentAmount}}</text>
|
||||
<view class="yuqi" v-if="item.repaymentStatus=='Pending'">
|
||||
待还款
|
||||
</view>
|
||||
<view class="yuqi" v-if="item.repaymentStatus=='Partial'">
|
||||
部分还款
|
||||
</view>
|
||||
<view class="yuqi" v-if="item.repaymentStatus=='Paid'">
|
||||
已还款
|
||||
</view>
|
||||
<view class="yuqi" v-if="item.repaymentStatus=='Late'">
|
||||
逾期
|
||||
</view>
|
||||
<!-- 'Pending'? '待还款' : 'Partial' ? '部分还款' : 'Paid' ? '已还款' : '逾期' -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="rt">
|
||||
<a href="javascript:;" v-if="item.repaymentStatus!='Paid'" @click='goPay(item.repaymentAmount,item.id,item.repaymentStatus)'>{{title}}</a>
|
||||
<!-- <view class='bnt bg_color' v-if="!item.paid" @click='goPay(item.payPrice,item.orderId)'>立即付款</view> -->
|
||||
</view>
|
||||
<payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'>
|
||||
</payment>
|
||||
</view>
|
||||
<payment :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'>
|
||||
</payment>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
orderData,
|
||||
|
||||
} from '@/api/order.js';
|
||||
import {
|
||||
getreceivable
|
||||
} from '@/api/api.js'
|
||||
|
@ -57,6 +95,7 @@
|
|||
pay_close: false,
|
||||
pay_order_id: '',
|
||||
totalPrice: '0',
|
||||
orderData: {}, //订单详细统计
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
@ -86,7 +125,7 @@
|
|||
const pollingFunction = () => {
|
||||
this.getData(); // 调用getData()方法
|
||||
};
|
||||
|
||||
this.getOrderData();
|
||||
// 初始调用一次
|
||||
pollingFunction();
|
||||
|
||||
|
@ -100,6 +139,10 @@
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
changeindx(num){
|
||||
this.index=num
|
||||
this.getData()
|
||||
},
|
||||
toreturn(){
|
||||
console.log('点击了');
|
||||
|
||||
|
@ -124,13 +167,29 @@
|
|||
},
|
||||
// 请求分期还款
|
||||
getData: function() {
|
||||
let type=0
|
||||
if(this.index==0){
|
||||
type=null
|
||||
}else if(this.index==1){
|
||||
type=0
|
||||
}else if(this.index==2){
|
||||
type=1
|
||||
}
|
||||
let data = {
|
||||
uid:this.$store.getters.uid,
|
||||
// orderId:this.$Cache.get('ordernobh'),
|
||||
type: this.index
|
||||
type: type
|
||||
}
|
||||
getreceivable(data).then(res => {
|
||||
this.binglist = res.data
|
||||
// this.binglist[0].repaymentStatus='Paid'
|
||||
})
|
||||
},
|
||||
getOrderData: function() {
|
||||
let that = this;
|
||||
orderData().then(res => {
|
||||
that.$set(that, 'orderData', res.data);
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
@ -155,10 +214,13 @@
|
|||
* 打开支付组件
|
||||
*
|
||||
*/
|
||||
goPay(pay_price, order_id) {
|
||||
this.$set(this, 'pay_close', true);
|
||||
this.$set(this, 'pay_order_id', order_id);
|
||||
this.$set(this, 'totalPrice', pay_price);
|
||||
goPay(pay_price, order_id,repaymentStatus) {
|
||||
if(repaymentStatus!='Paid'){
|
||||
this.$set(this, 'pay_close', true);
|
||||
this.$set(this, 'pay_order_id', order_id);
|
||||
this.$set(this, 'totalPrice', pay_price);
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* 支付成功回调
|
||||
|
@ -184,6 +246,9 @@
|
|||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page{
|
||||
background-color:#fff !important;
|
||||
}
|
||||
.active {
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
|
@ -194,85 +259,138 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
padding-bottom: 30rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: rgb(228, 228, 228);
|
||||
// box-sizing: border-box;
|
||||
background-color:#fff;
|
||||
font-size: 11px !important;
|
||||
|
||||
.repaymenttext {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding-left: 36rpx;
|
||||
box-sizing: border-box;
|
||||
padding-top: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
display: flex;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: rgba(166, 166, 166, 1);
|
||||
margin-right: 50rpx;
|
||||
|
||||
.topbox{
|
||||
position: relative;
|
||||
width: 750rpx;
|
||||
height: 200rpx;
|
||||
background: #FF5733;
|
||||
image{
|
||||
position: absolute;
|
||||
right: 44rpx;
|
||||
bottom: 64rpx;
|
||||
width: 96rpx;
|
||||
height:110rpx ;
|
||||
}
|
||||
.price{
|
||||
|
||||
position: absolute;
|
||||
left: 46rpx;
|
||||
bottom: 46rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.repaymentlist {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
margin: 26rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
padding: 34rpx 38rpx;
|
||||
|
||||
.lt {
|
||||
width: 80%;
|
||||
|
||||
.xuhuan {
|
||||
.rebox{
|
||||
padding-top: 40rpx;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-top: -60rpx;
|
||||
// box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(0,0,0,0.16);
|
||||
border-radius: 20rpx;
|
||||
// background: #000;
|
||||
|
||||
.tabbox{
|
||||
padding-top: 40rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
.tans{
|
||||
width: 33%;
|
||||
display: flex;
|
||||
line-height: 50rpx;
|
||||
color: rgba(33, 37, 41, 0.6);
|
||||
|
||||
.yuqi {
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
height: 40rpx;
|
||||
flex-wrap: wrap;
|
||||
|
||||
justify-content: center;
|
||||
|
||||
.txt{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
border-radius: 5px;
|
||||
background: rgba(204, 204, 204, 0);
|
||||
border: 1px solid rgba(179, 0, 0, 1);
|
||||
margin-left: 20rpx;
|
||||
color: rgba(179, 0, 0, 1);
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.act1{
|
||||
color: #FF5733;
|
||||
}
|
||||
.line{
|
||||
margin-top: 4rpx;
|
||||
width: 46rpx;
|
||||
height: 0rpx;
|
||||
border-radius: 6rpx;
|
||||
border: 4rpx solid #FF5733;
|
||||
}
|
||||
}
|
||||
|
||||
.bh {
|
||||
line-height: 50rpx;
|
||||
color: rgba(33, 37, 41, 0.6);
|
||||
}
|
||||
|
||||
.rq {
|
||||
line-height: 50rpx;
|
||||
color: rgba(33, 37, 41, 0.6);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.rt {
|
||||
padding-top: 50rpx;
|
||||
.repaymentlist {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
margin: 26rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
a {
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
width: 128rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
background: rgba(212, 48, 48, 1);
|
||||
color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 34rpx 38rpx;
|
||||
box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(0,0,0,0.16);
|
||||
.lt {
|
||||
width: 80%;
|
||||
|
||||
.xuhuan {
|
||||
display: flex;
|
||||
line-height: 50rpx;
|
||||
color: rgba(33, 37, 41, 0.6);
|
||||
|
||||
.yuqi {
|
||||
padding: 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
height: 40rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
border-radius: 5px;
|
||||
background: rgba(204, 204, 204, 0);
|
||||
border: 1px solid rgba(179, 0, 0, 1);
|
||||
margin-left: 20rpx;
|
||||
color: rgba(179, 0, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.bh {
|
||||
line-height: 50rpx;
|
||||
color: rgba(33, 37, 41, 0.6);
|
||||
}
|
||||
|
||||
.rq {
|
||||
line-height: 50rpx;
|
||||
color: rgba(33, 37, 41, 0.6);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.rt {
|
||||
padding-top: 50rpx;
|
||||
box-sizing: border-box;
|
||||
a {
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
width: 128rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
background: rgba(212, 48, 48, 1);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
BIN
static/other/color_black.png
Normal file
BIN
static/other/color_black.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 5.9 KiB |
BIN
static/other/color_black_selected.png
Normal file
BIN
static/other/color_black_selected.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 2.6 KiB |
BIN
static/other/color_red.png
Normal file
BIN
static/other/color_red.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 5.7 KiB |
BIN
static/other/color_red_selected.png
Normal file
BIN
static/other/color_red_selected.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 2.2 KiB |
BIN
static/other/signs.png
Normal file
BIN
static/other/signs.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 4.2 KiB |
Loading…
Reference in New Issue
Block a user