|
@@ -2,19 +2,26 @@
|
|
app.controller('homeCtrl', ["$scope", "$ionicTabsDelegate","storage", "$http", 'config', 'myService', "$state", "$ionicSlideBoxDelegate", "msg", "$ionicPopover", "homeService", "$ionicPopup", "$timeout", "$ionicSideMenuDelegate", "$rootScope"
|
|
app.controller('homeCtrl', ["$scope", "$ionicTabsDelegate","storage", "$http", 'config', 'myService', "$state", "$ionicSlideBoxDelegate", "msg", "$ionicPopover", "homeService", "$ionicPopup", "$timeout", "$ionicSideMenuDelegate", "$rootScope"
|
|
, function ($scope, $ionicTabsDelegate,storage, $http, config, myService, $state, $ionicSlideBoxDelegate, msg, $ionicPopover, homeService, $ionicPopup, $timeout, $ionicSideMenuDelegate, $rootScope) {
|
|
, function ($scope, $ionicTabsDelegate,storage, $http, config, myService, $state, $ionicSlideBoxDelegate, msg, $ionicPopover, homeService, $ionicPopup, $timeout, $ionicSideMenuDelegate, $rootScope) {
|
|
$scope.$on('$ionicView.enter', function () {
|
|
$scope.$on('$ionicView.enter', function () {
|
|
- $ionicTabsDelegate.showBar(true);
|
|
|
|
|
|
+ $ionicTabsDelegate.showBar(false);
|
|
$scope.load(false);
|
|
$scope.load(false);
|
|
$ionicSlideBoxDelegate.start();
|
|
$ionicSlideBoxDelegate.start();
|
|
$scope.step = storage.getObject('user').step;
|
|
$scope.step = storage.getObject('user').step;
|
|
|
|
+ if($scope.step > 1){
|
|
|
|
+ $ionicTabsDelegate.showBar(true);
|
|
|
|
+ }
|
|
var width = window.screen.width;
|
|
var width = window.screen.width;
|
|
- if(width>300&width<370){
|
|
|
|
- $scope.screenWidth = 0;
|
|
|
|
|
|
+ var height = window.screen.height;
|
|
|
|
+ if(width==375 && height==812){
|
|
|
|
+ $scope.screenWidth = "screenWidthX";
|
|
|
|
+ }
|
|
|
|
+ else if(width>300 && width<370){
|
|
|
|
+ $scope.screenWidth = "screenWidth0";
|
|
}
|
|
}
|
|
- else if(width>=370&width<400){
|
|
|
|
- $scope.screenWidth = 1;
|
|
|
|
|
|
+ else if(width>=370 && width<400){
|
|
|
|
+ $scope.screenWidth = "screenWidth1";
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
- $scope.screenWidth = 2;
|
|
|
|
|
|
+ $scope.screenWidth = "screenWidth2";
|
|
}
|
|
}
|
|
homeService.messageInfo().then(function(result){
|
|
homeService.messageInfo().then(function(result){
|
|
$scope.infos = result.data.data;
|
|
$scope.infos = result.data.data;
|
|
@@ -35,6 +42,9 @@
|
|
|
|
|
|
$scope.changeStep = function(){
|
|
$scope.changeStep = function(){
|
|
$scope.step = $scope.step + 1;
|
|
$scope.step = $scope.step + 1;
|
|
|
|
+ if($scope.step > 1){
|
|
|
|
+ $ionicTabsDelegate.showBar(true);
|
|
|
|
+ }
|
|
homeService.changeStep().then(function(result){
|
|
homeService.changeStep().then(function(result){
|
|
if(result.data.status_code==0){
|
|
if(result.data.status_code==0){
|
|
storage.setObject('user', result.data.data);
|
|
storage.setObject('user', result.data.data);
|
|
@@ -292,14 +302,18 @@
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
$scope.$on('$ionicView.beforeEnter', function () {
|
|
$scope.step = storage.getObject('user').step;
|
|
$scope.step = storage.getObject('user').step;
|
|
var width = window.screen.width;
|
|
var width = window.screen.width;
|
|
- if(width>300&width<370){
|
|
|
|
- $scope.screenWidth = 0;
|
|
|
|
|
|
+ var height = window.screen.height;
|
|
|
|
+ if(width==375 && height==812){
|
|
|
|
+ $scope.screenWidth = "screenWidthX";
|
|
|
|
+ }
|
|
|
|
+ else if(width>300 && width<370){
|
|
|
|
+ $scope.screenWidth = "screenWidth0";
|
|
}
|
|
}
|
|
- else if(width>=370&width<400){
|
|
|
|
- $scope.screenWidth = 1;
|
|
|
|
|
|
+ else if(width>=370 && width<400){
|
|
|
|
+ $scope.screenWidth = "screenWidth1";
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
- $scope.screenWidth = 2;
|
|
|
|
|
|
+ $scope.screenWidth = "screenWidth2";
|
|
}
|
|
}
|
|
$scope.video = {};
|
|
$scope.video = {};
|
|
msg.loading();
|
|
msg.loading();
|