Beispiel #1
0
 public static string GetShareImg(JokePostInfo jokeinfo)
 {
     if(AppConfig.IsQiniuUpload>0)
     {
         return string.Format("{0}/{1}", QiniuUpload.QiniuCloudUrl, jokeinfo.JokeType == 1 ? FileInfoHelper.GetFileName(jokeinfo.Content) : "shareimg.png");
     }
     else
     {
        return string.Format("{0}", jokeinfo.JokeType == 1 ? string.Format("{0}//{1}",AppConfig.JokeImgUpload,jokeinfo.Content) : "/imgs/shareimg.png");
     }
 }
Beispiel #2
0
 public static string GetShareContent(JokePostInfo jokeinfo)
 {
     string content = "超级冷笑话";
     if(jokeinfo.JokeType==0)
     {
         content = jokeinfo.Content.Replace("'","\"");
     }
     else
     {
         content = ConfigurationManager.AppSettings["SiteDescription"];
     }
     return content;
 }