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:
+59
File diff suppressed because one or more lines are too long
+2
File diff suppressed because one or more lines are too long
+32
File diff suppressed because one or more lines are too long
+7
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
Vendored
Executable
+9
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,88 @@
|
||||
kodReady.push(function(){
|
||||
kodApp.add({
|
||||
name:"DPlayer",
|
||||
title:LNG['Plugin.default.DPlayer'],
|
||||
ext:"{{config.fileExt}}",
|
||||
sort:"{{config.fileSort}}",
|
||||
icon:'{{pluginHost}}static/images/icon.png',
|
||||
callback:function(path,ext){
|
||||
var music = ['mp3','wav','aac','m4a','oga','ogg','webma'];
|
||||
if(isWap() && G.ACT != 'file'){ //移动端,非视频文件分享页面用跳转方式打开
|
||||
return window.open(core.path2url(path));
|
||||
}
|
||||
var vedio = {
|
||||
url:core.path2url(path),
|
||||
name:urlDecode(core.pathThis(path)),
|
||||
path:path,
|
||||
ext:ext
|
||||
};
|
||||
var appStatic = "{{pluginHost}}static/";
|
||||
var top = ShareData.frameTop();
|
||||
top.require.async(appStatic+'page.js',function(app){
|
||||
app.play(appStatic,vedio);
|
||||
});
|
||||
}
|
||||
});
|
||||
window.DplayerSubtitle = parseInt("{{config.subtitle}}");
|
||||
|
||||
//临时兼容4.38及以前版本;APP预览txt校验权限失败问题;
|
||||
if (G.ACT + '.' + G.ST == 'view.api' && !G.user){
|
||||
G.sharePage = undefined;
|
||||
$.addStyle('.ace_editor{font-size:13px !important;}');
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时修复文件夹右键新窗口打开异常问题;<=4.32
|
||||
*/
|
||||
var checkAuth = function(path){
|
||||
if (path == undefined) return false;
|
||||
if (path.indexOf('http') === 0 ) return true;
|
||||
if (!G.shareInfo &&
|
||||
!core.pathReadable(path)){
|
||||
Tips.tips(LNG.no_permission_read_all,false);
|
||||
core.playSound("error");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
kodApp.add({
|
||||
name:"browserOpen",
|
||||
title:LNG.open_ie,
|
||||
sort:-100,
|
||||
icon:"x-item-file x-html",
|
||||
callback:function(path,ext){
|
||||
var url = core.path2url(path);
|
||||
console.log(url,path,ext);
|
||||
if( path.substr(-1) == '/' && url.search("explorer/fileProxy&") !=-1 ){
|
||||
return Tips.tips(LNG.path_can_not_action,false);
|
||||
}
|
||||
if(!checkAuth(path)) return;
|
||||
if(isWap()){
|
||||
window.location.href = url;
|
||||
}else{
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
});
|
||||
core.path2url=function(beforePath,testHttp){
|
||||
if (beforePath.substr(0,4) == 'http') return beforePath;
|
||||
if(testHttp == undefined) testHttp = true;//尝试转换为http真实路径;只允许root用户
|
||||
var url,path = core.pathClear(beforePath);
|
||||
|
||||
//user group
|
||||
if (G.isRoot && testHttp &&
|
||||
path.substring(0,G.webRoot.length) == G.webRoot){//服务器路径下
|
||||
if (path.substring(0,G.basicPath.length) == G.basicPath){//设置了服务器到子目录
|
||||
url = G.appRoot + core.pathUrlEncode(path.replace(G.basicPath,''));
|
||||
}else{
|
||||
url = G.webHost + core.pathUrlEncode(path.replace(G.webRoot,''));
|
||||
}
|
||||
}else{
|
||||
url = G.appHost+'explorer/fileProxy&accessToken='+G.accessToken+'&path=' +urlEncode(path);
|
||||
if (typeof(G.sharePage) != 'undefined') {
|
||||
url = G.appHost+'share/fileProxy&user='+G.user+'&sid='+G.sid+'&path=' +urlEncode(path);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
});
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
define(function(require, exports) {
|
||||
var playStart = function(vedioInfo){
|
||||
var $target = createDialog(vedioInfo.name);
|
||||
var typeArr = {
|
||||
'f4v' : 'flv',
|
||||
'f4a' : 'flv',
|
||||
'm4a' : 'mp3',
|
||||
'aac' : 'mp3',
|
||||
'ogg' : 'oga',
|
||||
};
|
||||
var type = typeArr[vedioInfo.ext] || vedioInfo.ext;
|
||||
var playerOption = {
|
||||
container:$target.get(0),
|
||||
preload: 'none',
|
||||
theme:'#f60',
|
||||
loop: false,
|
||||
autoplay:true,
|
||||
lang: 'zh-cn',
|
||||
//flv仅支持 H.264+AAC编码 https://github.com/Bilibili/flv.js/issues/47
|
||||
video: {
|
||||
url:vedioInfo.url,
|
||||
type:type
|
||||
},
|
||||
// danmaku: {
|
||||
// id:md5(vedioInfo.url),
|
||||
// api:'https://api.prprpr.me/dplayer/'
|
||||
// },
|
||||
contextmenu: [
|
||||
{
|
||||
text: 'kodcloud官网',
|
||||
link: 'https://kodcloud.com/'
|
||||
}
|
||||
]
|
||||
};
|
||||
if(window.DplayerSubtitle){
|
||||
// 默认加载同名文件字幕;暂时只支持vtt格式 http://dplayer.js.org/#/home?id=options
|
||||
playerOption.subtitle = {
|
||||
url:core.path2url(vedioInfo.path+'.vtt')
|
||||
}
|
||||
}
|
||||
var player = new DPlayer(playerOption);
|
||||
resetSize(player,$target);
|
||||
}
|
||||
var resetSize = function(player,$player){
|
||||
var reset = function(){
|
||||
// $player.css({position:'absolute'});
|
||||
var vWidth = $player.width();
|
||||
var vHeight = $player.height();
|
||||
var wWidth = $(window).width() * 0.9;
|
||||
var wHeight = $(window).height() * 0.9;
|
||||
if(vHeight >= wHeight){
|
||||
vWidth = (wHeight * vWidth) / vHeight;
|
||||
vHeight = wHeight;
|
||||
}
|
||||
if( vWidth >= wWidth ){
|
||||
vHeight = (wWidth * vHeight) / vWidth;
|
||||
vWidth = wWidth;
|
||||
}
|
||||
|
||||
var dialog = $player.parents('.dplayer-dialog').data('artDialog');
|
||||
var left = ($(window).width() - vWidth) / 2;
|
||||
var top = ($(window).height() - vHeight) / 2;
|
||||
// console.log(22,[vWidth,vHeight],[left,top]);
|
||||
if(!dialog) return;
|
||||
dialog.size(vWidth,vHeight).position(left,top);
|
||||
}
|
||||
// $player.css({position:'absolute'});
|
||||
player.on('loadeddata',reset);
|
||||
};
|
||||
var createDialog = function(title,ext){
|
||||
var size = {width:'70%',height:'60%'};
|
||||
if(ext == 'mp3'){
|
||||
size = {width:'320px',height:'420px'};
|
||||
}
|
||||
var dialog = $.dialog({
|
||||
//id:'movie-dialog',
|
||||
simple:true,
|
||||
ico:core.icon('mp4'),
|
||||
title:title,
|
||||
width:size.width,
|
||||
height:size.height,
|
||||
content:'<div class="Dplayer"></div>',
|
||||
resize:true,
|
||||
padding:0,
|
||||
fixed:true,
|
||||
close:function(){
|
||||
}
|
||||
});
|
||||
dialog.DOM.wrap.addClass('dplayer-dialog');
|
||||
return dialog.DOM.wrap.find(".Dplayer");
|
||||
}
|
||||
|
||||
|
||||
var playReady = function(appStatic,vedioInfo){
|
||||
require.async([
|
||||
appStatic+'DPlayer/lib/flv.min.js',
|
||||
appStatic+'DPlayer/lib/hls.min.js',
|
||||
appStatic+'DPlayer/lib/dash.all.min.js',
|
||||
appStatic+'DPlayer/DPlayer.min.css',
|
||||
appStatic+'DPlayer/DPlayer.min.js',
|
||||
],function(a){
|
||||
playStart(vedioInfo);
|
||||
});
|
||||
}
|
||||
return {
|
||||
play:playReady
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user