摘要:后台管理,数据库接口。PHP编写接口allSelect: function (e) {var that = this//先判断现在选中没var allSelect = e.currentTarget.dataset.selectvar newList = that.data.listif (allSelect == "circle") {//先把数组遍历一遍,然后改掉selec
后台管理,数据库接口。PHP编写接口
allSelect: function (e) {
var that = this
//先判断现在选中没
var allSelect = e.currentTarget.dataset.select
var newList = that.data.list
if (allSelect == "circle") {
//先把数组遍历一遍,然后改掉select值
for (var i = 0; i < newList.length; i++) {
newList[i].select = "success"
}
var select = "success"
} else {
for (var i = 0; i < newList.length; i++) {
newList[i].select = "circle"
}
var select = "circle"
}
that.setData({
list: newList,
allSelect: select
})
//调用计算数目方法
that.countNum()
//计算金额
that.count()
},
批改老师:查无此人批改时间:2018-11-15 16:34:36
老师总结:你这个代码没复制全呀。准备工作,不需要判断你的代码,就给你通过了。只后把代码复制全一些。加油。