未绑定微信账号时点击“最新动态”出现提示信息

This commit is contained in:
cxt 2016-05-31 17:34:56 +08:00
parent ed84783f26
commit 8540b48091
1 changed files with 6 additions and 3 deletions

View File

@ -1,10 +1,10 @@
var app = angular.module('wechat', ['ngRoute','ngCookies']);
var apiUrl = '/api/v1/';
var debug = false; //调试标志,如果在本地请置为true
var debug = true; //调试标志,如果在本地请置为true
if(debug===true){
//apiUrl = 'http://localhost:3000/api/v1/';
apiUrl = 'https://www.trustie.net/api/v1/';
apiUrl = 'http://localhost:3000/api/v1/';
//apiUrl = 'https://www.trustie.net/api/v1/';
}
app.factory('auth', function($http,$routeParams, $cookies, $q){
@ -78,6 +78,9 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
url: apiUrl+ "activities",
data: {openid: auth.openid(), page: page}
}).then(function successCallback(response) {
if(response.data.message == "undefined method `user' for nil:NilClass"){
alert("请先绑定确实的用户账号");
}
$scope.current_page = 0;
console.log($scope.current_page);
console.log(response.data.page);