海报小程序相关代码提交
This commit is contained in:
@@ -100,4 +100,17 @@ Route::group('v1/', function () {
|
||||
});
|
||||
})->middleware(['jwt']);
|
||||
|
||||
|
||||
|
||||
Route::group('v1/frontend', function () {
|
||||
|
||||
Route::group('business/poster', function () {
|
||||
Route::get('getone', 'app\cunkebao\controller\plan\PosterWeChatMiniProgram@getPosterTaskData');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return [];
|
||||
@@ -419,7 +419,7 @@ class ContentLibraryController extends Controller
|
||||
|
||||
// 查询数据
|
||||
$list = ContentItem::where($where)
|
||||
->order('createTime', 'desc')
|
||||
->order('createMomentTime DESC,createTime DESC')
|
||||
->page($page, $limit)
|
||||
->select();
|
||||
|
||||
@@ -763,7 +763,6 @@ class ContentLibraryController extends Controller
|
||||
$where = [
|
||||
['isDel', '=', 0], // 未删除
|
||||
['status', '=', 1], // 已开启
|
||||
['id', '=', 27]
|
||||
];
|
||||
|
||||
// 查询符合条件的内容库
|
||||
@@ -1405,10 +1404,10 @@ class ContentLibraryController extends Controller
|
||||
$coverImage = $resUrls[0];
|
||||
}
|
||||
|
||||
// 判断内容类型 (0=未知, 1=图片, 2=链接, 3=视频, 4=文本, 5=小程序, 6=图文)
|
||||
// 判断内容类型 (0=未知, 1=图片, 2=链接, 3=视频, 4=文本, 5=小程序)
|
||||
if($moment['type'] == 1) {
|
||||
//图文
|
||||
$contentType = 6;
|
||||
$contentType = 1;
|
||||
}elseif ($moment['type'] == 3){
|
||||
//链接
|
||||
$contentType = 2;
|
||||
|
||||
@@ -21,25 +21,31 @@ class GetChatroomListV1Controller extends BaseController
|
||||
$limit = $this->request->param('limit', 20);
|
||||
$keyword = $this->request->param('keyword', '');
|
||||
try {
|
||||
|
||||
$wechatIds = Db::name('device')->alias('d')
|
||||
->join('device_wechat_login dwl','dwl.deviceId=d.id AND dwl.companyId='.$this->getUserInfo('companyId'))
|
||||
->where(['d.companyId' => $this->getUserInfo('companyId'),'d.deleteTime' => 0])
|
||||
->column('dwl.wechatId');
|
||||
|
||||
|
||||
$where = [];
|
||||
if ($this->getUserInfo('isAdmin') == 1) {
|
||||
$where[] = ['g.companyId', '=', $this->getUserInfo('companyId')];
|
||||
$where[] = ['g.deleteTime', '=', 0];
|
||||
$where[] = ['g.ownerWechatId', 'in', $wechatIds];
|
||||
} else {
|
||||
$where[] = ['g.companyId', '=', $this->getUserInfo('companyId')];
|
||||
$where[] = ['g.deleteTime', '=', 0];
|
||||
$where[] = ['g.ownerWechatId', 'in', $wechatIds];
|
||||
//$where[] = ['g.userId', '=', $this->getUserInfo('id')];
|
||||
}
|
||||
|
||||
if(!empty($keyword)){
|
||||
$where[] = ['g.name', 'like', '%'.$keyword.'%'];
|
||||
}
|
||||
|
||||
|
||||
$data = WechatChatroom::alias('g')
|
||||
->field(['g.id', 'g.chatroomId', 'g.name', 'g.avatar','g.ownerWechatId', 'g.identifier', 'g.createTime',
|
||||
'wa.nickname as ownerNickname','wa.avatar as ownerAvatar','wa.alias as ownerAlias'])
|
||||
->Join('wechat_account wa', 'g.ownerWechatId = wa.wechatId', 'LEFT')
|
||||
->join('wechat_account wa', 'g.ownerWechatId = wa.wechatId', 'LEFT')
|
||||
->where($where);
|
||||
|
||||
$total = $data->count();
|
||||
|
||||
@@ -16,9 +16,8 @@ class PosterWeChatMiniProgram extends Controller
|
||||
}
|
||||
|
||||
const MINI_PROGRAM_CONFIG = [
|
||||
'app_id' => 'wx12345678',
|
||||
'secret' => 'your-app-secret',
|
||||
|
||||
'app_id' => 'wx789850448e26c91d',
|
||||
'secret' => 'd18f75b3a3623cb40da05648b08365a1',
|
||||
'response_type' => 'array'
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user