lizhen_gitee 4 місяців тому
батько
коміт
60d7ceca13

+ 1 - 1
application/admin/view/votesubject/add.html

@@ -55,7 +55,7 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Rules')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <textarea id="c-rules" class="form-control " rows="5" name="row[rules]" cols="50"></textarea>
+            <textarea id="c-rules" class="form-control editor" rows="5" name="row[rules]" cols="50"></textarea>
         </div>
     </div>
     <div class="form-group">

+ 1 - 1
application/admin/view/votesubject/edit.html

@@ -55,7 +55,7 @@
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Rules')}:</label>
         <div class="col-xs-12 col-sm-8">
-            <textarea id="c-rules" class="form-control " rows="5" name="row[rules]" cols="50">{$row.rules|htmlentities}</textarea>
+            <textarea id="c-rules" class="form-control editor" rows="5" name="row[rules]" cols="50">{$row.rules|htmlentities}</textarea>
         </div>
     </div>
     <div class="form-group">

+ 1 - 1
application/api/controller/Sms.php

@@ -26,7 +26,7 @@ class Sms extends Api
     {
         $mobile = $this->request->post("mobile");
         $event = $this->request->post("event");
-        $event = $event ? $event : 'register';
+        $event = 'default';
 
         if (!$mobile || !\think\Validate::regex($mobile, "^1\d{10}$")) {
             $this->error(__('手机号不正确'));

+ 15 - 5
application/api/controller/Subject.php

@@ -7,6 +7,7 @@ use think\Db;
 use think\cache;
 use app\utils\RedisKeyEnum;
 use app\utils\RedisUtil;
+use Exception;
 /**
  * 投票
  */
@@ -85,12 +86,21 @@ class Subject extends Api
         }*/
 
         //获取播放地址和秒数
-        $videoVod = new \app\common\library\Video();
-        $video_PlayInfo = $videoVod->getPlayInfo($info['vodid']);
-        $video_PlayInfo = $video_PlayInfo->PlayInfoList->PlayInfo;
+        $info['video_file']    = '';
+        $info['video_seconds'] = 0;
 
-        $info['video_file'] = $video_PlayInfo[0]->PlayURL;
-        $info['video_seconds'] = ceil($video_PlayInfo[0]->Duration);
+        if(!empty($info['vodid'])){
+            try{
+                $videoVod = new \app\common\library\Video();
+                $video_PlayInfo = $videoVod->getPlayInfo($info['vodid']);
+                $video_PlayInfo = $video_PlayInfo->PlayInfoList->PlayInfo;
+
+                $info['video_file'] = $video_PlayInfo[0]->PlayURL;
+                $info['video_seconds'] = ceil($video_PlayInfo[0]->Duration);
+            }catch(Exception $e){
+
+            }
+        }
 
         //名次
         /*$players = Db::name('vote_player')->where(['subject_id'=>$info['subject_id'],'status'=>1])->order('votes desc,id desc')->column('id,votes');

+ 1 - 1
application/index/controller/Index.php

@@ -14,7 +14,7 @@ class Index extends Controller
 
     public function index()
     {
-        $this->redirect('/admin.php');
+        $this->redirect('/h5');
     }
 
 }