|
@@ -1,6 +1,6 @@
|
|
(function (app) {
|
|
(function (app) {
|
|
- app.controller('homeCtrl', ["$scope", "$ionicTabsDelegate","$http", 'config', "$state", "msg", "$ionicPopover", "homeService"
|
|
|
|
- , function ($scope, $ionicTabsDelegate,$http, config, $state, msg, $ionicPopover, homeService) {
|
|
|
|
|
|
+ app.controller('homeCtrl', ["$scope", "$ionicTabsDelegate","$http", 'config', "$state", "msg", "$ionicPopover", "homeService","$ionicPopup"
|
|
|
|
+ , function ($scope, $ionicTabsDelegate,$http, config, $state, msg, $ionicPopover, homeService,$ionicPopup) {
|
|
$scope.$on('$ionicView.beforeEnter', function (viewResult) {
|
|
$scope.$on('$ionicView.beforeEnter', function (viewResult) {
|
|
$ionicTabsDelegate.showBar(true);
|
|
$ionicTabsDelegate.showBar(true);
|
|
});
|
|
});
|
|
@@ -16,6 +16,36 @@
|
|
}).then(function (popover) {
|
|
}).then(function (popover) {
|
|
$scope.popover = popover;
|
|
$scope.popover = popover;
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ $scope.openFilter = function ($event) {
|
|
|
|
+ // 一个精心制作的自定义弹窗
|
|
|
|
+ var myPopup = $ionicPopup.show({
|
|
|
|
+ template: '请选择<select><option value="opel">性别</option><option value="audi">Audi</option></select> <br>请选择<select><option value="opel">地区</option><option value="audi">Audi</option></select>',
|
|
|
|
+ title: '筛选',
|
|
|
|
+ scope: $scope,
|
|
|
|
+ buttons: [
|
|
|
|
+ { text: '取消' },
|
|
|
|
+ {
|
|
|
|
+ text: '<b>提交</b>',
|
|
|
|
+ type: 'button-positive',
|
|
|
|
+ onTap: function(e) {
|
|
|
|
+ if (!$scope.data.wifi) {
|
|
|
|
+ //不允许用户关闭,除非他键入wifi密码
|
|
|
|
+ e.preventDefault();
|
|
|
|
+ } else {
|
|
|
|
+ return $scope.data.wifi;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ });
|
|
|
|
+ myPopup.then(function(res) {
|
|
|
|
+ console.log('Tapped!', res);
|
|
|
|
+ });
|
|
|
|
+ $timeout(function() {
|
|
|
|
+ myPopup.close(); //由于某种原因3秒后关闭弹出
|
|
|
|
+ }, 3000);
|
|
|
|
+ };
|
|
$scope.openPopover = function ($event) {
|
|
$scope.openPopover = function ($event) {
|
|
$scope.popover.show($event);
|
|
$scope.popover.show($event);
|
|
};
|
|
};
|
|
@@ -114,6 +144,7 @@
|
|
$scope.load(true);
|
|
$scope.load(true);
|
|
$scope.$on('$ionicView.beforeLeave', function () {
|
|
$scope.$on('$ionicView.beforeLeave', function () {
|
|
$scope.popover.hide();
|
|
$scope.popover.hide();
|
|
|
|
+ $scope.load(true);
|
|
});
|
|
});
|
|
}]);
|
|
}]);
|
|
|
|
|
|
@@ -478,9 +509,9 @@
|
|
// $scope.closeSupportmodal = function() {
|
|
// $scope.closeSupportmodal = function() {
|
|
// $scope.supportmodal.hide();
|
|
// $scope.supportmodal.hide();
|
|
// };
|
|
// };
|
|
- $scope.openSupport = function () {
|
|
|
|
- msg.alert("支持乘数","支持乘数支持乘数支持乘数支持乘数");
|
|
|
|
- };
|
|
|
|
|
|
+ $scope.openSupport = function () {
|
|
|
|
+ msg.alert("支持乘数","支持乘数支持乘数支持乘数支持乘数");
|
|
|
|
+ };
|
|
$scope.multi = {
|
|
$scope.multi = {
|
|
a: '',
|
|
a: '',
|
|
b: '',
|
|
b: '',
|