4淘书页详细
Posted at笑笑
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了4淘书页详细相关的知识,希望对你有一定的参考价值。
在menuContent里添加一个scrollView组件
Model.prototype.transUrl = function(row) { var src = null; if (row.val(\'Bookimage\') != null && row.val(\'Bookimage\') != "" && row.val(\'Bookimage\') != "[]") { var imageJson = eval("(" + row.val(\'Bookimage\') + ")"); var realFileName = imageJson[0]["realFileName"]; var storeFileName = imageJson[0]["storeFileName"]; var ownerID = row.val(\'Bookid\'); var operateType = "browse"; var url = this.actionUrl + \'?realFileName=\' + realFileName + \'&storeFileName=\' + storeFileName + \'&ownerID=\' + ownerID + \'&operateType=\' + operateType; src = require.toUrl(url); } return src; }
Model.prototype.addCartBtnClick = function(event) { var row = event.bindingContext.$object; var rows = this.comp("cartData").find([ "fMenuID" ], [ row.getID() ]); if (rows.length == 0) { this.comp("cartData").newData({ defaultValues : [ { "fMenuID" : row.getID(), "fMenuName" : row.val("Bookname"), "fpostage" : row.val("Postage"), "fPrice" : row.val("Bookprice"), "fCount" : 1 } ] }); } else { rows[0].val("fCount", rows[0].val("fCount") + 1); } };
以上是关于4淘书页详细的主要内容,如果未能解决你的问题,请参考以下文章