Ejemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {
            string action = DTRequest.GetFormString("action");

            switch (action)
            {
                #region  news related
            case "get_channel_article_news":
                OutPut(context, HospicalAPI.get_channel_article_news());
                break;

            case "get_channel_article_news_detail":
                OutPut(context, HospicalAPI.get_channel_article_news_detail(
                           DTRequest.GetFormIntValue("id")));
                break;

            case "get_channel_article_goods":
                OutPut(context, HospicalAPI.get_channel_article_goods());
                break;

            case "get_channel_article_goods_detail":
                OutPut(context, HospicalAPI.get_channel_article_goods_detail(
                           DTRequest.GetFormIntValue("id")));
                break;
                #endregion

                #region content related
            case "get_channel_article_content":
                OutPut(context, HospicalAPI.get_channel_article_content());
                break;

            case "get_channel_article_content_detail":
                OutPut(context, HospicalAPI.get_channel_article_content_detail(DTRequest.GetFormIntValue("id")));
                break;
                #endregion

                #region others
            case "getOpenId":
                OutPut(context, HospicalAPI.getOpenId(
                           DTRequest.GetFormString("code"),
                           DTRequest.GetFormString("source")));//不填source参数默认为罗托鲁瓦 kkl表示凯库拉
                break;

            case "add_or_update_user":
                OutPut(context, HospicalAPI.add_or_update_user(
                           DTRequest.GetFormString("openid"),
                           DTRequest.GetFormString("unionid"),
                           DTRequest.GetFormString("photo"),
                           DTRequest.GetFormIntValue("sex"),
                           DTRequest.GetFormString("nickname"),
                           DTRequest.GetFormIntValue("age"),
                           DTRequest.GetFormString("phone"),
                           DTRequest.GetFormString("interest"),
                           DTRequest.GetFormFloat("latitude", -1),
                           DTRequest.GetFormFloat("longitude", -1),
                           DTRequest.GetFormFloat("accuracy", -1)));
                break;

            case "getUnionId":
                OutPut(context, HospicalAPI.getUnionId(
                           DTRequest.GetFormString("session_key"),
                           DTRequest.GetFormString("iv"),
                           DTRequest.GetFormString("encryptedData")));
                break;


                #endregion

            default:
                OutPut(context, "not implement action : " + action);
                break;
            }
        }
Ejemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            string action = DTRequest.GetFormString("action");

            LogHelper.WriteInfo("LINE19:" + action);
            switch (action)
            {
            case "get_holidays":
                OutPut(context, TourAPI.get_holidays());
                break;

            case "get_channel_article_news":
                OutPut(context, TourAPI.get_channel_article_news(1000));
                break;

            case "get_channel_article_news_top5":
                OutPut(context, TourAPI.get_channel_article_news(5));
                break;

            case "get_channel_article_news_detail":
                OutPut(context, TourAPI.get_channel_article_news_detail(
                           DTRequest.GetFormIntValue("id")));
                break;

            case "get_channel_article_goods":
                OutPut(context, TourAPI.get_channel_article_goods());
                break;

            case "get_channel_article_goods_detail":
                OutPut(context, TourAPI.get_channel_article_goods_detail(DTRequest.GetFormIntValue("id")));
                break;

            case "get_channel_article_content":
                OutPut(context, TourAPI.get_channel_article_content());
                break;

            case "get_channel_article_content_detail":
                OutPut(context, TourAPI.get_channel_article_content_detail(DTRequest.GetFormIntValue("id")));
                break;

            case "get_channel_article_food":
                OutPut(context, TourAPI.get_channel_article_food());
                break;

            case "get_channel_article_food_detail":
                OutPut(context, TourAPI.get_channel_article_food_detail(DTRequest.GetFormIntValue("id")));
                break;

            case "get_channel_article_guidance":
                OutPut(context, TourAPI.get_channel_article_guidance());
                break;

            case "get_channel_article_guidance_detail":
                OutPut(context, TourAPI.get_channel_article_guidance_detail(
                           DTRequest.GetFormIntValue("id")));
                break;

            case "getOpenId":
                OutPut(context, TourAPI.getOpenId(
                           DTRequest.GetFormString("code")));
                break;

            case "add_or_update_user":
                OutPut(context, TourAPI.add_or_update_user(
                           DTRequest.GetFormString("openid"),
                           DTRequest.GetFormString("unionid"),
                           DTRequest.GetFormString("photo"),
                           DTRequest.GetFormIntValue("sex"),
                           DTRequest.GetFormString("nickname"),
                           DTRequest.GetFormIntValue("age"),
                           DTRequest.GetFormString("phone"),
                           DTRequest.GetFormString("interest"),
                           DTRequest.GetFormFloat("latitude", -1),
                           DTRequest.GetFormFloat("longitude", -1),
                           DTRequest.GetFormFloat("accuracy", -1)));
                break;

            case "get_brand_list":
                OutPut(context, TourAPI.get_brand_list());
                break;

            case "get_brand_detail":
                OutPut(context, TourAPI.get_brand_detail(
                           DTRequest.GetFormIntValue("id")));
                break;

            case "getAppCard":
                OutPut(context, TourAPI.getAppCard(
                           DTRequest.GetFormString("card_id")));
                break;

            case "coupon_query_store":
                OutPut(context, TourAPI.coupon_query_store());
                break;

            case "coupon_query_coupon":
                OutPut(context, TourAPI.coupon_query_coupon(
                           DTRequest.GetFormString("poi_id")));
                break;

            case "coupon_query_user":
                OutPut(context, TourAPI.coupon_query_user(
                           DTRequest.GetFormString("unionid")));
                break;

            case "getUnionId":
                OutPut(context, TourAPI.getUnionId(
                           DTRequest.GetFormString("session_key"),
                           DTRequest.GetFormString("iv"),
                           DTRequest.GetFormString("encryptedData")));
                break;

            default:
                OutPut(context, "not implement action : " + action);
                break;
            }
        }
Ejemplo n.º 3
0
        public void ProcessRequest(HttpContext context)
        {
            string action = DTRequest.GetFormString("action");

            LogHelper.WriteInfo("LINE20:" + action);
            switch (action)
            {
            case "updateUser":    //更新个人信息
                OutPut(context, SchoolAPI.updateUser(
                           DTRequest.GetFormString("userId"),
                           DTRequest.GetFormString("nickName"),
                           DTRequest.GetFormString("mobile"),
                           DTRequest.GetFormString("xueli"),
                           DTRequest.GetFormString("zhuanye"),
                           DTRequest.GetFormString("age")));
                break;

            case "getOpenId":
                OutPut(context, SchoolAPI.getOpenId(
                           DTRequest.GetFormString("code")));
                break;

            case "register":
                OutPut(context, SchoolAPI.register(
                           DTRequest.GetFormString("openId"),
                           DTRequest.GetFormString("nickName"),
                           DTRequest.GetFormString("avatarUrl"),
                           DTRequest.GetFormString("sex")));
                break;

            case "search":
                OutPut(context, SchoolAPI.search(
                           DTRequest.GetFormString("name"),
                           DTRequest.GetFormString("english")));
                break;

            case "getSchool":
                OutPut(context, SchoolAPI.getSchool());
                break;

            case "getRecord":
                OutPut(context, SchoolAPI.getRecord(
                           DTRequest.GetFormString("userId")));
                break;

            case "schoolSearch":
                OutPut(context, SchoolAPI.schoolSearch(
                           DTRequest.GetFormString("name"),
                           DTRequest.GetFormString("english")));
                break;

            case "getResult":
                OutPut(context, SchoolAPI.getResult(
                           DTRequest.GetFormString("recordId")));
                break;

            case "getSchoolById":
                OutPut(context, SchoolAPI.getSchoolById(
                           DTRequest.GetFormString("schoolId")));
                break;

            case "getSchoolDetail":
                OutPut(context, SchoolAPI.getSchoolDetail(
                           DTRequest.GetFormString("schoolId")));
                break;

            case "getPicker":
                OutPut(context, SchoolAPI.getPicker());
                break;

            case "insertBachelorData":    //高中
                OutPut(context, SchoolAPI.insertBachelorData(
                           DTRequest.GetFormString("userId"),
                           DTRequest.GetFormString("targetCountry"),
                           DTRequest.GetFormFloat("GPA", 0),
                           DTRequest.GetFormString("GPAType"),
                           DTRequest.GetFormIntValue("language"),
                           DTRequest.GetFormString("languageType"),
                           DTRequest.GetFormIntValue("standardization"),
                           DTRequest.GetFormString("standardizationType"),
                           DTRequest.GetFormString("toSchool"),
                           DTRequest.GetFormString("inclination"),
                           DTRequest.GetFormString("graduation"),
                           DTRequest.GetFormString("rank"),
                           DTRequest.GetFormString("recommend"),
                           DTRequest.GetFormString("prize"),
                           DTRequest.GetFormString("summer"),
                           DTRequest.GetFormString("volunteer")));
                break;

            case "insertMasterData":    //大学
                OutPut(context, SchoolAPI.insertMasterData(
                           DTRequest.GetFormString("userId"),
                           DTRequest.GetFormString("targetCountry"),
                           DTRequest.GetFormString("school"),
                           DTRequest.GetFormString("major1"),
                           DTRequest.GetFormString("major2"),
                           DTRequest.GetFormFloat("GPA", 0),
                           DTRequest.GetFormString("GPAType"),
                           DTRequest.GetFormIntValue("language"),
                           DTRequest.GetFormString("languageType"),
                           DTRequest.GetFormIntValue("standardization"),
                           DTRequest.GetFormString("standardizationType"),
                           DTRequest.GetFormString("toSchool"),
                           DTRequest.GetFormString("experience"),
                           DTRequest.GetFormString("paper"),
                           DTRequest.GetFormString("recommendation"),
                           DTRequest.GetFormString("overseas"),
                           DTRequest.GetFormString("practice")));
                break;

            default:
                OutPut(context, "not implement action : " + action);
                break;
            }
        }