コード例 #1
0
 public WxJsAPIEntity InitConfig(string url)
 {
     try
     {
         var us = GetUserSession(false);
         if (us != null)
         {
             WxJsAPIEntity result = WXApi.eduGetJsConfig(url);
             result.openId = us.OpenId;
             return(result);
         }
         else
         {
             WxJsAPIEntity result = new WxJsAPIEntity
             {
                 ErrorMsg = "请重新登陆",
                 IntMsg   = -1
             };
             return(result);
         }
     }
     catch (Exception ex)
     {
         WxJsAPIEntity result = new WxJsAPIEntity
         {
             ErrorMsg = ex.Message
         };
         return(result);
     }
     //    return null;
 }