Mike 8 năm trước cách đây
mục cha
commit
443c4ef9c9

+ 14 - 12
miaomiao/www/js/controllers/add.js

xqd
@@ -13,18 +13,20 @@
             $scope.closeModal = function () {
                 $scope.modal.hide();
             };
-            $scope.vm={
-                dream:'',
-                about:'',
-                money:""
-            };
-            $scope.imgServer = config.imgServer;
-            $scope.imgs = [];
-            $scope.video = {
-                isOK: false,
-                path: '',
-                server:''
-            };
+            $scope.$on('$ionicView.beforeEnter', function () {
+                $scope.vm={
+                    dream:'',
+                    about:'',
+                    money:''
+                };
+                $scope.imgServer = config.imgServer;
+                $scope.imgs = [];
+                $scope.video = {
+                    isOK: false,
+                    path: '',
+                    server:''
+                };
+            });
             
             $scope.addpict = function () {
                 common.chooseImage().then(function (img) {

+ 11 - 1
miaomiao/www/templates/home/dream-detail.html

xqd xqd
@@ -19,6 +19,11 @@
         </div>
         <div class="icontent" ng-if="type==1">
             <ion-slides slider="data.slider">
+                <ion-slide-page ng-if="dream.video">
+                    <div class="box banner"> 
+                        <video ng-src="{{dream.video}}" class="centerme" controls="controls" autoplay></video>
+                    </div>  
+                </ion-slide-page>
                 <ion-slide-page>
                     <div class="box banner"><img ng-src="img/demo/pict.png" /></div>
                 </ion-slide-page>
@@ -81,7 +86,12 @@
         <div ng-if="type==2" class="hdcontent">
             <div style="border-bottom:5px solid #FAF2F5;">
                 <div class="list">
-                    <div class="item">
+                    <div class="item itemjs" style="padding: 10px">
+                        <a class="button button-outline button-block button-calm button-icon" ng-click="openModal()">
+                        <i class="icon ion-plus"></i>
+                        发布梦想动态</a>
+                    </div>
+                    <div class="item"> 
                         <img class="head" src="../../img/demo/head2.jpg" />
                         <span class="utitle">喵喵喵酱</span>
                         <span class="utitle kz">剩余5天</span>

+ 1 - 1
server/database/migrations/2017_06_15_082636_add_column_video_to_dream_info_table.php

xqd
@@ -14,7 +14,7 @@ class AddColumnVideoToDreamInfoTable extends Migration
     public function up()
     {
         Schema::table('dream_info', function (Blueprint $table) {
-            $table->string('video')->comment('梦想视频地址')->default('')->after('about');
+            $table->string('video')->comment('梦想视频地址')->nullable()->after('about');
         });
     }