我正在尝试使用一个名为 businessHours 的 jQuery 插件, 请参阅 Github 文档
JSON数组有一个初始化选项,如下所示:
/* initial data */
var operationTime = [
{"isActive":false,"timeFrom":null,"timeTill":null},
{"isActive":false,"timeFrom":null,"timeTill":null},
{"isActive":false,"timeFrom":null,"timeTill":null},
{"isActive":true,"timeFrom":"7:15","timeTill":"18:00"},
{"isActive":true,"timeFrom":"9:00","timeTill":"18:00"},
{"isActive":false,"timeFrom":null,"timeTill":null},
{"isActive":false,"timeFrom":null,"timeTill":null}
];
$(selector).businessHours({
operationTime: operationTime, // list of JSON objects
postInit:function() { // optional
// post-init handler
},
checkedColorClass: "workingBusinssDay", // optional
uncheckedColorClass: "dayOff", // optional
dayTmpl: " ... template content ..." // optional
});
我通过 php 将这些数据保存到 mysql 数据库中,但是当我加载数据时,我得到了相同的格式:
我不明白我在这里做错了什么?有人可以帮忙吗?多谢你们!