定版之后bug修改----抽奖重构。
This commit is contained in:
@@ -593,10 +593,10 @@ class Activities extends adminApi
|
||||
$lists[$key]['gift_id'] = $value['foreign_id'];
|
||||
$lists[$key]['gift_name'] = $value['name'];
|
||||
$gift_data = db::name('vs_gift')->where(['gid' => $value['foreign_id']])->find();
|
||||
$lists[$key]['base_image'] = $gift_data['base_image'];
|
||||
$lists[$key]['base_image'] = $gift_data['base_image']??"";
|
||||
$lists[$key]['quantity'] = $value['quantity'];
|
||||
$lists[$key]['quantity_str'] = $value['quantity']."个";
|
||||
$lists[$key]['gift_price'] = $gift_data['gift_price'];
|
||||
$lists[$key]['gift_price'] = $gift_data['gift_price']?? "";
|
||||
}elseif ($value['type'] == 3){
|
||||
$lists[$key]['gift_id'] = $value['foreign_id'];
|
||||
$lists[$key]['gift_name'] = $value['name'];
|
||||
|
||||
@@ -159,7 +159,7 @@ class Underage extends adminApi
|
||||
*/
|
||||
public function content_List(){
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('pageSize', 30);
|
||||
$page_limit = input('page_limit', 10);
|
||||
$search_name = input('search_name', '');
|
||||
$where = [];
|
||||
if($search_name){
|
||||
@@ -167,6 +167,7 @@ class Underage extends adminApi
|
||||
}
|
||||
$list = DB::name('vs_underage_mode_content')->where($where)->order('sort,id', 'asc')->page($page, $page_limit)->select();
|
||||
$count = DB::name('vs_underage_mode_content')->where($where)->count();
|
||||
$return_lists = [];
|
||||
foreach ($list as $key => $value) {
|
||||
$return_lists[$key]['id'] = $value['id'];
|
||||
$return_lists[$key]['type_id'] = $value['type_id'];
|
||||
@@ -266,7 +267,7 @@ class Underage extends adminApi
|
||||
$type_id = input('type_id', '');
|
||||
$title = input('title', '');
|
||||
$introduced = input('introduced', '');
|
||||
$content = input('content', '');
|
||||
$content = $_POST['content']??"";
|
||||
$url = input('url', '');
|
||||
$img = input('img', '');
|
||||
$from = input('from', 1);
|
||||
@@ -303,9 +304,6 @@ class Underage extends adminApi
|
||||
$data['content'] = $content;
|
||||
}
|
||||
$result = db::name('vs_underage_mode_content')->where(['id'=>$id])->update($data);
|
||||
if(!$result){
|
||||
return V(0,"修改失败");
|
||||
}
|
||||
return V(1,"成功", ['id'=>$id]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user