Browse Source

maven打包 js不通过处理

liusw 8 years ago
parent
commit
1ff2c855eb

+ 2 - 2
src/main/webapp/resources/js/admin/controllers/SecQuestionCtrl.js

@@ -51,8 +51,8 @@ define(['app/app'], function (app) {
     }
 
     //删除密保问题
-    $scope.delete = function (id) {
-      secQuestion.delete({id:id},function(){
+    $scope.deleteSecQuestion = function (id) {
+      secQuestion.deleteSecQuestion({id:id},function(){
         toaster.pop('success', '提示', '删除密保问题成功');
         location.reload();
       },function(response){

+ 2 - 2
src/main/webapp/resources/js/common/query/secQuestion.js

@@ -1,7 +1,7 @@
 define([ 'ngResource' ], function() {
 	angular.module('secQuestionServices', [ 'ngResource' ]).factory('secQuestion', ['$resource', 'BaseService', function($resource, BaseService) {
 		const rootPath = BaseService.getRootPath();
-		return $resource('user/secQuestion/:id', {}, {
+		return $resource('user/secQuestion', {}, {
       add : {
         url : 'user/secQuestion/add',
         method : 'POST'
@@ -17,7 +17,7 @@ define([ 'ngResource' ], function() {
         url : 'user/secQuestion/:id',
         method : 'GET'
       },
-      delete : {
+      deleteSecQuestion : {
         url : 'user/secQuestion/delete',
         method : 'GET'
       }

+ 1 - 1
src/main/webapp/resources/view/admin/sec_question.html

@@ -52,7 +52,7 @@
 					<td><span ng-bind="secQuestion.type"></span></td>
 					<td>
 						<button class="btn btn-primary" ng-click="edit(secQuestion.id)">编辑</button>
-						<button class="btn btn-primary" ng-click="delete(secQuestion.id)">删除</button>
+						<button class="btn btn-primary" ng-click="deleteSecQuestion(secQuestion.id)">删除</button>
 					</td>
 				</tr>
 			</tbody>