for循环里面赋值,出来就没了,怎么回事?
var wordlist=that.data.list;
switch (options.writestyle) {
case ‘0’:
this.setData({
str: options.str,
write:‘csl’
})
break;
case ‘1’:
this.setData({
str: options.str,
write:‘wxz’
})
createlist(that,options,wordlist);//wordlist
var slen=options.str.length;
for(var i=0;i<slen;i++){
wordlist[i].Urlstr=‘cloud://shufa-8rvqy.7368-shufa-8rvqy-1259130971/wxz/’+wordlist[i].word+’.jpg’
console.log(wordlist[i].word)
console.log(wordlist[i].Urlstr)
console.log(wordlist)
}
console.log(‘case1’+wordlist)