feat: 后端全量更新 - 含所有本次需求
- Contract.php: 返回合约账户余额(balance_contract) - My.php: 地址管理增加BTC/ETH - AppContract.php: 一键平仓(closeall) - AppProxy.php: 代理专属注册链接 + 分级权限(L1/L2) - site.php: 手续费减半(0.018→0.009) - agent_permission_setup.sql: 代理权限SQL - crypto_news_crawler.py: 新闻自动采集脚本
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 隐藏插件,默认开启
|
||||
*/
|
||||
class simpleClockPlugin extends PluginBase{
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
}
|
||||
public function regiest(){
|
||||
$this->hookRegiest(array(
|
||||
'user.commonJs.insert' => 'simpleClockPlugin.echoJs'
|
||||
));
|
||||
}
|
||||
public function echoJs($st,$act){
|
||||
$this->echoFile('static/main.js');
|
||||
}
|
||||
public function index(){
|
||||
include($this->pluginPath.'static/page.html');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id":"simpleClock",
|
||||
"name":"clock",
|
||||
"title":"时钟 clock",
|
||||
"version":"1.1",
|
||||
"source":{
|
||||
"className":"font-icon icon-time bg-blue-6"
|
||||
},
|
||||
"description":"桌面时钟挂件(desktop widget)",
|
||||
"auther":{
|
||||
"copyright":"kodcloud.",
|
||||
"homePage":"http://www.kodcloud.com",
|
||||
},
|
||||
"configItem":{
|
||||
"pluginAuth":{
|
||||
"type":"userSelect",
|
||||
"value":"all:1",
|
||||
"display":"{{LNG.Plugin.config.auth}}",
|
||||
"desc":"{{LNG.Plugin.config.authDesc}}",
|
||||
"require":1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
kodReady.push(function(){
|
||||
if(!$.supportCss3() || isWap()){//ie8 ie9
|
||||
return;
|
||||
}
|
||||
if(lodash.get(window,'Config.pageApp') != 'desktop'){
|
||||
return;
|
||||
}
|
||||
//加载时钟挂件
|
||||
$.artDialog.open("{{pluginApi}}",{
|
||||
title:"clock",
|
||||
top: 40,
|
||||
left:$(window).width() - 210,
|
||||
width:'200px',
|
||||
height:'200px',
|
||||
simple:true
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,137 @@
|
||||
body {
|
||||
background: transparent;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.clock {
|
||||
position: absolute;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fill .clock {
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.centre {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.expand {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.anchor {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.element {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.round {
|
||||
border-radius: 296px;
|
||||
}
|
||||
|
||||
.circle-1 {
|
||||
background: white;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.circle-2 {
|
||||
background: #FA9F22;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.circle-3 {
|
||||
background: black;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
}
|
||||
|
||||
.second {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.minute {
|
||||
transform: rotate(54deg);
|
||||
}
|
||||
|
||||
.second-hand {
|
||||
width: 2px;
|
||||
height: 164px;
|
||||
background: #FA9F22;
|
||||
transform: translate(-50%,-100%) translateY(24px);
|
||||
}
|
||||
|
||||
.hour {
|
||||
transform: rotate(304.5deg);
|
||||
}
|
||||
|
||||
.thin-hand {
|
||||
width: 4px;
|
||||
height: 50px;
|
||||
background: white;
|
||||
transform: translate(-50%,-100%);
|
||||
}
|
||||
|
||||
.fat-hand {
|
||||
width: 10px;
|
||||
height: 57px;
|
||||
border-radius: 10px;
|
||||
background: white;
|
||||
transform: translate(-50%,-100%) translateY(-18px);
|
||||
}
|
||||
|
||||
.minute-hand {
|
||||
height: 112px;
|
||||
}
|
||||
|
||||
.hour-text {
|
||||
position: absolute;
|
||||
font: 40px Hei, Helvetica, Arial, sans-serif;
|
||||
color: white;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
|
||||
.hour-10 {
|
||||
padding-left: 0.4ex;
|
||||
}
|
||||
.hour-11 {
|
||||
padding-left: 0.25ex;
|
||||
}
|
||||
|
||||
.minute-text {
|
||||
position: absolute;
|
||||
font: 12px Avenir Next, Helvetica, Arial, sans-serif;
|
||||
color: white;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
|
||||
.minute-line {
|
||||
background: white;
|
||||
width: 1px;
|
||||
height: 9px;
|
||||
transform: translate(-50%,-100%) translateY(-131px);
|
||||
opacity: 0.34;
|
||||
}
|
||||
|
||||
.file{opacity:0.9;}
|
||||
.element.fat-hand{height:50px;}
|
||||
.element.fat-hand.minute-hand{height:70px;}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,68 @@
|
||||
var clock = document.querySelector('#utility-clock')
|
||||
utilityClock(clock)
|
||||
|
||||
if (clock.parentNode.classList.contains('fill')) autoResize(clock, 295 + 32)
|
||||
|
||||
function utilityClock(container) {
|
||||
var dynamic = container.querySelector('.dynamic')
|
||||
var hourElement = container.querySelector('.hour')
|
||||
var minuteElement = container.querySelector('.minute')
|
||||
var secondElement = container.querySelector('.second')
|
||||
var minute = function(n) {
|
||||
return n % 5 == 0 ? minuteText(n) : minuteLine(n)
|
||||
}
|
||||
var minuteText = function(n) {
|
||||
var element = document.createElement('div')
|
||||
element.className = 'minute-text'
|
||||
element.innerHTML = (n < 10 ? '0' : '') + n
|
||||
position(element, n / 60, 135)
|
||||
dynamic.appendChild(element)
|
||||
}
|
||||
var minuteLine = function(n) {
|
||||
var anchor = document.createElement('div')
|
||||
anchor.className = 'anchor'
|
||||
var element = document.createElement('div')
|
||||
element.className = 'element minute-line'
|
||||
rotate(anchor, n)
|
||||
anchor.appendChild(element)
|
||||
dynamic.appendChild(anchor)
|
||||
}
|
||||
var hour = function(n) {
|
||||
var element = document.createElement('div')
|
||||
element.className = 'hour-text hour-' + n
|
||||
element.innerHTML = n
|
||||
position(element, n / 12, 105)
|
||||
dynamic.appendChild(element)
|
||||
}
|
||||
var position = function(element, phase, r) {
|
||||
var theta = phase * 2 * Math.PI
|
||||
element.style.top = (-r * Math.cos(theta)).toFixed(1) + 'px'
|
||||
element.style.left = (r * Math.sin(theta)).toFixed(1) + 'px'
|
||||
}
|
||||
var rotate = function(element, second) {
|
||||
element.style.transform = element.style.webkitTransform = 'rotate(' + (second * 6) + 'deg)'
|
||||
}
|
||||
var animate = function() {
|
||||
var now = new Date()
|
||||
var time = now.getHours() * 3600 +
|
||||
now.getMinutes() * 60 +
|
||||
now.getSeconds() * 1 +
|
||||
now.getMilliseconds() / 1000
|
||||
rotate(secondElement, time)
|
||||
rotate(minuteElement, time / 60)
|
||||
rotate(hourElement, time / 60 / 12)
|
||||
requestAnimationFrame(animate)
|
||||
}
|
||||
for (var i = 1; i <= 60; i ++) minute(i)
|
||||
for (var i = 1; i <= 12; i ++) hour(i)
|
||||
animate()
|
||||
}
|
||||
|
||||
function autoResize(element, nativeSize) {
|
||||
var update = function() {
|
||||
var scale = Math.min(window.innerWidth, window.innerHeight) / nativeSize
|
||||
element.style.transform = element.style.webkitTransform = 'scale(' + scale.toFixed(3) + ')'
|
||||
}
|
||||
update()
|
||||
window.addEventListener('resize', update)
|
||||
}
|
||||
Reference in New Issue
Block a user