@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -0,0 +1 @@
|
||||
app.py
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="@localhost" uuid="09958162-8287-458e-a79b-cd88b552b135">
|
||||
<driver-ref>mysql.8</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mysql://localhost:3306</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -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>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="Flask">
|
||||
<option name="enabled" value="true" />
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.8 (database) (2)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="jquery" level="application" />
|
||||
</component>
|
||||
<component name="TemplatesService">
|
||||
<option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
|
||||
<option name="TEMPLATE_FOLDERS">
|
||||
<list>
|
||||
<option value="$MODULE_DIR$/templates" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,22 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="page_child2.html)}" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="N802" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<file url="PROJECT" libraries="{jquery}" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (database) (2)" project-jdk-type="Python SDK" />
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/flask_html.iml" filepath="$PROJECT_DIR$/.idea/flask_html.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,14 @@
|
||||
HOSTNAME = '127.0.0.1'
|
||||
PORT = '3306'
|
||||
USERNAME = 'root'
|
||||
PASSWORD = '123456'
|
||||
DATABASE = 'database_homework'
|
||||
DB_URI = f'mysql+pymysql://{USERNAME}:{PASSWORD}@{HOSTNAME}:{PORT}/{DATABASE}'
|
||||
SQLALCHEMY_DATABASE_URI = DB_URI
|
||||
|
||||
MAIL_SERVER = "smtp.163.com"
|
||||
MAIL_USE_SSL = True
|
||||
MAIL_PORT = 465
|
||||
MAIL_USERNAME = "forever_love233@163.com"
|
||||
MAIL_PASSWORD = ""
|
||||
MAIL_DEFAULT_SENDER = "forever_love233@163.com"
|
@ -0,0 +1,12 @@
|
||||
from functools import wraps
|
||||
from flask import g, redirect, url_for
|
||||
|
||||
|
||||
def login_required(func):
|
||||
@wraps(func)
|
||||
def inner(*args, **kwargs):
|
||||
if g.user:
|
||||
return func(*args, **kwargs)
|
||||
else:
|
||||
return redirect(url_for('login'))
|
||||
return inner
|
@ -0,0 +1,5 @@
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_mail import Mail
|
||||
|
||||
db = SQLAlchemy()
|
||||
mail = Mail()
|
@ -0,0 +1,45 @@
|
||||
import wtforms
|
||||
from wtforms.validators import Email, Length
|
||||
from models import UserModel, EmailCaptchaModel
|
||||
|
||||
|
||||
class RegisterForm(wtforms.Form):
|
||||
username = wtforms.StringField(validators=[Length(min=3, max=20, message='用户名长度不正确')])
|
||||
email = wtforms.StringField(validators=[Email(message='邮箱格式不正确')])
|
||||
captcha = wtforms.StringField(validators=[Length(min=4, max=4, message='验证码长度不正确')])
|
||||
password = wtforms.StringField(validators=[Length(min=6, max=20, message='密码长度不正确')])
|
||||
stu_id = wtforms.StringField(validators=[Length(min=10, max=20, message='学号长度不正确')])
|
||||
|
||||
def validate_email(self, filed):
|
||||
email = filed.data
|
||||
user = UserModel.query.filter_by(email=email).first()
|
||||
if user:
|
||||
raise wtforms.ValidationError(message='邮箱已经被注册')
|
||||
|
||||
def validate_captcha(self, filed):
|
||||
captcha = filed.data
|
||||
email = self.email.data
|
||||
email_captcha = EmailCaptchaModel.query.filter_by(email=email, captcha=captcha).first()
|
||||
if not email_captcha:
|
||||
raise wtforms.ValidationError(message='邮箱验证码不正确')
|
||||
# else:
|
||||
# db.session.delete(email_captcha)
|
||||
# db.session.commit()
|
||||
|
||||
|
||||
class LoginForm(wtforms.Form):
|
||||
email = wtforms.StringField(validators=[Email(message='邮箱格式不正确')])
|
||||
password = wtforms.StringField(validators=[Length(min=6, max=20, message='密码长度不正确')])
|
||||
|
||||
# def validate_email(self, filed):
|
||||
# email = filed.data
|
||||
# user = UserModel.query.filter_by(email=email).first()
|
||||
# if not user:
|
||||
# raise wtforms.ValidationError(message='邮箱未注册')
|
||||
#
|
||||
# def validate_password(self, filed):
|
||||
# password = filed.data
|
||||
# email = self.email.data
|
||||
# user = UserModel.query.filter_by(email=email).first()
|
||||
# if not user.check_password(password):
|
||||
# raise wtforms.ValidationError(message='密码错误')
|
@ -0,0 +1 @@
|
||||
Single-database configuration for Flask.
|
@ -0,0 +1,50 @@
|
||||
# A generic, single database configuration.
|
||||
|
||||
[alembic]
|
||||
# template used to generate migration files
|
||||
# file_template = %%(rev)s_%%(slug)s
|
||||
|
||||
# set to 'true' to run the environment during
|
||||
# the 'revision' command, regardless of autogenerate
|
||||
# revision_environment = false
|
||||
|
||||
|
||||
# Logging configuration
|
||||
[loggers]
|
||||
keys = root,sqlalchemy,alembic,flask_migrate
|
||||
|
||||
[handlers]
|
||||
keys = console
|
||||
|
||||
[formatters]
|
||||
keys = generic
|
||||
|
||||
[logger_root]
|
||||
level = WARN
|
||||
handlers = console
|
||||
qualname =
|
||||
|
||||
[logger_sqlalchemy]
|
||||
level = WARN
|
||||
handlers =
|
||||
qualname = sqlalchemy.engine
|
||||
|
||||
[logger_alembic]
|
||||
level = INFO
|
||||
handlers =
|
||||
qualname = alembic
|
||||
|
||||
[logger_flask_migrate]
|
||||
level = INFO
|
||||
handlers =
|
||||
qualname = flask_migrate
|
||||
|
||||
[handler_console]
|
||||
class = StreamHandler
|
||||
args = (sys.stderr,)
|
||||
level = NOTSET
|
||||
formatter = generic
|
||||
|
||||
[formatter_generic]
|
||||
format = %(levelname)-5.5s [%(name)s] %(message)s
|
||||
datefmt = %H:%M:%S
|
@ -0,0 +1,110 @@
|
||||
import logging
|
||||
from logging.config import fileConfig
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from alembic import context
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
config = context.config
|
||||
|
||||
# Interpret the config file for Python logging.
|
||||
# This line sets up loggers basically.
|
||||
fileConfig(config.config_file_name)
|
||||
logger = logging.getLogger('alembic.env')
|
||||
|
||||
|
||||
def get_engine():
|
||||
try:
|
||||
# this works with Flask-SQLAlchemy<3 and Alchemical
|
||||
return current_app.extensions['migrate'].db.get_engine()
|
||||
except TypeError:
|
||||
# this works with Flask-SQLAlchemy>=3
|
||||
return current_app.extensions['migrate'].db.engine
|
||||
|
||||
|
||||
def get_engine_url():
|
||||
try:
|
||||
return get_engine().url.render_as_string(hide_password=False).replace(
|
||||
'%', '%%')
|
||||
except AttributeError:
|
||||
return str(get_engine().url).replace('%', '%%')
|
||||
|
||||
|
||||
# add your model's MetaData object here
|
||||
# for 'autogenerate' support
|
||||
# from myapp import mymodel
|
||||
# target_metadata = mymodel.Base.metadata
|
||||
config.set_main_option('sqlalchemy.url', get_engine_url())
|
||||
target_db = current_app.extensions['migrate'].db
|
||||
|
||||
# other values from the config, defined by the needs of env.py,
|
||||
# can be acquired:
|
||||
# my_important_option = config.get_main_option("my_important_option")
|
||||
# ... etc.
|
||||
|
||||
|
||||
def get_metadata():
|
||||
if hasattr(target_db, 'metadatas'):
|
||||
return target_db.metadatas[None]
|
||||
return target_db.metadata
|
||||
|
||||
|
||||
def run_migrations_offline():
|
||||
"""Run migrations in 'offline' mode.
|
||||
|
||||
This configures the context with just a URL
|
||||
and not an Engine, though an Engine is acceptable
|
||||
here as well. By skipping the Engine creation
|
||||
we don't even need a DBAPI to be available.
|
||||
|
||||
Calls to context.execute() here emit the given string to the
|
||||
script output.
|
||||
|
||||
"""
|
||||
url = config.get_main_option("sqlalchemy.url")
|
||||
context.configure(
|
||||
url=url, target_metadata=get_metadata(), literal_binds=True
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
def run_migrations_online():
|
||||
"""Run migrations in 'online' mode.
|
||||
|
||||
In this scenario we need to create an Engine
|
||||
and associate a connection with the context.
|
||||
|
||||
"""
|
||||
|
||||
# this callback is used to prevent an auto-migration from being generated
|
||||
# when there are no changes to the schema
|
||||
# reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
|
||||
def process_revision_directives(context, revision, directives):
|
||||
if getattr(config.cmd_opts, 'autogenerate', False):
|
||||
script = directives[0]
|
||||
if script.upgrade_ops.is_empty():
|
||||
directives[:] = []
|
||||
logger.info('No changes in schema detected.')
|
||||
|
||||
connectable = get_engine()
|
||||
|
||||
with connectable.connect() as connection:
|
||||
context.configure(
|
||||
connection=connection,
|
||||
target_metadata=get_metadata(),
|
||||
process_revision_directives=process_revision_directives,
|
||||
**current_app.extensions['migrate'].configure_args
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
if context.is_offline_mode():
|
||||
run_migrations_offline()
|
||||
else:
|
||||
run_migrations_online()
|
@ -0,0 +1,24 @@
|
||||
"""${message}
|
||||
|
||||
Revision ID: ${up_revision}
|
||||
Revises: ${down_revision | comma,n}
|
||||
Create Date: ${create_date}
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
${imports if imports else ""}
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = ${repr(up_revision)}
|
||||
down_revision = ${repr(down_revision)}
|
||||
branch_labels = ${repr(branch_labels)}
|
||||
depends_on = ${repr(depends_on)}
|
||||
|
||||
|
||||
def upgrade():
|
||||
${upgrades if upgrades else "pass"}
|
||||
|
||||
|
||||
def downgrade():
|
||||
${downgrades if downgrades else "pass"}
|
@ -0,0 +1,42 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 1f57157eb709
|
||||
Revises: bb32a1d42ccd
|
||||
Create Date: 2023-05-28 09:53:06.971726
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '1f57157eb709'
|
||||
down_revision = 'bb32a1d42ccd'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||
batch_op.alter_column('address',
|
||||
existing_type=mysql.VARCHAR(length=100),
|
||||
nullable=True)
|
||||
batch_op.alter_column('enterprise',
|
||||
existing_type=mysql.VARCHAR(length=100),
|
||||
nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||
batch_op.alter_column('enterprise',
|
||||
existing_type=mysql.VARCHAR(length=100),
|
||||
nullable=False)
|
||||
batch_op.alter_column('address',
|
||||
existing_type=mysql.VARCHAR(length=100),
|
||||
nullable=False)
|
||||
|
||||
# ### end Alembic commands ###
|
@ -0,0 +1,36 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 4bc1decf051d
|
||||
Revises: 1f57157eb709
|
||||
Create Date: 2023-05-28 09:54:00.011898
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '4bc1decf051d'
|
||||
down_revision = '1f57157eb709'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||
batch_op.alter_column('user_say',
|
||||
existing_type=mysql.VARCHAR(length=500),
|
||||
nullable=True)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||
batch_op.alter_column('user_say',
|
||||
existing_type=mysql.VARCHAR(length=500),
|
||||
nullable=False)
|
||||
|
||||
# ### end Alembic commands ###
|
@ -0,0 +1,65 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: bb32a1d42ccd
|
||||
Revises:
|
||||
Create Date: 2023-05-28 09:46:20.663367
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'bb32a1d42ccd'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('email_captcha',
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column('email', sa.String(length=100), nullable=False),
|
||||
sa.Column('captcha', sa.String(length=100), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('user',
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column('username', sa.String(length=100), nullable=False),
|
||||
sa.Column('password', sa.String(length=500), nullable=False),
|
||||
sa.Column('email', sa.String(length=100), nullable=False),
|
||||
sa.Column('stu_id', sa.String(length=100), nullable=False),
|
||||
sa.Column('user_say', sa.String(length=500), nullable=False),
|
||||
sa.Column('join_time', sa.DateTime(), nullable=True),
|
||||
sa.Column('address', sa.String(length=100), nullable=False),
|
||||
sa.Column('enterprise', sa.String(length=100), nullable=False),
|
||||
sa.Column('user_avatar_url', sa.String(length=100), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('email'),
|
||||
sa.UniqueConstraint('stu_id')
|
||||
)
|
||||
op.create_table('videouri',
|
||||
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column('video_url', sa.String(length=100), nullable=False),
|
||||
sa.Column('video_img_src', sa.String(length=100), nullable=False),
|
||||
sa.Column('video_tite', sa.String(length=100), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_table('favorite',
|
||||
sa.Column('favorite_id', sa.Integer(), nullable=False),
|
||||
sa.Column('video_id', sa.Integer(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['favorite_id'], ['user.id'], ),
|
||||
sa.ForeignKeyConstraint(['video_id'], ['videouri.id'], ),
|
||||
sa.PrimaryKeyConstraint('favorite_id', 'video_id')
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('favorite')
|
||||
op.drop_table('videouri')
|
||||
op.drop_table('user')
|
||||
op.drop_table('email_captcha')
|
||||
# ### end Alembic commands ###
|
@ -0,0 +1,41 @@
|
||||
a{
|
||||
text-decoration-line: none;
|
||||
color:unset;
|
||||
height: 0;width: 0;
|
||||
}
|
||||
footer{
|
||||
height: 20px;
|
||||
margin:0 auto ;
|
||||
text-align: center;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
footer a{
|
||||
color: white;
|
||||
font-weight: 100; font-size: 3px;
|
||||
text-decoration: none;
|
||||
margin: 2px;
|
||||
}
|
||||
footer a:hover{
|
||||
color: blue;
|
||||
}
|
||||
body,div,span,ul,li,p,footer{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-decoration: none;list-style: none;
|
||||
}
|
||||
.none{
|
||||
margin: 0 auto;
|
||||
width: 960px;height: 100px;
|
||||
border: solid 3px rgba(78, 234, 234, 0.234);
|
||||
text-align: center;
|
||||
color: black;
|
||||
background-color:#fff;
|
||||
|
||||
}
|
||||
.none div{
|
||||
color: antiquewhite;
|
||||
font-size: 30px;
|
||||
font-weight: 1500;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
}
|
@ -0,0 +1,257 @@
|
||||
*{
|
||||
background-repeat: repeat-y;
|
||||
}
|
||||
#main_div_mainPageImg{
|
||||
border: 0;padding: 0;
|
||||
height: 400px;width: 100%;
|
||||
margin: 0;
|
||||
background: url(../imgs/pexels-faik-akmd-1025469.png) no-repeat top ;
|
||||
/*兼容浏览器版本*/
|
||||
-webkit-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
overflow: hidden;
|
||||
}
|
||||
body{
|
||||
background-image: linear-gradient(to bottom, rgb(0, 19, 32) 50%, rgba(90, 130, 157, 0.684));
|
||||
}
|
||||
#main_div{
|
||||
width: 1080px;height: 800px;
|
||||
margin: 0 auto;border: 0;padding: 0;
|
||||
opacity: 100%;
|
||||
background-image:linear-gradient(to bottom, rgb(0, 19, 32) 20% ,rgba(90, 130, 157, 0.684))
|
||||
}
|
||||
|
||||
#navs {
|
||||
display: flex;
|
||||
width:1077px; height: 30px;
|
||||
padding: 0;margin: 0;
|
||||
border: unset;
|
||||
text-decoration: none;list-style: none;
|
||||
}
|
||||
#navs li{
|
||||
flex-direction: row-reverse;
|
||||
padding: 2px;
|
||||
float:left;
|
||||
width: 215px; height: 30px ;
|
||||
margin: 0 1px 0;
|
||||
border: 0;
|
||||
/*border-left :1px solid rgb(12, 114, 203); border-right :1px solid rgb(12, 114, 203);*/
|
||||
transition: all 0.6s;/*all 包括了transform*/
|
||||
transform-style: preserve-3d;
|
||||
position:relative;
|
||||
}
|
||||
#navs li:hover{
|
||||
transform: rotateX(-90deg);
|
||||
}
|
||||
#navs li a{
|
||||
position: absolute;/*子绝父相 */
|
||||
left: 0; top:0;
|
||||
display:block;
|
||||
width: 214px;height: 100%;
|
||||
text-align:center;
|
||||
text-decoration:none; /* 去掉下划线 */
|
||||
|
||||
}
|
||||
#navs li a:first-child{
|
||||
color:#fff;
|
||||
background:#3A4953;
|
||||
transform: translateZ(15px);
|
||||
}
|
||||
#navs li a:last-child{
|
||||
color:rgb(0, 0, 0);
|
||||
background:#e1ecf4;
|
||||
transform: rotateX(90deg) translateZ(15px); /* x转向后z轴方向也“躺平了” */
|
||||
}
|
||||
|
||||
|
||||
|
||||
#main_page{
|
||||
margin:0 ;padding: 0;
|
||||
/* background-color: chartreuse; */
|
||||
float: left;
|
||||
}
|
||||
#local{
|
||||
margin: 0;padding: 0;
|
||||
height: 340px; width: 1077px;
|
||||
}
|
||||
/* 轮播图 */
|
||||
#local_pics{
|
||||
margin: 10px; padding: 0;
|
||||
width: 480px;height:340px ;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
#main_page_local_pics{
|
||||
float: left;
|
||||
margin:0px;
|
||||
padding: 0;
|
||||
list-style:none;
|
||||
width: 480px;
|
||||
height:270px;
|
||||
position:absolute;
|
||||
overflow: hidden;
|
||||
background-color: #6b6de056;
|
||||
}
|
||||
#main_page_local_pics li{
|
||||
float: left;
|
||||
position:absolute;
|
||||
list-style: none;
|
||||
z-index: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
#local_pics_text{
|
||||
float: left;
|
||||
position:relative;
|
||||
top: 270px;
|
||||
width: 480px;height: 50px;
|
||||
text-align: center;
|
||||
background-color:#3A4953;
|
||||
}
|
||||
#mainPageImgsDescription{
|
||||
color: white;
|
||||
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
|
||||
font-weight: 200;font-size: 3px;
|
||||
float: left; clear: all;
|
||||
width: 480px;height: 25px;
|
||||
}
|
||||
.Thepoint{
|
||||
padding: 0;
|
||||
list-style:none;
|
||||
/* background-color: crimson; */
|
||||
z-index: 100;
|
||||
margin-left: 170px;
|
||||
}
|
||||
.points{
|
||||
float: left;
|
||||
height: 6px;
|
||||
width: 6px;
|
||||
margin-right: 10px;
|
||||
border-style: solid;
|
||||
border-radius: 100%;
|
||||
background-color: rgb(255, 255, 255);
|
||||
border-width:3px;
|
||||
border-color: aliceblue;
|
||||
}
|
||||
.points.active{
|
||||
background-color: black;
|
||||
border-color:dodgerblue;
|
||||
transition: all .5s;
|
||||
}
|
||||
.points:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
.change{
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
border-width: 0px;
|
||||
border-radius: 50%;
|
||||
position:absolute;
|
||||
opacity: 50%;
|
||||
background-color: unset;
|
||||
color: rgb(255, 255, 255); font-weight: 1800; font-size:25px;
|
||||
z-index: 100;
|
||||
top:130px;
|
||||
}
|
||||
.change:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
.change:active{
|
||||
background-color: rgb(204, 206, 207);
|
||||
}
|
||||
#change-left{
|
||||
left: 10px;
|
||||
}
|
||||
#change-right{
|
||||
right:10px;
|
||||
}
|
||||
#developers_said{
|
||||
margin:20px 100px;
|
||||
width: 330px;
|
||||
height: 340px;
|
||||
display: inline-block;
|
||||
vertical-align:top;
|
||||
}
|
||||
#developers_said span{
|
||||
color: #e1ecf4;
|
||||
font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
|
||||
margin: 10px 20px 3px;
|
||||
font-size: 20px;font-weight: 600;
|
||||
}
|
||||
marquee{
|
||||
padding: 10px; margin-top: 40px ;
|
||||
width: 330px;
|
||||
height: 150px;
|
||||
border: 3px solid #9d9d9d;
|
||||
background-color: rgba(90, 130, 157, 0.684);
|
||||
|
||||
}
|
||||
marquee blockquote{
|
||||
font-size: 6px;
|
||||
font-weight: 300;
|
||||
color:snow;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
marquee:hover blockquote{
|
||||
color:skyblue;
|
||||
font-size:8px ;font-weight: 450;
|
||||
}
|
||||
#main_down{
|
||||
width: 1080px;height: 400px;
|
||||
}
|
||||
#main_down ul{
|
||||
display: flex;
|
||||
flex-direction:row;/*row:行 column:列*/
|
||||
justify-content: space-around;
|
||||
}
|
||||
#main_down li{
|
||||
display:inline-block;
|
||||
padding: 5px 10px 5px;
|
||||
margin-top: 20px;
|
||||
width: 160px;height: 290px;
|
||||
border-radius: 12px;
|
||||
border: double #839fbbb7;
|
||||
text-align: center;
|
||||
transition:all 1s;
|
||||
/* background-color: chartreuse; */
|
||||
}
|
||||
#main_down li a{
|
||||
text-decoration: none;
|
||||
}
|
||||
#main_down li span{
|
||||
margin: 0 auto;
|
||||
font-size: medium;
|
||||
font-weight: 800;
|
||||
color: #b2b4b680;
|
||||
}
|
||||
#main_down li:hover{
|
||||
transform: rotateY(360deg);
|
||||
box-shadow:inset 0 -10px 40px -2px #9b9b9b;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
#main_down li:hover span{
|
||||
color: black;
|
||||
}
|
||||
#main_down li p{
|
||||
margin: 20px 5px;
|
||||
color: white;
|
||||
font-size: small;
|
||||
font-weight: 200;
|
||||
}
|
||||
#main_down li:hover p{
|
||||
margin: 20px 5px;
|
||||
color: #9b9b9b;
|
||||
font-size: small;
|
||||
font-weight: 200;
|
||||
}
|
||||
#main_down li:nth-child(1) div{background-image: url(../icons/群星华绽.png);}
|
||||
#main_down li:nth-child(2) div{background-image: url(../icons/资源.png);}
|
||||
#main_down li:nth-child(3) div{background-image: url(../icons/开发中.png);}
|
||||
#main_down li:nth-child(4) div{background-image: url(../icons/记录1.png);}
|
||||
#main_down li div{
|
||||
margin: 0 auto;
|
||||
width:60px ;height: 60px;
|
||||
border-radius: 50%;
|
||||
background-repeat: no-repeat;background-size: contain;
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
|
||||
.login-container {
|
||||
width: 600px;
|
||||
height: 60%;
|
||||
margin: 0 auto;
|
||||
margin-top: 10%;
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 10px 50px 0px #CCFFFF;
|
||||
}
|
||||
.left-container {
|
||||
display: inline-block;
|
||||
width: 330px;
|
||||
border-top-left-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
padding: 60px;
|
||||
}
|
||||
.title {
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
font-weight: 200;
|
||||
}
|
||||
.title span {
|
||||
border-bottom: 3px solid rgb(237, 221, 22);
|
||||
}
|
||||
.input-container {
|
||||
padding: 20px 0;
|
||||
}
|
||||
input {
|
||||
border: 0;
|
||||
background: none;
|
||||
outline: none;
|
||||
color: #fff;
|
||||
margin: 20px 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
transition: .2s;
|
||||
border-bottom: 1px solid rgb(199, 191, 219);
|
||||
}
|
||||
input:hover
|
||||
{
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
::-webkit-input-placeholder {
|
||||
color: rgb(199, 191, 219);
|
||||
}
|
||||
.message-container {
|
||||
font-size: 14px;
|
||||
transition: .2s;
|
||||
color: rgb(199, 191, 219);
|
||||
cursor: pointer;
|
||||
}
|
||||
.message-container:hover {
|
||||
color: #fff;
|
||||
}
|
||||
.right-container {
|
||||
width: 145px;
|
||||
display: inline-block;
|
||||
height: calc(100% - 120px);
|
||||
vertical-align: top;
|
||||
padding: 60px 0;
|
||||
}
|
||||
.regist-container {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
font-weight: 200;
|
||||
}
|
||||
.regist-container span {
|
||||
border-bottom: 3px solid rgb(237, 221, 22);
|
||||
cursor: pointer;
|
||||
}
|
||||
.action-container {
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
top: 200px;
|
||||
}
|
||||
#enroll_enrolling{
|
||||
top:200px;
|
||||
}
|
||||
#enroll_return{
|
||||
top:100px;
|
||||
}
|
||||
|
||||
.action-container span {
|
||||
border: 1px solid rgb(237, 221, 22);
|
||||
padding: 10px;
|
||||
display: inline;
|
||||
line-height: 20px;
|
||||
border-radius: 20px;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: calc(72px - 20px);
|
||||
transition: .2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.action-container span:hover {
|
||||
background-color: rgb(237, 221, 22);
|
||||
color: rgb(95, 76, 194);
|
||||
}
|
||||
|
||||
.enroll-container {
|
||||
display: inline-block;
|
||||
width: 330px;
|
||||
border-top-left-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
}
|
||||
|
||||
#login_video{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -10;
|
||||
object-fit: cover;
|
||||
}
|
||||
.btn_btn-primary_btn-block{
|
||||
background-color: unset;
|
||||
border: solid gold 2px;
|
||||
color: snow;
|
||||
font-size: 10px;
|
||||
font-weight: bolder;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn_btn-primary_btn-block:hover{
|
||||
background-color: gold;
|
||||
color: rgb(95, 76, 194);
|
||||
}
|
||||
#submit_login{
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border: solid gold 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#submit_login :hover{
|
||||
background-color: gold;
|
||||
color: rgb(95, 76, 194);
|
||||
}
|
||||
#submit_login div{
|
||||
display: inline;
|
||||
line-height: 20px;
|
||||
border-radius: 20px;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: calc(72px - 20px);
|
||||
transition: .2s;
|
||||
cursor: pointer;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
#preview{
|
||||
width: 500px; height: 400px;
|
||||
}
|
||||
#preview iframe{
|
||||
margin: 0;
|
||||
width: 500px; height: 400px;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: absolute;
|
||||
left: 25%;
|
||||
top: 25%;
|
||||
width: 50%;
|
||||
height: 100vh;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.user-id {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.user-signature {
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.user-list {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.user-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 15px 20px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.user-list-item-label {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.user-list-item-value {
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.user-list-item-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.user-list-item-dropdown {
|
||||
display: none;
|
||||
background: white;
|
||||
width: 200px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.user-list-item-dropdown-input {
|
||||
width: calc(100% - 20px);
|
||||
margin: 10px auto;
|
||||
padding-left: 10px;
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.user-list-item-dropdown-button {
|
||||
width: calc(100% - 40px);
|
||||
margin-left: auto;
|
||||
margin-right:auto;
|
||||
margin-bottom :10px ;
|
||||
padding :10px ;
|
||||
background-color :#2196f3 ;
|
||||
color :white ;
|
||||
border-radius :5px ;
|
||||
border :none ;
|
||||
cursor :pointer ;
|
||||
}
|
||||
.return_btn{
|
||||
position: absolute;
|
||||
left: 80%;
|
||||
top: 55%;
|
||||
width: 6%;
|
||||
height: 5%;
|
||||
margin-left: auto;
|
||||
margin-right:auto;
|
||||
margin-bottom :10px ;
|
||||
box-shadow: 0 0 10px #66aee6;
|
||||
border: solid 1px #66aee6;
|
||||
border-radius: 40%;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-weight: bolder;
|
||||
background-color: #66aee6;
|
||||
font-family: "Microsoft YaHei";
|
||||
color: snow;
|
||||
transition: all 1s;
|
||||
cursor: pointer;
|
||||
}
|
||||
.return_btn:hover{
|
||||
background-color: snow;
|
||||
color: #66aee6;
|
||||
box-shadow: 0 0 10px darkgray;
|
||||
border: solid 1px #arkgray;
|
||||
}
|
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 856 KiB |
After Width: | Height: | Size: 5.8 MiB |
After Width: | Height: | Size: 405 KiB |
After Width: | Height: | Size: 268 KiB |
After Width: | Height: | Size: 4.6 MiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 4.0 MiB |
After Width: | Height: | Size: 2.8 MiB |
After Width: | Height: | Size: 16 MiB |
After Width: | Height: | Size: 9.3 MiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 282 KiB |
After Width: | Height: | Size: 5.8 MiB |
After Width: | Height: | Size: 3.2 KiB |
@ -0,0 +1,6 @@
|
||||
function cont(){
|
||||
if(confirm("这里是实践测试网站,相关功能可能并不成熟,是否继续?"))
|
||||
return true;
|
||||
else return false;
|
||||
}
|
||||
document.ready = cont();
|
@ -0,0 +1,39 @@
|
||||
function bindEmailCaptchaClick(){
|
||||
$("#captcha-btn").click(function (event) {
|
||||
var $this = $(this);
|
||||
event.preventDefault();
|
||||
|
||||
var email = $("input[name='email']").val();
|
||||
$.ajax({
|
||||
url: "/captcha/email?email="+email,
|
||||
method: 'GET',
|
||||
success: function (result){
|
||||
var code = result['code'];
|
||||
if(code == 200){
|
||||
var countdown = 60;
|
||||
$this.off('click');
|
||||
var timer = setInterval(function (){
|
||||
$this.text(countdown);
|
||||
countdown--;
|
||||
if(countdown <= 0) {
|
||||
clearInterval(timer);
|
||||
$this.text('获取验证码');
|
||||
bindEmailCaptchaClick();
|
||||
}
|
||||
},1000);
|
||||
alert('验证码发送成功!');
|
||||
}else {
|
||||
alert(result['message']);
|
||||
}
|
||||
console.log(result);
|
||||
},
|
||||
fail: function (error){
|
||||
console.log(error);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
$(function (){
|
||||
bindEmailCaptchaClick();
|
||||
});
|
@ -0,0 +1,207 @@
|
||||
$(document).ready(function(){
|
||||
let user_id = localStorage.getItem('user_id')
|
||||
let username = localStorage.getItem('username')
|
||||
|
||||
// Get the list items and dropdowns
|
||||
let emailItem = $("#email-item");
|
||||
let emailDropdown = $("#email-dropdown");
|
||||
let addressItem = $("#address-item");
|
||||
let addressDropdown = $("#address-dropdown");
|
||||
let enterpriseItem = $("#enterprise-item");
|
||||
let enterpriseDropdown = $("#enterprise-dropdown");
|
||||
let stu_idItem = $("#stu_id-item");
|
||||
let stu_idDropdown = $("#stu_id-dropdown");
|
||||
let useravatarItem = $("#user_avatar-item");
|
||||
let useravatarDropdown = $("#user_avatar-dropdown");
|
||||
|
||||
// Get the input fields and buttons
|
||||
let emailInput = $("#email-input");
|
||||
let emailButton = $("#email-button");
|
||||
let addressInput = $("#address-input");
|
||||
let addressButton = $("#address-button");
|
||||
let enterpriseInput = $("#enterprise-input");
|
||||
let enterpriseButton = $("#enterprise-button");
|
||||
|
||||
let stu_idInput = $("#stu_id-input");
|
||||
let stu_idButton = $("#stu_id-button");
|
||||
let useravatarInput = $("#user_avatar-input");
|
||||
let useravatarButton = $("#user_avatar-button");
|
||||
|
||||
|
||||
let user_list_item = $('.user-list-item')
|
||||
user_list_item.each(function (){
|
||||
$(this).children('img').on('click',function (){
|
||||
$(this).siblings('.user-list-item-dropdown').css('display','block')
|
||||
})
|
||||
$(this).children('.user-list-item-dropdown').children('button').eq(1).on('click',function (){
|
||||
$(this).parent('.user-list-item-dropdown').css('display','none')
|
||||
})
|
||||
})
|
||||
|
||||
// Change the list item value when clicking on the buttons
|
||||
emailButton.click(function() {
|
||||
let newEmail = emailInput.val();
|
||||
if (change_email(user_id,newEmail)) {
|
||||
emailItem.find(".user-list-item-value").text(newEmail);
|
||||
emailInput.val("");
|
||||
alert("Email changed successfully!");
|
||||
} else {
|
||||
alert("Email changed successfully!");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
addressButton.click(function() {
|
||||
let newAddress = addressInput.val();
|
||||
if (change_address(user_id,newAddress)) {
|
||||
addressItem.find(".user-list-item-value").text(newAddress);
|
||||
addressInput.val("");
|
||||
alert("Address changed successfully!");
|
||||
} else {
|
||||
alert("Address changed successfully!");
|
||||
}
|
||||
});
|
||||
|
||||
enterpriseButton.click(function() {
|
||||
let newEnterprise = enterpriseInput.val();
|
||||
if (change_enterprise(user_id,newEnterprise)){
|
||||
enterpriseItem.find(".user-list-item-value").text(newEnterprise);
|
||||
enterpriseInput.val("");
|
||||
alert("Enterprise changed successfully!");
|
||||
} else {
|
||||
alert("Enterprise changed successfully!");
|
||||
}
|
||||
});
|
||||
|
||||
stu_idButton.click(function() {
|
||||
let newstu_id = stu_idInput.val();
|
||||
console.log(user_id)
|
||||
console.log(newstu_id)
|
||||
if (change_stu_id(user_id,newstu_id) !== 'true') {
|
||||
enterpriseItem.find(".user-list-item-value").text(newstu_id);
|
||||
enterpriseInput.val("");
|
||||
alert("stu_id changed successfully!");
|
||||
} else {
|
||||
alert("stu_id changed successfully!");
|
||||
}
|
||||
});
|
||||
|
||||
useravatarInput.on("change", function() {
|
||||
var file = this.files[0]; // Get the selected file
|
||||
// Create a new FormData object
|
||||
var formData = new FormData();
|
||||
formData.append("avatar", file); // Append the file to the FormData object
|
||||
|
||||
alert("ok")
|
||||
|
||||
$.ajax({
|
||||
url: "/upload-avatar", // Replace with your server-side endpoint for handling the avatar upload
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(response) {
|
||||
console.log("Avatar uploaded successfully!");
|
||||
},
|
||||
error: function(e) {
|
||||
console.log(e)
|
||||
}
|
||||
});
|
||||
})
|
||||
// Add more event handlers here
|
||||
$('.return_btn').on('click',function (){
|
||||
window.parent.location.reload()
|
||||
window.close()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
function change_stu_id(user_id,changed_data){
|
||||
let sta = false;
|
||||
let data = {
|
||||
'user_id':user_id,
|
||||
'stu_id':changed_data,
|
||||
}
|
||||
$.ajax({
|
||||
url: "/upload-stu_id", // Replace with your server-side endpoint for handling the avatar upload
|
||||
type: "POST",
|
||||
data: JSON.stringify(data),
|
||||
contentType: 'application/json',
|
||||
success: function(response) {
|
||||
console.log("Avatar uploaded successfully!");
|
||||
sta = true;
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Error uploading avatar:", error);
|
||||
sta = false;
|
||||
}
|
||||
});
|
||||
return sta
|
||||
}
|
||||
function change_email(user_id,changed_data){
|
||||
let sta = 'false';
|
||||
let data = {
|
||||
'user_id':user_id,
|
||||
'email':changed_data,
|
||||
}
|
||||
$.ajax({
|
||||
url: "/upload-email", // Replace with your server-side endpoint for handling the avatar upload
|
||||
type: "POST",
|
||||
data: JSON.stringify(data),
|
||||
contentType:'application/json',
|
||||
success: function() {
|
||||
console.log("email uploaded successfully!");
|
||||
sta = 'true'
|
||||
},
|
||||
error: function() {
|
||||
console.log("error")
|
||||
sta = 'false'
|
||||
}
|
||||
});
|
||||
return sta
|
||||
}
|
||||
function change_address(user_id,changed_data){
|
||||
let sta = false;
|
||||
let data = {
|
||||
'user_id':user_id,
|
||||
'address':changed_data,
|
||||
}
|
||||
$.ajax({
|
||||
url: "/upload-address", // Replace with your server-side endpoint for handling the avatar upload
|
||||
type: "POST",
|
||||
data: JSON.stringify(data),
|
||||
contentType: 'application/json',
|
||||
success: function(response) {
|
||||
console.log("address uploaded successfully!");
|
||||
sta = true
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Error uploading address:", error);
|
||||
sta = false
|
||||
}
|
||||
});
|
||||
return sta
|
||||
}
|
||||
function change_enterprise(user_id,changed_data){
|
||||
let sta = false;
|
||||
let data = {
|
||||
'user_id':user_id,
|
||||
'enterprise':changed_data,
|
||||
}
|
||||
$.ajax({
|
||||
url: "/upload-enterprise", // Replace with your server-side endpoint for handling the avatar upload
|
||||
type: "POST",
|
||||
data: JSON.stringify(data),
|
||||
contentType: 'application/json',
|
||||
success: function(response) {
|
||||
console.log("enterprise uploaded successfully!");
|
||||
sta = true
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Error uploading enterprise:", error);
|
||||
sta = false
|
||||
}
|
||||
});
|
||||
return sta
|
||||
}
|