Browse Source

修复bug

zhuliang 7 years ago
parent
commit
b566c34088

+ 1 - 1
web/index.html

@@ -4,4 +4,4 @@
       "server": window.location.protocol +'//'+ window.location.host + window.location.pathname+ '../server/index.php?s=',
       //"lang" :'en'
       "lang" :'zh-cn'
-  }</script><link href=./static/css/app.0117aae70b0682c4ee58918dec72f890.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.c40e244d08e2558b4f27.js></script><script type=text/javascript src=./static/js/app.9f8a5167384b1e0d5d44.js></script></body></html>
+  }</script><link href=./static/css/app.a0615773ca3eb09ed34d7cc0e2bdb80f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.c40e244d08e2558b4f27.js></script><script type=text/javascript src=./static/js/app.d6c21cd99fa01e017ac8.js></script></body></html>

File diff suppressed because it is too large
+ 0 - 1
web/static/css/app.0117aae70b0682c4ee58918dec72f890.css


File diff suppressed because it is too large
+ 1 - 0
web/static/css/app.a0615773ca3eb09ed34d7cc0e2bdb80f.css


File diff suppressed because it is too large
+ 0 - 1
web/static/js/app.9f8a5167384b1e0d5d44.js


File diff suppressed because it is too large
+ 1 - 0
web/static/js/app.d6c21cd99fa01e017ac8.js


+ 1 - 1
web/static/lang/zh-CN.js

@@ -170,7 +170,7 @@ exports.default = {
     'json_to_table':'插入表格JSON',
     'beautify_json':'插入代码JSON',
     'beautify_json_description':'请粘贴一段json,程序将自动以美观的方式格式化显示',
-    'http_test_api':'在线测试API',
+    'http_test_api':'在线测试Api',
     'json_to_table_description':'请粘贴一段json,程序将自动以表格的方式格式化显示',
     'confirm':'确定',
     'cancel':'取消',

+ 3 - 1
web_src/src/components/common/BackToTop.vue

@@ -55,8 +55,10 @@ export default {
     .el-icon-caret-top{
         background: #fff;
         box-shadow: 0 0 15px rgba(0,0,0,0.15);
-        color: #555;
+        color: #888;
         border-radius: 40px;
+        font-size: 30px;
+        padding: 10px;
     }
     .el-icon-caret-top:hover{
         background: #599ff7;

+ 0 - 23
web_src/src/components/item/show/show_single_page_item/Index.vue

@@ -13,7 +13,6 @@
                 <el-button type="text" @click="goback">{{$t('goback')}}</el-button>
                 <el-button type="text"  @click="share_item">{{$t('share')}}</el-button>
                 <el-button type="text" @click="edit_page"  v-if="item_info.ItemPermn && item_info.is_archived < 1" >{{$t('edit')}}</el-button>
-                <el-button type="text" @click="delete_page"  v-if="item_info.ItemPermn && item_info.is_archived < 1" >{{$t('delete')}}</el-button>
                   &nbsp;&nbsp;&nbsp;
                 <el-dropdown>
                   <span class="el-dropdown-link">
@@ -183,28 +182,6 @@ export default {
       var url = '/page/edit/'+this.item_info.item_id+'/'+page_id;
       this.$router.push({path:url}) ;
     },
-    delete_page(){
-      var page_id = this.page_id > 0 ? this.page_id : 0 ;
-      var that = this ;
-      var url = DocConfig.server+'/api/page/delete';
-
-      this.$confirm(that.$t('comfirm_delete'), ' ', {
-          confirmButtonText: that.$t('confirm'),
-          cancelButtonText: that.$t('cancel'),
-          type: 'warning'
-      }).then(() => {
-          var params = new URLSearchParams();
-          params.append('page_id',  page_id);
-          that.axios.post(url, params)
-              .then(function (response) {
-                  if (response.data.error_code === 0 ) {
-                      window.location.reload()
-                  }else{
-                      that.$alert(response.data.error_message);
-                  }
-              });
-          });
-    },
     share_item(){
       this.share_item_link =  this.getRootPath()+"#/"+this.item_info.item_id  ;
       this.qr_item_link = DocConfig.server +'/api/common/qrcode&size=3&url='+encodeURIComponent(this.share_item_link);

+ 66 - 38
web_src/src/components/page/edit/Index.vue

@@ -75,67 +75,94 @@
     <div class=""></div>
 <!-- 模板存放的地方 -->
 <div id="api-doc-templ"  ref="api_doc_templ" style="display:none">
-    
-**简要描述:** 
 
-- 用户注册接口
+  **名称:**
+
+  - 用户注册
+
+  **描述:**
+
+  - 无
+
+  **请求地址(URL):**
+  - ` http://xx.com/api/user/register `
+
+  **请求方式:**
+  - GET
+  - POST
 
-**请求URL:** 
-- ` http://xx.com/api/user/register `
-  
-**请求方式:**
-- POST 
+  **请求参数:**
 
-**参数:** 
+  |参数名|必填|类型|说明|
+  |:----    |:---|:----- |-----   |
+  |username |是  |string |用户名   |
+  |password |是  |string | 密码    |
+  |name     |否  |string | 昵称    |
 
-|参数名|必选|类型|说明|
-|:----    |:---|:----- |-----   |
-|username |是  |string |用户名   |
-|password |是  |string | 密码    |
-|name     |否  |string | 昵称    |
+  **响应参数:**
 
- **返回示例**
+  |参数名|父元素|类型|说明|
+  |:-----|:-----|:-----|:-----|
+  | uid | data | int | 用户ID |
+  | name | data | string | 用户姓名 |
+  | avatar | data | object | 用户头像 |
+  | url | avatar | string | 头像地址 |
+  | width | avatar | int | 头像图片宽度 |
+  | height | avatar | int | 头像图片高度 |
 
-``` 
+  **响应示例:**
+
+  - 成功
+
+  ```
   {
-    "error_code": 0,
+    "code": 0,
+    "msg": "",
     "data": {
-      "uid": "1",
-      "username": "12154545",
-      "name": "吴系挂",
-      "groupid": 2 ,
+      "uid": 1,
+      "username": "123456",
+      "name": "张三",
       "reg_time": "1436864169",
       "last_login_time": "0",
+      "avatar":{
+        "url": "http://xx.com/avatar/default.png",
+        "width": 300,
+        "height": 300
+      }
     }
   }
-```
+  ```
+
+  - 失败
 
- **返回参数说明** 
+  ```
+  {
+    "code": 1,
+    "msg": "用户名必须是手机号码"
+  }
+  ```
 
-|参数名|类型|说明|
-|:-----  |:-----|-----                           |
-|groupid |int   |用户组id,1:超级管理员;2:普通用户  |
+  **备注**
 
- **备注** 
+  - 更多返回错误代码请看错误代码描述页面
 
-- 更多返回错误代码请看首页的错误代码描述
 
 
 </div>
 <div id="database-doc-templ" ref="database_doc_templ" style="display:none">
-    
--  用户表,储存用户信息
 
-|字段|类型|空|默认|注释|
-|:----    |:-------    |:--- |-- -|------      |
-|uid    |int(10)     |否 |  |             |
-|username |varchar(20) |否 |    |   用户名  |
-|password |varchar(50) |否   |    |   密码    |
-|name     |varchar(15) |是   |    |    昵称     |
-|reg_time |int(11)     |否   | 0  |   注册时间  |
+  #### 用户表
+  - 储存用户信息
 
-- 备注:无
+  |字段|类型|空|默认|额外|注释|
+  |:------|:-------|:-----|:-----|:------|:------|
+  |uid |int(10) |否 | 无 | 主键、自增|用户ID |
+  |username |varchar(20) |否 | 无 |  | 用户名 |
+  |password |varchar(50) |否 | 无 |  | 密码 |
+  |name     |varchar(15) |是 | NULL |  | 昵称 |
+  |reg_time |datetime    |否 |无 |  | 注册时间 |
 
+  - 备注:无
 
 </div>
 
@@ -330,6 +357,7 @@ export default {
 
     ShowRunApi(){
 //      window.open('http://runapi.showdoc.cc/');
+        window.open('https://www.sojson.com/httpRequest/');
     },
     //更多模板、模板列表
     ShowTemplateList(){

+ 1 - 1
web_src/static/lang/zh-CN.js

@@ -170,7 +170,7 @@ exports.default = {
     'json_to_table':'插入表格JSON',
     'beautify_json':'插入代码JSON',
     'beautify_json_description':'请粘贴一段json,程序将自动以美观的方式格式化显示',
-    'http_test_api':'在线测试API',
+    'http_test_api':'在线测试Api',
     'json_to_table_description':'请粘贴一段json,程序将自动以表格的方式格式化显示',
     'confirm':'确定',
     'cancel':'取消',