Mike 7 лет назад
Родитель
Сommit
d7e507033b

+ 1 - 1
miaomiao/config.xml

xqd
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<widget id="com.miaomiao.app" version="0.1.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="com.miaomiao.app" version="0.1.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
     <name>瞄喵</name>
     <description>
         An Ionic Framework and Cordova project.

+ 2 - 2
miaomiao/www/js/config/config.js

xqd
@@ -1,8 +1,8 @@
 (function (app) {
     //全局配置 
     app.constant("config", {
-          // server: 'http://q8.9026.com/',
-           // imgServer: 'http://q8.9026.com/attachment/'
+        // server: 'http://q8.9026.com/',
+        // imgServer: 'http://q8.9026.com/attachment/'
         //server: 'http://localhost:8092/',
         //imgServer: 'http://localhost:8092/attachment/',
         server: 'http://miao.beiyuesi.com/',

+ 14 - 15
miaomiao/www/js/controllers/home.js

xqd xqd xqd xqd xqd
@@ -242,6 +242,8 @@
             $scope.$on('$ionicView.afterLeave', function () {
                 clearInterval(timerID);
                 timerID = null;
+                if($scope.multi.promise)$interval.cancel($scope.multi.promise);
+                if($scope.leftTimer)$interval.cancel($scope.leftTimer);
             });
             $scope.$on('$ionicView.beforeEnter', function () {
                 $scope.video = {};
@@ -273,10 +275,7 @@
                     //msg.error(msg.data.error)
                 })
             };
-            $scope.$on('$ionicView.leave', function () {
-                if($scope.multi.promise)$interval.cancel($scope.multi.promise);
-                if($scope.leftTimer)$interval.cancel($scope.leftTimer);
-            });
+            
             $scope.toSort = function(){
                 //$scope.type = 3;
                 $scope.changeType(3)
@@ -526,7 +525,7 @@
                 id:id,
                 title:$scope.vm.title,
                 pics:$scope.imgs,
-                video:$scope.video.file
+                video:$scope.video.server
             };
             homeService.add_interaction(data).then(function(){
                 $scope.load(id);
@@ -534,22 +533,22 @@
             })
         };
 
-            $scope.showAbout = true;
-            $scope.hideAbout = false;
-            $scope.showText = function(){
+        $scope.showAbout = true;
+        $scope.hideAbout = false;
+        $scope.showText = function(){
             $scope.aboutStyle = {
                 "white-space" : "normal"
               };
             $scope.showAbout = false;
             $scope.hideAbout = true;
         };
-            $scope.hideText = function(){
-                $scope.aboutStyle = {
-                    "white-space" : "nowrap"
-                };
-                $scope.showAbout = true;
-                $scope.hideAbout = false;
+        $scope.hideText = function(){
+            $scope.aboutStyle = {
+                "white-space" : "nowrap"
             };
+            $scope.showAbout = true;
+            $scope.hideAbout = false;
+        };
         $scope.input = {
             placeholder: '评论',
             focus: false,
@@ -761,7 +760,7 @@
                         $scope.video.server = response.data.file;
                         var file = config.imgServer+response.data.file;
                         $scope.video.isOK = true;
-                        $scope.video.file = response.data.file;
+                        $scope.video.file = file;
                         $scope.video.vpic = config.server+'upload/vpic/'+response.data.file+'.jpg';
                     }, function (error) {
                         //msg.error('视频上传失败');

+ 1 - 1
server/app/Helper/AttachmentHelper.php

xqd
@@ -20,7 +20,7 @@ trait AttachmentHelper
      * @param array $mimeType   文件mime类型限制,默认不限
      * @return array|string|int 返回:md5字串|ErrorCode或[md5字串|ErrorCode]
      */
-    public function uploadAttachment(Request $request, $key, $tag = 'files', $size = 10 * 1024 * 1024, array $mimeType = []) {
+    public function uploadAttachment(Request $request, $key, $tag = 'files', $size = 200 * 1024 * 1024, array $mimeType = []) {
         if ($request->hasFile($key)) {
             $rel_path = '/upload/' . $tag . '/' . date('Ymd');
             $path = public_path() . $rel_path;

+ 1 - 1
server/app/Http/Controllers/Api/V1/AttachmentController.php

xqd
@@ -101,7 +101,7 @@ class AttachmentController extends Controller
         }
 
         \Log::info($request);
-        $result = $this->uploadAttachment($request, $request->get('file'), $request->get('tag'), 50 * 1024 * 1024, [
+        $result = $this->uploadAttachment($request, $request->get('file'), $request->get('tag'), 200 * 1024 * 1024, [
             'image/jpeg',
             'image/png',
             'image/gif',

+ 1 - 1
server/app/Services/Base/Attachment.php

xqd
@@ -138,7 +138,7 @@ class Attachment
      */
 
 
-    public function localUpload($field, $request, $tag = 'files', $size = 2 * 1024 * 1024, array $mimeType = ['image/jpeg', 'image/png', 'image/gif']) {
+    public function localUpload($field, $request, $tag = 'files', $size = 200 * 1024 * 1024, array $mimeType = ['image/jpeg', 'image/png', 'image/gif']) {
         $tag = $request['folder'];
         $rel_path = $tag . '/' . date('Ymd');
         $path = public_path() . $rel_path;