Mike před 7 roky
rodič
revize
f559e9afae

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

xqd
@@ -1,11 +1,11 @@
 (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://localhost:8092/',
+        imgServer: 'http://localhost:8092/attachment/'
         //server: 'http://miao.beiyuesi.com/',
         //imgServer: 'http://miao.beiyuesi.com/attachment/'
     });

+ 5 - 5
miaomiao/www/js/controllers/add.js

xqd xqd
@@ -6,8 +6,8 @@
                 common.chooseImage().then(function (img) { 
                     common.uploadFiles(img,1).then(function (result) {
                         var response = JSON.parse(result.response);
-                        var file = response.data.file;
-                        $scope.imgs.push(config.imgServer+file);
+                        var file = config.imgServer + response.data.file;
+                        $scope.imgs.push(file);
                     }, function (error) {
                         msg.error('图片上传失败');
                     });
@@ -20,10 +20,10 @@
                     $scope.video.path = file;
                     common.uploadFiles(file, 2).then(function (result) {
                         var response = JSON.parse(result.response);
-                        var file = response.data.file;
-                        console.log("file:"+config.imgServer+file);
+                        var file = config.imgServer+response.data.file;
+                        console.log("file:"+file);
                         $scope.video.isOK = true;
-                        $scope.video.server = config.imgServer+file;
+                        $scope.video.server = file;
                     }, function (error) {
                         msg.error('视频上传失败');
                     });

+ 8 - 9
miaomiao/www/js/controllers/my.js

xqd xqd
@@ -444,14 +444,15 @@
                 })
             }
         }]);
-    app.controller('my_account_addCtrl', ["$scope","common","$ionicTabsDelegate", "$state", "myService", "msg"
-        , function ($scope,common,$ionicTabsDelegate, $state, myService, msg) {
+    app.controller('my_account_addCtrl', ["$scope","config","common","$ionicTabsDelegate", "$state", "myService", "msg"
+        , function ($scope,config,common,$ionicTabsDelegate, $state, myService, msg) {
             $scope.addpict = function () {
                 common.chooseImage().then(function (img) {
                     common.uploadFiles(img,1).then(function (result) {
                         var response = JSON.parse(result.response);
-                        var file = response.data.file;
-                        $scope.imgs.push(config.imgServer+file);
+                        var file = config.imgServer+response.data.file;
+                        $scope.vm.file = file;
+                        $scope.imgs.push(file);
                     }, function (error) {
                         msg.error('图片上传失败');
                     });
@@ -493,16 +494,14 @@
             $scope.addQrcode = function(){
                 var data = {
                     data:{
-                        bank_name:$scope.vm.bank_name,
+                        type:$scope.vm.bank_name,
                         //bank_number:$scope.imgs
-                        bank_number:"https://www.baidu.com/img/bd_logo1.png"
+                        url:$scope.vm.file
                     }
                 };
                 myService.addQrcode(data).then(function(result){
                     msg.text("添加成功",true);
-                    $timeout(function () {
-                        $state.go("app.my_account");
-                    }, 1000);
+                    $state.go("app.my_account");
                 },function(error){
                     msg.error(error.data.message);
                 })

+ 1 - 1
miaomiao/www/js/services/httpinterceptor.js

xqd
@@ -36,7 +36,7 @@
                     storage.remove('token');
                     getHttp().defaults.headers.common["Authorization"] = undefined;
                     getState().go('login');
-                    alert("not login");
+                    // alert("not login");
                     return $q.reject(rejection);
                 }
                 if (rejection.status == 400) {

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

xqd
@@ -73,9 +73,11 @@ trait AttachmentHelper
                         ));
                         \Log::info($real_path);
                         $video = $ffmpeg->open($real_path);
+                        $pic = public_path() . '/upload/vpic/'.$md5_filename.'.jpg';
+                        \Log::info($pic);
                         $video
                             ->frame(\FFMpeg\Coordinate\TimeCode::fromSeconds(10))
-                            ->save( public_path() . '/upload/vpic/'.$md5_filename.'.jpg');
+                            ->save( $pic );
                     }
                     $attachment = new BaseAttachmentModel();
                     $attachment->name = $clientName;

+ 3 - 0
server/resources/views/admin/auth/login.blade.php

xqd
@@ -17,6 +17,9 @@
     <div class="middle-box text-center loginscreen  animated fadeInDown">
         <div>
             <div>
+                <div>
+                    <h1 class="logo-name">MM</h1>
+                </div>
                 <h3>管理后台</h3>
             </div>
             <form class="m-t" role="form" accept-charset="UTF-8" method="post">