diff --git a/platforms/ios/www/dist/js/all.min.js b/platforms/ios/www/dist/js/all.min.js index 8cfbb83..84beec7 100644 --- a/platforms/ios/www/dist/js/all.min.js +++ b/platforms/ios/www/dist/js/all.min.js @@ -525,7 +525,7 @@ var actionList; actionList = []; actionList.push({ - text: '随机找几本书看看' + text: '随便看看吧' }); actionList.push({ text: "你可能喜欢的书" @@ -571,7 +571,7 @@ url: this.Constant.baseUrl + ("/recommend/random?user_email=" + email + "&user_token=" + token), method: 'GET', timeout: 15000, - cache: true + cache: false }).success(function(data, status, headers, config) { return callback(data); }).error(function(data) { @@ -990,6 +990,7 @@ this.$location.path('/tab/settings'); return; } + this.$scope.changeRecommend = this.changeRecommend; } showLoading = function($scope, $ionicLoading) { @@ -1100,7 +1101,7 @@ LocationController.prototype.addLocation = function() { if (this.$scope.locations.length >= 3) { return this.IonicUtils.showLoading(this.$scope, '只能创建3个常用的地址,请先删除部分再添加'); - } else if (localStorage.getItem('cur_address_detail') === null) { + } else if ((localStorage.getItem('cur_address_detail') === null) || (localStorage.getItem('cur_address_detail') === void 0)) { return this.IonicUtils.showLoading(this.$scope, '定位成功后方可添加常用地址'); } else if (this.$scope.address === null || this.$scope.address === '') { return this.IonicUtils.showLoading(this.$scope, '定位成功后方可添加常用地址'); diff --git a/platforms/ios/www/js/app/controllers/home-controller.coffee b/platforms/ios/www/js/app/controllers/home-controller.coffee index 7df0ac4..091b833 100644 --- a/platforms/ios/www/js/app/controllers/home-controller.coffee +++ b/platforms/ios/www/js/app/controllers/home-controller.coffee @@ -22,6 +22,7 @@ class HomeController else @$location.path '/tab/settings' return + @$scope.changeRecommend = @changeRecommend showLoading = ($scope, $ionicLoading)-> $scope.loading = $ionicLoading.show { diff --git a/platforms/ios/www/js/app/controllers/location-controller.coffee b/platforms/ios/www/js/app/controllers/location-controller.coffee index 51098da..4e9ac6b 100644 --- a/platforms/ios/www/js/app/controllers/location-controller.coffee +++ b/platforms/ios/www/js/app/controllers/location-controller.coffee @@ -30,7 +30,7 @@ class LocationController addLocation: () => if @$scope.locations.length >= 3 @IonicUtils.showLoading(@$scope, '只能创建3个常用的地址,请先删除部分再添加') - else if localStorage.getItem('cur_address_detail') is null + else if (localStorage.getItem('cur_address_detail') is null) || (localStorage.getItem('cur_address_detail') is undefined) @IonicUtils.showLoading(@$scope, '定位成功后方可添加常用地址') else if (@$scope.address is null or @$scope.address is '') @IonicUtils.showLoading(@$scope, '定位成功后方可添加常用地址') diff --git a/platforms/ios/www/js/app/services/recommend-service.coffee b/platforms/ios/www/js/app/services/recommend-service.coffee index dde399a..f270522 100644 --- a/platforms/ios/www/js/app/services/recommend-service.coffee +++ b/platforms/ios/www/js/app/services/recommend-service.coffee @@ -7,7 +7,7 @@ class RecommendService getActionSheetList: ()-> actionList = [] - actionList.push {text: '随机找几本书看看'} + actionList.push {text: '随便看看吧'} actionList.push {text: "你可能喜欢的书"} @GeolocationService.getLocations (locations)=> locationIds = [] @@ -40,7 +40,7 @@ class RecommendService url: @Constant.baseUrl + "/recommend/random?user_email=#{email}&user_token=#{token}" method: 'GET' timeout: 15000 - cache: true + cache: false ) .success (data, status, headers, config)-> callback data diff --git a/platforms/ios/www/templates/libr-index.html b/platforms/ios/www/templates/libr-index.html index 23e369d..3798baf 100644 --- a/platforms/ios/www/templates/libr-index.html +++ b/platforms/ios/www/templates/libr-index.html @@ -1,4 +1,8 @@ + + + diff --git a/platforms/ios/www/templates/modal/import_books.html b/platforms/ios/www/templates/modal/import_books.html index 7d57923..884e218 100644 --- a/platforms/ios/www/templates/modal/import_books.html +++ b/platforms/ios/www/templates/modal/import_books.html @@ -6,17 +6,20 @@
{{data.text}}
- +
-

已成功绑定豆瓣用户,你的豆瓣用户名为:{{doubanUsername}}

+

已成功绑定豆瓣用户:{{doubanUsername}}

- -
diff --git a/www/js/app/controllers/home-controller.coffee b/www/js/app/controllers/home-controller.coffee index 7df0ac4..091b833 100644 --- a/www/js/app/controllers/home-controller.coffee +++ b/www/js/app/controllers/home-controller.coffee @@ -22,6 +22,7 @@ class HomeController else @$location.path '/tab/settings' return + @$scope.changeRecommend = @changeRecommend showLoading = ($scope, $ionicLoading)-> $scope.loading = $ionicLoading.show { diff --git a/www/js/app/controllers/location-controller.coffee b/www/js/app/controllers/location-controller.coffee index 51098da..4e9ac6b 100644 --- a/www/js/app/controllers/location-controller.coffee +++ b/www/js/app/controllers/location-controller.coffee @@ -30,7 +30,7 @@ class LocationController addLocation: () => if @$scope.locations.length >= 3 @IonicUtils.showLoading(@$scope, '只能创建3个常用的地址,请先删除部分再添加') - else if localStorage.getItem('cur_address_detail') is null + else if (localStorage.getItem('cur_address_detail') is null) || (localStorage.getItem('cur_address_detail') is undefined) @IonicUtils.showLoading(@$scope, '定位成功后方可添加常用地址') else if (@$scope.address is null or @$scope.address is '') @IonicUtils.showLoading(@$scope, '定位成功后方可添加常用地址') diff --git a/www/js/app/services/recommend-service.coffee b/www/js/app/services/recommend-service.coffee index dde399a..f270522 100644 --- a/www/js/app/services/recommend-service.coffee +++ b/www/js/app/services/recommend-service.coffee @@ -7,7 +7,7 @@ class RecommendService getActionSheetList: ()-> actionList = [] - actionList.push {text: '随机找几本书看看'} + actionList.push {text: '随便看看吧'} actionList.push {text: "你可能喜欢的书"} @GeolocationService.getLocations (locations)=> locationIds = [] @@ -40,7 +40,7 @@ class RecommendService url: @Constant.baseUrl + "/recommend/random?user_email=#{email}&user_token=#{token}" method: 'GET' timeout: 15000 - cache: true + cache: false ) .success (data, status, headers, config)-> callback data diff --git a/www/templates/libr-index.html b/www/templates/libr-index.html index 23e369d..3798baf 100644 --- a/www/templates/libr-index.html +++ b/www/templates/libr-index.html @@ -1,4 +1,8 @@ + + + diff --git a/www/templates/modal/import_books.html b/www/templates/modal/import_books.html index 7d57923..884e218 100644 --- a/www/templates/modal/import_books.html +++ b/www/templates/modal/import_books.html @@ -6,17 +6,20 @@
{{data.text}}
- +
-

已成功绑定豆瓣用户,你的豆瓣用户名为:{{doubanUsername}}

+

已成功绑定豆瓣用户:{{doubanUsername}}

- -