|
|
|
@ -10,7 +10,7 @@ Page({ |
|
|
|
|
catelist:[],//
|
|
|
|
|
user_id:0, |
|
|
|
|
detail:[], |
|
|
|
|
cid:0, |
|
|
|
|
cid:[], |
|
|
|
|
setcolor:['pinghezhi','qixuzhi','shirezhi','yinxuzhi','qiyuzhi','yangxuzhi','tanshizhi','xueyuzhi','tezhi'], |
|
|
|
|
minipic:'', |
|
|
|
|
picList:[ |
|
|
|
@ -91,11 +91,24 @@ Page({ |
|
|
|
|
type:1, |
|
|
|
|
}, function (data, ret) { |
|
|
|
|
if(ret.code == 1){ |
|
|
|
|
if(that.data.cid.length==0){ |
|
|
|
|
that.setData({ |
|
|
|
|
loading: false, |
|
|
|
|
catelist:ret.data.lists, |
|
|
|
|
detail:ret.data.detail |
|
|
|
|
}); |
|
|
|
|
}else{ |
|
|
|
|
let arr = ret.data.lists; |
|
|
|
|
let selectedItem = arr.filter(item=>{ |
|
|
|
|
return that.data.cid.includes(item.id)==true |
|
|
|
|
}) |
|
|
|
|
that.setData({ |
|
|
|
|
loading: false, |
|
|
|
|
catelist:selectedItem |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let piclist = [] |
|
|
|
|
that.data.catelist.forEach(item=>{ |
|
|
|
|
let obj = { |
|
|
|
|