diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html
index eb97a8360..187439468 100644
--- a/public/assets/wechat/app.html
+++ b/public/assets/wechat/app.html
@@ -13,7 +13,13 @@
-
+
+
+
+
加载中...
+
+
+
diff --git a/public/images/wechat/loading.gif b/public/images/wechat/loading.gif
new file mode 100755
index 000000000..b806bf34c
Binary files /dev/null and b/public/images/wechat/loading.gif differ
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js
index 97589721e..0a6b97e5b 100644
--- a/public/javascripts/wechat/app.js
+++ b/public/javascripts/wechat/app.js
@@ -394,11 +394,12 @@ app.directive('textAutoHeight', function($timeout){
});
}
}, false);
+
}
}
});
-app.config(['$routeProvider',function ($routeProvider) {
+app.config(['$routeProvider',"$httpProvider",function ($routeProvider, $httpProvider) {
$routeProvider
.when('/activities', {
templateUrl: 'activities.html',
@@ -435,4 +436,22 @@ app.config(['$routeProvider',function ($routeProvider) {
.otherwise({
redirectTo: '/activities'
});
+ $httpProvider.interceptors.push('timestampMarker');
+}]);
+
+//loading
+app.factory('timestampMarker', ["$rootScope", function ($rootScope) {
+ var timestampMarker = {
+ request: function (config) {
+ $rootScope.loading = true;
+ config.requestTimestamp = new Date().getTime();
+ return config;
+ },
+ response: function (response) {
+ // $rootScope.loading = false;
+ response.config.responseTimestamp = new Date().getTime();
+ return response;
+ }
+ };
+ return timestampMarker;
}]);
diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css
index 19206d916..21fde54bb 100644
--- a/public/stylesheets/weui/weixin.css
+++ b/public/stylesheets/weui/weixin.css
@@ -70,4 +70,10 @@ a.underline {text-decoration:underline;}
.post-reply-submit {font-size:13px; padding:3px 8px; color:#fff; background-color:#269ac9; outline:none; border:none; display:inline-block;}
.reply-icon {background:url(/images/wechat/wechat_icon.png) -100px 1px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
.praise-icon {background:url(/images/wechat/wechat_icon.png) -100px -38px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
-.praised-icon {background:url(/images/wechat/wechat_icon.png) -100px -76px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
\ No newline at end of file
+.praised-icon {background:url(/images/wechat/wechat_icon.png) -100px -76px no-repeat; width:20px; height:18px; display:inline-block; vertical-align:middle;}
+
+/* loading 弹框*/
+.loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(206, 206, 206, 0.3); overflow:hidden;}
+.loading-box {position:absolute; top:50%; background:white; width:160px; height:72px; left:50%; margin-top:-36px; margin-left:-80px; text-align:center;}
+.loading-box img {margin-top: 3px; text-align: center;}
+.loading-box span {display: block;}