码农笔录博客源码
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

74 rindas
3.0 KiB

pirms 6 gadiem
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="个人随笔是一个面向IT技术人员,提供个人平时工作总结和在线记录学习笔记,个人技术博客,在线云笔记,码农笔录,最新的技术博客,www.aiprose.com">
<meta name="keywords"
content="个人随笔,博客,个人博客,个人笔记,技术博客,免费云笔记,云笔记,随笔,IT博客,谷歌地图,码农笔录,www.aiprose.com,aiprose.com,aiprose">
<link rel="stylesheet" href="//g.alicdn.com/sui/sui3/0.0.18/css/sui.min.css">
<script type="text/javascript" src="//g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
pirms 6 gadiem
{{/*<script type="text/javascript" src="/static/js/aljquery.js"></script>*/}}
<script type="text/javascript" src="/static/js/sui.js"></script>
pirms 6 gadiem
<script type="text/javascript" src="/static/js/layer.js"></script>
<title>首页 - 个人随笔</title>
<style>
.common {
margin: 15px 0;
display: flex;
height: 32px;
line-height: 32px;
}
</style>
</head>
<body>
<div style="margin: 20px 35px;">
<div class="common">
<span>所属文件夹:</span>
<span style="flex: 1">
<select class="form-control " style="display: inline-block;height: 32px" id="catory">
pirms 6 gadiem
{{range .NoteColl}}
<option value="{{.Id}}">{{.Title}}</option>
{{end}}
pirms 6 gadiem
</select>
</span>
</div>
<div class="common">
<span>新笔记名称:</span>
<input type="text" placeholder="输入标签" class="input-xfat" style="height: 32px;flex: 1" id="lable">
</div>
<div class="common" style="text-align: center">
<button type="button" class="btn btn-primary btn-lg btn-block" id="saveBtn">保存</button>
</div>
</div>
</body>
<script>
$(function () {
pirms 6 gadiem
if (!{{.IsLogin}}) {
parent.location.href = "/login"
}
pirms 6 gadiem
$("#saveBtn").click(function () {
var pid = $("#catory").val()
var title = $("#lable").val()
$.post('/note/save', {
pid: pid,
title: title
},
function (data) {
if (!data.Status) {
pirms 6 gadiem
parent.addNoteCallback(data)
pirms 6 gadiem
parent.layer.msg("保存成功", {icon: 6});
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
pirms 6 gadiem
} else if (data.Status == 401) {
parent.location.href = "/login"
parent.layer.close(index);
} else {
layer.msg("服务器异常", {icon: 5});
pirms 6 gadiem
}
}, 'json')
})
})
</script>
</html>