切换导航条
此项目
正在载入...
登录
郭盛
/
store
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Cool
4 years ago
提交
bdc4baad110ff46dd86b04c4477182e5257fe619
1 个父辈
55e822dc
1 个管道 的构建
通过
耗费 11 秒
update
变更
1
构建
1
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
73 行增加
和
0 行删除
public/assets/js/frontend/member.js
public/assets/js/frontend/member.js
0 → 100644
查看文件 @
bdc4baa
define
([
'jquery'
,
'bootstrap'
,
'frontend'
,
'form'
,
'template'
],
function
(
$
,
undefined
,
Frontend
,
Form
,
Template
)
{
var
validatoroptions
=
{
invalid
:
function
(
form
,
errors
)
{
$
.
each
(
errors
,
function
(
i
,
j
)
{
Layer
.
msg
(
j
);
});
}
};
var
Controller
=
{
index
:
function
()
{
Controller
.
api
.
nav
();
},
register
:
function
()
{
//本地验证未通过时提示
$
(
"#register-form"
).
data
(
"validator-options"
,
validatoroptions
);
//为表单绑定事件
Form
.
api
.
bindevent
(
$
(
"#register-form"
),
function
(
data
,
ret
)
{
setTimeout
(
function
()
{
location
.
href
=
ret
.
url
?
ret
.
url
:
"/"
;
},
1000
);
},
function
(
data
)
{
$
(
"input[name=captcha]"
).
next
(
".input-group-addon"
).
find
(
"img"
).
trigger
(
"click"
);
});
},
changepwd
:
function
()
{
//本地验证未通过时提示
$
(
"#changepwd-form"
).
data
(
"validator-options"
,
validatoroptions
);
//为表单绑定事件
Form
.
api
.
bindevent
(
$
(
"#changepwd-form"
),
function
(
data
,
ret
)
{
setTimeout
(
function
()
{
location
.
href
=
ret
.
url
?
ret
.
url
:
"/"
;
},
1000
);
});
},
profile
:
function
()
{
// 给上传按钮添加上传成功事件
$
(
"#plupload-avatar"
).
data
(
"upload-success"
,
function
(
data
)
{
var
url
=
Fast
.
api
.
cdnurl
(
data
.
url
);
$
(
".profile-user-img"
).
prop
(
"src"
,
url
);
Toastr
.
success
(
__
(
'Upload successful'
));
});
Form
.
api
.
bindevent
(
$
(
"#profile-form"
));
$
(
document
).
on
(
"click"
,
".btn-change"
,
function
()
{
var
that
=
this
;
var
id
=
$
(
this
).
data
(
"type"
)
+
"tpl"
;
var
content
=
Template
(
id
,
{});
Layer
.
open
({
type
:
1
,
title
:
"修改"
,
area
:
[
"400px"
,
"250px"
],
content
:
content
,
success
:
function
(
layero
)
{
var
form
=
$
(
"form"
,
layero
);
Form
.
api
.
bindevent
(
form
,
function
(
data
)
{
location
.
reload
();
Layer
.
closeAll
();
});
}
});
});
},
api
:
{
nav
:
function
()
{
$
(
'#basicInforTab'
).
find
(
'li'
).
click
(
function
()
{
window
.
location
.
href
=
$
(
this
).
data
(
'href'
);
});
}
}
};
return
Controller
;
});
\ No newline at end of file
...
...
请
注册
或
登录
后发表评论