Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
huangxuan258
whatsns仿layui官方社区fly响应式模板
提交
1342fa54
W
whatsns仿layui官方社区fly响应式模板
项目概览
huangxuan258
/
whatsns仿layui官方社区fly响应式模板
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
whatsns仿layui官方社区fly响应式模板
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1342fa54
编写于
4月 20, 2020
作者:
huangxuan258
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复响应式fly模板个人认证上传认证图片提示上传文件格式不正确问题
上级
6ca13ad2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
136 addition
and
3 deletion
+136
-3
application/views/responsive_fly/profile.php
application/views/responsive_fly/profile.php
+136
-3
未找到文件。
application/views/responsive_fly/profile.php
浏览文件 @
1342fa54
...
...
@@ -287,7 +287,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
style=
"margin-left: 0px;"
>
<div
class=
"layui-btn"
>
<input
{
if
$
vertify
['
status
'
]=
=0}disabled{/if}
name=
"attach1"
type=
"file"
class=
"fujianfule collapse"
onchange=
"previewImage
(this)"
>
<div
class=
"layui-btn"
>
<input
{
if
$
vertify
['
status
'
]=
=0}disabled{/if}
name=
"attach1"
id=
"upimgfile"
type=
"file"
class=
"fujianfule collapse"
accept=
"image/*"
onchange=
"uploadvertify
(this)"
>
</div>
<p
class=
"text-color-hui mar-t10 mar-b10"
>
请提交对应的身份证或者营业执照证件扫描
<span
style=
"color:#FF5722"
>
(必须上传)
</span></p>
<img
src=
'{if isset($vertify['
zhaopian1
'])}{
SITE_URL
}{$
vertify
['
zhaopian1
']}{/
if
}'
id=
"vertify_img1"
class=
"vertify_img {if isset($vertify['zhaopian1'])&&$vertify['zhaopian1']==''}hide{/if}"
/>
...
...
@@ -300,7 +300,7 @@
<div
class=
"layui-input-block"
style=
"margin-left: 0px;"
>
<div
class=
"layui-btn layui-btn-normal"
>
<input
{
if
$
vertify
['
status
'
]=
=0}disabled{/if}
name=
"attach2"
type=
"file"
class=
"fujianfule collapse"
onchange=
"previewImage1
(this)"
>
<input
{
if
$
vertify
['
status
'
]=
=0}disabled{/if}
name=
"attach2"
type=
"file"
id=
"upimgfile2"
class=
"fujianfule collapse"
accept=
"image/*"
onchange=
"uploadvertify2
(this)"
>
</div>
<p
class=
"text-color-hui mar-t10 mar-b10"
>
其它证明材料,格式jpg,png,jpeg。
<span
style=
"color:#1E9FFF!important"
>
(非必需)
</span></p>
...
...
@@ -463,7 +463,140 @@
var
_posturl
=
"
{url user/ajaxvertify}
"
;
ajaxpost
(
_posturl
,
data
,
success
);
}
//图片大小验证
window
.
verificationPicFile
=
function
(
file
){
var
fileSize
=
0
;
var
fileMaxSize
=
1024
*
3
;
//3M
var
filePath
=
file
.
value
;
if
(
filePath
){
fileSize
=
file
.
files
[
0
].
size
;
var
size
=
fileSize
/
1024
;
if
(
size
>
fileMaxSize
)
{
alert
(
"
文件大小不能大于3M!
"
);
file
.
value
=
""
;
return
false
;
}
else
if
(
size
<=
0
)
{
alert
(
"
文件大小不能为0M!
"
);
file
.
value
=
""
;
return
false
;
}
}
else
{
return
false
;
}
}
window
.
uploadvertify
=
function
(
file
){
if
(
file
.
files
&&
file
.
files
[
0
])
{
verificationPicFile
(
file
);
$
(
"
.upimgtip
"
).
html
(
"
图片上传中....
"
);
$
(
"
#upimgfile
"
).
attr
(
"
disabled
"
,
"
disabled
"
);
var
type
=
"
wangEditorMobileFile
"
;
var
ischeck
=
0
;
var
formData
=
new
FormData
();
formData
.
append
(
type
,
$
(
"
#upimgfile
"
)[
0
].
files
[
0
]);
formData
.
append
(
"
addimg
"
,
0
);
$
.
ajax
({
type
:
"
POST
"
,
url
:
'
{url attach/upimg}
'
,
data
:
formData
,
processData
:
false
,
contentType
:
false
,
//返回数据的格式
datatype
:
"
text
"
,
//"xml", "html", "script", "json", "jsonp", "text".
beforeSend
:
function
()
{
},
success
:
function
(
data
)
{
$
(
"
#upimgfile
"
).
removeAttr
(
"
disabled
"
);
if
(
data
.
indexOf
(
'
error
'
)
==
0
){
alert
(
data
.
replace
(
'
error|
'
,
''
));
return
false
;
}
else
{
$
(
"
#vertify_img1
"
).
attr
(
"
src
"
,
data
).
removeClass
(
"
hide
"
);
}
},
complete
:
function
()
{
$
(
"
.upimgtip
"
).
html
(
""
);
$
(
"
#upimgfile
"
).
removeAttr
(
"
disabled
"
);
},
//调用出错执行的函数
error
:
function
(){
$
(
"
#upimgfile
"
).
removeAttr
(
"
disabled
"
);
//请求出错处理
alert
(
"
上传出错
"
);
}
});
}
}
window
.
uploadvertify2
=
function
(
file
){
if
(
file
.
files
&&
file
.
files
[
0
])
{
verificationPicFile
(
file
);
$
(
"
.upimgtip2
"
).
html
(
"
图片上传中....
"
);
$
(
"
#upimgfile2
"
).
attr
(
"
disabled
"
,
"
disabled
"
);
var
type
=
"
wangEditorMobileFile
"
;
var
ischeck
=
0
;
var
formData
=
new
FormData
();
formData
.
append
(
type
,
$
(
"
#upimgfile2
"
)[
0
].
files
[
0
]);
formData
.
append
(
"
addimg
"
,
0
);
$
.
ajax
({
type
:
"
POST
"
,
url
:
'
{url attach/upimg}
'
,
data
:
formData
,
processData
:
false
,
contentType
:
false
,
//返回数据的格式
datatype
:
"
text
"
,
//"xml", "html", "script", "json", "jsonp", "text".
beforeSend
:
function
()
{
},
success
:
function
(
data
)
{
$
(
"
#upimgfile2
"
).
removeAttr
(
"
disabled
"
);
if
(
data
.
indexOf
(
'
error
'
)
==
0
){
alert
(
data
.
replace
(
'
error|
'
,
''
));
return
false
;
}
else
{
$
(
"
#vertify_img2
"
).
attr
(
"
src
"
,
data
).
removeClass
(
"
hide
"
);
}
},
complete
:
function
()
{
$
(
"
.upimgtip2
"
).
html
(
""
);
$
(
"
#upimgfile2
"
).
removeAttr
(
"
disabled
"
);
},
//调用出错执行的函数
error
:
function
(){
$
(
"
#upimgfile2
"
).
removeAttr
(
"
disabled
"
);
//请求出错处理
alert
(
"
上传出错
"
);
}
});
}
}
//图片上传预览 IE是用了滤镜。
window
.
previewImage
=
function
(
file
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录