YanaDH 7 éve
szülő
commit
c3665c3939

+ 1 - 1
miaomiao/www/css/style.css

xqd
@@ -606,7 +606,7 @@ a:visited,a:link{
     margin: 30% 10%;
 }
 .top2{
-    margin-top: 20px; text-align: center; float:left; height: 100px; width: 100px;color: #6B6B6B;font-size: 16px;
+    margin-top: 15px; text-align: center; float:left; height: 100px; width: 100px;color: #6B6B6B;font-size: 16px;
 }
 .top1{
     text-align: center; float:left; height: 111px; width: 111px;color: #6B6B6B;font-size: 14px;

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

xqd
@@ -4,8 +4,8 @@
         server: 'http://q8.9026.com/',
         imgServer: 'http://q8.9026.com/attachment/'
         
-        // server: 'http://localhost:8092/',
-        // imgServer: 'http://localhost:8092/attachment/'
+         //server: 'http://localhost:8092/',
+         //imgServer: 'http://localhost:8092/attachment/'
         //server: 'http://miao.beiyuesi.com/',
         //imgServer: 'http://miao.beiyuesi.com/attachment/'
     });

+ 64 - 14
miaomiao/www/js/controllers/my.js

xqd xqd xqd xqd
@@ -107,34 +107,40 @@
             $scope.aboutMiao = function(){
                 myService.aboutMiao().then(function(result){
                     $scope.items = result.data.data;
-                    debugger;
                 },function(error){
                     msg.error(error.data.message)
                 })
             };
         }]);
-    app.controller('withdrawCtrl', ["$scope","$ionicTabsDelegate","$timeout", "$state", "myService", "msg","storage"
-        , function ($scope,$ionicTabsDelegate, $timeout,$state,myService, msg, storage) {
+    app.controller('withdrawCtrl', ["$scope","$ionicTabsDelegate","$ionicHistory","$timeout", "$state", "myService", "msg","storage"
+        , function ($scope,$ionicTabsDelegate, $ionicHistory,$timeout,$state,myService, msg, storage) {
             $scope.vm={
                 pay:"",
                 cash:""
             };
             $scope.$on("$ionicView.enter",function(){
                 myService.showAccount().then(function(result){
+                    $scope.accountId = result.data.data;
                     var items = result.data.data;
                     $scope.pays=[];
                     angular.forEach(items,function(item){
-                        var value=item.bank_name+"(";
-                        var len=item.bank_number.length;
-                        var txt1=item.bank_number.substr(0,len-4).replace(/\d+/g,'**');
-                        var txt2=item.bank_number.substr(len-4,4);
-                        value=value+txt1+txt2+")";
+                        if(item.bank_name!=null) {
+                            var value=item.bank_name+"(";
+                            var len=item.bank_number.length;
+                            var txt1=item.bank_number.substr(0,len-4).replace(/\d+/g,'**');
+                            var txt2=item.bank_number.substr(len-4,4);
+                            value=value+txt1+txt2+")";
+                        }
+                        else {
+                            value=item.type;
+                        }
                         $scope.pays.push({id:item.id,value:value});
                     })
                 },function(error){
                     msg.error(error.data.message)
                 })
             });
+
             $scope.withdraw = function(){
                 var data = {
                     data:{
@@ -145,16 +151,58 @@
                 myService.withdraw(data).then(function(result){
                     msg.text("提现申请已提交");
                     $timeout(function () {
-                        $state.go("app.my");
+                        $ionicHistory.goBack();
                     },1000);
                 },function(error){
 
                 })
             }
         }]);
-    app.controller('payoutCtrl', ["$scope","$ionicTabsDelegate", "$state", "myService", "msg","storage"
-        , function ($scope,$ionicTabsDelegate, $state,myService, msg, storage) {
+    app.controller('payoutCtrl', ["$scope","$ionicTabsDelegate","$timeout","$ionicHistory", "$state", "myService", "msg","storage"
+        , function ($scope,$ionicTabsDelegate, $timeout, $ionicHistory,$state,myService, msg, storage) {
+            $scope.vm={
+                pay:"",
+                cash:""
+            };
+            $scope.$on("$ionicView.enter",function(){
+                myService.showAccount().then(function(result){
+                    $scope.accountId = result.data.data;
+                    var items = result.data.data;
+                    $scope.pays=[];
+                    angular.forEach(items,function(item){
+                        if(item.bank_name!=null) {
+                            var value=item.bank_name+"(";
+                            var len=item.bank_number.length;
+                            var txt1=item.bank_number.substr(0,len-4).replace(/\d+/g,'**');
+                            var txt2=item.bank_number.substr(len-4,4);
+                            value=value+txt1+txt2+")";
+                        }
+                        else {
+                            value=item.type;
+                        }
+                        $scope.pays.push({id:item.id,value:value});
+                    })
+                },function(error){
+                    msg.error(error.data.message)
+                })
+            });
+
+            $scope.withdraw = function(){
+                var data = {
+                    data:{
+                        bank_id:$scope.vm.pay.id,
+                        cash:$scope.vm.cash
+                    }
+                };
+                myService.withdraw(data).then(function(result){
+                    msg.text("提现申请已提交");
+                    $timeout(function () {
+                        $ionicHistory.goBack();
+                    },1000);
+                },function(error){
 
+                })
+            }
         }]);
     app.controller('payExplainCtrl', ["$scope","$ionicTabsDelegate", "$state", "myService", "msg","storage"
         , function ($scope,$ionicTabsDelegate, $state,myService, msg, storage) {
@@ -399,8 +447,8 @@
       }
 
   }]);
-    app.controller('payCtrl', ["$scope","$ionicTabsDelegate", "$state", "myService", "msg"
-        , function ($scope,$ionicTabsDelegate, $state, myService, msg) {
+    app.controller('payCtrl', ["$scope","$ionicTabsDelegate", "$timeout","$ionicHistory","$state", "myService", "msg"
+        , function ($scope,$ionicTabsDelegate, $timeout,$ionicHistory,$state, myService, msg) {
             $scope.$on('$ionicView.beforeEnter', function () {
                 myService.myInfo().then(function(result){
                     $scope.vm = result.data.data;
@@ -417,7 +465,9 @@
             $scope.recharge = function(money){
                 myService.recharge(money).then(function(result){
                     msg.text("充值成功");
-                    $state.go('app.my');
+                    $timeout(function(){
+                        $ionicHistory.goBack();
+                    },1000)
                 });
             }
 

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

xqd
@@ -1,5 +1,5 @@
 (function (module) {
-    module.controller('tabsCtrl', ["$scope","$http", "myService", "$ionicHistory", "$state", function ($scope,$http, myService, $ionicHistory, $state) {
+    module.controller('tabsCtrl', ["$scope","$http", "myService","storage", "$ionicHistory", "$state", function ($scope,$http, myService, storage,$ionicHistory, $state) {
         $scope.go = function(target) {
             $ionicHistory.clearHistory();
             if($state.current.name=="app.home"&&target=="app.add"){

+ 34 - 5
miaomiao/www/templates/home/dream-detail.html

xqd xqd xqd xqd
@@ -92,14 +92,22 @@
                     </div>
                 </div>
                 <div class="detail-head" style="height: 130px" ng-if="dream.top3user.length>0">
-                    <div class="row">
-                        <div class="col top2" ng-if="dream.top3user.length>1" style="background: url('img/img_No2.svg') no-repeat; background-size: 100% 100%;">
+                    <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>
+                        </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>
+                        </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>
                         </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>
                         </div>
-                        <div class="col top2" ng-if="dream.top3user.length>2" style="background: url('img/img_No3.svg') no-repeat; background-size: 100% 100%;">
+                        <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>
                         </div>
                     </div>
@@ -161,7 +169,21 @@
         </div>
         <div ng-if="type==3" class="phbcontent">
             <div class="detail-head" style="height: 180px" ng-if="dream.top3user.length>0">
-                <div class="row">
+                <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>
+                        {{ dream.top3user[0].nickname }}<br>
+                        <img 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>
+                        {{ dream.top3user[1].nickname }}<br>
+                        <img 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>
                         {{ dream.top3user[1].nickname }}<br>
@@ -182,6 +204,13 @@
                     </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">
+                    </div>
+                </div>
+            </div>
             <div class="list padding">
                 <div class="item" ng-if="$index > 2 " ng-repeat="user in dream.topuser" style="border-bottom: 1px solid #DFDFDF">
                     <div style="float:left; color: #808080; font-size: 30px; font-weight: bold; margin-top: 10px">
@@ -393,7 +422,7 @@
                         <div style="float:left; padding-top: 4px;height: 45px;">
                             <img src="img/icon_gold.svg"/>
                         </div>
-                        <em>{{dream.user_coin}}&nbsp;</em>
+                        <em>{{user.coin}}&nbsp;</em>
                     </div>
                     <div class="calm" ng-click="toRecharge()" style="float: left;">
                         <div style="float:left; padding-top: 4px;height: 45px;">

+ 1 - 0
miaomiao/www/templates/my/withdraw.html

xqd
@@ -6,6 +6,7 @@
                  提现到
              </span>
                 <select name="pay" ng-model="vm.pay" ng-options="pay.value for pay in pays track by pay.id" >
+                    <option value="" selected hidden></option>
                 </select>
             </label>
             <label class="item item-input ">