├── EShow_Html
├── 静态文件_已过时.txt
├── content
│ ├── js
│ │ ├── bgPicData.js
│ │ ├── picData.js
│ │ ├── preview.js
│ │ ├── panelEvent.js
│ │ ├── eshow.js
│ │ └── zepto.min.js
│ ├── images
│ │ ├── bar-1px.png
│ │ ├── phone_top.png
│ │ ├── phonetitle1.gif
│ │ ├── phonetitle1.jpg
│ │ ├── phone_bottom.png
│ │ └── normalmusic.svg
│ └── css
│ │ ├── main.css
│ │ └── css.css
├── test.html
├── preview.html
└── index.html
├── EShow_Web
├── EShow
│ ├── Views
│ │ ├── _ViewStart.cshtml
│ │ ├── Shared
│ │ │ ├── Error.cshtml
│ │ │ ├── _Layout.cshtml
│ │ │ └── _LayoutH5.cshtml
│ │ ├── Home
│ │ │ ├── Preview.cshtml
│ │ │ └── Index.cshtml
│ │ └── Web.config
│ ├── DLL
│ │ ├── Dapper.dll
│ │ └── MySql.Data.dll
│ ├── Content
│ │ ├── js
│ │ │ ├── bgPicData.js
│ │ │ ├── picData.js
│ │ │ ├── preview.js
│ │ │ ├── template.js
│ │ │ ├── panelEvent.js
│ │ │ └── eshow.js
│ │ ├── images
│ │ │ ├── bfbtn.png
│ │ │ ├── audiobtn.jpg
│ │ │ ├── bar-1px.png
│ │ │ ├── phone_top.png
│ │ │ ├── phonetitle1.gif
│ │ │ ├── phonetitle1.jpg
│ │ │ ├── phone_bottom.png
│ │ │ └── normalmusic.svg
│ │ └── css
│ │ │ ├── main.css
│ │ │ └── css.css
│ ├── Global.asax
│ ├── Enum
│ │ └── ResrouceEnum.cs
│ ├── DTO
│ │ └── BaseResp.cs
│ ├── Models
│ │ ├── Resource.cs
│ │ └── WebApp.cs
│ ├── Properties
│ │ ├── PublishProfiles
│ │ │ ├── wanwang.pubxml.user
│ │ │ ├── local.pubxml
│ │ │ ├── wanwang.pubxml
│ │ │ └── local.pubxml.user
│ │ └── AssemblyInfo.cs
│ ├── Web.Debug.config
│ ├── Utils
│ │ └── DBHelper.cs
│ ├── Web.Release.config
│ ├── Global.asax.cs
│ ├── EShow.csproj.user
│ ├── Service
│ │ ├── ResourceService.cs
│ │ └── WebAppService.cs
│ ├── Web.config
│ ├── Controllers
│ │ ├── HomeAjaxController.cs
│ │ └── HomeController.cs
│ └── EShow.csproj
└── EShow.sln
├── .gitignore
└── README.md
/EShow_Html/静态文件_已过时.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/_Layout.cshtml";
3 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pdb
2 | *.suo
3 | *.cache
4 | *.mp3
5 | Upload/
6 | bin/
7 | packages/
8 | obj/
9 | Debug/
--------------------------------------------------------------------------------
/EShow_Web/EShow/DLL/Dapper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/DLL/Dapper.dll
--------------------------------------------------------------------------------
/EShow_Html/content/js/bgPicData.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Html/content/js/bgPicData.js
--------------------------------------------------------------------------------
/EShow_Html/content/js/picData.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Html/content/js/picData.js
--------------------------------------------------------------------------------
/EShow_Web/EShow/DLL/MySql.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/DLL/MySql.Data.dll
--------------------------------------------------------------------------------
/EShow_Html/content/images/bar-1px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Html/content/images/bar-1px.png
--------------------------------------------------------------------------------
/EShow_Html/content/images/phone_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Html/content/images/phone_top.png
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/js/bgPicData.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/js/bgPicData.js
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/js/picData.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/js/picData.js
--------------------------------------------------------------------------------
/EShow_Web/EShow/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="EShow.MvcApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/EShow_Html/content/images/phonetitle1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Html/content/images/phonetitle1.gif
--------------------------------------------------------------------------------
/EShow_Html/content/images/phonetitle1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Html/content/images/phonetitle1.jpg
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/images/bfbtn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/images/bfbtn.png
--------------------------------------------------------------------------------
/EShow_Html/content/images/phone_bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Html/content/images/phone_bottom.png
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/images/audiobtn.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/images/audiobtn.jpg
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/images/bar-1px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/images/bar-1px.png
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/images/phone_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/images/phone_top.png
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/images/phonetitle1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/images/phonetitle1.gif
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/images/phonetitle1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/images/phonetitle1.jpg
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/images/phone_bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaogaolater/H5/HEAD/EShow_Web/EShow/Content/images/phone_bottom.png
--------------------------------------------------------------------------------
/EShow_Web/EShow/Views/Shared/Error.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = null;
3 | }
4 |
5 |
6 |
7 |
8 | Error
9 |
10 |
11 |
12 | Sorry, an error occurred while processing your request.
13 |
14 |
15 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Enum/ResrouceEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 |
6 | namespace EShow.Enum
7 | {
8 | ///
9 | /// 资源类型
10 | ///
11 | public enum ResrouceEnum
12 | {
13 | BackgroundPic = 1,
14 | PagePic = 2,
15 | Audio = 3,
16 | Video = 4
17 | }
18 | }
--------------------------------------------------------------------------------
/EShow_Web/EShow/DTO/BaseResp.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 |
6 | namespace EShow.DTO
7 | {
8 | public class BaseResp
9 | {
10 | public bool success { get; set; }
11 | public string message { get; set; }
12 | public int errorcode { get; set; }
13 | public T data { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/EShow_Web/EShow/Views/Home/Preview.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Preview";
3 | Layout = "~/Views/Shared/_LayoutH5.cshtml";
4 | }
5 | @model EShow.Models.WebApp
6 |
7 |
8 | @Html.Raw(HttpUtility.UrlDecode(Model.PreviewHTML))
9 |
10 | @section script
11 | {
12 |
13 |
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Models/Resource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 |
6 | namespace EShow.Models
7 | {
8 | public class Resource
9 | {
10 | public int ResourceId { get; set; }
11 | public string Name { get; set; }
12 | public string Path { get; set; }
13 | public string Tip { get; set; }
14 | public DateTime CreateTime { get; set; }
15 | public string Creator { get; set; }
16 | public int Type { get; set; }
17 | public bool IsDelete { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/EShow_Web/EShow/Models/WebApp.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 |
6 | namespace EShow.Models
7 | {
8 | public class WebApp
9 | {
10 | public int AppId { get; set; }
11 | public string Name { get; set; }
12 | public string DesignHTML { get; set; }
13 | public string PreviewHTML { get; set; }
14 | public DateTime CreateTime { get; set; }
15 | public string Creator { get; set; }
16 | public int State { get; set; }
17 | public bool IsDelete { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/EShow_Web/EShow/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | @ViewBag.Title
6 |
7 |
8 |
9 | @RenderSection("css", false)
10 |
11 |
12 | @RenderBody()
13 |
14 | @RenderSection("script",false)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 模仿易企秀做的
2 | DB_Pdm是数据库powerdesign文件
3 | EShow_Html是一开始做的静态原型 已过时
4 | EShow_Web 是asp.net mvc程序
5 |
6 | -----------------todo------------------------
7 | 5、动画无限次设计页面的处理
8 | 5.1、动画增加种类
9 | 7、增加 提示滑屏的箭头
10 | 1.1、文字竖排的处理
11 | 14、colorpicker组件的替换
12 | 15、粗体、细体交替显示
13 | 40、各种删除功能
14 | 一次上传多文件
15 |
16 | -----------------不重要------------------
17 | 9、增加视频功能
18 | 10、增加分享功能
19 | 11、背景图添加效果
20 | 12、模板的制作
21 | 13、缩放框加旋转功能
22 | 14、复制功能
23 |
24 | ------------------done-----------------
25 | done 4、背景音乐Panel 以及背景音乐的添加
26 | done 9、提供保存和发布功能
27 | done 6.1、增加图片上传功能
28 | done 6、改成动态页面
29 | done 3、存储必须重构
30 | done 11、定位的问题,可以全部改为% 或者全部rem
31 | done 2、缩放框四角缩放的处理
32 | done 0、预览时max-width的设置
33 | done 1、文字全部删除bug的处理
34 | done 15、预览js和编辑页面的要分离
35 | done 12、框样式的设置 弹层后缩放框在弹框之上
36 | done 16、弹框不能滚动
--------------------------------------------------------------------------------
/EShow_Html/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 单页WEBAPP后台
9 |
10 |
11 |
12 |
13 |
14 |
15 | niaho a
16 |
17 |
18 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Properties/PublishProfiles/wanwang.pubxml.user:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 | AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAJvJD+nGbrUSjLMV1YB6g8AAAAAACAAAAAAAQZgAAAAEAACAAAACf1PBqyQpmu5ob1zEQfhZ2iVgme/Jp6UgLL3Wyu8R2GAAAAAAOgAAAAAIAACAAAADg0bLdNEcPhJVofsPzGQgKHhmuVWmvA2o10CUMJYssTSAAAADi+DafGXKNsorFMruCqRa1rQ0qn4JKbMse7ivi3Wj82EAAAAC1cCSYLo4xWNASM3t6DdfEQ+qFWQprgUHoOiwVbyScsN0hjyiwUq/YcWbRsEBglQWNuHQleKMImXhrOZf6f01l
10 | <_PublishTargetUrl>ftp://qxw1192850086.my3w.com
11 |
12 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Views/Shared/_LayoutH5.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | @ViewBag.Title
8 |
9 |
10 |
11 | @RenderSection("css", false)
12 |
13 |
14 | @RenderBody()
15 |
16 | @RenderSection("script",false)
17 |
18 |
19 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Properties/PublishProfiles/local.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | FileSystem
9 | Release
10 | Any CPU
11 |
12 | True
13 | True
14 | True
15 | False
16 | DonotMerge
17 | False
18 | C:\publish\yqx
19 | True
20 |
21 |
--------------------------------------------------------------------------------
/EShow_Web/EShow.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShow", "EShow\EShow.csproj", "{0BB43931-C043-4D51-AFC6-C09B39C2E381}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {0BB43931-C043-4D51-AFC6-C09B39C2E381}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {0BB43931-C043-4D51-AFC6-C09B39C2E381}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {0BB43931-C043-4D51-AFC6-C09B39C2E381}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {0BB43931-C043-4D51-AFC6-C09B39C2E381}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过下列特性集
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("EShow")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("EShow")]
13 | [assembly: AssemblyCopyright("版权所有(C) 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的某个类型,
19 | // 请针对该类型将 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("8da267ed-4c4d-4d75-8644-bf73b37fce16")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Properties/PublishProfiles/wanwang.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | FTP
9 | Release
10 | Any CPU
11 |
12 | True
13 | False
14 | ftp://qxw1192850086.my3w.com
15 | False
16 | False
17 |
18 | qxw1192850086
19 | <_SavePWD>True
20 | True
21 | True
22 | False
23 | DonotMerge
24 |
25 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Utils/DBHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using MySql.Data.MySqlClient;
6 | using System.Configuration;
7 | using System.Data;
8 | using System.Data.SqlClient;
9 |
10 | namespace EShow.Utils
11 | {
12 | public class DBHelper
13 | {
14 | private static string ConnSqlServer = ConfigurationManager.ConnectionStrings["ConnSQLServer"].ConnectionString;
15 | private static string ConnMySQL = ConfigurationManager.ConnectionStrings["ConnMySQL"].ConnectionString;
16 | private static string DbType = ConfigurationManager.AppSettings["DbType"];
17 | //获取MySql的连接数据库对象。MySqlConnection
18 | public static IDbConnection OpenConnection()
19 | {
20 | IDbConnection connection = null;
21 | if (DbType == "MySQL")
22 | connection = new MySqlConnection(ConnMySQL);
23 | else if (DbType == "SQLServer")
24 | connection = new SqlConnection(ConnSqlServer);
25 | else
26 | throw new Exception("为实现此数据库");
27 | connection.Open();
28 | return connection;
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/EShow_Web/EShow/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/EShow_Html/preview.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 单页WEBAPP后台
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 | using System.Web.Routing;
7 |
8 | namespace EShow
9 | {
10 | // 注意: 有关启用 IIS6 或 IIS7 经典模式的说明,
11 | // 请访问 http://go.microsoft.com/?LinkId=9394801
12 |
13 | public class MvcApplication : System.Web.HttpApplication
14 | {
15 | public static void RegisterGlobalFilters(GlobalFilterCollection filters)
16 | {
17 | filters.Add(new HandleErrorAttribute());
18 | }
19 |
20 | public static void RegisterRoutes(RouteCollection routes)
21 | {
22 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
23 |
24 | routes.MapRoute(
25 | "Default", // 路由名称
26 | "{controller}/{action}/{id}", // 带有参数的 URL
27 | new { controller = "Home", action = "Index", id = UrlParameter.Optional } // 参数默认值
28 | );
29 |
30 | }
31 |
32 | protected void Application_Start()
33 | {
34 | AreaRegistration.RegisterAllAreas();
35 |
36 | RegisterGlobalFilters(GlobalFilters.Filters);
37 | RegisterRoutes(RouteTable.Routes);
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/EShow_Web/EShow/EShow.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 | local
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | SpecificPage
14 | True
15 | False
16 | False
17 | False
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | False
27 | True
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/EShow_Html/content/js/preview.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 | //自动缩放
3 | var wrapW = $("#phonescreen").width();
4 | var percent = Math.round(wrapW/322*100)+"%";
5 | $("html").css("font-size",percent);
6 |
7 | //加载html
8 | var html = localStorage.webAppHTML;
9 | if(html){
10 | $("#phonescreen").html(html);
11 | }
12 |
13 | //滑屏效果
14 | runSection = new FullPage({
15 | id : 'phonescreen', // id of contain
16 | slideTime : 800, // time of slide
17 | effect : { // slide effect
18 | transform : {
19 | translate : 'Y', // 'X'|'Y'|'XY'|'none'
20 | scale : [0, 1], // [scalefrom, scaleto]
21 | rotate : [0, 0] // [rotatefrom, rotateto]
22 | },
23 | opacity : [0, 1] // [opacityfrom, opacityto]
24 | },
25 | mode : 'touch,wheel', // mode of fullpage
26 | easing : [0, .93, .39, .98],
27 | callback : function(index, thisPage) { // callback when pageChange
28 | if (index === 0) {
29 | //autoPlay(runPage.thisPage() + 1);
30 | } else {
31 | //clearTimeout(interval);
32 | }
33 | }
34 | });
35 |
36 | //音乐按钮
37 | $("#audio_btn").click(function(){
38 | var className = $(this).attr("class");
39 | if(className.indexOf("rotate")!=-1){
40 | $(this).removeClass("rotate");
41 | $("#media")[0].pause();
42 | }
43 | else{
44 | $(this).addClass("rotate");
45 | $("#media")[0].play();
46 | }
47 | });
48 | });
--------------------------------------------------------------------------------
/EShow_Html/content/images/normalmusic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/images/normalmusic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/js/preview.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | //自动缩放
3 | var wrapW = $("#phonescreen").width();
4 | var percent = Math.round(wrapW / 322 * 100) + "%";
5 | $("html").css("font-size", percent);
6 | var audioDiv = $("#audio_btn");
7 | var audioDivHtml = audioDiv.prop("outerHTML");
8 | $(document.body).append(audioDivHtml);
9 | audioDiv.remove();
10 | //滑屏效果
11 | runSection = new FullPage({
12 | id: 'phonescreen', // id of contain
13 | slideTime: 800, // time of slide
14 | effect: { // slide effect
15 | transform: {
16 | translate: 'Y', // 'X'|'Y'|'XY'|'none'
17 | scale: [0, 1], // [scalefrom, scaleto]
18 | rotate: [0, 0] // [rotatefrom, rotateto]
19 | },
20 | opacity: [0, 1] // [opacityfrom, opacityto]
21 | },
22 | mode: 'touch,wheel', // mode of fullpage
23 | easing: [0, .93, .39, .98],
24 | callback: function (index, thisPage) { // callback when pageChange
25 | if (index === 0) {
26 | //autoPlay(runPage.thisPage() + 1);
27 | } else {
28 | //clearTimeout(interval);
29 | }
30 | }
31 | });
32 |
33 | //音乐按钮
34 | $("#audio_btn").click(function () {
35 | var className = $(this).attr("class");
36 | if (className.indexOf("rotate") != -1) {
37 | $(this).removeClass("rotate");
38 | $("#media")[0].pause();
39 | }
40 | else {
41 | $(this).addClass("rotate");
42 | $("#media")[0].play();
43 | }
44 | });
45 | });
--------------------------------------------------------------------------------
/EShow_Web/EShow/Service/ResourceService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Data;
6 | using EShow.Utils;
7 | using Dapper;
8 |
9 | namespace EShow.Service
10 | {
11 | public class ResourceService
12 | {
13 | public static List GetResourceListByType(int type)
14 | {
15 | List list = null;
16 | string sql = "select * from resource where isdelete = 0 and type=@type order by resourceid desc";
17 | using (IDbConnection conn = DBHelper.OpenConnection())
18 | {
19 | list = conn.Query(sql, new { type = type }).ToList();
20 | }
21 | return list;
22 | }
23 |
24 | public static int AddResource(Models.Resource resource)
25 | {
26 | int id = 0;
27 | string sql = @"INSERT INTO resource
28 | (Name,
29 | Path,
30 | Tip,
31 | Type,
32 | CreateTime,
33 | Creator,
34 | IsDelete)
35 | VALUES
36 | (@Name,
37 | @Path,
38 | @Tip,
39 | @Type,
40 | @CreateTime,
41 | @Creator,
42 | 0);select @@IDENTITY";
43 | using (IDbConnection conn = DBHelper.OpenConnection())
44 | {
45 | id = conn.Query(sql,resource).FirstOrDefault();
46 | }
47 | return id;
48 | }
49 |
50 | public static void DeleteResourceById(int id)
51 | {
52 | string sql = @"update resource set isdelete = 1 where resourceid=@id";
53 | using (IDbConnection conn = DBHelper.OpenConnection())
54 | {
55 | conn.Execute(sql, new { id = id });
56 | }
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/EShow_Html/content/js/panelEvent.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 | $("#addApp").click(function(){
3 | var name = prompt("请输入应用的名称","")
4 | if(name){
5 | console.log(name);
6 | }
7 | });
8 |
9 | //用click 样式可能会有问题
10 | $("#leftTab").bind("mousedown",function(e){
11 | var target = $(e.target);
12 | var className = target.attr("class");
13 | if(className=="current"){
14 | return;
15 | }
16 | target.parent().find("span").removeAttr("class");
17 | target.parent().parent().find(".content").hide();
18 | target.attr("class","current");
19 | var contentId = target.attr("target");
20 | $("#"+contentId).show();
21 | e.preventDefault();
22 | });
23 |
24 | $("#bgPanelClose").click(function(){
25 | $("#bgPanel").hide();
26 | $(".cover").hide();
27 | });
28 | $("#picPanelClose").click(function(){
29 | $("#picPanel").hide();
30 | $(".cover").hide();
31 | });
32 | $("#animatPanelClose").click(function(){
33 | $("#animatPanel").hide();
34 | $(".cover").hide();
35 | });
36 | //动画选择方式
37 | $("#animatType").bind("change",function(){
38 | var type = Number($("#animatType option:selected").val());
39 | if(type==0||type==1){
40 | $("#animatDirectionTr").hide();
41 | }
42 | else{
43 | $("#animatDirectionTr").show();
44 | }
45 | });
46 |
47 | //动画面板 点击确定
48 | $("#animatPanelOK").click(function(){
49 | var val = Number($("#animatType option:selected").val());
50 | if(val == 0){
51 | etouch.editTarget.css("animation","");
52 | $("#animatPanel").hide();
53 | return;
54 | }
55 | var direct = Number($("#animatDirection option:selected").val());
56 | var name = '';
57 | switch(val){
58 | case 3:
59 | name="bounceIn";
60 | break;
61 | case 2:
62 | name="fadeIn";
63 | break;
64 | case 1:
65 | name="fadeIn";
66 | break;
67 | }
68 | if(val==2||val==3){
69 | switch(direct){
70 | case 3:
71 | name+="Up";
72 | break;
73 | case 2:
74 | name+="Right";
75 | break;
76 | case 1:
77 | name+="Down";
78 | break;
79 | case 0:
80 | name+="Left";
81 | break;
82 | }
83 | }
84 | var animatTime = $("#animatTime").val();
85 | var animatDelay = $("#animatDelay").val();
86 | var animatTimes = $("#animatTimes").val();
87 | var animatInfinite = $("#animatInfinite:checked").val();
88 | var count=animatInfinite=="on"?"infinite":animatTimes;
89 | var animateVal=name + " " + animatTime+"s linear "+animatDelay+"s "+count;
90 | etouch.editTarget.css("animation",animateVal);
91 | $("#animatPanel").hide();
92 | $(".cover").hide();
93 | });
94 | })
--------------------------------------------------------------------------------
/EShow_Web/EShow/Views/Web.config:
--------------------------------------------------------------------------------
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 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
39 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
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 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Service/WebAppService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Data;
6 | using EShow.Utils;
7 | using Dapper;
8 |
9 | namespace EShow.Service
10 | {
11 | public class WebAppService
12 | {
13 | public static List GetAppList()
14 | {
15 | List list = null;
16 | string sql = @"select AppId,Name,CreateTime,Creator,State,IsDelete
17 | from webapp where isdelete = 0 order by appid desc";
18 | using (IDbConnection conn = DBHelper.OpenConnection())
19 | {
20 | list = conn.Query(sql).ToList();
21 | }
22 | return list;
23 | }
24 |
25 | public static Models.WebApp GetAppById(int id)
26 | {
27 | Models.WebApp model = null;
28 | string sql = @"select * from webapp where AppId=@id";
29 | using (IDbConnection conn = DBHelper.OpenConnection())
30 | {
31 | model = conn.Query(sql, new { id = id }).FirstOrDefault();
32 | }
33 | return model;
34 | }
35 |
36 | public static int AddApp(Models.WebApp model)
37 | {
38 | int id = 0;
39 | string sql = @"INSERT INTO webapp
40 | (Name,
41 | DesignHTML,
42 | PreviewHTML,
43 | CreateTime,
44 | Creator,
45 | State,
46 | IsDelete)
47 | VALUES
48 | (@Name,
49 | @DesignHTML,
50 | @PreviewHTML,
51 | @CreateTime,
52 | @Creator,
53 | @State,0);select @@IDENTITY";
54 | using (IDbConnection conn = DBHelper.OpenConnection())
55 | {
56 | id = conn.Query(sql, model).FirstOrDefault();
57 | }
58 | return id;
59 | }
60 |
61 | public static void UpdateApp(Models.WebApp model)
62 | {
63 | string sql = @"UPDATE webapp
64 | SET
65 | Name = @Name,
66 | DesignHTML = @DesignHTML,
67 | PreviewHTML = @PreviewHTML,
68 | State = @State
69 | WHERE AppId = @AppId";
70 | using (IDbConnection conn = DBHelper.OpenConnection())
71 | {
72 | conn.Execute(sql, model);
73 | }
74 | }
75 |
76 | public static void DeleteAppById(int id)
77 | {
78 | string sql = @"UPDATE webapp
79 | SET
80 | isdelete = 1
81 | WHERE AppId = @id";
82 | using (IDbConnection conn = DBHelper.OpenConnection())
83 | {
84 | conn.Execute(sql, new { id = id });
85 | }
86 | }
87 | }
88 | }
--------------------------------------------------------------------------------
/EShow_Web/EShow/Controllers/HomeAjaxController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 | using EShow.Service;
7 | using EShow.DTO;
8 |
9 | namespace EShow.Controllers
10 | {
11 | public class HomeAjaxController : Controller
12 | {
13 | ///
14 | /// 根据TYPE获取图片、音乐等资源
15 | ///
16 | ///
17 | ///
18 | public ActionResult GetResource(int type)
19 | {
20 | var list = ResourceService.GetResourceListByType(type);
21 | return Json(list.Select(o => new { id = o.ResourceId, name = o.Name, path = o.Path, type = o.Type }));
22 | }
23 |
24 | ///
25 | /// 获取APP列表
26 | ///
27 | ///
28 | public ActionResult GetAppList()
29 | {
30 | var list = WebAppService.GetAppList();
31 | return Json(list);
32 | }
33 |
34 | ///
35 | /// 根据id删除app
36 | ///
37 | ///
38 | ///
39 | public ActionResult DeleteAppById(int id)
40 | {
41 | try
42 | {
43 | WebAppService.DeleteAppById(id);
44 | return Json(new BaseResp()
45 | {
46 | success = true
47 | });
48 | }
49 | catch (Exception ex)
50 | {
51 | return Json(new BaseResp()
52 | {
53 | success = false,
54 | message = ex.Message
55 | });
56 | }
57 | }
58 |
59 | ///
60 | /// 根据id获取App
61 | ///
62 | ///
63 | ///
64 | public ActionResult GetAppById(int id)
65 | {
66 | var app = WebAppService.GetAppById(id);
67 | return Json(app);
68 | }
69 |
70 | ///
71 | /// 保存APP
72 | ///
73 | ///
74 | ///
75 | ///
76 | ///
77 | ///
78 | ///
79 | public ActionResult SaveApp(string webAppHTML,
80 | string designHTML, int id, string name, int state)
81 | {
82 | if (string.IsNullOrEmpty(name))
83 | {
84 | return Json(new BaseResp()
85 | {
86 | success = false,
87 | message = "名称不能为空"
88 | });
89 | }
90 | try
91 | {
92 | if (id > 0)
93 | {
94 | WebAppService.UpdateApp(new Models.WebApp()
95 | {
96 | AppId = id,
97 | DesignHTML = designHTML,
98 | Name = name,
99 | PreviewHTML = webAppHTML,
100 | State = state
101 | });
102 | }
103 | else
104 | {
105 | id = WebAppService.AddApp(new Models.WebApp()
106 | {
107 | DesignHTML = designHTML,
108 | IsDelete = false,
109 | Name = name,
110 | PreviewHTML = webAppHTML,
111 | State = state,
112 | CreateTime = DateTime.Now,
113 | Creator = ""
114 | });
115 | }
116 | return Json(new BaseResp()
117 | {
118 | success = true,
119 | data = id
120 | });
121 | }
122 | catch (Exception ex)
123 | {
124 | return Json(new BaseResp()
125 | {
126 | success = false,
127 | message = ex.Message
128 | });
129 | }
130 | }
131 |
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Controllers/HomeController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Mvc;
6 | using System.Text;
7 | using EShow.Enum;
8 | using EShow.Service;
9 | using System.IO;
10 |
11 | namespace EShow.Controllers
12 | {
13 | public class HomeController : Controller
14 | {
15 | ///
16 | /// 首页
17 | ///
18 | ///
19 | public ActionResult Index()
20 | {
21 | return View();
22 | }
23 |
24 | ///
25 | /// 预览页面
26 | ///
27 | ///
28 | ///
29 | public ActionResult Preview(int id)
30 | {
31 | if (id <= 0)
32 | {
33 | return Content("id错误");
34 | }
35 | Models.WebApp app = WebAppService.GetAppById(id);
36 | return View(app);
37 | }
38 |
39 | ///
40 | /// 上传资源
41 | ///
42 | ///
43 | ///
44 | [HttpPost]
45 | public ActionResult Upload(int type)
46 | {
47 | string result = "";
48 | if (type <1 || type >4)
49 | {
50 | return Content(string.Format(result, "false", "附件类型错误", ""));
51 | }
52 | string allowExt = string.Empty;
53 | string directName = string.Empty;
54 | switch (type)
55 | {
56 | case 1:
57 | directName = "bgpic";
58 | allowExt = ".jpg|.gif|.png";
59 | break;
60 | case 2:
61 | directName = "pagepic";
62 | allowExt = ".jpg|.gif|.png";
63 | break;
64 | case 3:
65 | directName = "audio";
66 | allowExt = ".mp3";
67 | break;
68 | case 4:
69 | directName = "vedio";
70 | allowExt = ".mp4";
71 | break;
72 | }
73 | StringBuilder strMsg = new StringBuilder();
74 | HttpFileCollectionBase fileList = Request.Files;
75 | HttpPostedFileBase postedFile = fileList[0];
76 | string fileName, fileExtension;
77 | fileName = System.IO.Path.GetFileName(postedFile.FileName);
78 | if (string.IsNullOrEmpty(fileName))
79 | {
80 | return Content(string.Format(result, "false", "上传文件为空", ""));
81 | }
82 | fileExtension = System.IO.Path.GetExtension(fileName);
83 |
84 | if (allowExt.IndexOf(fileExtension) == -1)
85 | {
86 | return Content(string.Format(result, "false", "不允许的附件类型", ""));
87 | }
88 | //strMsg.Append("上传的文件类型:" + postedFile.ContentType.ToString() + "
");
89 | //strMsg.Append("客户端文件地址:" + postedFile.FileName + "
");
90 | //strMsg.Append("上传文件的文件名:" + fileName + "
");
91 | //strMsg.Append("上传文件的扩展名:" + fileExtension + "
");
92 |
93 | ///'可根据扩展名字的不同保存到不同的文件夹
94 | ///注意:可能要修改你的文件夹的匿名写入权限
95 | var newfileName = Guid.NewGuid() + fileExtension;
96 | var path = System.Web.HttpContext.Current.Request.MapPath("/Upload/" + directName + "/");
97 | if (!Directory.Exists(path))
98 | {
99 | Directory.CreateDirectory(path);
100 | }
101 | var filePath = path + newfileName;
102 | var virtualPath = "/Upload/" + directName + "/" + newfileName;
103 | try
104 | {
105 | postedFile.SaveAs(filePath);
106 | ResourceService.AddResource(new Models.Resource()
107 | {
108 | CreateTime = DateTime.Now,
109 | Type = type,
110 | Creator = "",
111 | IsDelete = false,
112 | Name = fileName,
113 | Path = virtualPath,
114 | Tip = ""
115 | });
116 | return Content(string.Format(result, "true", "", virtualPath));
117 | }
118 | catch (Exception ex)
119 | {
120 | return Content(string.Format(result, "false", ex.Message, ""));
121 | }
122 | }
123 |
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/js/template.js:
--------------------------------------------------------------------------------
1 | /*!art-template - Template Engine | http://aui.github.com/artTemplate/*/
2 | !function(){function a(a){return a.replace(t,"").replace(u,",").replace(v,"").replace(w,"").replace(x,"").split(y)}function b(a){return"'"+a.replace(/('|\\)/g,"\\$1").replace(/\r/g,"\\r").replace(/\n/g,"\\n")+"'"}function c(c,d){function e(a){return m+=a.split(/\n/).length-1,k&&(a=a.replace(/\s+/g," ").replace(//g,"")),a&&(a=s[1]+b(a)+s[2]+"\n"),a}function f(b){var c=m;if(j?b=j(b,d):g&&(b=b.replace(/\n/g,function(){return m++,"$line="+m+";"})),0===b.indexOf("=")){var e=l&&!/^=[=#]/.test(b);if(b=b.replace(/^=[=#]?|[\s;]*$/g,""),e){var f=b.replace(/\s*\([^\)]+\)/,"");n[f]||/^(include|print)$/.test(f)||(b="$escape("+b+")")}else b="$string("+b+")";b=s[1]+b+s[2]}return g&&(b="$line="+c+";"+b),r(a(b),function(a){if(a&&!p[a]){var b;b="print"===a?u:"include"===a?v:n[a]?"$utils."+a:o[a]?"$helpers."+a:"$data."+a,w+=a+"="+b+",",p[a]=!0}}),b+"\n"}var g=d.debug,h=d.openTag,i=d.closeTag,j=d.parser,k=d.compress,l=d.escape,m=1,p={$data:1,$filename:1,$utils:1,$helpers:1,$out:1,$line:1},q="".trim,s=q?["$out='';","$out+=",";","$out"]:["$out=[];","$out.push(",");","$out.join('')"],t=q?"$out+=text;return $out;":"$out.push(text);",u="function(){var text=''.concat.apply('',arguments);"+t+"}",v="function(filename,data){data=data||$data;var text=$utils.$include(filename,data,$filename);"+t+"}",w="'use strict';var $utils=this,$helpers=$utils.$helpers,"+(g?"$line=0,":""),x=s[0],y="return new String("+s[3]+");";r(c.split(h),function(a){a=a.split(i);var b=a[0],c=a[1];1===a.length?x+=e(b):(x+=f(b),c&&(x+=e(c)))});var z=w+x+y;g&&(z="try{"+z+"}catch(e){throw {filename:$filename,name:'Render Error',message:e.message,line:$line,source:"+b(c)+".split(/\\n/)[$line-1].replace(/^\\s+/,'')};}");try{var A=new Function("$data","$filename",z);return A.prototype=n,A}catch(B){throw B.temp="function anonymous($data,$filename) {"+z+"}",B}}var d=function(a,b){return"string"==typeof b?q(b,{filename:a}):g(a,b)};d.version="3.0.0",d.config=function(a,b){e[a]=b};var e=d.defaults={openTag:"<%",closeTag:"%>",escape:!0,cache:!0,compress:!1,parser:null},f=d.cache={};d.render=function(a,b){return q(a,b)};var g=d.renderFile=function(a,b){var c=d.get(a)||p({filename:a,name:"Render Error",message:"Template not found"});return b?c(b):c};d.get=function(a){var b;if(f[a])b=f[a];else if("object"==typeof document){var c=document.getElementById(a);if(c){var d=(c.value||c.innerHTML).replace(/^\s*|\s*$/g,"");b=q(d,{filename:a})}}return b};var h=function(a,b){return"string"!=typeof a&&(b=typeof a,"number"===b?a+="":a="function"===b?h(a.call(a)):""),a},i={"<":"<",">":">",'"':""","'":"'","&":"&"},j=function(a){return i[a]},k=function(a){return h(a).replace(/&(?![\w#]+;)|[<>"']/g,j)},l=Array.isArray||function(a){return"[object Array]"==={}.toString.call(a)},m=function(a,b){var c,d;if(l(a))for(c=0,d=a.length;d>c;c++)b.call(a,a[c],c,a);else for(c in a)b.call(a,a[c],c)},n=d.utils={$helpers:{},$include:g,$string:h,$escape:k,$each:m};d.helper=function(a,b){o[a]=b};var o=d.helpers=n.$helpers;d.onerror=function(a){var b="Template Error\n\n";for(var c in a)b+="<"+c+">\n"+a[c]+"\n\n";"object"==typeof console&&console.error(b)};var p=function(a){return d.onerror(a),function(){return"{Template Error}"}},q=d.compile=function(a,b){function d(c){try{return new i(c,h)+""}catch(d){return b.debug?p(d)():(b.debug=!0,q(a,b)(c))}}b=b||{};for(var g in e)void 0===b[g]&&(b[g]=e[g]);var h=b.filename;try{var i=c(a,b)}catch(j){return j.filename=h||"anonymous",j.name="Syntax Error",p(j)}return d.prototype=i.prototype,d.toString=function(){return i.toString()},h&&b.cache&&(f[h]=d),d},r=n.$each,s="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,undefined",t=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|\s*\.\s*[$\w\.]+/g,u=/[^\w$]+/g,v=new RegExp(["\\b"+s.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),w=/^\d[^,]*|,\d[^,]*/g,x=/^,+|,+$/g,y=/^$|,+/;e.openTag="{{",e.closeTag="}}";var z=function(a,b){var c=b.split(":"),d=c.shift(),e=c.join(":")||"";return e&&(e=", "+e),"$helpers."+d+"("+a+e+")"};e.parser=function(a){a=a.replace(/^\s/,"");var b=a.split(" "),c=b.shift(),e=b.join(" ");switch(c){case"if":a="if("+e+"){";break;case"else":b="if"===b.shift()?" if("+b.join(" ")+")":"",a="}else"+b+"{";break;case"/if":a="}";break;case"each":var f=b[0]||"$data",g=b[1]||"as",h=b[2]||"$value",i=b[3]||"$index",j=h+","+i;"as"!==g&&(f="[]"),a="$each("+f+",function("+j+"){";break;case"/each":a="});";break;case"echo":a="print("+e+");";break;case"print":case"include":a=c+"("+b.join(",")+");";break;default:if(/^\s*\|\s*[\w\$]/.test(e)){var k=!0;0===a.indexOf("#")&&(a=a.substr(1),k=!1);for(var l=0,m=a.split("|"),n=m.length,o=m[l++];n>l;l++)o=z(o,m[l]);a=(k?"=":"=#")+o}else a=d.helpers[c]?"=#"+c+"("+b.join(",")+");":"="+a}return a},"function"==typeof define?define(function(){return d}):"undefined"!=typeof exports?module.exports=d:this.template=d}();
--------------------------------------------------------------------------------
/EShow_Web/EShow/Properties/PublishProfiles/local.pubxml.user:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 | <_PublishTargetUrl>C:\publish\yqx
10 |
11 |
12 |
13 | 11/24/2015 14:16:58
14 |
15 |
16 | 11/24/2015 14:16:58
17 |
18 |
19 | 11/23/2015 16:50:48
20 |
21 |
22 | 11/24/2015 14:16:56
23 |
24 |
25 | 01/05/2011 15:45:38
26 |
27 |
28 | 11/23/2015 16:50:48
29 |
30 |
31 | 01/05/2011 15:45:38
32 |
33 |
34 | 01/05/2011 17:42:16
35 |
36 |
37 | 01/05/2011 15:45:38
38 |
39 |
40 | 01/05/2011 15:45:38
41 |
42 |
43 | 01/05/2011 15:45:38
44 |
45 |
46 | 01/05/2011 15:45:38
47 |
48 |
49 | 01/10/2011 11:11:10
50 |
51 |
52 | 01/10/2011 11:11:12
53 |
54 |
55 | 01/12/2011 18:24:24
56 |
57 |
58 | 01/10/2011 11:11:10
59 |
60 |
61 | 01/10/2011 11:11:20
62 |
63 |
64 | 01/10/2011 11:11:26
65 |
66 |
67 | 01/10/2011 11:11:30
68 |
69 |
70 | 11/23/2015 16:50:48
71 |
72 |
73 | 11/23/2015 16:50:48
74 |
75 |
76 | 11/23/2015 16:50:48
77 |
78 |
79 | 11/23/2015 16:50:48
80 |
81 |
82 | 11/23/2015 16:50:48
83 |
84 |
85 | 11/23/2015 16:50:48
86 |
87 |
88 | 11/23/2015 16:50:48
89 |
90 |
91 | 11/23/2015 16:50:48
92 |
93 |
94 | 11/23/2015 16:50:48
95 |
96 |
97 | 11/23/2015 16:50:48
98 |
99 |
100 | 11/23/2015 16:50:48
101 |
102 |
103 | 11/23/2015 16:50:48
104 |
105 |
106 | 11/23/2015 18:11:41
107 |
108 |
109 | 11/23/2015 16:50:48
110 |
111 |
112 | 11/24/2015 09:41:56
113 |
114 |
115 | 11/23/2015 16:50:48
116 |
117 |
118 | 11/23/2015 17:49:48
119 |
120 |
121 | 11/23/2015 16:50:48
122 |
123 |
124 | 11/23/2015 16:50:48
125 |
126 |
127 | 11/23/2015 16:50:48
128 |
129 |
130 | 11/23/2015 16:50:48
131 |
132 |
133 | 11/24/2015 14:16:57
134 |
135 |
136 | 11/23/2015 16:50:48
137 |
138 |
139 | 11/23/2015 16:50:48
140 |
141 |
142 | 11/23/2015 16:50:48
143 |
144 |
145 | 11/23/2015 16:50:48
146 |
147 |
148 | 11/23/2015 16:50:48
149 |
150 |
151 | 11/23/2015 16:50:48
152 |
153 |
154 | 11/23/2015 16:50:48
155 |
156 |
157 | 11/23/2015 16:50:48
158 |
159 |
160 | 11/23/2015 16:50:48
161 |
162 |
163 | 11/24/2015 14:16:56
164 |
165 |
166 |
--------------------------------------------------------------------------------
/EShow_Html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 单页WEBAPP后台
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | - 预览
22 |
23 |
24 |
25 |
26 |
27 | 我的
28 | 模板
29 |
30 |
31 |
单红包
32 |
优惠券
33 |
大转盘
34 |
35 |
36 |
37 |
38 |
+
39 |
40 |
41 |
42 |
43 |
44 |
47 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
+
87 |
88 |
89 |
90 |
91 |
92 |
背景素材库
93 |
94 |
95 |
96 |
97 | 取消
98 |
99 |
100 |
101 |
102 |
图片素材库
103 |
104 |
105 |
106 |
107 | 取消
108 |
109 |
110 |
111 |
112 |
动画库
113 |
159 |
160 | 取消
161 | 确定
162 |
163 |
164 |
165 |
166 |
168 |
171 |
174 |
177 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
195 |
196 |
197 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "主页";
3 | }
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | - 预览
17 |
18 |
19 |
20 |
21 |
22 | 我的
23 | 模板
24 |
25 |
26 |
27 |
28 |
29 |
30 |
+
31 |
32 |
33 |
34 |
35 |
36 |
39 |
40 |
41 |
42 |
45 |
53 |
54 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
+
82 |
83 |
84 |
85 |
90 |
91 |
92 |
背景素材库
93 |
94 |
95 |
96 |
97 | 取消
98 | 上传
99 |
100 |
101 |
102 |
103 |
图片素材库
104 |
105 |
106 |
107 |
108 | 取消
109 | 上传
110 |
111 |
112 |
113 |
114 |
音乐素材库
115 |
116 |
117 |
118 |
119 | 取消
120 | 上传
121 |
122 |
123 |
124 |
125 |
动画库
126 |
172 |
173 | 取消
174 | 确定
175 |
176 |
177 |
178 |
179 |
181 |
184 |
187 |
190 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
212 | @section script
213 | {
214 |
215 |
216 |
217 |
218 |
219 |
220 | }
221 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/EShow.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 |
8 |
9 | 2.0
10 | {0BB43931-C043-4D51-AFC6-C09B39C2E381}
11 | {E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
12 | Library
13 | Properties
14 | EShow
15 | EShow
16 | v4.0
17 | false
18 | false
19 | true
20 |
21 |
22 |
23 |
24 | 4.0
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | true
33 | full
34 | false
35 | bin\
36 | DEBUG;TRACE
37 | prompt
38 | 4
39 |
40 |
41 | pdbonly
42 | true
43 | bin\
44 | TRACE
45 | prompt
46 | 4
47 |
48 |
49 |
50 | False
51 | DLL\Dapper.dll
52 |
53 |
54 | False
55 | DLL\MySql.Data.dll
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | Global.asax
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | Designer
121 |
122 |
123 | Web.config
124 |
125 |
126 | Web.config
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | 10.0
157 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
158 |
159 |
160 |
161 |
162 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 | False
176 | True
177 | 55994
178 | /
179 |
180 |
181 | False
182 | False
183 |
184 |
185 | False
186 |
187 |
188 |
189 |
190 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/js/panelEvent.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | //设置图片 背景图
3 | getResource(1);
4 | getResource(2);
5 | getResource(3);
6 | loadAppList();
7 | var audio = $("#media")[0];
8 | playPause = function (obj) {
9 | var control = $(obj);
10 | var path = control.attr("path");
11 | if (control.attr("class") == "pause") {
12 | control.removeClass("pause");
13 | audio.pause();
14 | }
15 | else {
16 | audio.pause();
17 | $("#audioList").find(".pause").removeClass("pause");
18 | control.addClass("pause");
19 | if (audio.src.endsWith(path) == false) {
20 | audio.src = path;
21 | }
22 | audio.play();
23 | }
24 | }
25 | setBgAudio = function (obj) {
26 | var path = $(obj).attr("path");
27 | $("#audioPanel").hide();
28 | $("#audio_btn").show();
29 | $("#media").attr("src", path);
30 | audio.pause();
31 | $(".cover").hide();
32 | }
33 | preview = function () {
34 | var id = Number($("#webappId").val());
35 | if (id <= 0) {
36 | alert("请选择要预览的APP");
37 | return;
38 | }
39 | else {
40 | window.open("/home/preview?id=" + id);
41 | }
42 | }
43 | //显示左侧con_my的tab
44 | showAppTab = function (id) {
45 | var selectedId = getSelectedAppId();
46 | // if (selectedId == id) {
47 | // window.event.stopPropagation();
48 | // return;
49 | // }
50 | if (id != selectedId && selectedId != -1) {
51 | // if (confirm("您还未保存,需要保存么?")) {
52 | // $("#menuSave").click();
53 | // }
54 | // else {
55 | // return;
56 | // }
57 | }
58 | $("#con_my .current").removeClass("current");
59 | $("#appTab" + id).addClass("current");
60 | $.post('/homeajax/getappbyid', { id: id }, function (obj) {
61 | etouch.clear();
62 | localStorage.designHTML = decodeURIComponent(obj.DesignHTML);
63 | $(".scene_title").text(obj.Name);
64 | $("#webappId").val(obj.AppId);
65 | $("#webappName").val(obj.Name);
66 | etouch.loadData();
67 | });
68 | }
69 |
70 | function getSelectedAppId() {
71 | if ($("#con_my .current").size() <= 0) {
72 | return -1;
73 | }
74 | var selectedId = $("#con_my .current").attr("id").replace("appTab", "");
75 | selectedId = Number(selectedId);
76 | return selectedId;
77 | }
78 |
79 | deleteApp = function (id) {
80 | if (confirm("确定要删除么?")) {
81 | var selectedId = getSelectedAppId();
82 | $.post('/homeajax/deleteappbyid', { id: id }, function (obj) {
83 | etouch.clear();
84 | if (id == selectedId) {
85 | loadAppList();
86 | }
87 | else {
88 | //loadAppList(selectedId);
89 | }
90 | });
91 | }
92 | }
93 |
94 | function saveWebApp() {
95 | etouch.save();
96 | var name = $("#webappName").val();
97 | var webappId = $("#webappId").val();
98 | if (name == '' || name == null) {
99 | name = prompt("请输入应用的名称", "")
100 | if (!name) {
101 | return;
102 | }
103 | }
104 | var data = {
105 | webAppHTML: encodeURIComponent(localStorage.webAppHTML),
106 | designHTML: encodeURIComponent(localStorage.designHTML),
107 | id: webappId,
108 | name: name,
109 | state: 1
110 | };
111 | $.post('/homeajax/saveapp', data, function (obj) {
112 | console.log(obj);
113 | if (obj.success) {
114 | //加载app列表
115 | loadAppList(obj.data);
116 | $("#webappId").val(obj.data);
117 | }
118 | else {
119 | alert("保存失败");
120 | }
121 | });
122 | }
123 |
124 | //保存
125 | $("#menuSave").click(saveWebApp);
126 |
127 | function loadAppList(selectedIndex) {
128 | localStorage.designHTML = "";
129 | $.post('/homeajax/getapplist', function (obj) {
130 | $("#con_my").html("");
131 | if (obj instanceof Array && obj.length > 0) {
132 | for (var i = 0; i < obj.length; i++) {
133 | var app = obj[i];
134 | if (i == 0 && selectedIndex == undefined) {
135 | selectedIndex = app.AppId;
136 | }
137 | $("#con_my").append("" + app.Name + "╳
");
138 | }
139 | showAppTab(selectedIndex);
140 | }
141 | else {
142 | etouch.clear();
143 | }
144 | });
145 | }
146 |
147 | //上传回调
148 | uploadCallBack = function (obj) {
149 | console.log(obj);
150 | if (obj.success == true) {
151 | getResource(obj.type);
152 | }
153 | else {
154 | alert(obj.message);
155 | }
156 | }
157 |
158 | function getResource(type) {
159 | $.ajax({
160 | url: '/homeajax/getresource?type=' + type + '&v=' + new Date().getTime(),
161 | type: 'POST',
162 | success: function (obj) {
163 | if (type == 1) { $("#bgPicList").html(""); }
164 | else if (type == 2) { $("#picList").html(""); }
165 | else if (type == 3) { $("#audioList").html(""); }
166 | if (obj instanceof Array) {
167 | if (type == 3) {
168 | audio.pause();
169 | var html = template('audioTmp', obj);
170 | document.getElementById('audioList').innerHTML = html;
171 | return;
172 | }
173 | for (var i = 0; i < obj.length; i++) {
174 | var id = obj[i].id;
175 | var path = obj[i].path;
176 | if (type == 1) {
177 | $("#bgPicList").append("
");
178 | }
179 | else if (type == 2) {
180 | $("#picList").append("
");
181 | }
182 | else if (type == 4) {
183 |
184 | }
185 | }
186 | }
187 | }
188 | });
189 | }
190 |
191 | $("#file").bind("change", function (e) {
192 | if (e.target.value) {
193 | $("#formUpload").submit();
194 | }
195 | });
196 |
197 | $("#bgPanelUpload").click(function () {
198 | $("#type").val(1);
199 | $("#file").click();
200 | });
201 |
202 | $("#picPanelUpload").click(function () {
203 | $("#type").val(2);
204 | $("#file").click();
205 | });
206 |
207 | //添加app
208 | $("#addApp").click(function (e) {
209 | var name = prompt("请输入应用的名称", "")
210 | if (name) {
211 | etouch.clear();
212 | $(".scene_title").text(name);
213 | $("#webappId").val(0);
214 | $("#webappName").val(name);
215 | saveWebApp();
216 | }
217 | });
218 |
219 | //用click 样式可能会有问题
220 | $("#leftTab").bind("mousedown", function (e) {
221 | var target = $(e.target);
222 | var className = target.attr("class");
223 | if (className == "current") {
224 | return;
225 | }
226 | target.parent().find("span").removeAttr("class");
227 | target.parent().parent().find(".content").hide();
228 | target.attr("class", "current");
229 | var contentId = target.attr("target");
230 | $("#" + contentId).show();
231 | e.preventDefault();
232 | });
233 |
234 | $("#bgPanelClose").click(function () {
235 | $("#bgPanel").hide();
236 | $(".cover").hide();
237 | });
238 | $("#picPanelClose").click(function () {
239 | $("#picPanel").hide();
240 | $(".cover").hide();
241 | });
242 | $("#animatPanelClose").click(function () {
243 | $("#animatPanel").hide();
244 | $(".cover").hide();
245 | });
246 | //动画选择方式
247 | $("#animatType").bind("change", function () {
248 | var type = Number($("#animatType option:selected").val());
249 | if (type == 0 || type == 1) {
250 | $("#animatDirectionTr").hide();
251 | }
252 | else {
253 | $("#animatDirectionTr").show();
254 | }
255 | });
256 |
257 | //动画面板 点击确定
258 | $("#animatPanelOK").click(function () {
259 | var val = Number($("#animatType option:selected").val());
260 | if (val == 0) {
261 | etouch.editTarget.css("animation", "");
262 | $("#animatPanel").hide();
263 | return;
264 | }
265 | var direct = Number($("#animatDirection option:selected").val());
266 | var name = '';
267 | switch (val) {
268 | case 3:
269 | name = "bounceIn";
270 | break;
271 | case 2:
272 | name = "fadeIn";
273 | break;
274 | case 1:
275 | name = "fadeIn";
276 | break;
277 | }
278 | if (val == 2 || val == 3) {
279 | switch (direct) {
280 | case 3:
281 | name += "Up";
282 | break;
283 | case 2:
284 | name += "Right";
285 | break;
286 | case 1:
287 | name += "Down";
288 | break;
289 | case 0:
290 | name += "Left";
291 | break;
292 | }
293 | }
294 | var animatTime = $("#animatTime").val();
295 | var animatDelay = $("#animatDelay").val();
296 | var animatTimes = $("#animatTimes").val();
297 | var animatInfinite = $("#animatInfinite:checked").val();
298 | var count = animatInfinite == "on" ? "infinite" : animatTimes;
299 | var animateVal = name + " " + animatTime + "s linear " + animatDelay + "s " + count;
300 | etouch.editTarget.css("animation", animateVal);
301 | $("#animatPanel").hide();
302 | $(".cover").hide();
303 | });
304 |
305 | $("#menuAddAudio").click(function () {
306 | //添加背景
307 | if (etouch.currentPageIndex == -1) {
308 | alert("请先添加页面");
309 | return;
310 | }
311 | $(".cover").show();
312 | $("#audioPanel").show();
313 | });
314 |
315 | $("#audioPanelClose").click(function () {
316 | $("#audioPanel").hide();
317 | $(".cover").hide();
318 | });
319 |
320 | $("#audioPanelUpload").click(function () {
321 | $("#type").val(3);
322 | $("#file").click();
323 | });
324 | })
--------------------------------------------------------------------------------
/EShow_Html/content/css/main.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | html {
3 | -ms-touch-action: none;
4 | }
5 | body,
6 | div,
7 | h1,
8 | h3,
9 | h4,
10 | p,
11 | ul,
12 | li {
13 | margin: 0;
14 | padding: 0;
15 | }
16 | ul {
17 | list-style: none;
18 | }
19 | a {
20 | text-decoration: none;
21 | border: none;
22 | outline: none;
23 | }
24 | img {
25 | display: block;
26 | border:none;
27 | }
28 | body {
29 | width: 100%;
30 | *cursor: default;
31 | overflow: hidden;
32 | font: 16px/1.5 "Microsoft YaHei",Helvetica,STHeiti STXihei,Microsoft JhengHei,Arial;
33 | }
34 | #pageContain {
35 | overflow: hidden;
36 | }
37 | .page {
38 | box-shadow: 1px 1px 4px 0 #000;
39 | display: none;
40 | width: 100%;
41 | height: 100%;
42 | overflow: hidden;
43 | position: absolute;
44 | top: 0;
45 | left: 0;
46 | }
47 | .contain {
48 | width: 100%;
49 | height: 100%;
50 | display: none;
51 | position: relative;
52 | z-index: 0;
53 | padding-top: 70px;
54 | }
55 | .current .contain,.slide .contain {
56 | display: block;
57 | }
58 | .current {
59 | display: block;
60 | z-index: 1;
61 | }
62 | .slide {
63 | display: block;
64 | z-index: 2;
65 | }
66 | .swipe {
67 | display: block;
68 | z-index: 3;
69 | transition-duration: 0ms !important;
70 | -webkit-transition-duration: 0ms !important;
71 | }
72 | .page1 {
73 | background: #29948f;
74 | }
75 | .page2 {
76 | background: #2f2f2f;
77 | }
78 | .page3 {
79 | background: #fff;
80 | }
81 | .page4 {
82 | background: #3c8847;
83 | }
84 | .section1 {
85 | background: #fff;
86 | }
87 | .section2 {
88 | background: #992211;
89 | }
90 | .section3 {
91 | background: #37c1e3;
92 | }
93 | .section4 {
94 | background: #009922;
95 | }
96 | #navBar {
97 | *padding-left: 80px;
98 | z-index: 3;
99 | position: absolute;
100 | font-size: 0px;
101 | line-height: 0;
102 | bottom: 80px;
103 | text-align: center;
104 | width: 200px;
105 | left: 50%;
106 | margin-left: -100px;
107 | }
108 | #navBar .active {
109 | background: #ccc;
110 | }
111 | #navBar li {
112 | background: transparent;
113 | border: 1px solid #ccc;
114 | display: inline-block;
115 | font-size: 0px;
116 | margin: 0 4px;
117 | *float: left;
118 | *zoom:1;
119 | cursor: pointer;
120 | transition: all .7s ease;
121 | border-radius: 50%;
122 | line-height: 10px;
123 | text-align: center;
124 | width: 10px;
125 | height: 10px;
126 | }
127 | #prev,#next {
128 | z-index: 4;
129 | text-align: center;
130 | line-height: 40px;
131 | position: absolute;
132 | width: 40px;
133 | height: 40px;
134 | top: 50%;
135 | cursor:pointer;
136 | margin-top: -20px;
137 | }
138 | #prev {
139 | left: 0
140 | }
141 | #next {
142 | right: 0
143 | }
144 | .nav {
145 | z-index: 5;
146 | position: fixed;
147 | _position:absolute;
148 | box-shadow: 0 2px 10px 0px #000;
149 | background: #fff;
150 | top: 0;
151 | left: 0;
152 | width: 100%;
153 | height: 70px;
154 | line-height: 70px;
155 | }
156 | .logo {
157 | width: 51px;
158 | height: 51px;
159 | vertical-align: top;
160 | margin: 9px 0 0 20px;
161 | transition:all .4s ease;
162 | }
163 | .logo:hover {
164 | transform:rotate(5deg) scale(1.05);
165 | }
166 | .nav a {
167 | line-height: 70px;
168 | transition:all .4s ease;
169 | color: #333;
170 | }
171 | .nav a:hover {
172 | text-shadow:1px 1px 3px #000;
173 | }
174 | .nav h1 {
175 | line-height: 70px;
176 | float: left;
177 | }
178 | .nav span {
179 | position: absolute;
180 | left: 80px;
181 | top: 0;
182 | }
183 | .nav h1 p {
184 | display: none;
185 | }
186 | .nav li {
187 | display: inline;
188 | float: right;
189 | margin: 0 22px;
190 | }
191 | .title,.titleEng {
192 | -webkit-animation:dragTop .7s ease-in-out both;
193 | -moz-animation:dragTop .7s ease-in-out both;
194 | -ms-animation:dragTop .7s ease-in-out both;
195 | animation:dragTop .7s ease-in-out both;
196 | position: absolute;
197 | text-align: center;
198 | color: #fff;
199 | top: 13%;
200 | left: 50%;
201 | }
202 | .title {
203 | -webkit-animation-delay: .8s;
204 | -moz-animation-delay:.8s;
205 | -ms-animation-delay:.8s;
206 | animation-delay:.8s;
207 | width: 500px;
208 | line-height: 60px;
209 | height: 60px;
210 | font-weight: normal;
211 | letter-spacing: 8px;
212 | font-size: 40px;
213 | margin-left: -250px;
214 |
215 | }
216 | .titleEng {
217 | -webkit-animation-delay: 1.2s;
218 | -moz-animation-delay:1.2s;
219 | -ms-animation-delay:1.2s;
220 | animation-delay:1.2s;
221 | width: 400px;
222 | height: 50px;
223 | line-height: 50px;
224 | font-size: 24px;
225 | margin-left: -200px;
226 | margin-top: 50px;
227 | }
228 | .page3 .title,.page3 .titleEng {
229 | top: 25%;
230 | color: #333;
231 | }
232 | .page1 p {
233 | font-size: 24px;
234 | color: #fff;
235 | text-align: center;
236 | position: absolute;
237 | bottom: 180px;
238 | width: 100%;
239 | -webkit-animation:scaleIn .6s ease 2s both;
240 | -moz-animation:scaleIn .6s ease 2s both;
241 | -ms-animation:scaleIn .6s ease 2s both;
242 | animation:scaleIn .6s ease 2s both;
243 | }
244 | .page1-box,.page2-box,.page3-box,.page4-box {
245 | text-align: center;
246 | position: absolute;
247 | top: 50%;
248 | left: 50%;
249 | -webkit-animation:scaleAll .7s ease-in-out 1.6s both;
250 | -moz-animation:scaleAll .7s ease-in-out 1.6s both;
251 | -ms-animation:scaleAll .7s ease-in-out 1.6s both;
252 | animation:scaleAll .7s ease-in-out 1.6s both;
253 | }
254 | .page1-box {
255 | margin-left: -182px;
256 | margin-top: -150px;
257 | width: 365px;
258 | height: 347px;
259 | }
260 | .page2-box {
261 | margin-left: -366px;
262 | margin-top: -151px;
263 | width: 733px;
264 | height: 302px;
265 | }
266 | .page3-box {
267 | margin-left: -150px;
268 | width: 299px;
269 | height: 203px;
270 | margin-top: -40px;
271 | }
272 | .page4-box {
273 | width: 398px;
274 | height: 322px;
275 | background-image: url(../images/a6.png);
276 | background-size: 100% 100%;
277 | margin-left: -199px;
278 | margin-top: -120px;
279 | }
280 | .page4-box img{
281 | float: right;
282 | -webkit-animation:scaleIn .6s ease 2.4s both;
283 | -moz-animation:scaleIn .6s ease 2.4s both;
284 | -ms-animation:scaleIn .6s ease 2.4s both;
285 | animation:scaleIn .6s ease 2.4s both;
286 | }
287 | .scTop,.scBottom {
288 | position: absolute;
289 | left: 0;
290 | background: #2f2f2f url(../images/a15.png) repeat-x 0 0;
291 | width: 100%;
292 | height: 82px;
293 | }
294 | .scTop {
295 | top: 70px;
296 | -webkit-animation: bgL 20s linear 0s infinite alternate both;
297 | -moz-animation:bgL 20s linear 0s infinite alternate both;
298 | -ms-animation:bgL 20s linear 0s infinite alternate both;
299 | animation:bgL 20s linear 0s infinite alternate both;
300 | }
301 | .scBottom {
302 | bottom: 70px;
303 | -webkit-animation: bgR 20s linear 0s infinite alternate both;
304 | -moz-animation:bgR 20s linear 0s infinite alternate both;
305 | -ms-animation:bgR 20s linear 0s infinite alternate both;
306 | animation:bgR 20s linear 0s infinite alternate both;
307 | }
308 | .section1 .contain {
309 | display: block !important;
310 | }
311 |
312 | @media screen and (max-width: 680px) {
313 | .nav ul {
314 | display: none;
315 | }
316 | .nav span {
317 | font-size: 22px;
318 | }
319 | .page1 p {
320 | font-size: 14px;
321 | }
322 | #next,#prev {
323 | display: none;
324 | }
325 | .page1-box {
326 | margin-left: -91px;
327 | margin-top: -90px;
328 | width: 182px;
329 | height: 173px;
330 | }
331 | .page2-box {
332 | margin-left: -160px;
333 | margin-top: -70px;
334 | width: 320px;
335 | height: 140px;
336 | }
337 | .page3-box {
338 | margin-left: -60px;
339 | margin-top: -50px;
340 | width: 160px;
341 | height: 100px;
342 | }
343 | .page4-box {
344 | margin-left: -91px;
345 | margin-top: -90px;
346 | width: 182px;
347 | height: 173px;
348 | }
349 | .title {
350 | font-size: 30px;
351 | letter-spacing: 2px;
352 | }
353 | .titleEng {
354 | font-size: 18px;
355 | }
356 | }
357 |
358 | @keyframes dragTop {
359 | 0% {
360 | opacity:0;
361 | transform:translateY(-70px)
362 | }
363 | 60% {
364 | opacity:1;
365 | transform:translateY(20px)
366 | }
367 | 90% {
368 | transform:translateY(-5px)
369 | }
370 | 97% {
371 | transform:translateY(-1px)
372 | }
373 | 100% {
374 | transform:translateY(0px)
375 | }
376 | }
377 | @-webkit-keyframes dragTop {
378 | 0% {
379 | opacity:0;
380 | -webkit-transform:translateY(-70px)
381 | }
382 | 60% {
383 | opacity:1;
384 | -webkit-transform:translateY(20px)
385 | }
386 | 90% {
387 | -webkit-transform:translateY(-5px)
388 | }
389 | 97% {
390 | -webkit-transform:translateY(-1px)
391 | }
392 | 100% {
393 | -webkit-transform:translateY(0px)
394 | }
395 | }
396 | @-moz-keyframes dragTop {
397 | 0% {
398 | opacity:0;
399 | -moz-transform:translateY(-70px)
400 | }
401 | 60% {
402 | opacity:1;
403 | -moz-transform:translateY(20px)
404 | }
405 | 90% {
406 | -moz-transform:translateY(-5px)
407 | }
408 | 97% {
409 | -moz-transform:translateY(-1px)
410 | }
411 | 100% {
412 | -moz-transform:translateY(0px)
413 | }
414 | }
415 | @-ms-keyframes dragTop {
416 | 0% {
417 | opacity:0;
418 | -ms-transform:translateY(-70px)
419 | }
420 | 60% {
421 | opacity:1;
422 | -ms-transform:translateY(20px)
423 | }
424 | 90% {
425 | -ms-transform:translateY(-5px)
426 | }
427 | 97% {
428 | -ms-transform:translateY(-1px)
429 | }
430 | 100% {
431 | -ms-transform:translateY(0px)
432 | }
433 | }
434 | @keyframes scaleAll {
435 | 0% {
436 | opacity: 0;
437 | transform: scale(0) rotate(30deg);
438 | }
439 | 30% {
440 | opacity: 1;
441 | }
442 | 100% {
443 | transform: scale(1) rotate(0);
444 | }
445 | }
446 | @-webkit-keyframes scaleAll {
447 | 0% {
448 | opacity: 0;
449 | -webkit-transform: scale(0) rotate(30deg);
450 | }
451 | 30% {
452 | opacity: 1;
453 | }
454 | 100% {
455 | -webkit-transform: scale(1) rotate(0);
456 | }
457 | }
458 | @-moz-keyframes scaleAll {
459 | 0% {
460 | opacity: 0;
461 | -moz-transform: scale(0) rotate(30deg);
462 | }
463 | 30% {
464 | opacity: 1;
465 | }
466 | 100% {
467 | -moz-transform: scale(1) rotate(0);
468 | }
469 | }
470 | @-ms-keyframes scaleAll {
471 | 0% {
472 | opacity: 0;
473 | -ms-transform: scale(0) rotate(30deg);
474 | }
475 | 100% {
476 | opacity: 1;
477 | -ms-transform: scale(1) rotate(0);
478 | }
479 | }
480 | @keyframes scaleIn {
481 | 0% {
482 | opacity: 0;
483 | transform: scale(3);
484 | }
485 | 100% {
486 | opacity: 1;
487 | transform: scale(1);
488 | }
489 | }
490 | @-webkit-keyframes scaleIn {
491 | 0% {
492 | opacity: 0;
493 | -webkit-transform: scale(3);
494 | }
495 | 100% {
496 | opacity: 1;
497 | -webkit-transform: scale(1);
498 | }
499 | }
500 | @-moz-keyframes scaleIn {
501 | 0% {
502 | opacity: 0;
503 | transform: scale(3);
504 | }
505 | 100% {
506 | opacity: 1;
507 | transform: scale(1);
508 | }
509 | }
510 | @-ms-keyframes scaleIn {
511 | 0% {
512 | opacity: 0;
513 | -ms-transform: scale(3);
514 | }
515 | 100% {
516 | opacity: 1;
517 | -ms-transform: scale(1);
518 | }
519 | }
520 | @keyframes bgL {
521 | 0% {
522 | background-position: 0 0;
523 | }
524 | 100% {
525 | background-position: 2000px 0;
526 | }
527 | }
528 | @-webkit-keyframes bgL {
529 | 0% {
530 | background-position: 0 0;
531 | }
532 | 100% {
533 | background-position: 2000px 0;
534 | }
535 | }
536 | @-moz-keyframes bgL {
537 | 0% {
538 | background-position: 0 0;
539 | }
540 | 100% {
541 | background-position: 2000px 0;
542 | }
543 | }
544 | @-ms-keyframes bgL {
545 | 0% {
546 | background-position: 0 0;
547 | }
548 | 100% {
549 | background-position: 2000px 0;
550 | }
551 | }
552 | @keyframes bgR {
553 | 0% {
554 | background-position: 2000px 0;
555 | }
556 | 100% {
557 | background-position: 0 0;
558 | }
559 | }
560 | @-webkit-keyframes bgR {
561 | 0% {
562 | background-position: 2000px 0;
563 | }
564 | 100% {
565 | background-position: 0 0;
566 | }
567 | }
568 | @-moz-keyframes bgR {
569 | 0% {
570 | background-position: 2000px 0;
571 | }
572 | 100% {
573 | background-position: 0 0;
574 | }
575 | }
576 | @-ms-keyframes bgR {
577 | 0% {
578 | background-position: 2000px 0;
579 | }
580 | 100% {
581 | background-position: 0 0;
582 | }
583 | }
584 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/css/main.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | html {
3 | -ms-touch-action: none;
4 | }
5 | body,
6 | div,
7 | h1,
8 | h3,
9 | h4,
10 | p,
11 | ul,
12 | li {
13 | margin: 0;
14 | padding: 0;
15 | }
16 | ul {
17 | list-style: none;
18 | }
19 | a {
20 | text-decoration: none;
21 | border: none;
22 | outline: none;
23 | }
24 | img {
25 | display: block;
26 | border:none;
27 | }
28 | body {
29 | width: 100%;
30 | *cursor: default;
31 | overflow: hidden;
32 | font: 16px/1.5 "Microsoft YaHei",Helvetica,STHeiti STXihei,Microsoft JhengHei,Arial;
33 | }
34 | #pageContain {
35 | overflow: hidden;
36 | }
37 | .page {
38 | box-shadow: 1px 1px 4px 0 #000;
39 | display: none;
40 | width: 100%;
41 | height: 100%;
42 | overflow: hidden;
43 | position: absolute;
44 | top: 0;
45 | left: 0;
46 | }
47 | .contain {
48 | width: 100%;
49 | height: 100%;
50 | display: none;
51 | position: relative;
52 | z-index: 0;
53 | padding-top: 70px;
54 | }
55 | .current .contain,.slide .contain {
56 | display: block;
57 | }
58 | .current {
59 | display: block;
60 | z-index: 1;
61 | }
62 | .slide {
63 | display: block;
64 | z-index: 2;
65 | }
66 | .swipe {
67 | display: block;
68 | z-index: 3;
69 | transition-duration: 0ms !important;
70 | -webkit-transition-duration: 0ms !important;
71 | }
72 | .page1 {
73 | background: #29948f;
74 | }
75 | .page2 {
76 | background: #2f2f2f;
77 | }
78 | .page3 {
79 | background: #fff;
80 | }
81 | .page4 {
82 | background: #3c8847;
83 | }
84 | .section1 {
85 | background: #fff;
86 | }
87 | .section2 {
88 | background: #992211;
89 | }
90 | .section3 {
91 | background: #37c1e3;
92 | }
93 | .section4 {
94 | background: #009922;
95 | }
96 | #navBar {
97 | *padding-left: 80px;
98 | z-index: 3;
99 | position: absolute;
100 | font-size: 0px;
101 | line-height: 0;
102 | bottom: 80px;
103 | text-align: center;
104 | width: 200px;
105 | left: 50%;
106 | margin-left: -100px;
107 | }
108 | #navBar .active {
109 | background: #ccc;
110 | }
111 | #navBar li {
112 | background: transparent;
113 | border: 1px solid #ccc;
114 | display: inline-block;
115 | font-size: 0px;
116 | margin: 0 4px;
117 | *float: left;
118 | *zoom:1;
119 | cursor: pointer;
120 | transition: all .7s ease;
121 | border-radius: 50%;
122 | line-height: 10px;
123 | text-align: center;
124 | width: 10px;
125 | height: 10px;
126 | }
127 | #prev,#next {
128 | z-index: 4;
129 | text-align: center;
130 | line-height: 40px;
131 | position: absolute;
132 | width: 40px;
133 | height: 40px;
134 | top: 50%;
135 | cursor:pointer;
136 | margin-top: -20px;
137 | }
138 | #prev {
139 | left: 0
140 | }
141 | #next {
142 | right: 0
143 | }
144 | .nav {
145 | z-index: 5;
146 | position: fixed;
147 | _position:absolute;
148 | box-shadow: 0 2px 10px 0px #000;
149 | background: #fff;
150 | top: 0;
151 | left: 0;
152 | width: 100%;
153 | height: 70px;
154 | line-height: 70px;
155 | }
156 | .logo {
157 | width: 51px;
158 | height: 51px;
159 | vertical-align: top;
160 | margin: 9px 0 0 20px;
161 | transition:all .4s ease;
162 | }
163 | .logo:hover {
164 | transform:rotate(5deg) scale(1.05);
165 | }
166 | .nav a {
167 | line-height: 70px;
168 | transition:all .4s ease;
169 | color: #333;
170 | }
171 | .nav a:hover {
172 | text-shadow:1px 1px 3px #000;
173 | }
174 | .nav h1 {
175 | line-height: 70px;
176 | float: left;
177 | }
178 | .nav span {
179 | position: absolute;
180 | left: 80px;
181 | top: 0;
182 | }
183 | .nav h1 p {
184 | display: none;
185 | }
186 | .nav li {
187 | display: inline;
188 | float: right;
189 | margin: 0 22px;
190 | }
191 | .title,.titleEng {
192 | -webkit-animation:dragTop .7s ease-in-out both;
193 | -moz-animation:dragTop .7s ease-in-out both;
194 | -ms-animation:dragTop .7s ease-in-out both;
195 | animation:dragTop .7s ease-in-out both;
196 | position: absolute;
197 | text-align: center;
198 | color: #fff;
199 | top: 13%;
200 | left: 50%;
201 | }
202 | .title {
203 | -webkit-animation-delay: .8s;
204 | -moz-animation-delay:.8s;
205 | -ms-animation-delay:.8s;
206 | animation-delay:.8s;
207 | width: 500px;
208 | line-height: 60px;
209 | height: 60px;
210 | font-weight: normal;
211 | letter-spacing: 8px;
212 | font-size: 40px;
213 | margin-left: -250px;
214 |
215 | }
216 | .titleEng {
217 | -webkit-animation-delay: 1.2s;
218 | -moz-animation-delay:1.2s;
219 | -ms-animation-delay:1.2s;
220 | animation-delay:1.2s;
221 | width: 400px;
222 | height: 50px;
223 | line-height: 50px;
224 | font-size: 24px;
225 | margin-left: -200px;
226 | margin-top: 50px;
227 | }
228 | .page3 .title,.page3 .titleEng {
229 | top: 25%;
230 | color: #333;
231 | }
232 | .page1 p {
233 | font-size: 24px;
234 | color: #fff;
235 | text-align: center;
236 | position: absolute;
237 | bottom: 180px;
238 | width: 100%;
239 | -webkit-animation:scaleIn .6s ease 2s both;
240 | -moz-animation:scaleIn .6s ease 2s both;
241 | -ms-animation:scaleIn .6s ease 2s both;
242 | animation:scaleIn .6s ease 2s both;
243 | }
244 | .page1-box,.page2-box,.page3-box,.page4-box {
245 | text-align: center;
246 | position: absolute;
247 | top: 50%;
248 | left: 50%;
249 | -webkit-animation:scaleAll .7s ease-in-out 1.6s both;
250 | -moz-animation:scaleAll .7s ease-in-out 1.6s both;
251 | -ms-animation:scaleAll .7s ease-in-out 1.6s both;
252 | animation:scaleAll .7s ease-in-out 1.6s both;
253 | }
254 | .page1-box {
255 | margin-left: -182px;
256 | margin-top: -150px;
257 | width: 365px;
258 | height: 347px;
259 | }
260 | .page2-box {
261 | margin-left: -366px;
262 | margin-top: -151px;
263 | width: 733px;
264 | height: 302px;
265 | }
266 | .page3-box {
267 | margin-left: -150px;
268 | width: 299px;
269 | height: 203px;
270 | margin-top: -40px;
271 | }
272 | .page4-box {
273 | width: 398px;
274 | height: 322px;
275 | background-image: url(../images/a6.png);
276 | background-size: 100% 100%;
277 | margin-left: -199px;
278 | margin-top: -120px;
279 | }
280 | .page4-box img{
281 | float: right;
282 | -webkit-animation:scaleIn .6s ease 2.4s both;
283 | -moz-animation:scaleIn .6s ease 2.4s both;
284 | -ms-animation:scaleIn .6s ease 2.4s both;
285 | animation:scaleIn .6s ease 2.4s both;
286 | }
287 | .scTop,.scBottom {
288 | position: absolute;
289 | left: 0;
290 | background: #2f2f2f url(../images/a15.png) repeat-x 0 0;
291 | width: 100%;
292 | height: 82px;
293 | }
294 | .scTop {
295 | top: 70px;
296 | -webkit-animation: bgL 20s linear 0s infinite alternate both;
297 | -moz-animation:bgL 20s linear 0s infinite alternate both;
298 | -ms-animation:bgL 20s linear 0s infinite alternate both;
299 | animation:bgL 20s linear 0s infinite alternate both;
300 | }
301 | .scBottom {
302 | bottom: 70px;
303 | -webkit-animation: bgR 20s linear 0s infinite alternate both;
304 | -moz-animation:bgR 20s linear 0s infinite alternate both;
305 | -ms-animation:bgR 20s linear 0s infinite alternate both;
306 | animation:bgR 20s linear 0s infinite alternate both;
307 | }
308 | .section1 .contain {
309 | display: block !important;
310 | }
311 |
312 | @media screen and (max-width: 680px) {
313 | .nav ul {
314 | display: none;
315 | }
316 | .nav span {
317 | font-size: 22px;
318 | }
319 | .page1 p {
320 | font-size: 14px;
321 | }
322 | #next,#prev {
323 | display: none;
324 | }
325 | .page1-box {
326 | margin-left: -91px;
327 | margin-top: -90px;
328 | width: 182px;
329 | height: 173px;
330 | }
331 | .page2-box {
332 | margin-left: -160px;
333 | margin-top: -70px;
334 | width: 320px;
335 | height: 140px;
336 | }
337 | .page3-box {
338 | margin-left: -60px;
339 | margin-top: -50px;
340 | width: 160px;
341 | height: 100px;
342 | }
343 | .page4-box {
344 | margin-left: -91px;
345 | margin-top: -90px;
346 | width: 182px;
347 | height: 173px;
348 | }
349 | .title {
350 | font-size: 30px;
351 | letter-spacing: 2px;
352 | }
353 | .titleEng {
354 | font-size: 18px;
355 | }
356 | }
357 |
358 | @keyframes dragTop {
359 | 0% {
360 | opacity:0;
361 | transform:translateY(-70px)
362 | }
363 | 60% {
364 | opacity:1;
365 | transform:translateY(20px)
366 | }
367 | 90% {
368 | transform:translateY(-5px)
369 | }
370 | 97% {
371 | transform:translateY(-1px)
372 | }
373 | 100% {
374 | transform:translateY(0px)
375 | }
376 | }
377 | @-webkit-keyframes dragTop {
378 | 0% {
379 | opacity:0;
380 | -webkit-transform:translateY(-70px)
381 | }
382 | 60% {
383 | opacity:1;
384 | -webkit-transform:translateY(20px)
385 | }
386 | 90% {
387 | -webkit-transform:translateY(-5px)
388 | }
389 | 97% {
390 | -webkit-transform:translateY(-1px)
391 | }
392 | 100% {
393 | -webkit-transform:translateY(0px)
394 | }
395 | }
396 | @-moz-keyframes dragTop {
397 | 0% {
398 | opacity:0;
399 | -moz-transform:translateY(-70px)
400 | }
401 | 60% {
402 | opacity:1;
403 | -moz-transform:translateY(20px)
404 | }
405 | 90% {
406 | -moz-transform:translateY(-5px)
407 | }
408 | 97% {
409 | -moz-transform:translateY(-1px)
410 | }
411 | 100% {
412 | -moz-transform:translateY(0px)
413 | }
414 | }
415 | @-ms-keyframes dragTop {
416 | 0% {
417 | opacity:0;
418 | -ms-transform:translateY(-70px)
419 | }
420 | 60% {
421 | opacity:1;
422 | -ms-transform:translateY(20px)
423 | }
424 | 90% {
425 | -ms-transform:translateY(-5px)
426 | }
427 | 97% {
428 | -ms-transform:translateY(-1px)
429 | }
430 | 100% {
431 | -ms-transform:translateY(0px)
432 | }
433 | }
434 | @keyframes scaleAll {
435 | 0% {
436 | opacity: 0;
437 | transform: scale(0) rotate(30deg);
438 | }
439 | 30% {
440 | opacity: 1;
441 | }
442 | 100% {
443 | transform: scale(1) rotate(0);
444 | }
445 | }
446 | @-webkit-keyframes scaleAll {
447 | 0% {
448 | opacity: 0;
449 | -webkit-transform: scale(0) rotate(30deg);
450 | }
451 | 30% {
452 | opacity: 1;
453 | }
454 | 100% {
455 | -webkit-transform: scale(1) rotate(0);
456 | }
457 | }
458 | @-moz-keyframes scaleAll {
459 | 0% {
460 | opacity: 0;
461 | -moz-transform: scale(0) rotate(30deg);
462 | }
463 | 30% {
464 | opacity: 1;
465 | }
466 | 100% {
467 | -moz-transform: scale(1) rotate(0);
468 | }
469 | }
470 | @-ms-keyframes scaleAll {
471 | 0% {
472 | opacity: 0;
473 | -ms-transform: scale(0) rotate(30deg);
474 | }
475 | 100% {
476 | opacity: 1;
477 | -ms-transform: scale(1) rotate(0);
478 | }
479 | }
480 | @keyframes scaleIn {
481 | 0% {
482 | opacity: 0;
483 | transform: scale(3);
484 | }
485 | 100% {
486 | opacity: 1;
487 | transform: scale(1);
488 | }
489 | }
490 | @-webkit-keyframes scaleIn {
491 | 0% {
492 | opacity: 0;
493 | -webkit-transform: scale(3);
494 | }
495 | 100% {
496 | opacity: 1;
497 | -webkit-transform: scale(1);
498 | }
499 | }
500 | @-moz-keyframes scaleIn {
501 | 0% {
502 | opacity: 0;
503 | transform: scale(3);
504 | }
505 | 100% {
506 | opacity: 1;
507 | transform: scale(1);
508 | }
509 | }
510 | @-ms-keyframes scaleIn {
511 | 0% {
512 | opacity: 0;
513 | -ms-transform: scale(3);
514 | }
515 | 100% {
516 | opacity: 1;
517 | -ms-transform: scale(1);
518 | }
519 | }
520 | @keyframes bgL {
521 | 0% {
522 | background-position: 0 0;
523 | }
524 | 100% {
525 | background-position: 2000px 0;
526 | }
527 | }
528 | @-webkit-keyframes bgL {
529 | 0% {
530 | background-position: 0 0;
531 | }
532 | 100% {
533 | background-position: 2000px 0;
534 | }
535 | }
536 | @-moz-keyframes bgL {
537 | 0% {
538 | background-position: 0 0;
539 | }
540 | 100% {
541 | background-position: 2000px 0;
542 | }
543 | }
544 | @-ms-keyframes bgL {
545 | 0% {
546 | background-position: 0 0;
547 | }
548 | 100% {
549 | background-position: 2000px 0;
550 | }
551 | }
552 | @keyframes bgR {
553 | 0% {
554 | background-position: 2000px 0;
555 | }
556 | 100% {
557 | background-position: 0 0;
558 | }
559 | }
560 | @-webkit-keyframes bgR {
561 | 0% {
562 | background-position: 2000px 0;
563 | }
564 | 100% {
565 | background-position: 0 0;
566 | }
567 | }
568 | @-moz-keyframes bgR {
569 | 0% {
570 | background-position: 2000px 0;
571 | }
572 | 100% {
573 | background-position: 0 0;
574 | }
575 | }
576 | @-ms-keyframes bgR {
577 | 0% {
578 | background-position: 2000px 0;
579 | }
580 | 100% {
581 | background-position: 0 0;
582 | }
583 | }
584 |
--------------------------------------------------------------------------------
/EShow_Html/content/css/css.css:
--------------------------------------------------------------------------------
1 | body
2 | {
3 | margin:0;padding:0;
4 | }
5 | ul,li{list-style:none;float:left;margin:0;padding:0;}
6 | html,body{height:100%;}
7 | .cover
8 | {
9 | z-index:900;
10 | display:none;
11 | width:100%;height:100%;background-color:black;opacity:0.1;position:absolute;top:0;left:0;
12 | }
13 | .show
14 | {
15 | display:block;
16 | }
17 | .hide
18 | {
19 | display:none;
20 | }
21 | .wrap
22 | {
23 | height:100%;
24 | display:-webkit-box;
25 | display:box;
26 | -webkit-box-orient:vertical;
27 | box-orient:vertical;
28 | }
29 | .wrap .top
30 | {
31 | background:orange;
32 | height:40px;
33 | background-color:#08A1EF;
34 | }
35 | .wrap .top li
36 | {
37 | height:40px;
38 | float:left;line-height:40px;
39 | width:80px;text-align:center;
40 | color:White;
41 | border-right:1px solid white;
42 | cursor:pointer;
43 | }
44 | .wrap .middle
45 | {
46 | -webkit-box-flex:1;
47 | box-flex:1;
48 | display:-webkit-box;
49 | display:box;
50 | -webkit-box-orient:horizontal;
51 | box-orient:horizontal;
52 | }
53 | .wrap .middle .left
54 | {
55 | width:150px;background-color:white;
56 | display:-webkit-box;
57 | display:box;
58 | -webkit-box-orient:vertical;
59 | box-orient:vertical;
60 | }
61 | .wrap .middle .left .top
62 | {
63 | width:100%;
64 | height:40px;
65 | background-color:#E1E1E1;
66 | position:relative;
67 | overflow:hidden;
68 | }
69 | .wrap .middle .left .top span
70 | {
71 | display:block;
72 | width:40%;
73 | height:30px;
74 | margin-top:10px;
75 | margin-left:6%;
76 | float:left;
77 | text-align:center;
78 | line-height:30px;
79 | font-size:14px;
80 | cursor:pointer;
81 | }
82 |
83 | .wrap .middle .left .top .current{
84 | background-color:#F7F7F7;
85 | }
86 |
87 | .wrap .middle .left .content
88 | {
89 | -webkit-box-flex:1;
90 | box-flex:1;
91 | width:100%;
92 | overflow-y:auto;
93 | }
94 | .wrap .middle .left .content p
95 | {
96 | padding: 0;
97 | width: 90%;
98 | float: left;
99 | margin: 8% 5% 0 5%;
100 | height: 40px;
101 | line-height: 40px;
102 | color: black;
103 | font-size: 14px;
104 | color:white;
105 | text-align: center;
106 | background-color: #08A1EF;
107 | cursor: pointer;
108 | }
109 | .wrap .middle .left .bottom
110 | {
111 | width:100%;
112 | height:40px;
113 | background-color:#08A1EF;
114 | font-size:40px;
115 | text-align:center;
116 | line-height:40px;
117 | color:White;
118 | cursor:pointer;
119 | margin-top:10px;
120 | }
121 | .wrap .middle .right
122 | {
123 | width:150px;background-color:white;
124 | display:-webkit-box;
125 | display:box;
126 | -webkit-box-orient:vertical;
127 | box-orient:vertical;
128 | }
129 | .wrap .middle .right .pageList
130 | {
131 | width:100%;overflow-y:auto;
132 | -webkit-box-flex:1;
133 | box-flex:1;
134 | display:block;
135 | }
136 | .wrap .middle .right .pageList p
137 | {
138 | padding:0;
139 | width:90%;float:left;margin:8% 5% 0 5%;
140 | height:40px;line-height:40px;color:black;
141 | font-size:12px; text-align:center;
142 | background-color:#08A1EF;
143 | cursor:pointer;
144 | }
145 | .wrap .middle .right .pageList p span
146 | {
147 | display:block;
148 | float:right;
149 | width:20px;height:40px;line-height:40px;
150 | text-align:center;margin-right:5px;
151 | color:black;font-weight:bolder;
152 | cursor:pointer;
153 | }
154 |
155 | .wrap .middle .right .addpage
156 | {
157 | width:100%;height:40px;
158 | background-color:#08A1EF;
159 | font-size:40px;text-align:center;
160 | line-height:40px;color:White;
161 | cursor:pointer;
162 | margin-top:10px;
163 | }
164 |
165 | .wrap .middle .center
166 | {
167 | background-color:#D0CFD8;
168 | -webkit-box-flex:1;
169 | box-flex:1;
170 | display:box;
171 | display:-webkit-box;
172 | box-align:center;
173 | -webkit-box-align:center;
174 | box-pack:center;
175 | -webkit-box-pack:center;
176 | }
177 | .phoneBox
178 | {
179 | width: 20.125rem;overflow:hidden;
180 | }
181 | .phoneBox .phone_menubar {
182 | background: url(../images/phonetitle1.jpg);
183 | height: 20px;background-size: 100% 100%;
184 | width:102%;margin-left:-1%;
185 | }
186 | .phoneBox .phonetop {
187 | height: 42px;
188 | background: url(../images/phone_top.png) no-repeat;
189 | background-size: 100%
190 | }
191 | .phoneBox .phonebottom {
192 | height: 47px;
193 | background: url(../images/phone_bottom.png) no-repeat;
194 | text-align: center;
195 | background-size: 100%
196 | }
197 | .phoneBox .scene_title_baner {
198 | height: 40px;
199 | line-height: 40px;
200 | background: #000;
201 | color: #fff;
202 | text-align: center;
203 | }
204 |
205 | .phoneBox .scene_title_baner .scene_title {
206 | min-width: 20px;
207 | font-size: 24px;
208 | overflow: hidden;
209 | white-space: nowrap;
210 | text-overflow: ellipsis
211 | }
212 | .phoneBox .phonescreenwrap
213 | {
214 | width:100%;height:30.375rem;
215 | }
216 | .phonescreen
217 | {
218 | width:100%;
219 | background: #fff;
220 | position: relative;
221 | height: 100%;
222 | overflow-x: hidden;
223 | overflow-y: hidden;
224 | }
225 |
226 | .phonescreen .pageitem
227 | {
228 | width:100%;
229 | height: 100%;
230 | background:url(http://pic.qiantucdn.com/58pic/18/33/17/58s58PIC2fN_1024.jpg) top center no-repeat;
231 | background-repeat: no-repeat;
232 | background-size:100% 100%;
233 | position:absolute;
234 | }
235 |
236 | @keyframes rotate{
237 | from{-webkit-transform:rotate(0deg)}
238 | to{-webkit-transform:rotate(360deg)}
239 | }
240 |
241 | .bgPanel{
242 | width:780px;height:600px;background-color:white;
243 | position:absolute;top:50%;left:50%;margin-left:-430px;margin-top:-300px;z-index:999;
244 | }
245 | .bgPanel .top{
246 | width:100%;height:80px;background-color:#08A1EF;
247 | color:white;font-size:30px;text-align:center;line-height:80px;
248 | }
249 | .bgPanel .middle{
250 | width:100%;height:460px;display:block;
251 | color:white;font-size:30px;text-align:center;line-height:100px;
252 | overflow-y:auto;
253 | }
254 | .bgPanel .middle img{
255 | width: 7.2rem;
256 | height: 9.75rem;
257 | margin: 5px 0 5px 30px;
258 | overflow:hidden;
259 | float:left;
260 | cursor:pointer;
261 | }
262 | .picPanel .middle img{
263 | width: 7.2rem;
264 | height: 6rem;
265 | margin: 5px 0 5px 30px;
266 | overflow:hidden;
267 | float:left;
268 | cursor:pointer;
269 | }
270 | .bgPanel .bottom{
271 | width:100%;height:60px;background-color:white;
272 | color:white;text-align:center;
273 | border-top:1px solid #08A1EF;
274 | }
275 | .bgPanel .bottom span{
276 | width:30px;line-height:22px;width:60px;text-align:center;
277 | display:block;float:right;margin:15px 10px auto auto;background-color:#08A1EF;
278 | cursor:pointer;
279 | }
280 | .defaultfontstyle{
281 | color:white;width:90%;height:2.5rem;line-height:2.5rem;text-align:center;
282 | font-size:1.25rem;left:1rem;
283 | }
284 |
285 | .defaultfontstyle span{
286 | width:100%;height:100%;display:block;
287 | }
288 |
289 | .defaultpicstyle{
290 | width:7.2rem;height:6rem;position:absolute;left:6.75rem;
291 | }
292 | .defaultpicstyle img{width:100%; height:100%;position:absolute;}
293 |
294 | .comp-resize{
295 | position:absolute;
296 | top:20px;
297 | }
298 | .comp-resize .bar {
299 | position: absolute;
300 | z-index: 899;
301 | display: none
302 | }
303 |
304 | .comp-resize .bar-n {
305 | width: 100%;
306 | height: 5px;
307 | top: 0;
308 | cursor: n-resize;
309 | background: url(../images/bar-1px.png) repeat-x
310 | }
311 |
312 | .comp-resize .bar-n div {
313 | position: absolute;
314 | left: 50%;
315 | top: -6px;
316 | margin-left: -6px
317 | }
318 |
319 | .comp-resize .bar-s {
320 | width: 100%;
321 | height: 5px;
322 | bottom: 0;
323 | cursor: s-resize;
324 | background: url(../images/bar-1px.png) repeat-x bottom
325 | }
326 |
327 | .comp-resize .bar-s div {
328 | position: absolute;
329 | left: 50%;
330 | bottom: -6px;
331 | margin-left: -6px
332 | }
333 |
334 | .comp-resize .bar-e {
335 | width: 5px;
336 | height: 100%;
337 | top: 0;
338 | right: 0;
339 | cursor: e-resize;
340 | background: url(../images/bar-1px.png) repeat-y right
341 | }
342 |
343 | .comp-resize .bar-e div {
344 | position: absolute;
345 | top: 50%;
346 | right: -6px;
347 | margin-top: -6px
348 | }
349 |
350 | .comp-resize .bar-w {
351 | width: 5px;
352 | height: 100%;
353 | top: 0;
354 | cursor: w-resize;
355 | background: url(../images/bar-1px.png) repeat-y
356 | }
357 |
358 | .comp-resize .bar-w div {
359 | position: absolute;
360 | top: 50%;
361 | left: -6px;
362 | margin-top: -6px
363 | }
364 |
365 | .comp-resize .bar-ne {
366 | top: -6px;
367 | right: -6px;
368 | cursor: ne-resize
369 | }
370 |
371 | .comp-resize .bar-nw {
372 | top: -6px;
373 | left: -6px;
374 | cursor: nw-resize
375 | }
376 |
377 | .comp-resize .bar-se {
378 | bottom: -6px;
379 | right: -6px;
380 | cursor: se-resize
381 | }
382 |
383 | .comp-resize .bar-sw {
384 | bottom: -6px;
385 | left: -6px;
386 | cursor: sw-resize
387 | }
388 |
389 | .comp-resize .bar-radius {
390 | width: 12px;
391 | height: 12px;
392 | background-color: #fff;
393 | border: 1px solid #08a1ef;
394 | border-radius: 12px
395 | }
396 |
397 | .comp-resize .boom {
398 | position: absolute;
399 | top: 0;
400 | width: 18px;
401 | height: 18px;
402 | background-image: url(../images/create/area/boom.svg);
403 | pointer-events: none
404 | }
405 |
406 | .comp-resize .boom1 {
407 | position: absolute;
408 | top: 0;
409 | width: 18px;
410 | height: 18px;
411 | background-image: url(../images/create/area/boom1.svg);
412 | pointer-events: none
413 | }
414 |
415 | .comp-resize .switch-original {
416 | position: absolute;
417 | top: 0;
418 | width: 18px;
419 | height: 18px;
420 | background-image: url(../images/create/area/switch.png)
421 | }
422 | .fonttoolbar{
423 | position:absolute;
424 | top:10px;left:10px;
425 | border:1px solid #E1E1E1;
426 | background-color:white;
427 | }
428 | .fonttoolbar a{
429 | width:40px;height:30px;float:left;
430 | line-height:30px;text-align:center;
431 | cursor:pointer;font-size:12px;
432 | }
433 | .fonttoolbar a:hover{
434 | background-color:#E1E1E1;
435 | }
436 | .fonttoolbar #size ul{
437 | position:absolute;
438 | top:32px;
439 | width:40px;
440 | background-color:white;
441 | }
442 | .fonttoolbar #size ul li{
443 | float:left;
444 | height:20px;
445 | width:40px;
446 | line-height:20px;
447 | text-align:center;
448 | display:block;
449 | }
450 | .fonttoolbar #size ul li:hover{
451 | background-color:#E1E1E1;
452 | }
453 |
454 | .animatPanel {
455 | width:200px;height:260px;background-color:white;
456 | position:absolute;top:50%;left:50%;margin-left:150px;margin-top:-300px;
457 | z-index:900;
458 | }
459 | .animatPanel .top{
460 | width:100%;height:40px;
461 | line-height:40px;
462 | background-color:#08A1EF;
463 | color:white;font-size:20px;
464 | text-align:center;
465 | }
466 | .animatPanel .middle{
467 | width:100%;height:180px;display:block;
468 | color:white;font-size:30px;text-align:center;line-height:100px;
469 | overflow-y:auto;
470 | }
471 | .animatPanel .bottom{
472 | width:100%;height:40px;
473 | background-color:white;
474 | color:white;text-align:center;
475 | border-top:1px solid #08A1EF;
476 | }
477 | .animatPanel .bottom span{
478 | width:30px;line-height:30px;width:60px;text-align:center;
479 | display:block;float:right;margin:5px 10px auto auto;background-color:#08A1EF;
480 | cursor:pointer;
481 | }
482 | .animatPanel table{
483 | width:100%;
484 | border-collapse:collapse;
485 | }
486 | .animatPanel table td{
487 | color:black;
488 | font-size:12px;
489 | border-bottom:1px solid gray;
490 | height:25px;line-height:25px;
491 | }
492 | .animatPanel table td select{
493 | width:100px;
494 | }
495 | .animatPanel table td input{
496 | width:50px;float:left;margin-right:5px;
497 | }
498 | .animatPanel table td input[type='checkbox']{
499 | width:20px;float:left;margin-top:5px;
500 | }
501 | /*音乐相关*/
502 | #audio_btn {
503 | position: absolute;
504 | right: 20px;
505 | top: 20px;
506 | z-index: 200;
507 | display: none;
508 | width: 30px;
509 | height: 30px;
510 | background-repeat: no-repeat;
511 | }
512 | .off {
513 | background-image: url(../images/normalmusic.svg);
514 | background-size: contain;
515 | background-repeat: no-repeat;
516 | }
517 | .rotate {
518 | -webkit-animation: rotating 1.2s linear infinite;
519 | -moz-animation: rotating 1.2s linear infinite;
520 | -o-animation: rotating 1.2s linear infinite;
521 | animation: rotating 1.2s linear infinite;
522 | }
523 | @-webkit-keyframes rotating {
524 | from {
525 | -webkit-transform: rotate(0deg)
526 | }
527 |
528 | to {
529 | -webkit-transform: rotate(360deg)
530 | }
531 | }
532 | #contextmenu{width:80px;border:1px solid gray;background-color:white;z-index:9999;}
533 | #contextmenu li{
534 | width:80%;height:25px;line-height:25px;text-align:left;
535 | font-size:12px;float:left;padding-left:20%;cursor:pointer;
536 | }
537 | #contextmenu li:hover{
538 | background-color:#08A1EF;
539 | }
540 | #phonescreen img{position:absolute;}
541 |
542 |
543 |
--------------------------------------------------------------------------------
/EShow_Html/content/js/eshow.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | etouch = {
3 | phoneW:0,
4 | phoneH:0,
5 | dragTarget:null,//当前拖拽的物体
6 | currentPageIndex:-1,//-1表示没有页面
7 | isEdit:false,//是否文字编辑状态
8 | editTarget:null,//右键目标
9 | moveTarget:null,//拖拽目标
10 | resizeTarget:null,//缩放目标
11 | getCurrentPage:function(){
12 | if(etouch.currentPageIndex==-1){
13 | return null;
14 | }
15 | return $("#phonescreen .pageitem").eq(etouch.currentPageIndex);
16 | },
17 | init:function(){
18 | this.phoneW = Math.round($("#phonescreen").width());
19 | this.phoneH = Math.round($("#phonescreen").height());
20 | this.loadBgPic();
21 | this.loadPic();
22 | this.loadData();
23 | this.bindEvent();//最后绑定事件不能颠倒
24 | this.save();//开启定时保存
25 | },
26 | bindEvent:function(){
27 | $("#menuAddText").click(this.addText);
28 | $("#menuAddBgPic").click(this.addBackgroundPic);
29 | $("#menuAddAudio").click(this.addAudio);
30 | $("#menuAddPic").click(this.addPic);
31 | $("#menuAddVideo").click(this.addVideo);
32 | $("#menuAddAnimat").click(this.addAnimat);
33 | $("#addpage").click(this.addPage);
34 | $("#bgPicList").click(this.setBgPicEvent);
35 | $("#picPanel").click(this.setPicEvent);
36 |
37 | $("#phonescreen")
38 | .bind("mousedown",this.mousedown)
39 | .bind("mousemove",this.mousemove)
40 | .bind("mouseup",this.mouseup)
41 | .bind("contextmenu",this.showContextMenu);
42 |
43 | $("#fonttoolbar").click(this.fontbarEvent);
44 | $("#cm_edit").bind('click',this.editFont);
45 | $("#cm_delete").bind('click',this.deleteObj);
46 | $("#cm_animat").bind('click',this.animatEvent);
47 |
48 | $("#contextmenu").click(this.clickContextMenu);
49 | //删除和选中事件
50 | $("#pageList").click(this.pageTabEvent);
51 | $("#menuSave").click(this.saveEvent);
52 | },
53 | saveEvent:function(){
54 |
55 | },
56 | pageTabEvent:function(e){
57 | var tagName = e.target.tagName;
58 | if(tagName=="SPAN"){
59 | var index = Number($(e.target).parent().attr("index"));
60 | etouch.removePage(index);
61 | }
62 | else if(tagName=="A"){
63 | var index = Number($(e.target).parent().attr("index"));
64 | etouch.showPage(index);
65 | }
66 | else if(tagName=="P"){
67 | var index = Number($(e.target).attr("index"));
68 | etouch.showPage(index);
69 | }
70 | },
71 | animatEvent:function(){
72 | if(etouch.editTarget){
73 | $(".cover").show();
74 | $("#animatPanel").show();
75 | }
76 | },
77 | deleteObj:function(){
78 | if(etouch.editTarget){
79 | etouch.editTarget.remove();
80 | }
81 | },
82 | //字体改变颜色
83 | changeColor:function(color){
84 | etouch.editTarget.css({"color":color});
85 | },
86 | fontbarEvent:function(e){
87 | $("#fontsizelist").hide();
88 | var target = e.target;
89 | if(target.tagName=="A"){
90 | var id = target.id;
91 | if(id=="size"){
92 | $("#fontsizelist").show();
93 | }
94 | else if(id=="color"){
95 | $("#colorpicker").click();
96 | }
97 | else if(id=="bolder"){
98 | //粗体
99 | etouch.editTarget.css({"fontWeight":"bolder"});
100 | }
101 | }
102 | else if(target.tagName=="LI"){
103 | var size= Number($(target).attr("val"));
104 | etouch.editTarget.css({"fontSize":size});
105 | }
106 | },
107 | editFont:function(){
108 | var target= etouch.editTarget;
109 | if(target.attr("type")=="editdiv"){
110 | var span = target.find("span");
111 | span.attr("contenteditable","true");
112 | etouch.isEdit = true;
113 | //选中
114 | var selection = window.getSelection();
115 | selection.selectAllChildren(span[0]);
116 | var x = target.position().left;
117 | var y = target.position().top;
118 | $("#fonttoolbar").css({top:y-40,left:x+20});
119 | $("#fonttoolbar").show();
120 | }
121 | },
122 | mouseup:function(e){
123 | etouch.moveTarget = null;
124 | etouch.resizeTarget = null;
125 | $("#contextmenu").hide();
126 | },
127 | toRem:function(num){
128 | return (num/16)+"rem";
129 | },
130 | mousemove:function(e){
131 | if(etouch.resizeTarget!=null){//缩放
132 | var et = etouch;
133 | var target = $(etouch.resizeTarget);
134 | //上下左右 左上 左下 右上 右下
135 | var h = target.parent().height();
136 | var w = target.parent().width();
137 | var className = target.attr("class");
138 | var parentDom = target.parent();
139 | var top = parentDom.position().top;
140 | var left = parentDom.position().left;
141 | e.movementY = e.clientY-target[0].oy;
142 | e.movementX = e.clientX-target[0].ox;
143 | target[0].oy = e.clientY;
144 | target[0].ox = e.clientX;
145 |
146 | if(className.indexOf("bar-ne")!=-1){
147 | parentDom.width(et.toRem(w+e.movementX));
148 | parentDom.height(et.toRem(h-e.movementY));
149 | parentDom.css("top",et.toRem(top+e.movementY));
150 | }
151 | else if(className.indexOf("bar-nw")!=-1){
152 | parentDom.width(et.toRem(w-e.movementX));
153 | parentDom.css("left",et.toRem(left+e.movementX));
154 | parentDom.height(et.toRem(h-e.movementY));
155 | parentDom.css("top",et.toRem(top+e.movementY));
156 | }
157 | else if(className.indexOf("bar-sw")!=-1){
158 | parentDom.width(et.toRem(w-e.movementX));
159 | parentDom.css("left",et.toRem(left+e.movementX));
160 | parentDom.height(et.toRem(h+e.movementY));
161 | }
162 | else if(className.indexOf("bar-se")!=-1){
163 | parentDom.width(et.toRem(w+e.movementX));
164 | parentDom.height(et.toRem(h+e.movementY));
165 | }
166 | else if(className.indexOf("bar-s")!=-1){
167 | parentDom.height(et.toRem(h+e.movementY));
168 | }
169 | else if(className.indexOf("bar-n")!=-1){
170 | parentDom.height(et.toRem(h-e.movementY));
171 | parentDom.css("top",et.toRem(top+e.movementY));
172 | }
173 | else if(className.indexOf("bar-e")!=-1){
174 | parentDom.width(et.toRem(w+e.movementX));
175 | }
176 | else if(className.indexOf("bar-w")!=-1){
177 | parentDom.width(et.toRem(w-e.movementX));
178 | parentDom.css("left",et.toRem(left+e.movementX));
179 | }
180 |
181 | }
182 | else if(etouch.moveTarget != null) {
183 | var target = etouch.moveTarget;
184 | var x = e.clientX - $(this)[0].offsetLeft;
185 | var y = e.clientY - $(this)[0].offsetTop;
186 | if (!target.relativeLeft) {
187 | target.relativeLeft = x - target.offsetLeft;
188 | target.relativeTop = y - target.offsetTop;
189 | }
190 | x = x - target.relativeLeft;
191 | y = y - target.relativeTop;
192 | var perX = x/16+'rem';//rem相对位置
193 | var perY = y /16+'rem';
194 | $(target).css({ top: perY, left: perX });
195 | }
196 | e.preventDefault();
197 | },
198 | mousedown:function(e){
199 | if (e.button != 0) return;//不处理右键
200 | var target = e.target;
201 |
202 | var className = target.getAttribute("class");
203 | var type = $(target).attr("type");
204 | if(className&&className.indexOf("bar")!=-1){
205 | if(className == "bar-radius"){
206 | target=target.parentNode;
207 | }
208 | etouch.resizeTarget = target;
209 | target.ox=target.clientX;//老的x y 用于计算每次移动的距离
210 | target.oy=target.clientY;
211 | }
212 | else if (type&&type.indexOf("drag_inner")!=-1) {
213 | target = target.parentNode;
214 | $(".bar").hide();
215 | $(target).find(".bar").show();
216 | etouch.moveTarget = target;
217 | etouch.moveTarget.relativeLeft = null;
218 | etouch.moveTarget.relativeTop = null;
219 | }
220 | else if(className && className.indexOf("pageitem")!=-1){
221 | etouch.isEdit = false;
222 | $("#fonttoolbar").hide();
223 | $(".bar").hide();
224 | $("span[contenteditable=true]").removeAttr("contenteditable");
225 | }
226 | //e.preventDefault(); //防止粘连现象
227 | },
228 | clickContextMenu:function(e){
229 | $("#contextmenu").hide();
230 | },
231 | showContextMenu:function(e){
232 | if(etouch.isPageItem(e.target)==false){
233 | var target = $(e.target);
234 | var type = target.attr("type");
235 | //寻找最外层
236 | if(type === undefined || type.indexOf("edit")==-1){
237 | target = target.parent();
238 | }
239 | etouch.editTarget = $(target);
240 | var x = e.clientX - $(this)[0].offsetLeft;
241 | var y = e.clientY - $(this)[0].offsetTop;
242 | $("#contextmenu").css({ position: 'absolute', top: y, left: x });
243 | $("#contextmenu").show();
244 | }
245 | e.preventDefault();
246 | },
247 | isPageItem:function(target){
248 | var className = target.getAttribute("class");
249 | if(className == null || className.indexOf("pageitem")==-1)
250 | return false;
251 | else
252 | return true;
253 | },
254 | loadPic:function(){
255 | var picPanel = $("#picList");
256 | var pics = panelPicData.list;
257 | for(var i=0;i<30;i++){
258 | picPanel.append("
");
259 | }
260 | },
261 | //加载JSON数据
262 | loadData:function(){
263 | var html = localStorage.designHTML;
264 | if(html){
265 | $("#phonescreen").html(html);
266 | var pageSize = $("#phonescreen .pageitem").size();
267 | //加载页面列表
268 | for(var i=0;i第"+currentPageLen+"页╳");
279 | etouch.showPage(index);
280 | pageList[0].scrollTop = pageList[0].scrollHeight;
281 | etouch.currentPageIndex = index;
282 | },
283 | //添加页面 包括 页面tab
284 | addPage:function(){
285 | var index = $("#pageList p[name='pageTab']").size();
286 | $("#phonescreen").append("");
287 | etouch.addPageTab(index);
288 | },
289 | removePage:function(index){
290 | var removePageObj = $("#phonescreen .pageitem").eq(index);
291 | //如果删除当前页 则选择另外的页面显示
292 | if(removePageObj.css("display")!='none'){
293 | if($("#phonescreen .pageitem").length!=1){
294 | var showIndex = index==0?1:index-1;
295 | etouch.showPage(showIndex);
296 | }
297 | }
298 | removePageObj.remove();
299 | $("#pageList span[name='deletePage']").eq(index).parent().remove();
300 | if($("#phonescreen .pageitem").size()==0){
301 | etouch.currentPageIndex = -1;
302 | }
303 | else{
304 | //重新排序
305 | $("#pageList span[name='deletePage']").each(function(i,obj){
306 | $(obj).parent().attr("index",i);
307 | $(obj).parent().find("a").text("第"+(i+1)+"页");
308 | if($(obj).parent().css("backgroundColor")===""){
309 | etouch.currentPageIndex = i;
310 | }
311 | });
312 | }
313 | },
314 | havePage:function(){
315 | return etouch.currentPageIndex!=-1?true:false;
316 | },
317 | setBgPic:function(pageIndex,bgUrl){
318 | $("#phonescreen .pageitem")
319 | .eq(pageIndex)
320 | .css("backgroundImage","url('"+bgUrl+"')");
321 | },
322 | //设置图片地址
323 | setBgPicEvent:function(e){
324 | if(e.target.tagName=="IMG"){
325 | if(etouch.havePage()){
326 | var path = $(e.target).attr("path");
327 | etouch.setBgPic(etouch.currentPageIndex,path);
328 | }
329 | $(".cover").hide();
330 | $("#bgPanel").hide();
331 | }
332 | },
333 | setPicEvent:function(e){
334 | if(e.target.tagName=="IMG"){
335 | if(etouch.havePage()){
336 | var path = $(e.target).attr("path");
337 | var page = etouch.getCurrentPage();
338 | var id = "editpic" + new Date().getTime();
339 | page.append("");
340 | $("#"+id).append($("#resizeborder").html());
341 | $("#"+id).find(".bar").hide();
342 | }
343 | $(".cover").hide();
344 | $("#picPanel").hide();
345 | }
346 | },
347 | loadBgPic:function(){
348 | var bgPicPanel = $("#bgPicList");
349 | var picList = panelBgPicData.list;
350 | for(var i=0;i<30;i++){
351 | bgPicPanel.append("
");
352 | }
353 | },
354 | showPage:function(index){
355 | etouch.currentPageIndex = index;
356 | $("#phonescreen .pageitem").hide();
357 | $("#phonescreen .pageitem").eq(index).show();
358 | $("#pageList p").css("backgroundColor","#E1E1E1");
359 | $("#pageList p").eq(index).css("backgroundColor","");
360 | },
361 | addText:function(){
362 | if(etouch.currentPageIndex==-1){
363 | alert("请先添加页面");
364 | return;
365 | }
366 | var id = "editdiv"+new Date().getTime();
367 | etouch.getCurrentPage().append("请在这里编辑
");
368 | $("#"+id).append($("#resizeborder").html());
369 | $("#"+id).find(".bar").hide();
370 | },
371 | removeText:function(){
372 |
373 | },
374 | addPic:function(){
375 | if(etouch.currentPageIndex==-1){
376 | alert("请先添加页面");
377 | return;
378 | }
379 | $(".cover").show();
380 | $("#picPanel").show();
381 | //etouch.append("
");
382 | },
383 | removePic:function(){},
384 | addBackgroundPic:function(){
385 | //添加背景
386 | if(etouch.currentPageIndex==-1){
387 | alert("请先添加页面");
388 | return;
389 | }
390 | $(".cover").show();
391 | $("#bgPanel").show();
392 | },
393 | removeBackgroundPic:function(){},
394 | addAnimat:function(){},
395 | removeAnimat:function(){},
396 | addAudio:function(){},
397 | removeAudio:function(){},
398 | addVideo:function(){},
399 | removeVideo:function(){},
400 | save:function(){
401 | //持续保存
402 | setInterval(function(){
403 | if(etouch.havePage()){
404 | //删除没用的标签
405 | var originHtml = $("#phonescreen").html();
406 | $("#hidArea").html(originHtml);
407 | $("#hidArea .pageitem")
408 | .css('display', '')
409 | .addClass("page")
410 | .eq(0).addClass("current");
411 | $("#hidArea").find("#contextmenu").remove();
412 | $("#hidArea").find("#fonttoolbar").remove();
413 | $("#hidArea .bar").remove();
414 | var simpleHtml = $("#hidArea").html();
415 | $("#hidArea").html("");
416 | localStorage.webAppHTML = simpleHtml;
417 | localStorage.designHTML = originHtml;
418 | }
419 | },5000);
420 | }
421 | }
422 | etouch.init();
423 | });
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/css/css.css:
--------------------------------------------------------------------------------
1 | body
2 | {
3 | margin:0;padding:0;
4 | }
5 | ul,li{list-style:none;float:left;margin:0;padding:0;}
6 | html,body{height:100%;}
7 | .cover
8 | {
9 | z-index:900;
10 | display:none;
11 | width:100%;height:100%;background-color:black;opacity:0.1;position:absolute;top:0;left:0;
12 | }
13 | .show
14 | {
15 | display:block;
16 | }
17 | .hide
18 | {
19 | display:none;
20 | }
21 | .wrap
22 | {
23 | height:100%;
24 | display:-webkit-box;
25 | display:box;
26 | -webkit-box-orient:vertical;
27 | box-orient:vertical;
28 | }
29 | .wrap .top
30 | {
31 | background:orange;
32 | height:40px;
33 | background-color:#08A1EF;
34 | }
35 | .wrap .top li
36 | {
37 | height:40px;
38 | float:left;line-height:40px;
39 | width:80px;text-align:center;
40 | color:White;
41 | border-right:1px solid white;
42 | cursor:pointer;
43 | }
44 | .wrap .middle
45 | {
46 | -webkit-box-flex:1;
47 | box-flex:1;
48 | display:-webkit-box;
49 | display:box;
50 | -webkit-box-orient:horizontal;
51 | box-orient:horizontal;
52 | }
53 | .wrap .middle .left
54 | {
55 | width:150px;background-color:white;
56 | display:-webkit-box;
57 | display:box;
58 | -webkit-box-orient:vertical;
59 | box-orient:vertical;
60 | }
61 | .wrap .middle .left .top
62 | {
63 | width:100%;
64 | height:40px;
65 | background-color:#E1E1E1;
66 | position:relative;
67 | overflow:hidden;
68 | }
69 | .wrap .middle .left .top span
70 | {
71 | display:block;
72 | width:40%;
73 | height:30px;
74 | margin-top:10px;
75 | margin-left:6%;
76 | float:left;
77 | text-align:center;
78 | line-height:30px;
79 | font-size:14px;
80 | cursor:pointer;
81 | }
82 |
83 | .wrap .middle .left .top .current{
84 | background-color:#F7F7F7;
85 | }
86 |
87 | .wrap .middle .left .content
88 | {
89 | -webkit-box-flex:1;
90 | box-flex:1;
91 | width:100%;
92 | overflow-y:auto;
93 | }
94 | .wrap .middle .left .content p
95 | {
96 | padding: 0;
97 | width: 90%;
98 | float: left;
99 | margin: 8% 5% 0 5%;
100 | height: 40px;
101 | line-height: 40px;
102 | color: black;
103 | font-size: 14px;
104 | text-align: center;
105 | background-color:#E1E1E1;
106 | cursor: pointer;
107 | }
108 | .wrap .middle .left .content .current
109 | {
110 | background-color: #08A1EF;
111 | }
112 | .wrap .middle .left .content p span
113 | {
114 | display:block;
115 | float:right;
116 | width:20px;height:40px;line-height:40px;
117 | text-align:center;margin-right:5px;
118 | color:black;font-weight:bolder;
119 | cursor:pointer;
120 | }
121 | .wrap .middle .left .bottom
122 | {
123 | width:100%;
124 | height:40px;
125 | background-color:#08A1EF;
126 | font-size:40px;
127 | text-align:center;
128 | line-height:40px;
129 | color:White;
130 | cursor:pointer;
131 | margin-top:10px;
132 | }
133 | .wrap .middle .right
134 | {
135 | width:150px;background-color:white;
136 | display:-webkit-box;
137 | display:box;
138 | -webkit-box-orient:vertical;
139 | box-orient:vertical;
140 | }
141 | .wrap .middle .right .pageList
142 | {
143 | width:100%;overflow-y:auto;
144 | -webkit-box-flex:1;
145 | box-flex:1;
146 | display:block;
147 | }
148 | .wrap .middle .right .pageList p
149 | {
150 | padding:0;
151 | width:90%;float:left;margin:8% 5% 0 5%;
152 | height:40px;line-height:40px;color:black;
153 | font-size:12px; text-align:center;
154 | background-color:#08A1EF;
155 | cursor:pointer;
156 | }
157 | .wrap .middle .right .pageList p span
158 | {
159 | display:block;
160 | float:right;
161 | width:20px;height:40px;line-height:40px;
162 | text-align:center;margin-right:5px;
163 | color:black;font-weight:bolder;
164 | cursor:pointer;
165 | }
166 |
167 | .wrap .middle .right .addpage
168 | {
169 | width:100%;height:40px;
170 | background-color:#08A1EF;
171 | font-size:40px;text-align:center;
172 | line-height:40px;color:White;
173 | cursor:pointer;
174 | margin-top:10px;
175 | }
176 |
177 | .wrap .middle .center
178 | {
179 | background-color:#D0CFD8;
180 | -webkit-box-flex:1;
181 | box-flex:1;
182 | display:box;
183 | display:-webkit-box;
184 | box-align:center;
185 | -webkit-box-align:center;
186 | box-pack:center;
187 | -webkit-box-pack:center;
188 | }
189 | .phoneBox
190 | {
191 | width: 20.125rem;overflow:hidden;
192 | }
193 | .phoneBox .phone_menubar {
194 | background: url(../images/phonetitle1.jpg);
195 | height: 20px;background-size: 100% 100%;
196 | width:102%;margin-left:-1%;
197 | }
198 | .phoneBox .phonetop {
199 | height: 42px;
200 | background: url(../images/phone_top.png) no-repeat;
201 | background-size: 100%
202 | }
203 | .phoneBox .phonebottom {
204 | height: 47px;
205 | background: url(../images/phone_bottom.png) no-repeat;
206 | text-align: center;
207 | background-size: 100%
208 | }
209 | .phoneBox .scene_title_baner {
210 | height: 40px;
211 | line-height: 40px;
212 | background: #000;
213 | color: #fff;
214 | text-align: center;
215 | }
216 |
217 | .phoneBox .scene_title_baner .scene_title {
218 | min-width: 20px;
219 | font-size: 24px;
220 | overflow: hidden;
221 | white-space: nowrap;
222 | text-overflow: ellipsis
223 | }
224 | .phoneBox .phonescreenwrap
225 | {
226 | width:100%;height:30.375rem;
227 | }
228 | .phonescreen
229 | {
230 | width:100%;
231 | background: #fff;
232 | position: relative;
233 | height: 100%;
234 | overflow-x: hidden;
235 | overflow-y: hidden;
236 | }
237 |
238 | .phonescreen .pageitem
239 | {
240 | width:100%;
241 | height: 100%;
242 | background-repeat: no-repeat;
243 | background-size:100% 100%;
244 | position:absolute;
245 | }
246 |
247 | @keyframes rotate{
248 | from{-webkit-transform:rotate(0deg)}
249 | to{-webkit-transform:rotate(360deg)}
250 | }
251 |
252 | .bgPanel{
253 | width:780px;height:600px;background-color:white;
254 | position:absolute;top:50%;left:50%;margin-left:-430px;margin-top:-300px;z-index:999;
255 | }
256 | .bgPanel .top{
257 | width:100%;height:80px;background-color:#08A1EF;
258 | color:white;font-size:30px;text-align:center;line-height:80px;
259 | }
260 | .bgPanel .middle{
261 | width:100%;height:460px;display:block;
262 | color:white;font-size:30px;text-align:center;line-height:100px;
263 | overflow-y:auto;
264 | }
265 | .bgPanel .middle img{
266 | width: 7.2rem;
267 | height: 9.75rem;
268 | margin: 5px 0 5px 30px;
269 | overflow:hidden;
270 | float:left;
271 | cursor:pointer;
272 | }
273 | .picPanel .middle img{
274 | width: 7.2rem;
275 | height: 6rem;
276 | margin: 5px 0 5px 30px;
277 | overflow:hidden;
278 | float:left;
279 | cursor:pointer;
280 | }
281 | .bgPanel .bottom{
282 | width:100%;height:60px;background-color:white;
283 | color:white;text-align:center;
284 | border-top:1px solid #08A1EF;
285 | }
286 | .bgPanel .bottom span{
287 | line-height:25px;
288 | width:60px;
289 | height:25px;
290 | text-align:center;
291 | display:block;
292 | float:right;
293 | margin:15px 10px auto auto;
294 | background-color:#08A1EF;
295 | cursor:pointer;
296 | }
297 | .defaultfontstyle{
298 | color:white;width:90%;height:2.5rem;line-height:2.5rem;text-align:center;
299 | font-size:1.25rem;left:1rem;
300 | }
301 |
302 | .defaultfontstyle span{
303 | width:100%;height:100%;display:block;
304 | }
305 |
306 | .defaultpicstyle{
307 | width:7.2rem;height:6rem;position:absolute;left:6.75rem;
308 | }
309 | .defaultpicstyle img{width:100%; height:100%;position:absolute;}
310 |
311 | .comp-resize{
312 | position:absolute;
313 | top:20px;
314 | }
315 | .comp-resize .bar {
316 | position: absolute;
317 | z-index: 899;
318 | display: none
319 | }
320 |
321 | .comp-resize .bar-n {
322 | width: 100%;
323 | height: 5px;
324 | top: 0;
325 | cursor: n-resize;
326 | background: url(../images/bar-1px.png) repeat-x
327 | }
328 |
329 | .comp-resize .bar-n div {
330 | position: absolute;
331 | left: 50%;
332 | top: -6px;
333 | margin-left: -6px
334 | }
335 |
336 | .comp-resize .bar-s {
337 | width: 100%;
338 | height: 5px;
339 | bottom: 0;
340 | cursor: s-resize;
341 | background: url(../images/bar-1px.png) repeat-x bottom
342 | }
343 |
344 | .comp-resize .bar-s div {
345 | position: absolute;
346 | left: 50%;
347 | bottom: -6px;
348 | margin-left: -6px
349 | }
350 |
351 | .comp-resize .bar-e {
352 | width: 5px;
353 | height: 100%;
354 | top: 0;
355 | right: 0;
356 | cursor: e-resize;
357 | background: url(../images/bar-1px.png) repeat-y right
358 | }
359 |
360 | .comp-resize .bar-e div {
361 | position: absolute;
362 | top: 50%;
363 | right: -6px;
364 | margin-top: -6px
365 | }
366 |
367 | .comp-resize .bar-w {
368 | width: 5px;
369 | height: 100%;
370 | top: 0;
371 | cursor: w-resize;
372 | background: url(../images/bar-1px.png) repeat-y
373 | }
374 |
375 | .comp-resize .bar-w div {
376 | position: absolute;
377 | top: 50%;
378 | left: -6px;
379 | margin-top: -6px
380 | }
381 |
382 | .comp-resize .bar-ne {
383 | top: -6px;
384 | right: -6px;
385 | cursor: ne-resize
386 | }
387 |
388 | .comp-resize .bar-nw {
389 | top: -6px;
390 | left: -6px;
391 | cursor: nw-resize
392 | }
393 |
394 | .comp-resize .bar-se {
395 | bottom: -6px;
396 | right: -6px;
397 | cursor: se-resize
398 | }
399 |
400 | .comp-resize .bar-sw {
401 | bottom: -6px;
402 | left: -6px;
403 | cursor: sw-resize
404 | }
405 |
406 | .comp-resize .bar-radius {
407 | width: 12px;
408 | height: 12px;
409 | background-color: #fff;
410 | border: 1px solid #08a1ef;
411 | border-radius: 12px
412 | }
413 |
414 | .comp-resize .boom {
415 | position: absolute;
416 | top: 0;
417 | width: 18px;
418 | height: 18px;
419 | background-image: url(../images/create/area/boom.svg);
420 | pointer-events: none
421 | }
422 |
423 | .comp-resize .boom1 {
424 | position: absolute;
425 | top: 0;
426 | width: 18px;
427 | height: 18px;
428 | background-image: url(../images/create/area/boom1.svg);
429 | pointer-events: none
430 | }
431 |
432 | .comp-resize .switch-original {
433 | position: absolute;
434 | top: 0;
435 | width: 18px;
436 | height: 18px;
437 | background-image: url(../images/create/area/switch.png)
438 | }
439 | .fonttoolbar{
440 | position:absolute;
441 | top:10px;left:10px;
442 | border:1px solid #E1E1E1;
443 | background-color:white;
444 | }
445 | .fonttoolbar a{
446 | width:40px;height:30px;float:left;
447 | line-height:30px;text-align:center;
448 | cursor:pointer;font-size:12px;
449 | }
450 | .fonttoolbar a:hover{
451 | background-color:#E1E1E1;
452 | }
453 | .fonttoolbar #size ul{
454 | position:absolute;
455 | top:32px;
456 | width:40px;
457 | background-color:white;
458 | }
459 | .fonttoolbar #size ul li{
460 | float:left;
461 | height:20px;
462 | width:40px;
463 | line-height:20px;
464 | text-align:center;
465 | display:block;
466 | }
467 | .fonttoolbar #size ul li:hover{
468 | background-color:#E1E1E1;
469 | }
470 |
471 | .animatPanel {
472 | width:200px;height:260px;background-color:white;
473 | position:absolute;top:50%;left:50%;margin-left:150px;margin-top:-300px;
474 | z-index:900;
475 | }
476 | .animatPanel .top{
477 | width:100%;height:40px;
478 | line-height:40px;
479 | background-color:#08A1EF;
480 | color:white;font-size:20px;
481 | text-align:center;
482 | }
483 | .animatPanel .middle{
484 | width:100%;height:180px;display:block;
485 | color:white;font-size:30px;text-align:center;line-height:100px;
486 | overflow-y:auto;
487 | }
488 | .animatPanel .bottom{
489 | width:100%;height:40px;
490 | background-color:white;
491 | color:white;text-align:center;
492 | border-top:1px solid #08A1EF;
493 | }
494 | .animatPanel .bottom span{
495 | width:30px;line-height:30px;width:60px;text-align:center;
496 | display:block;float:right;margin:5px 10px auto auto;background-color:#08A1EF;
497 | cursor:pointer;
498 | }
499 | .animatPanel table{
500 | width:100%;
501 | border-collapse:collapse;
502 | }
503 | .animatPanel table td{
504 | color:black;
505 | font-size:12px;
506 | border-bottom:1px solid gray;
507 | height:25px;line-height:25px;
508 | }
509 | .animatPanel table td select{
510 | width:100px;
511 | }
512 | .animatPanel table td input{
513 | width:50px;float:left;margin-right:5px;
514 | }
515 | .animatPanel table td input[type='checkbox']{
516 | width:20px;float:left;margin-top:5px;
517 | }
518 |
519 | .audioPanel .middle ul
520 | {
521 | color:#666;
522 | width:100%;
523 | display:block;
524 | }
525 |
526 | .audioPanel .middle ul li
527 | {
528 | text-align:left;
529 | font-size:1rem;
530 | display:block;
531 | width:100%;
532 | height:30px;
533 | line-height:30px;
534 | border-bottom:1px dotted gray;
535 | }
536 | .audioPanel .middle ul li:hover
537 | {
538 | background-color:#f3f3f3;
539 | }
540 | .audioPanel .middle ul li div
541 | {
542 | width:75%;
543 | float:left;
544 | margin-left:5%;
545 | cursor:pointer;
546 | }
547 | .audioPanel .middle ul li span
548 | {
549 | display:inline-block;
550 | float:right;
551 | width:20%;
552 | }
553 | .audioPanel .middle ul li span em
554 | {
555 | float:right;
556 | margin-right:20px;
557 | font-size:.9rem;
558 | }
559 | .audioPanel .middle ul li span a
560 | {
561 | display:block;
562 | width:18px;
563 | height:18px;
564 | float:right;
565 | margin-right:20px;
566 | margin-top:7px;
567 | background:url(../images/audiobtn.jpg) no-repeat;
568 | background-position:-59px -10px;
569 | background-size:80px 62px;
570 | cursor:pointer;
571 | }
572 |
573 | .audioPanel .middle ul li span .pause
574 | {
575 | background-position:-40px -10px;
576 | }
577 |
578 | /*音乐相关*/
579 | #audio_btn {
580 | position: absolute;
581 | right: 20px;
582 | top: 20px;
583 | z-index: 200;
584 | display: none;
585 | width: 30px;
586 | height: 30px;
587 | background-repeat: no-repeat;
588 | }
589 | .off {
590 | background-image: url(../images/normalmusic.svg);
591 | background-size: contain;
592 | background-repeat: no-repeat;
593 | }
594 | .rotate {
595 | -webkit-animation: rotating 1.2s linear infinite;
596 | -moz-animation: rotating 1.2s linear infinite;
597 | -o-animation: rotating 1.2s linear infinite;
598 | animation: rotating 1.2s linear infinite;
599 | }
600 | @-webkit-keyframes rotating {
601 | from {
602 | -webkit-transform: rotate(0deg)
603 | }
604 |
605 | to {
606 | -webkit-transform: rotate(360deg)
607 | }
608 | }
609 | #contextmenu{width:80px;border:1px solid gray;background-color:white;z-index:9999;}
610 | #contextmenu li{
611 | width:80%;height:25px;line-height:25px;text-align:left;
612 | font-size:12px;float:left;padding-left:20%;cursor:pointer;
613 | }
614 | #contextmenu li:hover{
615 | background-color:#08A1EF;
616 | }
617 | #phonescreen img{position:absolute;}
618 |
619 |
620 |
--------------------------------------------------------------------------------
/EShow_Web/EShow/Content/js/eshow.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | etouch = {
3 | phoneW: 0,
4 | phoneH: 0,
5 | dragTarget: null, //当前拖拽的物体
6 | currentPageIndex: -1, //-1表示没有页面
7 | isEdit: false, //是否文字编辑状态
8 | editTarget: null, //右键目标
9 | moveTarget: null, //拖拽目标
10 | resizeTarget: null, //缩放目标
11 | getCurrentPage: function () {
12 | if (etouch.currentPageIndex == -1) {
13 | return null;
14 | }
15 | return $("#phonescreen .pageitem").eq(etouch.currentPageIndex);
16 | },
17 | init: function () {
18 | this.phoneW = Math.round($("#phonescreen").width());
19 | this.phoneH = Math.round($("#phonescreen").height());
20 | //this.loadData();
21 | this.bindEvent(); //最后绑定事件不能颠倒
22 | this.save(); //开启定时保存
23 | },
24 | bindEvent: function () {
25 | $("#menuAddText").click(this.addText);
26 | $("#menuAddBgPic").click(this.addBackgroundPic);
27 | $("#menuAddAudio").click(this.addAudio);
28 | $("#menuAddPic").click(this.addPic);
29 | $("#menuAddVideo").click(this.addVideo);
30 | $("#menuAddAnimat").click(this.addAnimat);
31 | $("#addPage").click(this.addPage);
32 | $("#bgPicList").click(this.setBgPicEvent);
33 | $("#picPanel").click(this.setPicEvent);
34 |
35 | $("#phonescreen")
36 | .bind("mousedown", this.mousedown)
37 | .bind("mousemove", this.mousemove)
38 | .bind("mouseup", this.mouseup)
39 | .bind("contextmenu", this.showContextMenu);
40 |
41 | //注释掉的时间都是 html动态加载的 只能绑定一次 所以就写到标签上了
42 | //可以优化
43 | //$("#fonttoolbar").on("click", this.fontbarEvent);
44 | // $("#cm_edit").bind('click', this.editFont);
45 | // $("#cm_delete").bind('click', this.deleteObj);
46 | // $("#cm_animat").bind('click', this.animatEvent);
47 |
48 | $("#contextmenu").click(this.clickContextMenu);
49 | //删除和选中事件
50 | $("#pageList").click(this.pageTabEvent);
51 | $("#menuSave").click(this.saveEvent);
52 | $("#con_my").click(this.myAppPanelEvent);
53 | },
54 | saveEvent: function () {
55 |
56 | },
57 | myAppPanelEvent: function (e) {
58 | var tagName = e.target.tagName;
59 | if (tagName == "SPAN") {
60 | var index = Number($(e.target).parent().attr("index"));
61 | etouch.removePage(index);
62 | }
63 | else if (tagName == "A") {
64 | var index = Number($(e.target).parent().attr("index"));
65 | etouch.showPage(index);
66 | }
67 | else if (tagName == "P") {
68 | var index = Number($(e.target).attr("index"));
69 | etouch.showPage(index);
70 | }
71 | },
72 | pageTabEvent: function (e) {
73 | var tagName = e.target.tagName;
74 | if (tagName == "SPAN") {
75 | var index = Number($(e.target).parent().attr("index"));
76 | etouch.removePage(index);
77 | }
78 | else if (tagName == "A") {
79 | var index = Number($(e.target).parent().attr("index"));
80 | etouch.showPage(index);
81 | }
82 | else if (tagName == "P") {
83 | var index = Number($(e.target).attr("index"));
84 | etouch.showPage(index);
85 | }
86 | },
87 | animatEvent: function () {
88 | if (etouch.editTarget) {
89 | $(".cover").show();
90 | $("#animatPanel").show();
91 | }
92 | },
93 | deleteObj: function () {
94 | if (etouch.editTarget) {
95 | if (etouch.editTarget[0].id == "audio_btn") {
96 | etouch.editTarget.hide();
97 | $("#media")[0].pause();
98 | }
99 | else {
100 | etouch.editTarget.remove();
101 | }
102 | }
103 | },
104 | //字体改变颜色
105 | changeColor: function (color) {
106 | etouch.editTarget.css({ "color": color });
107 | },
108 | fontbarEvent: function (e) {
109 | e = e || window.event;
110 | $("#fontsizelist").hide();
111 | var target = e.target;
112 | if (target.tagName == "A") {
113 | var id = target.id;
114 | if (id == "size") {
115 | $("#fontsizelist").show();
116 | }
117 | else if (id == "color") {
118 | $("#colorpicker").click();
119 | }
120 | else if (id == "bolder") {
121 | //粗体
122 | etouch.editTarget.css({ "fontWeight": "bolder" });
123 | }
124 | }
125 | else if (target.tagName == "LI") {
126 | var size = Number($(target).attr("val"));
127 | etouch.editTarget.css({ "fontSize": size });
128 | }
129 | },
130 | editFont: function () {
131 | var target = etouch.editTarget;
132 | if (target.attr("type") == "editdiv") {
133 | var span = target.find("span");
134 | span.attr("contenteditable", "true");
135 | etouch.isEdit = true;
136 | //选中
137 | var selection = window.getSelection();
138 | selection.selectAllChildren(span[0]);
139 | var x = target.position().left;
140 | var y = target.position().top;
141 | $("#fonttoolbar").css({ top: y - 40, left: x + 20 });
142 | $("#fonttoolbar").show();
143 | }
144 | },
145 | mouseup: function (e) {
146 | etouch.moveTarget = null;
147 | etouch.resizeTarget = null;
148 | $("#contextmenu").find("li").show();
149 | $("#contextmenu").hide();
150 | },
151 | toRem: function (num) {
152 | return (num / 16) + "rem";
153 | },
154 | mousemove: function (e) {
155 | if (etouch.resizeTarget != null) {//缩放
156 | var et = etouch;
157 | var target = $(etouch.resizeTarget);
158 | //上下左右 左上 左下 右上 右下
159 | var h = target.parent().height();
160 | var w = target.parent().width();
161 | var className = target.attr("class");
162 | var parentDom = target.parent();
163 | var top = parentDom.position().top;
164 | var left = parentDom.position().left;
165 | e.movementY = e.clientY - target[0].oy;
166 | e.movementX = e.clientX - target[0].ox;
167 | target[0].oy = e.clientY;
168 | target[0].ox = e.clientX;
169 |
170 | if (className.indexOf("bar-ne") != -1) {
171 | parentDom.width(et.toRem(w + e.movementX));
172 | parentDom.height(et.toRem(h - e.movementY));
173 | parentDom.css("top", et.toRem(top + e.movementY));
174 | }
175 | else if (className.indexOf("bar-nw") != -1) {
176 | parentDom.width(et.toRem(w - e.movementX));
177 | parentDom.css("left", et.toRem(left + e.movementX));
178 | parentDom.height(et.toRem(h - e.movementY));
179 | parentDom.css("top", et.toRem(top + e.movementY));
180 | }
181 | else if (className.indexOf("bar-sw") != -1) {
182 | parentDom.width(et.toRem(w - e.movementX));
183 | parentDom.css("left", et.toRem(left + e.movementX));
184 | parentDom.height(et.toRem(h + e.movementY));
185 | }
186 | else if (className.indexOf("bar-se") != -1) {
187 | parentDom.width(et.toRem(w + e.movementX));
188 | parentDom.height(et.toRem(h + e.movementY));
189 | }
190 | else if (className.indexOf("bar-s") != -1) {
191 | parentDom.height(et.toRem(h + e.movementY));
192 | }
193 | else if (className.indexOf("bar-n") != -1) {
194 | parentDom.height(et.toRem(h - e.movementY));
195 | parentDom.css("top", et.toRem(top + e.movementY));
196 | }
197 | else if (className.indexOf("bar-e") != -1) {
198 | parentDom.width(et.toRem(w + e.movementX));
199 | }
200 | else if (className.indexOf("bar-w") != -1) {
201 | parentDom.width(et.toRem(w - e.movementX));
202 | parentDom.css("left", et.toRem(left + e.movementX));
203 | }
204 |
205 | }
206 | else if (etouch.moveTarget != null) {
207 | var target = etouch.moveTarget;
208 | var x = e.clientX - $(this)[0].offsetLeft;
209 | var y = e.clientY - $(this)[0].offsetTop;
210 | if (!target.relativeLeft) {
211 | target.relativeLeft = x - target.offsetLeft;
212 | target.relativeTop = y - target.offsetTop;
213 | }
214 | x = x - target.relativeLeft;
215 | y = y - target.relativeTop;
216 | var perX = x / 16 + 'rem'; //rem相对位置
217 | var perY = y / 16 + 'rem';
218 | $(target).css({ top: perY, left: perX });
219 | }
220 | e.preventDefault();
221 | },
222 | mousedown: function (e) {
223 | if (e.button != 0) return; //不处理右键
224 | var target = e.target;
225 |
226 | var className = target.getAttribute("class");
227 | var type = $(target).attr("type");
228 | if (className && className.indexOf("bar") != -1) {
229 | if (className == "bar-radius") {
230 | target = target.parentNode;
231 | }
232 | etouch.resizeTarget = target;
233 | target.ox = target.clientX; //老的x y 用于计算每次移动的距离
234 | target.oy = target.clientY;
235 | }
236 | else if (type && type.indexOf("drag_inner") != -1) {
237 | target = target.parentNode;
238 | $(".bar").hide();
239 | $(target).find(".bar").show();
240 | etouch.moveTarget = target;
241 | etouch.moveTarget.relativeLeft = null;
242 | etouch.moveTarget.relativeTop = null;
243 | }
244 | else if (className && className.indexOf("pageitem") != -1) {
245 | etouch.isEdit = false;
246 | $("#fonttoolbar").hide();
247 | $(".bar").hide();
248 | $("span[contenteditable=true]").removeAttr("contenteditable");
249 | }
250 | //e.preventDefault(); //防止粘连现象
251 | },
252 | clickContextMenu: function (e) {
253 | $("#contextmenu").hide();
254 | },
255 | showContextMenu: function (e) {
256 | var target = $(e.target);
257 | console.log(target);
258 | if (e.target.id == 'audio_btn') {
259 | etouch.editTarget = $(target);
260 | var x = e.clientX - $(this)[0].offsetLeft;
261 | var y = e.clientY - $(this)[0].offsetTop;
262 | $("#contextmenu").css({ position: 'absolute', top: y, left: x });
263 | $("#cm_edit,#cm_animat").hide();
264 | $("#contextmenu").show();
265 | }
266 | else if (etouch.currentPageIndex != -1 && etouch.isPageItem(e.target) == false) {
267 | var type = target.attr("type");
268 | //寻找最外层
269 | if (type === undefined || type.indexOf("edit") == -1) {
270 | target = target.parent();
271 | }
272 | etouch.editTarget = $(target);
273 | var x = e.clientX - $(this)[0].offsetLeft;
274 | var y = e.clientY - $(this)[0].offsetTop;
275 | $("#contextmenu").css({ position: 'absolute', top: y, left: x });
276 | $("#contextmenu").show();
277 | }
278 | e.preventDefault();
279 | },
280 | isPageItem: function (target) {
281 | var className = target.getAttribute("class");
282 | if (className == null
283 | || className.indexOf("pageitem") == -1)
284 | return false;
285 | else
286 | return true;
287 | },
288 | //加载JSON数据
289 | loadData: function () {
290 | var html = localStorage.designHTML;
291 | if (html) {
292 | $("#phonescreen").html(html);
293 | $("#media")[0].pause();
294 | var pageSize = $("#phonescreen .pageitem").size();
295 | if (pageSize > 0) {
296 | //加载页面列表
297 | for (var i = 0; i < pageSize; i++) {
298 | etouch.addPageTab(i);
299 | }
300 | etouch.showPage(0);
301 | }
302 | }
303 | },
304 | //添加右侧页面的tab
305 | addPageTab: function (index) {
306 | var currentPageLen = index + 1;
307 | var pageList = $("#pageList");
308 | //选中当前页面
309 | pageList.append("第" + currentPageLen + "页╳
");
310 | etouch.showPage(index);
311 | pageList[0].scrollTop = pageList[0].scrollHeight;
312 | },
313 | //添加页面 包括 页面tab
314 | addPage: function (e) {
315 | if ($("#webappId").val() == "0") {
316 | alert("请先添加或选择APP,然后再添加页面");
317 | return;
318 | }
319 | var index = $("#pageList p[name='pageTab']").size();
320 | $("#phonescreen").append("");
321 | etouch.addPageTab(index);
322 | window.event.stopPropagation();
323 | window.event.preventDefault();
324 | },
325 | removePage: function (index) {
326 | var removePageObj = $("#phonescreen .pageitem").eq(index);
327 | //如果删除当前页 则选择另外的页面显示
328 | if (removePageObj.css("display") != 'none') {
329 | if ($("#phonescreen .pageitem").length != 1) {
330 | var showIndex = index == 0 ? 1 : index - 1;
331 | etouch.showPage(showIndex);
332 | }
333 | }
334 | removePageObj.remove();
335 | $("#pageList span[name='deletePage']").eq(index).parent().remove();
336 | if ($("#phonescreen .pageitem").size() == 0) {
337 | etouch.currentPageIndex = -1;
338 | }
339 | else {
340 | //重新排序
341 | $("#pageList span[name='deletePage']").each(function (i, obj) {
342 | $(obj).parent().attr("index", i);
343 | $(obj).parent().find("a").text("第" + (i + 1) + "页");
344 | if ($(obj).parent().css("backgroundColor") === "") {
345 | etouch.currentPageIndex = i;
346 | }
347 | });
348 | }
349 | },
350 | havePage: function () {
351 | return etouch.currentPageIndex != -1 ? true : false;
352 | },
353 | setBgPic: function (pageIndex, bgUrl) {
354 | var pageItem = $("#phonescreen .pageitem").eq(pageIndex)[0];
355 | pageItem.style.backgroundImage = "url('" + bgUrl + "')";
356 | },
357 | //设置图片地址
358 | setBgPicEvent: function (e) {
359 | if (e.target.tagName == "IMG") {
360 | if (etouch.havePage()) {
361 | var path = $(e.target).attr("path");
362 | etouch.setBgPic(etouch.currentPageIndex, path);
363 | }
364 | $(".cover").hide();
365 | $("#bgPanel").hide();
366 | }
367 | },
368 | setPicEvent: function (e) {
369 | if (e.target.tagName == "IMG") {
370 | if (etouch.havePage()) {
371 | var path = $(e.target).attr("path");
372 | var page = etouch.getCurrentPage();
373 | var id = "editpic" + new Date().getTime();
374 | page.append("");
375 | $("#" + id).append($("#resizeborder").html());
376 | $("#" + id).find(".bar").hide();
377 | }
378 | $(".cover").hide();
379 | $("#picPanel").hide();
380 | }
381 | //e.stopPropagation();
382 | //e.preventDefault();
383 | },
384 | showPage: function (index) {
385 | etouch.currentPageIndex = index;
386 | $("#phonescreen .pageitem").hide();
387 | $("#phonescreen .pageitem").eq(index).show();
388 | $("#pageList p").css("backgroundColor", "#E1E1E1");
389 | $("#pageList p").eq(index).css("backgroundColor", "");
390 | },
391 | addText: function () {
392 | if (etouch.currentPageIndex == -1) {
393 | alert("请先添加页面");
394 | return;
395 | }
396 | var id = "editdiv" + new Date().getTime();
397 | etouch.getCurrentPage().append("请在这里编辑
");
398 | $("#" + id).append($("#resizeborder").html());
399 | $("#" + id).find(".bar").hide();
400 | },
401 | addPic: function () {
402 | if (etouch.currentPageIndex == -1) {
403 | alert("请先添加页面");
404 | return;
405 | }
406 | $(".cover").show();
407 | $("#picPanel").show();
408 | //etouch.append("
");
409 | },
410 | removePic: function () { },
411 | addBackgroundPic: function () {
412 | //添加背景
413 | if (etouch.currentPageIndex == -1) {
414 | alert("请先添加页面");
415 | return;
416 | }
417 | $(".cover").show();
418 | $("#bgPanel").show();
419 | },
420 | removeBackgroundPic: function () { },
421 | addAnimat: function () { },
422 | removeAnimat: function () { },
423 | addAudio: function () { },
424 | removeAudio: function () { },
425 | addVideo: function () { },
426 | removeVideo: function () { },
427 | clear: function () {
428 | $("#hidArea").html("");
429 | $("#phonescreen .pageitem").remove();
430 | localStorage.webAppHTML = "";
431 | localStorage.designHTML = "";
432 | $("#pageList p").remove();
433 | etouch.dragTarget = null; //当前拖拽的物体
434 | etouch.currentPageIndex = -1; //-1表示没有页面
435 | etouch.isEdit = false; //是否文字编辑状态
436 | etouch.editTarget = null; //右键目标
437 | etouch.moveTarget = null; //拖拽目标
438 | etouch.resizeTarget = null; //缩放目标
439 | $("#webappId").val(0);
440 | $("#webappName").val("");
441 | $(".scene_title").text("");
442 | },
443 | save: function () {
444 | //持续保存
445 | if (etouch.havePage()) {
446 | //删除没用的标签
447 | var originHtml = $("#phonescreen").html();
448 | $("#hidArea").html(originHtml);
449 | $("#hidArea .pageitem")
450 | .css('display', '')
451 | .addClass("page")
452 | .eq(0).addClass("current");
453 | $("#hidArea").find("#contextmenu").remove();
454 | $("#hidArea").find("#fonttoolbar").remove();
455 | $("#hidArea .bar").remove();
456 | var simpleHtml = $("#hidArea").html();
457 | $("#hidArea").html("");
458 | localStorage.webAppHTML = simpleHtml;
459 | localStorage.designHTML = originHtml;
460 | }
461 | }
462 | }
463 | etouch.init();
464 | });
--------------------------------------------------------------------------------
/EShow_Html/content/js/zepto.min.js:
--------------------------------------------------------------------------------
1 | /* Zepto v1.0rc1 - polyfill zepto event detect fx ajax form touch - zeptojs.com/license */
2 | (function(a){String.prototype.trim===a&&(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Array.prototype.reduce===a&&(Array.prototype.reduce=function(b){if(this===void 0||this===null)throw new TypeError;var c=Object(this),d=c.length>>>0,e=0,f;if(typeof b!="function")throw new TypeError;if(d==0&&arguments.length==1)throw new TypeError;if(arguments.length>=2)f=arguments[1];else do{if(e in c){f=c[e++];break}if(++e>=d)throw new TypeError}while(!0);while(e0?[].concat.apply([],a):a}function H(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function I(a){return a in i?i[a]:i[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}function J(a,b){return typeof b=="number"&&!k[H(a)]?b+"px":b}function K(a){var b,c;return h[a]||(b=g.createElement(a),g.body.appendChild(b),c=j(b,"").getPropertyValue("display"),b.parentNode.removeChild(b),c=="none"&&(c="block"),h[a]=c),h[a]}function L(b,d){return d===a?c(b):c(b).filter(d)}function M(a,b,c,d){return A(b)?b.call(a,c,d):b}function N(a,b,d){var e=a%2?b:b.parentNode;e?e.insertBefore(d,a?a==1?e.firstChild:a==2?b:null:b.nextSibling):c(d).remove()}function O(a,b){b(a);for(var c in a.childNodes)O(a.childNodes[c],b)}var a,b,c,d,e=[],f=e.slice,g=window.document,h={},i={},j=g.defaultView.getComputedStyle,k={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},l=/^\s*<(\w+|!)[^>]*>/,m=[1,3,8,9,11],n=["after","prepend","before","append"],o=g.createElement("table"),p=g.createElement("tr"),q={tr:g.createElement("tbody"),tbody:o,thead:o,tfoot:o,td:p,th:p,"*":g.createElement("div")},r=/complete|loaded|interactive/,s=/^\.([\w-]+)$/,t=/^#([\w-]+)$/,u=/^[\w-]+$/,v={}.toString,w={},x,y,z=g.createElement("div");return w.matches=function(a,b){if(!a||a.nodeType!==1)return!1;var c=a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.matchesSelector;if(c)return c.call(a,b);var d,e=a.parentNode,f=!e;return f&&(e=z).appendChild(a),d=~w.qsa(e,b).indexOf(a),f&&z.removeChild(a),d},x=function(a){return a.replace(/-+(.)?/g,function(a,b){return b?b.toUpperCase():""})},y=function(a){return a.filter(function(b,c){return a.indexOf(b)==c})},w.fragment=function(b,d){d===a&&(d=l.test(b)&&RegExp.$1),d in q||(d="*");var e=q[d];return e.innerHTML=""+b,c.each(f.call(e.childNodes),function(){e.removeChild(this)})},w.Z=function(a,b){return a=a||[],a.__proto__=arguments.callee.prototype,a.selector=b||"",a},w.isZ=function(a){return a instanceof w.Z},w.init=function(b,d){if(!b)return w.Z();if(A(b))return c(g).ready(b);if(w.isZ(b))return b;var e;if(D(b))e=F(b);else if(C(b))e=[c.extend({},b)],b=null;else if(m.indexOf(b.nodeType)>=0||b===window)e=[b],b=null;else if(l.test(b))e=w.fragment(b.trim(),RegExp.$1),b=null;else{if(d!==a)return c(d).find(b);e=w.qsa(g,b)}return w.Z(e,b)},c=function(a,b){return w.init(a,b)},c.extend=function(c){return f.call(arguments,1).forEach(function(d){for(b in d)d[b]!==a&&(c[b]=d[b])}),c},w.qsa=function(a,b){var c;return a===g&&t.test(b)?(c=a.getElementById(RegExp.$1))?[c]:e:a.nodeType!==1&&a.nodeType!==9?e:f.call(s.test(b)?a.getElementsByClassName(RegExp.$1):u.test(b)?a.getElementsByTagName(b):a.querySelectorAll(b))},c.isFunction=A,c.isObject=B,c.isArray=D,c.isPlainObject=C,c.inArray=function(a,b,c){return e.indexOf.call(b,a,c)},c.trim=function(a){return a.trim()},c.uuid=0,c.map=function(a,b){var c,d=[],e,f;if(E(a))for(e=0;e0&&w.matches(this[0],a)},not:function(b){var d=[];if(A(b)&&b.call!==a)this.each(function(a){b.call(this,a)||d.push(this)});else{var e=typeof b=="string"?this.filter(b):E(b)&&A(b.item)?f.call(b):c(b);this.forEach(function(a){e.indexOf(a)<0&&d.push(a)})}return c(d)},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){var a=this[0];return a&&!B(a)?a:c(a)},last:function(){var a=this[this.length-1];return a&&!B(a)?a:c(a)},find:function(a){var b;return this.length==1?b=w.qsa(this[0],a):b=this.map(function(){return w.qsa(this,a)}),c(b)},closest:function(a,b){var d=this[0];while(d&&!w.matches(d,a))d=d!==b&&d!==g&&d.parentNode;return c(d)},parents:function(a){var b=[],d=this;while(d.length>0)d=c.map(d,function(a){if((a=a.parentNode)&&a!==g&&b.indexOf(a)<0)return b.push(a),a});return L(b,a)},parent:function(a){return L(y(this.pluck("parentNode")),a)},children:function(a){return L(this.map(function(){return f.call(this.children)}),a)},siblings:function(a){return L(this.map(function(a,b){return f.call(b.parentNode.children).filter(function(a){return a!==b})}),a)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(a){return this.map(function(){return this[a]})},show:function(){return this.each(function(){this.style.display=="none"&&(this.style.display=null),j(this,"").getPropertyValue("display")=="none"&&(this.style.display=K(this.nodeName))})},replaceWith:function(a){return this.before(a).remove()},wrap:function(a){return this.each(function(){c(this).wrapAll(c(a)[0].cloneNode(!1))})},wrapAll:function(a){return this[0]&&(c(this[0]).before(a=c(a)),a.append(this)),this},unwrap:function(){return this.parent().each(function(){c(this).replaceWith(c(this).children())}),this},clone:function(){return c(this.map(function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(b){return(b===a?this.css("display")=="none":b)?this.show():this.hide()},prev:function(){return c(this.pluck("previousElementSibling"))},next:function(){return c(this.pluck("nextElementSibling"))},html:function(b){return b===a?this.length>0?this[0].innerHTML:null:this.each(function(a){var d=this.innerHTML;c(this).empty().append(M(this,b,a,d))})},text:function(b){return b===a?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=b})},attr:function(c,d){var e;return typeof c=="string"&&d===a?this.length==0||this[0].nodeType!==1?a:c=="value"&&this[0].nodeName=="INPUT"?this.val():!(e=this[0].getAttribute(c))&&c in this[0]?this[0][c]:e:this.each(function(a){if(this.nodeType!==1)return;if(B(c))for(b in c)this.setAttribute(b,c[b]);else this.setAttribute(c,M(this,d,a,this.getAttribute(c)))})},removeAttr:function(a){return this.each(function(){this.nodeType===1&&this.removeAttribute(a)})},prop:function(b,c){return c===a?this[0]?this[0][b]:a:this.each(function(a){this[b]=M(this,c,a,this[b])})},data:function(b,c){var d=this.attr("data-"+H(b),c);return d!==null?d:a},val:function(b){return b===a?this.length>0?this[0].value:a:this.each(function(a){this.value=M(this,b,a,this.value)})},offset:function(){if(this.length==0)return null;var a=this[0].getBoundingClientRect();return{left:a.left+window.pageXOffset,top:a.top+window.pageYOffset,width:a.width,height:a.height}},css:function(c,d){if(d===a&&typeof c=="string")return this.length==0?a:this[0].style[x(c)]||j(this[0],"").getPropertyValue(c);var e="";for(b in c)typeof c[b]=="string"&&c[b]==""?this.each(function(){this.style.removeProperty(H(b))}):e+=H(b)+":"+J(b,c[b])+";";return typeof c=="string"&&(d==""?this.each(function(){this.style.removeProperty(H(c))}):e=H(c)+":"+J(c,d)),this.each(function(){this.style.cssText+=";"+e})},index:function(a){return a?this.indexOf(c(a)[0]):this.parent().children().indexOf(this[0])},hasClass:function(a){return this.length<1?!1:I(a).test(this[0].className)},addClass:function(a){return this.each(function(b){d=[];var e=this.className,f=M(this,a,b,e);f.split(/\s+/g).forEach(function(a){c(this).hasClass(a)||d.push(a)},this),d.length&&(this.className+=(e?" ":"")+d.join(" "))})},removeClass:function(b){return this.each(function(c){if(b===a)return this.className="";d=this.className,M(this,b,c,d).split(/\s+/g).forEach(function(a){d=d.replace(I(a)," ")}),this.className=d.trim()})},toggleClass:function(b,d){return this.each(function(e){var f=M(this,b,e,this.className);(d===a?!c(this).hasClass(f):d)?c(this).addClass(f):c(this).removeClass(f)})}},["width","height"].forEach(function(b){c.fn[b]=function(d){var e,f=b.replace(/./,function(a){return a[0].toUpperCase()});return d===a?this[0]==window?window["inner"+f]:this[0]==g?g.documentElement["offset"+f]:(e=this.offset())&&e[b]:this.each(function(a){var e=c(this);e.css(b,M(this,d,a,e[b]()))})}}),n.forEach(function(a,b){c.fn[a]=function(){var a=c.map(arguments,function(a){return B(a)?a:w.fragment(a)});if(a.length<1)return this;var d=this.length,e=d>1,f=b<2;return this.each(function(c,g){for(var h=0;h0&&this.bind(o,n),setTimeout(function(){m.css(i),e<=0&&setTimeout(function(){m.each(function(){n.call(this)})},0)},0),this},i=null}(Zepto),function($){function triggerAndReturn(a,b,c){var d=$.Event(b);return $(a).trigger(d,c),!d.defaultPrevented}function triggerGlobal(a,b,c,d){if(a.global)return triggerAndReturn(b||document,c,d)}function ajaxStart(a){a.global&&$.active++===0&&triggerGlobal(a,null,"ajaxStart")}function ajaxStop(a){a.global&&!--$.active&&triggerGlobal(a,null,"ajaxStop")}function ajaxBeforeSend(a,b){var c=b.context;if(b.beforeSend.call(c,a,b)===!1||triggerGlobal(b,c,"ajaxBeforeSend",[a,b])===!1)return!1;triggerGlobal(b,c,"ajaxSend",[a,b])}function ajaxSuccess(a,b,c){var d=c.context,e="success";c.success.call(d,a,e,b),triggerGlobal(c,d,"ajaxSuccess",[b,c,a]),ajaxComplete(e,b,c)}function ajaxError(a,b,c,d){var e=d.context;d.error.call(e,c,b,a),triggerGlobal(d,e,"ajaxError",[c,d,a]),ajaxComplete(b,c,d)}function ajaxComplete(a,b,c){var d=c.context;c.complete.call(d,b,a),triggerGlobal(c,d,"ajaxComplete",[b,c]),ajaxStop(c)}function empty(){}function mimeToDataType(a){return a&&(a==htmlType?"html":a==jsonType?"json":scriptTypeRE.test(a)?"script":xmlTypeRE.test(a)&&"xml")||"text"}function appendQuery(a,b){return(a+"&"+b).replace(/[&?]{1,2}/,"?")}function serializeData(a){isObject(a.data)&&(a.data=$.param(a.data)),a.data&&(!a.type||a.type.toUpperCase()=="GET")&&(a.url=appendQuery(a.url,a.data))}function serialize(a,b,c,d){var e=$.isArray(b);$.each(b,function(b,f){d&&(b=c?d:d+"["+(e?"":b)+"]"),!d&&e?a.add(f.name,f.value):(c?$.isArray(f):isObject(f))?serialize(a,f,c,b):a.add(b,f)})}var jsonpID=0,isObject=$.isObject,document=window.document,key,name,rscript=/