From 8540b48091997f29509e2ca9da2bea3adaccf9d8 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 31 May 2016 17:34:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E7=BB=91=E5=AE=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E6=97=B6=E7=82=B9=E5=87=BB=E2=80=9C=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E5=8A=A8=E6=80=81=E2=80=9D=E5=87=BA=E7=8E=B0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/app.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 8f00a2b96..1149ea131 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -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);