File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ var JSONResponse = {
178178 1-对象新增字段或数组新增值,绿色;
179179 2-值改变,蓝色;
180180 3-对象缺少字段/整数变小数,黄色;
181- 4-类型/code改变 ,红色;
181+ 4-code/值类型 改变 ,红色;
182182 */
183183 compareResponse : function ( target , real ) {
184184 if ( target == null || target . code == null ) {
@@ -191,18 +191,19 @@ var JSONResponse = {
191191 delete target . code ;
192192 delete real . code ;
193193
194- delete target . msg ;
195- delete real . msg ;
194+ //可能提示语变化,也要提示
195+ // delete target.msg;
196+ // delete real.msg;
196197
197198 return JSONResponse . compare ( target , real ) ;
198199 } ,
199200
200201 /**测试compare: 对比 新的请求与上次请求的结果
201202 0-相同,无颜色;
202- 1-对象新增字段或数组新增值 ,绿色;
203+ 1-新增字段/新增值 ,绿色;
203204 2-值改变,蓝色;
204- 3-对象缺少字段 /整数变小数,黄色;
205- 4-类型/success/errCode改变 ,红色;
205+ 3-缺少字段 /整数变小数,黄色;
206+ 4-类型/code 改变 ,红色;
206207 */
207208 compare : function ( target , real ) {
208209 if ( target == null ) {
Original file line number Diff line number Diff line change 102102 < li v-for ="(item, index) in remotes " >
103103 < a href ="javascript:void(0) " @click ="restore(item) " > {{(item.version > 0 ? 'V' + item.version : 'V*') + ' ' + item.name + ' ' + item.url}}</ a >
104104 < div :style ="{ background: item.compareColor } " v-show ="item.compare != null && item.compare != 0 " style ="position: absolute;right: 30px;display: inline-block; ">
105- < button v-show ="item.compare != null && item.compare > 0 " @click ="handleTest(false, index, item) " style ="position: relative;color: red "> 错误,已解决 </ button >
105+ < button v-show ="item.compare != null && item.compare > 0 " @click ="handleTest(false, index, item) " style ="position: relative;color: red "> {{ item.error }} </ button >
106106 < svg class ="icon " style ="position: relative;margin-left: 10px " @click ="downloadTest(index, item) ">
107107 < use xlink:href ="svg/icon.svg#export-txt "> </ use >
108108 </ svg >
109- < button @click ="handleTest(true, index, item) "> 正确,上传 </ button >
109+ < button @click ="handleTest(true, index, item) "> 这是对的 </ button >
110110 </ div >
111111 < svg v-show ="item.userId == User.id " class ="icon " style ="margin-right: 4px " @click ="remove(item, index, true) ">
112112 < use xlink:href ="svg/icon.svg#trash "> </ use >
Original file line number Diff line number Diff line change 13351335 switch ( it . compare ) {
13361336 case JSONResponse . COMPARE_KEY_MORE :
13371337 it . compareColor = 'green'
1338+ it . error = '新增字段/新增值'
13381339 break ;
13391340 case JSONResponse . COMPARE_VALUE_CHANGE :
13401341 it . compareColor = 'blue'
1342+ it . error = '值改变'
13411343 break ;
13421344 case JSONResponse . COMPARE_KEY_LESS :
13431345 it . compareColor = 'yellow'
1346+ it . error = '缺少字段/整数变小数'
13441347 break ;
13451348 case JSONResponse . COMPARE_TYPE_CHANGE :
13461349 it . compareColor = 'red'
1350+ it . error = 'code/值类型 改变'
1351+ break ;
1352+ default :
1353+ it . compareColor = 'white'
1354+ it . error = ''
13471355 break ;
13481356 }
13491357
You can’t perform that action at this time.
0 commit comments