forked from TommyLemon/APIAuto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·607 lines (497 loc) · 27 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
<!DOCTYPE html>
<html>
<head>
<title>APIJSONAuto机器学习测试、自动生成代码、自动静态检查、自动生成文档与注释等,做最先进的接口管理平台。</title>
<meta charset="utf-8" />
<meta name="keywords" content="apijson,api,json,自动生成接口文档,自动化接口回归测试,机器学习接口回归测试,回归测试,机器学习,接口测试,自动化,fastjson,json在线解析,json格式化验证"/>
<meta name="description" content="APIJSONAuto机器学习测试、自动生成代码、自动静态检查、自动生成文档与注释等,做最先进的接口管理平台。"/>
<!-- 登录 <<<<<<<<<<<<<<<<<<<< -->
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/login.css">
<!-- 登录 >>>>>>>>>>>>>>>>>>>> -->
<link href="css/hint.min.css" rel="stylesheet">
<!-- <link href="css/diffview.css" rel="stylesheet"> -->
<link href="css/loading.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link rel="stylesheet" href="md/css/editormd.preview.css" />
</head>
<body>
<style type="text/css">
.url {
height: 100%;
border: none;
display: flex;
align-items: center;
flex-grow: 1
/* justify-content: center */
}
.transfer {
width: 58px;
height: 100%;
margin: 0;
padding: 0;
}
.send {
width: 25%;
height: 100%;
margin: 0;
padding: 0;
}
.statement {
position: absolute;
bottom: 0px;
width: 100%;
text-align: center;
font-size: small;
z-index: 100;
background-color: white;
color: #bbb;
border-top: #fafafa 1px solid;
}
</style>
<div id="app" style="background-color: white">
<div class="side-top">
<img src="img/logo.png" class="logo-img"/>
<a class="logo" href="https://github.com/TommyLemon/APIJSON" target="_blank">
<span class="on">APIJSON</span><span >.org</span>
</a>
<a v-show="isDelayShow" >2s</a>
<iframe v-show="User.id == null || User.id <= 0" src="https://ghbtns.com/github-btn.html?user=TommyLemon&repo=APIJSON&type=star&count=true&size=small" frameborder="0" scrolling="0" width="160px" height="18px"></iframe>
<!--只用60%避免拦截左右两侧View的触摸事件-->
<div style="width: 40%;height: 100%;left: 30%;display: inline-block;text-align: center;position: fixed;padding-top: 10px">
<a style="font-size: large;margin-left: 10px;margin-right: 10px;color: silver" href="https://github.com/TommyLemon/APIJSON/blob/master/Document.md" target="_blank" >文档</a>
<a style="font-size: large;margin-left: 10px;margin-right: 10px;color: silver" href="http://i.youku.com/apijson" target="_blank" >视频</a>
<a style="font-size: large;margin-left: 10px;margin-right: 10px;color: silver" href="https://github.com/search?o=desc&q=apijson&s=stars&type=Repositories" target="_blank" >源码</a>
</div>
<div class="top-right">
<a v-show="User.id == null || User.id <= 0" href="https://gitee.com/TommyLemon/APIJSON" target="_blank">
<img class="ui inline black image" height="24" src="https://gitee.com/logo-black.svg?20171024" width="60">
</a>
<a v-show="User.id != null && User.id > 0" href="javascript:void(0)" @click="logout(true)">
退出
</a>
<a v-show="User.id == null || User.id <= 0" href="javascript:void(0)" @click="showLogin(true, true)">
登录
</a>
<span class="pop-btn">
<a href="javascript:void(0)" >
{{ User.id != null && User.id > 0 ? User.name : '设置' }}
</a>
<ul class="themes pop" style="z-index: 200;padding: 0px;margin-top: 10px;width: 270px">
<a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 0)">数据库类型Database: {{ database || '点击设置' }}</a>
<a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 1)">数据库模式Schema: {{ schema || '点击设置' }}</a>
<a style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 2)">托管服务器地址URL: {{ server || '点击设置' }}</a>
<a v-show="User.id != null && User.id > 0" style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 3)">当前账号: {{ Privacy.phone || '点击更新' }} <br/> 可用余额: {{ Privacy.balance == null ? '点击更新' : Privacy.balance + ' 元' }}</a>
<a v-show="User.id != null && User.id > 0" style="border-bottom: #DDD 1px solid;width: 100%" href="javascript:void(0)" @click="showConfig(true, 4)">付费功能: <br/>接口用例托管、机器学习测试 等</a>
<li v-show="User.id != null && User.id > 0" style="border-bottom: #DDD 1px solid;width: 100%; display: inline-block;text-align: center;" >
<div style="margin-top: 10px">微信扫码充值<br />没有账号会帮你创建</div>
<img src="img/wechat_collect.jpg" />
<div style="margin: 10px">备注填: APIJSON+你的手机号</div>
</li>
</ul>
</span>
<!-- 部分头像加载不出,或者显示为开源中国LOGO -->
<!--<img v-show="User.id != null && User.id > 0" href="javascript:void(0)" @click="logout()" :src="User.head"-->
<!--style="width: 100%; height: 100%; padding: 10%;"/>-->
</div>
</div>
<!--<div :class="'side-left side-view-' + baseview">-->
<div class="side-left">
<div v-show="! isTestCaseShow" class="left-bar" >
<button class="transfer" id="vTransfer" @click="transfer()">' / "</button>
<input class="url" id="vUrl" type="text" placeholder="请输入请求的接口地址" @keyup="doOnKeyUp(event)" />
<button class="send" id="vSend" @click="send(false)">发送请求</button>
</div>
<div v-show="isTestCaseShow" class="left-bar">
<!--<svg class="icon" style="margin-left: 10px">-->
<!--<use xlink:href="svg/icon.svg#share"></use>-->
<!--</svg>-->
<a style="display: flex;flex-grow: 1;font-size: medium;color: black" class="hint--top save-tool" data-hint="点击切换" href="javascript:void(0)" @click="showTestCase(true, ! isLocalShow)">测试用例:{{ (isLocalShow ? '本地历史(' : '远程共享(') + (testCases == null ? 0 : testCases.length) + ')' }}</a>
<a v-show="! isLocalShow" class="hint--top save-tool" data-hint="点击切换" href="javascript:void(0)" @click="enableML(! isMLEnabled)">{{ testProcess }}</a>
<a v-show="! isLocalShow" class="hint--top @cli-tool" data-hint="回归测试" href="javascript:void(0)" @click="test()">
<img class="icon" src="img/refresh.png"/>
</a>
<a v-show="isLocalShow" class="hint--top @cli-tool" data-hint="清空" href="javascript:void(0)" @click="clearLocal()">
<svg class="icon" >
<use xlink:href="svg/icon.svg#trash"></use>
</svg>
</a>
</div>
<div class="left-panel">
<ul v-show="isTestCaseShow" class="historys" style="width: 100%;height: 100%;overflow: hidden;overflow-y: scroll;padding-bottom: 50px">
<li v-for="(item, index) in testCases" >
<a class="hint--rounded hint--no-animate" ref="testCaseTexts" @mouseover="setRequestHint(index, item)" href="javascript:void(0)" @click="restoreRemote(item)" > {{(item.Document.version > 0 ? 'V' + item.Document.version : 'V*') + ' ' + item.Document.name + ' ' + item.Document.url}}</a>
<div :style="{ background: item.compareColor }" v-show="item.compareType != null" style="position: absolute;top: 8px;right: 36px;display: inline-block;">
<button class="hint--left" ref="testResultButtons" @mouseover="setTestHint(index, item)" v-show="item.compareType != null" @click="handleTest(false, index, item)" style="position: relative;">{{ item.compareMessage + (item.showType == 'before' ? '-前' : '-后') }}</button>
<svg class="icon" style="position: relative;margin-left: 10px" @click="downloadTest(index, item)">
<use xlink:href="svg/icon.svg#export-txt"></use>
</svg>
<button v-show="item.compareType != 0" @click="handleTest(true, index, item)">这是对的</button>
<button style="color: white;background: white;border: white;" v-show="item.compareType == 0" disabled>这是对的</button>
</div>
<svg v-show="isLocalShow || (item.Document != null && item.Document.userId == User.id)" class="icon" style="margin-right: 8px" @click="remove(item, index, true)">
<use xlink:href="svg/icon.svg#trash"></use>
</svg>
</li>
</ul>
<div v-show="! isTestCaseShow" style="width: 100%;height: 100%;" >
<textarea id="vComment" style="width: 100%; height: 100%; position: absolute; z-index: 0; color: darkseagreen; background-color: white;" wrap="off" disabled>
</textarea>
<textarea id="vInput" @keyup="onChange(true)"style="width: 100%;height: 100%; position: absolute; z-index: 100; background: #0000;" wrap="off" >
{
"User": {
"id": 82001
},
"[]": {
"Comment": {
"userId@": "User/id"
}
}
}
</textarea>
</div>
</div>
</div>
<div class="splitx" ></div>
<div class="side-right">
<div class="right-inner">
<div class="right-bar">
<div class="pull-left">
<a v-show="! isExpand" href="javascript:void(0)" class="hint--top" data-hint="全部展开" @click="expandAll()">
<svg class="icon" >
<use xlink:href="svg/icon.svg#expand"></use>
</svg>
</a>
<a v-show="isExpand" href="javascript:void(0)" class="hint--top" data-hint="全部折叠" @click="collapseAll()">
<svg class="icon" >
<use xlink:href="svg/icon.svg#collapse"></use>
</svg>
</a>
<a class="hint--top save-tool" data-hint="保存到本地" href="javascript:void(0)" @click="showSave(true)">
<svg class="icon">
<use xlink:href="svg/icon.svg#save"></use>
</svg>
</a>
<span class="pop-btn" > <!--v-show="historys.length > 0">-->
<a v-show="isTestCaseShow" class="hint--top" data-hint="本地保存,点击隐藏共享" href="javascript:void(0)">
<svg class="icon" @click="showTestCase(false, isLocalShow)">
<use xlink:href="svg/icon.svg#record"></use>
</svg>
</a>
<a v-show="! isTestCaseShow" class="hint--top" data-hint="本地保存,点击查看共享" href="javascript:void(0)">
<svg class="icon" @click="showTestCase(true, isLocalShow)">
<use xlink:href="svg/icon.svg#record"></use>
</svg>
</a>
<ul class="historys pop" style="width: 240px">
<li v-for="(his, index) in historys">
<a href="javascript:void(0)" @click="restore(his)" > {{his.name}}</a>
<svg class="icon" @click="remove(his, index, false)">
<use xlink:href="svg/icon.svg#trash"></use>
</svg>
</li>
</ul>
</span>
</div>
<div class="pull-center" >
<ul style="width: 100%; padding-left: 18px;padding-right: 18px;" >
<li style="width: 100%; display: inline-block;text-align: center;">
<button style="background-color: #DDD;margin: 0px;outline: none;border: #DDD 1px solid;" href="javascript:void(0)" @click="removeAccountTab()"> - </button>
<button style="outline: none;border: #DDD 1px solid;" :style="{backgroundColor: currentAccountIndex == index ? 'transparent' : '#DDD', color: item.isLoggedIn ? 'red' : 'black'}" v-for="(item, index) in accounts" @click="onClickAccount(index, item)">{{ item.name }}</button>
<button style="background-color: #DDD;margin: 0px;outline: none;border: #DDD 1px solid;" href="javascript:void(0)" @click="addAccountTab()"> + </button>
</li>
</ul>
</div>
<div class="pull-right">
<a href="javascript:void(0)" class="hint--top" data-hint="下载" @click="showExport(true, false)">
<svg class="icon">
<use xlink:href="svg/icon.svg#export-txt"></use>
</svg>
</a>
<a href="javascript:void(0)" class="hint--top" data-hint="共享" @click="showExport(true, true)">
<svg class="icon">
<use xlink:href="svg/icon.svg#share"></use>
</svg>
</a>
<span class="pop-btn">
<a class="hint--top" data-hint="换肤" href="javascript:void(0)" @click="isThemeShow = true">
<svg class="icon">
<use xlink:href="svg/icon.svg#theme"></use>
</svg>
</a>
<div class="themes pop">
<div :class="'theme-item ' + (index === checkedTheme)" v-for="(theme, index) in themes" @click="switchTheme(index)">
<span class="theme-color" v-for="color in theme" :style="{backgroundColor: color}" ></span>
</div>
</div>
</span>
</div>
</div>
<div class="right-main" v-show="baseview == 'formater' && view != 'error'" >
<!--正常JSON格式化视图-->
<div style="position: relative" class="view-code" v-show="view == 'code'">
<vue-outer :jsondata="jsonhtml" isend="true" :theme="theme"></vue-outer>
</div>
<!--空视图-->
<div class="view-code" v-show="view == 'empty'">
</div>
<!--压缩视图-->
<textarea v-show="view == 'compress'">{{compressStr}}</textarea>
<textarea id="vOutput" v-show="view == 'output'"></textarea>
<div class="right-main" id="vMarkdown" v-show="view == 'markdown'"></div>
</div>
<!--格式化错误视图-->
<div class="view-error" v-show="view == 'error'">
<pre v-cloak>{{error.msg}}</pre>
</div>
<!--diff视图-->
<!-- <div id="diffoutput" v-show="baseview == 'diff' && view != 'error'">
</div> -->
</div>
</div>
<!--<div class="statement">-->
<!--Copyright ©2017 APIJSON.cn All right reserved.-->
<!--<a href="http://www.miitbeian.gov.cn/" target="_blank">-->
<!--<span >粤ICP备18005508号-1.</span>-->
<!--</a>-->
<!--本网站部分工具是站长整合网上已有工具、开源包等,并全部遵循原有协议发布,著作权归属原作者或是团队。-->
<!--</div>-->
<!--弹出保存框-->
<div class="save-box" v-show="isSaveShow">
<svg class="icon close-icon" @click="showSave(false)">
<use xlink:href="svg/icon.svg#close"></use>
</svg>
<input type="text" placeholder="请输入名称" v-model="history.name" />
<button @click="save()" >保存</button>
</div>
<!--弹出下载文本框-->
<div class="save-box" v-show="isExportShow">
<svg class="icon close-icon" @click="showExport(false, isExportRemote)">
<use xlink:href="svg/icon.svg#close"></use>
</svg>
<input type="text" placeholder="请输入名称" v-model="exTxt.name" />
<button @click="exportTxt()">{{isExportRemote ? '上传' : '下载'}}</button>
</div>
<!--弹出设置文本框-->
<div class="save-box" v-show="isConfigShow">
<svg class="icon close-icon" @click="showConfig(false)">
<use xlink:href="svg/icon.svg#close"></use>
</svg>
<input type="text" placeholder="请输入名称" v-model="exTxt.name" />
<button @click="saveConfig()">切换</button>
</div>
<!-- 登录 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
<div class="my-login-page" v-show="isLoginShow">
<section class="h-100">
<div class="container h-100">
<div class="row justify-content-md-center h-100">
<div class="card-wrapper">
<div class="card fat" >
<div class="card-body">
<div class="card-title">
<a style="font-size: x-large;color: black">{{ ( loginType == "login" ? "登录" : (loginType == "register" ? "注册" : "重置密码") ) + (isAdminOperation ? "(管理员)" : "(测试用户)")}}</a>
<a style="float: right;margin-top: 8px" href="javascript:void(0)" @click="showLogin(false)">
<svg class="icon close-icon" >
<use xlink:href="svg/icon.svg#close"></use>
</svg>
</a>
</div>
<form method="POST">
<div class="form-group">
<label for="vAccount">账号</label>
<input id="vAccount" type="text" class="form-control" name="account" value="13000082001" required autofocus />
</div>
<div class="form-group">
<label for="vPassword">密码
<a class="float-right" v-show="loginType != 'register'" href="javascript:void(0)" @click="loginType = loginType == 'login' ? 'forget' : 'login'">
{{ loginType == "login" ? "忘记密码?" : "记得密码?" }}
</a>
</label>
<input id="vPassword" type="password" class="form-control" name="password" value="123456" required data-eye />
</div>
<div class="form-group" v-show="loginType != 'login'">
<label for="vVerify">验证码
<a class="float-right" href="javascript:void(0)" @click="getVerify(isAdminOperation)">获取</a>
</label>
<input id="vVerify" type="tel" class="form-control" name="verify" required />
</div>
<div class="form-group" v-show="loginType == 'login'">
<label >
<input id="vRemember" type="checkbox" name="remember" @change="setRememberLogin(vRemember.checked)"/> 记住登录
</label>
</div>
<div class="form-group" style="margin-top: 30px">
<button class="btn btn-primary btn-block" @click="confirm(isAdminOperation)">
确定
</button>
</div>
<div class="margin-top20 text-center" v-show="loginType != 'forget'">
{{ loginType == "login" ? "没有账号?" : "已有账号?" }}
<a href="javascript:void(0)" @click="loginType = loginType == 'login' ? 'register' : 'login'">
{{ loginType == "login" ? "注册" : "登录" }}
</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- 登录 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -->
</div>
<!--用于移动的时候遮住文本域 避免被选中-->
<div class="widnow-cover">
</div>
<!--最外层根结构-->
<script type="text/x-template" id="outer-template">
<ul class="json-item">
<vue-val :val="jsondata" :isend="isend" :theme="theme"></vue-val>
</ul>
</script>
<!--内层每个键值对-->
<script type="text/x-template" id="item-template">
<ul class="json-item">
<vue-val :field="key" :theme="theme" :val="val" :isend="index == objLength(jsondata) - (jsondata.hasOwnProperty('_$_table_$_') ? 2 : 1)"
v-show="onRenderJSONItem(val, key)"
v-for="(val, key, index) in jsondata"></vue-val>
</ul>
</script>
<!--key value 最终的渲染方式-->
<script type="text/x-template" id="val-template">
<div class="keyval">
<template v-if="!isObjectArr(val)">
<span class="key hint--top-right hint--rounded hint--no-animate" v-show="field" :style="{color: theme.key}"
ref="responseKey" @mouseover="setResponseHint(val, field, $event)">"{{field}}": </span>
<span :class="'val val-' + getTyp(val)" :style="{color: theme[getTyp(val)]}">
<span v-if="!isaLink(val)">{{formatVal(val)}}</span>
<a v-if="isaLink(val)" :href="val" target="_blank" class="json-link" :style="{color: theme['link-link']}">{{formatVal(val)}}</a>
<span v-if="!isend">,</span>
</span>
</template>
<!--key + 展开折叠ICON-->
<template v-if="isObjectArr(val)">
<span class="key hint--right hint--rounded hint--no-animate" :style="{color: theme.key}" v-show="field"
ref="responseKey" @mouseover="setResponseHint(val, field, $event)">"{{field}}": </span>
<vue-expand></vue-expand>
</template>
<!--值为对象时-->
<template v-if="getTyp(val) == 'Object'">
<span class="expand-view">
<span>{</span>
<vue-item :jsondata="val" :theme="theme"></vue-item>
<div class="brace-end">}<span v-if="!isend">,</span></div>
</span>
<span class="fold-view">{{getTyp(val)}}{<label class="ex-alia" @click="expand($event)">{{objLength(val)}}</label>}<span v-if="!isend">,</span></span>
</template>
<!--值为数组时-->
<template v-if="getTyp(val) == 'Array'">
<span class="expand-view">
<span>[</span>
<span class="val">
<vue-outer :jsondata="sub" v-for="(sub, index) in val" :isend="index == val.length - 1" :theme="theme"></vue-outer>
</span>
<div class="brace-end">]<span v-if="!isend">,</span></div>
</span>
<span class="fold-view">{{getTyp(val)}}[<label class="arrlen ex-alia" @click="expand($event)">{{val.length}}</label>]<span v-if="!isend">,</span></span>
</template>
</div>
</script>
<!--展开 折叠的 UI 组件-->
<script type="text/x-template" id="expand-template">
<span class="expand-wraper">
<svg class="icon icon-square icon-square-min" @click="fold($event)" title="折叠">
<use xlink:href="svg/icon.svg#minus-square"></use>
</svg>
<svg class="icon icon-square icon-square-plus" @click="expand($event)" title="展开">
<use xlink:href="svg/icon.svg#plus-square"></use>
</svg>
</span>
</script>
<script src="js/vue.min.js"></script>
<script src="js/jquery.js"></script>
<script src="js/jsonlint.js"></script>
<script src="js/parse.js"></script>
<script src="js/editor.js"></script>
<!-- <script src="js/diffview.js"></script> -->
<script src="js/localforage.min.js"></script>
<script src="js/FileSaver.js"></script>
<script src="js/uuid.js"></script>
<script src="js/clipboard.min.js"></script>
<script src="js/helper.js"></script>
<!-- 必须在main.js前 TODO 可能有冲突,代码写入vue文件? <<<<<<<<<<<<<<<< -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript" language="JavaScript" charset="UTF-8" src="apijson/StringUtil.js" ></script>
<script type="text/javascript" language="JavaScript" charset="UTF-8" src="apijson/JSONObject.js" ></script>
<script type="text/javascript" language="JavaScript" charset="UTF-8" src="apijson/JSONRequest.js" ></script>
<script type="text/javascript" language="JavaScript" charset="UTF-8" src="apijson/JSONResponse.js" ></script>
<script type="text/javascript" language="JavaScript" charset="UTF-8" src="apijson/CodeUtil.js" ></script>
<!-- 必须在main.js前 TODO 可能有冲突,代码写入vue文件? >>>>>>>>>>>>>>>> -->
<script src="js/main.js"></script>
<script type="text/javascript" language="JavaScript" charset="UTF-8" >
//TODO 保留,用v-model绑定到App.data会报错,各种undefined
var vInput = document.getElementById("vInput");
var vComment = document.getElementById("vComment");
var vOutput = document.getElementById("vOutput");
var vUrl = document.getElementById("vUrl");
var vTransfer = document.getElementById("vTransfer");
var vSend = document.getElementById("vSend");
var vAccount = document.getElementById("vAccount");
var vPassword = document.getElementById("vPassword");
var vVerify = document.getElementById("vVerify");
var vRemember = document.getElementById("vRemember");
vUrl.value = new String(URL_BASE + '/get'); //main.js里访问不到,可能是script引用顺序问题
var vMarkdown = document.getElementById('vMarkdown');
function onScrollChanged() {
$(vComment).scrollLeft(vInput.scrollLeft);
$(vComment).scrollTop(vInput.scrollTop);
}
//vComment跟随vInput滚动,避免JSON重叠"露馅"
$(vInput).on('scroll', onScrollChanged);
function markdownToHTML(md) {
vMarkdown.innerHTML = '';
editormd.markdownToHTML("vMarkdown", {
markdown : md ,//+ "\r\n" + $("#append-test").text(),
//htmlDecode : true, // 开启 HTML 标签解析,为了安全性,默认不开启
htmlDecode : "style,script,iframe", // you can filter tags decode
//toc : false,
tocm : true, // Using [TOCM]
//tocContainer : "#custom-toc-container", // 自定义 ToC 容器层
//gfm : false,
tocDropdown : true,
// markdownSourceCode : true, // 是否保留 Markdown 源码,即是否删除保存源码的 Textarea 标签
taskList : true,
tex : true, // 默认不解析
flowChart : true, // 默认不解析
sequenceDiagram : true, // 默认不解析
});
}
</script>
<script src="md/lib/jquery.min.js"></script>
<script src="md/lib/marked.min.js"></script>
<script src="md/lib/prettify.min.js"></script>
<script src="md/lib/raphael.min.js"></script>
<script src="md/lib/underscore.min.js"></script>
<script src="md/lib/sequence-diagram.min.js"></script>
<script src="md/lib/flowchart.min.js"></script>
<script src="md/lib/jquery.flowchart.min.js"></script>
<script src="md/editormd.js"></script>
<!-- 百度统计 <<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
<script>
var _hmt = _hmt || [];
(function() {
try {
var hm = document.createElement("script");
// hm.src = "https://hm.baidu.com/hm.js?b8fc421d7c0dc354c6c8fb5a2c4f7729"; //cn
hm.src = "https://hm.baidu.com/hm.js?965ec968d2d53b729b90efc7ffb3ead2"; //org
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
} catch (e) {
console.log('BaiduStatistics: catch\n' + e.message)
}
})();
</script>
<!-- 百度统计 >>>>>>>>>>>>>>>>>>>>>>>>>>>>> -->
</body>
</html>