Explorar el Código

fix: 免费版勾选问题

zhangweicheng hace 1 año
padre
commit
6968ad9b00
Se han modificado 2 ficheros con 4 adiciones y 3 borrados
  1. 2 1
      package.json
  2. 2 2
      web/users/js/compilation.js

+ 2 - 1
package.json

@@ -41,6 +41,7 @@
     "start": "C:\\Users\\mai\\AppData\\Roaming\\npm\\babel-node.cmd operation.js",
     "dev_server": "SET NODE_ENV=qa&& babel-node operation.js",
     "dev_server_sc": "SET NODE_ENV=qa_sc&& babel-node operation.js",
+    "dev_server_hw": "SET NODE_ENV=qa_hw&& babel-node operation.js",
     "qa_server": "SET NODE_ENV=qa&& D:\\GitHome\\ConstructionOperation\\node_modules\\.bin\\babel-node operation.js",
     "qa_sc_server": "SET NODE_ENV=qa_sc&& D:/GitHome/ConstructionOperation/node_modules/.bin/babel-node operation.js",
     "uat_server": "SET NODE_ENV=uat&& D:/GitHome/ConstructionOperation/node_modules/.bin/babel-node operation.js",
@@ -48,4 +49,4 @@
     "prod_server": "SET NODE_ENV=prod_s&& D:/GitHome/ConstructionOperation/node_modules/.bin/babel-node operation.js",
     "prod_sc_server": "SET NODE_ENV=prod_sc&& D:/GitHome/ConstructionOperation/node_modules/.bin/babel-node operation.js"
   }
-}
+}

+ 2 - 2
web/users/js/compilation.js

@@ -590,11 +590,11 @@ $(document).ready(function() {
     })
 
     // 修改是否提供免费版
-    $('#freeUse').change(function () {
+    $('#freeUse').change(function (val) {
         $.ajax({
             url: '/compilation/changeFreeUse',
             type: 'post',
-            data: {id: id, freeUse: $(this).val()},
+            data: {id: id, freeUse: $(this).prop('checked')},
             dataType: "json",
             success: function(response) {
                 if (response.error !== 0) {