Commit 976414d8 authored by liyadong's avatar liyadong

update

parent da236b6a
This diff is collapsed.
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
.postcard-container { .postcard-container {
padding-bottom: 1rem; padding-bottom: 1rem;
background: url("../images/body_bg2.jpg") no-repeat center top, url("../images/bg.jpg") repeat-y center; background: url("../images/body_bg2.jpg?v=20210609") no-repeat center top, url("../images/bg.jpg") repeat-y center;
background-size: 100% auto; background-size: 100% auto;
} }
...@@ -157,20 +157,20 @@ ...@@ -157,20 +157,20 @@
.right { .right {
.fr(); .fr();
width: 50%; width: 50%;
padding-top: .55rem; padding-top: .25rem;
li { li {
margin-top: 0; margin-top: 0;
margin-bottom: .65rem; margin-bottom: .45rem;
span { span {
margin-left: .5rem; margin-left: .5rem;
width: 3rem; width: 3rem;
} }
&.role4 { //&.role4 {
margin-bottom: .7rem; // margin-bottom: .7rem;
} //}
} }
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
reSizeRem(); reSizeRem();
} }
</script> </script>
<link rel="stylesheet" href="{{ asset('postcard/css/style.css?v=20210609') }}"> <link rel="stylesheet" href="{{ asset('postcard/css/style.css?v=2021060902') }}">
<script src="{{ asset('js/jquery.2.1.3.min.js') }}"></script> <script src="{{ asset('js/jquery.2.1.3.min.js') }}"></script>
<script src="{{ asset('postcard/js/html2canvas.js') }}"></script> <script src="{{ asset('postcard/js/html2canvas.js') }}"></script>
<script src="{{ asset('js/toast.js') }}"></script> <script src="{{ asset('js/toast.js') }}"></script>
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
0 0
@endif @endif
小时</span></li> 小时</span></li>
<li class="role6"><span>荣誉称号</span></li>
</ul> </ul>
</div> </div>
<div class="bottom"> <div class="bottom">
...@@ -200,6 +201,29 @@ ...@@ -200,6 +201,29 @@
renderHtml('#wq1', '{{ $armsStrong }}'); renderHtml('#wq1', '{{ $armsStrong }}');
renderHtml('#wq2', '{{ $armsExciting }}'); renderHtml('#wq2', '{{ $armsExciting }}');
renderHtml('#wq3', '{{ $armsScore }}'); renderHtml('#wq3', '{{ $armsScore }}');
function beforeUploadPicture(file) { // 直播大图
const width = 347
const height = 115
const isSize = new Promise(function(resolve, reject) {
const _URL = window.URL || window.webkitURL
const img = new Image()
img.onload = function() {
console.log(img.width,img.height)
const valid = img.width === width && img.height === height
valid ? resolve() : reject()
}
img.src = _URL.createObjectURL(file)
}).then(() => {
return true
}, () => {
return false
})
if (!isSize) {
this.$message.error('请上传尺寸为' + width + '*' + height + '的图片!')
return Promise.reject()
}
}
// 上传图片 // 上传图片
$(document).on('change', '#file', function (e) { $(document).on('change', '#file', function (e) {
var formData = new FormData(); var formData = new FormData();
...@@ -207,6 +231,8 @@ ...@@ -207,6 +231,8 @@
var acceptFileTypes = /^image\/(jpe?g|png)$/i; var acceptFileTypes = /^image\/(jpe?g|png)$/i;
var roleId = getQueryString('roleId'); var roleId = getQueryString('roleId');
var serverId = getQueryString('serverId'); var serverId = getQueryString('serverId');
beforeUploadPicture(file);
return false;
try{ try{
//文件类型判断 //文件类型判断
if (file && file.type && !acceptFileTypes.test(file.type)) { if (file && file.type && !acceptFileTypes.test(file.type)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment