|
|
@@ -117,15 +117,15 @@ class AdClass extends BaseClass
|
|
|
//开店广告初始化 shish 2020.2.14
|
|
|
public static function initAdd($merchantId)
|
|
|
{
|
|
|
+ $time = time();
|
|
|
$list = [
|
|
|
- '培训图' => '/example/mall/1.jpg',
|
|
|
- '花礼' => '/example/mall/2.jpg',
|
|
|
- '花艺' => '/example/mall/3.jpg',
|
|
|
+ ['adName' => '培训图', 'adImg' => '/example/mall/1.jpg', 'type' => 0, 'startTime' => 0, 'endTime' => 4102416000, 'addTime' => $time, 'merchantId' => $merchantId, 'status' => 1],
|
|
|
+ ['adName' => '花礼', 'adImg' => '/example/mall/2.jpg', 'type' => 0, 'startTime' => 0, 'endTime' => 4102416000, 'addTime' => $time, 'merchantId' => $merchantId, 'status' => 1],
|
|
|
+ ['adName' => '花艺', 'adImg' => '/example/mall/3.jpg', 'type' => 0, 'startTime' => 0, 'endTime' => 4102416000, 'addTime' => $time, 'merchantId' => $merchantId, 'status' => 1],
|
|
|
+ ['adName' => '门店图片', 'adImg' => '/example/shop/1.jpg', 'type' => 1, 'startTime' => 0, 'endTime' => 4102416000, 'addTime' => $time, 'merchantId' => $merchantId, 'status' => 1],
|
|
|
];
|
|
|
- $time = time();
|
|
|
- foreach ($list as $name => $img) {
|
|
|
- $data = ['adName' => $name, 'url' => $img, 'type' => 0, 'startTime' => 0, 'endTime' => 4102416000, 'addTime' => $time, 'merchantId' => $merchantId];
|
|
|
- self::add($data);
|
|
|
+ foreach ($list as $val) {
|
|
|
+ self::add($val);
|
|
|
}
|
|
|
}
|
|
|
|