public ActionResult Detail(string id)
        {
            Book book = _service.Detail(id);

            string FileName = "";

            if (book.TagType == 1)
            {
                FileName = "Net";
            }
            else if (book.TagType == 2)
            {
                FileName = "Python";
            }

            var url   = "/File/" + FileName + "/" + book.filename;
            var jiami = new DES_Helper().EncryptDES(url, "fuckyou!");//加密

            ViewBag.FileAddress = jiami;

            return(View("Detail", book));
        }
Exemple #2
0
        public string Index(string file)
        {
            string jiamival = new DES_Helper().DecryptDES(file, "fuckyou!");

            return(jiamival);
        }