首先得用模块化的方式编写我们的js,使用define定义一个模块:
define('modelname',['jquery','xxx'], function ($,xxx) {
var hehe...上面这段代码如果用php来理解,可以看作是:
require jquery.php
require xxx.php
class hehe{
public function function1(...;
reuqire hehe.php
hehe.function1();
hehe.function2();
hehe.function3();
首先我们写我们的控制器,正常查询你所需要展示的数据.然后通过...', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echarts-theme', 'template'], function ($,...undefined, Backend, Datatable, Table, Echarts, undefined, Template) {
var Controller = {