[实战]MVC5+EF6+MySql企业网盘实战(29)——更新日志

摘要

NetDisk更新日志,及项目使用说明。

开发工具

Vs2013+mysql+ef6+mvc5

bug

1、在加载列表的时候,默认加载的所有,修改为,过滤逻辑删除的文件。

2、加载音乐,文档等分类时,过滤逻辑删除的文件。

3、删除了api文件夹。

4、将图标文件路径,以及项目中用到的提示语,提取到一个常量类中。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Wolfy.NetDisk.Site.Models
{
    /// <summary>
    /// 常量参数
    /// </summary>
    public class NetDiskConstParameters
    {
        /// <summary>
        /// 图片图标相对路径
        /// </summary>
        public const string ImageIconRelativePath = "/Content/Images/FileIcon/ImgType.png";
        /// <summary>
        /// apk应用 图标相对路径
        /// </summary>
        public const string ApkIconRelativePath = "/Content/Images/FileIcon/ApkType.png";
        /// <summary>
        /// 种子,图标相对路径
        /// </summary>
        public const string BtIconRelativePath = "/Content/Images/FileIcon/TorrentType.png";
        /// <summary>
        /// cad 图纸 图标相对路径
        /// </summary>
        public const string CadIconRelativePath = "/Content/Images/FileIcon/CADType.png";
        /// <summary>
        /// 文档 图标相对路径
        /// </summary>
        public const string DocIconRelativePath = "/Content/Images/FileIcon/DocType.png";
        /// <summary>
        /// excel 图标相对路径
        /// </summary>
        public const string ExcelIconRelativePath = "/Content/Images/FileIcon/ExeType.png";
        /// <summary>
        /// 文件夹 图标相对路径
        /// </summary>
        public const string FolderIconRelativePath = "/Content/Images/FileIcon/FolderType.png";
        /// <summary>
        /// ios应用 图标相对路径
        /// </summary>
        public const string IosIconRelativePath = "/Content/Images/FileIcon/IpaType.png";
        /// <summary>
        /// 压缩包 图标相对路径
        /// </summary>
        public const string RarIconRelativePath = "/Content/Images/FileIcon/RarType.png";
        /// <summary>
        /// cad 图纸 图标相对路径
        /// </summary>
        public const string ZipIconRelativePath = "/Content/Images/FileIcon/Apps.png";
        /// <summary>
        /// 音乐图标相对路径
        /// </summary>
        public const string MusicIconRelativePath = "/Content/Images/FileIcon/MusicType.png";
        /// <summary>
        /// 其他 图标相对路径
        /// </summary>
        public const string OtherIconRelativePath = "/Content/Images/FileIcon/OtherType.png";
        /// <summary>
        ///pdf 图标相对路径
        /// </summary>
        public const string PdfIconRelativePath = "/Content/Images/FileIcon/PdfType.png";
        /// <summary>
        /// cad 图纸 图标相对路径
        /// </summary>
        public const string PptIconRelativePath = "/Content/Images/FileIcon/PptType.png";
        /// <summary>
        ///txt 图标相对路径
        /// </summary>
        public const string TxtIconRelativePath = "/Content/Images/FileIcon/TxtType.png";
        /// <summary>
        /// 视频 图标相对路径
        /// </summary>
        public const string VideoIconRelativePath = "/Content/Images/FileIcon/VideoType.png";
        /// <summary>
        /// vsd
        /// </summary>
        public const string VsdIconRelativePath = "/Content/Images/FileIcon/VsdType.png";
        /// <summary>
        /// vsd
        /// </summary>
        public const string VsdIconRelativePath = "/Content/Images/FileIcon/VsdType.png";

        /// <summary>
        /// vsd
        /// </summary>
        public const string VsdIconRelativePath = "/Content/Images/FileIcon/XlsType.png";
    }
}
View Code

项目使用说明

1、在使用之前,需要对项目进行简单的数据初始化,使用视图Views/Setting/Init.cshtml。

2、初始化会创建所需的数据表,以及两个用户管理员,一个普通用户帐号。

3、会默认添加部门分类。

4、默认几种文件图标。

5、默认的管理员或者用户的导航列表。

总结

目前实现的功能有

1、用户注册、登录。

2、上传头像。

3、上传文件。

4、下载文件,删除文件。

该项目,是一个以学习为目的的测试项目,肯定有很多不足的地方,望提出或者进行参与改进。

项目git

https://git.oschina.net/wolfy/NetDisk

原文地址:https://www.cnblogs.com/wolf-sun/p/6238803.html