Browse Source

Merge remote-tracking branch 'origin/yuenan' into yuenan

yuenan
xubinxcode 3 years ago
parent
commit
8dfdba9c2d
2 changed files with 51 additions and 1 deletions
  1. +11
    -1
      addons/unishop/controller/Order.php
  2. +40
    -0
      application/admin/model/OrderLog.php

+ 11
- 1
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;
@@ -39,7 +40,7 @@ class Order extends Base
*/
protected $frequently = ['getorders'];

protected $noNeedLogin = ['count','create','submit'];
protected $noNeedLogin = ['count','create','submit','submitbar'];

/**
* 创建订单
@@ -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