Exam icon indicating copy to clipboard operation
Exam copied to clipboard

数据库结构和数据能提供一下么

Open hbljz opened this issue 6 years ago • 5 comments

hbljz avatar Jun 07 '18 17:06 hbljz

进到登录页面,然后注册失败!

hbljz avatar Jun 07 '18 17:06 hbljz

[HPM] Error occurred while trying to proxy request /api/studentregister from localhost:8888 to http://127.0.0.1:3000/api (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors) 服务器端报的错误信息!

hbljz avatar Jun 08 '18 06:06 hbljz

报错如下: 1528454836 1 1528454869 1

hbljz avatar Jun 08 '18 10:06 hbljz

用户注册表单输入内容限制你看一看

下面是我数据库中的部分数据:

paper

{
    "_id" : ObjectId("5a40f5f4c08cc92254f875e0"),
    "name" : "操作系统Windows XP基础测试",
    "totalPoints" : 100,
    "time" : 60,
    "startTime" : ISODate("2018-05-19T01:02:38.394Z"),
    "examnum" : 1,
    "_teacher" : ObjectId("5a40f5f4c08cc92254f875df"),
    "_questions" : [ 
        ObjectId("5a40f5f4c08cc92254f875e1"), 
        ObjectId("5ad0b409b549df2ec8e6d675"), 
        ObjectId("5af25c1def6b38313027d370")
    ],
    "__v" : 3
}

question

{
    "_id" : ObjectId("5af2725c8891322b94bc9a76"),
    "name" : "操作系统是一种()",
    "type" : "single",
    "score" : 5,
    "answer" : "B",
    "_teacher" : ObjectId("5a40f5f4c08cc92254f875df"),
    "selection" : [ 
        "所有软件的总称", 
        "管理计算机硬件和软件资源的系统软件", 
        "操作者直接接触的计算机系统", 
        "为特定的用途设计的软件"
    ],
    "_papers" : [ 
        ObjectId("5af2725c8891322b94bc9a72")
    ],
    "__v" : 0
}

student

{
    "_id" : ObjectId("5adf41c82aa98b20e45859c7"),
    "userId" : 12001,
    "userName" : "张三",
    "passWord" : "c8837b23ff8aaa8a2dde915473ce0991",
    "grade" : "3",
    "class" : "3",
    "exams" : [ 
        {
            "_paper" : ObjectId("5acebec4bd31862a4c088882"),
            "date" : ISODate("2018-05-04T15:31:36.025Z"),
            "isSure" : true,
            "score" : 0,
            "startTime" : ISODate("2018-05-04T15:10:07.799Z"),
            "_id" : ObjectId("5aec7cd884c4e528e84fd273"),
            "answers" : []
        }
    ],
    "__v" : 16
}

teacher

{
    "_id" : ObjectId("5a40f5f4c08cc92254f875df"),
    "userId" : 100111,
    "userName" : "张老师",
    "passWord" : "e10adc3949ba59abbe56e057f20f883e",
    "_papers" : [ 
        ObjectId("5a40f5f4c08cc92254f875e0"), 
        ObjectId("5ace199c12082c1a30f48448"), 
        ObjectId("5ace1b457605f52624b17f4e"), 
        ObjectId("5ace255aba665813e4301653"), 
        ObjectId("5acebec4bd31862a4c088882"), 
        ObjectId("5acebf3dbd31862a4c088884"), 
        ObjectId("5af25464ef6b38313027d366"), 
        ObjectId("5af2725c8891322b94bc9a72"), 
        ObjectId("5aff039ea3d2941854f0509c"), 
        ObjectId("5aff6a4c04f95d32303cb431")
    ],
    "__v" : 14
}

FinGet avatar Jun 08 '18 14:06 FinGet

你这个和数据库没关系 你只是没启动express 然后数据接口当然请求不通了

thanatos-proto avatar Jul 15 '18 08:07 thanatos-proto