pycharm下格式化模板文件,统一风格
This commit is contained in:
@@ -35,7 +35,8 @@
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="button-container">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="edit-password">
|
||||
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit=""
|
||||
lay-filter="edit-password">
|
||||
<i class="layui-icon layui-icon-ok"></i>
|
||||
提交
|
||||
</button>
|
||||
@@ -48,32 +49,33 @@
|
||||
</form>
|
||||
{% include 'admin/common/footer.html' %}
|
||||
<script>
|
||||
layui.use(['form', 'jquery','popup'], function () {
|
||||
let form = layui.form;
|
||||
let $ = layui.jquery;
|
||||
let popup = layui.popup;
|
||||
|
||||
form.on('submit(edit-password)', function (data) {
|
||||
$.ajax({
|
||||
url: '/admin/user/editPassword',
|
||||
data: JSON.stringify(data.field),
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
type: 'put',
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
popup.success(result.msg,function(){
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
});
|
||||
} else {
|
||||
popup.failure(result.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
layui.use(['form', 'jquery', 'popup'], function () {
|
||||
let form = layui.form
|
||||
let $ = layui.jquery
|
||||
let popup = layui.popup
|
||||
|
||||
// 修改密码提交
|
||||
form.on('submit(edit-password)', function (data) {
|
||||
$.ajax({
|
||||
url: '/admin/user/editPassword',
|
||||
data: JSON.stringify(data.field),
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
type: 'put',
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
popup.success(result.msg, function () {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name))
|
||||
})
|
||||
} else {
|
||||
popup.failure(result.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
return false
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user