Commit 8846f381 by 杨树贤

价格展示问题

parent 9a6823b5
Showing with 11 additions and 5 deletions
......@@ -76,8 +76,12 @@
field: 'cn_price', title: '人民币成本价(¥)', align: 'left', width: 150, templet: function (data) {
if (data.ladder_price) {
let ladder = data.ladder_price[data.ladder_price.length - 1];
if (ladder) {
return '<div class="view_ladder_price_cn layui-row"><div class="layui-col-xs5"><span>'+ (ladder.purchases) + '+</span></div><div class="layui-col-xs7"><span>' + (ladder.price_cn) + '</span></div></div>';
if (ladder.hasOwnProperty('price_cn')) {
if (ladder.price_cn > 0) {
return '<div class="view_ladder_price_cn layui-row"><div class="layui-col-xs5"><span>' + (ladder.purchases) + '+</span></div><div class="layui-col-xs7"><span>' + (ladder.price_cn) + '</span></div></div>';
}else{
return '';
}
}else{
return '';
}
......@@ -91,7 +95,10 @@
if (data.ladder_price) {
let ladder = data.ladder_price[data.ladder_price.length - 1];
if (ladder.hasOwnProperty('price_us')) {
return '<div class="view_ladder_price_us layui-row""><div class="layui-col-xs5"><span>'+ (ladder.purchases) + '+</span></div><div class="layui-col-xs7"><span>$' + (ladder.price_us) + '</span></div></div>';
if (ladder.price_us > 0) {
return '<div class="view_ladder_price_us layui-row""><div class="layui-col-xs5"><span>'+ (ladder.purchases) + '+</span></div><div class="layui-col-xs7"><span>$' + (ladder.price_us) + '</span></div></div>';
}
return '';
}
}
......@@ -519,4 +526,4 @@
layer.close(ladderPriceTipsValUs);
});
});
</script>
\ No newline at end of file
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment