123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544 |
- define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'qrcode'], function ($, undefined, Backend, Table, Form, Qrcode) {
- $(document).on("click",'.qrcode',function(){
- var qrUrl = $(this).data("qrcode");
- $('#tong').html("");
- $('#tong').qrcode(qrUrl);
- layer.open({
- type: 1,
- title: false,
- area: '258px',
- skin: 'layui-layer-nobg', //没有背景色
- shadeClose: true,
- content: $('#tong')
- });
- });
- //book_but
- $(document).on('click','.book_but',function () {
- Fast.api.open($(this).attr('href'), '订单详情', {});
- return false;
- });
- $(document).on('click','.btn-look',function(){
- layer.open({
- type: 2,
- title: '查看代理商推广链接',
- maxmin: true,
- area: ['90%', '90%'],
- shadeClose: true, //点击遮罩关闭层
- content: 'referral/lookAgentReferral'
- });
- });
- $(document).on('click','.short_link_but',function(){
- var $this = $(this);
- $this.hide().siblings('.short_link').show();
- })
-
- if(Config.rtype == 1){
- var Controller = {
- index: function () {
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- index_url: Config.referralUrl,
- add_url: 'referral/referral/add?type=2',
- export_url: 'referral/export',
- edit_url: 'referral/referral/edit',
- del_url: 'referral/referral/del',
- multi_url: 'referral/referral/multi',
- table: 'referral',
- },
- showToggle: false,
- showColumns: false,
- visible: false,
- commonSearch: true,
- showExport: true,
- searchFormVisible: true,
- search:false
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'id',
- sortName: 'id',
- columns: [
- [
- //{field: 'id', title: 'ID'},
- {field: 'source_url', title: '推广链接',formatter:Controller.api.source_url, operate:false},
- {field: 'entry_page', title: '入口页面',formatter:Controller.api.entry_page, operate:false},
- {field: 'book_id', title: '书籍ID', visible:false},
- {field: 'book.name', title: '书籍名称', visible:false,operate: 'LIKE %...%'},
- {field: 'chapter_idx', title: '章节序号', visible:false, operate:false},
- {field: 'admin_id', title: __('Admin_id'), visible:false, operate:false},
- {field: 'name', title: __('Name'),operate: 'LIKE %...%'},
- {field: 'wx_type', title: __('Wx_type'), visible:false, searchList: {"wx_type 1":__('Wx_type 1'),"wx_type 2":__('Wx_type 2')}, operate:false},
- {field: 'wx_type_text', title: __('Wx_type'), visible:false, operate:false},
- {field: 'type', title: __('Type'), visible:false, searchList: {"type 1":'阅读页推广',"type 2":'首页推广'}, operate:false},
- {field: 'type_text', title: __('Type'), visible:false, operate:false},
- {field: 'uv', title: '累计阅读人数(今日阅读人数)', operate:false,formatter:function(value,row,index){
- return value+"("+row.dayuv+")";
- }},
- {field: 'follow', title: '累计关注人数(今日关注人数)', operate:false,formatter:function(value,row,index){
- return value+"("+row.dayut+")";
- }},
- {field: 'cost',title:'推广成本', operate:false},
- {field: 'money', title: '累计充值金额(今日充值金额)', operate:false,formatter:function(value,row,index){
- return value+"("+row.daymt+")";
- }},
- {field: 'createtime', title: '创建时间', operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'updatetime', title: '更新时间', visible:false, operate:false, addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {
- field: 'tongji', title: __("统计"), operate: false, formatter: function (value, row, index) {
- return '<a style="float:left;margin-left: 10%" href="/admin/orders/index?ids=' + row.id + '" class="btn btn-xs btn-success btn-editone book_but">订单详情</a>';
- }
- },
- ]
- ],
- exportOptions: {
- type: 'excel',
- fileName:'推广链接',
- ignoreColumn: [8,9],
- onMsoNumberFormat: function(cell, row, col) {
- return (row > 0 && col == 1) ? '\\@' : '';
- }}
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- },
- lookagentreferral:function(){
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- look_url: "referral/referral/lookAgentReferral",
- table: 'referral',
- },
- showColumns:false,
- showToggle:false,
- searchFormVisible: true,
- search:false,
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.look_url,
- pk: 'id',
- sortName: 'id',
- columns: [
- [
- //{checkbox: true},
- //{field: 'id', title: 'ID'},
- {field: 'source_url', title: '推广链接',formatter:Controller.api.source_url, operate:false},
- {field: 'entry_page', title: '入口页面',formatter:Controller.api.entry_page, operate:false},
- {field: 'book_id', title: '书籍ID', visible:false},
- {field: 'book.name', title: '书籍名称', visible:false,operate: 'LIKE %...%'},
- {field: 'chapter_idx', title: '章节序号', visible:false, operate:false},
- {field: 'admin_id', title: '代理商',formatter: Controller.api.formatter.agent_text,searchList: Controller.api.formatter.agent_select()},
- {field: 'wx_type', title: __('Wx_type'), visible:false, searchList: {"wx_type 1":__('Wx_type 1'),"wx_type 2":__('Wx_type 2')}, operate:false},
- {field: 'wx_type_text', title: __('Wx_type'), visible:false, operate:false},
- {field: 'type', title: __('Type'), visible:false, searchList: {"type 1":'阅读页推广',"type 2":'首页推广'}, operate:false},
- {field: 'type_text', title: __('Type'), visible:false, operate:false},
- {field: 'uv', title: '阅读人数', operate:false},
- {field: 'follow', title: '关注人数', operate:false},
- {field: 'cost',title:'推广成本', operate:false},
- {field: 'money', title: '充值金额', operate:false},
- {field: 'createtime', title: '创建时间', operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'updatetime', title: '更新时间', visible:false, operate:false, addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'operate', title: '操作', table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate},
- {
- field: 'tongji', title: __("统计"), operate: false, formatter: function (value, row, index) {
- return '<a style="float:left;margin-left: 10%" href="/admin/orders/index?ids=' + row.id + '" class="btn btn-xs btn-success btn-editone book_but">订单详情</a>';
- }
- },
- ]
- ],
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- },
- add: function () {
- Form.api.bindevent($("form[role=form]"), function (data) {
- Toastr.success('添加成功');
- $('.url_txt').eq(0).text(data.jmp_url);
- $('.url_txt').eq(1).text(data.short_url_weibo);
- $('.url_txt').eq(2).text(data.short_url_qq);
- $('.copy').eq(0).attr('data-clipboard-text',data.jmp_url);
- $('.copy').eq(1).attr('data-clipboard-text',data.short_url_weibo);
- $('.copy').eq(2).attr('data-clipboard-text',data.short_url_qq);
- $('#erweima').html("");
- $('#erweima').qrcode(data.jmp_url);
- $('#erweima').html('<img style="display: block;margin: 0;padding: 0;border: 0;height: 160px;width: 160px;" src="' + $('#erweima canvas')[0].toDataURL("image/png") + '" />');
- $('#add-form').hide();
- $('#add-dialog').show();
- return false;
- });
- $(document).on('click','.btn-close',function () {
- Fast.api.close();
- })
- },
- edit: function () {
- Controller.api.bindevent();
- },
- select: function () {
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- index_url: 'referral/referral/index',
- },
- showColumns:false,
- showToggle:false,
- showExport:false,
- searchFormVisible: false,
- search:false,
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'id',
- sortName: 'id',
- columns: [
- [
- {checkbox: true},
- //{field: 'id', title: __('Id')},
- {field: 'source_url', title: '推广链接',formatter:Controller.api.source_url, operate:false},
- {field: 'entry_page', title: '入口页面',formatter:Controller.api.entry_page, operate:false},
- {field: 'book_id', title: __('Book_id'), visible:false},
- {field: 'book.name', title: '书籍名称', visible:false,operate: 'LIKE %...%'},
- {field: 'chapter_idx', title: __('Chapter_idx'), visible:false, operate:false},
- {field: 'admin_id', title: __('Admin_id'), visible:false, operate:false},
- {field: 'name', title: __('Name'), visible:false,operate: 'LIKE %...%'},
- {field: 'wx_type', title: __('Wx_type'), visible:false, searchList: {"wx_type 1":__('Wx_type 1'),"wx_type 2":__('Wx_type 2')}, operate:false},
- {field: 'wx_type_text', title: __('Wx_type'), visible:false, operate:false},
- {field: 'type', title: __('Type'), visible:false, searchList: {"type 1":'阅读页推广',"type 2":'首页推广'}},
- {field: 'type_text', title: __('Type'), visible:false, operate:false},
- {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'updatetime', title: __('Updatetime'), visible:false, operate:false, addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'operate', title: __('Operate'), events: {
- 'click .btn-chooseone': function (e, value, row, index) {
- Fast.api.close([row]);
- },
- }, formatter: function () {
- return '<a href="javascript:;" class="btn btn-danger btn-chooseone btn-xs"><i class="fa fa-check"></i> ' + __('Choose') + '</a>';
- }}
- ]
- ]
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- //获取选中数据
- $(document).on('click', "#btn-chooseone", function () {
- Fast.api.close(table.bootstrapTable('getSelections'));
- });
- },
- api: {
- formatter:{
- agent_text:function(value, row, index){
- var name = '';
- $.each( Config.adminExtend, function( key, val ) {
- if(row.admin_id == val.admin_id){
- name = val.card_holder;
- return ;
- }
- } );
- return name;
- },
- agent_select:function(){
- var data = {};
- $.each( Config.adminExtend, function( key, val ) {
- data[val.admin_id] = val.card_holder;
- } );
- return data;
- },
- },
- bindevent: function () {
- Form.api.bindevent($("form[role=form]"));
- },
- source_url: function (value, row, index) {
- var html = [];
- html.push((row.wx_type == 1 ? '<b>认证公众号</b>' : '<b>未认证公众号</b>'));
- if(Config.url_referral){
- value = Config.url_referral + '/t/' + row.id;
- }
- html.push('<div class="link_txt">公众号阅读原文必选</div><div class="url_text">' + value + ' <i class="fa fa-copy copy" data-clipboard-text="'+value+'"></i> <i class="fa fa-qrcode qrcode" data-qrcode="'+value+'"></i>');
- html.push('<a href="javascript:;" class="short_link_but">点击显示短链</a><div class="short_link"><strong>腾讯短链:</strong> ' + row.short_url_qq + ' <i class="fa fa-copy copy" data-clipboard-text="' + row.short_url_qq + '"></i> <i class="fa fa-qrcode qrcode" data-qrcode="'+row.short_url_qq+'"></i>');
- html.push('<strong>微博短链:</strong> ' + row.short_url_weibo + ' <i class="fa fa-copy copy" data-clipboard-text="' + row.short_url_weibo + '"></i> <i class="fa fa-qrcode qrcode" data-qrcode="'+row.short_url_weibo+'"></i></div></div>');
- return html.join('<br>');
- },
- entry_page: function (value, row, index) {
- var html = [];
- if(row.type == 1){
- html.push('<a href="/admin/referral/book/info?id='+row.book_id+'">'+row.book.name+'</a>');
- html.push(row.chapter_name);
- if (row.guide_chapter_idx) {
- html.push('关注章节:' + row.guide_chapter_idx);
- } else {
- html.push('关注章节:默认');
- }
- }else{
- html.push('书城首页推广');
- }
- return html.join('<br>');
- }
- }
- };
- }else{
- var Controller = {
- index: function () {
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- index_url: Config.referralUrl,
- add_url: 'referral/referral/add?type=2',
- export_url: 'referral/export',
- edit_url: 'referral/referral/edit',
- del_url: 'referral/referral/del',
- multi_url: 'referral/referral/multi',
- table: 'referral',
- },
- showColumns:false,
- showToggle:false,
- searchFormVisible: true,
- search:false,
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'id',
- sortName: 'id',
- columns: [
- [
- //{checkbox: true},
- //{field: 'id', title: 'ID'},
- {field: 'source_url', title: '推广链接',formatter:Controller.api.source_url, operate:false},
- {field: 'entry_page', title: '入口页面',formatter:Controller.api.entry_page, operate:false},
- {field: 'book_id', title: '书籍ID', visible:false},
- {field: 'book.name', title: '书籍名称', visible:false,operate: 'LIKE %...%'},
- {field: 'chapter_idx', title: '章节序号', visible:false, operate:false},
- {field: 'admin_id', title: __('Admin_id'), visible:false, operate:false},
- {field: 'name', title: __('Name'),operate: 'LIKE %...%'},
- {field: 'wx_type', title: __('Wx_type'), visible:false, searchList: {"wx_type 1":__('Wx_type 1'),"wx_type 2":__('Wx_type 2')}, operate:false},
- {field: 'wx_type_text', title: __('Wx_type'), visible:false, operate:false},
- {field: 'type', title: __('Type'), visible:false, searchList: {"type 1":'阅读页推广',"type 2":'首页推广'}, operate:false},
- {field: 'type_text', title: __('Type'), visible:false, operate:false},
- {field: 'uv', title: '累计阅读人数(今日阅读人数)', operate:false,formatter:function(value,row,index){
- return value+"("+row.dayuv+")";
- }},
- {field: 'follow', title: '累计关注人数(今日关注人数)', operate:false,formatter:function(value,row,index){
- return value+"("+row.dayut+")";
- }},
- {field: 'cost',title:'推广成本', operate:false},
- {field: 'money', title: '累计充值金额(今日充值金额)', operate:false,formatter:function(value,row,index){
- return value+"("+row.daymt+")";
- }},
- {field: 'createtime', title: '创建时间', operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'updatetime', title: '更新时间', visible:false, operate:false, addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'operate', title: '操作', table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate},
- {
- field: 'tongji', title: __("统计"), operate: false, formatter: function (value, row, index) {
- return '<a style="float:left;margin-left: 10%" href="/admin/orders/index?ids=' + row.id + '" class="btn btn-xs btn-success btn-editone book_but">订单详情</a>';
- }
- },
- ]
- ],
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- },
- lookagentreferral:function(){
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- look_url: "referral/referral/lookAgentReferral",
- table: 'referral',
- },
- showColumns:false,
- showToggle:false,
- searchFormVisible: true,
- search:false,
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.look_url,
- pk: 'id',
- sortName: 'id',
- columns: [
- [
- //{checkbox: true},
- //{field: 'id', title: 'ID'},
- {field: 'source_url', title: '推广链接',formatter:Controller.api.source_url, operate:false},
- {field: 'entry_page', title: '入口页面',formatter:Controller.api.entry_page, operate:false},
- {field: 'book_id', title: '书籍ID', visible:false},
- {field: 'book.name', title: '书籍名称', visible:false,operate: 'LIKE %...%'},
- {field: 'chapter_idx', title: '章节序号', visible:false, operate:false},
- {field: 'admin_id', title: '代理商',formatter: Controller.api.formatter.agent_text,searchList: Controller.api.formatter.agent_select()},
- {field: 'wx_type', title: __('Wx_type'), visible:false, searchList: {"wx_type 1":__('Wx_type 1'),"wx_type 2":__('Wx_type 2')}, operate:false},
- {field: 'wx_type_text', title: __('Wx_type'), visible:false, operate:false},
- {field: 'type', title: __('Type'), visible:false, searchList: {"type 1":'阅读页推广',"type 2":'首页推广'}, operate:false},
- {field: 'type_text', title: __('Type'), visible:false, operate:false},
- {field: 'uv', title: '阅读人数', operate:false},
- {field: 'follow', title: '关注人数', operate:false},
- {field: 'cost',title:'推广成本', operate:false},
- {field: 'money', title: '充值金额', operate:false},
- {field: 'createtime', title: '创建时间', operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'updatetime', title: '更新时间', visible:false, operate:false, addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'operate', title: '操作', table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate},
- {
- field: 'tongji', title: __("统计"), operate: false, formatter: function (value, row, index) {
- return '<a style="float:left;margin-left: 10%" href="/admin/orders/index?ids=' + row.id + '" class="btn btn-xs btn-success btn-editone book_but">订单详情</a>';
- }
- },
- ]
- ],
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- },
- add: function () {
- Form.api.bindevent($("form[role=form]"), function (data) {
- Toastr.success('添加成功');
- $('.url_txt').eq(0).text(data.jmp_url);
- $('.url_txt').eq(1).text(data.short_url_weibo);
- $('.url_txt').eq(2).text(data.short_url_qq);
- $('.copy').eq(0).attr('data-clipboard-text',data.jmp_url);
- $('.copy').eq(1).attr('data-clipboard-text',data.short_url_weibo);
- $('.copy').eq(2).attr('data-clipboard-text',data.short_url_qq);
- $('#erweima').html("");
- $('#erweima').qrcode(data.jmp_url);
- $('#erweima').html('<img style="display: block;margin: 0;padding: 0;border: 0;height: 160px;width: 160px;" src="' + $('#erweima canvas')[0].toDataURL("image/png") + '" />');
- $('#add-form').hide();
- $('#add-dialog').show();
- return false;
- });
- $(document).on('click','.btn-close',function () {
- Fast.api.close();
- })
- },
- edit: function () {
- Controller.api.bindevent();
- },
- select: function () {
- // 初始化表格参数配置
- Table.api.init({
- extend: {
- index_url: 'referral/referral/index',
- },
- showColumns:false,
- showToggle:false,
- showExport:false,
- searchFormVisible: false,
- search:false,
- });
- var table = $("#table");
- // 初始化表格
- table.bootstrapTable({
- url: $.fn.bootstrapTable.defaults.extend.index_url,
- pk: 'id',
- sortName: 'id',
- columns: [
- [
- {checkbox: true},
- // {field: 'id', title: __('Id')},
- {field: 'source_url', title: '推广链接',formatter:Controller.api.source_url, operate:false},
- {field: 'entry_page', title: '入口页面',formatter:Controller.api.entry_page, operate:false},
- {field: 'book_id', title: __('Book_id'), visible:false},
- {field: 'book.name', title: '书籍名称', visible:false,operate: 'LIKE %...%'},
- {field: 'chapter_idx', title: __('Chapter_idx'), visible:false, operate:false},
- {field: 'admin_id', title: __('Admin_id'), visible:false, operate:false},
- {field: 'name', title: __('Name'),operate: 'LIKE %...%'},
- {field: 'wx_type', title: __('Wx_type'), visible:false, searchList: {"wx_type 1":__('Wx_type 1'),"wx_type 2":__('Wx_type 2')}, operate:false},
- {field: 'wx_type_text', title: __('Wx_type'), visible:false, operate:false},
- {field: 'type', title: __('Type'), visible:false, searchList: {"type 1":'阅读页推广',"type 2":'首页推广'}, operate:false},
- {field: 'type_text', title: __('Type'), visible:false, operate:false},
- {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'updatetime', title: __('Updatetime'), visible:false, operate:false, addclass:'datetimerange', formatter: Table.api.formatter.datetime},
- {field: 'operate', title: __('Operate'), events: {
- 'click .btn-chooseone': function (e, value, row, index) {
- Fast.api.close([row]);
- },
- }, formatter: function () {
- return '<a href="javascript:;" class="btn btn-danger btn-chooseone btn-xs"><i class="fa fa-check"></i> ' + __('Choose') + '</a>';
- }}
- ]
- ]
- });
- // 为表格绑定事件
- Table.api.bindevent(table);
- //获取选中数据
- $(document).on('click', "#btn-chooseone", function () {
- Fast.api.close(table.bootstrapTable('getSelections'));
- });
- },
- api: {
- formatter:{
- agent_text:function(value, row, index){
- var name = '';
- $.each( Config.adminExtend, function( key, val ) {
- if(row.admin_id == val.admin_id){
- name = val.nickname;
- return ;
- }
- } );
- return name;
- },
- agent_select:function(){
- var data = {};
- $.each( Config.adminExtend, function( key, val ) {
- data[val.admin_id] = val.nickname;
- } );
- return data;
- },
- },
- bindevent: function () {
- Form.api.bindevent($("form[role=form]"));
- },
- source_url: function (value, row, index) {
- var html = [];
- html.push((row.wx_type == 1 ? '<b>认证公众号</b>' : '<b>未认证公众号</b>'));
- if(Config.url_referral){
- value = Config.url_referral + '/t/' + row.id;
- }else{
- value = row.url_referral;
- }
- html.push('<div class="link_txt">公众号阅读原文必选</div><div class="url_text">' + value + ' <i class="fa fa-copy copy" data-clipboard-text="'+value+'"></i> <i class="fa fa-qrcode qrcode" data-qrcode="'+value+'"></i>');
- html.push('<a href="javascript:;" class="short_link_but">点击显示短链</a><div class="short_link"><strong>腾讯短链:</strong> ' + row.short_url_qq + ' <i class="fa fa-copy copy" data-clipboard-text="' + row.short_url_qq + '"></i> <i class="fa fa-qrcode qrcode" data-qrcode="'+row.short_url_qq+'"></i>');
- html.push('<strong>微博短链:</strong> ' + row.short_url_weibo + ' <i class="fa fa-copy copy" data-clipboard-text="' + row.short_url_weibo + '"></i> <i class="fa fa-qrcode qrcode" data-qrcode="'+row.short_url_weibo+'"></i></div></div>');
- return html.join('<br>');
- },
- entry_page: function (value, row, index) {
- var html = [];
- if(row.type == 1){
- html.push('<a href="/admin/referral/book/info?id='+row.book_id+'">'+row.book.name+'</a>');
- html.push(row.chapter_name);
- if (row.guide_chapter_idx) {
- html.push('关注章节:' + row.guide_chapter_idx);
- } else {
- html.push('关注章节:默认');
- }
- }else{
- html.push('书城首页推广');
- }
- return html.join('<br>');
- }
- }
- };
- }
- return Controller;
- });
|