Commit 5607f5d2 authored by 李维's avatar 李维

Bug fix

parent 10ae6f6e
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
</div> </div>
</div> </div>
</div> </div>
<button [disabled]="(item.correct.length + item.incorrect.length)>=30" style="margin-top: 10px; position: absolute; bottom: 10px; right: 100px;" nz-button (click)="copyItem(item.correct, choiceIndex)" > <button [disabled]="(item.correct.length + item.incorrect.length)>=30" style="margin-top: 10px; position: absolute; bottom: 10px; right: 120px;" nz-button (click)="copyItem(item.correct, choiceIndex)" >
<span>复制此项</span> <span>复制此项</span>
</button> </button>
<button [disabled]="item.correct.length==1" style="margin-top: 10px; position: absolute; bottom: 10px; right: 10px;;" nz-button nzType="danger" (click)="deleteChoice(item.correct, choiceIndex)" > <button [disabled]="item.correct.length==1" style="margin-top: 10px; position: absolute; bottom: 10px; right: 10px;;" nz-button nzType="danger" (click)="deleteChoice(item.correct, choiceIndex)" >
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
</div> </div>
</div> </div>
</div> </div>
<button [disabled]="(item.correct.length + item.incorrect.length)>=30" style="margin-top: 10px; position: absolute; bottom: 10px; right: 100px;" nz-button (click)="copyItem(item.incorrect, choiceIndex)" > <button [disabled]="(item.correct.length + item.incorrect.length)>=30" style="margin-top: 10px; position: absolute; bottom: 10px; right: 120px;" nz-button (click)="copyItem(item.incorrect, choiceIndex)" >
<span>复制此项</span> <span>复制此项</span>
</button> </button>
<button style="margin-top: 10px; position: absolute; bottom: 10px; right: 10px;;" nz-button nzType="danger" (click)="deleteChoice(item.incorrect, choiceIndex)" > <button style="margin-top: 10px; position: absolute; bottom: 10px; right: 10px;;" nz-button nzType="danger" (click)="deleteChoice(item.incorrect, choiceIndex)" >
......
...@@ -208,9 +208,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -208,9 +208,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.refresh(); this.refresh();
/* Remove this when commit */ /* Remove this when commit */
if(location.href.indexOf("localhost") != -1) { // if(location.href.indexOf("localhost") != -1) {
(<any> window).axios.post(`http://www.datalist.com.cn:8060/json/save/${this.KEY}`, this.item) // (<any> window).axios.post(`http://www.datalist.com.cn:8060/json/save/${this.KEY}`, this.item)
} // }
/* Remove this when commit */ /* Remove this when commit */
console.log("保存", this.item) console.log("保存", this.item)
......
...@@ -110,14 +110,14 @@ cc.Class({ ...@@ -110,14 +110,14 @@ cc.Class({
}, },
getData(cb) { getData(cb) {
// cb(this.getDefaultData());
cc.loader.load( "http://www.datalist.com.cn:8060/json/DataKey_dfzx_ppp", function( err, res) {
if(err) {
cb(this.getDefaultData()); cb(this.getDefaultData());
} else { // cc.loader.load( "http://www.datalist.com.cn:8060/json/DataKey_dfzx_ppp", function( err, res) {
cb(JSON.parse(res)); // if(err) {
} // cb(this.getDefaultData());
}); // } else {
// cb(JSON.parse(res));
// }
// });
}, },
getDefaultData() { getDefaultData() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment