|
|
@ -1,6 +1,6 @@
|
|
|
|
var app = angular.module('wechat', ['ngRoute','ngCookies']);
|
|
|
|
var app = angular.module('wechat', ['ngRoute','ngCookies']);
|
|
|
|
var apiUrl = 'http://wechat.trustie.net/api/v1/';
|
|
|
|
var apiUrl = 'http://wechat.trustie.net/api/v1/';
|
|
|
|
var debug = true; //调试标志,如果在本地请置为true
|
|
|
|
var debug = false; //调试标志,如果在本地请置为true
|
|
|
|
|
|
|
|
|
|
|
|
if(debug===true){
|
|
|
|
if(debug===true){
|
|
|
|
apiUrl = 'http://localhost:3000/api/v1/';
|
|
|
|
apiUrl = 'http://localhost:3000/api/v1/';
|
|
|
@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){
|
|
|
|
var _openid = '';
|
|
|
|
var _openid = '';
|
|
|
|
|
|
|
|
|
|
|
|
if(debug===true){
|
|
|
|
if(debug===true){
|
|
|
|
_openid = "3";
|
|
|
|
_openid = "oCnvgv1erQGHzv5GlNZ3sxa2hnSo";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var getOpenId = function() {
|
|
|
|
var getOpenId = function() {
|
|
|
@ -68,7 +68,7 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
|
|
|
|
|
|
|
|
|
|
|
|
console.log("ActivityController load");
|
|
|
|
console.log("ActivityController load");
|
|
|
|
$scope.activities = rms.get("activities") || [];
|
|
|
|
$scope.activities = rms.get("activities") || [];
|
|
|
|
$scope.page = 0;
|
|
|
|
$scope.page = 1;
|
|
|
|
|
|
|
|
|
|
|
|
var loadActData = function(page){
|
|
|
|
var loadActData = function(page){
|
|
|
|
$scope.page = page;
|
|
|
|
$scope.page = page;
|
|
|
@ -80,6 +80,7 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
|
|
|
|
$scope.activities = $scope.activities.concat(response.data.data);
|
|
|
|
$scope.activities = $scope.activities.concat(response.data.data);
|
|
|
|
$scope.all_count = response.data.all_count;
|
|
|
|
$scope.all_count = response.data.all_count;
|
|
|
|
$scope.count = response.data.count;
|
|
|
|
$scope.count = response.data.count;
|
|
|
|
|
|
|
|
console.log(response.data);
|
|
|
|
rms.save('activities', $scope.activities);
|
|
|
|
rms.save('activities', $scope.activities);
|
|
|
|
}, function errorCallback(response) {
|
|
|
|
}, function errorCallback(response) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|