Bladeren bron

修改跳转

邹景立 4 jaren geleden
bovenliggende
commit
c2844a36ee

+ 1 - 1
app/data/controller/BasePostageTemplate.php

@@ -50,7 +50,7 @@ class BasePostageTemplate extends Controller
             $data = $this->_vali(['nos.default' => '', 'oks.default' => '']);
             if ($data['nos']) $this->app->db->name('DataBasePostageRegion')->whereIn('id', str2arr($data['nos']))->update(['status' => 0]);
             if ($data['oks']) $this->app->db->name('DataBasePostageRegion')->whereIn('id', str2arr($data['oks']))->update(['status' => 1]);
-            $this->success('修改配送区域成功!');
+            $this->success('修改配送区域成功!', 'javascript:history.back()');
         }
     }
 

+ 2 - 3
app/data/view/base_postage_template/form_region.html

@@ -34,6 +34,7 @@
 
     <div class="hr-line-dashed margin-top-40"></div>
     <div class="layui-form-item text-center">
+        <button class="layui-btn layui-btn-danger" type="button" data-history-back>取消修改</button>
         <button class="layui-btn" ng-click="Confirm()">确定修改</button>
     </div>
 </div>
@@ -123,9 +124,7 @@
                     });
                 });
                 /*! 提交数据并返回结果 */
-                $.form.load('{:url("region")}', {nos: nos.join(','), oks: oks.join(',')}, 'post', function (ret) {
-                    return ret.code ? $.msg.success(ret.info) : $.msg.error(ret.info), false;
-                });
+                $.form.load('{:url("region")}', {nos: nos.join(','), oks: oks.join(',')}, 'post');
             };
         }
     });