Quellcode durchsuchen

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

YanaDH vor 7 Jahren
Ursprung
Commit
1b962b1b08
34 geänderte Dateien mit 1022 neuen und 294 gelöschten Zeilen
  1. 1 1
      miaomiao/www/chcp.json
  2. 21 21
      miaomiao/www/chcp.manifest
  3. 4 4
      miaomiao/www/js/config/config.js
  4. 8 4
      miaomiao/www/js/controllers/home.js
  5. 3 2
      miaomiao/www/js/controllers/my.js
  6. 41 41
      miaomiao/www/templates/home/dream-detail.html
  7. 1 1
      miaomiao/www/templates/my/aboutMiao.html
  8. 7 1
      server/app/Helper/AttachmentHelper.php
  9. 136 0
      server/app/Http/Controllers/Admin/User/BanksController.php
  10. 3 3
      server/app/Http/Controllers/Api/V1/AuthController.php
  11. 1 1
      server/app/Http/Controllers/Api/V1/Controller.php
  12. 101 8
      server/app/Http/Controllers/Api/V1/DreamController.php
  13. 5 3
      server/app/Http/Controllers/Api/V1/HomeController.php
  14. 88 57
      server/app/Http/Controllers/Api/V1/IndexController.php
  15. 6 3
      server/app/Http/Controllers/Api/V1/InteractionController.php
  16. 53 47
      server/app/Http/Controllers/Api/V1/MyController.php
  17. 5 0
      server/app/Models/CommentInfoModel.php
  18. 2 1
      server/app/Models/UserBank.php
  19. 48 0
      server/app/Models/UserBanksModel.php
  20. 5 0
      server/app/Models/UserCareUser.php
  21. 10 0
      server/app/Models/UserCashOutModel.php
  22. 21 0
      server/app/Repositories/User/BanksRepository.php
  23. 11 4
      server/app/Repositories/User/Cash/Criteria/MultiWhere.php
  24. 10 8
      server/app/Repositories/User/Criteria/MultiWhere.php
  25. 7 4
      server/database/migrations/2017_08_14_113214_create_user_banks_table.php
  26. 0 32
      server/database/migrations/2017_08_15_165425_add_is_img_to_user_banks.php
  27. 0 33
      server/database/migrations/2017_08_15_172747_add_is_url_to_user_banks.php
  28. 1 7
      server/database/migrations/2017_08_26_113215_create_user_cash_out_table.php
  29. 92 0
      server/resources/views/admin/user/banks/check.blade.php
  30. 119 0
      server/resources/views/admin/user/banks/edit.blade.php
  31. 114 0
      server/resources/views/admin/user/banks/index.blade.php
  32. 88 0
      server/resources/views/admin/user/banks/view.blade.php
  33. 8 6
      server/resources/views/admin/user/cash/out/index.blade.php
  34. 2 2
      server/routes/api.php

+ 1 - 1
miaomiao/www/chcp.json

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

+ 21 - 21
miaomiao/www/chcp.manifest

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -13,7 +13,7 @@
   },
   {
     "file": ".idea/workspace.xml",
-    "hash": "3ccbb989a07e8cdf3ffcc7821b1067dc"
+    "hash": "4171b3999655f1262098329ca055a80f"
   },
   {
     "file": ".idea/www.iml",
@@ -365,15 +365,15 @@
   },
   {
     "file": "js/config/config.js",
-    "hash": "819fe9f0a2032ace31177c30bd55d553"
+    "hash": "8f4884a65c00024ae26f0202ed33cb3a"
   },
   {
     "file": "js/config/router.js",
-    "hash": "f9a910ea1acd6dd7e7ec9a8da05fd4cf"
+    "hash": "3e72be424ee66203c122c2fefe33a151"
   },
   {
     "file": "js/controllers/account.js",
-    "hash": "1a153ea6181e71139369cd8d49ab4bfb"
+    "hash": "4991794aac4d09176ea22253e945b93c"
   },
   {
     "file": "js/controllers/add.js",
@@ -381,15 +381,15 @@
   },
   {
     "file": "js/controllers/home.js",
-    "hash": "72edb1846b3815d82d72513207f3b547"
+    "hash": "2ed102ad7af44e4947f9dca76153aa24"
   },
   {
     "file": "js/controllers/my.js",
-    "hash": "6f2e3fb8c1e987b871088374c421ad67"
+    "hash": "ff5d39a366893ac3a0eed80e03f970cd"
   },
   {
     "file": "js/controllers/tabs.js",
-    "hash": "333555665b72432afcb2ebf25bf56870"
+    "hash": "d337cec4fb6f2991cc6b4b7190474309"
   },
   {
     "file": "js/directives/directive.js",
@@ -397,7 +397,7 @@
   },
   {
     "file": "js/filters/filter.js",
-    "hash": "25ae9b574b9fcc88bc41b6e365620de4"
+    "hash": "85292a7deef8d136aa06e31d1533ac8b"
   },
   {
     "file": "js/platformOverrides.js",
@@ -413,7 +413,7 @@
   },
   {
     "file": "js/services/homeservice.js",
-    "hash": "5393ec41531f20b0d4ac048cf215ffd8"
+    "hash": "6c4903ba1b134dcca60a67627174c0bc"
   },
   {
     "file": "js/services/httpinterceptor.js",
@@ -721,19 +721,19 @@
   },
   {
     "file": "templates/add/index.html",
-    "hash": "a0f6606b64db009012a391fd7399d43b"
+    "hash": "61eca4efaae8005807542e281a0dcaec"
   },
   {
     "file": "templates/home/dream-detail.html",
-    "hash": "25d8572483768a5fc2521f310ee9a7a5"
+    "hash": "7d9debbf1ade697a2f74fdb7e9f9b4ed"
   },
   {
     "file": "templates/home/index.html",
-    "hash": "c73a2f81ea8240137b7d8b3d6b0f4fb1"
+    "hash": "457c77c56b4de63bb16662bb2cc7de6d"
   },
   {
     "file": "templates/home/oldDream.html",
-    "hash": "cdc45222a9d115d7f6d3a559fdf5b036"
+    "hash": "922da9795dc56e0094f1cb58a700630a"
   },
   {
     "file": "templates/home/search.html",
@@ -749,15 +749,15 @@
   },
   {
     "file": "templates/home/userDetail.html",
-    "hash": "e367c5879554243574f978c4bd48814c"
+    "hash": "862d2ca61b2dec9999bb5bc27811de31"
   },
   {
     "file": "templates/my/aboutMiao.html",
-    "hash": "4437231b45e1115c8cd9468db1081d1a"
+    "hash": "14f633904f3a23cf129b10e1cf252fa1"
   },
   {
     "file": "templates/my/attention.html",
-    "hash": "4112c1afcccc9819956425c09cf0b4d7"
+    "hash": "8af4dce83fd9db4e13f68081e7e347d5"
   },
   {
     "file": "templates/my/contact.html",
@@ -765,7 +765,7 @@
   },
   {
     "file": "templates/my/index.html",
-    "hash": "8d9e40c2994d49d5cb7d5a1cc887e0ba"
+    "hash": "37d3379fe956d9563bc1d59d4a0610ab"
   },
   {
     "file": "templates/my/my-account-add.html",
@@ -773,15 +773,15 @@
   },
   {
     "file": "templates/my/my-account.html",
-    "hash": "3dae457fe6ba45bdb8b4983e65157070"
+    "hash": "50c8e1c8478586d490d99bc50fd969c5"
   },
   {
     "file": "templates/my/my-collect.html",
-    "hash": "6d0cdeb5be41aaed62e4e965fae9d8c9"
+    "hash": "dd9e35c5753a34b5dd3fa208249bb8fc"
   },
   {
     "file": "templates/my/my-dream.html",
-    "hash": "f86ee815e900a04bb91368d3ce380752"
+    "hash": "e2e3ca673469c30dfb5bad01f9a19a23"
   },
   {
     "file": "templates/my/my-message-reply.html",
@@ -801,7 +801,7 @@
   },
   {
     "file": "templates/my/my-recharge.html",
-    "hash": "4fb207146b72cc84508907932cd07a95"
+    "hash": "10484fc6c9fe31890552481d7f0c73e6"
   },
   {
     "file": "templates/my/my-setting.html",

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

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

+ 8 - 4
miaomiao/www/js/controllers/home.js

xqd xqd
@@ -248,8 +248,10 @@
                 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';
+                if($scope.dream.video){
+                    $scope.dream.vpic = config.server+'upload/vpic/'+$scope.dream.video+'.jpg';
+                    $scope.dream.video = config.imgServer+$scope.dream.video;
+                }
                 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, "/"));
@@ -620,8 +622,10 @@
                     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';
+                    if($scope.dream.video){
+                        $scope.dream.vpic = config.server+'upload/vpic/'+$scope.dream.video+'.jpg';
+                        $scope.dream.video = config.imgServer+$scope.dream.video;
+                    }
                     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, "/"));

+ 3 - 2
miaomiao/www/js/controllers/my.js

xqd xqd
@@ -10,8 +10,9 @@
         $scope.setAvator = function () {
             common.setAvator().then(function (result) {
                 var response = JSON.parse(result.response);
+                console.log(response.data.file)
                 $timeout(function () {
-                    $scope.user.avatar = config.imgServer + response.data.md5;
+                    $scope.user.avatar = config.imgServer + response.data.file;
                 });
             });
         };
@@ -25,7 +26,7 @@
                 common.setAvator().then(function (result) {
                     var response = JSON.parse(result.response);
                     $timeout(function () {
-                      $scope.vm.avatar = config.imgServer + response.data.md5;
+                        $scope.user.avatar = config.imgServer + response.data.file;
                     });
                 });
             };

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

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -47,7 +47,7 @@
                     <ion-slides slider="data.slider">
                         <ion-slide-page ng-if="dream.video">
                             <div class="box banner">
-                                <video src="{{dream.video | trustUrl}}" poster="{{dream.vpic}}" width="100%" style="max-height: 400px" class="centerme" controls="controls" ></video>
+                                <video ng-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" >
@@ -97,33 +97,33 @@
                 <div class="detail-head" style="height: 130px" ng-if="dream.top3user.length>0">
                     <div class="row" ng-if="dream.top3user.length<2">
                         <div class="col top1" ng-if="dream.top3user.length>0" style="background: url('img/img_No1.svg') no-repeat; background-size: 100% 100%;">
-                            <img style="width: 75px; height: 75px; margin: 25px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[0].avatar }}" /><br>
+                            <img style="width: 75px; height: 75px; margin: 25px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[0].avatar }}" /><br>
                         </div>
                         <div class="col top2" ng-if="dream.top3user.length>1" style="margin-top: 10px; background: url('img/img_No2.svg') no-repeat; background-size: 100% 100%;">
-                            <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[1].avatar }}" /><br>
+                            <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[1].avatar }}" /><br>
                         </div>
                     </div>
                     <div class="row" ng-if="dream.top3user.length>2">
                         <div class="col top2" ng-if="dream.top3user.length>1" style="margin-top: 10px; background: url('img/img_No2.svg') no-repeat; background-size: 100% 100%;">
-                            <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[1].avatar }}" /><br>
+                            <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[1].avatar }}" /><br>
                         </div>
                         <div class="col top1" ng-if="dream.top3user.length>0" style="background: url('img/img_No1.svg') no-repeat; background-size: 100% 100%;">
-                            <img style="width: 75px; height: 75px; margin: 25px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[0].avatar }}" /><br>
+                            <img style="width: 75px; height: 75px; margin: 25px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[0].avatar }}" /><br>
                         </div>
                         <div class="col top2" ng-if="dream.top3user.length>2" style="margin-top: 10px; background: url('img/img_No3.svg') no-repeat; background-size: 100% 100%;">
-                            <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[2].avatar }}" /><br>
+                            <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[2].avatar }}" /><br>
                         </div>
                     </div>
                 </div>
                 <div ng-if="dream.top3user.length==0" style="background: #f6f6f6;">
                     <div class="row" >
                         <div class="col" align="center">
-                            <img src="img/pic_leaves.png">
+                            <img ng-src="img/pic_leaves.png">
                         </div>
                     </div>
                 </div>
             </div>
-            <div style="width: 152px; margin: 0 auto">
+            <div style="width: 152px; margin: 0 auto" ng-if="dream.code">
                 <img ng-src="{{dream.code}}" style="width: 150px; height: 150px">
             </div>
         </div>
@@ -174,35 +174,35 @@
             <div class="detail-head" style="height: 180px" ng-if="dream.top3user.length>0">
                 <div class="row" ng-if="dream.top3user.length<2">
                     <div class="col top1" ng-if="dream.top3user.length>0" style="background: url('img/img_No1.svg') no-repeat; background-size: 100% 100%;">
-                        <img style="width: 75px; height: 75px; margin: 25px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[0].avatar }}" /><br>
+                        <img style="width: 75px; height: 75px; margin: 25px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[0].avatar }}" /><br>
                         {{ dream.top3user[0].nickname }}<br>
-                        <img src="img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
+                        <img ng-src="img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
                         <em style="font-size: 16px">{{ dream.top3user[0].score }}</em>
                     </div>
                     <div class="col top2" ng-if="dream.top3user.length>1" style="background: url('img/img_No2.svg') no-repeat; background-size: 100% 100%;">
-                        <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[1].avatar }}" /><br>
+                        <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[1].avatar }}" /><br>
                         {{ dream.top3user[1].nickname }}<br>
-                        <img src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
+                        <img ng-src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
                         <em style="font-size: 18px">{{ dream.top3user[1].score }}</em>
                     </div>
                 </div>
                 <div class="row" ng-if="dream.top3user.length>2">
                     <div class="col top2" ng-if="dream.top3user.length>1" style="background: url('img/img_No2.svg') no-repeat; background-size: 100% 100%;">
-                        <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[1].avatar }}" /><br>
+                        <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[1].avatar }}" /><br>
                         {{ dream.top3user[1].nickname }}<br>
-                        <img src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
+                        <img ng-src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
                         <em style="font-size: 18px">{{ dream.top3user[1].score }}</em>
                     </div>
                     <div class="col top1" ng-if="dream.top3user.length>0" style="background: url('img/img_No1.svg') no-repeat; background-size: 100% 100%;">
-                        <img style="width: 75px; height: 75px; margin: 25px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[0].avatar }}" /><br>
+                        <img style="width: 75px; height: 75px; margin: 25px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[0].avatar }}" /><br>
                         {{ dream.top3user[0].nickname }}<br>
-                        <img src="img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
+                        <img ng-src="img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
                         <em style="font-size: 16px">{{ dream.top3user[0].score }}</em>
                     </div>
                     <div class="col top2" ng-if="dream.top3user.length>2" style="background: url('img/img_No3.svg') no-repeat; background-size: 100% 100%;">
-                        <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" src="{{ dream.top3user[2].avatar }}" /><br>
+                        <img style="width: 67px; margin: 22px 0 8px 0; border-radius: 100%;" ng-src="{{ dream.top3user[2].avatar }}" /><br>
                         {{ dream.top3user[2].nickname }}<br>
-                        <img src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
+                        <img ng-src="img/icon_gongxian.svg" style="height: 20px; width: 20px; margin-top: 5px" />
                         <em style="font-size: 18px">{{ dream.top3user[2].score }}</em>
                     </div>
                 </div>
@@ -210,7 +210,7 @@
             <div ng-if="dream.top3user.length==0" style="background: #f6f6f6;">
                 <div class="row" >
                     <div class="col" align="center">
-                        <img src="img/pic_leaves.png">
+                        <img ng-src="img/pic_leaves.png">
                     </div>
                 </div>
             </div>
@@ -221,7 +221,7 @@
                     </div>
                     <div style="padding-left:20px; float:left;">
                         <div style="float:left;">
-                            <img style="width:40px;border-radius:100%" src="{{user.avatar}}" />
+                            <img style="width:40px;border-radius:100%" ng-src="{{user.avatar}}" />
                         </div>
                         <div style="float:left; margin-left: 10px">
                             <div style="font-size: 16px">{{user.nickname}}</div>
@@ -239,7 +239,7 @@
                     </div>
                     <div style="padding-left:20px; float:left;">
                         <div style="float:left;">
-                            <img style="width:40px;border-radius:100%" src="{{user.avatar}}" />
+                            <img style="width:40px;border-radius:100%" ng-src="{{user.avatar}}" />
                         </div>
                         <div style="float:left; margin-left: 10px">
                             <div style="font-size: 16px">{{user.nickname}}</div>
@@ -256,7 +256,7 @@
         </div>
         <!--点击看大图-->
         <div ng-if="bigImage && type==2" ng-click="hideBigImage()" class="popover-backdrop">
-            <img src="{{url}}">
+            <img ng-src="{{url}}">
         </div>
      <script id="interaction-modal.html" type="text/ng-template">
       <div class="modal">
@@ -277,7 +277,7 @@
                 </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>
+                    <img ng-src="img/icon_photo.svg" style="height: 40px; width: 40px; text-align: center; line-height: 40px" /><br>
                     <em style="font-size: 16px">添加图片</em>
                 </a>
             </div>
@@ -303,7 +303,7 @@
                 <div class="item" style="padding:20px">
                     <div class="row">
                         <div class="col col-20">
-                            <img src="img/icon_gold.svg" style="height: 100%; width: 100%">
+                            <img ng-src="img/icon_gold.svg" style="height: 100%; width: 100%">
                         </div>
                         <div class="col">
                             <div>剩余梦想币</div>
@@ -343,17 +343,17 @@
     </ion-content>
         <div class="detail-like" ng-if="tosupport">
             <div style="text-align: center; border-bottom: 3px solid #8D8D8E">
-                <img src="img/img_miao.png" style="width: 25%; height: 55px;margin-bottom: -13px">
+                <img ng-src="img/img_miao.png" style="width: 25%; height: 55px;margin-bottom: -13px">
             </div>
             <div style="background: #fff;">
                 <div class="coin">
                     <div class="row">
                         <div class="col box {{index==2?'selected':''}}" ng-click="changeIndex(2)" ng-model="coin">
                             <div style="float:left; width: 35%;  margin-top: 2%; margin-left: 5%">
-                                <img src="img/icon_kiss.png" style="width: 100%;">
+                                <img ng-src="img/icon_kiss.png" style="width: 100%;">
                             </div>
                             <div style="float:right; width: 20%; margin-top: 5%; margin-right: 5px">
-                                <img src="img/icon_gold.svg" style="width: 100%">
+                                <img ng-src="img/icon_gold.svg" style="width: 100%">
                             </div>
                             <div style="float:right; color: #000;font-size: 16px; margin-top: 12%; margin-right: 3%">
                                 20
@@ -361,10 +361,10 @@
                         </div>
                         <div class="col box {{index==5?'selected':''}}" ng-click="changeIndex(5)" ng-model="coin">
                             <div style="float:left; width: 35%;  margin-top: 2%; margin-left: 5%">
-                                <img src="img/icon_candy.png" style="width: 100%;">
+                                <img ng-src="img/icon_candy.png" style="width: 100%;">
                             </div>
                             <div style="float:right; width: 20%; margin-top: 5%; margin-right: 5px">
-                                <img src="img/icon_gold.svg" style="width: 100%">
+                                <img ng-src="img/icon_gold.svg" style="width: 100%">
                             </div>
                             <div style="float:right; color: #000;font-size: 16px; margin-top: 12%; margin-right: 3%">
                                 50
@@ -372,10 +372,10 @@
                         </div>
                         <div class="col box {{index==10?'selected':''}}" ng-click="changeIndex(10)" ng-model="coin">
                             <div style="float:left; width: 35%;  margin-top: 2%; margin-left: 5%">
-                                <img src="img/icon_balloon.png" style="width: 100%;">
+                                <img ng-src="img/icon_balloon.png" style="width: 100%;">
                             </div>
                             <div style="float:right; width: 20%; margin-top: 5%; margin-right: 5px">
-                                <img src="img/icon_gold.svg" style="width: 100%">
+                                <img ng-src="img/icon_gold.svg" style="width: 100%">
                             </div>
                             <div style="float:right; color: #000;font-size: 16px; margin-top: 12%; margin-right: 3%">
                                 100
@@ -385,10 +385,10 @@
                     <div class="row">
                         <div class="col box {{index==20?'selected':''}}" ng-click="changeIndex(20)" ng-model="coin">
                             <div style="float:left; width: 35%; margin-top: 2%; margin-left: 5%">
-                                <img src="img/icon_rose.png" style="width: 100%;">
+                                <img ng-src="img/icon_rose.png" style="width: 100%;">
                             </div>
                             <div style="float:right; width: 20%; margin-top: 5%; margin-right: 5px">
-                                <img src="img/icon_gold.svg" style="width: 100%">
+                                <img ng-src="img/icon_gold.svg" style="width: 100%">
                             </div>
                             <div style="float:right; color: #000;font-size: 16px; margin-top: 12%; margin-right: 3%">
                                 200
@@ -396,10 +396,10 @@
                         </div>
                         <div class="col box {{index==30?'selected':''}}" ng-click="changeIndex(30)" ng-model="coin">
                             <div style="float:left; width: 35%; margin-top: 3%; margin-left: 5%">
-                                <img src="img/icon_haert.png" style="width: 100%;">
+                                <img ng-src="img/icon_haert.png" style="width: 100%;">
                             </div>
                             <div style="float:right; width: 20%; margin-top: 5%; margin-right: 5px">
-                                <img src="img/icon_gold.svg" style="width: 100%">
+                                <img ng-src="img/icon_gold.svg" style="width: 100%">
                             </div>
                             <div style="float:right; color: #000;font-size: 16px; margin-top: 12%; margin-right: 3%">
                                 300
@@ -407,10 +407,10 @@
                         </div>
                         <div class="col box {{index==50?'selected':''}}" ng-click="changeIndex(50)" ng-model="coin">
                             <div style="float:left; width: 35%; margin-top: 2%; margin-left: 5%">
-                                <img src="img/icon_diamond.png" style="width: 100%;">
+                                <img ng-src="img/icon_diamond.png" style="width: 100%;">
                             </div>
                             <div style="float:right; width: 20%; margin-top: 5%; margin-right: 5px">
-                                <img src="img/icon_gold.svg" style="width: 100%">
+                                <img ng-src="img/icon_gold.svg" style="width: 100%">
                             </div>
                             <div style="float:right; color: #000;font-size: 16px; margin-top: 12%; margin-right: 3%">
                                 500
@@ -423,13 +423,13 @@
                     </div>
                     <div style="float: left;width: 90px;">
                         <div style="float:left; padding-top: 4px;height: 45px;">
-                            <img src="img/icon_gold.svg"/>
+                            <img ng-src="img/icon_gold.svg"/>
                         </div>
                         <em>{{user.coin}}&nbsp;</em>
                     </div>
                     <div class="calm" ng-click="toRecharge()" style="float: left;">
                         <div style="float:left; padding-top: 4px;height: 45px;">
-                            <img src="img/icon_ recharge.png">
+                            <img ng-src="img/icon_ recharge.png">
                         </div>
                         <em>&nbsp;充值</em>
                     </div>
@@ -442,11 +442,11 @@
     <div class="detail-like" ng-if="toshare">
         <div class="row" style="background: #CCCCCC;">
             <div class="col" ng-click="shareDream(1)">
-                <img src="img/weixin.png" ><br>
+                <img ng-src="img/weixin.png" ><br>
                 微信
             </div>
             <div class="col" ng-click="shareDream(2)">
-                <img src="img/weibo.png" ><br>
+                <img ng-src="img/weibo.png" ><br>
                 微博
             </div>
         </div>

+ 1 - 1
miaomiao/www/templates/my/aboutMiao.html

xqd
@@ -1,5 +1,5 @@
 <ion-view view-title="关于瞄喵">
-    <ion-content style="color: red">
+    <ion-content style="padding: 10%;color: #111;">
        {{items.value}}
     </ion-content>
 </ion-view>

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

xqd
@@ -74,7 +74,13 @@ trait AttachmentHelper
                         ));
                         \Log::info($real_path);
                         $video = $ffmpeg->open($real_path);
-                        $pic = public_path() . '/upload/vpic/'.$md5.'.jpg';
+                        $vpath = public_path() . '/upload/vpic/';
+                        if (!file_exists($vpath)) {
+                            if (!@mkdir($vpath, 0755, true)) {
+                                return ErrorCode::ATTACHMENT_MKDIR_FAILED;
+                            }
+                        }
+                        $pic = $vpath.$md5.'.jpg';
                         \Log::info($pic);
                         $video
                             ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(1))

+ 136 - 0
server/app/Http/Controllers/Admin/User/BanksController.php

xqd
@@ -0,0 +1,136 @@
+<?php
+/**
+ *  账户列表
+ *  @author  system
+ *  @version    1.0
+ *  @date 2017-08-18 11:17:45
+ *
+ */
+namespace App\Http\Controllers\Admin\User;
+use App\Http\Controllers\Admin\Controller;
+use Illuminate\Http\Request;
+use App\Repositories\Base\Criteria\OrderBy;
+use App\Repositories\User\Criteria\MultiWhere;
+use App\Repositories\User\BanksRepository;
+
+class BanksController extends Controller
+{
+    private $repository;
+
+    public function __construct(BanksRepository $repository) {
+        if(!$this->repository) $this->repository = $repository;
+    }
+
+    function index(Request $reqeust) {
+        $search['keyword'] = $reqeust->input('keyword');
+        $query = $this->repository->pushCriteria(new MultiWhere($search));
+
+        if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
+        $query = $query->pushCriteria(new OrderBy($request['sort_field'],$request['sort_field_by']));
+        }
+        $list = $query->paginate();
+        return view('admin.user.banks.index',compact('list'));
+    }
+
+
+    function check(Request $reqeust) {
+        $request = $reqeust->all();
+        $search['keyword'] = $reqeust->input('keyword');
+        $orderby = array();
+        if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
+            $orderby[$request['sort_field']] = $request['sort_field_by'];
+        }
+        $list = $this->repository->search($search,$orderby);
+        return view('admin.user.banks.check',compact('list'));
+    }
+
+
+    /**
+     * 添加
+     * 
+     */
+    public function create(Request $reqeust)
+    {
+        if($reqeust->method() == 'POST') {
+            return $this->_createSave();
+        }
+        return view('admin.user.banks.edit');
+    }
+
+    /**
+     * 保存修改
+     */
+    private function _createSave(){
+        $data = (array) request('data');
+        $id = $this->repository->create($data);
+        if($id) {
+            $url[] = array('url'=>U( 'User/Banks/index'),'title'=>'返回列表');
+            $url[] = array('url'=>U( 'User/Banks/create'),'title'=>'继续添加');
+            $this->showMessage('添加成功',$url);
+        }else{
+            $url[] = array('url'=>U( 'User/Banks/index'),'title'=>'返回列表');
+            return $this->showWarning('添加失败',$url);
+        }
+    }
+    
+    /**
+     * 
+     * 修改
+     * 
+     * 
+     */
+    public function update(Request $reqeust) {
+        if($reqeust->method() == 'POST') {
+            return $this->_updateSave();
+        }
+        $data = $this->repository->find($reqeust->get('id'));
+        return view('admin.user.banks.edit',compact('data'));
+    }
+
+    /**
+     * 保存修改
+     */
+    private function _updateSave() {
+        $data = (array) request('data');
+        $ok = $this->repository->update(request('id'),$data);
+        if($ok) {
+            $url[] = array('url'=>U( 'User/Banks/index'),'title'=>'返回列表');
+            return $this->showMessage('操作成功',urldecode(request('_referer')));
+        }else{
+            $url[] = array('url'=>U( 'User/Banks/index'),'title'=>'返回列表');
+            return $this->showWarning('操作失败',$url);
+        }
+    }
+
+    public function view(Request $reqeust) {
+        $data = $this->repository->find(request('id'));
+        return view('admin.user.banks.view',compact('data'));
+    }
+
+
+    /**
+     *
+     * 状态改变
+     *
+     */
+    public function status(Request $reqeust) {
+        $ok = $this->repository->updateStatus(request('id'),request('status'));
+        if($ok) {
+            return $this->showMessage('操作成功');
+        }else{
+            return $this->showWarning('操作失败');
+        }
+    }
+    
+    /**
+     * 删除
+     */
+    public function destroy(Request $reqeust) {
+        $bool = $this->repository->destroy($reqeust->get('id'));
+        if($bool) {
+            return  $this->showMessage('操作成功');
+        }else{
+            return  $this->showWarning("操作失败");
+        }
+    }
+}

+ 3 - 3
server/app/Http/Controllers/Api/V1/AuthController.php

xqd xqd
@@ -188,7 +188,7 @@ class AuthController extends Controller
         $keyexist = $this->keySmsCodeExist . $phone;
         $times = Cache::store('file')->get($keyexist);
 
-        if($times>5) {
+        if($times>20) {
             return $this->error(ErrorCode::VERIFY_CODE_TOO_MUCH);
         }else{
             $times++;
@@ -283,12 +283,12 @@ class AuthController extends Controller
             $result = array_shift($result);
         }
         if (is_string($result)) {
-            $user->avatar = config('app.url')."/api/attachment/download/".$result;
+            $user->avatar = config('app.url')."api/attachment/download/".$result;
             if (!$user->save()) {
                 return $this->error(ErrorCode::SAVE_USER_FAILED);
             }
             $this->deleteAttachment($old_avatar);
-            return $this->api(['md5' => $result]);
+            return $this->api(['file' => $result]);
         }
         return $this->error($result);
     }

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

xqd
@@ -30,7 +30,7 @@ class Controller extends BaseController
         $this->middleware('auth:api', [
             'except' => [
                 'upload', 'getCode', 'reset', 'login', 'get', 'register', 'alipayNotify', 'wechatpayNotify',
-                'get', 'area', 'get_province', 'get_city', 'get_county', 'test','/home/index'
+                'get', 'area', 'download',  'test'
             ]
         ]);
 

+ 101 - 8
server/app/Http/Controllers/Api/V1/DreamController.php

xqd xqd xqd xqd xqd xqd xqd
@@ -60,6 +60,84 @@ class DreamController extends Controller
                         "score": 2399
                     }
                 ],
+                "interactions": [                         动态
+                {
+                "id": 1,
+                "dream_id": 11,
+                "title": "用户2 梦想ID11的动态1",
+                "pic1": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1498974141&di=114258609665a88d6aed7c38fe65c1a2&imgtype=jpg&er=1&src=http%3A%2F%2Fimg5.duitang.com%2Fuploads%2Fitem%2F201507%2F14%2F20150714130925_kzrcM.thumb.224_0.jpeg",
+                "pic2": "",
+                "pic3": "",
+                "pic4": "",
+                "pic5": "",
+                "pic6": "",
+                "pic7": "",
+                "pic8": "",
+                "pic9": "",
+                "status": 1,
+                "created_at": "2017-06-25 13:41:18",
+                "updated_at": "2017-06-25 13:41:18",
+                "deleted_at": null,
+                "comments": [                           评论
+                {
+                "interaction_id": 1,
+                "user_id": 2,
+                "user_avatar": "",
+                "user_nickname": "",
+                "to_user_id": 0,
+                "to_user_avatar": "",
+                "to_user_nickname": "",
+                "level": 0,
+                "content": "09",
+                "is_read": 0,
+                "updated_at": "2017-06-30 18:15:57",
+                "reply_time": null
+                },
+                {
+                "interaction_id": 1,
+                "user_id": 1,
+                "user_avatar": "",
+                "user_nickname": "",
+                "to_user_id": 2,
+                "to_user_avatar": "",
+                "to_user_nickname": "",
+                "level": 0,
+                "content": "08",
+                "is_read": 1,
+                "updated_at": "2017-08-16 16:08:04",
+                "reply_time": null
+                },
+                {
+                "interaction_id": 1,
+                "user_id": 1,
+                "user_avatar": "",
+                "user_nickname": "",
+                "to_user_id": 3,
+                "to_user_avatar": "",
+                "to_user_nickname": "",
+                "level": 0,
+                "content": "07",
+                "is_read": 1,
+                "updated_at": "2017-08-16 16:08:04",
+                "reply_time": null
+                },
+                {
+                "interaction_id": 1,
+                "user_id": 1,
+                "user_avatar": "",
+                "user_nickname": "",
+                "to_user_id": 0,
+                "to_user_avatar": "",
+                "to_user_nickname": "",
+                "level": 0,
+                "content": "1118888",
+                "is_read": 1,
+                "updated_at": "2017-08-16 16:08:04",
+                "reply_time": null
+                }
+                ]
+                }
+                ],
                 "number": 1                                支持乘数
                 "imgs": [                                  梦想图片
                     {
@@ -163,6 +241,7 @@ class DreamController extends Controller
         $number =round( -$a * $b + $c,1);
         if ($number <= 1) $number = 1;
         $dream = DreamInfoModel::with(['imgs','user'])->find($id);
+        if (empty($dream)) return $this->error(ErrorCode::DREAM_NOT_EXIST);
         $dream->user_coin = $user->coin;
         $dream->topuser = $topuser;
         $dream->top3user = $top3user;
@@ -174,6 +253,12 @@ class DreamController extends Controller
 //        如果当前梦想用户就是当前登录用户就不显示关注按钮
         $show_button = $dream->user_id == $user->id ? '0' : '1';
         $dream->show_button = $show_button;
+//        梦想互动
+        $interactions = InteractionInfo::where('dream_id',$id)->with(['comments' => function ($query) {
+            $query->orderBy('created_at','desc');
+        }])->orderBy('created_at','desc')->get();
+        $dream->interactions = $interactions;
+//        dd($interactions);
         return $this->api($dream);
     }
 
@@ -298,11 +383,23 @@ class DreamController extends Controller
         if ($user->coin < $coin) {
             return $this->error(ErrorCode::COIN_NOT_ENOUGH);
         }else{
+
             $user->coin  -= $coin;
             $user->save();
             $dream->get_coin += $coin;
             $dream->mark += $coin*$number;
             $dream->save();
+            //            梦想实现创建二维码
+            if ($dream->coin == $dream->get_coin) {
+                //        生成二维码
+                $info['transaction_id'] = date('YmdHis') . mt_rand(1000, 9999);
+                $info['code'] = 'WECHATPAY_' . $info['transaction_id'];
+                $code_url = env('APP_URL').'/user/meet?dream_id='.$dream_id;
+                $code_path = public_path('qrcodes/'.$info['code'].'.png');
+                \QrCode::format('png')->size(500)->generate($code_url,$code_path);
+                $code =  env('APP_URL').'/qrcodes/'.$info['code'].'.png';
+                DreamInfoModel::where('id',$dream_id)->update(compact('code'));
+            }
             $data = [
                 'user_id'=>$user->id,
                 'dream_id'=>$dream_id,
@@ -553,6 +650,7 @@ class DreamController extends Controller
                 'about'  => 'required',
                 'coin'  => 'required|integer',
                 'days'  => 'required|integer',
+                'pics'  => 'required|array',
             ],
             [
                 'name.required'  => '梦想标题必填',
@@ -561,6 +659,8 @@ class DreamController extends Controller
                 'coin.integer'  => '梦想币必须是正整数',
                 'days.required'  => '实现时间必填',
                 'days.integer'  => '实现时间必须是正整数',
+                'pics.required'  => '至少上传一张图片',
+                'pics.array'  => '至少上传一张图片数组',
             ]
         );
         if($validator->fails()) return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
@@ -584,14 +684,7 @@ class DreamController extends Controller
         $data['created_at'] = date('Y-m-d H:i:s');
         $data['updated_at'] = date('Y-m-d H:i:s');
         $dream_id = DreamInfoModel::insertGetId($data);
-//        生成二维码
-        $info['transaction_id'] = date('YmdHis') . mt_rand(1000, 9999);
-        $info['code'] = 'WECHATPAY_' . $info['transaction_id'];
-        $code_url = env('APP_URL').'/user/meet?dream_id='.$dream_id;
-        $code_path = public_path('qrcodes/'.$info['code'].'.png');
-        \QrCode::format('png')->size(500)->generate($code_url,$code_path);
-        $code =  env('APP_URL').'/qrcodes/'.$info['code'].'.png';
-        DreamInfoModel::where('id',$dream_id)->update(compact('code'));
+
         if ($dream_id) {
 //            梦想创建成功 关联关系中最新动态+1
             /*         $info = UserCareUser::where('other_user_id',$user->id)->paginate(20);

+ 5 - 3
server/app/Http/Controllers/Api/V1/HomeController.php

xqd xqd xqd
@@ -64,6 +64,7 @@ class HomeController extends Controller
         where(['value' => $user->emotion])->first();
         $emotion = count($emotion) > 0 ? $emotion->name : '';
 //        当前梦想
+
         $near_dream =DreamInfoModel::where('user_id',$user->id)->orderBy('id','desc')->first();
 //         封面图片
         $imgs =$user->allImgs;
@@ -86,11 +87,10 @@ class HomeController extends Controller
         foreach ($sup_dreams as $sup_dream){
             $sup_dream->pics = $sup_dream->imgs;
         }
-        $is_care = UserCareUser::where('other_user_id',$user_id)->where('user_id',$user->id)->first();
+        $login_user = $this->getUser();
+        $is_care = UserCareUser::where('other_user_id',$user_id)->where('user_id',$login_user->id)->first();
         $is_care = empty($is_care) ? 0 : 1 ;
-
         return $this->api(compact('user','near_dream','sup_dreams','imgs','dreams','score','is_care'));
-
     }
 
     //    关注用户
@@ -162,9 +162,11 @@ class HomeController extends Controller
                 ];
                 SystemInfoModel::create($info);
             }
+
         }else{
             UserCareUser::where('user_id',$user->id)->
             where('other_user_id',$request->id)->delete();
+//            return $this->api(0);
         }
         return $this->api($is_care);
 

+ 88 - 57
server/app/Http/Controllers/Api/V1/IndexController.php

xqd xqd xqd
@@ -3,9 +3,11 @@
 namespace App\Http\Controllers\Api\V1;
 
 use App\Models\BaseSettingsModel;
+use App\Models\CommentInfoModel;
 use App\Models\DreamInfoModel;
 use App\Models\SearchInfoModel;
 use App\Models\UserCareDream;
+use App\Models\UserCareUser;
 use App\Models\UserInfoModel;
 use Illuminate\Http\Request;
 class IndexController extends Controller
@@ -22,59 +24,81 @@ class IndexController extends Controller
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 OK
      *{
-     *  "status": true,
-     *  "status_code": 0,
-     *  "message": "",
-     *  "data": {
-     *      "banners": [                                      轮播图
-     *          {
-     *              "id": 34,
-     *               "key": "4",
-     *              "value": "http://w17.9026.com/img/banner/banner_4.png",
-     *              "sort": 0,
-     *              "category": "banner",
-     *              "pid": 0,
-     *              "status": 1,
-     *              "created_at": null,
-     *              "updated_at": null,
-     *             "deleted_at": null
-     *          }
-     *      ],
-     *      "users": [],                                     动态用户
-     *      "dreams": {                                      梦想列表
-     *          "current_page": 1,
-     *          "data": [
-     *              {
-     *                  "id": 5,
-     *                  "user_id": 1,
-     *                 "name": "梦想标题1",
-     *                  "about": "梦想介绍",
-     *                  "coin": 2500,
-     *                  "time": 21,                         实现时间
-     *                  "get_coin": 0,
-     *                  "status": 0,
-     *                  "video": null,
-     *                  "score": 100079365,
-     *                  "sign": "",
-     *                  "created_at": "2017-06-25 12:45:22",
-     *                  "updated_at": "2017-06-25 12:45:22",
-     *                  "care_num": 0,                       关注人数
-     *                 "img": {
-     *                  "title": "",
-     *                        "pic": "https://timgsa.baidu.com/timg?ica852e6e9c6ec46b7b14f12f.jpg"       梦想封面图片
-     *                   }
-     *              },
-     *          ],
-     *          "from": 1,
-     *          "last_page": 1,
-     *          "next_page_url": null,
-     *          "path": "http://www.miao.com/api/index/home",
-     *          "per_page": 20,
-     *          "prev_page_url": null,
-     *         "to": 5,
-     *          "total": 5
-     *      }
-     *  }
+     *   "status": true,
+     *   "status_code": 0,
+     *   "message": "",
+     *   "data": {
+     *   "banners": [
+     *       {
+     *           "id": 32,
+     *           "key": "2",
+     *           "value": "http://w17.9026.com/img/banner/banner_2.png",
+     *           "sort": 2,
+     *           "category": "banner",
+     *           "pid": 0,
+     *           "status": 1,
+     *           "created_at": null,
+     *            "updated_at": "2017-06-26 09:21:36",
+     *           "deleted_at": null
+     *       }
+     *   ],
+     *   "dtusers": [                 动态用户
+     *       {
+     *           "id": 3,
+     *           "user_id": 1,
+     *           "other_user_id": 2,
+     *           "dream_number": 1,
+     *           "created_at": null,
+     *           "updated_at": null,
+     *            "other_user": {               动态用户   头像和id
+     *               "id": 2,
+     *               "avatar": "http://www.miao.com/upload/user/20170630/08e235d7211944e9b6482965b4d7c42e.jpg",
+     *           }
+     *       }
+     *  ],
+     *  "hdusers": [],                          互动用户
+     *   "dreams": {
+     *       "current_page": 1,
+     *       "data": [
+     *           {
+     *               "id": 5,
+     *               "user_id": 1,
+     *               "name": "梦想标题1",
+     *               "about": "梦想介绍",
+     *               "coin": 2500,
+     *               "end_time": "2017-05-11 17:00:00",
+     *               "get_coin": 0,
+     *               "mark": 0,
+     *               "status": 2,
+     *               "video": "url",
+     *               "score": 100079365,
+     *               "sign": "梦想达人",
+     *               "code": "",
+     *               "parameter": 100,
+     *               "created_at": "2017-06-25 12:45:22",
+     *               "updated_at": "2017-07-03 12:23:37",
+     *              "care_num": 1,
+     *               "img": {
+     *                   "title": "",
+     *                   "pic": "http://www.miao.com/upload/dream/20170629/a18cadd1560f21453a08fdd81fb8fb2d.jpg"
+     *               },
+     *               "user": {
+     *                   "id": 1,
+     *                   "avatar": "/upload/user/20170629/e77068cc14c82086fb6b16e5bb7c3dd1.jpg",
+     *               }
+     *           },
+     *       }
+     *  ],
+     *   "from": 1,
+     *   "last_page": 1,
+     *   "next_page_url": null,
+     *   "path": "http://www.miao.com/api/index/home",
+     *   "per_page": 20,
+     *   "prev_page_url": null,
+     *   "to": 11,
+     *   "total": 11
+     *   }
+     *   }
      *}
      * @apiErrorExample {json} Error-Response:
      * HTTP/1.1 400 Bad Request
@@ -87,25 +111,32 @@ class IndexController extends Controller
      */
     public function home(Request $request)
     {
+        $login_user = $this->getUser();
+        $id = $login_user->id;
         $arr1 =DreamInfoModel::orderBy('score','desc')->limit(20)->select('id')->get()->toArray();
         $id_arr1 = array_column($arr1,'id');
         $arr2 =DreamInfoModel::orderBy('score','desc')->limit(120)->select('id')->get()->toArray();
         $id_arr2 = array_column($arr2,'id');
-        $users = UserInfoModel::all()->toArray();
+        $dtusers =UserCareUser::where('user_id',$id)->with('other_user')->
+        where('dream_number','>',0)->orderBy('created_at')->get()->toArray();
+
+        $hdusers = CommentInfoModel::where(function ($query) use ($id) {
+            $query->where('user_id',$id)->orWhere('to_user_id',$id);
+        })->where('is_read',0)->with('to_user')->orderBy('created_at')->get()->toArray();
         $type = $request->type;
         if ($type == 'trend') {
             $dreams = DreamInfoModel::orderBy('score','desc')->with('user')->whereNotIn('id', $id_arr1)->limit(100)->paginate(20);
             $this->dreams($dreams);
-            return $this->api(compact('users','dreams'));
+            return $this->api(compact('dtusers','hdusers','dreams'));
         } elseif ($type == 'news') {
             $dreams = DreamInfoModel::orderBy('score','desc')->orderBy('created_at','desc')->with('user')->whereNotIn('id', $id_arr2)->limit(500)->paginate(20);
             $this->dreams($dreams);
-            return $this->api(compact('users','dreams'));
+            return $this->api(compact('dtusers','hdusers','dreams'));
         } else{
             $banners = $this->getBanner();
             $dreams = DreamInfoModel::orderBy('score','desc')->with('user')->limit(20)->paginate(20);
             $this->dreams($dreams);
-            return $this->api(compact('banners','users','dreams'));
+            return $this->api(compact('banners','dtusers','hdusers','dreams'));
         }
     }
 

+ 6 - 3
server/app/Http/Controllers/Api/V1/InteractionController.php

xqd xqd xqd xqd
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Api\V1;
 
 use App\Models\CommentInfoModel;
 use App\Models\InteractionInfo;
+use App\Models\ReplyCommentsInfo;
 use App\Models\UserCareDream;
 use Illuminate\Http\Request;
 use App\Services\Base\ErrorCode;
@@ -139,6 +140,7 @@ class InteractionController extends Controller
      * @apiGroup Interaction
      * @apiParam {text}  content        回复内容
      * @apiParam {int} comment_id       评论ID
+     * @apiParam {int} interaction_id       动态ID
      * @apiPermission Passport
      * @apiVersion 0.1.0
      * @apiSuccessExample {json} Success-Response:
@@ -163,6 +165,7 @@ class InteractionController extends Controller
         $validator = \Validator::make($request->all(),
             [
                 'id'  => 'required',
+                'interaction_id'  => 'required',
                 'content'  => 'required',
             ],
             [
@@ -174,14 +177,14 @@ class InteractionController extends Controller
         if($validator->fails()) return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
 
         $user = $this->getUser();
-        $data['user_id'] = $user->id;
-        $data['comment_id'] = $request->id;
+        $data['to_user_id'] = $user->id;
+        $data['interaction_id'] = $request->interaction_id;
         $data['content'] = $request->content;
 
         if (!$request->content)
             return $this->error(ErrorCode::CONNET_NOT_EXIST);
 
-        $ok =  ReplyCommentsInfo::create($data);
+        $ok =  CommentInfoModel::create($data);
 
         if ($ok) {
             return $this->api('');

+ 53 - 47
server/app/Http/Controllers/Api/V1/MyController.php

xqd xqd xqd xqd xqd xqd
@@ -12,6 +12,7 @@ use App\Models\Suggest;
 use App\Models\SystemInfoModel;
 use App\Models\UserBank;
 use App\Models\UserCareDream;
+use App\Models\UserCareUser;
 use App\Models\UserCashOut;
 use App\Models\UserInfoModel;
 use Illuminate\Http\Request;
@@ -25,40 +26,42 @@ class MyController extends Controller
      * @apiPermission Passport
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 O*  "status": true,
-     *{
-     *    "status": true,
-     *   "status_code": 0,
-     *   "message": "",
-     *   "data": {
-     *       "id": 1,
-     *       "phone": "13880642880",
-     *       "nickname": "name1",
-     *       "avatar": "https://tims%2Fitem%225_kzrcM.thumb.224_0.jpeg",
-     *       "birthday": "2000-06-21",
-     *       "sign": 0,
-     *       "money": 0,
-     *       "coin": 1300,
-     *       "sex": 1,
-     *       "signture": "",
-     *       "height": 170,
-     *       "work": "",
-     *       "emotion": 1,
-     *       "address": "",
-     *       "city": "",
-     *       "detail_address": "",
-     *       "status": 1,
-     *       "wechat": "",
-     *        "weibo": "",
-     *       "remember_token": "",
-     *       "created_at": "2017-06-25 10:27:08",
-     *       "updated_at": "2017-06-25 15:20:11",
-     *       "deleted_at": null,
-     *       "care_dreams_number": 2,
-     *       "fans_number": 0,
-     *       "collection_number": 0,
-     *       "interaction_number": 0,
-     *   }
-     *}
+    {
+        "status": true,
+        "status_code": 0,
+        "message": "",
+        "data": {
+            "id": 1,
+            "phone": "13880642880",
+            "nickname": "name1",
+            "avatar": "/upload/user/20170629/e77068cc14c82086fb6b16e5bb7c3dd1.jpg",
+            "birthday": "2000-06-21",
+            "sign": 0,
+            "money": 0,
+            "coin": 308,
+            "sex": 1,
+            "signture": "我的个性签名1",
+            "height": 170,
+            "work": "网红",
+            "emotion": 1,
+            "address": "",
+            "city": "上海",
+            "detail_address": "",
+            "status": 1,
+            "wechat": "",
+            "weibo": "",
+            "remember_token": "",
+            "created_at": "2017-06-25 10:27:08",
+            "updated_at": "2017-08-19 13:24:29",
+            "deleted_at": null,
+            "care_number": 0,   关注
+            "fans_number": 0,   粉丝
+            "dreams_number": 9,  梦想
+            "collection_number": 0,  收藏
+            "interaction_number": 0, 发帖
+            "huitie": 1,    回复
+        }
+    }
      * @apiErrorExample {json} Error-Response:
      * HTTP/1.1 400 Bad Request
      *{
@@ -77,14 +80,18 @@ class MyController extends Controller
          * 我的关注人数,我的粉丝,收藏
          * 点赞?徽章?
          * */
-        $care_num = $user->careDreams;
-        $user->care_dreams_number = count($care_num);
-        $fens = UserCareDream::where('dream_user_id',$user->id)->get();
+        $care_num = $user->UserCareUser;
+        $user->care_number = count($care_num);
+        $fens = UserCareUser::where('other_user_id',$user->id)->get();
         $user->fans_number = count($fens);
-        $collection = $user->myCollection;
+        $dreams = $user->dreams;
+        $user->dreams_number = count($dreams);
+        $collection = $user->collection;
         $user->collection_number = count($collection);
         $interaction_infos = $user->allInteraction;
         $user->interaction_number = count($interaction_infos);
+        $huitie = CommentInfoModel::where('user_id',$user->id)->orWhere('to_user_id',$user->id)->get()->groupBy('interaction_id');
+        $user->huitie = count($huitie);
         return $this->api($user);
     }
 
@@ -489,7 +496,7 @@ class MyController extends Controller
 //        $info['note'] = $data['type'].$data['name'];
 //        $ok = AccountLog::create($info);
         $data['user_id'] = $user->id;
-        $data['status'] = 0;
+        $data['status'] = 1;
         $ok = UserCashOut::create($data);
         if ($ok) {
             return $this->api(ErrorCode::verify);
@@ -961,11 +968,11 @@ class MyController extends Controller
             return $this->error(ErrorCode::OPERATION_FAILED);
         }
     } /**
-     * @api {post} /api/my/bank/img 添加二维码
+     * @api {post} /api/my/bank/qrcode 添加二维码
      * @apiDescription 添加二维码
      * @apiGroup My
      *    @apiParam {string} data[type]         类型
-     *    @apiParam {string} data[url]       二维码图片
+     *    @apiParam {string} data[qrcode]       二维码图片
      * @apiPermission Passport
      * @apiVersion 0.1.0
      * @apiSuccessExample {json} Success-Response:
@@ -991,21 +998,20 @@ class MyController extends Controller
         $validator = \Validator::make($request->all(),
             [
                 'data.type'  => 'required',
-                'data.url'  => 'required',
+                'data.qrcode'  => 'required',
             ],
             [
                 'data.type.required'  => '请选择账号类型',
-                'data.url.required'  => '请上传图片',
+                'data.qrcode.required'  => '请上传二维码图片',
             ]
         );
         if($validator->fails()) return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
         $data['user_id'] = $user->id;
-        $data['bank_user'] = '';
+       /* $data['bank_user'] = '';
         $data['bank_phone'] = '';
         $data['bank_number'] = '';
-        $data['bank_name'] = '';
-        $data['is_img'] = 1;
-        $info = UserBank::where('is_img',1)->where('user_id',$user->id)
+        $data['bank_name'] = '';*/
+        $info = UserBank::whereNotNull('qrcode')->where('user_id',$user->id)
             ->where('type',$data['type'])->first();  //定义为二维码
         if (empty($info)) {
             $ok =UserBank::create($data);

+ 5 - 0
server/app/Models/CommentInfoModel.php

xqd
@@ -22,6 +22,11 @@ class CommentInfoModel extends Model
         return $this->belongsTo('App\Models\UserInfoModel','user_id','id');
     }
 
+    public function to_user()
+    {
+        return $this->belongsTo('App\Models\UserInfoModel');
+    }
+
     public function dream()
     {
         return $this->hasOne('App\Models\DreamInfoModel','id','dream_id');

+ 2 - 1
server/app/Models/UserBank.php

xqd
@@ -13,6 +13,7 @@ class UserBank extends Model
         'bank_number',
         'bank_phone',
         'bank_user',
-        'is_img',
+        'type',
+        'qrcode',
     ];
 }

+ 48 - 0
server/app/Models/UserBanksModel.php

xqd
@@ -0,0 +1,48 @@
+<?php
+namespace App\Models;
+use App\Models\BaseModel;
+/**
+ *  @description 账户列表
+ *  @author  system;
+ *  @version    1.0
+ *  @date 2017-08-18 11:17:45
+ *
+ */
+class UserBanksModel extends BaseModel
+{
+    /**
+     * 数据表名
+     *
+     * @var string
+     *
+     */
+    protected $table = 'user_banks';
+    /**
+    主键
+     */
+    protected $primaryKey = 'id';
+
+    //分页
+    protected $perPage = PAGE_NUMS;
+
+    /**
+     * 可以被集体附值的表的字段
+     *
+     * @var string
+     */
+    protected $fillable = [
+                           'user_id',
+                           'bank_name',
+                           'bank_number',
+                           'bank_phone',
+                           'bank_user',
+                           'type',
+                           'qrcode'
+                          ];
+
+    public function user()
+    {
+        return $this->belongsTo('App\Models\UserInfoModel');
+    }
+
+}

+ 5 - 0
server/app/Models/UserCareUser.php

xqd
@@ -12,4 +12,9 @@ class UserCareUser extends Model
         'other_user_id',
         'dream_number',
     ];
+
+    public function other_user()
+    {
+        return $this->belongsTo('App\Models\UserInfoModel');
+    }
 }

+ 10 - 0
server/app/Models/UserCashOutModel.php

xqd
@@ -38,4 +38,14 @@ class UserCashOutModel extends BaseModel
                            'comments'
                           ];
 
+    public function user()     //方法名加_id作为连接的外键名
+    {
+        return $this->belongsTo('App\Models\UserInfoModel');
+    }
+
+    public function bank()
+    {
+        return $this->belongsTo('App\Models\UserBanksModel');
+    }
+
 }

+ 21 - 0
server/app/Repositories/User/BanksRepository.php

xqd
@@ -0,0 +1,21 @@
+<?php
+/**
+ *   账户列表
+ *  @author  system
+ *  @version    1.0
+ *  @date 2017-08-18 11:17:45
+ *
+ */
+namespace App\Repositories\User;
+
+use App\Repositories\Base\Repository;
+
+
+class BanksRepository extends Repository {
+
+    public function model() {
+        return \App\Models\UserBanksModel::class;
+    }
+
+    
+}

+ 11 - 4
server/app/Repositories/User/Cash/Criteria/MultiWhere.php

xqd
@@ -35,10 +35,17 @@ class MultiWhere extends Criteria {
     */
     public function apply($model, Repository $repository)
     {
-          if(isset($this->search['deleted_at']) && $this->search['deleted_at']) {
-                                    $model = $model->where('deleted_at',$this->search['deleted_at']);
-                                 }
-
+          if(isset($this->search['keyword']) && $this->search['keyword']) {
+              $keyword = '%'.$this->search['keyword'].'%';
+                $model = $model->whereHas('user', function ($query) use ($keyword) {
+                    $query->where('nickname','like','$keyword');
+                })->orWhereHas('bank', function ($query) use ($keyword) {
+                    $query->where('bank_name','like','$keyword')->
+                    orWhere('bank_number','like','$keyword');
+                });
+          }
+//          dump($keyword);
+//          dd($model->toSql());
          return $model;
     }
 

+ 10 - 8
server/app/Repositories/User/Criteria/MultiWhere.php

xqd
@@ -35,14 +35,16 @@ class MultiWhere extends Criteria {
     */
     public function apply($model, Repository $repository)
     {
-        if(isset($this->search['keyword']) && ! empty($this->search['keyword'])) {
-            $keywords = '%' . $this->search['keyword'] . '%';
-            $model = $model->where(function ($query) use ($keywords) {
-                $query->where('id'  , 'like', $keywords)
-                    ->orwhere('nickname', 'like', $keywords);
-            });
-        }
-        return $model;
+        if(isset($this->search['keyword']) && $this->search['keyword']) {
+              $model = $model->where('bank_name','like','%'.$this->search['keyword'].'%')
+              ->orWhere('bank_number','like','%'.$this->search['keyword'].'%')
+              ->orWhere('bank_phone','like','%'.$this->search['keyword'].'%')
+              ->orWhereHas('user', function ($query) {
+                  $query->where('nickname','like','%'.$this->search['keyword'].'%');
+              })
+              ;
+          }
+         return $model;
     }
 
 }

+ 7 - 4
server/database/migrations/2017_08_14_113214_create_user_banks_table.php

xqd
@@ -20,11 +20,14 @@ class CreateUserBanksTable extends Migration
         Schema::create('user_banks', function (Blueprint $table) {
             $table->increments('id')->comment('绑定银行卡,支付方式的id');
             $table->unsignedInteger('user_id')->comment('关联用户id, users.id');
-            $table->string('bank_name', 60)->comment('银行名称, 支付方式名称');
-            $table->string('bank_number', 120)->comment('银行卡号码, 支付宝帐号, 微信帐号');
-            $table->string('bank_phone', 120)->comment('银行卡 网上支付绑定的手机号');
-            $table->string('bank_user', 60)->comment('银行卡用户姓名');
+            $table->string('bank_name', 60)->comment('银行名称, 支付方式名称')->nullable();
+            $table->string('bank_number', 120)->comment('银行卡号码, 支付宝帐号, 微信帐号')->nullable();
+            $table->string('bank_phone', 120)->comment('银行卡 网上支付绑定的手机号')->nullable();
+            $table->string('bank_user', 60)->comment('银行卡用户姓名')->nullable();
+            $table->string('type',60)->comment('微信/支付宝')->nullable();
+            $table->string('qrcode')->comment('二维码')->nullable();
             $table->timestamps();
+            $table->softDeletes();
         });
     }
 

+ 0 - 32
server/database/migrations/2017_08_15_165425_add_is_img_to_user_banks.php

xqd
@@ -1,32 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class AddIsImgToUserBanks extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::table('user_banks', function (Blueprint $table) {
-            $table->tinyInteger('is_img')->default(0)->nullable()->after('bank_user')->comment('是否图片');
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::table('user_banks', function (Blueprint $table) {
-            //
-        });
-    }
-}

+ 0 - 33
server/database/migrations/2017_08_15_172747_add_is_url_to_user_banks.php

xqd
@@ -1,33 +0,0 @@
-<?php
-
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Database\Migrations\Migration;
-
-class AddIsUrlToUserBanks extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::table('user_banks', function (Blueprint $table) {
-            $table->string('url')->nullable()->after('bank_user')->comment('图片地址');
-            $table->string('type')->nullable()->after('bank_user')->comment('图片类型');
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::table('user_banks', function (Blueprint $table) {
-            //
-        });
-    }
-}

+ 1 - 7
server/database/migrations/2017_08_26_113215_create_user_cash_out_table.php

xqd
@@ -26,14 +26,8 @@ class CreateUserCashOutTable extends Migration
             $table->string('name')->comment('账号姓名');
             $table->decimal('cash', 8, 2)->comment('提现金额');
             $table->text('comments')->nullable()->comment('审核未通过原因, 备注等');
-            $table->tinyInteger('status')->comment('提现状态: 0, 申请提现; 1,审核通过; 2,已打款; 3,审核未通过');
+            $table->tinyInteger('status')->default(0)->comment('提现状态: 1, 申请提现; 2,已打款; 3,审核未通过');
             $table->nullableTimestamps();
-
-
-            
-
-            
-
         });
     }
 

+ 92 - 0
server/resources/views/admin/user/banks/check.blade.php

xqd
@@ -0,0 +1,92 @@
+@extends('admin.layout')
+
+@section('content')
+	<div class="wrapper wrapper-content animated fadeInRight">
+		<div class="row">
+			<div class="col-sm-12">
+				<div class="ibox float-e-margins">
+					<div class="ibox-title">
+						<h5>账户列表</h5>
+						<div class="ibox-tools">
+							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+							</a>
+						</div>
+					</div>
+					<div class="ibox-content">
+						<div class="row">
+							<form method="GET" action="" accept-charset="UTF-8">
+
+								<div class="col-sm-4">
+									<div class="input-group">
+										<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control">
+								<span class="input-group-btn">
+									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
+								</span>
+									</div>
+								</div>
+							</form>
+							@if(role('User/Banks/create'))
+								<div class="col-sm-3 pull-right">
+									<a href="{{ U('User/Banks/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
+								</div>
+							@endif
+						</div>
+
+						<table class="table table-striped table-bordered table-hover dataTables-example dataTable dataCheckTable">
+							<thead>
+							<tr>
+								<th><input class="btSelectAll" name="btSelectAll" type="checkbox"></th>
+								
+            <th class="sorting" data-sort="id"> 绑定银行卡,支付方式的id </th>
+            <th class="sorting" data-sort="user_id"> 关联用户id, users.id </th>
+            <th class="sorting" data-sort="bank_name"> 银行名称, 支付方式名称 </th>
+            <th class="sorting" data-sort="bank_number"> 银行卡号码, 支付宝帐号, 微信帐号 </th>
+            <th class="sorting" data-sort="bank_phone"> 银行卡 网上支付绑定的手机号 </th>
+            <th class="sorting" data-sort="bank_user"> 银行卡用户姓名 </th>
+            <th class="sorting" data-sort="type"> 微信/支付宝 </th>
+								<th width="22%">相关操作</th>
+							</tr>
+							</thead>
+							<tbody>
+							@if(isset($list))
+								@foreach($list as $key => $item)
+									<tr>
+									<td><input data-json='{!! json_encode($item) !!}'  name="btSelectItem" class="data_key" type="checkbox" value="{{ $item->id or 0 }}" /></td>
+									
+            <td>{{ $item->id }}</td>
+            <td>{{ $item->user_id }}</td>
+            <td>{{ $item->bank_name }}</td>
+            <td>{{ $item->bank_number }}</td>
+            <td>{{ $item->bank_phone }}</td>
+            <td>{{ $item->bank_user }}</td>
+            <td>{{ $item->type }}</td>
+									<td>
+										@if(role('User/Banks/view'))
+											<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('User/Banks/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
+										@endif
+									</td>
+								</tr>
+								@endforeach
+							@endif
+
+							</tbody>
+						</table>
+						<div class="row">
+							<div class="col-sm-6">
+								<div class="dataTables_info" id="DataTables_Table_0_info"
+									 role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
+							</div>
+							<div class="col-sm-6">
+								<div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
+									{!! $list->setPath('')->appends(Request::all())->render() !!}
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	@include('admin.tools.check_script');
+
+@endsection

+ 119 - 0
server/resources/views/admin/user/banks/edit.blade.php

xqd
@@ -0,0 +1,119 @@
+@extends('admin.layout')
+
+@section('content')
+
+<?php
+    if(!isset($data)) $data = array();
+    if(!$data && session("data")){
+        $data = session("data");
+    }
+    if(!$data && session('_old_input')){
+        $data = session("_old_input");
+    }
+?>
+<div class="wrapper wrapper-content animated fadeInRight">
+	<div class="row">
+		<div class="col-sm-12">
+			<div class="ibox float-e-margins">
+				<div class="ibox-title">
+					<h5>账户列表</h5>
+					<div class="ibox-tools">
+						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+						</a>
+					</div>
+				</div>
+				<div class="ibox-content">
+                    @if(role('User/Banks/index'))
+				    <div class="row">
+    					<div class="col-sm-3 pull-right">
+    					   <a href="{{ U('User/Banks/index')}}" class="btn btn-sm btn-primary pull-right">返回列表</a>
+    					</div>
+					</div>
+                    @endif
+
+		            <div class="row">
+                        <div class="col-lg-10">
+                            <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">
+
+                                    
+
+                <div class="form-group">
+                                    
+                 <label class="control-label col-sm-3">银行名称</label>
+                                    
+                   <div class="col-sm-9">
+                     <input id="data_bank_name" name="data[bank_name]" class="form-control" value="{{ $data['bank_name'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                    </div>
+                                
+                </div>    
+                <div class="form-group">
+                                    
+                 <label class="control-label col-sm-3">帐号</label>
+                                    
+                   <div class="col-sm-9">
+                     <input id="data_bank_number" name="data[bank_number]" class="form-control" value="{{ $data['bank_number'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                    </div>
+                                
+                </div>    
+                <div class="form-group">
+                                    
+                 <label class="control-label col-sm-3">银行卡手机号</label>
+                                    
+                   <div class="col-sm-9">
+                     <input id="data_bank_phone" name="data[bank_phone]" class="form-control" value="{{ $data['bank_phone'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                    </div>
+                                
+                </div>    
+                <div class="form-group">
+                                    
+                 <label class="control-label col-sm-3">银行卡用户姓名</label>
+                                    
+                   <div class="col-sm-9">
+                     <input id="data_bank_user" name="data[bank_user]" class="form-control" value="{{ $data['bank_user'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                    </div>
+                                
+                </div>    
+                <div class="form-group">
+                                    
+                 <label class="control-label col-sm-3">二维码类型</label>
+                                    
+                   <div class="col-sm-9">
+                       <select class="form-control" name="data[type]" id="">
+                           <option  value=""></option>
+                           <option value="支付宝"  {{!empty($data) && $data['type'] == '支付宝' ? 'selected' : '' }}>支付宝</option>
+                           <option  value="微信" {{!empty($data) && $data['type'] == '微信' ? 'selected' : '' }}>微信</option>
+                       </select>
+                    </div>
+                </div>
+                <div class="form-group">
+                                    
+                 <label class="control-label col-sm-3">二维码</label>
+                                    
+                   <div class="col-sm-9">
+                     {{--<input id="data_qrcode" name="data[qrcode]" class="form-control" value="{{ $data['qrcode'] or ''}}" required="" aria-required="true"  placeholder="">--}}
+                       <img style="width: 20px; " src="{{ $data['qrcode'] or ''}}" alt="">
+                    </div>
+                </div>
+                                
+                                <div class="form-group">
+                                    <label class="control-label col-sm-3">&nbsp;</label>
+                                    <div class="col-sm-9">
+                                        <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
+                                        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
+                                        <input type="submit" class="btn btn-success" style="margin-right:20px;">
+                                        <input type="reset" class="btn btn-default" >
+                                    </div>
+                                </div>
+        
+                            </form>
+                        </div>
+                        <!-- /.col-lg-10 -->
+                    </div>
+                    <!-- /.row -->
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+@endsection

+ 114 - 0
server/resources/views/admin/user/banks/index.blade.php

xqd
@@ -0,0 +1,114 @@
+@extends('admin.layout') 
+
+@section('content')
+<div class="wrapper wrapper-content animated fadeInRight">
+	<div class="row">
+		<div class="col-sm-12">
+			<div class="ibox float-e-margins">
+				<div class="ibox-title">
+					<h5>账户列表</h5>
+					<div class="ibox-tools">
+						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+						</a>
+					</div>
+				</div>
+				<div class="ibox-content">
+				    <div class="row">
+				        <form method="GET" action="" accept-charset="UTF-8">
+
+				        <div class="col-sm-4">
+				            <div class="input-group">
+								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
+								<span class="input-group-btn">
+									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
+								</span>
+    						</div>
+				        </div>
+				        </form>
+					{{--	@if(role('User/Banks/create'))
+    					<div class="col-sm-3 pull-right">
+    					   <a href="{{ U('User/Banks/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
+    					</div>
+						@endif--}}
+					</div>
+					
+					<table class="table table-striped table-bordered table-hover dataTables-example dataTable">
+						<thead>
+    						<tr>
+								
+            <th class="sorting" data-sort="id">id </th>
+            <th class="sorting" data-sort="user_id"> 用户名</th>
+            <th class="sorting" data-sort="bank_name"> 银行名称 </th>
+            <th class="sorting" data-sort="bank_number"> 卡号 </th>
+            <th class="sorting" data-sort="bank_phone"> 银行卡手机号 </th>
+            <th class="sorting" data-sort="bank_user"> 银行卡用户姓名 </th>
+            <th class="sorting" data-sort="qrcode"> 二维码 </th>
+            <th class="sorting" data-sort="type"> 二维码类型 </th>
+            <th class="updated_at" data-sort="type"> 添加时间 </th>
+        						<th width="22%">相关操作</th>
+        					</tr>
+						</thead>
+						<tbody>
+						@if(isset($list))
+							@foreach($list as $key => $item)							<tr>
+								
+            <td>{{ $item->id }}</td>
+            <td>{{ !empty($item->user) ? $item->user->nickname : '' }}</td>
+            <td>{{ $item->bank_name }}</td>
+            <td>{{ $item->bank_number }}</td>
+            <td>{{ $item->bank_phone }}</td>
+            <td>{{ $item->bank_user }}</td>
+            <td>
+				@if(!empty($item->qrcode))
+					<img src="{{$item->qrcode}}" width="40px" alt="">
+				@endif
+			</td>
+            <td>{{ $item->type }}</td>
+            <td>{{ $item->updated_at }}</td>
+								<td>
+									<div class="btn-group">
+										<button data-toggle="dropdown"
+											class="btn btn-warning btn-sm dropdown-toggle"
+											aria-expanded="false">
+											操作 <span class="caret"></span>
+										</button>
+										<ul class="dropdown-menu">
+
+
+											@if(role('User/Banks/update'))
+											<li><a href="{{ U('User/Banks/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
+											@endif
+
+											@if(role('User/Banks/destroy'))
+											<li class="divider"></li>
+											<li><a href="{{ U('User/Banks/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
+											@endif
+										</ul>
+									</div>
+							{{--	@if(role('User/Banks/view'))
+										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('User/Banks/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
+									@endif--}}
+								</td>
+							</tr>
+							@endforeach
+							@endif
+
+						</tbody>
+					</table>
+					<div class="row">
+						<div class="col-sm-6">
+							<div class="dataTables_info" id="DataTables_Table_0_info"
+								role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
+						</div>
+						<div class="col-sm-6">
+						<div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
+						{!! $list->setPath('')->appends(Request::all())->render() !!}
+						</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+@endsection

+ 88 - 0
server/resources/views/admin/user/banks/view.blade.php

xqd
@@ -0,0 +1,88 @@
+@extends('admin.layout')
+
+@section('content')
+<div class="row">
+    <div class="ibox-content">
+        <div class="list-group">
+                                 
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading">绑定银行卡,支付方式的id</h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['id'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading">关联用户id, users.id</h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['user_id'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading">银行名称, 支付方式名称</h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['bank_name'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading">银行卡号码, 支付宝帐号, 微信帐号</h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['bank_number'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading">银行卡 网上支付绑定的手机号</h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['bank_phone'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading">银行卡用户姓名</h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['bank_user'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading">微信/支付宝</h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['type'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading">二维码</h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['qrcode'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading"></h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['created_at'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading"></h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['updated_at'] or ''}}</p>
+                                                 
+               </div>                     
+               <div class="list-group-item">
+                                                  
+                   <h3 class="list-group-item-heading"></h3>
+                                                   
+                   <p class="list-group-item-text"> {{ $data['deleted_at'] or ''}}</p>
+                                                 
+               </div>
+        </div>
+    </div>
+</div>
+@endsection

+ 8 - 6
server/resources/views/admin/user/cash/out/index.blade.php

xqd xqd
@@ -38,7 +38,8 @@
 								
             <th class="sorting" data-sort="id"> id </th>
             <th class="sorting" data-sort="user_id"> 提现用户 </th>
-            <th class="sorting" data-sort="bank_id"> 绑定的提现方式 </th>
+            <th class="sorting" data-sort="bank_id"> 提现账号 </th>
+            <th class="sorting" data-sort="bank_id"> 账号姓名 </th>
             <th class="sorting" data-sort="status"> 提现状态</th>
             <th class="sorting" data-sort="cash"> 提现金额 </th>
             <th class="sorting" data-sort="created_at"> 提现时间 </th>
@@ -48,11 +49,12 @@
 						<tbody>
 						@if(isset($list))
 							@foreach($list as $key => $item)							<tr>
-								
-            <td>{{ $item->id }}</td>
-            <td>{{ $item->user_id }}</td>
-            <td>{{ $item->bank_id }}</td>
-            <td>{{ $item->status }}</td>
+
+			<td>{{ $item->id }}</td>
+			<td>{{ !empty($item->user) ? $item->user->nickname : '' }}</td>
+			<td>{{ !empty($item->bank) ? $item->bank->bank_number : '' }}</td>
+			<td>{{ !empty($item->bank) ? $item->bank->bank_name : '' }}</td>
+            <td>{{  dict()->get('global','cash_out',$item->status) }}</td>
             <td>{{ $item->cash }}</td>
             <td>{{ $item->created_at }}</td>
 								<td>

+ 2 - 2
server/routes/api.php

xqd
@@ -189,8 +189,8 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($a
         'as' => 'my.bank_create',
         'uses' => 'MyController@bankCreate',
     ]);
-    $api->post('my/bank/img', [
-        'as' => 'my.bank_create',
+    $api->post('my/bank/qrcode', [
+        'as' => 'my.qrcode',
         'uses' => 'MyController@bankImgCreate',
     ]);
     $api->get('my/bank/delete', [