Kaynağa Gözat

Wesmiler OTC 提交更新 0729

APPLE 3 yıl önce
ebeveyn
işleme
8c1f01ddad
1 değiştirilmiş dosya ile 12 ekleme ve 0 silme
  1. 12 0
      app/Services/Api/AdvertService.php

+ 12 - 0
app/Services/Api/AdvertService.php

@@ -116,6 +116,18 @@ class AdvertService extends BaseService
     public function saveAdvert($userId)
     public function saveAdvert($userId)
     {
     {
         $params = request()->all();
         $params = request()->all();
+        $userInfo = MemberService::make()->getInfo($userId);
+        // 交易密码
+        $tradePassword = isset($params['trade_password']) ? trim($params['trade_password']) : '';
+        $password = isset($userInfo['trade_password']) ? trim($userInfo['trade_password']) : '';
+        if (empty($password)) {
+            return message(2005, false);
+        }
+
+        if (!$tradePassword || get_password($tradePassword . md5($tradePassword . 'otc')) != $password) {
+            return message(2016, false);
+        }
+
         $data = [
         $data = [
             'id'=> isset($params['id'])? $params['id'] : 0,
             'id'=> isset($params['id'])? $params['id'] : 0,
             'type'=> isset($params['type'])? $params['type'] : 1,
             'type'=> isset($params['type'])? $params['type'] : 1,