lizhen пре 2 дана
родитељ
комит
4f652ac7d5
3 измењених фајлова са 59 додато и 1 уклоњено
  1. 1 0
      .gitignore
  2. 1 1
      application/api/controller/Hexiao.php
  3. 57 0
      public/assets/js/backend/news.js

+ 1 - 0
.gitignore

@@ -13,3 +13,4 @@ node_modules
 /public/*.htaccess
 /public/*.htaccess
 /public/nginx.htaccess
 /public/nginx.htaccess
 新建文件夹
 新建文件夹
+/application/extra/keyworld.php

+ 1 - 1
application/api/controller/Hexiao.php

@@ -32,7 +32,7 @@ class Hexiao extends Api
             $this->error('不存在的订单');
             $this->error('不存在的订单');
         }
         }
         if($order_info['status'] != 1){
         if($order_info['status'] != 1){
-            $this->error('非正常的订单');
+            $this->error('该订单已取消');
         }
         }
         if($order_info['have_paid'] == 0){
         if($order_info['have_paid'] == 0){
             $this->error('未支付的订单');
             $this->error('未支付的订单');

+ 57 - 0
public/assets/js/backend/news.js

@@ -0,0 +1,57 @@
+define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
+
+    var Controller = {
+        index: function () {
+            // 初始化表格参数配置
+            Table.api.init({
+                extend: {
+                    index_url: 'news/index' + location.search,
+                    add_url: 'news/add',
+                    edit_url: 'news/edit',
+                    // del_url: 'news/del',
+                    multi_url: 'news/multi',
+                    import_url: 'news/import',
+                    table: 'news',
+                }
+            });
+
+            var table = $("#table");
+
+            // 初始化表格
+            table.bootstrapTable({
+                url: $.fn.bootstrapTable.defaults.extend.index_url,
+                pk: 'id',
+                sortName: 'id',
+                search: false,
+                columns: [
+                    [
+                        {checkbox: true},
+                        {field: 'id', title: __('Id')},
+                        {field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+                        {field: 'key', title: __('Key'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+                        {field: 'video_file', title: __('Video_file'), operate: false, formatter: Table.api.formatter.video},
+                        // {field: 'content', title: __('Content')},
+                        {field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+                        {field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                    ]
+                ]
+            });
+
+            // 为表格绑定事件
+            Table.api.bindevent(table);
+        },
+        add: function () {
+            Controller.api.bindevent();
+        },
+        edit: function () {
+            Controller.api.bindevent();
+        },
+        api: {
+            bindevent: function () {
+                Form.api.bindevent($("form[role=form]"));
+            }
+        }
+    };
+    return Controller;
+});