|
楼主 |
发表于 2016-9-9 16:21:28
|
显示全部楼层
本帖最后由 kevin0753 于 2016-9-9 16:31 编辑
//点击 安阳
Model.prototype.MenuClick = function(event){
var productData = this.comp('productData');
productData.clear();
productData.setFilter("filter","fOneID = :001");
productData.refreshData();
};
你好,改成这样刷新是可以刷新了。可是条件过滤好像没有起作用。能帮我看下是红色的里面是有什么问题吗?
.w里面是这样。
<!-- 加载列表数据 -->
<div component="$UI/system/components/justep/data/data" autoLoad="true"
xid="productData" idColumn="fID">
<column label="id" name="fID" type="String" xid="xid1"></column>
<column label="父级ID" name="fOneID" type="Integer" xid="column3"></column>
<column label="标题" name="fTitle" type="String" xid="xid2"></column>
<column label="图片" name="fImg" type="String" xid="xid3"></column>
<column label="价格" name="fPrice" type="Float" xid="xid4"></column>
<column label="优惠" name="fSatisfaction" type="Integer" xid="xid5"></column>
<rule xid="rule2"></rule></div>
</div>
.json 数据是
[
{"fID":"004","fOneID":"002","fTitle":"可","fImg":"./img/a4.jpg","fPrice":"1000","fSatisfaction":"线上预约"},
{"fID":"003","fOneID":"001","fTitle":"麦","fImg":"./img/a3.jpg","fPrice":"1000","fSatisfaction":"预约有优惠"},
{"fID":"002","fOneID":"001","fTitle":"宝","fImg":"./img/a9.jpg","fPrice":"1000","fSatisfaction":""},
{"fID":"001","fOneID":"001","fTitle":"石","fImg":"./img/a1.jpg","fPrice":"1000","fSatisfaction":"下单有优惠"}
]
|
|