YanaDH пре 7 година
родитељ
комит
895297be3c

+ 1 - 1
miaomiao/www/chcp.json

xqd
@@ -1,5 +1,5 @@
 {
   "update": "now",
   "content_url": "http://i.9026.com/miaomiao",
-  "release": "2017.08.30-20.00.38"
+  "release": "2017.08.31-09.38.55"
 }

+ 8 - 8
miaomiao/www/chcp.manifest

xqd xqd xqd xqd xqd
@@ -13,7 +13,7 @@
   },
   {
     "file": ".idea/workspace.xml",
-    "hash": "8b0d118957ef110197486dabc401a585"
+    "hash": "45a62e1df43fc8f2b00c7e564bea0591"
   },
   {
     "file": ".idea/www.iml",
@@ -401,19 +401,19 @@
   },
   {
     "file": "js/controllers/account.js",
-    "hash": "e4fbc7d47a6e7b8bebbf978b8400f5a2"
+    "hash": "d398cdf936584f691e523a88d75dd1a4"
   },
   {
     "file": "js/controllers/add.js",
-    "hash": "f65c172ea5e948ea63405b09f4100edc"
+    "hash": "380e6d6e3b09ec45d8244b054a4f9319"
   },
   {
     "file": "js/controllers/home.js",
-    "hash": "164888ce155251c164a7e210eee34e2a"
+    "hash": "5bf0936988dc88bfdf2bcd2b13d6f1b8"
   },
   {
     "file": "js/controllers/my.js",
-    "hash": "d0ebf31143fae9676f5383ab4865c6cc"
+    "hash": "0883c1383db953ee30b80f4e1198a469"
   },
   {
     "file": "js/controllers/tabs.js",
@@ -457,7 +457,7 @@
   },
   {
     "file": "js/services/myservice.js",
-    "hash": "a01d04bf5ef841aaa796ad6f855535ba"
+    "hash": "678c0bfe866c9b8430457967b10b6f70"
   },
   {
     "file": "js/services/storageservice.js",
@@ -761,7 +761,7 @@
   },
   {
     "file": "templates/home/dream-detail.html",
-    "hash": "10d46645abfdd9051d65b2e3400c76bb"
+    "hash": "54707290192201493de313ca3ada8c34"
   },
   {
     "file": "templates/home/index.html",
@@ -837,7 +837,7 @@
   },
   {
     "file": "templates/my/my-recharge.html",
-    "hash": "146fefb366afd60a07bd1f8701857669"
+    "hash": "86c981f7df6d974c65459e522be7f9b3"
   },
   {
     "file": "templates/my/my-setting.html",

+ 13 - 1
miaomiao/www/js/controllers/account.js

xqd xqd
@@ -3,10 +3,15 @@
         function ($scope,userService,$ionicNavBarDelegate, storage, $state, msg, $http, util) {
              //$ionicNavBarDelegate.showBackButton(false);
             $scope.wechat_login = function(){
+<<<<<<< HEAD
                /* var scope = "snsapi_userinfo", state = "_" + (+new Date());
                 Wechat.auth(scope, state, function (response) {
+=======
+                var scope = "snsapi_userinfo", state = "_" + (+new Date());
+                // Wechat.auth(scope, state, function (response) {
+>>>>>>> 360a5ba8c8ad9157ee85aa0345e508f1865df1a6
                     // alert("response:"+JSON.stringify(response));
-                    // var response={code:1231};
+                    var response={code:1231};
                     if(response.code){
                         msg.loading('登录中...');
                         userService.wechat_login(response.code).then(function(result){
@@ -26,10 +31,17 @@
                             $state.go("loginAccount",{wechat:$scope.wecaht});
                         });
                     }
+<<<<<<< HEAD
                 }, function (error) {
                     console.log("Failed: " + JSON.stringify(error));
                 });*/
                 $state.go("loginAccount");
+=======
+                // }, function (error) {
+                //     console.log("Failed: " + JSON.stringify(error));
+                // });
+                //$state.go("loginAccount");
+>>>>>>> 360a5ba8c8ad9157ee85aa0345e508f1865df1a6
             };
     }]);
     app.controller('loginCtrl', ["$scope", "userService","$stateParams","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","$timeout",

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

xqd
@@ -42,7 +42,7 @@
             $scope.add = function () {
                 var data = {
                     pics: $scope.imgs,
-                    video:$scope.video.server,
+                    video: $scope.video.server,
                     name: $scope.vm.name,
                     about: $scope.vm.about,
                     days: 21, //默认21

+ 5 - 0
miaomiao/www/js/controllers/home.js

xqd xqd xqd
@@ -226,6 +226,9 @@
                     $scope.code = false;
                 };
                 $scope.dream = result.data.data;
+                if($scope.timer=='已结束'|| 100*$scope.dream.get_coin/$scope.dream.coin>=100){
+                    $scope.codeBtn = true; 
+                }
                 if($scope.dream.video){
                     $scope.dream.vpic = config.server+'upload/vpic/'+$scope.dream.video+'.jpg';
                     $scope.dream.video = config.imgServer+$scope.dream.video;
@@ -574,6 +577,7 @@
             $scope.modal.show();
             $scope.vm.title = '';
             $scope.imgs = [];
+            $scope.video = {};
           };
           $scope.closeModal = function() {
             $scope.modal.hide();
@@ -932,6 +936,7 @@
                 $scope.modal.show();
                 $scope.vm.title = '';
                 $scope.imgs = [];
+                $scope.video = {};
             };
             $scope.closeModal = function() {
                 $scope.modal.hide();

+ 11 - 0
miaomiao/www/js/controllers/my.js

xqd
@@ -387,6 +387,17 @@
             $state.go("app.withdraw")
         };
            
+      $scope.testcharge = function(number){
+        if (!number) {
+              msg.text('请输入充值金额');
+              return;
+        }
+        myService.testcharge(number,2).then(function (result) {
+             msg.text("充值成功");
+             $scope.vm.coin = parseInt($scope.vm.coin) + parseInt(number)
+            //   $state.go('app.my');
+        });
+      }
       //充值
       $scope.charge = function(number){
           if (!number) {

+ 6 - 0
miaomiao/www/js/services/myservice.js

xqd
@@ -14,6 +14,12 @@
                     data: { password: password }
                 })
             },
+            testcharge:function(number,type){
+                return $http({
+                    url:config.server + "api/my/recharge?coin="+number,
+                    method:"post"
+                })
+            },
             charge:function(number,type){
                 return $http({
                     url:config.server + "api/pay/charge",

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

xqd
@@ -286,13 +286,13 @@
                 <a ng-repeat="item in imgs" ng-click="showImages(item)" 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()">
+                <a class="btn-file-up" ng-click="addpict()" ng-show="!video.isOK">
                     <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>
                 <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">
+                <a class="btn-file-up" ng-click="addvideo()" ng-show="!video.isOK&&imgs.length==0">
                     <img src="img/icon_video.svg" style="height: 40px; width: 40px; text-align: center; line-height: 40px" /><br>
                     <em style="font-size: 16px">添加视频</em>
                 </a>

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

xqd
@@ -39,7 +39,7 @@
             </ion-list>
         </div>
         <div class="padding">
-            <button  class="button button-block button-calm" ng-click="charge(vm.number)">
+            <button  class="button button-block button-calm" ng-click="testcharge(vm.number)">
                 支付
             </button>
         </div>

+ 4 - 2
server/app/Http/Controllers/Admin/Dream/InfoController.php

xqd
@@ -72,15 +72,17 @@ class InfoController extends Controller
             $url[] = array('url'=>U( 'Dream/Info/index'),'title'=>'返回列表');
             return $this->showWarning('请添加图片',$url);
         }
+        $data['created_at'] = date('Y-m-d H:i:s');
+        $data['updated_at'] = date('Y-m-d H:i:s');
         $id = DreamInfoModel::insertGetId($data);
         //        生成二维码
-        $info['transaction_id'] = date('YmdHis') . mt_rand(1000, 9999);
+       /* $info['transaction_id'] = date('YmdHis') . mt_rand(1000, 9999);
         $info['code'] = 'WECHATPAY_' . $info['transaction_id'];
         $code_url = env('APP_URL').'/user/meet?dream_id='.$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',$id)->update(compact('code'));
+        DreamInfoModel::where('id',$id)->update(compact('code'));*/
         if($id) {
             $arr = [];
             foreach ($pics['url'] as $pic) {

+ 3 - 1
server/app/Http/Controllers/Admin/Share/InfoController.php

xqd
@@ -10,11 +10,13 @@ class InfoController extends Controller
 {
     public function view(Request $request){
         $dream = DreamInfoModel::with('img')->find($request->id);
-        $times = (strtotime($dream->end_time) -strtotime( $dream->created_at));
+        $times = (strtotime($dream->end_time) -time());
         if ($times>=3600*24) {
             $days =floor($times/3600/24)  .'天';
         } elseif($times>3600 && $times< 3600*24){
             $days = floor($times/3600) .'小时';
+        }elseif($times <=0){
+            $days = '已结束';
         }else{
             $days =floor ($times/60) .'分钟';
         }

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

xqd
@@ -181,6 +181,7 @@ class IndexController extends Controller
      * @apiErrorExample {json} Error-Response:
      * HTTP/1.1 400 Bad Request
      */
+
     public function search(Request $request)
     {
         $user = $this->getUser();

+ 1 - 2
server/resources/views/admin/share.blade.php

xqd xqd
@@ -17,7 +17,6 @@
     </style>
 </head>
 <body>
-<h4 style="text-align: center; font-weight: normal; width: 100%; border-bottom: 1px solid #DEDEDE; padding-bottom: 15px">分享梦想页</h4>
 <img style="width: 100%; height: 100%;" src="{{!empty($dream->img) ? $dream->img->pic : ''}}
 
 ">
@@ -51,7 +50,7 @@
         <p style="font-size: 13px; color: #919191">我要求的梦想币</p>
     </div>
 </div>
-<div style="padding: 0 10px">
+<div style="padding: 0 10px 20px  10px">
     <div style="background-color:#E6E6E6; width: 100%;">
         <div style="width: {{($dream->get_coin / $dream->coin)}} %; background: #FF6600; height: 5px">
         </div>