Pārlūkot izejas kodu

1. 设置页修改返回页更改
2. 变更不展示变更详情

laiguoran 5 gadi atpakaļ
vecāks
revīzija
95cdbda25a

+ 2 - 2
app/controller/setting_controller.js

@@ -272,7 +272,7 @@ module.exports = app => {
                 }
 
                 this.setMessage('保存账号数据成功', this.messageType.SUCCESS);
-                ctx.redirect('/' + ctx.controllerName + '/user');
+                ctx.redirect(ctx.request.header.referer);
             } catch (error) {
                 console.log(error);
                 this.setMessage(error.toString(), this.messageType.ERROR);
@@ -339,7 +339,7 @@ module.exports = app => {
                 }
 
                 this.setMessage('保存账号数据成功', this.messageType.SUCCESS);
-                ctx.redirect('/' + ctx.controllerName + '/user/permission/set');
+                ctx.redirect(ctx.request.header.referer);
             } catch (error) {
                 console.log(error);
                 this.setMessage(error.toString(), this.messageType.ERROR);

+ 4 - 0
app/public/js/change_detail.js

@@ -42,6 +42,10 @@ $(document).ready(() => {
                 table.destroy();
             }
             table = $('.table-list').removeAttr('width').DataTable(billsTable);
+            if (!$('.change-detail-checkbox').is(':checked')) {
+                const column = table.column(3);
+                column.visible(!column.visible());
+            }
             $('#bills').removeClass('first-bill-pane');
         }
     });

+ 1 - 1
app/view/change/info.ejs

@@ -134,7 +134,7 @@
                     <% } %>
                     <div class="d-inline-block">
                         <div class="custom-control custom-checkbox" style="line-height: normal;">
-                            <input type="checkbox" class="custom-control-input change-detail-checkbox" id="customCheck1" checked>
+                            <input type="checkbox" class="custom-control-input change-detail-checkbox" id="customCheck1">
                             <label class="custom-control-label" for="customCheck1">变更详情</label>
                         </div>
                     </div>