bug修改

This commit is contained in:
wong
2025-09-28 18:06:18 +08:00
parent 9fa09bb743
commit a923615190
3 changed files with 19 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ Route::group('v1/', function () {
Route::group('content/', function () {
//素材管理
Route::group('material/', function () {
Route::get('all', 'app\chukebao\controller\ContentController@getAllMaterial');
Route::get('list', 'app\chukebao\controller\ContentController@getMaterial');
Route::post('add', 'app\chukebao\controller\ContentController@createMaterial');
Route::get('details', 'app\chukebao\controller\ContentController@detailsMaterial');

View File

@@ -11,6 +11,23 @@ use library\ResponseHelper;
class ContentController extends BaseController
{
//===================================================== 素材管理 =====================================================
public function getAllMaterial(){
$keyword = $this->request->param('keyword', '');
$userId = $this->getUserInfo('id');
$companyId = $this->getUserInfo('companyId');
$query = Material::where(['userId' => $userId,'companyId' => $companyId,'isDel' => 0,'status' => 1])
->field('id,title,cover')
->order('id desc');
$list = $query->select()->toArray();
return ResponseHelper::success($list);
}
/**
* 素材列表
* @return \think\response\Json

View File

@@ -73,7 +73,7 @@ class FollowUpController extends BaseController
if (empty($title) || empty($reminderTime) || empty($description) || empty($friendId)){
return ResponseHelper::error('参数缺失');
}
$friend = Db::name('wechat_friendship')->where(['id' => $friendId])->find();
$friend = Db::table('s2_wechat_friend')->where(['id' => $friendId])->find();
if (empty($friend)) {
return ResponseHelper::error('好友不存在');
}