|
|
@@ -60,7 +60,9 @@ class IndexController extends webApp
|
|
|
}
|
|
|
|
|
|
# 用户充值协议
|
|
|
- $rechargeAgree = ArticleService::make()->getInfo(3);
|
|
|
+ $locale = RedisService::get("stores:locale:lang_{$this->userId}");
|
|
|
+ $locale = $locale? $locale : session('locale_lang');
|
|
|
+ $rechargeAgree = ArticleService::make()->getInfo(3, $this->userId);
|
|
|
$rechargeAgree = isset($rechargeAgree['content'])? $rechargeAgree['content'] : '';
|
|
|
$config = [
|
|
|
'app_name' => ConfigService::make()->getConfigByCode('app_name'),
|
|
|
@@ -76,6 +78,7 @@ class IndexController extends webApp
|
|
|
'recharge_agree' => $rechargeAgree,
|
|
|
'xd_price' => $xdPrice,
|
|
|
'rechargeMeals'=> $meals,
|
|
|
+ 'lang'=> $locale,
|
|
|
];
|
|
|
RedisService::set($cacheKey, $config, 7200);
|
|
|
}
|
|
|
@@ -89,14 +92,6 @@ class IndexController extends webApp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 物流公司
|
|
|
- * @return array
|
|
|
- */
|
|
|
- public function express()
|
|
|
- {
|
|
|
- return showJson(1010, true, config('express'));
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 验证APP更新
|
|
|
@@ -123,42 +118,4 @@ class IndexController extends webApp
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 直播参数
|
|
|
- * @return array
|
|
|
- */
|
|
|
- public function liveConfig()
|
|
|
- {
|
|
|
- $userId = request()->post('user_id', 0);
|
|
|
- $roomId = request()->post('room_id', 0);
|
|
|
- $refresh = request()->post('refresh', 0);
|
|
|
- return showJson(1010, true);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public function noticeCount()
|
|
|
- {
|
|
|
- $noticeUid = request()->post('id',0);
|
|
|
- $userId = request()->post('uid',0);
|
|
|
- $userType = request()->post('type',0);
|
|
|
- return message(1010, true, []);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 验证视频通话剩余时长
|
|
|
- * @return array
|
|
|
- */
|
|
|
- public function checkChat()
|
|
|
- {
|
|
|
- $toUserId = request()->post('to_user_id', 0);
|
|
|
- $fromUserId = request()->post('from_user_id', 0);
|
|
|
- $type = request()->post('type', 2);
|
|
|
- $data = ImChatService::make()->checkChat($fromUserId, $toUserId, $type);
|
|
|
- $config = ConfigService::make()->getConfigByCode('chat_buy_time_money');
|
|
|
- $config = $config ? explode('/', $config) : [];
|
|
|
- $money = isset($config[0]) && $config[0] > 0 ? $config[0] : 10;
|
|
|
- $num = isset($config[1]) && $config[1] > 0 ? $config[1] : 5;
|
|
|
- $tips = "抱歉您的免费时长已经用完,请先余额支付【{$money}元】购买【{$num}分钟】聊天时长再使用视频聊天服务。";
|
|
|
- return message(1010, true, ['time' => $data, 'tips' => $tips]);
|
|
|
- }
|
|
|
}
|