• 大小: 11.81MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-20
  • 语言: C#
  • 标签: ASP.net商  

资源简介

该源码为网上收集,代码完整,调试成功.

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using DTcms.Common;

namespace DTcms.API.OAuth
{
    public class feixin_helper
    {
        public feixin_helper()
        { }

        /// 
        /// 取得Access Token
        /// 

        /// 临时Authorization Code
        /// Dictionary
        public static Dictionaryject> get_access_token(string code)
        {
            //获得配置信息
            oauth_config config = oauth_helper.get_config(“feixin“);
            string send_url = “https://i.feixin.10086.cn/oauth2/access_token?grant_type=authorization_code&code=“ + code + “&client_id=“ + config.oauth_app_id + “&client_secret=“ + config.oauth_app_key + “&redirect_uri=“ + Utils.UrlEncode(config.return_uri);
            //发送并接受返回值
            string result = Utils.HttpGet(send_url);
            if (result.Contains(“error“))
            {
                return null;
            }
            try
            {
                Dictionaryject> dic = Jsonhelper.DataRowFromJSON(result);
                return dic;
            }
            catch
            {
                return null;
            }
        }

        /// 
        /// 获取登录用户自己的详细信息
        /// 

        /// 临时的Access Token
        /// JsonData
        public static Dictionaryject> get_info(string access_token)
        {
            string send_url = “https://i.feixin.10086.cn/api/user.json?access_token=“ + access_token;
            //发送并接受返回值
            string result = Utils.HttpGet(send_url);
            if (result.Contains(“error“))
            {
                return null;
            }
            try
            {
                Dictionaryject> dic = Jsonhelper.DataRowFromJSON(result);
                return dic;
            }
            catch
            {
                return null;
            }
        }

    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      61952  2015-07-09 11:34  DTcms.Common\bin\Debug\DTcms.Common.dll

     文件     187904  2015-07-09 11:34  DTcms.Common\bin\Debug\DTcms.Common.pdb

     文件       2617  2014-12-05 17:33  DTcms.Common\CacheHelper.cs

     文件       3446  2014-12-27 23:48  DTcms.Common\DESEncrypt.cs

     文件       3246  2015-04-06 16:39  DTcms.Common\DTcms.Common.csproj

     文件       3789  2015-04-03 03:29  DTcms.Common\DTEnums.cs

     文件       6030  2015-04-29 20:38  DTcms.Common\DTKeys.cs

     文件       2059  2015-04-02 01:45  DTcms.Common\DTMail.cs

     文件      17865  2014-12-27 15:21  DTcms.Common\DTRequest.cs

     文件       4246  2015-03-29 01:25  DTcms.Common\Jsonhelper.cs

     文件       6175  2015-07-09 11:34  DTcms.Common\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       3003  2015-06-07 13:45  DTcms.Common\obj\Debug\DTcms.Common.csproj.FileListAbsolute.txt

     文件      61952  2015-07-09 11:34  DTcms.Common\obj\Debug\DTcms.Common.dll

     文件     187904  2015-07-09 11:34  DTcms.Common\obj\Debug\DTcms.Common.pdb

     文件      24003  2015-04-06 16:15  DTcms.Common\PageTemplate.cs

     文件       2498  2014-12-19 19:55  DTcms.Common\PagingHelper.cs

     文件       1543  2014-11-04 13:50  DTcms.Common\Properties\AssemblyInfo.cs

     文件       1866  2014-12-19 19:33  DTcms.Common\Serializationhelper.cs

     文件      17613  2015-04-03 20:00  DTcms.Common\Thumbnail.cs

     文件      52782  2015-09-16 22:08  DTcms.Common\Utils.cs

     文件      10852  2015-04-03 20:20  DTcms.Common\WaterMark.cs

     文件       4699  2015-03-20 02:03  DTcms.Common\xmlHelper.cs

     文件      56744  2015-05-14 17:54  DTcms.DAL\article.cs

     文件       4841  2014-12-24 15:08  DTcms.DAL\article_albums.cs

     文件      12026  2015-04-20 17:41  DTcms.DAL\article_attach.cs

     文件      22832  2014-12-24 23:37  DTcms.DAL\article_attribute_field.cs

     文件      23624  2014-12-26 17:09  DTcms.DAL\article_category.cs

     文件      12982  2014-12-27 15:04  DTcms.DAL\article_comment.cs

     文件      61952  2015-07-09 11:34  DTcms.DAL\bin\Debug\DTcms.Common.dll

     文件     187904  2015-07-09 11:34  DTcms.DAL\bin\Debug\DTcms.Common.pdb

............此处省略1954个文件信息

评论

共有 条评论