12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- angular.module('push')
- .controller('SetCtrl', function ($scope, ConfigService, UserService, $ionicHistory, $rootScope, UtilService, SqliteStorageService, IMChatService,CommonService) {
- if($scope.app){
- $scope.setStatusBar(1);
- }
- $scope.versionno = ConfigService.versionno;
- $scope.shouldShowDelete = false;
- $scope.shouldShowReorder = false;
- $scope.listCanSwipe = true;
- $scope.ishaspaypassword = UserService.ishaspaypassword;
- if ($rootScope.verno != $scope.versionno) {
- $scope.update = true;
- }
- $scope.islogin = ConfigService.islogin;
- if(!$scope.islogin){
- $scope.visitorShowLoginOut=false;
- }else{
- $scope.visitorShowLoginOut=true;
- }
- $scope.goNextPage = function () {
- /* $scope.islogin = ConfigService.islogin;
- if(!$scope.islogin){
- $scope.selCom.show();
- }else{
- $scope.go('editdata');
- }*/
- // UtilService.showMess("功能正在完善中,敬请期待!");
- if($scope.app){
- UtilService.showMess("功能正在完善中,敬请期待!");
- }else{
- CommonService.showMessage("功能正在完善中,敬请期待!",$scope);
- }
- };
- $scope.goUpdatePwd = function () {
- /*$scope.islogin = ConfigService.islogin;
- if(!$scope.islogin){
- $scope.selCom.show();
- }else{
- $scope.go('updatepwd');
- }*/
- if($scope.app){
- UtilService.showMess("功能正在完善中,敬请期待!");
- }else{
- CommonService.showMessage("功能正在完善中,敬请期待!",$scope);
- }
- };
- $scope.goPayMoneyPassword = function () {
- /* if (!ConfigService.islogin) {
- UtilService.showMess("请登录");
- return;
- }*/
- $scope.go('payPsMoneyPassword');
- };
- $scope.updateversion = function () {
- if (device.platform == "Android") {
- cordova.InAppBrowser.open("http://sj.qq.com/myapp/detail.htm?apkName=com.push.pushapp", '_system', 'location=yes');
- } else {
- cordova.InAppBrowser.open("https://itunes.apple.com/us/app/push科技/id1218178687?mt=8", '_system', 'location=yes');
- }
- };
- $scope.logout = function () {
- /* if($scope.app){
- if(ConfigService.isedit ==0){
- SqliteStorageService.dropAllTable();
- }else {
- var del_sql = "delete from userinfo";
- SqliteStorageService.deleteData(del_sql);
- }
- }*/
- ConfigService.islogin = false;
- ConfigService.ressynchroflg = true;
- UserService.user = {};
- UserService.id = "0";
- if($scope.app){
- IMChatService.disconnect();
- }
- //ConfigService.comefrom = "320412000";
- $ionicHistory.clearCache();
- localStorage.removeItem("mobile");
- localStorage.removeItem("password");
- $scope.go('tab.account');
- };
- });
|