开发者社区> 问答> 正文

MVC 中视图返回Code码到控制器中获取不到


dd.runtime.permission.requestAuthCode({
        corpId: _config.corpId,
        onSuccess: function (result) {

                                            logger.i('authcode: = ' + result["code"]);
                                                //location.href="/MESExceptionManager/Details?code="+info["code"];
                                                    $.ajax({
                                                      url: '/MESExceptionManager/Details',
                                                            type: "POST",
                                                            data: { "code": result["code"], "id": '@Model.LngMESExceptionID' },
                                                            dataType:'join',
                                                            timeout:900,
                                                            success:function(data, status, xhr){
                                                                                                  var info = JSON.parse(data);
                                                                                                  if (info.errcode === 0)
                                                                                                  {
                                                                                                    logger.i('user id:' + info.userid);
                                                                                                    dd.userid = info.userid;
                                                                                                  }
                                                                                                  else
                                                                                                  {
                                                                                                    logger.e('auth error:' + data);
                                                                                                  }
                                                                                              },
                                                            error: function(xhr, errorType, error){
                                                                                                    logger.e(errorType +',' + error);
                                                                                                  }
                                                          });




展开
收起
阳春白雪1 2016-06-16 11:38:37 3967 0
4 条回答
写回答
取消 提交回答
  • 好的
    2016-06-17 11:32:43
    赞同 展开评论 打赏
  • ReMVC 中视图返回Code码到控制器中获取不到
    直接把code存到缓存或者cookie,后台读取就好啦
    2016-06-16 14:24:01
    赞同 展开评论 打赏
  • ReMVC 中视图返回Code码到控制器中获取不到
    各位大牛有什么方法可以分享一下喽
    2016-06-16 13:22:03
    赞同 展开评论 打赏
  • ReMVC 中视图返回Code码到控制器中获取不到
            
    2016-06-16 12:02:12
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Java Spring Boot开发实战系列课程【第7讲】:Spring Boot 2.0安全机制与MVC身份验证实战(Java面试题) 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载