首页 > 代码库 > 4、淘书页详细
4、淘书页详细
在menuContent里添加一个scrollView组件
Model.prototype.transUrl = function(row) { var src = http://www.mamicode.com/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、淘书页详细
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。