|
|
@@ -8,11 +8,15 @@ define(['app/app'], function(app) {
|
|
|
HelpIssue.get({id : $stateParams.id}, function (data) {
|
|
|
$scope.issue = data;
|
|
|
quill.setContents(angular.fromJson($scope.issue.content));
|
|
|
- HelpAPI.get({id : $scope.issue.navId},function (data) {
|
|
|
- $scope.issue.nav = data;
|
|
|
- }, function (response) {
|
|
|
- toaster.pop('error', response.data);
|
|
|
- });
|
|
|
+ if ($scope.issue.navId) {
|
|
|
+ HelpAPI.get({id : $scope.issue.navId},function (data) {
|
|
|
+ $scope.issue.nav = data;
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', response.data);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ toaster.pop('warning', '暂无导航信息,请补充');
|
|
|
+ }
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', response.data);
|
|
|
});
|