尝试增加网页模板
This commit is contained in:
parent
9d1dc740bf
commit
d80daf6fdd
418
.idea/dbnavigator.xml
generated
Normal file
418
.idea/dbnavigator.xml
generated
Normal file
@ -0,0 +1,418 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DBNavigator.Project.DataEditorManager">
|
||||
<record-view-column-sorting-type value="BY_INDEX" />
|
||||
<value-preview-text-wrapping value="false" />
|
||||
<value-preview-pinned value="false" />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DatabaseBrowserManager">
|
||||
<autoscroll-to-editor value="false" />
|
||||
<autoscroll-from-editor value="true" />
|
||||
<show-object-properties value="true" />
|
||||
<loaded-nodes />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DatabaseEditorStateManager">
|
||||
<last-used-providers />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.DatabaseFileManager">
|
||||
<open-files />
|
||||
</component>
|
||||
<component name="DBNavigator.Project.Settings">
|
||||
<connections />
|
||||
<browser-settings>
|
||||
<general>
|
||||
<display-mode value="TABBED" />
|
||||
<navigation-history-size value="100" />
|
||||
<show-object-details value="false" />
|
||||
</general>
|
||||
<filters>
|
||||
<object-type-filter>
|
||||
<object-type name="SCHEMA" enabled="true" />
|
||||
<object-type name="USER" enabled="true" />
|
||||
<object-type name="ROLE" enabled="true" />
|
||||
<object-type name="PRIVILEGE" enabled="true" />
|
||||
<object-type name="CHARSET" enabled="true" />
|
||||
<object-type name="TABLE" enabled="true" />
|
||||
<object-type name="VIEW" enabled="true" />
|
||||
<object-type name="MATERIALIZED_VIEW" enabled="true" />
|
||||
<object-type name="NESTED_TABLE" enabled="true" />
|
||||
<object-type name="COLUMN" enabled="true" />
|
||||
<object-type name="INDEX" enabled="true" />
|
||||
<object-type name="CONSTRAINT" enabled="true" />
|
||||
<object-type name="DATASET_TRIGGER" enabled="true" />
|
||||
<object-type name="DATABASE_TRIGGER" enabled="true" />
|
||||
<object-type name="SYNONYM" enabled="true" />
|
||||
<object-type name="SEQUENCE" enabled="true" />
|
||||
<object-type name="PROCEDURE" enabled="true" />
|
||||
<object-type name="FUNCTION" enabled="true" />
|
||||
<object-type name="PACKAGE" enabled="true" />
|
||||
<object-type name="TYPE" enabled="true" />
|
||||
<object-type name="TYPE_ATTRIBUTE" enabled="true" />
|
||||
<object-type name="ARGUMENT" enabled="true" />
|
||||
<object-type name="DIMENSION" enabled="true" />
|
||||
<object-type name="CLUSTER" enabled="true" />
|
||||
<object-type name="DBLINK" enabled="true" />
|
||||
</object-type-filter>
|
||||
</filters>
|
||||
<sorting>
|
||||
<object-type name="COLUMN" sorting-type="NAME" />
|
||||
<object-type name="FUNCTION" sorting-type="NAME" />
|
||||
<object-type name="PROCEDURE" sorting-type="NAME" />
|
||||
<object-type name="ARGUMENT" sorting-type="POSITION" />
|
||||
<object-type name="TYPE ATTRIBUTE" sorting-type="POSITION" />
|
||||
</sorting>
|
||||
<default-editors>
|
||||
<object-type name="VIEW" editor-type="SELECTION" />
|
||||
<object-type name="PACKAGE" editor-type="SELECTION" />
|
||||
<object-type name="TYPE" editor-type="SELECTION" />
|
||||
</default-editors>
|
||||
</browser-settings>
|
||||
<navigation-settings>
|
||||
<lookup-filters>
|
||||
<lookup-objects>
|
||||
<object-type name="SCHEMA" enabled="true" />
|
||||
<object-type name="USER" enabled="false" />
|
||||
<object-type name="ROLE" enabled="false" />
|
||||
<object-type name="PRIVILEGE" enabled="false" />
|
||||
<object-type name="CHARSET" enabled="false" />
|
||||
<object-type name="TABLE" enabled="true" />
|
||||
<object-type name="VIEW" enabled="true" />
|
||||
<object-type name="MATERIALIZED VIEW" enabled="true" />
|
||||
<object-type name="INDEX" enabled="true" />
|
||||
<object-type name="CONSTRAINT" enabled="true" />
|
||||
<object-type name="DATASET TRIGGER" enabled="true" />
|
||||
<object-type name="DATABASE TRIGGER" enabled="true" />
|
||||
<object-type name="SYNONYM" enabled="false" />
|
||||
<object-type name="SEQUENCE" enabled="true" />
|
||||
<object-type name="PROCEDURE" enabled="true" />
|
||||
<object-type name="FUNCTION" enabled="true" />
|
||||
<object-type name="PACKAGE" enabled="true" />
|
||||
<object-type name="TYPE" enabled="true" />
|
||||
<object-type name="DIMENSION" enabled="false" />
|
||||
<object-type name="CLUSTER" enabled="false" />
|
||||
<object-type name="DBLINK" enabled="true" />
|
||||
</lookup-objects>
|
||||
<force-database-load value="false" />
|
||||
<prompt-connection-selection value="true" />
|
||||
<prompt-schema-selection value="true" />
|
||||
</lookup-filters>
|
||||
</navigation-settings>
|
||||
<dataset-grid-settings>
|
||||
<general>
|
||||
<enable-zooming value="true" />
|
||||
<enable-column-tooltip value="true" />
|
||||
</general>
|
||||
<sorting>
|
||||
<nulls-first value="true" />
|
||||
<max-sorting-columns value="4" />
|
||||
</sorting>
|
||||
<audit-columns>
|
||||
<column-names value="" />
|
||||
<visible value="true" />
|
||||
<editable value="false" />
|
||||
</audit-columns>
|
||||
</dataset-grid-settings>
|
||||
<dataset-editor-settings>
|
||||
<text-editor-popup>
|
||||
<active value="false" />
|
||||
<active-if-empty value="false" />
|
||||
<data-length-threshold value="100" />
|
||||
<popup-delay value="1000" />
|
||||
</text-editor-popup>
|
||||
<values-actions-popup>
|
||||
<show-popup-button value="true" />
|
||||
<element-count-threshold value="1000" />
|
||||
<data-length-threshold value="250" />
|
||||
</values-actions-popup>
|
||||
<general>
|
||||
<fetch-block-size value="100" />
|
||||
<fetch-timeout value="30" />
|
||||
<trim-whitespaces value="true" />
|
||||
<convert-empty-strings-to-null value="true" />
|
||||
<select-content-on-cell-edit value="true" />
|
||||
<large-value-preview-active value="true" />
|
||||
</general>
|
||||
<filters>
|
||||
<prompt-filter-dialog value="true" />
|
||||
<default-filter-type value="BASIC" />
|
||||
</filters>
|
||||
<qualified-text-editor text-length-threshold="300">
|
||||
<content-types>
|
||||
<content-type name="Text" enabled="true" />
|
||||
<content-type name="Properties" enabled="true" />
|
||||
<content-type name="XML" enabled="true" />
|
||||
<content-type name="DTD" enabled="true" />
|
||||
<content-type name="HTML" enabled="true" />
|
||||
<content-type name="XHTML" enabled="true" />
|
||||
<content-type name="CSS" enabled="true" />
|
||||
<content-type name="SQL" enabled="true" />
|
||||
<content-type name="PL/SQL" enabled="true" />
|
||||
<content-type name="JavaScript" enabled="true" />
|
||||
<content-type name="JSON" enabled="true" />
|
||||
<content-type name="JSON5" enabled="true" />
|
||||
<content-type name="YAML" enabled="true" />
|
||||
</content-types>
|
||||
</qualified-text-editor>
|
||||
<record-navigation>
|
||||
<navigation-target value="VIEWER" />
|
||||
</record-navigation>
|
||||
</dataset-editor-settings>
|
||||
<code-editor-settings>
|
||||
<general>
|
||||
<show-object-navigation-gutter value="false" />
|
||||
<show-spec-declaration-navigation-gutter value="true" />
|
||||
<enable-spellchecking value="true" />
|
||||
<enable-reference-spellchecking value="false" />
|
||||
</general>
|
||||
<confirmations>
|
||||
<save-changes value="false" />
|
||||
<revert-changes value="true" />
|
||||
</confirmations>
|
||||
</code-editor-settings>
|
||||
<code-completion-settings>
|
||||
<filters>
|
||||
<basic-filter>
|
||||
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="function" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
|
||||
<filter-element type="OBJECT" id="schema" selected="true" />
|
||||
<filter-element type="OBJECT" id="role" selected="true" />
|
||||
<filter-element type="OBJECT" id="user" selected="true" />
|
||||
<filter-element type="OBJECT" id="privilege" selected="true" />
|
||||
<user-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="false" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</user-schema>
|
||||
<public-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="false" />
|
||||
<filter-element type="OBJECT" id="view" selected="false" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="false" />
|
||||
<filter-element type="OBJECT" id="index" selected="false" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="false" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="false" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="false" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="false" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="false" />
|
||||
<filter-element type="OBJECT" id="function" selected="false" />
|
||||
<filter-element type="OBJECT" id="package" selected="false" />
|
||||
<filter-element type="OBJECT" id="type" selected="false" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="false" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="false" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="false" />
|
||||
</public-schema>
|
||||
<any-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</any-schema>
|
||||
</basic-filter>
|
||||
<extended-filter>
|
||||
<filter-element type="RESERVED_WORD" id="keyword" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="function" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="parameter" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="datatype" selected="true" />
|
||||
<filter-element type="RESERVED_WORD" id="exception" selected="true" />
|
||||
<filter-element type="OBJECT" id="schema" selected="true" />
|
||||
<filter-element type="OBJECT" id="user" selected="true" />
|
||||
<filter-element type="OBJECT" id="role" selected="true" />
|
||||
<filter-element type="OBJECT" id="privilege" selected="true" />
|
||||
<user-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</user-schema>
|
||||
<public-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</public-schema>
|
||||
<any-schema>
|
||||
<filter-element type="OBJECT" id="table" selected="true" />
|
||||
<filter-element type="OBJECT" id="view" selected="true" />
|
||||
<filter-element type="OBJECT" id="materialized view" selected="true" />
|
||||
<filter-element type="OBJECT" id="index" selected="true" />
|
||||
<filter-element type="OBJECT" id="constraint" selected="true" />
|
||||
<filter-element type="OBJECT" id="trigger" selected="true" />
|
||||
<filter-element type="OBJECT" id="synonym" selected="true" />
|
||||
<filter-element type="OBJECT" id="sequence" selected="true" />
|
||||
<filter-element type="OBJECT" id="procedure" selected="true" />
|
||||
<filter-element type="OBJECT" id="function" selected="true" />
|
||||
<filter-element type="OBJECT" id="package" selected="true" />
|
||||
<filter-element type="OBJECT" id="type" selected="true" />
|
||||
<filter-element type="OBJECT" id="dimension" selected="true" />
|
||||
<filter-element type="OBJECT" id="cluster" selected="true" />
|
||||
<filter-element type="OBJECT" id="dblink" selected="true" />
|
||||
</any-schema>
|
||||
</extended-filter>
|
||||
</filters>
|
||||
<sorting enabled="true">
|
||||
<sorting-element type="RESERVED_WORD" id="keyword" />
|
||||
<sorting-element type="RESERVED_WORD" id="datatype" />
|
||||
<sorting-element type="OBJECT" id="column" />
|
||||
<sorting-element type="OBJECT" id="table" />
|
||||
<sorting-element type="OBJECT" id="view" />
|
||||
<sorting-element type="OBJECT" id="materialized view" />
|
||||
<sorting-element type="OBJECT" id="index" />
|
||||
<sorting-element type="OBJECT" id="constraint" />
|
||||
<sorting-element type="OBJECT" id="trigger" />
|
||||
<sorting-element type="OBJECT" id="synonym" />
|
||||
<sorting-element type="OBJECT" id="sequence" />
|
||||
<sorting-element type="OBJECT" id="procedure" />
|
||||
<sorting-element type="OBJECT" id="function" />
|
||||
<sorting-element type="OBJECT" id="package" />
|
||||
<sorting-element type="OBJECT" id="type" />
|
||||
<sorting-element type="OBJECT" id="dimension" />
|
||||
<sorting-element type="OBJECT" id="cluster" />
|
||||
<sorting-element type="OBJECT" id="dblink" />
|
||||
<sorting-element type="OBJECT" id="schema" />
|
||||
<sorting-element type="OBJECT" id="role" />
|
||||
<sorting-element type="OBJECT" id="user" />
|
||||
<sorting-element type="RESERVED_WORD" id="function" />
|
||||
<sorting-element type="RESERVED_WORD" id="parameter" />
|
||||
</sorting>
|
||||
<format>
|
||||
<enforce-code-style-case value="true" />
|
||||
</format>
|
||||
</code-completion-settings>
|
||||
<execution-engine-settings>
|
||||
<statement-execution>
|
||||
<fetch-block-size value="100" />
|
||||
<execution-timeout value="20" />
|
||||
<debug-execution-timeout value="600" />
|
||||
<focus-result value="false" />
|
||||
<prompt-execution value="false" />
|
||||
</statement-execution>
|
||||
<script-execution>
|
||||
<command-line-interfaces />
|
||||
<execution-timeout value="300" />
|
||||
</script-execution>
|
||||
<method-execution>
|
||||
<execution-timeout value="30" />
|
||||
<debug-execution-timeout value="600" />
|
||||
<parameter-history-size value="10" />
|
||||
</method-execution>
|
||||
</execution-engine-settings>
|
||||
<operation-settings>
|
||||
<transactions>
|
||||
<uncommitted-changes>
|
||||
<on-project-close value="ASK" />
|
||||
<on-disconnect value="ASK" />
|
||||
<on-autocommit-toggle value="ASK" />
|
||||
</uncommitted-changes>
|
||||
<multiple-uncommitted-changes>
|
||||
<on-commit value="ASK" />
|
||||
<on-rollback value="ASK" />
|
||||
</multiple-uncommitted-changes>
|
||||
</transactions>
|
||||
<session-browser>
|
||||
<disconnect-session value="ASK" />
|
||||
<kill-session value="ASK" />
|
||||
<reload-on-filter-change value="false" />
|
||||
</session-browser>
|
||||
<compiler>
|
||||
<compile-type value="KEEP" />
|
||||
<compile-dependencies value="ASK" />
|
||||
<always-show-controls value="false" />
|
||||
</compiler>
|
||||
<debugger>
|
||||
<debugger-type value="JDBC" />
|
||||
<use-generic-runners value="true" />
|
||||
</debugger>
|
||||
</operation-settings>
|
||||
<ddl-file-settings>
|
||||
<extensions>
|
||||
<mapping file-type-id="VIEW" extensions="vw" />
|
||||
<mapping file-type-id="TRIGGER" extensions="trg" />
|
||||
<mapping file-type-id="PROCEDURE" extensions="prc" />
|
||||
<mapping file-type-id="FUNCTION" extensions="fnc" />
|
||||
<mapping file-type-id="PACKAGE" extensions="pkg" />
|
||||
<mapping file-type-id="PACKAGE_SPEC" extensions="pks" />
|
||||
<mapping file-type-id="PACKAGE_BODY" extensions="pkb" />
|
||||
<mapping file-type-id="TYPE" extensions="tpe" />
|
||||
<mapping file-type-id="TYPE_SPEC" extensions="tps" />
|
||||
<mapping file-type-id="TYPE_BODY" extensions="tpb" />
|
||||
</extensions>
|
||||
<general>
|
||||
<lookup-ddl-files value="true" />
|
||||
<create-ddl-files value="false" />
|
||||
<synchronize-ddl-files value="true" />
|
||||
<use-qualified-names value="false" />
|
||||
<make-scripts-rerunnable value="true" />
|
||||
</general>
|
||||
</ddl-file-settings>
|
||||
<general-settings>
|
||||
<regional-settings>
|
||||
<date-format value="MEDIUM" />
|
||||
<number-format value="UNGROUPED" />
|
||||
<locale value="SYSTEM_DEFAULT" />
|
||||
<use-custom-formats value="false" />
|
||||
</regional-settings>
|
||||
<environment>
|
||||
<environment-types>
|
||||
<environment-type id="development" name="Development" description="Development environment" color="-2430209/-12296320" readonly-code="false" readonly-data="false" />
|
||||
<environment-type id="integration" name="Integration" description="Integration environment" color="-2621494/-12163514" readonly-code="true" readonly-data="false" />
|
||||
<environment-type id="production" name="Production" description="Productive environment" color="-11574/-10271420" readonly-code="true" readonly-data="true" />
|
||||
<environment-type id="other" name="Other" description="" color="-1576/-10724543" readonly-code="false" readonly-data="false" />
|
||||
</environment-types>
|
||||
<visibility-settings>
|
||||
<connection-tabs value="true" />
|
||||
<dialog-headers value="true" />
|
||||
<object-editor-tabs value="true" />
|
||||
<script-editor-tabs value="false" />
|
||||
<execution-result-tabs value="true" />
|
||||
</visibility-settings>
|
||||
</environment>
|
||||
</general-settings>
|
||||
</component>
|
||||
</project>
|
||||
2
app.py
2
app.py
@ -23,6 +23,8 @@ def create_flask_app():
|
||||
app.register_blueprint(cls.cls, url_prefix='/cls')
|
||||
app.register_blueprint(layui.layui, url_prefix='/layui')
|
||||
app.register_blueprint(parse.parse, url_prefix='/parse')
|
||||
# app.register_blueprint(web.web, url_prefix='/web',template_folder='templates/cmsV10/mxpro/html/index/')
|
||||
app.register_blueprint(web.web, url_prefix='/web')
|
||||
app.logger.name = "drLogger"
|
||||
# lsg = service.storage_service()
|
||||
logger.info(f"默认解析地址:{app.config.get('PLAY_URL')}")
|
||||
|
||||
@ -12,4 +12,5 @@ from . import cms
|
||||
from . import cls
|
||||
from . import classes
|
||||
from . import layui
|
||||
from . import parse
|
||||
from . import parse
|
||||
from . import web
|
||||
@ -6,12 +6,13 @@
|
||||
import functools
|
||||
import json
|
||||
|
||||
from flask import Blueprint,abort,request,render_template,render_template_string,jsonify,make_response,redirect,current_app
|
||||
from flask import Blueprint, abort, request, render_template, render_template_string, jsonify, make_response, redirect, \
|
||||
current_app
|
||||
from time import time
|
||||
from utils.web import getParmas,get_interval
|
||||
from utils.web import getParmas, get_interval
|
||||
from utils.cfg import cfg
|
||||
from utils.env import get_env
|
||||
from js.rules import getRuleLists,getJxs
|
||||
from js.rules import getRuleLists, getJxs
|
||||
from base.R import R
|
||||
from utils.log import logger
|
||||
from utils import parser
|
||||
@ -20,12 +21,14 @@ from base.database import db
|
||||
from models.ruleclass import RuleClass
|
||||
from models.playparse import PlayParse
|
||||
from js.rules import getRules
|
||||
from controllers.service import storage_service,rules_service
|
||||
from concurrent.futures import ThreadPoolExecutor,as_completed,thread # 引入线程池
|
||||
from quickjs import Function,Context
|
||||
from controllers.service import storage_service, rules_service
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed, thread # 引入线程池
|
||||
from quickjs import Function, Context
|
||||
import ujson
|
||||
|
||||
vod = Blueprint("vod", __name__)
|
||||
|
||||
|
||||
def search_one_py(rule, wd, before: str = ''):
|
||||
t1 = time()
|
||||
if not before:
|
||||
@ -46,7 +49,8 @@ def search_one_py(rule, wd, before: str = ''):
|
||||
print(f'{rule}发生错误:{e}')
|
||||
return None
|
||||
|
||||
def search_one(rule, wd, before: str = '',env:dict=None,app=None):
|
||||
|
||||
def search_one(rule, wd, before: str = '', env: dict = None, app=None):
|
||||
t1 = time()
|
||||
if not before:
|
||||
with open('js/模板.js', encoding='utf-8') as f:
|
||||
@ -81,6 +85,7 @@ def search_one(rule, wd, before: str = '',env:dict=None,app=None):
|
||||
logger.info(f'{e}')
|
||||
return R.failed('爬虫规则加载失败')
|
||||
|
||||
|
||||
def multi_search2(wd):
|
||||
t1 = time()
|
||||
lsg = storage_service()
|
||||
@ -123,7 +128,8 @@ def multi_search2(wd):
|
||||
result = {
|
||||
'list': []
|
||||
}
|
||||
logger.info(f'drpy聚搜{len(search_sites)}个源耗时{get_interval(t2)}毫秒,含准备共计耗时:{get_interval(t1)}毫秒,发生错误:{e}')
|
||||
logger.info(
|
||||
f'drpy聚搜{len(search_sites)}个源耗时{get_interval(t2)}毫秒,含准备共计耗时:{get_interval(t1)}毫秒,发生错误:{e}')
|
||||
return jsonify(result)
|
||||
|
||||
|
||||
@ -134,6 +140,7 @@ def merged_hide(merged_rules):
|
||||
hide_rule_names = list(map(lambda x: x['name'], hide_rules))
|
||||
# print('隐藏:',hide_rule_names)
|
||||
all_cnt = len(merged_rules)
|
||||
|
||||
# print(merged_rules)
|
||||
|
||||
def filter_show(x):
|
||||
@ -144,21 +151,25 @@ def merged_hide(merged_rules):
|
||||
|
||||
merged_rules = list(filter(filter_show, merged_rules))
|
||||
# print('隐藏后:',merged_rules)
|
||||
logger.info(f'数据库筛选隐藏规则耗时{get_interval(t1)}毫秒,共计{all_cnt}条规则,隐藏后可渲染{len(merged_rules)}条规则')
|
||||
logger.info(
|
||||
f'数据库筛选隐藏规则耗时{get_interval(t1)}毫秒,共计{all_cnt}条规则,隐藏后可渲染{len(merged_rules)}条规则')
|
||||
# merged_rules = []
|
||||
return merged_rules
|
||||
|
||||
|
||||
def disable_exit_for_threadpool_executor():
|
||||
import atexit
|
||||
import concurrent.futures
|
||||
atexit.unregister(concurrent.futures.thread._python_exit)
|
||||
|
||||
def sort_lsg_rules(sites:list):
|
||||
|
||||
def sort_lsg_rules(sites: list):
|
||||
"""
|
||||
查询结果按order和write_date 联合排序
|
||||
:param sites:
|
||||
:return:
|
||||
"""
|
||||
|
||||
def comp(x, y):
|
||||
if x['order'] > y['order']:
|
||||
return 1
|
||||
@ -175,12 +186,14 @@ def sort_lsg_rules(sites:list):
|
||||
sites.sort(key=functools.cmp_to_key(comp), reverse=False)
|
||||
return sites
|
||||
|
||||
def sort_lsg_rules2(sites:list,lsg_rule_names:list):
|
||||
|
||||
def sort_lsg_rules2(sites: list, lsg_rule_names: list):
|
||||
"""
|
||||
查询结果按order和write_date 联合排序
|
||||
:param sites:
|
||||
:return:
|
||||
"""
|
||||
|
||||
def comp(x, y):
|
||||
try:
|
||||
x1 = lsg_rule_names.index(x)
|
||||
@ -200,11 +213,12 @@ def sort_lsg_rules2(sites:list,lsg_rule_names:list):
|
||||
sites.sort(key=functools.cmp_to_key(comp), reverse=False)
|
||||
return sites
|
||||
|
||||
|
||||
def getSearchSites():
|
||||
val = {}
|
||||
lsg = storage_service()
|
||||
try:
|
||||
timeout = round(int(lsg.getItem('SEARCH_TIMEOUT',5000))/1000,2)
|
||||
timeout = round(int(lsg.getItem('SEARCH_TIMEOUT', 5000)) / 1000, 2)
|
||||
except:
|
||||
timeout = 5
|
||||
val['timeout'] = timeout
|
||||
@ -236,6 +250,7 @@ def getSearchSites():
|
||||
val['search_sites'] = search_sites
|
||||
return val
|
||||
|
||||
|
||||
def multi_search(wd):
|
||||
t1 = time()
|
||||
val = getSearchSites()
|
||||
@ -259,13 +274,13 @@ def multi_search(wd):
|
||||
with ThreadPoolExecutor(max_workers=len(search_sites)) as executor:
|
||||
to_do = []
|
||||
for site in search_sites:
|
||||
future = executor.submit(search_one, site, wd, before,env,current_app._get_current_object())
|
||||
future = executor.submit(search_one, site, wd, before, env, current_app._get_current_object())
|
||||
to_do.append(future)
|
||||
try:
|
||||
for future in as_completed(to_do, timeout=timeout): # 并发执行
|
||||
ret = future.result()
|
||||
# print(ret)
|
||||
if ret and isinstance(ret,dict) and ret.get('list'):
|
||||
if ret and isinstance(ret, dict) and ret.get('list'):
|
||||
res.extend(ret['list'])
|
||||
except Exception as e:
|
||||
print(f'发生错误:{e}')
|
||||
@ -279,18 +294,20 @@ def multi_search(wd):
|
||||
"list": res
|
||||
})
|
||||
|
||||
|
||||
@vod.route('/vods')
|
||||
def vods_search():
|
||||
val = getSearchSites()
|
||||
print(val)
|
||||
|
||||
# return jsonify(val)
|
||||
return render_template('show_search.html',val=val)
|
||||
return render_template('show_search.html', val=val)
|
||||
|
||||
|
||||
@vod.route('/vod')
|
||||
def vod_home():
|
||||
lsg = storage_service()
|
||||
js0_disable = lsg.getItem('JS0_DISABLE',cfg.get('JS0_DISABLE',0))
|
||||
js0_disable = lsg.getItem('JS0_DISABLE', cfg.get('JS0_DISABLE', 0))
|
||||
if js0_disable:
|
||||
abort(403)
|
||||
js0_password = lsg.getItem('JS0_PASSWORD', cfg.get('JS0_PASSWORD', ''))
|
||||
@ -331,7 +348,6 @@ def vod_home():
|
||||
logger.info(f'参数检验js读取共计耗时:{get_interval(t0)}毫秒')
|
||||
t2 = time()
|
||||
|
||||
|
||||
# ctx, js_code = parser.runJs(js_path,before=before)
|
||||
# if not js_code:
|
||||
# return R.failed('爬虫规则加载失败')
|
||||
@ -341,13 +357,13 @@ def vod_home():
|
||||
|
||||
ctx = Context()
|
||||
try:
|
||||
with open(js_path,encoding='utf-8') as f2:
|
||||
with open(js_path, encoding='utf-8') as f2:
|
||||
jscode = f2.read()
|
||||
env = get_env()
|
||||
for k in env:
|
||||
# print(f'${k}',f'{env[k]}')
|
||||
if f'${k}' in jscode:
|
||||
jscode = jscode.replace(f'${k}',f'{env[k]}')
|
||||
jscode = jscode.replace(f'${k}', f'{env[k]}')
|
||||
# print(env)
|
||||
# if env:
|
||||
# jscode = render_template_string(jscode,**env)
|
||||
@ -372,14 +388,14 @@ def vod_home():
|
||||
logger.info(f'js装载耗时:{get_interval(t2)}毫秒')
|
||||
# print(ruleDict)
|
||||
# print(rule)
|
||||
cms = CMS(ruleDict,db,RuleClass,PlayParse,cfg,ext)
|
||||
cms = CMS(ruleDict, db, RuleClass, PlayParse, cfg, ext)
|
||||
wd = getParmas('wd')
|
||||
quick = getParmas('quick')
|
||||
play = getParmas('play') # 类型为4的时候点击播放会带上来
|
||||
flag = getParmas('flag') # 类型为4的时候点击播放会带上来
|
||||
play = getParmas('play') # 类型为4的时候点击播放会带上来
|
||||
flag = getParmas('flag') # 类型为4的时候点击播放会带上来
|
||||
# myfilter = getParmas('filter')
|
||||
t = getParmas('t')
|
||||
pg = getParmas('pg','1')
|
||||
pg = getParmas('pg', '1')
|
||||
pg = int(pg)
|
||||
q = getParmas('q')
|
||||
play_url = getParmas('play_url')
|
||||
@ -387,7 +403,7 @@ def vod_home():
|
||||
if play:
|
||||
jxs = getJxs()
|
||||
play_url = play.split('play_url=')[1]
|
||||
play_url = cms.playContent(play_url, jxs,flag)
|
||||
play_url = cms.playContent(play_url, jxs, flag)
|
||||
if isinstance(play_url, str):
|
||||
# return redirect(play_url)
|
||||
# return jsonify({'parse': 0, 'playUrl': play_url, 'jx': 0, 'url': play_url})
|
||||
@ -400,10 +416,10 @@ def vod_home():
|
||||
|
||||
if play_url: # 播放
|
||||
jxs = getJxs()
|
||||
play_url = cms.playContent(play_url,jxs)
|
||||
if isinstance(play_url,str):
|
||||
play_url = cms.playContent(play_url, jxs)
|
||||
if isinstance(play_url, str):
|
||||
return redirect(play_url)
|
||||
elif isinstance(play_url,dict):
|
||||
elif isinstance(play_url, dict):
|
||||
return jsonify(play_url)
|
||||
else:
|
||||
return play_url
|
||||
@ -414,21 +430,21 @@ def vod_home():
|
||||
fl = json.loads(filters)
|
||||
# print(filters,type(filters))
|
||||
# print(fl,type(fl))
|
||||
data = cms.categoryContent(t,pg,fl)
|
||||
data = cms.categoryContent(t, pg, fl)
|
||||
# print(data)
|
||||
return jsonify(data)
|
||||
if ac and ids: # 二级
|
||||
if ac and ids: # 二级
|
||||
id_list = ids.split(',')
|
||||
show_name = False
|
||||
if ids.find('#') > -1:
|
||||
id_list = list(map(lambda x:x.split('#')[0],id_list))
|
||||
id_list = list(map(lambda x: x.split('#')[0], id_list))
|
||||
show_name = True
|
||||
# print('app:377',len(id_list))
|
||||
# print(id_list)
|
||||
data = cms.detailContent(pg,id_list,show_name)
|
||||
data = cms.detailContent(pg, id_list, show_name)
|
||||
# print(data)
|
||||
return jsonify(data)
|
||||
if wd: # 搜索
|
||||
if wd: # 搜索
|
||||
if rule == 'drpy':
|
||||
print(f'准备单独处理聚合搜索:{wd}')
|
||||
return multi_search(wd)
|
||||
|
||||
46
controllers/web.py
Normal file
46
controllers/web.py
Normal file
@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# File : vod.py
|
||||
# Author: DaShenHan&道长-----先苦后甜,任凭晚风拂柳颜------
|
||||
# Date : 2022/9/6
|
||||
import functools
|
||||
import json
|
||||
|
||||
from flask import Blueprint, abort, request, render_template, send_from_directory, render_template_string, jsonify, \
|
||||
make_response, redirect, \
|
||||
current_app
|
||||
from time import time
|
||||
from utils.web import getParmas, get_interval
|
||||
from utils.cfg import cfg
|
||||
from utils.env import get_env
|
||||
from js.rules import getRuleLists, getJxs
|
||||
from base.R import R
|
||||
from utils.log import logger
|
||||
from utils import parser
|
||||
from controllers.cms import CMS
|
||||
from base.database import db
|
||||
from models.ruleclass import RuleClass
|
||||
from models.playparse import PlayParse
|
||||
from js.rules import getRules
|
||||
from controllers.service import storage_service, rules_service
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed, thread # 引入线程池
|
||||
from quickjs import Function, Context
|
||||
import ujson
|
||||
|
||||
# web = Blueprint("web", __name__, template_folder='templates/cmsV10/mxpro/html/index/')
|
||||
web = Blueprint("web", __name__)
|
||||
|
||||
|
||||
@web.route('/cms/<path:filename>')
|
||||
def custom_static_js(filename):
|
||||
# 自定义静态目录 {{ url_for('custom_static',filename='help.txt')}}
|
||||
# print(filename)
|
||||
return send_from_directory('templates/cms', filename)
|
||||
|
||||
@web.route('/<web_name>/<theme>')
|
||||
def web_index(web_name, theme):
|
||||
ctx = {'web_name': web_name, 'key': '关键词', 'description': '描述'}
|
||||
try:
|
||||
return render_template(f'cms/{theme}/homeContent.html', ctx=ctx)
|
||||
except Exception as e:
|
||||
return render_template('404.html', ctx=ctx, error=f'发生错误的原因可能是下面路径未找到:{e}')
|
||||
2
static/js/axios.min.js
vendored
Normal file
2
static/js/axios.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
24
static/js/eruda.js
Normal file
24
static/js/eruda.js
Normal file
File diff suppressed because one or more lines are too long
8
static/js/vue3.js
Normal file
8
static/js/vue3.js
Normal file
File diff suppressed because one or more lines are too long
19
templates/404.html
Normal file
19
templates/404.html
Normal file
File diff suppressed because one or more lines are too long
10
templates/cms/mxpro/categoryContent.html
Normal file
10
templates/cms/mxpro/categoryContent.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
145
templates/cms/mxpro/css/iconfont.css
Normal file
145
templates/cms/mxpro/css/iconfont.css
Normal file
File diff suppressed because one or more lines are too long
113
templates/cms/mxpro/css/notice.css
Normal file
113
templates/cms/mxpro/css/notice.css
Normal file
@ -0,0 +1,113 @@
|
||||
.popup::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.popup-title::after {
|
||||
background: #525254;
|
||||
}
|
||||
|
||||
.popup {
|
||||
box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .05), 0 1.5rem 2.2rem rgba(0, 0, 0, .1) !important;
|
||||
padding: 0 30px;
|
||||
width: 370px;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: 999999;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
margin: 0 auto;
|
||||
border-radius: 18px;
|
||||
background: #323236;
|
||||
color: hsla(0, 0%, 100%, .87);
|
||||
overflow: inherit;
|
||||
}
|
||||
|
||||
.popup::after {
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
background: #eaedf1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
border-radius: 18px 18px 0 0
|
||||
}
|
||||
|
||||
.popup::after {
|
||||
background: #323236;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
line-height: 20px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.popup-title {
|
||||
position: relative;
|
||||
font-size: 18px;
|
||||
font-weight: 900;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.popup-title::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
border-radius: 5px;
|
||||
left: 0;
|
||||
bottom: 5px;
|
||||
z-index: -1
|
||||
}
|
||||
|
||||
.popup-icon {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 36px;
|
||||
margin: 26px 0 0
|
||||
}
|
||||
|
||||
.popup-icon img {
|
||||
height: 36px
|
||||
}
|
||||
|
||||
.popup-main {
|
||||
padding-bottom: 5px
|
||||
}
|
||||
|
||||
.popup-main p {
|
||||
padding: 2px 0 0;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.popup-footer {
|
||||
padding: 10px 0 30px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.popup-btn {
|
||||
font-weight: 700;
|
||||
border-radius: 50px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
padding: 0 15px;
|
||||
line-height: 40px;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
background: #ff2a14;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
@media(max-width:559px) {
|
||||
.popup {
|
||||
width: 77%;
|
||||
padding: 0 25px
|
||||
}
|
||||
|
||||
.popup-icon,
|
||||
.popup-icon img {
|
||||
height: 36px
|
||||
}
|
||||
}
|
||||
479
templates/cms/mxpro/css/stui_default.css
Normal file
479
templates/cms/mxpro/css/stui_default.css
Normal file
@ -0,0 +1,479 @@
|
||||
/*!
|
||||
* Copyright 2016-2018 http://v.shoutu.cn
|
||||
* Email 726662013@qq.com
|
||||
*/
|
||||
@charset "utf-8";
|
||||
|
||||
/* all */
|
||||
body, html{width:100%; height: 100%;}
|
||||
body{ margin: 0; font-family:"Microsoft YaHei", "微软雅黑", "STHeiti", "WenQuanYi Micro Hei", SimSun, sans-serif; font-size:14px; line-height: 140%; color: #757575;}
|
||||
body:after{ content: ""; position: fixed; z-index: -1; top: 0; left: 0; bottom: 0; right: 0; background-color: #29262d; background: -webkit-linear-gradient(top, #29262d, #000000); background: -o-linear-gradient(top, #29262d, #000000); background: -moz-linear-gradient(top, #29262d, #000000); background: linear-gradient(top, #29262d, #000000);}
|
||||
ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,tr{margin:0;padding:0; font-weight:normal}
|
||||
input,select{font-size:12px;vertical-align:middle; border:none;}
|
||||
ul,li{list-style-type:none;}
|
||||
img{border:0 none;}
|
||||
p{margin:0 0 10px;}
|
||||
::-webkit-scrollbar{ width: 8px; background-color: #1c1b1e;}
|
||||
::-webkit-scrollbar-thumb{background-color: #fdf751;}
|
||||
|
||||
/* container */
|
||||
*{-webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box}
|
||||
:after,:before{-webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box}
|
||||
.container {position: relative; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto;}
|
||||
.row{position: relative; margin-right: -15px; margin-left: -15px;}
|
||||
.container:before,.container:after,.row:before,.row:after,.clearfix:before, .clearfix:after{ display: table; content: " "; clear: both;}
|
||||
|
||||
/* more */
|
||||
h1{ font-size:22px; line-height: 28px;}
|
||||
h2{ font-size:20px; line-height: 26px;}
|
||||
h3{ font-size:18px; line-height: 24px;}
|
||||
h4{ font-size:16px; line-height: 22px;}
|
||||
h5{ font-size:14px; line-height: 20px;}
|
||||
h6{ font-size:12px; line-height: 18px;}
|
||||
h1,h2,h3,h4,h5,h6{ font-weight: 400; margin-top:10px; margin-bottom:10px}
|
||||
a,button{ text-decoration:none; color: #757575; outline:none; -webkit-tap-highlight-color:rgba(0,0,0,0)}
|
||||
button:hover{ cursor: pointer;}
|
||||
a:focus,a:hover,a:active{ text-decoration:none; color: #fdf751;}
|
||||
.icon{ font-size: 16px; vertical-align: -1px;}
|
||||
.font-16{ font-size: 16px;}
|
||||
.font-14{ font-size: 14px;}
|
||||
.font-12{ font-size: 12px;}
|
||||
.text-red{ color: red;}
|
||||
.text-center{ text-align: center;}
|
||||
.text-left{ text-align: left;}
|
||||
.text-right{ text-align: right;}
|
||||
.pull-right{ float: right !important;}
|
||||
.pull-right1{ float: right !important; color:#cccccc; padding-top:5px; padding-right:10px;}
|
||||
.pull-right2{ float: right !important; color:#cccccc; padding-top:5px;}
|
||||
.hide{ display: none !important; }
|
||||
.text-overflow{ width:100%; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
.pic-text{display: block; width: 100%; position: absolute; bottom: 0; left: 0; padding:5px 10px; font-size: 12px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;background-repeat: no-repeat; background-image: linear-gradient(transparent,rgba(0,0,0,.5)); color: #FFFFFF;}
|
||||
.pic-text1{display: block; width: 100%; position: absolute; top: 0; left: 0; padding:5px 10px; font-size: 12px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;background-repeat: no-repeat; color: #FFFFFF;}
|
||||
.pic-text b{ float:right; background-color:#ff6600; padding:0px 3px; height:16px; line-height:16px; border-radius: 2px; font-weight:normal;}
|
||||
.pic-text1 b{ float:right; background-color:#8c00ff; padding:0px 3px; height:16px; line-height:16px; border-radius: 2px; font-weight:normal;}
|
||||
.pic-tag{ position: absolute; top: 0; right: 0; z-index: 99; padding: 2px 8px; font-size: 12px; border-radius: 0 0 0 8px; background-color: #FF9900; color: #FFFFFF;}
|
||||
.play-bg{ position: fixed; z-index: 0; bottom: 0; left: 0; width: 100%; height: 150px;background:url(../image/play_bg.png) center no-repeat;}
|
||||
.stui-pannel{ margin-bottom: 20px;}
|
||||
.stui-foot{ margin-bottom: 20px;}
|
||||
|
||||
/* form */
|
||||
/* form */
|
||||
input,textarea{outline: medium none; outline: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}
|
||||
input.form-control,input.btn{ outline:0px; -webkit-appearance: none;}
|
||||
input[type="checkbox"]{ vertical-align: -2px;}
|
||||
.form-control{display:block; width:100%; height:30px; padding: 10px; font-size:12px; line-height: 25px; border-radius:4px; transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;}
|
||||
textarea.form-control{ height: auto;}
|
||||
.input-list{ margin-bottom: 20px;}
|
||||
.input-list li{ padding: 10px 20px;}
|
||||
.input-list li input.form-control{ height: 40px;}
|
||||
|
||||
.hide,.visible-lg, .visible-md, .visible-sm, .visible-xs, .visible-mi{ display: none;}
|
||||
/* header */
|
||||
.stui-header{ margin: 30px 0 20px;}
|
||||
.stui-header__logo,.stui-header__menu{float:left; margin-left: 10px;}
|
||||
.stui-header__logo .logo{display:block; width:150px; height:50px; background:url(../img/logo.png) no-repeat; background-position:50% 50%;background-size:cover}
|
||||
.stui-header__menu{ position:relative; margin-top: 15px; margin-left:30px;}
|
||||
.stui-header__menu li{ float:left; margin-right: 30px}
|
||||
.stui-header__menu li a{ position: relative; font-size:18px; color: hsla(0,0%,100%,.87);}
|
||||
.stui-header__menu li a:hover,.stui-header__menu li.active a{ color: #fdf751;}
|
||||
.stui-header__menu li.active a:before{ content:" "; position:absolute; left: 30%; bottom: -10px; width: 40%; height: 3px; background-color: #fdf751; border-radius: 2px;}
|
||||
.stui_header__user{ float: right; margin-top: 15px; margin-right: 10px;}
|
||||
.stui_header__user > li{ position: relative; float: left; padding-bottom: 10px; margin-left: 30px;}
|
||||
.stui_header__user > li > a{ color: hsla(0,0%,100%,.87);}
|
||||
.stui_header__user > li > a:hover{ color: #fdf751;}
|
||||
.stui_header__user > li > a .iconfont{ font-size: 22px;}
|
||||
.stui_header__user > li > span{ font-size: 24px; color: #757575;}
|
||||
|
||||
/* dropdown */
|
||||
.dropdown{ display: none; position: absolute; z-index: 999; top: 100%; padding: 15px; border-radius: 2px; background-color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
|
||||
.dropdown:after{ content:" "; width:10px; height:10px; -webkit-transform:rotate(-45deg); -ms-transform:rotate(-45deg); transform:rotate(-45deg); position: absolute; top: -5px; right: 15px; background-color: #fff;}
|
||||
.dropdown.search { right: -10px;}
|
||||
.dropdown.search .item{ position:relative; width:200px;}
|
||||
.dropdown.search .item .form-control{ background-color: #f5f5f5;}
|
||||
.dropdown.search .item .submit{display:block;position:absolute;top:0;right:0;width:30px;height:30px;line-height:30px;text-align:center; background: none; border: 0;cursor: pointer;}
|
||||
.dropdown.search .item .submit .icon{font-size:14px;color:#999}
|
||||
.dropdown.search li{ padding: 8px 0; border-top: 1px solid #eee;}
|
||||
.dropdown.search li:first-child{ border-top: 0;}
|
||||
.dropdown.search li a{ display: block;}
|
||||
.dropdown.search li a:hover{ color: #ff6600;}
|
||||
.dropdown.search li a span{ color: #999;}
|
||||
.dropdown.type{ right: -10px; width: 240px; padding: 15px 7px 7px 15px;}
|
||||
.dropdown.type li{ float: left; width: 33.333333%; padding-right: 8px; padding-bottom: 8px;}
|
||||
.dropdown.type li a{ display: block; padding: 4px 0; border-radius: 2px; background-color: #f5f5f5; font-size: 12px; text-align: center;}
|
||||
.dropdown.type li a:hover,.dropdown.type li.active a{ background-color: #ff6600; color: #fff;}
|
||||
.dropdown.history{ right: -10px; width: 240px;}
|
||||
.dropdown.history .head h5{ margin: 0; padding-bottom: 10px;}
|
||||
.dropdown.history .head a{ color: red;}
|
||||
.dropdown.history li a{ display: block; padding: 8px 0; border-top: 1px solid #eee; color: #333;}
|
||||
.dropdown.history li a:hover{ color: #ff6600;}
|
||||
.dropdown.history li a span{ color: #999;}
|
||||
|
||||
/* screen */
|
||||
.stui-screen{ padding: 10px;}
|
||||
.stui-screen .head{ padding: 15px; border-radius: 2px; background-color: #333235;}
|
||||
.stui-screen .head .text,.stui-screen .head .all{ color: #999;}
|
||||
.stui-screen .head a{ color: #999;}
|
||||
.stui-screen .item{ display: block; background-color: #333235;}
|
||||
.stui-screen .item ul{ padding: 15px; border-top: 1px solid #434145;}
|
||||
.stui-screen .item ul li{ float: left;}
|
||||
.stui-screen .item ul li a{ display: inline-block; padding-left: 20px;}
|
||||
.stui-screen .item ul li a,.stui-screen .item ul li span{ color: #999;}
|
||||
.stui-screen .item ul li.active a,.stui-screen .item ul li a:hover{ color: #fdf751;}
|
||||
|
||||
|
||||
/* banner */
|
||||
.stui-banner__item{ position: relative; display: block; width: 100%;}
|
||||
.stui-banner .flickity-page-dots{ bottom: 30px;}
|
||||
.flickity-prev-next-button.next{ right: 0;}
|
||||
.flickity-prev-next-button.previous{ left: 0;}
|
||||
.stui-banner__pic{ display: block; position: relative;}
|
||||
|
||||
/* list */
|
||||
.stui-vodlist__head{ margin-top: 30px; padding: 0 10px;}
|
||||
.stui-vodlist__head h3,.stui-vodlist__head h3 a{ color: #fdf751;}
|
||||
.stui-vodlist__head p{ padding-left: 20px;}
|
||||
.stui-vodlist__head p a{ display: inline-block; margin-right: 20px;}
|
||||
.stui-vodlist li{ float: left; padding: 10px; width: 16.6666667%;}
|
||||
.stui-vodlist li.index{ width: 33.333333%;}
|
||||
.stui-vodlist li.like{ width: 50%; padding: 5px;}
|
||||
.stui-vodlist li.topic{ width: 25%;}
|
||||
.stui-vodlist__thumb{display: block; position: relative; padding-top: 150%; background: url(../img/load.gif) no-repeat; background-position: 50% 50%; background-size: cover;}
|
||||
.stui-vodlist__thumb.active{ padding-top: 60%; background: url(../img/load_w.gif) no-repeat; background-position: 50% 50%; background-size: cover;}
|
||||
.stui-vodlist__thumb .play{display: none; position: absolute; top: 0; z-index: 1; width: 100%; height: 100%; background: rgba(0,0,0,0.1) url(../img/play.png) center no-repeat;}
|
||||
.stui-vodlist__thumb:hover .play{ display: block;}
|
||||
.stui-vodlist__detail{ margin: 0; padding: 10px 15px; background-color: #1c1b1e;}
|
||||
.stui-vodlist__detail .title{ font-size: 14px; margin: 0; text-align: center;}
|
||||
.stui-vodlist__detail .title a{ color: #fff;}
|
||||
.stui-vodlist__detail .title a:hover{ color: #fdf751;}
|
||||
.stui-vodlist__detail .text{ margin-bottom: 0; font-size: 12px; color: #757575;}
|
||||
.stui-vodlist__detail.index{ padding: 5px 10px;}
|
||||
.stui-vodlist__detail.index .title { margin: 10px 0; font-size: 16px; text-align: left;}
|
||||
.stui-vodlist__detail.index .title .score{ font-family: Georgia,"Times New Roman",Times,serif;}
|
||||
.stui-vodlist__detail.index .title .iconfont{ color: #ff6600;}
|
||||
.stui-vodlist__detail.index .text{ margin-bottom: 8px; padding-left: 20px;}
|
||||
|
||||
/* content */
|
||||
.stui-content{ padding: 10px;}
|
||||
.stui-content__detail,.stui-content__thumb,.stui-content__side{display:table-cell;vertical-align:top}
|
||||
.stui-content__thumb .pic{ display: block; width: 220px;}
|
||||
.stui-content__thumb .pic img{ max-width: 100%;}
|
||||
.stui-content__side{ width: 240px; padding-top: 80px; text-align: center; background-color: #444;}
|
||||
.stui-content__detail{ padding: 20px; background-color: #1c1b1e;}
|
||||
.stui-content__detail .title{margin:0 0 10px; font-size: 18px; color: #fff;}
|
||||
.stui-content__detail .data{margin-bottom:10px}
|
||||
.stui-content__detail .desc{padding-left:42px; line-height: 25px;}
|
||||
.stui-content__detail .desc .left{margin-left:-42px}
|
||||
.stui-content__detail .play-btn{padding-left:42px;margin-top:20px}
|
||||
.stui-content__detail .play-btn a{ display: inline-block; padding: 6px 25px; border-radius: 5px; background-color: #fdf751; font-size: 12px; color: #333;}
|
||||
|
||||
/* player */
|
||||
.stui-player{ position: relative; z-index: 2; padding: 10px;}
|
||||
.stui-player__video{ background-color: #000;}
|
||||
.stui-player__left{ position: relative; float: left; width: 75%;}
|
||||
.stui-player__side{ position: relative; float: left; width: 25%; background-color: #333333;}
|
||||
.stui-player__side .tab { padding: 15px; border-bottom: 1px solid #434145;}
|
||||
.stui-player__side .tab li{ float: left; padding-right: 20px;}
|
||||
.stui-player__side .tab li a{ position: relative; font-size: 16px; color: #757575;}
|
||||
.stui-player__side .tab li.active a:before{ content:" "; position:absolute; left: 25%; bottom: -15px; width: 50%; height: 2px; background-color: #fdf751;}
|
||||
.stui-player__side .tab li.active a{ color: #fdf751;}
|
||||
.stui-player__side .item{ display: none; position: relative; padding: 15px 10px;}
|
||||
.stui-player__side .item.active{ display: block;}
|
||||
.stui-player__side .item .head{ position: relative; padding-bottom: 10px;}
|
||||
.stui-player__side .item .head h3{ margin: 0; color: #757575;}
|
||||
.stui-player__side .item .head .switch-line{ margin-top: 5px;}
|
||||
.stui-player__side .item .tab-top{ display: none; position: absolute; z-index: 999; top: 100%; right: 0; padding: 10px 15px; border-radius: 2px; background-color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
|
||||
.stui-player__side .item .tab-top:after{ content:" "; width:10px; height:10px; -webkit-transform:rotate(-45deg); -ms-transform:rotate(-45deg); transform:rotate(-45deg); position: absolute; top: -5px; right: 15px; background-color: #fff;}
|
||||
.stui-player__side .item .tab-top li{ line-height: 25px; border-bottom: 1px solid #eee; text-align: center;}
|
||||
.stui-player__side .item .tab-top li:last-child{ border-bottom: 0;}
|
||||
.stui-player__side .item .tab-top li a{ font-size: 12px;}
|
||||
.stui-player__side .item .tab-top li a:hover{ color: #ff6600;}
|
||||
.stui-player__side .cont{ display: none;}
|
||||
.stui-player__side .cont.active{ display: block;}
|
||||
.stui-player__detail{ padding: 20px; background-color: #1c1b1e;}
|
||||
.stui-player__detail .title{margin:0 0 10px; font-size: 18px; color: #fff;}
|
||||
.stui-player__detail .more{ float: right; padding-top: 10px;}
|
||||
.stui-player__detail .more a{ display: inline-block; padding: 6px 15px; margin-left: 10px; border-radius: 2px; background-color: #252527; color: #999;}
|
||||
.stui-player__detail .more a:hover{color: #fdf751;}
|
||||
.stui-player__detail .data{ color: #757575;}
|
||||
.stui-player__detail .data-more{ padding-top: 10px;}
|
||||
|
||||
/* playlist */
|
||||
.stui-play__list li{ float: left; width: 33.333333%; padding: 5px;}
|
||||
.stui-play__list li.down{ float: left; width: 33.333333%; padding: 5px;}
|
||||
.stui-play__list li a{ display: block; padding: 10px 5px 10px 5px; border-radius: 5px; text-align: center; background-color: #1c1b1e; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
.stui-play__list li a:hover{ color: #fdf751;}
|
||||
.stui-play__list li.active a{ background-color: #fdf751; color: #333;}
|
||||
|
||||
.stui-content__playlist{ padding-right: 10px;}
|
||||
.stui-content__playlist li{ float: left; margin-top: 10px; margin-left: 10px;}
|
||||
.stui-content__playlist li a{ display: inline-block; width:103px; text-align:center; padding: 10px 5px; background-color: #343434; color: #9f9f9f; border-radius: 5px;overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
.stui-content__playlist li.active a,.stui-content__playlist li a:hover{ background-color: #fdf751; color: #333;}
|
||||
|
||||
/* flickity */
|
||||
.flickity-enabled{position:relative;}
|
||||
.flickity-enabled:focus{outline:0}
|
||||
.flickity-viewport{overflow:hidden;position:relative;height:100%}
|
||||
.flickity-slider{position:absolute;width:100%;height:100%}
|
||||
.flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}
|
||||
.flickity-prev-next-button{position:absolute;top:50%;width:30px;height:60px;border:none; background-color: rgba(0,0,0,.6); cursor:pointer;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}
|
||||
.flickity-prev-next-button.previous{left:10px;border-radius:0 10px 10px 0}
|
||||
.flickity-prev-next-button.next{right:10px;border-radius:10px 0 0 10px}
|
||||
.flickity-prev-next-button:disabled{opacity:0;cursor:auto}
|
||||
.flickity-prev-next-button svg{position:absolute;left:20%;top:20%;width:60%;height:60%}
|
||||
.flickity-prev-next-button .arrow{fill:#fff}
|
||||
.flickity-prev-next-button.no-svg{color:#fff;font-size:18px}
|
||||
.flickity-page-dots{position:absolute;width:100%;bottom:20px;left:0;padding:0;margin:0;list-style:none;text-align:center;line-height:1}
|
||||
.flickity-page-dots .dot{display:inline-block;width:15px;height:3px;margin:0 5px;background:#f80;opacity:.25;cursor:pointer}
|
||||
.flickity-page-dots .dot.is-selected{opacity:1}
|
||||
.flickity-page{ padding-bottom: 15px; overflow: hidden;}
|
||||
.flickity-page .flickity-page-dots{ bottom: 0;}
|
||||
|
||||
|
||||
/* modal */
|
||||
.stui-modal{position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9999; display: none; overflow: hidden; -webkit-overflow-scrolling: touch; outline: 0;}
|
||||
.stui-modal__dialog{position: relative; width: 350px; margin: 140px auto; }
|
||||
.stui-modal__content{ position: relative; background-color: #fff; border-radius: 6px; outline: 0; box-shadow: 0 3px 9px rgba(0,0,0,.5);}
|
||||
.modal-open{ overflow: hidden;}
|
||||
.modal-backdrop{position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000;}
|
||||
.modal-backdrop.fade{ opacity: 0;}
|
||||
.modal-backdrop.fade.in{ opacity: .5;}
|
||||
|
||||
|
||||
/* carousel */
|
||||
.carousel{ position: relative; width: 100%; height:100%; overflow: hidden; white-space: nowrap;}
|
||||
.carousel [class^="col-"]{ float: none; display: inline-block;}
|
||||
.carousel .list{ padding: 0; margin-right: 20px;}
|
||||
.carousel .wide{ width: 100%; display: inline-block;}
|
||||
.carousel_center{ padding-bottom: 20px;}
|
||||
.carousel_center .list a{ position: relative;}
|
||||
.carousel_center .list a:before{ content: ""; position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,.6);}
|
||||
.carousel_center .list.is-selected a:before{ display: none;}
|
||||
|
||||
/* page */
|
||||
.stui-page__item{ margin: 20px 0 20px;}
|
||||
.stui-page__item li{ display: inline-block; padding: 0 5px;}
|
||||
.stui-page__item li a{ display: inline-block; padding: 6px 15px; border-radius: 4px; background-color: #252527; color: #757575;}
|
||||
.stui-page__item li.active a,.stui-page__item li.active span{ background-color: #e4bd18; color: #333;}
|
||||
.stui-page__item li a:hover{ color: #fdf751;}
|
||||
.stui-page__item li.num{ display: none;}
|
||||
.stui-page__all a{ position: absolute; top: 50%; margin-top: -40px; display: block; width: 80px; height: 80px; text-align: center; line-height: 80px;}
|
||||
.stui-page__all a .iconfont{ font-size: 50px; color: #757575;}
|
||||
.stui-page__all a:hover .iconfont{ color: #fff;}
|
||||
.stui-page__all a.left{ left: 0;}
|
||||
.stui-page__all a.right{ right: 0;}
|
||||
|
||||
/* link */
|
||||
.stui-link__text{ margin: 20px 0; text-align: center;}
|
||||
.stui-link__text li{ display: inline-block; margin-right: 20px; margin-bottom: 10px;}
|
||||
|
||||
/* embed */
|
||||
.embed-responsive{position:relative;display:block;overflow:hidden;padding:0;height:0}
|
||||
.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}
|
||||
.embed-responsive-16by9{padding-bottom:56.25%}
|
||||
.embed-responsive-4by3{padding-bottom:75%}
|
||||
|
||||
/* gbook */
|
||||
.stui-gbook{ padding: 10px;}
|
||||
.stui-gbook-form{ padding-bottom: 20px;}
|
||||
.stui-gbook-form .form-control{ width: 100%; padding: 10px; border: 1px solid #333; border-radius: 4px;}
|
||||
.stui-gbook-form textarea.form-control{ height: auto;}
|
||||
.stui-gbook-form li{ margin-top: 15px;}
|
||||
.stui-gbook-form li:first-child{ margin-top: 0;}
|
||||
.stui-gbook-form li .submit{ padding: 0 25px; height: 35px; line-height: 35px; border: 0; border-radius: 4px; cursor: pointer; background-color: #fdf751;}
|
||||
.stui-gbook__item{ padding: 10px 0; border-top: 1px dotted #333;}
|
||||
.stui-gbook__item .name{ color: #757575;}
|
||||
.stui-gbook__item .cont{ position: relative; margin: 10px 0; padding: 20px; border-radius: 2px; background-color: #1c1b1e;}
|
||||
.stui-gbook__item .cont:before{ content:" "; width:10px; height:10px; -webkit-transform:rotate(-45deg); -ms-transform:rotate(-45deg); transform:rotate(-45deg); border-width:1px 1px 0 0; position: absolute; top:-5px; left: 10px; border-style: solid; background-color: #1c1b1e; border-color: #1c1b1e;}
|
||||
.stui-gbook__item .cont p{ margin: 10px 0 0;}
|
||||
|
||||
@media (min-width:768px){
|
||||
.container{width:750px}
|
||||
}
|
||||
@media (min-width:992px){
|
||||
.container{width:920px}
|
||||
}
|
||||
@media (min-width:1200px){
|
||||
.container{width:1170px}
|
||||
}
|
||||
|
||||
@media (max-width:1200px){
|
||||
.stui-page__all,.stui-content__side{ display: none;}
|
||||
}
|
||||
|
||||
@media (max-width:1024px){
|
||||
|
||||
/* header */
|
||||
.stui-header{ margin-top: 20px;}
|
||||
.stui-header__menu{ display: none;}
|
||||
|
||||
/* screen */
|
||||
.stui-screen .item ul{ width:100%; width:100%; white-space:nowrap; overflow-y:hidden;overflow-x:scroll; -webkit-overflow-scrolling:touch;}
|
||||
.stui-screen .item ul li{ float: none; display: inline-block; margin-bottom: 0;}
|
||||
.stui-screen .item ul li a{ padding-left: 10px;}
|
||||
|
||||
/* list */
|
||||
.stui-vodlist li{ width: 25%;}
|
||||
.stui-vodlist li.index{ width: 50%;}
|
||||
.stui-vodlist li.topic{ width: 50%;}
|
||||
|
||||
/* player */
|
||||
.stui-player__left{ float: none; width: 100%;}
|
||||
.stui-player__side{ float: none; width: 100%; background-color: #333333;}
|
||||
.stui-player__detail .more a.menu-switch{ display: none;}
|
||||
.stui-player__detail .title{ margin: 0 0 5px;}
|
||||
#play-box .item{ min-height: 200px;}
|
||||
|
||||
/* palylist */
|
||||
.stui-play__list li{ width: 20%;}
|
||||
}
|
||||
@media (max-width:767px){
|
||||
|
||||
/* more */
|
||||
.stui-pannel__bd{ padding: 0 5px;}
|
||||
.play-bg{ display: none;}
|
||||
|
||||
/* header */
|
||||
.stui-header{ margin-bottom: 10px;}
|
||||
.stui-header__logo .logo{width:127px;height:30px;background:url(../img/logo.png) no-repeat;background-position:50% 50%;background-size:cover}
|
||||
.stui_header__user{ float: right; margin-top: 5px; margin-right: 10px;}
|
||||
.stui_header__user > li{ position: relative; float: left; padding-bottom: 10px; margin-left: 15px;}
|
||||
.stui_header__user > li > a .iconfont{ font-size: 22px;}
|
||||
.stui_header__user > li > span{ font-size: 18px; color: #757575;}
|
||||
|
||||
/* dropdown */
|
||||
.dropdown.search,.dropdown.type{ right: -60px;}
|
||||
.dropdown.search:after,.dropdown.type:after{ right: 65px;}
|
||||
|
||||
/* screen */
|
||||
.stui-screen{ padding: 5px;}
|
||||
.stui-screen .head{ padding: 10px;}
|
||||
.stui-screen .head .all{ display: none;}
|
||||
.stui-screen .item ul{ padding: 10px;}
|
||||
|
||||
/* list */
|
||||
.stui-vodlist li{ padding: 5px; width: 33.333333%;}
|
||||
.stui-vodlist li.index{ width: 100%;}
|
||||
.stui-vodlist li.like{ width: 33.333333%;}
|
||||
.stui-vodlist__thumb.active{ padding-top: 50%;}
|
||||
.stui-vodlist__detail{ padding: 5px 10px;}
|
||||
.stui-vodlist__detail .title{ font-size: 12px;}
|
||||
.stui-vodlist__detail.index .title{ margin-bottom: 5px;}
|
||||
.stui-vodlist__head p{ display: none;}
|
||||
|
||||
/* content */
|
||||
.stui-content{ padding: 0 5px;}
|
||||
.stui-content__detail,.stui-content__thumb{/* display: block; */}
|
||||
.stui-content__thumb{ position: absolute; right: 10px;}
|
||||
.stui-content__thumb .pic{ display: block; width: 110px;}
|
||||
.stui-content__thumb .pic img{ max-width: 100%; border-radius: 2px;height:155px}
|
||||
.stui-content__detail{ padding: 20px 10px;}
|
||||
.stui-content__detail .title{ margin: 0 0 10px;}
|
||||
|
||||
/* player */
|
||||
.stui-player{ padding: 0 5px;}
|
||||
.stui-player__detail{ padding: 10px;}
|
||||
.stui-player__detail .more{float: none; margin:-10px -10px 10px -10px; padding-bottom: 10px; text-align: center; background-color: #333;}
|
||||
.stui-player__detail .more a{ margin-left: 0; margin-right: 10px;}
|
||||
|
||||
/* playlist */
|
||||
|
||||
/* playlist */
|
||||
.stui-play__list li{ width: 33.333333%;}
|
||||
.stui-content__playlist{ padding-right: 10px;}
|
||||
.stui-content__playlist li{ width: 33.333333%; margin: 0; padding-top: 10px; padding-left: 10px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
.stui-content__playlist li a{ display: block; width:auto; text-align: center; padding: 10px 5px 10px 5px;}
|
||||
|
||||
/* page */
|
||||
.stui-page__item li{ display: block; float: left; width: 20%; margin: 0; padding: 0;}
|
||||
.stui-page__item li.num{ display: block;}
|
||||
|
||||
/* link */
|
||||
.stui-link__text{ display: none;}
|
||||
.hide,.visible-lg, .visible-md, .visible-sm, .visible-xs, .visible-mi{ display: block;}
|
||||
/* gbook */
|
||||
.stui-gbook{ padding: 10px;}
|
||||
.stui-gbook__item .cont{ padding: 10px;}
|
||||
.hidden-xs{ display: none !important;}
|
||||
}
|
||||
|
||||
.STYLE1 {
|
||||
color: #fdf751;
|
||||
font-weight: bold;
|
||||
}
|
||||
.STYLE2 {
|
||||
color: #f00;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.fixed_right_bar {
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
right: 10px;
|
||||
z-index: 99999;
|
||||
color: #fff;
|
||||
padding: 16px 0;
|
||||
width: 40px;
|
||||
opacity: .98;
|
||||
text-align: center;
|
||||
background: rgba(51,51,51,.6);
|
||||
border-radius: 20px;
|
||||
box-shadow: 0 0 12px 0 rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
|
||||
.fixed_right_bar div{
|
||||
margin: 10px auto 0;
|
||||
}
|
||||
|
||||
.fixed_right_bar div img{
|
||||
width:24px;
|
||||
filter: brightness(3);
|
||||
}
|
||||
.icon_service {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.icon_svg_help {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
.ant-back-top{display:none;}
|
||||
.fixed_right_bar .ant-back-top {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
height: 20px;
|
||||
width: 30px;
|
||||
line-height: 10px;
|
||||
margin: 10px auto 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.split-line{display: inline-block; margin-left: 12px; margin-right: 12px; width: 1px; height: 14px; vertical-align: -2px;}
|
||||
.top-line,.top-line-dot,.bottom-line,.bottom-line-dot{ position: relative;}
|
||||
.top-line:before,.top-line-dot:before{content: " "; position: absolute; left: 0; top: 0; right: 0; width: 100%; height: 1px;}
|
||||
.bottom-line:after,.bottom-line-dot:before{content: " "; position: absolute; left: 0; bottom: 0; right: 0; width: 100%; height: 1px;}
|
||||
|
||||
/* btn */
|
||||
.btn{display: inline-block; padding: 6px 30px; font-size: 12px; border-radius: 4px;}
|
||||
.btn .icon{ font-size: 12px;}
|
||||
.btn-min{ padding: 4px 15px;}
|
||||
.btn-lg{ padding: 12px 30px;}
|
||||
.btn-block{ display: block; width: 100%; text-align: center;}
|
||||
.btn.disabled{cursor: not-allowed;}
|
||||
|
||||
/* pannel-head */
|
||||
.stui-pannel__head{ position: relative; height: 30px;}
|
||||
.stui-pannel__head.active{height: 40px;}
|
||||
.stui-pannel__head .title{float: left; margin:0; padding-right: 10px; line-height: 24px;font-weight:700;}
|
||||
.stui-pannel__head .title img{ display: inline-block; width: 24px; height: 24px; margin-right: 10px; vertical-align: -5px;}
|
||||
.stui-pannel__head .more{ line-height: 30px;}
|
||||
|
||||
|
||||
.bottomplay{
|
||||
position: relative;
|
||||
min-height: 20px;
|
||||
padding: 10px 0 10px 0;
|
||||
border-bottom: 2px solid #fdf751;
|
||||
}
|
||||
10
templates/cms/mxpro/detailContent.html
Normal file
10
templates/cms/mxpro/detailContent.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
434
templates/cms/mxpro/homeContent.html
Normal file
434
templates/cms/mxpro/homeContent.html
Normal file
File diff suppressed because one or more lines are too long
BIN
templates/cms/mxpro/img/back.png
Normal file
BIN
templates/cms/mxpro/img/back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
templates/cms/mxpro/img/help.png
Normal file
BIN
templates/cms/mxpro/img/help.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
BIN
templates/cms/mxpro/img/logo.png
Normal file
BIN
templates/cms/mxpro/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
BIN
templates/cms/mxpro/img/show.png
Normal file
BIN
templates/cms/mxpro/img/show.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
770
templates/cms/mxpro/js/home.js
Normal file
770
templates/cms/mxpro/js/home.js
Normal file
@ -0,0 +1,770 @@
|
||||
|
||||
String.prototype.replaceAll = function(s1,s2){ return this.replace(new RegExp(s1,"gm"),s2); }
|
||||
String.prototype.trim=function(){ return this.replace(/(^\s*)|(\s*$)/g, ""); }
|
||||
var base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var base64DecodeChars=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);function base64encode(str){var out,i,len;var c1,c2,c3;len=str.length;i=0;out="";while(i<len){c1=str.charCodeAt(i++)&0xff;if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt((c1&0x3)<<4);out+="==";break}c2=str.charCodeAt(i++);if(i==len){out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt((c2&0xF)<<2);out+="=";break}c3=str.charCodeAt(i++);out+=base64EncodeChars.charAt(c1>>2);out+=base64EncodeChars.charAt(((c1&0x3)<<4)|((c2&0xF0)>>4));out+=base64EncodeChars.charAt(((c2&0xF)<<2)|((c3&0xC0)>>6));out+=base64EncodeChars.charAt(c3&0x3F)}return out}function base64decode(str){var c1,c2,c3,c4;var i,len,out;len=str.length;i=0;out="";while(i<len){do{c1=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c1==-1);if(c1==-1)break;do{c2=base64DecodeChars[str.charCodeAt(i++)&0xff]}while(i<len&&c2==-1);if(c2==-1)break;out+=String.fromCharCode((c1<<2)|((c2&0x30)>>4));do{c3=str.charCodeAt(i++)&0xff;if(c3==61)return out;c3=base64DecodeChars[c3]}while(i<len&&c3==-1);if(c3==-1)break;out+=String.fromCharCode(((c2&0XF)<<4)|((c3&0x3C)>>2));do{c4=str.charCodeAt(i++)&0xff;if(c4==61)return out;c4=base64DecodeChars[c4]}while(i<len&&c4==-1);if(c4==-1)break;out+=String.fromCharCode(((c3&0x03)<<6)|c4)}return out}function utf16to8(str){var out,i,len,c;out="";len=str.length;for(i=0;i<len;i++){c=str.charCodeAt(i);if((c>=0x0001)&&(c<=0x007F)){out+=str.charAt(i)}else if(c>0x07FF){out+=String.fromCharCode(0xE0|((c>>12)&0x0F));out+=String.fromCharCode(0x80|((c>>6)&0x3F));out+=String.fromCharCode(0x80|((c>>0)&0x3F))}else{out+=String.fromCharCode(0xC0|((c>>6)&0x1F));out+=String.fromCharCode(0x80|((c>>0)&0x3F))}}return out}function utf8to16(str){var out,i,len,c;var char2,char3;out="";len=str.length;i=0;while(i<len){c=str.charCodeAt(i++);switch(c>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:out+=str.charAt(i-1);break;case 12:case 13:char2=str.charCodeAt(i++);out+=String.fromCharCode(((c&0x1F)<<6)|(char2&0x3F));break;case 14:char2=str.charCodeAt(i++);char3=str.charCodeAt(i++);out+=String.fromCharCode(((c&0x0F)<<12)|((char2&0x3F)<<6)|((char3&0x3F)<<0));break}}return out}
|
||||
|
||||
var MAC={
|
||||
'Url': document.URL,
|
||||
'Title': document.title,
|
||||
'UserAgent' : function(){
|
||||
var ua = navigator.userAgent;//navigator.appVersion
|
||||
return {
|
||||
'mobile': !!ua.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
|
||||
'ios': !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
|
||||
'android': ua.indexOf('Android') > -1 || ua.indexOf('Linux') > -1, //android终端或者uc浏览器
|
||||
'iPhone': ua.indexOf('iPhone') > -1 || ua.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
|
||||
'iPad': ua.indexOf('iPad') > -1, //是否iPad
|
||||
'trident': ua.indexOf('Trident') > -1, //IE内核
|
||||
'presto': ua.indexOf('Presto') > -1, //opera内核
|
||||
'webKit': ua.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
|
||||
'gecko': ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') == -1, //火狐内核
|
||||
'weixin': ua.indexOf('MicroMessenger') > -1 //是否微信 ua.match(/MicroMessenger/i) == "micromessenger",
|
||||
};
|
||||
}(),
|
||||
'Copy': function(s){
|
||||
if (window.clipboardData){ window.clipboardData.setData("Text",s); }
|
||||
else{
|
||||
if( $("#mac_flash_copy").get(0) ==undefined ){ $('<div id="mac_flash_copy"></div>'); } else {$('#mac_flash_copy').html(''); }
|
||||
$('#mac_flash_copy').html('<embed src='+SitePath+'"images/_clipboard.swf" FlashVars="clipboard='+escape(s)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>');
|
||||
}
|
||||
MAC.Pop.Msg(100,20,'复制成功',1000);
|
||||
},
|
||||
'Home': function(o,u){
|
||||
try{
|
||||
o.style.behavior='url(#default#homepage)'; o.setHomePage(u);
|
||||
}
|
||||
catch(e){
|
||||
if(window.netscape){
|
||||
try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");}
|
||||
catch(e){ MAC.Pop.Msg(150,40,'此操作被浏览器拒绝!请手动设置',1000); }
|
||||
var moz = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
|
||||
moz.setCharPref('browser.startup.homepage',u);
|
||||
}
|
||||
}
|
||||
},
|
||||
'Fav': function(u,s){
|
||||
try{ window.external.addFavorite(u, s);}
|
||||
catch (e){
|
||||
try{window.sidebar.addPanel(s, u, "");}catch (e){ MAC.Pop.Msg(150,40,'加入收藏出错,请使用键盘Ctrl+D进行添加',1000); }
|
||||
}
|
||||
},
|
||||
'Open': function(u,w,h){
|
||||
window.open(u,'macopen1','toolbars=0, scrollbars=0, location=0, statusbars=0,menubars=0,resizable=yes,width='+w+',height='+h+'');
|
||||
},
|
||||
'Cookie': {
|
||||
'Set': function(name,value,days){
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime() + days*24*60*60*1000);
|
||||
var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
|
||||
document.cookie=name+"="+encodeURIComponent(value)+";path=/;expires="+exp.toUTCString();
|
||||
},
|
||||
'Get': function(name){
|
||||
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
|
||||
if(arr != null){ return decodeURIComponent(arr[2]); return null; }
|
||||
},
|
||||
'Del': function(name){
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime()-1);
|
||||
var cval = this.Get(name);
|
||||
if(cval != null){ document.cookie = name+"="+encodeURIComponent(cval)+";path=/;expires="+exp.toUTCString(); }
|
||||
}
|
||||
},
|
||||
'GoBack':function(){
|
||||
var ldghost=document.domain;
|
||||
if(document.referrer.indexOf(ldghost)>0) {
|
||||
history.back();
|
||||
}
|
||||
else{
|
||||
window.location ="http://"+ldghost;
|
||||
}
|
||||
},
|
||||
'Adaptive':function(){
|
||||
if(maccms.mob_status=='1'&& maccms.url != maccms.wapurl){
|
||||
if(document.domain ==maccms.url && MAC.UserAgent.mobile){
|
||||
location.href = location.href.replace(maccms.url,maccms.wapurl);
|
||||
}
|
||||
else if(document.domain ==maccms.wapurl && !MAC.UserAgent.mobile){
|
||||
location.href = location.href.replace(maccms.wapurl,maccms.url);
|
||||
}
|
||||
}
|
||||
},
|
||||
'CheckBox':{
|
||||
'All':function(n){
|
||||
$("input[name='"+n+"']").each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
},
|
||||
'Other':function(n){
|
||||
$("input[name='"+n+"']").each(function() {
|
||||
this.checked = !this.checked;
|
||||
});
|
||||
},
|
||||
'Count':function(n){
|
||||
var res=0;
|
||||
$("input[name='"+n+"']").each(function() {
|
||||
if(this.checked){ res++; }
|
||||
});
|
||||
return res;
|
||||
},
|
||||
'Ids':function(n){
|
||||
var res=[];
|
||||
$("input[name='"+n+"']").each(function() {
|
||||
if(this.checked){ res.push(this.value); }
|
||||
});
|
||||
return res.join(",");
|
||||
}
|
||||
},
|
||||
'Qrcode':function(){
|
||||
$('.mac_qrcode').attr('src','//api.maccms.com/qrcode/?w=150&h=150&url=' + MAC.Url);
|
||||
},
|
||||
'Image':{
|
||||
'Lazyload':{
|
||||
'Show': function(){
|
||||
try { $("img.lazy").lazyload(); }catch(e){};
|
||||
},
|
||||
'Box': function($id){
|
||||
$("img.lazy").lazyload({
|
||||
container: $("#"+$id)
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
'Verify': {
|
||||
'Init': function(){
|
||||
MAC.Verify.Focus();
|
||||
MAC.Verify.Click();
|
||||
},
|
||||
'Focus': function(){//验证码框焦点
|
||||
$('body').on("focus", ".mac_verify", function(){
|
||||
$(this).removeClass('mac_verify').after(MAC.Verify.Show());
|
||||
$(this).unbind();
|
||||
});
|
||||
},
|
||||
'Click': function(){//点击刷新
|
||||
$('body').on('click', 'img.mac_verify_img', function(){
|
||||
$(this).attr('src', maccms.path +'/index.php/verify/index.html?');
|
||||
});
|
||||
},
|
||||
'Refresh':function(){
|
||||
$('.mac_verify_img').attr('src', maccms.path +'/index.php/verify/index.html?');
|
||||
},
|
||||
'Show':function(){
|
||||
return '<img class="mac_verify_img" src="'+ maccms.path +'/index.php/verify/index.html?" title="看不清楚? 换一张!">';
|
||||
}
|
||||
},
|
||||
'PageGo':{
|
||||
'Init':function() {
|
||||
$('.mac_page_go').click(function () {
|
||||
var that =$(this);
|
||||
var url = that.attr('data-url');
|
||||
var total = that.attr('data-total');
|
||||
var sp = that.attr('data-sp');
|
||||
var page= $('#page').val();
|
||||
|
||||
if(page>0&&(page<=total)){
|
||||
url=url.replace(sp + 'PAGELINK',page).replace('PAGELINK',page);
|
||||
location.href=url;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
},
|
||||
'Hits': {
|
||||
'Init':function() {
|
||||
if($('.mac_hits').length==0){
|
||||
return;
|
||||
}
|
||||
var $that = $(".mac_hits");
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: maccms.path + '/index.php/ajax/hits?mid='+$that.attr("data-mid")+'&id='+$that.attr("data-id")+'&type=update',
|
||||
timeout: 5000,
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
|
||||
},
|
||||
success: function (json) {
|
||||
if (json.code == 1) {
|
||||
$(".mac_hits").each(function(i){
|
||||
$type = $(".mac_hits").eq(i).attr('data-type');
|
||||
if($type != 'insert'){
|
||||
$('.'+$type).html(eval('(json.data.' + $type + ')'));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
'Score': {
|
||||
'Init':function(){
|
||||
if($('.mac_score').length==0){
|
||||
return;
|
||||
}
|
||||
$('body').on('click', '.score_btn', function(e){
|
||||
MAC.Score.Submit();
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: maccms.path+'/index.php/ajax/score?mid='+ $('.mac_score').attr('data-mid') +'&id=' +$('.mac_score').attr('data-id'),
|
||||
timeout: 5000,
|
||||
error: function(){
|
||||
$(".mac_score").html('评分加载失败');
|
||||
},
|
||||
success: function($r){
|
||||
MAC.Score.View($r);
|
||||
}
|
||||
});
|
||||
},
|
||||
'Submit':function(){
|
||||
var $s = $('.mac_score').find("input[name='score']").val();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: maccms.path+'/index.php/ajax/score?mid='+$('.mac_score').attr('data-mid')+'&id='+$('.mac_score').attr('data-id') + '&score='+ $s,
|
||||
timeout: 5000,
|
||||
error: function(){
|
||||
|
||||
},
|
||||
success: function($r){
|
||||
MAC.Pop.Msg(100,20,$r.msg,1000);
|
||||
if($r.code==1){
|
||||
MAC.Score.View($r);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
'View':function($r){
|
||||
$(".rating"+Math.floor($r.data.score)).attr('checked',true);
|
||||
$(".score_num").text( $r.data.score_num );
|
||||
$(".score_all").text( $r.data.score_all );
|
||||
$(".score_pjf").text( $r.data.score );
|
||||
}
|
||||
},
|
||||
'Star': {
|
||||
'Init':function(){
|
||||
if($('.mac_star').length==0){
|
||||
return;
|
||||
}
|
||||
|
||||
$('.mac_star').raty({
|
||||
starType: 'i',
|
||||
number: 5,
|
||||
numberMax : 5,
|
||||
half: true,
|
||||
score : function(){
|
||||
return $(this).attr('data-score');
|
||||
},
|
||||
click: function(score, evt) {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: maccms.path+'/index.php/ajax/score?mid='+$('.mac_star').attr('data-mid')+'&id='+$('.mac_star').attr('data-id')+'&score='+(score*2),
|
||||
timeout: 5000,
|
||||
dataType:'json',
|
||||
error: function(){
|
||||
$('.star_box').attr('title', '网络异常!');
|
||||
},
|
||||
success: function(json){
|
||||
if(json.status == 1){
|
||||
$('.star_tips').html(json.data.score);
|
||||
}else{
|
||||
$('.star_box').attr('title', json.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'Digg': {
|
||||
'Init':function(){
|
||||
$('body').on('click', '.digg_link', function(e){
|
||||
var $that = $(this);
|
||||
if($that.attr("data-id")){
|
||||
$.ajax({
|
||||
url: maccms.path + '/index.php/ajax/digg.html?mid='+$that.attr("data-mid")+'&id='+$that.attr("data-id")+'&type='+$that.attr("data-type"),
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function($r){
|
||||
$that.addClass('disabled');
|
||||
if($r.code == 1){
|
||||
if($that.attr("data-type")=='up'){
|
||||
$that.find('.digg_num').html($r.data.up);
|
||||
}
|
||||
else{
|
||||
$that.find('.digg_num').html($r.data.down);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$that.attr('title', $r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'Gbook':{
|
||||
'Login':0,
|
||||
'Verify':0,
|
||||
'Init':function(){
|
||||
$('body').on('keyup', '.gbook_content', function(e){
|
||||
MAC.Remaining($(this),200,'.gbook_remaining')
|
||||
});
|
||||
$('body').on('focus', '.gbook_content', function(e){
|
||||
if(MAC.Gbook.Login==1 && MAC.User.IsLogin!=1){
|
||||
MAC.User.Login();
|
||||
}
|
||||
});
|
||||
$('body').on('click', '.gbook_submit', function(e){
|
||||
MAC.Gbook.Submit();
|
||||
});
|
||||
},
|
||||
'Show':function($page){
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: maccms.path+'/index.php/gbook/index?page='+$page,
|
||||
timeout: 3000,
|
||||
error: function(){
|
||||
$(".mac_gbook_box").html('留言加载失败,请刷新...');
|
||||
},
|
||||
success:function($html){
|
||||
$(".mac_gbook_box").html($html);
|
||||
}
|
||||
});
|
||||
},
|
||||
'Submit':function(){
|
||||
if($(".gbook_content").val() == ''){
|
||||
alert("请输入留言内容");
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: maccms.path + '/index.php/gbook/saveData',
|
||||
data: $('.gbook_form').serialize(),
|
||||
success:function($r){
|
||||
alert($r.msg);
|
||||
if($r.code == 1){
|
||||
location.reload();
|
||||
}
|
||||
else{
|
||||
if(MAC.Gbook.Verify==1){
|
||||
MAC.Verify.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
'Report':function(name){
|
||||
MAC.Pop.Show('#modal-seport',maccms.path+'/index.php/gbook/report?name=' + encodeURIComponent(name),function($r){
|
||||
$('body').on('click', '#gbook_submit', function(e){
|
||||
MAC.Gbook.Submit();
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
'Search':{
|
||||
'Init':function(){
|
||||
$('.mac_search').click(function(){
|
||||
var that=$(this);
|
||||
var url = that.attr('data-href') ? that.attr('data-href') : maccms.path + '/index.php/vod/search.html';
|
||||
location.href = url + '?wd='+ encodeURIComponent($("#wd").val());
|
||||
});
|
||||
},
|
||||
'Submit':function(){
|
||||
|
||||
return false;
|
||||
}
|
||||
},
|
||||
'Suggest':{
|
||||
'Init':function($obj,$mid,$jumpurl){
|
||||
try {
|
||||
$($obj).autocomplete(maccms.path + '/index.php/ajax/suggest?mid=' + $mid, {
|
||||
inputClass: "mac_input",
|
||||
resultsClass: "mac_results",
|
||||
loadingClass: "mac_loading",
|
||||
width: 175, scrollHeight: 300, minChars: 1, matchSubset: 1,
|
||||
cacheLength: 10, multiple: false, matchContains: true, autoFill: false,
|
||||
dataType: "json",
|
||||
parse: function ($r) {
|
||||
if ($r.code == 1) {
|
||||
var parsed = [];
|
||||
$.each($r['list'], function (index, row) {
|
||||
row.url = $r.url;
|
||||
parsed[index] = {
|
||||
data: row
|
||||
};
|
||||
});
|
||||
return parsed;
|
||||
} else {
|
||||
return {data: ''};
|
||||
}
|
||||
},
|
||||
formatItem: function (row, i, max) {
|
||||
return row.name;
|
||||
},
|
||||
formatResult: function (row, i, max) {
|
||||
return row.text;
|
||||
}
|
||||
}).result(function (event, data, formatted) {
|
||||
$($obj).val(data.name);
|
||||
location.href = data.url.replace('mac_wd', encodeURIComponent(data.name));
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
}
|
||||
},
|
||||
'Ulog':{
|
||||
'Init':function(){
|
||||
MAC.Ulog.Set();
|
||||
MAC.Ulog.Click();
|
||||
|
||||
},
|
||||
'Get':function(){
|
||||
$.ajax({
|
||||
url: maccms.path+'/index.php/user/ajax_ulog/?ac=list',
|
||||
type:'GET',
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function($r){
|
||||
if($r.code == 1){
|
||||
$.each($r['list'],function(index,row){
|
||||
alert(row.ulog_id);
|
||||
});
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
'Set':function(){
|
||||
if($(".mac_ulog_set").attr('data-mid')){
|
||||
var $that = $(".mac_ulog_set");
|
||||
$.get(maccms.path+'/index.php/user/ajax_ulog/?ac=set&mid='+$that.attr("data-mid")+'&id='+$that.attr("data-id")+'&sid='+$that.attr("data-sid")+'&nid='+$that.attr("data-nid")+'&type='+$that.attr("data-type"));
|
||||
}
|
||||
},
|
||||
'Click':function(){
|
||||
$('body').on('click', 'a.mac_ulog', function(e){
|
||||
//是否需要验证登录
|
||||
if(MAC.User.IsLogin == 0){
|
||||
MAC.User.Login();
|
||||
return;
|
||||
}
|
||||
|
||||
var $that = $(this);
|
||||
if($that.attr("data-id")){
|
||||
$.ajax({
|
||||
url: maccms.path+'/index.php/user/ajax_ulog/?ac=set&mid='+$that.attr("data-mid")+'&id='+$that.attr("data-id")+'&type='+$that.attr("data-type"),
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function($r){
|
||||
alert($r.msg);
|
||||
if($r.code == 1){
|
||||
$that.addClass('disabled');
|
||||
}else{
|
||||
$that.attr('title', $r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'User':{
|
||||
'BoxShow':0,
|
||||
'IsLogin':0,
|
||||
'UserId':'',
|
||||
'UserName':'',
|
||||
'GroupId':'',
|
||||
'GroupName':'',
|
||||
'Portrait':'',
|
||||
'Init':function(){
|
||||
if($('.mac_user').length >0){
|
||||
$('body').on('click', '.mac_user', function(e){
|
||||
MAC.User.Login();
|
||||
});
|
||||
}
|
||||
|
||||
if(MAC.Cookie.Get('user_id') !=undefined && MAC.Cookie.Get('user_id')!=''){
|
||||
var url = maccms.path + '/index.php/user';
|
||||
MAC.User.UserId = MAC.Cookie.Get('user_id');
|
||||
MAC.User.UserName = MAC.Cookie.Get('user_name');
|
||||
MAC.User.GroupId = MAC.Cookie.Get('group_id');
|
||||
MAC.User.GroupName = MAC.Cookie.Get('group_name');
|
||||
MAC.User.Portrait = MAC.Cookie.Get('user_portrait');
|
||||
MAC.User.IsLogin = 1;
|
||||
|
||||
$('.mac_user').removeClass('mac_user').attr('href',url);
|
||||
|
||||
$('.user_name').show().find('.name').text(MAC.User.UserName);
|
||||
|
||||
$('.user_url').show().attr('href',url);
|
||||
|
||||
$('.user_img').show().attr('src',MAC.User.Portrait);
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
'CheckLogin':function(){
|
||||
if(MAC.User.IsLogin == 0){
|
||||
MAC.User.Login();
|
||||
}
|
||||
},
|
||||
'Login':function(){
|
||||
var ac='ajax_login';
|
||||
if(MAC.Cookie.Get('user_id') !=undefined && MAC.Cookie.Get('user_id')!=''){
|
||||
ac= 'ajax_info';
|
||||
}
|
||||
MAC.Pop.Show('#modal-login',maccms.path+'/index.php/user/'+ac,function($r){
|
||||
$('body').on('click', '#login_form_submit', function(e){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: maccms.path + '/index.php/user/login',
|
||||
data: $('.mac_login_form').serialize(),
|
||||
success:function($r){
|
||||
if($r.code == 1){
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
'Logout':function(){
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: maccms.path + '/index.php/user/logout',
|
||||
success:function($r){
|
||||
MAC.Pop.Msg(100,20,$r.msg,1000);
|
||||
if($r.code == 1){
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
'PopedomCallBack':function(trysee,h) {
|
||||
window.setTimeout(function(){
|
||||
$(window.frames["player_if"].document).find(".MacPlayer").html(h);
|
||||
},1000*60*trysee);
|
||||
},
|
||||
'BuyPopedom':function(o){
|
||||
var $that = $(o);
|
||||
if($that.attr("data-id")){
|
||||
if (confirm('您确认购买此条数据播放权限吗?')) {
|
||||
$.ajax({
|
||||
url: maccms.path + '/index.php/user/ajax_buy_popedom.html?id=' + $that.attr("data-id") + '&sid=' + $that.attr("data-sid") + '&nid=' + $that.attr("data-nid") + '&type=' + $that.attr("data-type"),
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function ($r) {
|
||||
$that.addClass('disabled');
|
||||
MAC.Pop.Msg(300, 50, $r.msg, 1000);
|
||||
if ($r.code == 1) {
|
||||
top.location.reload();
|
||||
}
|
||||
},
|
||||
complete: function () {
|
||||
$that.removeClass('disabled');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'Pop':{
|
||||
'Show':function($modalid,$url,$callback) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: $url,
|
||||
timeout: 3000,
|
||||
error: function(){
|
||||
$('body').append(alert("加载失败,请刷新"));
|
||||
},
|
||||
success:function($r){
|
||||
$('body').append($r);
|
||||
$($modalid).modal('show');
|
||||
$callback($r);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'AdsWrap':function(w,h,n){
|
||||
document.writeln('<img width="'+w+'" height="'+h+'" alt="'+n+'" style="background-color: #CCCCCC" />');
|
||||
},
|
||||
'Css':function($url){
|
||||
$("<link>").attr({ rel: "stylesheet",type: "text/css",href: $url}).appendTo("head");
|
||||
},
|
||||
'Js':function($url){
|
||||
$.getScript($url, function(response, status) {
|
||||
|
||||
});
|
||||
},
|
||||
'Desktop':function(s){
|
||||
location.href= maccms.path + '/index.php/ajax/desktop?name='+encodeURI(s)+'&url=' + encodeURI(location.href);
|
||||
},
|
||||
'Timming':function(){
|
||||
|
||||
},
|
||||
'Error':function(tab,id,name){
|
||||
|
||||
},
|
||||
'AddEm':function(obj,i){
|
||||
var oldtext = $(obj).val();
|
||||
$(obj).val( oldtext + '[em:' + i +']' );
|
||||
},
|
||||
'Remaining':function(obj,len,show){
|
||||
var count = len - $(obj).val().length;
|
||||
if(count < 0){
|
||||
count = 0;
|
||||
$(obj).val($(obj).val().substr(0,200));
|
||||
}
|
||||
$(show).text(count);
|
||||
},
|
||||
'Comment':{
|
||||
'Login':0,
|
||||
'Verify':0,
|
||||
'Init':function(){
|
||||
|
||||
$('body').on('click', '.comment_face_box img', function(e){
|
||||
var obj = $(this).parent().parent().parent().find('.comment_content');
|
||||
MAC.AddEm(obj,$(this).attr('data-id'));
|
||||
});
|
||||
$('body').on('click', '.comment_face_panel', function(e){
|
||||
// $('.comment_face_box').toggle();
|
||||
$(this).parent().find('.comment_face_box').toggle();
|
||||
});
|
||||
$('body').on('keyup', '.comment_content', function(e){
|
||||
var obj = $(this).parent().parent().parent().parent().find('.comment_remaining');
|
||||
MAC.Remaining($(this),200,obj)
|
||||
});
|
||||
$('body').on('focus', '.comment_content', function(e){
|
||||
if(MAC.Comment.Login==1 && MAC.User.IsLogin!=1){
|
||||
MAC.User.Login();
|
||||
}
|
||||
});
|
||||
|
||||
$('body').on('click', '.comment_report', function(e){
|
||||
var $that = $(this);
|
||||
if($(this).attr("data-id")){
|
||||
$.ajax({
|
||||
url: maccms.path + '/index.php/comment/report.html?id='+$that.attr("data-id"),
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function($r){
|
||||
$that.addClass('disabled');
|
||||
MAC.Pop.Msg(100,20,$r.msg,1000);
|
||||
if($r.code == 1){
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('body').on('click', '.comment_reply', function(e){
|
||||
var $that = $(this);
|
||||
if($that.attr("data-id")){
|
||||
var str = $that.html();
|
||||
$('.comment_reply_form').remove();
|
||||
if (str == '取消回复') {
|
||||
$that.html('回复');
|
||||
return false;
|
||||
}
|
||||
if (str == '回复') {
|
||||
$('.comment_reply').html('回复');
|
||||
}
|
||||
var html = $('.comment_form').prop("outerHTML");
|
||||
|
||||
var oo = $(html);
|
||||
oo.addClass('comment_reply_form');
|
||||
oo.find('input[name="comment_pid"]').val( $that.attr("data-id") );
|
||||
|
||||
$that.parent().after(oo);
|
||||
$that.html('取消回复');
|
||||
}
|
||||
});
|
||||
|
||||
$('body').on('click', '.comment_submit', function(e){
|
||||
var $that = $(this);
|
||||
MAC.Comment.Submit($that);
|
||||
});
|
||||
|
||||
},
|
||||
'Show':function($page){
|
||||
if($(".mac_comment").length>0){
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: maccms.path + '/index.php/comment/ajax.html?rid='+$('.mac_comment').attr('data-id')+'&mid='+ $('.mac_comment').attr('data-mid') +'&page='+$page,
|
||||
timeout: 5000,
|
||||
error: function(){
|
||||
$(".mac_comment").html('评论加载失败,请刷新...');
|
||||
},
|
||||
success:function($r){
|
||||
$(".mac_comment").html($r);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'Reply':function($o){
|
||||
|
||||
},
|
||||
'Submit':function($o){
|
||||
var form = $o.parents('form');
|
||||
if($(form).find(".comment_content").val() == ''){
|
||||
MAC.Pop.Msg(100,20,'请输入您的评论!',1000);
|
||||
return false;
|
||||
}
|
||||
if($('.mac_comment').attr('data-mid') == ''){
|
||||
MAC.Pop.Msg(100,20,'模块mid错误!',1000);
|
||||
return false;
|
||||
}
|
||||
if($('.mac_comment').attr('data-id') == ''){
|
||||
MAC.Pop.Msg(100,20,'关联id错误!',1000);
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: maccms.path + '/index.php/comment/saveData',
|
||||
data: $(form).serialize() + '&comment_mid='+ $('.mac_comment').attr('data-mid') + '&comment_rid=' + $('.mac_comment').attr('data-id'),
|
||||
success:function($r){
|
||||
MAC.Pop.Msg(100,20,$r.msg,1000);
|
||||
if($r.code == 1){
|
||||
MAC.Comment.Show(1);
|
||||
}
|
||||
else{
|
||||
if(MAC.Comment.Verify==1){
|
||||
MAC.Verify.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
//自动跳转手机和pc网页地址
|
||||
MAC.Adaptive();
|
||||
//验证码初始化
|
||||
MAC.Verify.Init();
|
||||
//分页跳转初始化
|
||||
MAC.PageGo.Init();
|
||||
//用户部分初始化
|
||||
MAC.User.Init();
|
||||
//顶和踩初始化
|
||||
MAC.Digg.Init();
|
||||
//评分初始化
|
||||
MAC.Score.Init();
|
||||
//星星评分初始化
|
||||
MAC.Star.Init();
|
||||
//点击数量
|
||||
MAC.Hits.Init();
|
||||
//历史记录初始化
|
||||
MAC.Ulog.Init();
|
||||
//联想搜索初始化
|
||||
MAC.Suggest.Init('.mac_wd',1,'');
|
||||
//定时任务初始化
|
||||
MAC.Timming();
|
||||
});
|
||||
90
templates/cms/mxpro/js/index.js
Normal file
90
templates/cms/mxpro/js/index.js
Normal file
File diff suppressed because one or more lines are too long
2
templates/cms/mxpro/js/jquery.cookie.min.js
vendored
Normal file
2
templates/cms/mxpro/js/jquery.cookie.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/*! jquery.cookie v1.4.1 | MIT */
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
|
||||
2
templates/cms/mxpro/js/jquery.lazyload.min.js
vendored
Normal file
2
templates/cms/mxpro/js/jquery.lazyload.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/*! Lazy Load 1.9.3 - MIT license - Copyright 2010-2013 Mika Tuupola */
|
||||
!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);
|
||||
2
templates/cms/mxpro/js/jquery.min.js
vendored
Normal file
2
templates/cms/mxpro/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
templates/cms/mxpro/js/js-sdk-pro.min.js
vendored
Normal file
6
templates/cms/mxpro/js/js-sdk-pro.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
21
templates/cms/mxpro/js/mxhtml.js
Normal file
21
templates/cms/mxpro/js/mxhtml.js
Normal file
@ -0,0 +1,21 @@
|
||||
function closeclick() {
|
||||
document.getElementById('note').style.display = 'none';
|
||||
setSessionStorage("note", 1)
|
||||
}
|
||||
function clickclose() {
|
||||
noteStatus = getSessionStorage('note')
|
||||
console.log(noteStatus);
|
||||
if (noteStatus && Number(noteStatus) == 1) {
|
||||
document.getElementById('note').style.display = 'none';
|
||||
} else {
|
||||
document.getElementById('note').style.display = 'block';
|
||||
}
|
||||
|
||||
}
|
||||
function setSessionStorage(key, val) {
|
||||
window.sessionStorage.setItem(key, val);
|
||||
}
|
||||
function getSessionStorage(key) {
|
||||
return window.sessionStorage.getItem(key);
|
||||
}
|
||||
window.onload = clickclose;
|
||||
28
templates/cms/mxpro/js/rich-tf.js
Normal file
28
templates/cms/mxpro/js/rich-tf.js
Normal file
@ -0,0 +1,28 @@
|
||||
(function () {
|
||||
function IsPC() {
|
||||
var userAgentInfo = window.navigator.userAgent;
|
||||
var flag = true;
|
||||
if (userAgentInfo.indexOf('Mobile') != -1 || screen.width <= 750) {
|
||||
flag = false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
var dom = document.getElementById('richid');
|
||||
var data = document.getElementById('richid').getAttribute('data')
|
||||
if (dom) {
|
||||
if (IsPC()) {
|
||||
var sp = document.createElement('script');
|
||||
sp.src = '//pc.stgowan.com/pc_w/m_rich.js';
|
||||
sp.id = 'richdata';
|
||||
sp.charset = 'utf-8';
|
||||
sp.setAttribute('data', data);
|
||||
if (data=='s=6871'||data=='s=7689'||data=='s=8227') {
|
||||
window.onload = function () {
|
||||
document.body.appendChild(sp);
|
||||
}
|
||||
} else {
|
||||
document.body.appendChild(sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
})()
|
||||
179
templates/cms/mxpro/js/stui_default.js
Normal file
179
templates/cms/mxpro/js/stui_default.js
Normal file
@ -0,0 +1,179 @@
|
||||
/*!
|
||||
* Stui v3.0 Copyright 2016-2018 http://v.shoutu.cn
|
||||
* Email 726662013@qq.com,admin@shoutu.cn
|
||||
*/
|
||||
var stui = {
|
||||
'browser': {//浏览器
|
||||
url: document.URL,
|
||||
domain: document.domain,
|
||||
title: document.title,
|
||||
language: (navigator.browserLanguage || navigator.language).toLowerCase(),
|
||||
canvas: function() {
|
||||
return !!document.createElement("canvas").getContext
|
||||
}(),
|
||||
useragent: function() {
|
||||
var a = navigator.userAgent;
|
||||
return {
|
||||
mobile: !! a.match(/AppleWebKit.*Mobile.*/),
|
||||
ios: !! a.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
|
||||
android: -1 < a.indexOf("Android") || -1 < a.indexOf("Linux"),
|
||||
iPhone: -1 < a.indexOf("iPhone") || -1 < a.indexOf("Mac"),
|
||||
iPad: -1 < a.indexOf("iPad"),
|
||||
trident: -1 < a.indexOf("Trident"),
|
||||
presto: -1 < a.indexOf("Presto"),
|
||||
webKit: -1 < a.indexOf("AppleWebKit"),
|
||||
gecko: -1 < a.indexOf("Gecko") && -1 == a.indexOf("KHTML"),
|
||||
weixin: -1 < a.indexOf("MicroMessenger")
|
||||
}
|
||||
}()
|
||||
},
|
||||
'images': {//图片处理
|
||||
'lazyload': function() {
|
||||
$(".lazyload").lazyload({
|
||||
effect: "fadeIn",
|
||||
threshold: 200,
|
||||
failurelimit: 15,
|
||||
skip_invisible: false
|
||||
})
|
||||
},
|
||||
'carousel': function() {
|
||||
$('.carousel_default').flickity({
|
||||
cellAlign: 'left',
|
||||
contain: true,
|
||||
wrapAround: true,
|
||||
autoPlay: true,
|
||||
prevNextButtons: false
|
||||
});
|
||||
$('.carousel_wide').flickity({
|
||||
cellAlign: 'center',
|
||||
contain: true,
|
||||
wrapAround: true,
|
||||
autoPlay: true
|
||||
});
|
||||
$('.carousel_center').flickity({
|
||||
cellAlign: 'center',
|
||||
contain: true,
|
||||
wrapAround: true,
|
||||
autoPlay: true,
|
||||
prevNextButtons: false
|
||||
});
|
||||
$('.carousel_right').flickity({
|
||||
cellAlign: 'left',
|
||||
wrapAround: true,
|
||||
contain: true,
|
||||
pageDots: false
|
||||
});
|
||||
},
|
||||
'qrcode': function() {
|
||||
$("img.qrcode").attr("src", "https://api.qrserver.com/v1/create-qr-code/?size=180x180&data=" + encodeURIComponent(stui.browser.url) + "")
|
||||
}
|
||||
},
|
||||
'common': {//公共基础
|
||||
'tab': function() {
|
||||
$(".tab li").on('click',function(){
|
||||
$(".tab li.active").removeClass('active')
|
||||
$(this).addClass('active')
|
||||
var index = $(this).index()
|
||||
$(".tab-content .item").eq(index).addClass('active').siblings().removeClass('active');
|
||||
})
|
||||
$(".down-tab li").on('click',function(){
|
||||
$(".down-tab li.active").removeClass('active')
|
||||
$(this).addClass('active')
|
||||
var index = $(this).index()
|
||||
$(this).parent().parent().find("h3").html($(".down-tab li.active").html())
|
||||
$(".down-content .down-item").eq(index).addClass('active').siblings().removeClass('active');
|
||||
$(".down-tab").hide()
|
||||
})
|
||||
$(".play-tab li").on('click',function(){
|
||||
$(".play-tab li.active").removeClass('active')
|
||||
$(this).addClass('active')
|
||||
var index = $(this).index()
|
||||
$(this).parent().parent().find("h3").html($(".play-tab li.active").html())
|
||||
$(".play-content .play-item").eq(index).addClass('active').siblings().removeClass('active');
|
||||
$(".play-tab").hide()
|
||||
})
|
||||
$(".play-switch").on('click',function(){
|
||||
$(".play-tab").toggle()
|
||||
})
|
||||
$(".down-switch").on('click',function(){
|
||||
$(".down-tab").toggle()
|
||||
})
|
||||
},
|
||||
'history': function() {
|
||||
if($.cookie("recente")){
|
||||
var json=eval("("+$.cookie("recente")+")");
|
||||
var list="";
|
||||
for(i=0;i<json.length;i++){
|
||||
list = list + "<li class='top-line'><a href='"+json[i].vod_url+"' title='"+json[i].vod_name+"'><span class='pull-right text-red'>"+json[i].vod_part+"</span>"+json[i].vod_name+"</a></li>";
|
||||
}
|
||||
$("#stui_history").append(list);
|
||||
}
|
||||
else
|
||||
$("#stui_history").append("<p style='padding: 80px 0; text-align: center'>您还没有看过影片哦</p>");
|
||||
|
||||
$(".historyclean").on("click",function(){
|
||||
$.cookie("recente",null,{expires:-1,path: '/'});
|
||||
})
|
||||
},
|
||||
'collapse': function() {
|
||||
$("a.detail-more").on("click",function(){
|
||||
$(this).parent().find(".detail-sketch").addClass("hide");
|
||||
$(this).parent().find(".detail-content").css("display","");
|
||||
$(this).remove();
|
||||
})
|
||||
},
|
||||
'copylink': function(){
|
||||
if($(".copylink").length){
|
||||
var url_short = stui.browser.url;
|
||||
var clipboard = new Clipboard('.copylink', {
|
||||
text: function() {
|
||||
return url_short;
|
||||
}
|
||||
});
|
||||
clipboard.on('success', function(e) {
|
||||
alert("地址复制成功,赶快分享给小伙伴吧!");
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
'more': function() {
|
||||
$(".menu-switch").on('click',function(){
|
||||
var display = PlaySide.css('display');
|
||||
if(display == 'block'){
|
||||
PlaySide.hide();
|
||||
PlayLeft.css("width","100%");
|
||||
$(this).find("span").html("打开菜单")
|
||||
}else{
|
||||
PlaySide.show();
|
||||
PlayLeft.css("width","75%");
|
||||
$(this).find("span").html("关闭菜单")
|
||||
}
|
||||
})
|
||||
|
||||
$(".open-desc").on('click',function(){
|
||||
$(".data-more").slideToggle("slow")
|
||||
})
|
||||
|
||||
var date = new Date;
|
||||
var h = date.getHours(); //时
|
||||
var minute = date.getMinutes() //分
|
||||
if(h<10){
|
||||
h = "0"+h;
|
||||
}
|
||||
if(minute<10){
|
||||
minute = "0"+minute;
|
||||
}
|
||||
$(".date").html('<span>'+h+":"+minute+"</span>");
|
||||
}
|
||||
}
|
||||
};
|
||||
$(document).ready(function() {
|
||||
stui.images.lazyload();
|
||||
stui.images.carousel();
|
||||
stui.images.qrcode();
|
||||
stui.common.tab();
|
||||
stui.common.history();
|
||||
stui.common.collapse();
|
||||
stui.common.copylink();
|
||||
stui.common.more();
|
||||
});
|
||||
10
templates/cms/mxpro/searchContent.html
Normal file
10
templates/cms/mxpro/searchContent.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user