const util = require("../../utils/util"); Component({ properties: { showType:{ type:Boolean, value:false, observer:function(newVal){ this.setData({showType:newVal}) } }, aid:{ type:String, observer:function(newVal){ this.setData({aid:newVal}) this.getGoodstext(); this.getGoodsList(); } }, }, data: { dataList:{}, content:{}, aid:'', showType:false, }, methods: { getGoodstext(){ let that=this; util.getGoodstext(this.data.aid).then(res=>{ let data=res; data.provide = data.provide.replace(/section/g, "div"); data.provide = data.provide.replace(/{ res.forEach(el => { el.logo=el.logo.replace('@!logo','') }); that.setData({dataList:res}) }) } } })