Skip to content

Commit

Permalink
v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ParryQiu committed Jun 20, 2016
1 parent 127099c commit 6ac0761
Show file tree
Hide file tree
Showing 43 changed files with 684 additions and 1,920 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.gugujiankong.iosapp" version="0.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.gugujiankong.iosapp" version="0.2.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>GuGuJianKong</name>
<description>
专注于网站、服务器监控
Expand Down
Binary file not shown.
Binary file modified platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin
Binary file not shown.
Binary file modified platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin
Binary file not shown.
Binary file not shown.
Binary file modified platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion platforms/android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

256 changes: 194 additions & 62 deletions platforms/android/.idea/workspace.xml

Large diffs are not rendered by default.

70 changes: 24 additions & 46 deletions platforms/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="200" android:versionName="0.2.0" package="com.gugujiankong.iosapp" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:hardwareAccelerated="true" android:versionCode="201" android:versionName="0.2.1" package="com.gugujiankong.iosapp" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="咕咕监控" android:supportsRtl="true">
Expand All @@ -9,74 +9,52 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider android:authorities="com.gugujiankong.iosapp.plugins.emailcomposer.provider" android:name="com.jcjee.plugins.EmailAttachmentProvider" />

<!--极光推送平台设置########开始############-->
<!-- Required SDK核心功能-->
<activity
android:name="cn.jpush.android.ui.PushActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@android:style/Theme.NoTitleBar"
android:exported="false">
<activity android:configChanges="orientation|keyboardHidden" android:exported="false" android:name="cn.jpush.android.ui.PushActivity" android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="cn.jpush.android.ui.PushActivity" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="com.gugujiankong.iosapp" />
</intent-filter>
</activity>
<!-- Required SDK核心功能-->
<service
android:name="cn.jpush.android.service.DownloadService"
android:enabled="true"
android:exported="false" >
<service android:enabled="true" android:exported="false" android:name="cn.jpush.android.service.DownloadService">
</service>


<!-- Required SDK 核心功能-->
<!-- 可配置android:process参数将PushService放在其他进程中 -->
<service
android:name="cn.jpush.android.service.PushService"
android:enabled="true"
android:exported="false">
<service android:enabled="true" android:exported="false" android:name="cn.jpush.android.service.PushService">
<intent-filter>
<action android:name="cn.jpush.android.intent.REGISTER" />
<action android:name="cn.jpush.android.intent.REPORT" />
<action android:name="cn.jpush.android.intent.PushService" />
<action android:name="cn.jpush.android.intent.PUSH_TIME" />
</intent-filter>
</service>


<!-- Required SDK核心功能-->
<receiver
android:name="cn.jpush.android.service.PushReceiver"
android:enabled="true"
android:exported="false">
<receiver android:enabled="true" android:name="cn.jpush.android.service.PushReceiver">
<intent-filter android:priority="1000">
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <!--Required 显示通知栏 -->
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
<category android:name="com.gugujiankong.iosapp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>

</receiver>

<!-- Required SDK核心功能-->
<receiver android:name="cn.jpush.android.service.AlarmReceiver" android:exported="false"/>


<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
<meta-data android:name="JPUSH_APPKEY" android:value="0b9206cb506189af091feece" /> <!-- </>值来自开发者平台取得的AppKey-->


<!--极光推送平台设置########结束############-->

<receiver android:enabled="true" android:name="cn.jpush.phonegap.MyReceiver">
<intent-filter android:priority="1000">
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
<category android:name="com.gugujiankong.iosapp" />
</intent-filter>
<intent-filter>
<action android:name="cn.jpush.android.intent.REGISTRATION" />
<action android:name="cn.jpush.android.intent.UNREGISTRATION" />
<action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" />
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" />
<action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" />
<action android:name="cn.jpush.android.intent.ACTION_RICHPUSH_CALLBACK" />
<category android:name="com.gugujiankong.iosapp" />
</intent-filter>
</receiver>
<receiver android:exported="false" android:name="cn.jpush.android.service.AlarmReceiver" />
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" />
<meta-data android:name="JPUSH_APPKEY" android:value="0b9206cb506189af091feece" />
</application>



<permission android:name="com.gugujiankong.iosapp.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.gugujiankong.iosapp.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
Expand Down
3 changes: 0 additions & 3 deletions platforms/android/CordovaLib/CordovaLib.iml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugTestSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
<task>generateDebugTestSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="" />
Expand Down
Binary file modified platforms/android/android-release.apk
Binary file not shown.
4 changes: 1 addition & 3 deletions platforms/android/android.iml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugTestSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
<task>generateDebugTestSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/res" />
Expand Down Expand Up @@ -58,6 +55,7 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/.DS_Store" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
Expand Down
64 changes: 0 additions & 64 deletions platforms/android/assets/www/EmailComposer.js

This file was deleted.

1 change: 1 addition & 0 deletions platforms/android/assets/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

<script src="js/Chart.min.js"></script>
<script src="js/angular-chart.min.js"></script>
<script src="lib/ionic.ion.imagecachefactory.js"></script>
</head>
<body ng-app="starter" class="platform-android platform-cordova platform-webview">
<ion-nav-bar>
Expand Down
36 changes: 31 additions & 5 deletions platforms/android/assets/www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ angular.module('starter.controllers', [])

})

.controller('RegisterCtrl', function($scope, $state, $ionicPopup, LoginService) {
.controller('RegisterCtrl', function($scope, $state, $ionicPopup, LoginService, $ionicLoading) {

$scope.data = {};

Expand All @@ -76,6 +76,11 @@ angular.module('starter.controllers', [])
title: '用户名不合法',
template: '请确认用户名不能为空!'
});
} else if (password == undefined || passwordconfirm == undefined) {
var alertPopup = $ionicPopup.alert({
title: '密码长度不合格',
template: '请确认密码长度不低于六位!'
});
} else if (password.length < 6) {
var alertPopup = $ionicPopup.alert({
title: '密码长度不合格',
Expand All @@ -88,18 +93,32 @@ angular.module('starter.controllers', [])
template: '请确认两次输入的密码一致!'
});
} else {
$ionicLoading.show({
template: '注册中...'
});
//提交api,进行注册功能
LoginService.register(email, $scope.data.username, $scope.data.password).success(function(data) {
console.log(data);
//注册成功,提示一下用户

$ionicLoading.hide();

var alertPopup = $ionicPopup.alert({
title: '注册成功',
template: '恭喜您注册成功,快快登录体验咕咕监控吧!'
template: '恭喜您注册成功,快快登录使用吧!'
});
alertPopup.then(function(res) {
//用户点击确认登录后跳转
$state.go("tab.account");
});
})
}).error(function(data) {
$ionicLoading.hide();
var alertPopup = $ionicPopup.alert({
title: '注册失败',
template: '输入的邮箱已注册过,请修改后注册!'
})
});

}
}
} else {
Expand All @@ -111,7 +130,8 @@ angular.module('starter.controllers', [])
};

var checkMail = function(szMail) {
var szReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
//var szReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
var szReg = /^[A-Za-z0-9]+([-_.][A-Za-z0-9]+)*@([A-Za-z0-9]+[-.])+[A-Za-z0-9]{2,4}$/;;
var bChk = szReg.test(szMail);
return bChk;
}
Expand Down Expand Up @@ -159,7 +179,7 @@ angular.module('starter.controllers', [])
};

var checkMail = function(szMail) {
var szReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
var szReg = /^[A-Za-z0-9]+([-_.][A-Za-z0-9]+)*@([A-Za-z0-9]+[-.])+[A-Za-z0-9]{2,4}$/;;
var bChk = szReg.test(szMail);
return bChk;
}
Expand Down Expand Up @@ -224,13 +244,19 @@ angular.module('starter.controllers', [])
}

$scope.login = function() {

$ionicLoading.show({
template: '登录中...'
});

LoginService.loginUser($scope.data.username, $scope.data.password).success(function(data) {
//登录成功
localStorage.haslogin = 1;
$ionicLoading.hide();
$state.go("tab.accountlistitem");

}).error(function(data) {
$ionicLoading.hide();
localStorage.haslogin = 0
var alertPopup = $ionicPopup.alert({
title: '登录失败',
Expand Down
15 changes: 13 additions & 2 deletions platforms/android/assets/www/js/services.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
angular.module('starter.services', [])
angular.module('starter.services', ['ionic.ion.imageCacheFactory'])

.factory('Websites', function($q, $http) {
.factory('Websites', function($q, $http, $ImageCacheFactory) {
return {
all: function($scope) {
var d = $q.defer();
Expand All @@ -9,6 +9,17 @@ angular.module('starter.services', [])
$http.jsonp("http://api.gugujiankong.com/website/GetMyWebsites?userId=" + localStorage.userid + "&signToken=" + localStorage.signtoken + "&callback=JSON_CALLBACK")
.success(function(data) {
$scope.sites = data;

// 缓存图片开始
var images = [];
for (var i = 0; i < data.length; i++) {
images.push(data[i].SiteIcon);
}
$ImageCacheFactory.Cache(images).then(function() {
console.log("Images done loading!");
});;
// 缓存图片结束

d.resolve(data);
})
.error(function(error) {
Expand Down
Loading

0 comments on commit 6ac0761

Please sign in to comment.