Browse Source

Merge remote-tracking branch 'origin/master'

ningsy 3 years ago
parent
commit
85119a4c96

+ 1 - 1
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxPortalController.java

@@ -111,7 +111,7 @@ public class WxPortalController extends ApiBaseController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "params" , paramType = "body")
     })
-    @PostMapping("helpCenter")
+    @PostMapping("/helpCenter")
     public Object getHelpCenter() {
         ParameterObject obj =  getParameterObject();
         obj.checkParameterNotNull("userId");

+ 43 - 0
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/helpCenter/add.html

@@ -118,6 +118,49 @@
                 $.operate.save(prefix + "/add", $('#form-center-add').serialize());
             }
         }
+
+        // function upBg() {
+        //    console.log('this',this)
+        //     var formdata = new FormData();
+        //     formdata.append("file", img);
+        //     $.ajax({
+        //         url: ctx + "common/upload",
+        //         data: formdata,
+        //         type: "post",
+        //         processData: false,
+        //         contentType: false,
+        //         success: function (result) {
+        //             if (result.code == 0) {
+        //                 $("#submitbuttonFile").val(result.data.fileName);
+        //             } else {
+        //                 $.modal.alertWarning(result.msg);
+        //             }
+        //
+        //         }
+        //     })
+        // }
+
+            $("#submitbuttonFile").fileinput({
+                'theme': 'explorer-fas',
+                'uploadUrl':ctx + "common/upload",
+                overwriteInitial: false,
+                initialPreviewAsData: true
+            });
+
+            $("#submitbuttonFile").on("fileuploaded", function (event, data, previewId, index) {
+                alert('上传成功')
+                console.log('event--------',event)
+                console.log('data--------',data)
+                console.log('previewId--------',previewId)
+                console.log('index--------',index)
+            })
+
+            $('#submitbuttonFile').on('fileerror', function(event, data, msg) {
+                alert('上传失败')
+                console.log('data--------',data)
+                console.log('event--------',event)
+                console.log('msg--------',msg)
+            });
     </script>
 </body>
 </html>