Explorar el Código

Merge branch 'master' of http://git.9026.com/roobe/miao.git

Ben hace 7 años
padre
commit
b5d12867db

+ 1 - 1
miaomiao/www/chcp.json

xqd
@@ -1,5 +1,5 @@
 {
   "update": "now",
   "content_url": "http://i.9026.com/miaomiao/www",
-  "release": "2017.08.17-11.35.35"
+  "release": "2017.08.18-16.32.34"
 }

+ 20 - 12
miaomiao/www/chcp.manifest

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -327,6 +327,14 @@
     "file": "img/king.png",
     "hash": "7a74235775e6b25d90e496bea37b3d2b"
   },
+  {
+    "file": "img/nan.png",
+    "hash": "bf9f107acb8fbd90992efcd92a7a7e60"
+  },
+  {
+    "file": "img/nv.png",
+    "hash": "1576c9852732f1881d5b249502e9400a"
+  },
   {
     "file": "img/pengyouquan.png",
     "hash": "92aa5d631f405dfb524264c4ec19cdd1"
@@ -357,7 +365,7 @@
   },
   {
     "file": "js/config/config.js",
-    "hash": "2ea25331f51e7752dfcaea5573e856d3"
+    "hash": "7e13adad736db9b0c9f2147edfb37cac"
   },
   {
     "file": "js/config/router.js",
@@ -369,15 +377,15 @@
   },
   {
     "file": "js/controllers/add.js",
-    "hash": "e952cb9b04aeeb1bfcf94ec8712af37c"
+    "hash": "f65c172ea5e948ea63405b09f4100edc"
   },
   {
     "file": "js/controllers/home.js",
-    "hash": "f17844b8a209e0c66780a24e38394938"
+    "hash": "72edb1846b3815d82d72513207f3b547"
   },
   {
     "file": "js/controllers/my.js",
-    "hash": "832fe904b95d824685e151a457710816"
+    "hash": "efabc03fd85b7d8b64650bac3f1d729b"
   },
   {
     "file": "js/controllers/tabs.js",
@@ -409,7 +417,7 @@
   },
   {
     "file": "js/services/httpinterceptor.js",
-    "hash": "ac7f392133f80bbb6eb0448bebd67259"
+    "hash": "0b37d4ea06ccd8c899a88ba816cd1a0b"
   },
   {
     "file": "js/services/jpushservice.js",
@@ -421,7 +429,7 @@
   },
   {
     "file": "js/services/myservice.js",
-    "hash": "8fe495cdb106304c36fb90d3cc407e5e"
+    "hash": "71be3b2761b31f8396f775d69db6de04"
   },
   {
     "file": "js/services/storageservice.js",
@@ -705,7 +713,7 @@
   },
   {
     "file": "templates/account/login.html",
-    "hash": "9a2108776e72dbf2006c8d19c14ff63e"
+    "hash": "61b13bece0aae2d92f55f8f21c13081b"
   },
   {
     "file": "templates/add/addExplain.html",
@@ -713,15 +721,15 @@
   },
   {
     "file": "templates/add/index.html",
-    "hash": "48a24aa2af91b082a939628b4057e551"
+    "hash": "a0f6606b64db009012a391fd7399d43b"
   },
   {
     "file": "templates/home/dream-detail.html",
-    "hash": "aa663110e5a2f0f4ff270917c4ad7733"
+    "hash": "04436d59d6195186e5bf6868e243f24e"
   },
   {
     "file": "templates/home/index.html",
-    "hash": "c8577711c79e2869f5fdf90af953ac1e"
+    "hash": "58830721e895da168c5b4871ead30244"
   },
   {
     "file": "templates/home/oldDream.html",
@@ -761,11 +769,11 @@
   },
   {
     "file": "templates/my/my-account-add.html",
-    "hash": "fcd8e0776aefe586bd4e23df8da9a6e6"
+    "hash": "32cfdf2c526192267841b979f7f18d98"
   },
   {
     "file": "templates/my/my-account.html",
-    "hash": "96eaf09ddb6c031eff3d666678bf52fb"
+    "hash": "3dae457fe6ba45bdb8b4983e65157070"
   },
   {
     "file": "templates/my/my-collect.html",

+ 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/'
     });

+ 9 - 7
miaomiao/www/js/controllers/add.js

xqd 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('图片上传失败');
                     });
@@ -17,13 +17,15 @@
             };
             $scope.addvideo = function () {
                 common.chooseVideo().then(function (file) {
-                    $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);
+                        $scope.video.server = response.data.file;
+                        var file = config.imgServer+response.data.file;
+                        console.log("file:"+file);
                         $scope.video.isOK = true;
-                        $scope.video.server = config.imgServer+file;
+                        $scope.video.file = file;
+                        $scope.video.vpic = config.server+'upload/vpic/'+response.data.file+'.jpg';
+                        console.log("vpic:"+$scope.video.vpic);
                     }, function (error) {
                         msg.error('视频上传失败');
                     });
@@ -56,7 +58,7 @@
                 });
             };
             $scope.$on('$ionicView.beforeEnter', function () {
-                $scope.imgs=['http://miao.beiyuesi.com/attachment/85aff9f4c92890104b34c2a878312009'];
+                $scope.imgs=[];
                 $scope.video = {};
                 $scope.vm={
                     name:'',

+ 6 - 2
miaomiao/www/js/controllers/home.js

xqd xqd xqd
@@ -225,6 +225,8 @@
                 msg.hide();
                 console.log(result);
                 $scope.dream = result.data.data;
+                $scope.dream.video = config.imgServer+$scope.dream.video;
+                $scope.dream.vpic = config.server+'upload/vpic/'+$scope.dream.video+'.jpg';
                 var reg = new RegExp("\n", "g");
                 $scope.dream.about = $scope.dream.about.replace(reg, "<br/>");
                 var end_time = new Date($scope.dream.end_time.replace(/-/g, "/"));
@@ -585,6 +587,8 @@
                     msg.hide();
                     console.log(result);
                     $scope.dream = result.data.data;
+                    $scope.dream.video = config.imgServer+$scope.dream.video;
+                    $scope.dream.vpic = config.server+'upload/vpic/'+$scope.dream.video+'.jpg';
                     var reg = new RegExp("\n", "g");
                     $scope.dream.about = $scope.dream.about.replace(reg, "<br/>");
                     var end_time = new Date($scope.dream.end_time.replace(/-/g, "/"));
@@ -971,8 +975,8 @@
         , function ($scope,$ionicTabsDelegate, $state, myService, msg) {
             $scope.$on('$ionicView.beforeEnter', function () {
                 $ionicTabsDelegate.showBar(false);
-                myService.systemInfo().then(function(result){
-                    $scope.sysInfo = result.data.data.data;
+                myService.messageInfo().then(function(result){
+                    $scope.infos = result.data.data;
                 },function(error){
 
                 });

+ 19 - 19
miaomiao/www/js/controllers/my.js

xqd xqd xqd xqd xqd
@@ -93,9 +93,9 @@
             });
             //退出登陆
             $scope.logout = function(){
-                storage.remove("token");
-                storage.remove("user");
-                $state.go("login");
+                    storage.remove("token");
+                    storage.remove("user");
+                    $state.go("login");
             }
 
      }]);
@@ -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","$timeout","$ionicTabsDelegate", "$state", "myService", "msg"
+        , function ($scope,config,common,$timeout,$ionicTabsDelegate, $state, myService, msg) {
             $scope.addpict = function () {
-                common.chooseImage().then(function (img) {
-                    common.uploadFiles(img,1).then(function (result) {
+                common.chooseImage().then(function (qrcode) {
+                    common.uploadFiles(qrcode,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.qrcode.push(file);
                     }, function (error) {
                         msg.error('图片上传失败');
                     });
@@ -459,10 +460,10 @@
                     console.log('图片选择失败');
                 });
             };
-            $scope.imgs=[];
+            $scope.qrcode=[];
             $scope.deletefile = function (file) {
-                var index = $scope.imgs.indexOf(file);
-                $scope.imgs.splice(index, 1);
+                var index = $scope.qrcode.indexOf(file);
+                $scope.qrcode.splice(index, 1);
                 common.deletefile(file).then(function () {
                 })
             };
@@ -470,7 +471,8 @@
                 bank_name:'',
                 bank_number:'',
                 bank_phone:'',
-                bank_user:''
+                bank_user:'',
+                type:""
             };
             $scope.addAccount = function () {
                 var data = {
@@ -493,16 +495,14 @@
             $scope.addQrcode = function(){
                 var data = {
                     data:{
-                        bank_name:$scope.vm.bank_name,
-                        //bank_number:$scope.imgs
-                        bank_number:"https://www.baidu.com/img/bd_logo1.png"
+                        type:$scope.vm.type,
+                        qrcode:$scope.vm.file
+                        //qrcode:"https://www.baidu.com/img/bd_logo1.png"
                     }
                 };
                 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) {

+ 7 - 1
miaomiao/www/js/services/myservice.js

xqd xqd
@@ -1,6 +1,12 @@
 (function (app) {
     app.factory('myService', ['$http', 'config', "util", function ($http, config, util) {
         return {
+            logout:function(){
+                return $http({
+                    url:config.server + "api/auth/logout",
+                    method:"get"
+                })
+            },
             setPassword: function (password) {
                 return $http({
                     url: config.server + '/api/auth/password',
@@ -135,7 +141,7 @@
             },
             addQrcode:function(data){
                 return $http({
-                    url:config.server + "api/my/bank/img",
+                    url:config.server + "api/my/bank/qrcode",
                     method:"post",
                     data:data
                 })

+ 1 - 1
miaomiao/www/templates/add/index.html

xqd
@@ -27,7 +27,7 @@
                     <img src="img/icon_photo.svg" style="height: 40px; width: 40px; text-align: center; line-height: 40px" /><br>
                     <em style="font-size: 16px">添加图片</em>
                 </a>
-                <video src="{{video.path}}" ng-show="video.isOK"  height="72px" width="72px" controls="controls">
+                <video ng-src="{{video.file | trustUrl}}" ng-show="video.isOK" poster="{{video.vpic}}" height="72px" width="72px" controls="controls">
                 </video>
                 <a class="btn-file-up" ng-click="addvideo()" ng-show="!video.isOK">
                     <img src="img/icon_video.svg" style="height: 40px; width: 40px; text-align: center; line-height: 40px" /><br>

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

xqd
@@ -46,7 +46,7 @@
                     <ion-slides slider="data.slider">
                         <ion-slide-page ng-if="dream.video">
                             <div class="box banner">
-                                <video ng-src="{{dream.video | trustUrl}}" poster="{{dream.video}}" width="100%" style="max-height: 400px" class="centerme" controls="controls" ></video>
+                                <video src="{{dream.video | trustUrl}}" poster="{{dream.vpic}}" width="100%" style="max-height: 400px" class="centerme" controls="controls" ></video>
                             </div>
                         </ion-slide-page>
                         <ion-slide-page ng-repeat="img in dream.imgs" >

+ 6 - 8
miaomiao/www/templates/my/my-account-add.html

xqd xqd
@@ -6,9 +6,7 @@
                     <ion-content>
                         <div class="list">
                             <div class="item item-input item-select" style="border-bottom: 1px solid #DDDDDD">
-                                <select ng-model="vm.bank_name">
-                                    <option value="" selected="">请选择
-                                    </option>
+                                <select ng-model="vm.bank_name" ng-init="vm.bank_name='支付宝'">
                                     <option value="支付宝" >支付宝
                                     </option>
                                     <option value="工商银行" >工商银行
@@ -57,18 +55,18 @@
                                 <span class="input-label">
                                     选择类型
                                 </span>
-                                <select ng-model="vm.bank_name">
-                                    <option value="1">微信二维码
+                                <select ng-model="vm.type">
+                                    <option value="微信二维码">微信二维码
                                     </option>
-                                    <option value="2">支付宝二维码
+                                    <option value="支付宝二维码">支付宝二维码
                                     </option>
                                 </select>
                             </div>
                             <div class="item item-input" style="border-bottom: 1px solid #DDDDDD">
-                                <a ng-repeat="item in imgs" ng-click="showImages(item)" class="img-file-up">
+                                <a ng-repeat="item in qrcode" class="img-file-up">
                                     <b style="background-image:url({{item}});"><em ng-click="deletefile(item)" class="ion-ios-close-outline"></em></b>
                                 </a>
-                                <!--<a class="btn-file-up" ng-click="addpict()"><i class="ion-image"></i>添加图片</a>-->
+
                                 <a class="btn-file-up" ng-click="addpict()">
                                     <img src="img/icon_photo.svg" style="height: 40px; width: 40px; text-align: center; line-height: 40px" /><br>
                                     <em style="font-size: 16px">上传二维码</em>

+ 4 - 4
miaomiao/www/templates/my/my-account.html

xqd
@@ -6,18 +6,18 @@
         <!--下拉刷新-->
         <ion-refresher pulling-text="下拉刷新" on-refresh="load(true)">
         </ion-refresher>
-            <div class="list" ng-repeat="item in items">
-                <div class="item" style="border-bottom: 1px solid #E6E6E6">
+            <div class="list" style="margin-bottom: 0" ng-repeat="item in items">
+                <div class="item" style="border-bottom: 1px solid #E6E6E6;">
                     <div ng-if="!item.qrcode">
                         <p style="font-weight:bold">{{item.bank_name}}</p>
                         <p >账号:{{item.bank_number}}</p>
                         <p >预留手机号:{{item.bank_phone}}</p>
                     </div>
                     <div ng-if="item.qrcode">
-                        <p style="font-weight:bold">{{item.bank_name}}</p>
+                        <p style="font-weight:bold">{{item.type}}</p>
                         <img ng-src="{{ item.qrcode | qrcode}}" style="max-width: 70px;"/>
                     </div>
-                    <button class="button button-stable" ng-click="destroyAccount(item.id)" style="float:right;margin-top:-70px">
+                    <button class="button button-stable" ng-click="destroyAccount(item.id)" style="float:right;margin-top:-50px">
                         删除
                     </button>
                 </div>

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

xqd xqd
@@ -1,6 +1,7 @@
 <?php
 namespace App\Helper;
 
+use FFMpeg;
 use Illuminate\Http\Request;
 use Illuminate\Http\UploadedFile;
 use Symfony\Component\HttpFoundation\File\Exception\FileException;
@@ -67,15 +68,17 @@ trait AttachmentHelper
                     $url_path = $rel_path . '/' . $md5_filename;
 
                     if ($fileMimeType == "video/mp4" || $fileMimeType == "video/quicktime") {
-                        $ffmpeg = \FFMpeg\FFMpeg::create(array(
+                        $ffmpeg = FFMpeg\FFMpeg::create(array(
                             'ffmpeg.binaries'  => '/usr/bin/ffmpeg',
                             'ffprobe.binaries' => '/usr/bin/ffprobe'
                         ));
                         \Log::info($real_path);
                         $video = $ffmpeg->open($real_path);
+                        $pic = public_path() . '/upload/vpic/'.$md5.'.jpg';
+                        \Log::info($pic);
                         $video
-                            ->frame(\FFMpeg\Coordinate\TimeCode::fromSeconds(10))
-                            ->save( public_path() . '/upload/vpic/'.$md5_filename.'.jpg');
+                            ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(1))
+                            ->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">