diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html
index eb97a8360..5b2f4e9ec 100644
--- a/public/assets/wechat/app.html
+++ b/public/assets/wechat/app.html
@@ -13,7 +13,13 @@
-
+
+
+
+
加载中...
+
+
+
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js
index bedd79ed4..984d9a9b2 100644
--- a/public/javascripts/wechat/app.js
+++ b/public/javascripts/wechat/app.js
@@ -1,9 +1,9 @@
var app = angular.module('wechat', ['ngRoute','ngCookies']);
var apiUrl = '/api/v1/';
-var debug = false; //调试标志,如果在本地请置为true
+var debug = true; //调试标志,如果在本地请置为true
if(debug===true){
- apiUrl = 'https://www.trustie.net/api/v1/';
+ apiUrl = 'http://localhost:3000/api/v1/';
}
app.factory('auth', function($http,$routeParams, $cookies, $q){
@@ -399,7 +399,7 @@ app.directive('textAutoHeight', function($timeout){
}
});
-app.config(['$routeProvider',function ($routeProvider) {
+app.config(['$routeProvider',"$httpProvider",function ($routeProvider, $httpProvider) {
$routeProvider
.when('/activities', {
templateUrl: 'activities.html',
@@ -436,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 3872bb649..d79ad16ae 100644
--- a/public/stylesheets/weui/weixin.css
+++ b/public/stylesheets/weui/weixin.css
@@ -64,4 +64,10 @@ a.underline {text-decoration:underline;}
.post-reply-trigger {font-size:13px;}
.post-input-container {padding-right:2px;}
.post-reply-input {width:100%; height:28px; line-height:28px; border:1px solid #e6e6e6; outline:none; padding:0; margin:0; border-radius:3px;}
-.post-reply-submit {font-size:13px; padding:3px 8px; color:#fff; background-color:#269ac9; outline:none; border:none; display:inline-block;}
\ No newline at end of file
+.post-reply-submit {font-size:13px; padding:3px 8px; color:#fff; background-color:#269ac9; outline:none; border:none; display:inline-block;}
+
+/* loading 弹框*/
+.loading-bg {position:fixed; width:100%; height:100%; left:0; top:0; z-index:99; background:rgba(0, 0, 0, 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: 12px; text-align: center;}
+.loading-box span {display: block;}
\ No newline at end of file