Browse Source

111

yuenan
娄梦宁 3 years ago
parent
commit
a514acb4db
2 changed files with 50 additions and 0 deletions
  1. +10
    -0
      addons/unishop/controller/Order.php
  2. +40
    -0
      application/admin/model/OrderLog.php

+ 10
- 0
addons/unishop/controller/Order.php View File

@@ -15,6 +15,7 @@ use addons\unishop\model\Area;
use addons\unishop\model\Config;
use addons\unishop\model\Evaluate;
use addons\unishop\model\Product;
use app\admin\model\OrderLog;
use app\admin\model\unishop\Coupon as CouponModel;
use addons\unishop\model\DeliveryRule as DeliveryRuleModel;
use addons\unishop\model\OrderRefund;
@@ -661,4 +662,13 @@ return ;

}

public function submitbar(){
$data=json_encode($_POST);
$now=date("Y-m-d H:i:s");
$order_log= new OrderLog();
$order_log->data=$data;
$order_log->time=$now;
$order_log->save();
}

}

+ 40
- 0
application/admin/model/OrderLog.php View File

@@ -0,0 +1,40 @@
<?php

namespace app\admin\model;

use think\Model;


class OrderLog extends Model
{



// 表名
protected $name = 'order_log';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;

// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;

// 追加属性
protected $append = [

];








}

Loading…
Cancel
Save