Parcourir la source

加载页面开发完成,未测试

wuxw il y a 7 ans
Parent
commit
489d8c2026

+ 4 - 0
Readme.md

@@ -28,6 +28,10 @@ Java + spring cloud + mybatis + mysql + kafka + redis
 
 [从这里安装](docs/install.md)
 
+### 解决方案
+
+    [解决方案](https://docs.qq.com/doc/DQW9XWW50R3NjWmN6) 不断完善中
+
 ### 接口接口协议
 
 1. [openApi协议](docs/api/Readme.md)

+ 1 - 0
WebService/src/main/resources/components/enter-community/enterCommunity.html

@@ -71,4 +71,5 @@
         </div>
     </div>
     <vc:create name="storeEnterCommunity"></vc:create>
+
 </div>

+ 13 - 0
WebService/src/main/resources/components/loading/loading.html

@@ -0,0 +1,13 @@
+<div id="loadingComponent" class="java110_loading" v-bind:class="{no_display:loadingInfo.hide}">
+    <!--<div class="spinner-border text-success" role="status">
+        <span class="sr-only">Loading...</span>
+    </div>-->
+
+    <div class="sk-spinner sk-spinner-wave" style="margin: 70px auto;">
+        <div class="sk-rect1"></div>
+        <div class="sk-rect2"></div>
+        <div class="sk-rect3"></div>
+        <div class="sk-rect4"></div>
+        <div class="sk-rect5"></div>
+    </div>
+</div>

+ 38 - 0
WebService/src/main/resources/components/loading/loading.js

@@ -0,0 +1,38 @@
+(function(vc){
+
+    var vm = new Vue({
+        el:'#loadingComponent',
+        data:{
+            loadingInfo:{
+                hide:true,
+            }
+        },
+        mounted:function(){
+
+        },
+        methods:{
+
+        }
+    });
+
+    vm.$on('loading_openLoading',function(){
+                    console.log("开始加载");
+                    vm.loadingInfo.hide = false;
+    });
+    vm.$on('loading_closeLoading',function(){
+        console.log("结束加载");
+        vm.loadingInfo.hide = true;
+    });
+    /**
+        加载遮罩层
+    **/
+    vc.loading = function(_flag){
+        console.log('操作加载层');
+        if(_flag == 'open'){
+            vm.$emit('loading_openLoading',{});
+            return ;
+        }
+
+        vm.$emit('loading_closeLoading',{});
+    }
+})(window.vc)

+ 1 - 0
WebService/src/main/resources/components/store-enter-community/storeEnterCommunity.html

@@ -8,6 +8,7 @@
                 </button>
             </div>
             <div class="modal-body">
+                <p style="color: red;">{{storeEnterCommunityInfo.errorInfo}}</p>
                 <div class=" row">
                     <div class="col-lg-12">
                         <div class="ibox ">

+ 27 - 0
WebService/src/main/resources/components/store-enter-community/storeEnterCommunity.js

@@ -45,6 +45,7 @@
                      });
             },
             listNoEnterCommunity:function(){
+                    vc.loading('open');
                             var param = {
                                 params:{
                                     msg:'123'
@@ -57,11 +58,37 @@
                                          param,
                                          function(json,res){
                                             vc.component.storeEnterCommunityInfo.communityInfo=JSON.parse(json);
+                                            vc.loading('close');
                                          },function(errInfo,error){
                                             console.log('请求失败处理');
+                                            vc.loading('close');
                                          }
                                        );
                         },
+            _saveEnterCommunity:function(_communityInfo){
+                var _param = {
+                    communityId:_communityInfo.communityId
+                };
+                //发送get请求
+               vc.http.post('storeEnterCommunity',
+                            '_saveEnterCommunity',
+                             JSON.stringify(vc.component.registerInfo),
+                             {
+                                 emulateJSON:true
+                              },
+                             function(json,res){
+                                if(res.status == 200){
+                                    vc.jumpToPage("/flow/login");
+                                    return ;
+                                }
+                                vc.component.storeEnterCommunityInfo.errorInfo = json;
+                             },function(errInfo,error){
+                                console.log('请求失败处理');
+                                vc.component.storeEnterCommunityInfo.errorInfo = json;
+                             }
+                           );
+
+            }
 
         }
     });

+ 10 - 0
WebService/src/main/resources/static/css/common.css

@@ -22,4 +22,14 @@
 }
 .delete_button{
     color: #dc3545;
+}
+.java110_loading{
+    width: 100%;
+    height: 100%;
+    z-index: 2300;
+
+    position: absolute;
+}
+.java110_loading>div{
+    margin: 70px auto;
 }

+ 1 - 1
WebService/src/main/resources/static/js/vc-core.js

@@ -25,7 +25,7 @@
     **/
     vc.emit = function(_componentName,_value,_param){
         vc.component.$emit(_componentName+'_'+_value,_param);
-    }
+    };
 })(window.vc);
 
 /**

+ 1 - 0
WebService/src/main/resources/views/enterCommunity.html

@@ -9,6 +9,7 @@
     <vc:create name="commonTop"></vc:create>
 </head>
 <body>
+<vc:create name="loading"></vc:create>
 <div id="wrapper">
     <vc:create name="menu"></vc:create>
 

+ 1 - 0
docs/develop/checkPrivilege.md

@@ -3,6 +3,7 @@
 前台服务开发时必须要校验当前用户是否有权限操作数据,只需在SMO实现类方法中加入如下代码:
 
 > //权限校验
+
 > checkUserHasPrivilege(pd,restTemplate, PrivilegeCodeConstant.PRIVILEGE_ENTER_COMMUNITY);