更新小程序版本
This commit is contained in:
parent
48a14dd3fd
commit
b933817640
@ -1361,24 +1361,15 @@ class Auth extends BaseController
|
||||
}
|
||||
|
||||
//获取APP菜单
|
||||
public function appMenu()
|
||||
public function miniAppVersion()
|
||||
{
|
||||
$menuList = Db::name('app_menu')->where('is_show', 1)->where('is_disable', 0)->field(['id', 'pid', 'name', 'icon', 'sort', 'paths'])->order('sort', 'asc')->select()->toArray();
|
||||
|
||||
$menuData = [];
|
||||
foreach($menuList as $n) {
|
||||
if ($n['pid'] == 0) {
|
||||
$menuData[] = $n;
|
||||
}
|
||||
$version = $this->request->param('version', '');
|
||||
$queryBuilder = Db::name('miniapp_update');
|
||||
if ($version) {
|
||||
$queryBuilder = $queryBuilder->where('version', '>', $version);
|
||||
}
|
||||
foreach($menuData as $k=>$v) {
|
||||
foreach($menuList as $ml) {
|
||||
if ($v['id'] == $ml['pid']) {
|
||||
$menuData[$k]['children'][] = $ml;
|
||||
}
|
||||
}
|
||||
}
|
||||
return app('json')->success($menuData);
|
||||
$appInfo = $queryBuilder->order('version', 'desc')->fetchSql(false)->find();
|
||||
return app('json')->success(compact('appInfo'));
|
||||
}
|
||||
|
||||
//根据street_id获取商户信息
|
||||
|
@ -33,7 +33,7 @@ Route::group('api/', function () {
|
||||
Route::get('region/:street_id/merchant', 'api.Auth/regionMerchant');
|
||||
Route::get('region/goods', 'api.Auth/goodsStatistics');
|
||||
Route::get('global/config', 'api.Auth/globalConfig');
|
||||
Route::get('app/menu', 'api.Auth/appMenu');
|
||||
Route::get('miniapp/version', 'api.Auth/miniAppVersion');
|
||||
Route::resource('upload', 'api.Upload');
|
||||
Route::post('articleCatch', 'api.Upload/article');
|
||||
//强制登录
|
||||
|
Loading…
x
Reference in New Issue
Block a user