YanaDH 7 anos atrás
pai
commit
168957cdf9

BIN
miaomiao/www/img/close.png


+ 1 - 1
miaomiao/www/js/config/router.js

xqd
@@ -40,7 +40,7 @@
             })
             .state('app.home_dreamdetail', {
                 url: '/home/dreamdetail?id=',
-                params:{id:null},
+                params:{id:null,type:null},
                 views: {
                     'app-home': {
                         templateUrl: 'templates/home/dream-detail.html',

+ 4 - 2
miaomiao/www/js/controllers/account.js

xqd xqd
@@ -8,7 +8,8 @@
                      // alert("response:"+JSON.stringify(response));
                      // var response={code:1231};
                     if(response.code){
-                        msg.loading('登录中...');
+                        //msg.loading('登录中...');
+                        msg.loading();
                         userService.wechat_login(response.code).then(function(result){
                             msg.hide();
                              // alert("wechat_login success: " + JSON.stringify(result));
@@ -42,7 +43,8 @@
                 waitSeconds: "获取验证码"
             };
             $scope.login = function () {
-                msg.loading('登录中...');
+                //msg.loading('登录中...');
+                msg.loading();
                 userService.login($scope.vm.mobile, $scope.vm.verify_code,$scope.wechat).then(function (result) {
                 //userService.login($scope.vm.mobile, $scope.vm.verify_code,124).then(function (result) {
                     msg.hide();

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

xqd
@@ -49,7 +49,8 @@
                     days: 21, //默认21
                     coin: $scope.vm.coin
                 };
-                msg.loading('保存中...');
+                //msg.loading('保存中...');
+                msg.loading();
                 dreamService.addDream(data).then(function (result) {
                     msg.hide();
                     $state.go('app.home');

+ 22 - 3
miaomiao/www/js/controllers/home.js

xqd xqd xqd xqd xqd
@@ -26,8 +26,7 @@
             //$scope.chosedIndex = 0;
            $scope.clickAvatar = function(id){
                homeService.toUserDetail(id).then(function(result){
-                   $scope.items = result.data.data;
-                   $state.go('app.home_userDetail',{id:id,items:$scope.items});
+                   $state.go('app.home_dreamdetail',{id:id,type:2});
                },function(error){
                        //msg.error(msg.data.error)
                });
@@ -51,6 +50,7 @@
             $scope.type = type;
             $scope.load(true);
         };
+
         $scope.toDetail = function (id) {
             $state.go('app.home_dreamdetail',{id:id});
         };
@@ -89,9 +89,22 @@
             age: 0,//0:全部,1:18-21,2:22-25,3:26-29,4:30-33,5:34-37,6:>38,7:>18
             city:''
         };
+
+            $scope.ages = [
+                {"id": 0, "age": "所有"},
+                {"id": 1, "age": "<18"},
+                {"id": 2, "age": "18-21"},
+                {"id": 3, "age": "22-25"},
+                {"id": 4, "age": "26-29"},
+                {"id": 5, "age": "30-33"},
+                {"id": 6, "age": "34-37"},
+                {"id": 7, "age": ">37"}
+            ];
+
             $scope.doFilter = function () {
                 homeService.doFilter($scope.filter.sex,$scope.filter.age,$scope.filter.city).then(function(result){
                     $scope.index.dreams = result.data.data.dreams.data;
+                    debugger;
                 },function(error){
                     msg.error(data.error.message);
                 });
@@ -182,6 +195,12 @@
         , function ($scope,$location, $ionicHistory,$timeout,$state,WechatService,$ionicModal, storage , msg, common, config, homeService, $ionicTabsDelegate, $stateParams,$ionicBackdrop, $timeout, $ionicScrollDelegate, $interval) {
             var id = $stateParams.id;
             var top3user = '';
+            if($stateParams.type!=null){
+                $scope.type = $stateParams.type;
+            }
+            else {
+                $scope.type = 1;//tab切换
+            }
             $scope.chosedIndex = 0;
             $scope.clickAvatar = function (index) {
                 $scope.chosedIndex = index;
@@ -281,7 +300,7 @@
             result: 1,
             promise:null
         };
-        $scope.type = 1;//tab切换
+
         $scope.tosupport = false;
         $scope.support = function ($event) { 
             $event.stopPropagation();

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

xqd xqd
@@ -72,7 +72,8 @@
                 if($scope.vm.avatar){
                   data.pic = $scope.vm.avatar;
                 }
-                msg.loading('提交中...');
+                //msg.loading('提交中...');
+                msg.loading();
  
                 myService.saveMaterial(data).then(function(result){
                   msg.hide();
@@ -560,7 +561,8 @@
                         bank_user:$scope.vm.bank_user
                     }
                 };
-                msg.loading('保存中...');
+                //msg.loading('保存中...');
+                msg.loading();
                 myService.addAccount(data).then(function (result) {
                     msg.hide();
                     $state.go('app.my_account');

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

xqd
@@ -374,8 +374,9 @@
     </script>
     </ion-content>
         <div class="detail-like" ng-if="tosupport">
-            <div style="text-align: center; border-bottom: 3px solid #8D8D8E">
+            <div style="text-align: center; border-bottom: 3px solid #8D8D8E; position: relative">
                 <img ng-src="img/img_miao.png" style="width: 25%; height: 55px;margin-bottom: -13px">
+                <img src="img/close.png" ng-click="cancelSupport()" style="position: absolute; bottom: -10px; right: 0; width: 20px;" />
             </div>
             <div style="background: #fff;">
                 <div class="coin">

+ 11 - 21
miaomiao/www/templates/home/index.html

xqd xqd
@@ -1,8 +1,6 @@
 <ion-view view-title="瞄瞄">
     <ion-nav-buttons side="left">
-        <button class="button button-clear" style="height: 30px; width: 30px;margin-top: 1.6px;margin-left: 2px;" ng-click="openPopover($event)">
-            <img src="img/icon_menu.svg" style="height: 60%; width: 100%;">
-        </button>
+        <i class="icon ion-qr-scanner" style="margin-top: 8px; font-size: 22px" ng-click="qrscan()"></i>
         <button class="button button-clear" style="height: 30px; width: 30px;font-size: 25px; margin-top: 0.5px" ng-click="toggleLeftSideMenu()">
             <img src="img/btn_filter.svg" style="height: 63%; width: 100%;">
         </button>
@@ -94,29 +92,21 @@
         <!-- Left menu -->
         <ion-side-menu side="left" width="200">
             <ion-header-bar class="expanded" menu-close>
-                喵喵
+                瞄瞄
             </ion-header-bar>
             <ion-content class="stable-bg has-expanded-header">
                 <ion-list>
                     <ion-item>
                       <span style="font-weight:bold;font-size:1.1rem">性别</span>
-<div class="list">
-     <div class="item">
-         <img ng-src="{{filter.sex==1?'img/icon_man_h.svg':'img/icon_man_n.svg'}}" ng-click="changeFilter('1')"  style="width:35%;" />
-         <img ng-src="{{filter.sex==2?'img/icon_woman_h.svg':'img/icon_woman_n.svg'}}" ng-click="changeFilter('2')" style="width:35%;margin-left:15px"  />
-   </div>
-   <div class="item" style="padding:0">
-       <p style="font-weight:bold;font-size:1.1rem">年龄</p>
-       <div class="list radiodiv">
-           <ion-radio ng-model="filter.age" ng-value="'0'">所有</ion-radio>
-           <ion-radio ng-model="filter.age" ng-value="'7'"><18</ion-radio>
-           <ion-radio ng-model="filter.age" ng-value="'1'">18-21</ion-radio>
-           <ion-radio ng-model="filter.age" ng-value="'2'">22-25</ion-radio>
-           <ion-radio ng-model="filter.age" ng-value="'3'">26-29</ion-radio>
-           <ion-radio ng-model="filter.age" ng-value="'4'">30-33</ion-radio>
-           <ion-radio ng-model="filter.age" ng-value="'5'">34-37</ion-radio>
-           <ion-radio ng-model="filter.age" ng-value="'6'">>38</ion-radio>
-       </div>
+    <div class="list">
+        <div class="item">
+            <img ng-src="{{filter.sex==1?'img/icon_man_h.svg':'img/icon_man_n.svg'}}" ng-click="changeFilter('1')"  style="width:35%;" />
+            <img ng-src="{{filter.sex==2?'img/icon_woman_h.svg':'img/icon_woman_n.svg'}}" ng-click="changeFilter('2')" style="width:35%;margin-left:15px"  />
+        </div>
+        <div class="item" style="padding:0">
+           <p style="font-weight:bold;font-size:1.1rem">年龄</p>
+                <ion-checkbox ng-repeat="age in ages" ng-model="filter.age[$index]">{{age.age}}</ion-checkbox>
+           </div>
         
    </div>
   <label class="item item-select item-select-width">