首先得用模块化的方式编写我们的js,使用define定义一个模块:
define('modelname',['jquery','xxx'], function ($,xxx) {
var hehe...上面这段代码如果用php来理解,可以看作是:
require jquery.php
require xxx.php
class hehe{
public function function1(...return $this->view->fetch();
}
然后修改html页面 这里是定义js
var Orderdata = {
createdata: {:json_encode...addtabs', 'table', 'echarts', 'echarts-theme', 'template'], function ($, undefined, Backend, Datatable...type: 'line',
areaStyle: {}
}]
}
// 使用刚指定的配置项和数据显示图表