一、设值
<input class="same big-icon aui-checkbox" data-prices="{{=it[i].children[j].goodsprices}}" value="{{=it[i].children[j].goodsid}}" type="checkbox" />
二、取值
$api.val(inputel[j])
$(inputel[j]).data("prices");
三、
var elnum = $api.domAll('#evaluation-l li');
var el=$(elnum[0]).data("typedatainfo");
load_goods_info(el);
//var elnum = $api.domAll('#evaluation-l li');
$(".aui-list-item").click(function() {
for (var i = 0, len = elnum.length; i < len; i++) {
if (this == elnum[i]) {
//
$api.addCls(this, 'selected');
var el=$(elnum[i]).data("typedatainfo");
console.log("el"+el);
load_goods_info(el);
}else {
$api.removeCls(elnum[i], 'selected');
}
}
})
apiready = function() {
// 登录操作
$api.addEvt($api.byId("login"), 'click', function() {
var count = $api.byId("count").value;
var code = $api.byId("code").value;
if (count.length == 0) {
api.toast({
msg: '请输入手机号码',
duration: 2000,
location: 'top'
});
return;
} else {
if (code.length == 0) {
api.toast({
msg: '请输入登录密码',
duration: 2000,
location: 'top'
});
} else {
$.ajax({
type: "post",
url: "http://192.168.2.199:888/Shopsmain/",
data: {
service: "Users.land",
loginname: count,
password: code
},
dataType: "json",
success: function(data) {
if (data.data.code == 1) {
api.toast({
msg: '登录成功',
duration: 2000,
location: 'bottom'
});
api.openWin({
name: 'mine_win',
url: 'mine_win.html',
reload: true
});
} else {
api.toast({
msg: '账号或密码错误,请重新输入',
duration: 3000,
location: 'bottom'
});
}
// console.log(data);
},
error: function(data) {
api.toast({
msg: '服务器出错!',
duration: 3000,
location: 'bottom'
});
}
});
}
}
})
}
来源:CSDN
作者:给的再多不如懂我-珊珊
链接:https://blog.csdn.net/weixin_36792339/article/details/81436808