2020-10-18 08:05:41 +08:00
|
|
|
|
{% load static %}
|
2020-12-02 21:25:59 +08:00
|
|
|
|
{% load i18n %}
|
2019-07-21 22:08:04 +08:00
|
|
|
|
<!DOCTYPE html>
|
2020-11-16 21:32:08 +08:00
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<title>{% block title %}{% endblock %}</title>
|
|
|
|
|
<meta name="renderer" content="webkit">
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
2021-03-19 07:30:22 +08:00
|
|
|
|
<link rel="stylesheet" href="{% static 'PearAdminLayui/component/pear/css/pear.css' %}?version={{mrdoc_version}}" />
|
2020-11-16 21:32:08 +08:00
|
|
|
|
<link href="{% static 'mrdoc/mrdoc-admin.css' %}?version={{mrdoc_version}}" rel="stylesheet">
|
|
|
|
|
{% block custom_element %}
|
|
|
|
|
{% endblock %}
|
|
|
|
|
</head>
|
|
|
|
|
<body class="pear-container">
|
2020-11-16 21:56:30 +08:00
|
|
|
|
{% if debug %}
|
2020-12-04 19:01:09 +08:00
|
|
|
|
<div class="layui-card">
|
|
|
|
|
<div class="layui-card-body">
|
|
|
|
|
<div class="layui-card-header" style="margin-bottom: 10px;">
|
2020-12-06 01:33:59 +08:00
|
|
|
|
<blockquote class="layui-elem-quote">{% trans "当前站点处于Debug调试模式" %}</blockquote>
|
2020-12-04 19:01:09 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-11-16 21:56:30 +08:00
|
|
|
|
{% endif %}
|
2021-03-25 19:04:39 +08:00
|
|
|
|
<div class="layui-card">
|
2020-12-04 19:01:09 +08:00
|
|
|
|
<div class="layui-card-body">
|
2021-03-25 19:04:39 +08:00
|
|
|
|
<div class="" style="margin-bottom: 10px;font-weight: 700;color: red;">
|
|
|
|
|
<a href="https://curl.qcloud.com/rVF2jfrZ" style="color: #2176ff;" target="_blank">👉【腾讯云】云产品限时秒杀,爆款1核2G云服务器,首年99元</a><br>
|
|
|
|
|
<a href="https://curl.qcloud.com/NbjvQGEE" style="color: #2176ff;" target="_blank">👉【腾讯云】境外1核2G服务器低至2折,半价续费券限量免费领取!</a><br>
|
|
|
|
|
<a href="https://curl.qcloud.com/psEDIE4h" style="color: #2176ff;" target="_blank">👉【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。</a><br>
|
2020-12-04 19:01:09 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-03-25 19:04:39 +08:00
|
|
|
|
<div id="layer-photos-demo" class="layer-photos-demo" style="display: none;">
|
|
|
|
|
<img layer-src="{% static 'dashang/dashang_wx.webp' %}" src="{% static 'dashang/dashang_wx.webp' %}" alt="蜜源">
|
|
|
|
|
</div>
|
2020-12-04 19:01:09 +08:00
|
|
|
|
{% block content %}
|
2020-11-16 21:32:08 +08:00
|
|
|
|
{% endblock %}
|
2021-03-19 07:30:22 +08:00
|
|
|
|
<script src="{% static 'PearAdminLayui/component/layui/layui.js' %}?version={{mrdoc_version}}"></script>
|
|
|
|
|
<script src="{% static 'PearAdminLayui/component/pear/pear.js' %}?version={{mrdoc_version}}"></script>
|
2020-11-16 21:32:08 +08:00
|
|
|
|
<script async>
|
2021-03-25 19:04:39 +08:00
|
|
|
|
layui.use(['jquery','layer'], function() {
|
2020-11-16 21:32:08 +08:00
|
|
|
|
let $ = layui.jquery;
|
2021-03-25 19:04:39 +08:00
|
|
|
|
let layer = layui.layer;
|
2020-11-16 21:32:08 +08:00
|
|
|
|
// 检测版本更新
|
|
|
|
|
checkUpdate = function(){
|
|
|
|
|
$.get("{% url 'check_update' %}",function(r){
|
2021-02-21 13:09:32 +08:00
|
|
|
|
// console.log(r)
|
2020-11-16 21:32:08 +08:00
|
|
|
|
if(r.status){
|
2021-03-25 19:04:39 +08:00
|
|
|
|
var new_version = r.data.name.slice(1,5)
|
|
|
|
|
var current_version = '{{mrdoc_version}}'
|
|
|
|
|
// 如果存在新版本,顶部提示div
|
|
|
|
|
if(new_version > current_version){
|
|
|
|
|
$("#check_update_div").show()
|
|
|
|
|
layer.msg("发现新版本,请更新!")
|
|
|
|
|
}else{
|
|
|
|
|
layer.msg("当前已是最新版本!")
|
|
|
|
|
}
|
2020-11-16 21:32:08 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var check_update = window.localStorage.getItem('check_update')
|
|
|
|
|
// console.log(check_update)
|
|
|
|
|
// 如果没有检测过,立即检测
|
|
|
|
|
if(check_update == null){
|
2021-03-25 19:04:39 +08:00
|
|
|
|
checkUpdate();
|
2020-11-16 21:32:08 +08:00
|
|
|
|
window.localStorage.setItem('check_update',new Date().getTime())
|
2021-03-25 19:04:39 +08:00
|
|
|
|
}else{
|
|
|
|
|
// 如果上次检测时间距今超过5天,再次检测
|
|
|
|
|
var time_diff = (new Date().getTime() - check_update)/86400000
|
|
|
|
|
// console.log(time_diff)
|
|
|
|
|
if(time_diff > 5){
|
|
|
|
|
checkUpdate()
|
|
|
|
|
window.localStorage.setItem('check_update',new Date().getTime())
|
|
|
|
|
}
|
|
|
|
|
};
|
2020-11-16 21:32:08 +08:00
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
{% block custom_script %}
|
|
|
|
|
{% endblock %}
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|