修复详情为空时报错的问题
This commit is contained in:
parent
cedc3b3ce5
commit
a6a33eddb9
@ -86,6 +86,9 @@ data_pro = function(){
|
||||
newdatalist[datacount][1] = datalist[i][1];//name
|
||||
newdatalist[datacount][2] = datalist[i][2];//url
|
||||
newdatalist[datacount][3] = datalist[i][3];//disp
|
||||
if(newdatalist[datacount][3] == null){
|
||||
newdatalist[datacount][3] = "无介绍";
|
||||
}
|
||||
newdatalist[datacount][4] = shortdisp;
|
||||
newdatalist[datacount][5] = strReplaceResult;
|
||||
var test = mainForm.listbox.add(strReplaceResult);
|
||||
@ -104,6 +107,7 @@ data_pro = function(){
|
||||
mainForm.listbox.oncommand = function(id,event){
|
||||
if( event == 0x1/*_LBN_SELCHANGE*/ ){
|
||||
var sel = mainForm.listbox.selIndex;
|
||||
|
||||
updateselect(sel);
|
||||
}
|
||||
}
|
||||
@ -186,6 +190,7 @@ updateselect = function(index){
|
||||
if(index > #newdata_filted){
|
||||
return ;
|
||||
}
|
||||
console.dumpJson(newdata_filted[index])
|
||||
mainForm.listbox.selIndex = index;
|
||||
mainForm.edUrl.text = newdata_filted[index][2];
|
||||
mainForm.edDesp.text = newdata_filted[index][5] ++ '\n' ++ newdata_filted[index][3];
|
||||
|
Loading…
x
Reference in New Issue
Block a user