You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
29 KiB
41 lines
29 KiB
import axios from 'axios';
|
|
import { isDev } from 'educoder'
|
|
|
|
import MockAdapter from 'axios-mock-adapter';
|
|
|
|
// This sets the mock adapter on the default instance
|
|
var mock;
|
|
if (isDev()) {
|
|
mock= new MockAdapter(axios);
|
|
}
|
|
|
|
export function initMock(doProxy, proxy) {
|
|
var mockProxy = doProxy ? proxy : ''
|
|
if (mock) {
|
|
// api/v1/games/ixq5euhgrf7y
|
|
mock.onGet(`${mockProxy}/api/v1/games/ixq5euhgrf7y`).reply( (config) => {
|
|
return [200
|
|
, {"tpm_modified":false,"tpm_cases_modified":false,"hide_code":false,"output_sets":{"test_sets":"{\"is_public\":1,\"result\":true,\"input\":\"\",\"output\":\"40.0000\\r\\n10.0000\\r\\n320.0000\\r\\n80.0000\\r\\n\\r\\n***********************\\r\\n\\r\\n0.4058\\r\\n0.3902\\r\\n0.4734\\r\\n0.5419\\r\\n\\r\\n***********************\\r\\n\\r\\n3406.4393\\r\\n2236.7194\\r\\n1896.2041\\r\\n\\r\\n***********************\\r\\n\\r\\n0\\r\\n2\\r\\n1\\r\\n4\\r\\n6\\r\\n1\\r\\n\\r\\n***********************\\r\\n\\r\\n8716.9732\\r\\n9416.6049\\r\\n8376.4009\\r\\n\\r\\n***********************\\r\\n\\r\\n23.7271\\r\\n9.5172\\r\\n33.6425\\r\\n21.6346\\r\\n\",\"actual_output\":\"40.0000\\r\\n10.0000\\r\\n320.0000\\r\\n80.0000\\r\\n\\r\\n***********************\\r\\n\\r\\n0.4058\\r\\n0.3902\\r\\n0.4734\\r\\n0.5419\\r\\n\\r\\n***********************\\r\\n\\r\\n3406.4393\\r\\n2236.7194\\r\\n1896.2041\\r\\n\\r\\n***********************\\r\\n\\r\\n0\\r\\n2\\r\\n1\\r\\n4\\r\\n6\\r\\n1\\r\\n\\r\\n***********************\\r\\n\\r\\n8716.9732\\r\\n9416.6049\\r\\n8376.4009\\r\\n\\r\\n***********************\\r\\n\\r\\n23.7271\\r\\n9.5172\\r\\n33.6425\\r\\n21.6346\\r\\n\",\"compile_success\":1}","had_test_count":1,"test_sets_count":1,"had_passed_testsests_error_count":1},"latest_output":null,"mirror_name":["Python2.7"],"has_answer":true,"st":0,"discusses_count":349,"game_count":4,"myshixun":{"id":20980,"shixun_id":61,"identifier":"fvpuxfj89m","gpid":154165,"status":1,"user_id":1,"commit_id":"80cb6fc55a14bdd64a9c99913f416966238ed3de","modify_time":"2017-11-02T18:12:23+08:00","reset_time":"2017-10-25T09:33:03+08:00","system_tip":false},"challenge":{"id":121,"subject":"\u89e3\u51b3\u5b9e\u9645\u95ee\u9898","position":4,"shixun_id":61,"st":0,"score":700,"path":"1-4.py","task_pass":"[TOC]\r\n\r\n---\r\n\r\n\u672c\u5173\u4e3b\u9898\u662f\u7efc\u5408\u5229\u7528\u524d\u4e09\u5173\u638c\u63e1\u7684\u77e5\u8bc6\uff0c\u89e3\u51b3\u5b9e\u9645\u95ee\u9898\u3002\u8fd9\u4e9b\u95ee\u9898\u6765\u6e90\u4e8e\u5b9e\u9645\u751f\u6d3b\u7684\u5404\u4e2a\u65b9\u9762\uff0c\u901a\u8fc7\u95ee\u9898\u7684\u89e3\u51b3\uff0c\u5e0c\u671b\u5bf9\u8ba1\u7b97\u601d\u7ef4\u6709\u4e00\u5b9a\u7684\u4f53\u9a8c\u548c\u611f\u609f\u3002\r\n\r\n####\u672c\u5173\u4efb\u52a1\r\n#####\u7b2c\u4e00\u9898\r\n\u5728\u6307\u5b9a\u5730\u65b9\u7f16\u5199Python\u7a0b\u5e8f\u6765\u8ba1\u7b97\u3001\u663e\u793a\u901a\u8fc7\u5982\u4e0b\u56fe\u6240\u793a\u7684\u7ba1\u9053\u7684\u6c34\u6d41\u901f\u7387\u3002\u8fdb\u5165\u7ba1\u9053\u7684\u6c34\u6d41\u901f\u7387\u7684\u5355\u4f4d\u4e3a\u82f1\u5c3a/\u79d2\uff0c\u7ba1\u9053\u5165\u53e3\u534a\u5f84\u548c\u51fa\u53e3\u534a\u5f84\u7684\u5355\u4f4d\u4e3a\u82f1\u5bf8\u3002\r\n\r\n\u51fa\u53e3\u901f\u7387\u7684\u8ba1\u7b97\u516c\u5f0f\u4e3a\uff1a`$$v_{out}=v_{in}(\\frac{r_{in}}{r_{out}})^{2}$$`\uff0c\u5176\u4e2d`$$v_{out}$$`\u4e3a\u51fa\u53e3\u901f\u7387\uff0c`$$v_{in}$$`\u4e3a\u5165\u53e3\u901f\u7387\uff0c`$$r_{out}$$`\u4e3a\u7ba1\u9053\u51fa\u53e3\u534a\u5f84\uff0c`$$r_{in}$$`\u4e3a\u7ba1\u9053\u5165\u53e3\u534a\u5f84\u3002\r\n\r\n![](/attachments/download/169402)\r\n\r\n#####\u7b2c\u4e8c\u9898\r\n\u5706\u6746\uff08\u5982\u4e0b\u56fe\u6240\u793a\u7684\u81ea\u884c\u8f66\u8e0f\u677f\uff09\u7684\u6700\u5c0f\u534a\u5f84\uff08\u80fd\u591f\u652f\u6491\u4e00\u4e2a\u4eba\u7684\u811a\u6240\u65bd\u52a0\u7684\u538b\u529b\uff0c\u800c\u4e0d\u81f3\u4e8e\u8d85\u8fc7\u9644\u7740\u5728\u66f2\u67c4\u81c2\u94fe\u8f6e\u7684\u538b\u529b\uff09\u7684\u8ba1\u7b97\u516c\u5f0f\u4e3a\uff1a$$r^{3}=\\frac{dp}{\\pi S}$$\uff0c\u5176\u4e2d`r`\u4e3a\u5706\u6746\u7684\u534a\u5f84\uff08inches\uff09\uff0c`$$d$$`\u4e3a\u66f2\u67c4\u81c2\u7684\u957f\u5ea6\uff08inches\uff09\uff0c`$$p$$`\u4e3a\u65bd\u52a0\u5728\u8e0f\u677f\u4e0a\u7684\u91cd\u91cf\uff08lbs\uff09\uff0c`$$S$$`\u4e3a\u6bcflbs/$$in^{2}$$\u4e0a\u7684\u538b\u529b\u3002\u57fa\u4e8e\u4e0a\u8ff0\u4fe1\u606f\uff0c\u5728\u53f3\u4fa7\u6307\u5b9a\u4f4d\u7f6e\u7f16\u5199\u4e00\u4e2aPython\u7a0b\u5e8f\u6839\u636e\u7528\u6237\u8f93\u5165\u6765\u8ba1\u7b97`r`\u7684\u503c\u3002\r\n\r\n![](/attachments/download/169403)\r\n\r\n\u57fa\u4e8e\u4e0a\u8ff0\u4fe1\u606f\uff0c\u5728\u6307\u5b9a\u4f4d\u7f6e\u7f16\u5199\u4e00\u4e2aPython\u7a0b\u5e8f\u6839\u636e\u7528\u6237\u8f93\u5165\u6765\u8ba1\u7b97`r`\u7684\u503c\u3002\r\n#####\u7b2c\u4e09\u9898\r\n\u7f16\u5199\u51fa\u4e00\u4e2aPython\u7a0b\u5e8f\uff0c\u5728\u7ed9\u5b9a\u5e74\u9650`N`\u548c\u590d\u5408\u5229\u7387`r`\u7684\u60c5\u51b5\u4e0b\uff0c\u8ba1\u7b97\u5f53\u8d37\u6b3e\u91d1\u989d\u4e3a`P`\u65f6\uff0c\u6bcf\u6708\u9700\u8fd8\u8d37\u7684\u91d1\u989d\uff0c\u6bcf\u6708\u8fd8\u8d37\u516c\u5f0f\u4e3a`$$\\frac{Pr'(1+r')^{N'}}{(1+r')^{N'}-1}$$`\uff0c\u5176\u4e2d`r'`\u4e3a\u6708\u5229\u606f\u3002\uff08\u63d0\u793a\uff1a`$$r'=\\frac{r}{1200}$$`\uff0c`N'=N*12`\uff09\u3002\r\n\r\n#####\u7b2c\u56db\u9898\r\n\u8bf7\u5728\u6307\u5b9a\u4f4d\u7f6e\u7f16\u5199\u7a0b\u5e8f\uff0c\u5c06\u65e5\u671f\u4f5c\u4e3a\u8f93\u5165\u5e76\u6253\u5370\u8be5\u65e5\u671f\u662f\u4e00\u5468\u5f53\u4e2d\u7684\u5468\u51e0\u3002\u7528\u6237\u8f93\u5165\u6709\u4e09\u4e2a\uff1a`$$m$$`(\u6708)\u3001`$$d$$`(\u65e5)\u3001`$$y$$`(\u5e74)\u3002\u5bf9\u4e8e`$$m$$`\uff0c\u7528`1`\u8868\u793a\u4e00\u6708\uff0c`2`\u8868\u793a\u4e8c\u6708\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002\u5bf9\u4e8e\u8f93\u51fa\uff0c`0`\u8868\u793a\u5468\u65e5\uff0c`1`\u8868\u793a\u5468\u4e00\uff0c`2`\u8868\u793a\u5468\u4e8c\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002\r\n\r\n\u5bf9\u4e8e\u9633\u5386\uff0c\u5982\u679c\u7ed9\u5b9a`$$m$$`\uff0c`$$d$$`\uff0c`$$y$$`\uff0c\u5219\u8ba1\u7b97\u6b65\u9aa4\u5927\u81f4\u5982\u4e0b\uff08\u6ce8\u610f\u5176\u4e2d\u7684\u9664\u6cd5\u662f\u6574\u6570\u9664\u6cd5\uff0c\u8be6\u89c1\u4e0b\u9762\u7684\u76f8\u5173\u77e5\u8bc6\uff09\uff1a\r\n\r\n`$$y_0=y-(14-m)/12$$`\r\n`$$x=y_0+\\frac{y_0}{4}-\\frac{y_0}{100}+\\frac{y_0}{400}$$`\r\n`$$m_0=m+12(\\frac{(14-m)}{12})-2$$`\r\n`$$d_0=(d+x+\\frac{31*m_0}{12})\\%7$$`\r\n\r\n\u4f8b\u5982\uff1a2000\u5e742\u670814\u65e5\u662f\u5468\u51e0\uff1f\r\n`$$y_0=2000-1=1999$$`\r\n`$$x= 1999+1999/4-1999/100+1999/400=2483$$`\r\n`$$m_0=2+12*1-2=12$$`\r\n`$$d_0=(14+2483+(31*12)/12)\\%7=2500\\%7=1$$`\r\n\u7b54\u6848\uff1a\u5468\u4e00\r\n\r\n#####\u7b2c\u4e94\u9898\r\n\u7f16\u5199\u4e00\u4e2a\u8ba1\u7b97\u5e76\u6253\u5370\u5730\u7403\u4e0a\u4e24\u70b9\u7684\u5927\u5706\u5f27\u8ddd\u79bb\u7684Python\u7a0b\u5e8f\u3002\u8be5\u7a0b\u5e8f\u63a5\u6536\u7528\u6237\u76844\u4e2a\u8f93\u5165$$x_1$$\uff0c$$y_1$$\uff0c$$x_2$$\uff0c$$y_2$$\uff08\u5206\u522b\u8868\u793a\u5730\u7403\u4e0a\u4e24\u4e2a\u70b9\u7684\u7ef4\u5ea6\u548c\u7ecf\u5ea6\uff0c\u5355\u4f4d\u662f\u5ea6\uff09\u3002\u5927\u5706\u5f27\u8ddd\u79bb\u8ba1\u7b97\u516c\u5f0f\u4e3a\uff08\u5355\u4f4d\u662f\u82f1\u91cc\uff09\uff1a\r\n\r\n`$$d=R*\\arccos(\\sin(x_1)*\\sin(x_2)+\\cos(x_1)*\\cos(x_2)*cos(y_1-y_2))$$`\r\n\r\n\u5176\u4e2d`R=69.1105`\u82f1\u91cc\uff0c`1`\u82f1\u91cc=`1.609`\u516c\u91cc\u3002\u8bf7\u5728\u6307\u5b9a\u4f4d\u7f6e\u7f16\u5199\u7a0b\u5e8f\uff0c\u6240\u7ed9\u5750\u6807\u4e4b\u95f4\u7684\u5927\u5706\u5f27\u8ddd\u79bb\uff0c\u5355\u4f4d\u662f\u516c\u91cc\u3002\uff08\u6ce8\u610f\uff0c`sin`\u3001`cos`\u51fd\u6570\u8f93\u5165\u662f\u5f27\u5ea6\u503c\uff0c\u800c\u7a0b\u5e8f\u4e2d\u7ed9\u7684\u662f\u89d2\u5ea6\u503c\uff0c\u9700\u8981\u8f6c\u6362\u3002`arccos`\u7ed3\u679c\u662f\u5f27\u5ea6\u503c\uff0c\u9700\u8981\u8f6c\u5316\u6210\u89d2\u5ea6\u503c\uff09\u3002\r\n\r\n#####\u7b2c\u516d\u9898\r\n\u6839\u636e\u7ed9\u5b9a\u7684\u6e29\u5ea6t\uff08\u534e\u6c0f\u6e29\u5ea6\uff09\u548c\u98ce\u901fv\uff0c\u53ef\u4ee5\u8ba1\u7b97\u51fa\u98ce\u5bd2\u6307\u6570\uff0c\u516c\u5f0f\u5982\u4e0b\uff1a\r\n\r\n`$$w\u00a0= 35.74 + 0.6215\u00a0t\u00a0+ (0.4275\u00a0t\u00a0- 35.75)\u00a0v^{0.16}$$`\r\n\r\n\u8bf7\u5728\u6307\u5b9a\u4f4d\u7f6e\u7f16\u5199\u7a0b\u5e8f\uff0c\u6839\u636e\u6240\u7ed9\u7684\u6e29\u5ea6\u548c\u98ce\u901f\uff0c\u8ba1\u7b97\u98ce\u5bd2\u6307\u6570\u3002\r\n\r\n#####\u7f16\u7a0b\u987b\u77e5\r\n- \u53f3\u4fa7\u4ee3\u7801\u7f16\u8f91\u533a\u5df2\u8bbe\u7f6e\u597d\u5177\u4f53\u8f93\u51fa\u683c\u5f0f\uff0c\u4f60\u53ea\u9700\u8981\u5728\u6307\u5b9a\u4f4d\u7f6e\u586b\u5199Python\u4ee3\u7801\u5373\u53ef\u3002\r\n\r\n- \u8bf7\u4e0d\u8981\u76f4\u63a5`print`\u6700\u7ec8\u6570\u5b57\uff0c\u5426\u5219\u5e73\u53f0\u53d1\u73b0\u6b64\u7c7b\u60c5\u51b5\u540e\uff0c\u5c06\u4e00\u5f8b\u6263\u6389\u672c\u5173\u7ecf\u9a8c\u503c\uff0c\u5e76\u4e14\u8ffd\u52a0\u5904\u7f5a\u63aa\u65bd\u3002\r\n\r\n####\u76f8\u5173\u77e5\u8bc6\r\n#####\u6570\u636e\u7c7b\u578b\r\n\u5bf9\u8c61\u662fPython\u7a0b\u5e8f\u64cd\u4f5c\u7684\u6838\u5fc3\uff0c\u6bcf\u4e2a\u5bf9\u8c61\u90fd\u6709\u4e00\u4e2a\u7c7b\u578b\uff0c\u5b83\u89c4\u5b9a\u4e86\u7a0b\u5e8f\u53ef\u4ee5\u5bf9\u8be5\u7c7b\u578b\u5bf9\u8c61\u8fdb\u884c\u54ea\u4e9b\u64cd\u4f5c\u3002\u7c7b\u578b\u5206\u4e3a\u6807\u91cf\u7684\u548c\u975e\u6807\u91cf\u7684\u3002\u6807\u91cf\u5bf9\u8c61\u662f\u4e0d\u53ef\u5206\u5272\u7684\u5355\u4e2a\u5bf9\u8c61\u3002\u975e\u6807\u91cf\u5bf9\u8c61\u2014\u2014\u4f8b\u5982\u5b57\u7b26\u4e32\uff08string\uff09\u2014\u2014\u901a\u5e38\u4e0d\u662f\u5355\u4e2a\u7684\u6574\u4f53\uff0c\u800c\u662f\u6709\u53ef\u5206\u89e3\u7684\u5185\u90e8\u7ed3\u6784\u7684\u3002\r\n\r\nPython\u67094\u79cd\u7c7b\u578b\u7684\u6807\u91cf\u5bf9\u8c61\uff1a\r\n\r\n- int\u5bf9\u8c61\u7528\u6765\u8868\u793a\u6574\u6570\u3002int\u7c7b\u578b\u7684\u5bf9\u8c61\u53ef\u901a\u8fc7\u5b57\u9762\u76f4\u63a5\u770b\u51fa\uff0c\u5982`3`\u3001`9001`\u6216`-72`\u7b49\u3002\r\n\r\n- float\u5bf9\u8c61\u7528\u4e8e\u8868\u793a\u5b9e\u6570\u3002float\u7c7b\u578b\u7684\u5bf9\u8c61\u4e5f\u53ef\u901a\u8fc7\u5b57\u9762\u5f88\u5bb9\u6613\u5730\u770b\u51fa\u6765\uff0c\u5982`23.0`\u3001`9.48`\u6216`-72.28`\u3002\u4e5f\u53ef\u7528\u79d1\u5b66\u8ba1\u6570\u6cd5\u8868\u793afloat\u7c7b\u578b\u7684\u5bf9\u8c61\uff0c\u4f8b\u5982\uff0c`3.9E3`\u4ee3\u8868`3.9\u00d7$$10^{3}$$`\uff0c\u7b49\u540c\u4e8e`3900`\u3002\r\n\r\n- bool\u662f\u7528\u6765\u8868\u793a\u5e03\u5c14\u503c\uff0c\u5373\u201c\u771f\u201d\u6216\u201c\u5047\u201d\uff0c\u5728Python\u4e2d\u5206\u522b\u7528\u5e38\u91cf`True`\u548c`False`\u8868\u793a\u3002\r\n\r\n- None\u5bf9\u8c61\u8868\u793a\u7a7a\u503c\u3002\r\n\r\n\u5bf9\u8c61\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u6784\u6210\u8868\u8fbe\u5f0f\uff0c\u8868\u8fbe\u5f0f\u8fd0\u7b97\u540e\u4f1a\u5f97\u5230\u4e00\u4e2a\u503c\uff0c\u79f0\u4e3a\u8868\u8fbe\u5f0f\u7684\u503c\uff0c\u8fd9\u4e2a\u503c\u5c31\u662f\u5177\u6709\u67d0\u79cd\u7c7b\u578b\u7684\u4e00\u4e2a\u5bf9\u8c61\u3002\u4f8b\u5982\uff0c\u8868\u8fbe\u5f0f`7+2`\u8868\u793a`int`\u7c7b\u578b\u7684\u5bf9\u8c61`9`\uff0c\u800c\u8868\u8fbe\u5f0f`7.0+2.0`\u8868\u793a`float`\u7c7b\u578b\u7684\u5bf9\u8c61`9.0`\u3002Python\u4e2d`==`\u8fd0\u7b97\u7b26\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u8868\u8fbe\u5f0f\u7684\u503c\u662f\u5426\u76f8\u7b49\uff0c\u800c`!=`\u8fd0\u7b97\u7b26\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u8868\u8fbe\u5f0f\u7684\u503c\u662f\u5426\u4e0d\u76f8\u7b49\u3002\r\n\r\n#####\u7b97\u672f\u8fd0\u7b97\u7b26\r\nint\u548cfloat\u7c7b\u578b\u7684\u8fd0\u7b97\u7b26\u53ca\u5176\u8bf4\u660e\u5982\u4e0b\u6240\u793a\uff1a\r\n\r\n- `i+j`\uff1a\u8868\u793a\u5bf9\u8c61i\u548cj\u7684\u548c\u3002\u5982\u679c`i`\u548c`j`\u90fd\u662f`int`\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679c\u4e3a`int`\u7c7b\u578b\uff0c\u5982\u679c\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`float`\u7c7b\u578b\uff0c\u7ed3\u679c\u4e3a`float`\u7c7b\u578b\u3002\r\n\r\n- `i-j`\uff1a\u8868\u793a\u5bf9\u8c61`i`\u4e0e`j`\u7684\u5dee\u3002\u5982\u679c`i`\u548c`j`\u90fd\u662f`int`\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679c\u4e3a`int`\u7c7b\u578b\uff0c\u5982\u679c\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`float`\u7c7b\u578b\uff0c\u7ed3\u679c\u4e3a`float`\u7c7b\u578b\u3002\r\n\r\n- `i*j`\uff1a\u8868\u793a\u5bf9\u8c61`i`\u4e0e`j`\u7684\u4e58\u79ef\u3002\u5982\u679c`i`\u548c`j`\u90fd\u662f`int`\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679c\u4e3a`int`\u7c7b\u578b\uff0c\u5982\u679c\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`float`\u7c7b\u578b\uff0c\u7ed3\u679c\u4e3a`float`\u7c7b\u578b\u3002\r\n\r\n- `i//j`\uff1a\u8868\u793a\u6574\u6570\u9664\u6cd5\u3002\u4f8b\u5982`8//2`\u7684\u503c\u4e3a`int`\u7c7b\u578b`4`\uff0c`9//4`\u7684\u503c\u4e3a`int`\u7c7b\u578b`2`\u3002\u5373\u6574\u6570\u9664\u6cd5\u53ea\u53d6\u6574\u6570\u5546\uff0c\u53bb\u6389\u5c0f\u6570\u90e8\u5206\u3002\r\n\r\n- `i/j`\uff1a\u8868\u793a\u5bf9\u8c61`i`\u9664\u4ee5\u5bf9\u8c61`j`\uff0c\u65e0\u8bba`i`\u548c`j`\u7684\u7c7b\u578b\u662f`int`\u8fd8\u662f`float`\uff0c\u7ed3\u679c\u90fd\u4e3a`float`\uff0c\u5982`10/4`\u7ed3\u679c\u4e3a`2.5`\u3002\r\n\r\n- `i%j`\uff1a\u8868\u793a`int`\u5bf9\u8c61i\u9664\u4ee5`int`\u5bf9\u8c61`j`\u7684\u4f59\u6570\uff0c\u5373\u6570\u5b66\u7684\u201c\u6a21\u201d\u8fd0\u7b97\u3002\r\n\r\n- `i**j`\uff1a\u8868\u793a\u5bf9\u8c61`i`\u7684`j`\u6b21\u65b9\u3002\u5982\u679c`i`\u548c`j`\u90fd\u662f`int`\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679c\u4e3a`int`\u7c7b\u578b\uff0c\u5982\u679c\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`float`\u7c7b\u578b\uff0c\u7ed3\u679c\u4e3a`float`\u7c7b\u578b\u3002\r\n\r\n- \u6bd4\u8f83\u8fd0\u7b97\u7b26`>`\uff08\u5927\u4e8e\uff09\u3001`>=`\uff08\u5927\u4e8e\u7b49\u4e8e\uff09\u3001`<`\uff08\u5c0f\u4e8e\uff09\u548c`<=`\uff08\u5c0f\u4e8e\u7b49\u4e8e\uff09\u7684\u542b\u4e49\u4e0e\u5176\u5728\u6570\u5b66\u4e0a\u7684\u542b\u4e49\u4e00\u6837\u3002\r\n\r\n\u7b97\u672f\u8fd0\u7b97\u7b26\u901a\u5e38\u6709\u4f18\u5148\u7ea7\u3002\u4f8b\u5982\uff0c\u8868\u8fbe\u5f0f`x+y*2`\u7684\u8ba1\u7b97\u8fc7\u7a0b\u662f\u5148\u7b97`y`\u4e58\u4ee5`2`\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u4e0e`x`\u76f8\u52a0\u3002\u8ba1\u7b97\u7684\u987a\u5e8f\u53ef\u4ee5\u4f7f\u7528\u62ec\u53f7\u6765\u6539\u53d8\uff0c\u4f8b\u5982\uff0c`(x+y)*2`\u8868\u793a\u5148\u8ba1\u7b97`x`\u52a0`y`\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u4e58\u4ee5`2`\u3002\r\n\r\nbool\u7c7b\u578b\u4e0a\u7684\u8fd0\u7b97\u6709\uff1a\r\n- `a and b`\uff1a\u4e0e\uff08and\uff09\u8fd0\u7b97\uff0c\u5982\u679c`bool`\u7c7b\u578b\u5bf9\u8c61`a`\u548c`b`\u90fd\u4e3a`True`\uff0c\u7ed3\u679c\u4e3a`True`\uff0c\u5426\u5219\u7ed3\u679c\u4e3a`False`\u3002\r\n\r\n- `a or b`\uff1a\u6216\uff08or\uff09\u8fd0\u7b97\uff0c\u5982\u679c`bool`\u7c7b\u578b\u5bf9\u8c61`a`\u548c`b`\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`True`\uff0c\u7ed3\u679c\u4e3a`True`\uff0c\u5426\u5219\u7ed3\u679c\u4e3a`False`\u3002\r\n\r\n- not a\uff1a\u975e\uff08not\uff09\u8fd0\u7b97\uff0c\u5982\u679c`bool`\u7c7b\u578b\u5bf9\u8c61`a`\u4e3a`True`\uff0c\u7ed3\u679c\u4e3a`False`\uff1b\u5982\u679c\u4e3a`False`\uff0c\u7ed3\u679c\u4e3a`True`\u3002\r\n\r\n---\r\n\r\n\u795d\u4f60\u6210\u529f\uff01\r\n","modify_time":null,"web_route":null,"answer":null},"game":{"id":64201,"status":2,"myshixun_id":20980,"user_id":1,"final_score":700,"challenge_id":121,"identifier":"m73fglbwzone","answer_open":false,"test_sets_view":false,"cost_time":73,"star":3,"modify_time":null},"shixun":{"id":61,"name":"Python\u8868\u8fbe\u5f0f\u95ee\u9898\u6c42\u89e3\u5b9e\u8bad","gpid":2448,"modify_time":"2017-11-02T18:12:23+08:00","reset_time":"2017-10-25T09:33:03+08:00","language":"Python3.6","propaedeutics":"\u5bf9\u8c61\u662fPython\u7a0b\u5e8f\u64cd\u4f5c\u7684\u6838\u5fc3\uff0c\u6bcf\u4e2a\u5bf9\u8c61\u90fd\u6709\u4e00\u4e2a\u7c7b\u578b\uff0c\u5b83\u89c4\u5b9a\u4e86\u7a0b\u5e8f\u53ef\u4ee5\u5bf9\u8be5\u7c7b\u578b\u5bf9\u8c61\u8fdb\u884c\u54ea\u4e9b\u64cd\u4f5c\u3002\u7c7b\u578b\u5206\u4e3a\u6807\u91cf\u7684\u548c\u975e\u6807\u91cf\u7684\u3002\u6807\u91cf\u5bf9\u8c61\u662f\u4e0d\u53ef\u5206\u5272\u7684\u5355\u4e2a\u5bf9\u8c61\u3002 \u975e\u6807\u91cf\u5bf9\u8c61\u2014\u2014\u4f8b\u5982\u5b57\u7b26\u4e32\uff08string\uff09\u2014\u2014\u901a\u5e38\u4e0d\u662f\u5355\u4e2a\u7684\u6574\u4f53\uff0c\u800c\u662f\u6709\u53ef\u5206\u89e3\u7684\u5185\u90e8\u7ed3\u6784\u7684\u3002\r\n\r\nPython\u67094\u79cd\u7c7b\u578b\u7684\u6807\u91cf\u5bf9\u8c61\uff1a\r\n\r\n- int\u5bf9\u8c61\u7528\u6765\u8868\u793a\u6574\u6570\u3002int\u7c7b\u578b\u7684\u5bf9\u8c61\u53ef\u901a\u8fc7\u5b57\u9762\u76f4\u63a5\u770b\u51fa\uff0c\u5982`3`\u3001`9001`\u6216`-72`\u7b49\u3002\r\n\r\n- float\u5bf9\u8c61\u7528\u4e8e\u8868\u793a\u5b9e\u6570\u3002float\u7c7b\u578b\u7684\u5bf9\u8c61\u4e5f\u53ef\u901a\u8fc7\u5b57\u9762\u5f88\u5bb9\u6613\u5730\u770b\u51fa\u6765\uff0c\u5982`23.0`\u3001`9.48`\u6216`-72.28`\u3002\u4e5f\u53ef\u7528\u79d1\u5b66\u8ba1\u6570\u6cd5\u8868\u793afloat\u7c7b\u578b\u7684\u5bf9\u8c61\uff0c\u4f8b\u5982\uff0c`3.9E3`\u4ee3\u8868`3.9\u00d7$$10^{3}$$`\uff0c\u7b49\u540c\u4e8e`3900`\u3002\r\n\r\n- bool\u662f\u7528\u6765\u8868\u793a\u5e03\u5c14\u503c\uff0c\u5373\u201c\u771f\u201d\u6216\u201c\u5047\u201d\uff0c\u5728Python\u4e2d\u5206\u522b\u7528\u5e38\u91cf`True`\u548c`False`\u8868\u793a\u3002\r\n\r\n- None\u5bf9\u8c61\u8868\u793a\u7a7a\u503c\u3002\r\n\r\n\u5bf9\u8c61\u548c\u8fd0\u7b97\u7b26\u53ef\u4ee5\u6784\u6210\u8868\u8fbe\u5f0f\uff0c\u8868\u8fbe\u5f0f\u8fd0\u7b97\u540e\u4f1a\u5f97\u5230\u4e00\u4e2a\u503c\uff0c\u79f0\u4e3a\u8868\u8fbe\u5f0f\u7684\u503c\uff0c\u8fd9\u4e2a\u503c\u5c31\u662f\u5177\u6709\u67d0\u79cd\u7c7b\u578b\u7684\u4e00\u4e2a\u5bf9\u8c61\u3002\u4f8b\u5982\uff0c\u8868\u8fbe\u5f0f`7+2`\u8868\u793a`int`\u7c7b\u578b\u7684\u5bf9\u8c61`9`\uff0c\u800c\u8868\u8fbe\u5f0f`7.0+2.0`\u8868\u793a`float`\u7c7b\u578b\u7684\u5bf9\u8c61`9.0`\u3002Python\u4e2d`==`\u8fd0\u7b97\u7b26\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u8868\u8fbe\u5f0f\u7684\u503c\u662f\u5426\u76f8\u7b49\uff0c\u800c`!=`\u8fd0\u7b97\u7b26\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u8868\u8fbe\u5f0f\u7684\u503c\u662f\u5426\u4e0d\u76f8\u7b49\u3002\r\n\r\nint\u548cfloat\u7c7b\u578b\u7684\u8fd0\u7b97\u7b26\u53ca\u5176\u8bf4\u660e\u5982\u4e0b\u6240\u793a\uff1a\r\n\r\n- `i+j`\uff1a\u8868\u793a\u5bf9\u8c61i\u548cj\u7684\u548c\u3002\u5982\u679c`i`\u548c`j`\u90fd\u662f`int`\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679c\u4e3a`int`\u7c7b\u578b\uff0c\u5982\u679c\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`float`\u7c7b\u578b\uff0c\u7ed3\u679c\u4e3a`float`\u7c7b\u578b\u3002\r\n\r\n- `i-j`\uff1a\u8868\u793a\u5bf9\u8c61`i`\u4e0e`j`\u7684\u5dee\u3002\u5982\u679c`i`\u548c`j`\u90fd\u662f`int`\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679c\u4e3a`int`\u7c7b\u578b\uff0c\u5982\u679c\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`float`\u7c7b\u578b\uff0c\u7ed3\u679c\u4e3a`float`\u7c7b\u578b\u3002\r\n\r\n- `i*j`\uff1a\u8868\u793a\u5bf9\u8c61`i`\u4e0e`j`\u7684\u4e58\u79ef\u3002\u5982\u679c`i`\u548c`j`\u90fd\u662f`int`\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679c\u4e3a`int`\u7c7b\u578b\uff0c\u5982\u679c\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`float`\u7c7b\u578b\uff0c\u7ed3\u679c\u4e3a`float`\u7c7b\u578b\u3002\r\n\r\n- `i//j`\uff1a\u8868\u793a\u6574\u6570\u9664\u6cd5\u3002\u4f8b\u5982`8//2`\u7684\u503c\u4e3a`int`\u7c7b\u578b`4`\uff0c`9//4`\u7684\u503c\u4e3a`int`\u7c7b\u578b`2`\u3002\u5373\u6574\u6570\u9664\u6cd5\u53ea\u53d6\u6574\u6570\u5546\uff0c\u53bb\u6389\u5c0f\u6570\u90e8\u5206\u3002\r\n\r\n- `i/j`\uff1a\u8868\u793a\u5bf9\u8c61`i`\u9664\u4ee5\u5bf9\u8c61`j`\uff0c\u65e0\u8bba`i`\u548c`j`\u7684\u7c7b\u578b\u662f`int`\u8fd8\u662f`float`\uff0c\u7ed3\u679c\u90fd\u4e3a`float`\uff0c\u5982`10/4`\u7ed3\u679c\u4e3a`2.5`\u3002\r\n\r\n- `i%j`\uff1a\u8868\u793a`int`\u5bf9\u8c61i\u9664\u4ee5`int`\u5bf9\u8c61`j`\u7684\u4f59\u6570\uff0c\u5373\u6570\u5b66\u7684\u201c\u6a21\u201d\u8fd0\u7b97\u3002\r\n\r\n- `i**j`\uff1a\u8868\u793a\u5bf9\u8c61`i`\u7684`j`\u6b21\u65b9\u3002\u5982\u679c`i`\u548c`j`\u90fd\u662f`int`\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679c\u4e3a`int`\u7c7b\u578b\uff0c\u5982\u679c\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`float`\u7c7b\u578b\uff0c\u7ed3\u679c\u4e3a`float`\u7c7b\u578b\u3002\r\n\r\n- \u6bd4\u8f83\u8fd0\u7b97\u7b26`>`\uff08\u5927\u4e8e\uff09\u3001`>=`\uff08\u5927\u4e8e\u7b49\u4e8e\uff09\u3001`<`\uff08\u5c0f\u4e8e\uff09\u548c`<=`\uff08\u5c0f\u4e8e\u7b49\u4e8e\uff09\u7684\u542b\u4e49\u4e0e\u5176\u5728\u6570\u5b66\u4e0a\u7684\u542b\u4e49\u4e00\u6837\u3002\r\n\r\n\u7b97\u672f\u8fd0\u7b97\u7b26\u901a\u5e38\u6709\u4f18\u5148\u7ea7\u3002\u4f8b\u5982\uff0c\u8868\u8fbe\u5f0f`x+y*2`\u7684\u8ba1\u7b97\u8fc7\u7a0b\u662f\u5148\u7b97`y`\u4e58\u4ee5`2`\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u4e0e`x`\u76f8\u52a0\u3002\u8ba1\u7b97\u7684\u987a\u5e8f\u53ef\u4ee5\u4f7f\u7528\u62ec\u53f7\u6765\u6539\u53d8\uff0c\u4f8b\u5982\uff0c`(x+y)*2`\u8868\u793a\u5148\u8ba1\u7b97`x`\u52a0`y`\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u4e58\u4ee5`2`\u3002\r\n\r\nbool\u7c7b\u578b\u4e0a\u7684\u8fd0\u7b97\u6709\uff1a\r\n- `a and b`\uff1a\u4e0e\uff08and\uff09\u8fd0\u7b97\uff0c\u5982\u679c`bool`\u7c7b\u578b\u5bf9\u8c61`a`\u548c`b`\u90fd\u4e3a`True`\uff0c\u7ed3\u679c\u4e3a`True`\uff0c\u5426\u5219\u7ed3\u679c\u4e3a`False`\u3002\r\n\r\n- `a or b`\uff1a\u6216\uff08or\uff09\u8fd0\u7b97\uff0c\u5982\u679c`bool`\u7c7b\u578b\u5bf9\u8c61`a`\u548c`b`\u81f3\u5c11\u6709\u4e00\u4e2a\u4e3a`True`\uff0c\u7ed3\u679c\u4e3a`True`\uff0c\u5426\u5219\u7ed3\u679c\u4e3a`False`\u3002\r\n\r\n- not a\uff1a\u975e\uff08not\uff09\u8fd0\u7b97\uff0c\u5982\u679c`bool`\u7c7b\u578b\u5bf9\u8c61`a`\u4e3a`True`\uff0c\u7ed3\u679c\u4e3a`False`\uff1b\u5982\u679c\u4e3a`False`\uff0c\u7ed3\u679c\u4e3a`True`\u3002","status":2,"identifier":"uznmbg54","test_set_permission":true,"hide_code":false,"webssh":1,"user_id":3039,"code_hidden":false,"task_pass":false,"exec_time":145},"record":9.027,"grade":211740,"prev_game":"rhtsbj2leakf","next_game":null,"username":"Coder","image_url":"avatars/User/1","user_url":"/users/innov","praise_count":62,"user_praise":true,"time_limit":145,"tomcat_url":"http://117.50.21.112","is_teacher":true,"power":1,"myshixun_manager":true}]
|
|
});
|
|
|
|
// mock.onGet(`${mockProxy}/api/v1/games/m73fglbwzone/rep_content`).reply( (config) => {
|
|
|
|
mock.onGet(
|
|
`${mockProxy}/api/v1/games/m73fglbwzone/rep_content?path=1-4.py&shixun_gpid=2448&status=0&retry=0`)
|
|
.reply( (config) => {
|
|
return [200
|
|
, "from math import *\ndef print_(x):\n if type(x) == float:\n print(\"%.4f\" % x)\n else:\n print(x)\n#\u7b2c\u4e00\u9898\nfor (vin, rin, rout) in [(10, 10, 5), (10, 10, 10), (20, 20, 5), (20, 20, 10)]:\n #\u8bf7\u5728\u4e0b\u9762\u7f16\u5199\u4ee3\u7801\n vout = vin * (rin/rout)**2\n #\u8bf7\u4e0d\u8981\u4fee\u6539\u4e0b\u9762\u7684\u4ee3\u7801\n print_(vout)\nprint('\\n***********************\\n')\n#\u7b2c\u4e8c\u9898\nfor (d, p, S) in [(7,300,10000),(7,400,15000),(10,400,12000),(15,400,12000)]:\n # \u8bf7\u5728\u4e0b\u9762\u7f16\u5199\u4ee3\u7801\n r = ((d * p) / (pi * S))**(1/3)\n # \u8bf7\u4e0d\u8981\u4fee\u6539\u4e0b\u9762\u7684\u4ee3\u7801\n print_(r)\nprint('\\n***********************\\n')\n#\u7b2c\u4e09\u9898\nfor (P, N, r) in [(300000,10,6.5), (300000,20,6.5),(300000,30,6.5)]:\n # \u8bf7\u5728\u4e0b\u9762\u7f16\u5199\u4ee3\u7801\n monthR = r/1200\n N = N * 12\n payPerMonth = (P * monthR * (1+monthR)**N) / ((1+monthR)**N - 1)\n # \u8bf7\u4e0d\u8981\u4fee\u6539\u4e0b\u9762\u7684\u4ee3\u7801\n print_(payPerMonth)\nprint('\\n***********************\\n')\n#\u7b2c\u56db\u9898\nfor (m,d,y) in [(1,1,2017), (2,14,2017), (5,1,2017), (6,1,2017),(7,1,2017),(12,25,2017)]:\n # \u8bf7\u5728\u4e0b\u9762\u7f16\u5199\u4ee3\u7801\n y0 = y - (14 - m)//12\n x = y0 + y0//4 - y0//100 + y0//400\n m0 = m + 12 * ((14 - m)//12) - 2\n d0 = (d + x + (31 * m0)//12)%7\n # \u8bf7\u4e0d\u8981\u4fee\u6539\u4e0b\u9762\u7684\u4ee3\u7801\n print_(d0)\nprint('\\n***********************\\n')\n#\u7b2c\u4e94\u9898\nfor (x1,y1,x2,y2) in [(48.87,-2.33,37.8,-122.4),(40.89,116.50,37.8,-122.4),(40.89,116.50,48.87,-2.33)]:\n # \u8bf7\u5728\u4e0b\u9762\u7f16\u5199\u4ee3\u7801\n x1 = radians(x1)\n y1 = radians(y1)\n x2 = radians(x2)\n y2 = radians(y2)\n R = 69.1105*1.609\n dist = R*acos(sin(x1)*sin(x2)+cos(x1)*cos(x2)*cos(y1-y2))*180/pi\n # \u8bf7\u4e0d\u8981\u4fee\u6539\u4e0b\u9762\u7684\u4ee3\u7801\n print_(dist)\nprint('\\n***********************\\n')\n#\u7b2c\u516d\u9898\nfor (t, v) in [(32,10), (32, 100), (40, 10), (40, 100)]:\n # \u8bf7\u5728\u4e0b\u9762\u7f16\u5199\u4ee3\u7801\n w = 35.74 + 0.6215 * t + (0.4275 * t - 35.75) * (v ** 0.16)\n # \u8bf7\u4e0d\u8981\u4fee\u6539\u4e0b\u9762\u7684\u4ee3\u7801\n print_(w)"
|
|
]});
|
|
|
|
mock.onGet(`${mockProxy}/api/v1/shixuns/61/shixun_discusses?page=0&container_type=Shixun`).reply( config => {
|
|
return [200
|
|
, {"children_list":[{"id":3186,"content":"<div>\n\tFile \"1-2.py\", line 21\n</div>\n<div>\n\t print_(cos(2*pi/17))\n</div>\n<div>\n\t ^\n</div>\n<p>\n\tSyntaxError: invalid syntax\n</p>\n<p>\n\t\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u8bed\u6cd5\u9519\u8bef\u5462\uff1f\n</p>","time":"16\u5929\u524d","position":2,"user_id":11843,"reward":null,"image_url":"avatars/User/g","username":"\u5510\u6b22\u5bb9","user_login":"Emmanuel","shixun_id":61,"hidden":true,"manager":true,"praise_count":0,"user_praise":false,"admin":true,"children":[{"content":"qwe","time":"6\u5206\u949f\u524d","position":2,"reward":null,"hidden":true,"image_url":"avatars/User/1","username":"Coder","user_id":1,"user_login":"innov","can_delete":true,"id":3229}]},{"id":3134,"content":"<p>\n\tFile \"1-2.py\", line 12<br />\n print_(import math)<br />\n ^<br />\nSyntaxError: invalid syntax\n</p>\n<p>\n\t\u4ec0\u4e48\u610f\u601d\u554a\uff0c\u6211\u5728IDLE\u91cc\u505a\u7684\u6ca1\u6bdb\u75c5\u554a\n</p>","time":"16\u5929\u524d","position":2,"user_id":48509,"reward":null,"image_url":"avatars/User/b","username":"\u51af\u6210\u7fd4","user_login":"m95012683","shixun_id":61,"hidden":false,"manager":true,"praise_count":0,"user_praise":false,"admin":true,"children":null},{"id":3132,"content":"\u7b2c4\u5173\u7b2c4\u9898\u4e3a\u4ec0\u4e48\u53d6\u4f59\u6570\u7b54\u6848\u662f\u5c0f\u6570","time":"17\u5929\u524d","position":4,"user_id":49130,"reward":null,"image_url":"avatars/User/b","username":"\u6731\u5586","user_login":"p24107693","shixun_id":61,"hidden":false,"manager":true,"praise_count":0,"user_praise":false,"admin":true,"children":null},{"id":2942,"content":"(sqrt((1+sqrt(5))/2+2)-(1+sqrt(5))/2) (sinh(0.25)) ((e**0.25-e**(-0.25))/2)","time":"19\u5929\u524d","position":2,"user_id":47309,"reward":null,"image_url":"avatars/User/b","username":"\u5e9f","user_login":"p64825109","shixun_id":61,"hidden":true,"manager":true,"praise_count":0,"user_praise":false,"admin":true,"children":null},{"id":2941,"content":"(cos(2*pi/17)-1/16*(-1+sqrt(17)+sqrt(2*(17-sqrt(17)))+2*sqrt(17+3*sqrt(17)-sqrt(2*(17-sqrt(17)))-2*sqrt(2*(17+sqrt(17))))))","time":"19\u5929\u524d","position":2,"user_id":47309,"reward":null,"image_url":"avatars/User/b","username":"\u5e9f","user_login":"p64825109","shixun_id":61,"hidden":true,"manager":true,"praise_count":3,"user_praise":false,"admin":true,"children":null},{"id":2940,"content":"(1/16*(-1+sqrt(17)+sqrt(2*(17-sqrt(17)))+2*sqrt(17+3*sqrt(17)-sqrt(2*(17-sqrt(17)))-2*sqrt(2*(17+sqrt(17))))))","time":"19\u5929\u524d","position":2,"user_id":47309,"reward":null,"image_url":"avatars/User/b","username":"\u5e9f","user_login":"p64825109","shixun_id":61,"hidden":true,"manager":true,"praise_count":1,"user_praise":false,"admin":true,"children":null},{"id":2938,"content":"print_(cos(2*pi/17))<br />\nprint_(1/16*(-1+sqrt(17))+sqrt(2*(17-sqrt(17)))+2*sqrt(17+3*sqrt(17))-sqrt(2*(17-sqrt(17)))-2*sqrt(2*(17+sqrt(17)))) <br />\n<p>\n\tprint_(cos(2*pi/17)-1/16*(-1+sqrt(17)+sqrt(2*(17-sqrt(17)))+2*sqrt(17+3*sqrt(17)-sqrt(2*(17-sqrt(17))-2*sqrt(2*(17+sqrt(17))))\n</p>\n<p>\n\t\u773c\u90fd\u82b1\u4e86\n</p>","time":"19\u5929\u524d","position":2,"user_id":46550,"reward":null,"image_url":"avatars/User/b","username":"\u5f20\u5927\u70ae","user_login":"p81347206","shixun_id":61,"hidden":true,"manager":true,"praise_count":1,"user_praise":false,"admin":true,"children":null},{"id":2935,"content":"print_(sqrt((1+sqrt(5))/2+2)-(1+sqrt(5))/2)","time":"19\u5929\u524d","position":2,"user_id":46549,"reward":null,"image_url":"avatars/User/b","username":"\u660e\u6708\u672c\u65e0\u5fc3","user_login":"p29018547","shixun_id":61,"hidden":true,"manager":true,"praise_count":1,"user_praise":false,"admin":true,"children":null},{"id":2926,"content":"\u75af\u4e86","time":"19\u5929\u524d","position":1,"user_id":47261,"reward":null,"image_url":"avatars/User/b","username":"\u9648\u96f7","user_login":"m65473019","shixun_id":61,"hidden":true,"manager":true,"praise_count":2,"user_praise":false,"admin":true,"children":[{"content":"2333","time":"19\u5929\u524d","position":1,"reward":null,"hidden":false,"image_url":"avatars/User/b","username":"\u7b2a\u654f\u6770","user_id":47271,"user_login":"m67138542","can_delete":true,"id":2929},{"content":"\u4e4c\u62c9\u4e4c\u62c9\u5361\u7206\u4e86","time":"19\u5929\u524d","position":1,"reward":null,"hidden":false,"image_url":"avatars/User/b","username":"\u6f5c\u6c34","user_id":46574,"user_login":"p30498157","can_delete":true,"id":2936}]},{"id":2925,"content":"+.+","time":"20\u5929\u524d","position":2,"user_id":47285,"reward":null,"image_url":"avatars/User/b","username":"\u9ec4\u5347\u8f89","user_login":"m79064253","shixun_id":61,"hidden":false,"manager":true,"praise_count":0,"user_praise":false,"admin":true,"children":null}],"disscuss_count":251}
|
|
]});
|
|
|
|
mock.onPost(`${mockProxy}/api/v1/discusses/3229/hidden`).reply( config => {
|
|
return [200
|
|
, {"status":1,"message":"success"}
|
|
]});
|
|
}
|
|
|
|
} |