| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- //获取数据
- List2();
- List3();
- $(function() {
- //更新事件
- $('#sc_btns').click(function() {
- if ($("#sc_keyWords").val()=="") {
- layer.msg("序列号不能为空");
- } else{
- List1();
- }
- })
- });
- //授权
- function List1() {
- var sequence=$("#sc_keyWords").val();
- $.ajax({
- url: huayi.config.callcenter_url + '/callcenterapi/api/authorize/auth',
- data: {
- tdata:sequence,
- kind:0,
- },
- async: true,
- dataType: 'json',
- type: 'post', //HTTP请求类型
- success: function(data) {
- List2();
- List3();
- layer.msg("注册码已发送");
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
- //查询授权
- function List2() {
- $.ajax({
- url: huayi.config.callcenter_url + '/callcenterapi/api/authorize/auth',
- data: {
- kind:1,
- },
- async: true,
- dataType: 'json',
- type: 'post', //HTTP请求类型
- success: function(data) {
- var result=data.data
- $(".datatime").text(result.year+"-"+result.month+"-"+result.day);
- $(".authorization").text(data.data.AgentCount); // 坐席授权数量
- $(".ivrtext").text(data.data.IvrFlowCount); //IVR数量
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
- //获取序列号
- function List3() {
- $.ajax({
- url: huayi.config.callcenter_url + '/callcenterapi/api/authorize/auth',
- data: {
- kind:2,
- },
- async: true,
- dataType: 'json',
- type: 'post', //HTTP请求类型
- success: function(data) {
- $(".sequence").text(data.data.message) //序列号
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- }
- })
- }
|