初始版本
This commit is contained in:
13
statics/js/dist/addedServiceList.js
vendored
Executable file
13
statics/js/dist/addedServiceList.js
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
function initServices() {
|
||||
for (var a = ["<tr>", '<td class="img"><i width="64" height="64" style="#{imgOutStyle}"></i></td>', "<td>", "<h3>#{name}</h3>", '<p>#{desc}<a href="#{detailsLink}" class="details" target="_blank">详情>></a></p>', "</td>", '<td class="price">¥ <strong>#{price}</strong> <span>#{unit}</span></td>', '<td class="w80 #{linkType}"><a href="#{buyLink}" class="ui-btn ui-btn-sc" target="_blank" data-product-id="#{productId}">#{btnValue}</a></td>', "</tr>"].join(""), b = [], c = 0; c < addedService.length; c++) {
|
||||
var d = addedService[c],
|
||||
e = a.replace(/\#{([\w\-]+)\}/g, function(a, b) {
|
||||
return d[b] || ""
|
||||
});
|
||||
b.push(e)
|
||||
}
|
||||
$("#addedService").html(b.join(""))
|
||||
}!
|
||||
function() {
|
||||
initServices()
|
||||
}(jQuery);
|
||||
Reference in New Issue
Block a user