mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 17:55:39 +08:00
修改授课回显调整
This commit is contained in:
@@ -76,19 +76,19 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<div class="item_inp" style="background-color: #fff;">
|
||||
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
||||
:headers="headers" :before-upload="beforeUpload" >
|
||||
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" />
|
||||
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
||||
:headers="headers" :before-upload="beforeUpload">
|
||||
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" title="更换头像" />
|
||||
<div class="i_upload" v-else>
|
||||
<div class="addimg">
|
||||
<div class="heng"></div>
|
||||
<div class="shu"></div>
|
||||
</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
</a-upload>
|
||||
<div class="i_bottom">
|
||||
<div class="tip" style="margin-bottom: 10px;">
|
||||
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为500KB</span>
|
||||
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -312,38 +312,37 @@ export default {
|
||||
|
||||
const headers = { token: getCookieForName("token") };
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/png" ||
|
||||
file.type === "image/svg" ||
|
||||
file.type === "image/bmp" ||
|
||||
file.type === "image/gif";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
|
||||
return false;
|
||||
}
|
||||
|
||||
let isLt1M = file.size < 500000;
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/png" ||
|
||||
file.type === "image/bmp" ||
|
||||
file.type === "image/gif";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("仅支持jpg、gif、png、jpeg、bmp格式!");
|
||||
return false;
|
||||
}
|
||||
let isLt1M = file.size < 500000;
|
||||
console.log(file.size, isLt1M)
|
||||
if (!isLt1M) {
|
||||
message.error("图片不能超过500KB! 请重新上传");
|
||||
return false;
|
||||
}
|
||||
|
||||
const formDatas = new FormData();
|
||||
formDatas.append("file", file);
|
||||
fileUp(formDatas).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log(res.data.data, 45);
|
||||
state.formParam.photo= process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
const formDatas = new FormData();
|
||||
formDatas.append("file", file);
|
||||
console.log("file", file)
|
||||
fileUp(formDatas).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log(res.data.data, 45);
|
||||
state.formParam.photo = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
|
||||
// state.hasImgName = file.name;
|
||||
// emit("src", { id: '', src: res.data.data });
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
// state.hasImgName = file.name;
|
||||
// emit("src", { id: '', src: res.data.data });
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
const AccountStatusList = ref([
|
||||
{ value: '', label: "全部" },
|
||||
{ value: 1, label: "启用" },
|
||||
@@ -649,16 +648,16 @@ export default {
|
||||
const sendPhone=()=>{
|
||||
console.log(state.formParam.mobile)
|
||||
const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
|
||||
if (!state.formParam.mobile) {
|
||||
} else if (!reg.test(state.formParam.mobile)) {
|
||||
message.warning( '手机号格式不正确')
|
||||
}
|
||||
// if (!state.formParam.mobile) {
|
||||
// } else if (!reg.test(state.formParam.mobile)) {
|
||||
// message.warning( '手机号格式不正确')
|
||||
// }
|
||||
}
|
||||
const sendEmail=()=>{
|
||||
const reg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.\w{2,}$/;
|
||||
if (!reg.test(state.formParam.email)) {
|
||||
message.warning( '邮箱格式不正确')
|
||||
}
|
||||
// if (!reg.test(state.formParam.email)) {
|
||||
// message.warning( '邮箱格式不正确')
|
||||
// }
|
||||
}
|
||||
// getpromotionrecordstableData()
|
||||
//导出功能
|
||||
@@ -1088,4 +1087,7 @@ display: flex;
|
||||
justify-content: right;
|
||||
}
|
||||
}
|
||||
.item_inp .i_upload_img[data-v-e369ffe0] {
|
||||
border-radius:50%
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user