Browse Source

checkredis

undefined
娄梦宁 4 years ago
parent
commit
8f13fa9790
2 changed files with 9 additions and 0 deletions
  1. +5
    -0
      addons/unishop/controller/Category.php
  2. +4
    -0
      addons/unishop/controller/Order.php

+ 5
- 0
addons/unishop/controller/Category.php View File

@@ -2,6 +2,7 @@

namespace addons\unishop\controller;

use addons\unishop\model\Config;
use app\common\controller\Api;

class Category extends Api
@@ -21,6 +22,10 @@ class Category extends Api
* 全部分类数据
*/
public function all(){
$activityTime=Config::getByName('activity_time')['value'];
if (strtotime($activityTime)<time()){
$this->error(__('Activity is end'));
}
$all = $this->model
->where('type','product')
->where('status','normal')


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

@@ -48,6 +48,10 @@ class Order extends Base
*/
public function create()
{
$activityTime=Config::getByName('activity_time')['value'];
if (strtotime($activityTime)<time()){
$this->error(__('Activity is end'));
}
$productId = $this->request->post('id', 0);

try {


Loading…
Cancel
Save