提交 f51f0bd1 authored 作者: 钟是志's avatar 钟是志

签名组件优化

上级 c107150f
// 保存签名 到用户基础信息上
import { getUserInfo } from '@/webPublic/one_stop_public/utils/token';
import { uaaRequest } from '@/webPublic/one_stop_public/utils/request';
import { getOneStopMyInfo } from '@/webPublic/one_stop_public/utils/utils';
export function saveSign(url) {
if (typeof url !== 'string' || url.length < 15) {
return true;
}
const userInfo = getUserInfo();
uaaRequest('/UserApi/saveMySysBackgroundImage', {
username: userInfo.stuNo,
backgroundImageUrl: userInfo.backgroundImageUrl || 'fakeBackgroundImageUrl', // 假数据
isUseBackImage: userInfo.isUseBackImage || false,
userSign: url,
}).then((g) => {
getOneStopMyInfo();
return true;
});
}
export function dataURLtoBlob(toDataURL) {
var arr = toDataURL.split(','),
mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]),
n = bstr.length,
u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], { type: mime });
}
export function blobToFile(Blob, fileName) {
Blob.lastModifiedDate = new Date();
Blob.name = fileName;
return Blob;
}
...@@ -29,3 +29,23 @@ ...@@ -29,3 +29,23 @@
border: 1px solid #f2f2f2; border: 1px solid #f2f2f2;
} }
} }
.showDiv{
max-width: 300px;
height: auto;
img{
//width: 100%;
height: auto;
max-width: 100%;
}
}
.editIcon{
cursor: pointer;
font-size: 20px;
color: #0c81e0;
margin-right: 10px;
}
.littleSign{
cursor: pointer;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论