|
@@ -10,6 +10,9 @@
|
|
|
<link rel="stylesheet" type="text/css" href="css/mui.min.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="css/iconfont.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="css/main.css" />
|
|
|
+ <style>
|
|
|
+ .my-picker{max-height: none;background-color: rgba(0,0,0,.1);}
|
|
|
+ </style>
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
@@ -427,7 +430,7 @@ window.addEventListener("popstate", function() {
|
|
|
var th = $(this);
|
|
|
mask.show(); //显示遮罩层
|
|
|
//在body尾部增加-产品颜色列表父级ul
|
|
|
- $("body").append('<div class="my-picker"><br/><ul class="mui-table-view mui-table-view-striped mui-table-view-condensed my-grid-view-no"></ul><button class="mui-btn my-btn-block my-btn-buy-know" disabled="disabled">确定</button></div>');
|
|
|
+ $("body").append('<div id="scroll" class="mui-scroll-wrapper my-picker"><br/><div class="mui-scroll" style="max-height:100%;bottom: 0;"><ul class="mui-table-view mui-table-view-striped mui-table-view-condensed my-grid-view-no"></ul><button class="mui-btn my-btn-block my-btn-buy-know" disabled="disabled">确定</button></div></div>');
|
|
|
$.ajax(base_path + '/wechat/product/selectProductColor?dates=' + new Date().getTime(), {
|
|
|
data: {
|
|
|
"productId": th.attr("name") //productId产品id
|
|
@@ -446,7 +449,7 @@ window.addEventListener("popstate", function() {
|
|
|
if(dt.status) {
|
|
|
console.log(dt)
|
|
|
var data = dt.data.productColorList;
|
|
|
- var table = document.body.querySelector('.my-picker>ul'); //产品颜色列表父级ul
|
|
|
+ var table = document.body.querySelector('.my-picker .mui-table-view'); //产品颜色列表父级ul
|
|
|
table.innerHTML = '';
|
|
|
//循环遍历产品颜色数组
|
|
|
mui(data).each(function(index) {
|
|
@@ -469,6 +472,7 @@ window.addEventListener("popstate", function() {
|
|
|
$(".my-btn-buy-know").attr("cart", "cart");
|
|
|
}
|
|
|
mui(".mui-numbox").numbox(); //激活加减按钮组合
|
|
|
+ mui('#scroll').scroll();
|
|
|
} else {
|
|
|
mui.alert("获取数据失败!");
|
|
|
}
|