fix weixin absUrl() got error address
This commit is contained in:
parent
45ff953d39
commit
841f4099ac
|
@ -1,5 +1,5 @@
|
|||
@app.controller 'ArchivesController',[ '$scope', '$http', '$location', '$timeout', '$cookies', ($scope, $http, $location, $timeout, $cookies)->
|
||||
url = $location.absUrl() + ".json"
|
||||
url = window.location.pathname + ".json"
|
||||
start_with = $cookies.start_with if window.location.pathname == $cookies.start_with_type
|
||||
$http
|
||||
url: url
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
@app.controller 'CommentsController', ['$scope', '$http', '$location', '$timeout', ($scope, $http, $location, $timeout)->
|
||||
url = $location.absUrl() + "/comments.json"
|
||||
url = window.location.pathname + "/comments.json"
|
||||
|
||||
$http.get(url).success (data)->
|
||||
console.log data
|
||||
$scope.comments = data
|
||||
|
||||
$scope.publish_success = null
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@app.controller 'LikesController', ['$scope', '$http', '$location', '$cookies', ($scope, $http, $location, $cookies)->
|
||||
url = $location.absUrl() + "/likes"
|
||||
url = window.location.pathname + "/likes"
|
||||
|
||||
$http.get url
|
||||
.success (res)->
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
if $scope.like
|
||||
$http
|
||||
url: $location.absUrl() + "/likes/#{$scope.like}/is_liked"
|
||||
url: window.location.pathname + "/likes/#{$scope.like}/is_liked"
|
||||
method: 'GET'
|
||||
.success (res)->
|
||||
if res == 'true'
|
||||
|
|
Loading…
Reference in New Issue