zhengwei 4 năm trước cách đây
mục cha
commit
29c3bdeeb5

BIN
node_modules/_node-sass@5.0.0@node-sass/vendor/win32-x64-88/binding.node


+ 1 - 0
package.json

@@ -10,6 +10,7 @@
     "core-js": "^3.6.5",
     "echarts": "^4.8.0",
     "element-ui": "^2.13.2",
+    "google-protobuf": "^3.15.8",
     "grpc-web": "^1.2.1",
     "mockjs": "^1.1.0",
     "moment": "^2.27.0",

+ 34 - 33
src/Global.js

@@ -60,12 +60,11 @@ getHoursAndMin = function (datetime) {
 }
 
 // 格式化时间去掉T
-nonTfmtDate = function (datetime, length) {
+nonTfmtDate = function (datetime) {
     if ((datetime == '') || (datetime == undefined))
         return '';
     if ((datetime == '1900-01-01') || (datetime == '1900-01-01 00:00:00.000'))
         return '';
-    length = !length ? 10 : length;//缺省参数
     datetime = new Date(+new Date(datetime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
     return datetime
 };
@@ -81,12 +80,17 @@ nonTfmtDatetoLength = function (datetime, length) {
     return datetime
 };
 
-// 获取当前时间
-globalcurrent = function () {
+/**
+ * 获取时间字符串
+ * @param mYear 几年后
+ * @param mMonth 几个月后
+ * @returns {string}
+ */
+getDate = function (mYear, mMonth) {
     let date = new Date();
-    let seperator1 = "-";
-    let year = date.getFullYear();
-    let month = date.getMonth() + 1;
+    let split = "-";
+    let year = date.getFullYear()+mYear;
+    let month = date.getMonth() + 1+mMonth;
     let strDate = date.getDate();
     if (month >= 1 && month <= 9) {
         month = "0" + month;
@@ -94,12 +98,10 @@ globalcurrent = function () {
     if (strDate >= 0 && strDate <= 9) {
         strDate = "0" + strDate;
     }
-    let thisdata = year + seperator1 + month + seperator1 + strDate;
-    return thisdata;
+    let thisData = year + split + month + split + strDate;
+    return thisData;
 };
 
-
-
 // 校验内容长度
 globalValid = function (data, mins, maxs, text, that) {
     let thisVal = data;
@@ -205,26 +207,20 @@ pageOptions = function () {
 endTypeOptions = function () {
     let option = [
         {
-            value: '',
+            value: -99999,
             label: '全部'
         }, {
-            value: 1,
-            label: '当天'
-        }, {
-            value: 7,
-            label: '一周'
+            value: 0,
+            label: '已过期'
         }, {
             value: 30,
             label: '一个月'
-        }, {
-            value: 90,
-            label: '一季度'
         }, {
             value: 180,
             label: '半年'
-        }, {
-            value: -1,
-            label: '已过期'
+        },{
+            value: 360,
+            label: '一年'
         },
     ];
     return option
@@ -235,7 +231,7 @@ vipOptions = function (i) {
     if (i == 0) {
         option = [
             {
-                value: '',
+                value: -99,
                 label: '全部'
             }, {
                 value: 1,
@@ -263,9 +259,9 @@ turnResToOption = function (data) {
     if (!data) return false
     let ids = data.map(item => {
         return {
-            label: item.UserInfo.Name + ' ' + item.UserInfo.Phone,
-            key: parseInt(item.UserInfo.Id),
-            value: parseInt(item.UserInfo.Id),
+            label: item.user_name + ' ' + item.usercode,
+            key: item.uu_user_id,
+            value: item.uu_user_id,
         }
     });
     return ids
@@ -336,10 +332,10 @@ turnClassResToOption = function (data) {
     if (!data) return false
     let ids = data.map(item => {
         return {
-            label: item.ClassSelf.ClassName,
-            key: parseInt(item.ClassSelf.ClassId),
-            value: parseInt(item.ClassSelf.ClassId),
-            ClassColor: item.ClassSelf.ClassColor,
+            label: item.class_name,
+            key: parseInt(item.class_id),
+            value: parseInt(item.class_id),
+            ClassColor: item.class_color,
         }
     })
     return ids
@@ -358,7 +354,6 @@ turnShopResToOption = function (data) {
 };
 
 
-
 turnStdToOption = function (data) {
     if (!data) return false
     let ids = data.map(item => {
@@ -367,7 +362,7 @@ turnStdToOption = function (data) {
             key: parseInt(item.StdId),
             value: parseInt(item.StdId),
             classId: parseInt(item.ClassId),
-            ConsumeHour:item.ConsumeHour
+            ConsumeHour: item.ConsumeHour
         }
     })
     return ids
@@ -433,3 +428,9 @@ deepClone = function (obj) {
     return objClone
 };
 
+getSignStr = function (jsonStr) {
+
+
+    return "123123123";
+}
+

+ 11 - 11
src/Mock/index.js

@@ -221,20 +221,20 @@ let getNavListQuery = function () {
                 icon: "el-icon-house",
                 Childs: [
                     {
-                        clmid: "/member",
-                        clmcode: "member",
-                        clmname: "目管理",
-                        clmurl: "/member",
+                        clmid: "/lesson",
+                        clmcode: "lesson",
+                        clmname: "目管理",
+                        clmurl: "/lesson",
                     }, {
-                        clmid: "/tempMember",
-                        clmcode: "tempMember",
+                        clmid: "/lessonTemplate",
+                        clmcode: "lessonTemplate",
                         clmname: "课程表模板",
-                        clmurl: "/tempMember",
+                        clmurl: "/lessonTemplate",
                     }, {
-                        clmid: "/record",
-                        clmcode: "record",
+                        clmid: "/lessonManage",
+                        clmcode: "lessonManage",
                         clmname: "课程表管理",
-                        clmurl: "/record",
+                        clmurl: "/lessonManage",
                     }, {
                         clmid: "/record",
                         clmcode: "record",
@@ -311,7 +311,7 @@ let getNavListQuery = function () {
             }, {
                 clmid: "5",
                 clmcode: "member",
-                clmname: "心率",
+                clmname: "心率管理",
                 clmurl: "/",
                 prname: "",
                 show: 3,

+ 8 - 20
src/components/Headside.vue

@@ -78,7 +78,8 @@ export default {
     }
   },
   mounted() {
-    this.getManagerSelfQuery();
+    this.left_hide();//默认展开侧边栏
+    // this.getManagerSelfQuery();// TODO 待重构
   },
   methods: {
     remove(p) {
@@ -92,7 +93,7 @@ export default {
         that.$message.error('最后一页咯');
       }
     },
-    //            隐藏左侧和显示
+    //隐藏左侧和显示
     left_hide: function () {
       let that = this;
       that.left_panel_state = !that.left_panel_state;
@@ -134,7 +135,7 @@ export default {
         } else {
           if (json.Code == 1010) {
             that.$message.error(json.Memo + " 错误码:" + json.Code);
-            that.$router.push({path: "/login", query: {status: 1}});
+            that.$router.push({path: "/login", query: {status : 1}});
             return false;
           } else {
             that.$message.error(json.Memo + " 错误码:" + json.Code);
@@ -174,23 +175,10 @@ export default {
           .then(() => {
             let that = this;
             that.$router.push({path: "/login", query: {status: 1}});
-            let param = {
-              token: localStorage.token,
-            };
-            let postdata = qs.stringify(param);
-            SignOut(postdata).then((res) => {
-              let json = res;
-              if (json.Code == 0) {
-                localStorage.clear();
-                // that.$router.push({path: '/login', query: {status: 1}});
-                that.$message({
-                  showClose: true,
-                  message: "当前用户已退出登陆!",
-                  type: "success",
-                });
-              } else {
-                that.$message.error(json.Memo + " 错误码:" + json.Code);
-              }
+            that.$message({
+              showClose: true,
+              message: "当前用户已退出登陆!",
+              type: "success",
             });
           })
           .catch(() => {

+ 8 - 4
src/components/Navside.vue

@@ -67,11 +67,10 @@ export default {
       this.$emit('refreshList', res);
     },
     handleOpen(key, keyPath) {
-      console.log(key, keyPath);
-
+      // console.log(key, keyPath);
     },
     handleClose(key, keyPath) {
-      console.log(key, keyPath);
+      // console.log(key, keyPath);
     },
     getTableQuery() {
       let that = this;
@@ -132,7 +131,12 @@ export default {
 }
 
 
-/deep/ .el-submenu__title:hover {
+/deep/
+.el-submenu__title {
+  margin-left: -20px;
+}
+
+.el-submenu__title:hover {
   background-color: #3699FF;
   color: #fff;
 

+ 0 - 415
src/components/Navside2.vue

@@ -1,415 +0,0 @@
-<template>
-  <div :class="NavsideClass">
-    <div class="logoContainer">
-      <img src="../assets/img/nav/logo.png"/>
-      <!--            <i :class="[{ 'el-icon-s-unfold left_hide_icon': left_panel_state }, { 'el-icon-s-fold left_show_icon': !left_panel_state }]"-->
-      <!--                @click="left_hide"></i>-->
-    </div>
-    <el-row :class="[{ 'shortnav': isCollapse }, { 'longNav': !isCollapse }]">
-      <el-col :span="24">
-        <el-menu :default-active="userLevelDeafult" class="el-menu-vertical-demo" @open="handleOpen"
-                 @close="handleClose" @select="handleSelect" :collapse="isCollapse" background-color="#ffffff"
-                 text-color="#777777" active-text-color="#fff" router>
-          <el-menu-item :index="nav.clmid" :route="nav.clmurl" v-for="nav in navs"
-                        popper-append-to-body="false"
-                        v-if="nav.show == userLevel">
-            <i :class="nav.icon"></i>
-            <span slot="title">{{ nav.clmname }}</span>
-          </el-menu-item>
-        </el-menu>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-<script>
-import Navs from '../api/Navs';
-import {
-  ManagerSelfQuery,
-  ShopListQuery
-} from '../api/getApiRes.js'
-
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      isCollapse: true,
-      left_panel_state: true,
-      wildState: 0,
-      navs: [],
-      ShopName: '',
-      userLevelText: '',
-      NavsideClass: 'Navside',
-      userLevel: 0,
-      userLevelDeafult: "",
-    }
-  },
-  // props: ['isCollapse'],
-  mounted() {
-    this.userLevelDeafult = this.$route.meta.clmid;
-    this.getTableQuery();
-    this.getManagerSelfQuery();
-    if (document.body.clientWidth < 1024) {
-      this.NavsideClass = 'NavsideShort'
-    } else {
-      this.NavsideClass = 'Navside'
-    }
-  },
-  methods: {
-    //            隐藏左侧和显示
-    left_hide: function () {
-      let that = this;
-      that.left_panel_state = !that.left_panel_state;
-      that.isCollapse = !that.isCollapse;
-      this.$emit('lefthide');
-
-      // if (!that.left_panel_state) {
-      //     this.$emit('left_hide_func');
-      // } else {
-      //     this.$emit('right_hide_func');
-      // }
-    },
-    handleSelect(i, s, t) {
-      // this.$emit('TabsAdd', i);//触发事件
-    },
-    getTableQuery() {
-      // 菜单
-      this.navs = Navs;
-    },
-    getManagerSelfQuery() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ManagerSelfQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.userLevelText = json.Rs.Role.Name;
-          // 1 会员 2 系统 3 店铺 4 教练
-          switch (parseInt(json.Rs.Role.Id)) {
-            case 1:
-              that.userLevel = 1;
-              break;
-            case 2:
-              that.userLevel = 2;
-              break;
-            case 3:
-              that.userLevel = 3;
-              break;
-            case 4:
-              that.userLevel = 4;
-              break;
-          }
-          localStorage.shopId = json.Rs.ShopId;
-          this.panelSelect(json.Rs.ShopId);
-        } else {
-          if (json.Code == 1010) {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-            that.$router.push({path: '/login', query: {status: 1}});
-            return false
-          } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-          }
-        }
-      })
-    },
-    // 获取所属店铺
-    panelSelect(ShopId) {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ShopListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          json.Rs.map(function (item) {
-            if (item.ShopID == ShopId) {
-              that.ShopName = item.ShopName;
-            }
-          })
-        } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
-    },
-    handleOpen(key, keyPath) {
-      // console.log(key, keyPath);
-    },
-    handleClose(key, keyPath) {
-      // console.log(key, keyPath);
-    },
-  },
-}
-</script>
-<style scoped>
-/*注释*/
-.Navside {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  overflow-y: scroll;
-  background-color: #fff;
-  z-index: 4444;
-}
-
-.NavsideShort {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  overflow-y: scroll;
-  background-color: #fff;
-  z-index: 4444;
-}
-
-.Navside::-webkit-scrollbar {
-  /*滚动条整体样式*/
-
-  width: 3px;
-  /*高宽分别对应横竖滚动条的尺寸*/
-
-  height: 1px;
-}
-
-.Navside::-webkit-scrollbar-thumb {
-  /*滚动条里面小方块*/
-
-  border-radius: 3px;
-
-  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-
-  background: #f5f5f5;
-}
-
-.Navside::-webkit-scrollbar-track {
-  /*滚动条里面轨道*/
-
-  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-
-  border-radius: 3px;
-
-  background: #f5f5f5;
-}
-
-.NavsideShort::-webkit-scrollbar {
-  /*滚动条整体样式*/
-
-  width: 3px;
-  /*高宽分别对应横竖滚动条的尺寸*/
-
-  height: 1px;
-}
-
-.NavsideShort::-webkit-scrollbar-thumb {
-  /*滚动条里面小方块*/
-
-  border-radius: 3px;
-
-  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-
-  background: #f5f5f5;
-}
-
-.NavsideShort::-webkit-scrollbar-track {
-  /*滚动条里面轨道*/
-
-  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-
-  border-radius: 3px;
-
-  background: #f5f5f5;
-}
-
-.logoContainer {
-  width: 100%;
-  height: 60px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #3799ff;
-}
-
-.logoContainer img {
-  width: 60px;
-  height: 60px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 1px;
-}
-
-.userContainer {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-bottom: 16px;
-  padding-top: 19px;
-  padding-bottom: 19px;
-  border-bottom: 1px solid #f0f2f5;
-  background: #fff;
-}
-
-.userContainer img {
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-bottom: 16px;
-}
-
-.userContainer span {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #565656;
-  font-size: 16px;
-}
-
-.userContainer em {
-  width: 125px;
-  height: 26px;
-  line-height: 26px;
-  text-align: center;
-  color: #fff;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #e75296;
-  border-radius: 250px;
-  font-style: normal;
-  margin-top: 8px;
-  font-size: 16px;
-}
-
-/deep/ .el-menu {
-  border: none;
-}
-
-/deep/ .el-menu-item {
-}
-
-/deep/ .el-menu-item span {
-  text-align: left;
-  float: left;
-  margin-left: 70px;
-}
-
-/deep/ .el-menu-item.is-active {
-  background-color: #3799ff !important;
-  color: #fff !important;
-}
-
-/deep/ .el-menu-item:hover {
-  background-color: #3799ff !important;
-  color: #fff !important;
-}
-
-/deep/ .el-menu-item:hover i {
-  color: #fff !important;
-}
-
-/deep/ .el-menu-item i {
-  position: inherit;
-  float: left;
-  line-height: 25px;
-  /*margin-top: 15px;*/
-  /*left: 60px;*/
-}
-
-@media (min-width: 960px) and (max-width: 1367px) {
-  .left_hide_icon {
-    width: 20px;
-    height: 20px;
-    margin-top: 8px;
-    float: left;
-    margin-left: 10px;
-    cursor: pointer;
-    color: #badcff;
-    font-size: 22px;
-    /*background: url("../assets/img/header/right.png")top center no-repeat;*/
-  }
-
-  /*.left_hide_icon:hover {*/
-  /*    background: #ccc;*/
-  /*    color: #fff;*/
-  /*}*/
-  .left_show_icon {
-    width: 20px;
-    height: 20px;
-    margin-top: 8px;
-    float: left;
-    margin-left: 10px;
-    cursor: pointer;
-    color: #badcff;
-    font-size: 22px;
-    /*background: url("../assets/img/header/left.png")top center no-repeat;*/
-  }
-
-  .logoContainer {
-    height: 40px;
-  }
-
-  .el-container.is-vertical {
-    left: 60px;
-  }
-
-  .el-menu-item span {
-    text-align: left;
-    float: left;
-    margin-left: 5px;
-    line-height: 20px;
-    font-size: 12px;
-    height: 30px;
-    line-height: 30px;
-  }
-
-  .userContainer em {
-    width: 100%;
-    overflow: hidden;
-    display: block;
-    margin: 0 auto;
-    font-size: 12px;
-  }
-
-  .el-menu-item {
-    padding: 0 !important;
-    margin: 0;
-  }
-
-  /deep/ .el-tooltip {
-    padding: 0 !important;
-  }
-
-  .userContainer span {
-    font-size: 12px;
-  }
-
-  .el-menu-item,
-  .el-submenu__title {
-    height: 30px;
-    line-height: 30px;
-  }
-
-  .userContainer img {
-    display: none;
-  }
-
-  /deep/ .el-tooltip i {
-    float: left;
-    left: 10px;
-    line-height: 30px;
-  }
-
-  /deep/ .el-menu-item i {
-    position: inherit;
-    float: left;
-    margin-top: 3px;
-    left: 10px;
-  }
-}
-</style>

+ 26 - 18
src/components/cropper.vue

@@ -45,6 +45,12 @@ import {VueCropper} from 'vue-cropper'
 
 // 定义的接口根据自己项目更换
 // import {uploadImage} from '@/api/upload'
+//grpc参数对象
+import {
+  DefaultRequest,
+  QiNiuTokenReply
+} from "@/grpc/base_pb";
+
 
 import {isImageFile, isMaxFileSize, readFile} from '@/utils/upload'   // 见下文
 let qs = require('qs');
@@ -200,6 +206,7 @@ export default {
     },
     // 上传文件到七牛云
     upqiniu(req) {
+      let that = this;
       const config = {
         headers: {'Content-Type': 'multipart/form-data'}
       };
@@ -207,24 +214,25 @@ export default {
       // 重命名要上传的文件
       const keyname = 'GoAllOut' + new Date().valueOf() + Math.floor(Math.random() * 100) + '.' + filetype;
       // 从后端获取上传凭证token
-      let param = {
-        token: localStorage.token,
-        // token: 'd6398fe970cc64475cfce4041bb327cf',
-      };
-      let postdata = qs.stringify(param);
-      // this.axios.post('http://xfeilong.iyoogo.com:85/v1/QiNiu/GetSimpleQiNiuTokenByCross', postdata).then(res => {
-      this.axios.post(headapi +'v1/QiNiu/GetSimpleQiNiuToken', postdata).then(res => {
-        const formdata = new FormData();
-        console.log(req);
-        formdata.append('file', req);
-        formdata.append('token', res.data.QiNinToken);
-        formdata.append('key', keyname);
-        // 获取到凭证之后再将文件上传到七牛云空间
-        this.axios.post(this.domain, formdata, config).then(res => {
-          this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key
-          this.$emit('subUploadSucceed', this.imageUrl)
-        })
-      })
+      let getRequest = new DefaultRequest();
+      let reply = new QiNiuTokenReply();
+      that.client.getSimpleQiNiuToken(getRequest, {"Token": localStorage.token}, (err, reply) => {
+        if (err == null) {
+            const formdata = new FormData();
+            formdata.append('file', req);
+            formdata.append('token', reply.getToken());
+            formdata.append('key', keyname);
+            // 获取到凭证之后再将文件上传到七牛云空间
+            this.axios.post(this.domain, formdata, config).then(res => {
+              this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key
+              this.$emit('subUploadSucceed', this.imageUrl)
+            })
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
     }
   }
 }

+ 4 - 4
src/components/preview.vue

@@ -19,14 +19,14 @@
             </div>
             <div class="tableContext">
                 <div class="times">
-                    <span v-for="time in previewDate.SttPlanPreviewTimeList">{{time.BeginStr}}-{{time.EndStr}}</span>
+                    <span v-for="time in previewDate.sttplanpreviewtimelist">{{time.begin_str}}-{{time.end_str}}</span>
                     <span v-for="time in previewDate.SttPreviewTimeList">{{time.BeginStr}}-{{time.EndStr}}</span>
                 </div>
                 <!--                1-->
                 <div class="rows" v-for="i in 7">
-                    <em :style="{background:tab.ClassColor}" v-for="tab in previewDate.SttPlanPreviewClassList"
-                        v-if="tab.WeekDay == i">
-                        {{tab.ClassName}}
+                    <em :style="{background:tab.ClassColor}" v-for="tab in previewDate.sttplanpreviewclasslist"
+                        v-if="tab.week_day == i">
+                        {{tab.class_name}}
                     </em>
                     <em :style="{background:tab.ClassColor}" v-for="tab in previewDate.SttPreviewClassList"
                         v-if="tab.WeekDay == i">

+ 332 - 0
src/grpc/base.proto

@@ -0,0 +1,332 @@
+syntax = "proto3";
+
+option go_package = ".;base";
+
+package base;
+
+enum ErrorCode{
+  OK = 0;
+  PGErr = 100;
+  PmsnError = 110;
+  J2MError = 120;
+  WebStatusError = 121;
+  WebToImStatusError = 122;
+  ImToWebtatusError = 123;
+  PARAM = 150;
+  Token = 200;
+  VerifyCode = 201;
+  PasswordWrongTooMuch = 202;
+}
+
+// metadata 中需要字段 tokefrgen n 用作登录验证
+service Api {
+  rpc SignUp (SignUpRequest) returns (DefaultReply) {}
+  rpc SignIn (SignInRequest) returns (SignInReply)  {}
+  // rpc SignInWithPhone (SignInRequest) returns (SignInReply)  {} // 缺少短信验证码接口
+  rpc SignOut (DefaultRequest) returns (DefaultReply)  {}
+  rpc GenVerifyImage (GenVerifyImageRequest) returns (GenVerifyImageReply)  {}
+
+  // 下拉框接口
+  rpc SelectHrSensors (StandardRequest) returns (StandardReply)  {}
+  rpc AcrossUserSimpleQuery (StandardRequest) returns (StandardReply)  {}
+  rpc VipUserSimpleQuery (StandardRequest) returns (StandardReply)  {}
+  rpc TempVipUserSimpleQuery (StandardRequest) returns (StandardReply)  {}
+  rpc ShopSimpleQuery (StandardRequest) returns (StandardReply)  {}
+  rpc ManageableSimpleQuery (StandardRequest) returns (StandardReply)  {}
+  rpc ClassSimpleQuery (StandardRequest) returns (StandardReply)  {}
+  rpc ScreenSimpleQuery (StandardRequest) returns (StandardReply)  {}
+
+  // 商家信息管理
+  rpc ManageableShopList (ShopListRequest) returns (ShopListReply) {}
+  rpc ManageableGetShopInfo (ShopDetailRequest) returns (ShopInfo) {}
+  rpc ShopLicenseList (ShopDetailRequest) returns (LicenseList) {}
+  rpc ShopLicenseTypeMap (IdList) returns (LicenseTypeMapReply)  {}
+  rpc GetShopNavi (GetShopNaviRequest) returns (GetShopNaviReply) {}
+  rpc ShopGroupQuery (StandardRequest) returns (StandardReply) {}
+  rpc ShopGroupAdd (StandardRequest) returns (StandardReply) {}
+  rpc ShopGroupEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopGroupStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopGroupDetailsQuery (StandardRequest) returns (StandardReply) {}
+  rpc ShopGroupDetailsAdd (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueQuery (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueAdd (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueEquipQuery (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueEquipAdd (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueEquipEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueEquipStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopVenueEquipStatusDel (StandardRequest) returns (StandardReply) {}
+  rpc ShopManagerQuery (StandardRequest) returns (StandardReply) {}
+  rpc ShopManagerAdd (StandardRequest) returns (StandardReply) {}
+  rpc ShopManagerEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopManagerStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopConfigQuery (StandardRequest) returns (StandardReply) {}
+  rpc ShopConfigEdit (StandardRequest) returns (StandardReply) {}
+  // 商家会员管理
+  rpc ShopVipUserQuery (StandardRequest) returns (StandardReply) {}
+  rpc ShopVipUserAdd (StandardRequest) returns (StandardReply) {}
+  rpc ShopVipUserEdit (StandardRequest) returns (StandardReply) {}
+  rpc ShopVipUserStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc AcrossVipUserQuery (StandardRequest) returns (StandardReply) {}
+  rpc AcrossVipUserAdd (StandardRequest) returns (StandardReply) {}
+  rpc AcrossVipUserDel (StandardRequest) returns (StandardReply) {}
+  rpc VipPhoneQuery (StandardRequest) returns (StandardReply) {}
+  rpc VipMainPhoneCheck (StandardRequest) returns (StandardReply) {}
+  rpc VipOtherPhoneAdd (StandardRequest) returns (StandardReply) {}
+  rpc VipOtherPhoneEdit (StandardRequest) returns (StandardReply) {}
+  rpc VipOtherPhoneStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc TempVipUserQuery (StandardRequest) returns (StandardReply) {}
+  rpc TempVipUserAdd (StandardRequest) returns (StandardReply) {}
+  rpc TempVipUserEdit (StandardRequest) returns (StandardReply) {}
+  rpc TempVipUserStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc VipHourEdit (StandardRequest) returns (StandardReply) {}
+  rpc VipConsumeListQuery (StandardRequest) returns (StandardReply) {}
+  rpc VipConsumeDetailQuery (StandardRequest) returns (StandardReply) {}
+  rpc VipClassRelationEdit (StandardRequest) returns (StandardReply) {}
+  rpc VipHourChgQuery (StandardRequest) returns (StandardReply) {}
+  rpc VipUserClassQuery (StandardRequest) returns (StandardReply) {}
+  rpc GetOverlayImgQiNiuToken (GetOverlayImgRequest) returns (QiNiuTokenReply) {}
+  rpc GetSimpleQiNiuToken (DefaultRequest) returns (QiNiuTokenReply) {}
+
+  // 商家课程管理
+  rpc ClassQuery (StandardRequest) returns (StandardReply) {}
+  rpc ClassAdd (StandardRequest) returns (StandardReply) {}
+  rpc ClassEdit (StandardRequest) returns (StandardReply) {}
+  rpc ClassStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc ClassColorEdit (StandardRequest) returns (StandardReply) {}
+  rpc ClassWxVisibleEdit (StandardRequest) returns (StandardReply) {}
+  rpc ClassVipEdit (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanBasicQuery (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanBasicAdd (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanBasicEdit (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanBasicShopEdit (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanBasicStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanBasicPublish (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanPreview (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanCopy (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanDetailQuery (StandardRequest) returns (StandardReply) {}
+  rpc SttPlanDetailBatchSave (StandardRequest) returns (StandardReply) {}
+  rpc STTBasicQuery (StandardRequest) returns (StandardReply) {}
+  rpc STTBasicAdd (StandardRequest) returns (StandardReply) {}
+  rpc STTBasicEdit (StandardRequest) returns (StandardReply) {}
+  rpc STTBasicStatusEdit (StandardRequest) returns (StandardReply) {}
+  rpc STTBasicPreview (StandardRequest) returns (StandardReply) {}
+  rpc STTBasicCopy (StandardRequest) returns (StandardReply) {}
+  rpc STTBasicOfflineEdit (StandardRequest) returns (StandardReply) {}
+  rpc STTDetailListQuery (StandardRequest) returns (StandardReply) {}
+  rpc STTBasicDetailBatchSave (StandardRequest) returns (StandardReply) {}
+  rpc STTDetailAllowDelCheck (StandardRequest) returns (StandardReply) {}
+
+  // 商家上下课管理
+  rpc CourseDetailQuery (StandardRequest) returns (StandardReply) {}
+
+  // 商家预约管理
+  rpc OrderListQuery (StandardRequest) returns (StandardReply) {}
+  rpc OrderAddByManager (StandardRequest) returns (StandardReply) {}
+  rpc OrderCancelByManager (StandardRequest) returns (StandardReply) {}
+  rpc OrderStatistics (StandardRequest) returns (StandardReply) {}
+  rpc ClassOrderQuery (StandardRequest) returns (StandardReply) {}
+  rpc VipUserOrderQuery (StandardRequest) returns (StandardReply) {}
+
+  // 心率
+  rpc HrSensorsPublicQuery (StandardRequest) returns (StandardReply) {}
+  rpc HrSensorsPvtQuery (StandardRequest) returns (StandardReply) {}
+  rpc AddHrSensors (StandardRequest) returns (StandardReply) {}
+  rpc AddPvtHrSensors (StandardRequest) returns (StandardReply) {}
+  rpc EditHrSensors (StandardRequest) returns (StandardReply) {}
+  rpc HrSensorsDel (StandardRequest) returns (StandardReply) {}
+  rpc PKGroupChg (StandardRequest) returns (StandardReply) {}
+  rpc BindHrSensor (StandardRequest) returns (StandardReply) {}
+  rpc UnBindHrSensor (StandardRequest) returns (StandardReply) {}
+
+  // 评分管理
+  rpc ActionQuery (StandardRequest) returns (StandardReply) {}
+
+  // 用户微信登陆
+  rpc GenVerifyImageByWinXin(GenVerifyImageRequest)returns(GenVerifyImageReply){}
+  rpc GenPhoneVerifyCode(GenPhoneVerifyCodeRequest)returns(DefaultReply){}
+  rpc CheckVerifyCode(CheckVerifyCodeRequest)returns(DefaultReply){}
+
+}
+message DefaultRequest{
+}
+message DefaultReply{}
+
+message StandardRequest{
+  int64 shopID = 1;
+  string jsonStr = 2;
+  string sign = 3;
+}
+
+message StandardReply{
+  string jsonRst = 1;
+  string sign = 2;
+}
+
+message SignUpRequest {
+  string name = 1;
+  string password = 2;
+}
+
+message SignInReply {
+  string token = 1;
+}
+
+message SignInRequest {
+  string name = 1;
+  string password = 2;
+  string codeId = 3;
+  string verifyCode = 4;
+}
+
+message GenVerifyImageRequest{
+  int32 height = 1;
+  int32 width = 2;
+}
+
+message GenVerifyImageReply{
+  string codeId = 1;
+  string imageBase64 = 2;
+}
+
+message ShopInfo{
+  int64 shopId = 1;
+  string name = 2;
+  int64 sId = 3;
+  string addr = 4;
+  string phone = 5;
+  string contacts = 6;
+  WebStatus status = 7;
+  string  created_at = 8;
+  int64 created_user = 9;
+  string updated_at = 10;
+  int64 updated_user = 11;
+  int64 is_hr = 12;
+  int64 is_score = 13;
+  string shopUUID = 14;
+}
+
+message ShopDetailRequest{
+  int64 shopId = 1;
+}
+
+message ShopListRequest{
+  // 模糊查询
+  string name = 1;
+  // Status_Null查询全部
+  WebStatus status = 2;
+  //上级商家Id, -1 时查询全部
+  int64 sId = 3;
+}
+
+message ShopListReply{
+  repeated ShopInfo list = 1;
+}
+
+enum WebStatus{
+  Ban = 0;
+  On = 1;
+  Delete = 9;
+  All = 99;
+}
+
+message GetShopNaviRequest{
+  int64 shopId = 1;
+  // 最顶层为0
+  int64 parentId = 2;
+}
+
+message Column{
+  string name = 1;
+  string url = 2;
+  string code = 3;
+  // 顺序
+  int32 sn = 4;
+  WebStatus status = 5;
+  bool navShow = 6;
+  string id = 7;
+}
+
+message GetShopNaviReply{
+  repeated Column list = 1;
+}
+
+message GetOverlayImgRequest{
+  string fileName = 1;
+}
+
+message QiNiuTokenReply{
+  string token = 1;
+}
+
+message License{
+  int64 id = 1;
+  int64 shopId = 2;
+  int64 lcsTypeId = 3;
+  string name = 4;
+  // nanoSec
+  int64 validPeriod = 5;
+  // 分
+  int64 lcsPrice = 6;
+  // nanoSec
+  int64 lcsBeginTime = 7;
+  // nanoSec
+  int64 lcsEndTime = 8;
+
+  int64 feeId = 9;
+  WebStatus status = 10;
+  string memo = 11;
+  // nanoSec
+  int64  createdAt = 12;
+  int64 createdUser = 13;
+  // nanoSec
+  int64 updatedAt = 14;
+  int64 updatedUser = 15;
+}
+
+message LicenseList{
+  repeated License list = 1;
+}
+
+message IdList{
+  repeated int64 idList = 1;
+}
+
+message LicenseType{
+  int64 typeId = 1;
+  string name = 2;
+  // 有效期时长,单位毫秒
+  int64 validPeriodMs = 3;
+  // 单位:分
+  int32 price = 4;
+  string memo = 5;
+  int64 execUser = 6;
+  WebStatus status = 7;
+}
+
+message LicenseTypeMapReply{
+  map<int64, LicenseType> licenseMap = 1;
+}
+
+enum VerifyType{
+  Undefined = 0;
+  SignUp = 1;
+  SignIn = 2;
+  ChangePassword = 3;
+}
+
+message GenPhoneVerifyCodeRequest{
+  VerifyType verifyType = 1;
+  string code = 2;
+  string account = 3;
+  string ip = 4;
+  string templateCode = 5;
+  int64 expireDurationNano = 6;
+}
+
+message CheckVerifyCodeRequest{
+  VerifyType verifyType = 1;
+  string code = 2;
+  string account = 3;
+}

+ 2 - 2
src/grpc/gen.bat

@@ -1,2 +1,2 @@
-protoc -I . im.proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:.
-protoc -I . im.proto --js_out=import_style=commonjs:.
+protoc -I . base.proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:.
+protoc -I . base.proto --js_out=import_style=commonjs:.

+ 0 - 309
src/grpc/im.proto

@@ -1,309 +0,0 @@
-syntax = "proto3";
-
-option go_package = ".;im";
-
-package im;
-
-
-enum ErrorCode{
-  OK = 0;
-  PARAM = 4001;
-  Exist = 4002;
-  Token = 4003;
-}
-
-// metadata: 综合管理系统前端调用需要字段 token 用作登录验证;子系统调用需要字段 sys_token 用作系统验证
-service Api {
-  rpc SignUpUserCode (SignUpRequest) returns (SignUpReply) {}
-  rpc SignUpPhone (SignUpRequest) returns (SignUpReply) {}
-
-  rpc SignInUserCode (SignInPasswordRequest) returns (TokenParam)  {}
-  rpc SignInWithPhonePassword (SignInPasswordRequest) returns (TokenParam)  {}
-
-  // ---子系统专用---
-
-  // 检查token有效性
-  rpc SubSessionCheck (TokenParam) returns (SessionCheckReply)  {}
-  // 检查token所属用户是否拥有调用service权限
-  rpc SubPermissionCheck (PermissionCheck) returns (SessionCheckReply)  {}
-  // 登出传入token
-  rpc SubSignOut (TokenParam) returns (DefaultReply)  {}
-  // 批量保存service
-  rpc SubServiceSaveList (SaveServiceListRequest) returns (DefaultReply)  {}
-
-  // ---子系统专用---
-
-  // 用户列表
-  rpc UserList (UserListRequest) returns (UserListReply)  {}
-  // 单个用户信息详情
-  rpc UserGetInfo (UserGetInfoRequest) returns (UserInfo)  {}
-  // 用户添加多个角色
-  rpc UserAddRoles(UserRolesRequest) returns (DefaultReply)  {}
-  // 用户移除多个角色
-  rpc UserRemoveRoles(UserRolesRequest) returns (DefaultReply)  {}
-  // 用户获取栏目列表
-  rpc UserGetColumnList(UserGetColumnListRequest) returns (UserGetColumnListReply)  {}
-  // 创建角色
-  rpc RoleCreate(CreateRoleRequest) returns (DefaultReply)  {}
-  // 角色列表
-  rpc RoleList(RoleListRequest) returns (RoleListReply)  {}
-  // 角色编辑
-  rpc RoleEdit(Role) returns (DefaultReply)  {}
-  // 角色添加多个service权限
-  rpc RoleAddPermissions(RolePermissionRequest) returns (DefaultReply)  {}
-  // 角色移除多个service权限
-  rpc RoleRemovePermissions(RolePermissionRequest) returns (DefaultReply)  {}
-
-  // service权限列表
-  rpc ServiceList(ServiceListRequest) returns (ServiceListReply)  {}
-  // 移除service
-  rpc ServiceRemoveList(ServiceRemoveRequest) returns (DefaultReply)  {}
-
-  rpc ShopCreate (CreateShopRequest) returns (CreateReply)  {}
-  rpc ShopList (ShopListRequest) returns (ShopListReply)  {}
-  rpc SystemAddShop (SystemAddShopRequest) returns (DefaultReply)  {}
-  rpc SystemAddUser (SystemAddUserRequest) returns (DefaultReply)  {}
-  // ---总后台专用API---
-
-  rpc IMSystemCreate (CreateSystemRequest) returns (TokenParam)  {}
-  rpc IMSignOut (DefaultRequest) returns (DefaultReply)  {}
-  rpc IMSelfInfo (DefaultRequest) returns (UserInfo)  {}
-  rpc IMMessageRcv (DefaultRequest) returns (stream Message)  {}
-
-  // ---总后台专用API---
-}
-message DefaultRequest{
-}
-message TokenParam{
-  string token = 1;
-}
-
-message DefaultReply{}
-
-message SignUpReply{
-  int64 userId = 1;
-}
-
-message SignInPasswordRequest {
-  string auth = 1;
-  string password = 2;
-  int64 sysId = 3;
-  //session有效期,单位:秒
-  int64 expirationSec = 4;
-}
-
-enum Status{
-  Null = 0;
-  Ban = 1;
-  On = 2;
-  Delete = 9;
-}
-
-message SignUpRequest {
-  string userCode = 1 ;
-  string name = 2 ;
-  string email = 3 ;
-  string phone = 4 ;
-  string wxOpenId = 5;
-  string qq = 6;
-  string password = 7;
-  string question = 8;
-  string answer = 9;
-  string memo = 10;
-}
-
-message UserInfo {
-  int64  id = 1 ;
-  string userCode = 2 ;
-  string name = 3 ;
-  string email = 4 ;
-  string phone = 5 ;
-  string qq = 7;
-  string memo = 11;
-  Status status = 12;
-}
-
-message CreateReply{
-  int64 id = 1;
-}
-
-message PermissionCheck {
-  string token = 1;
-  // service全路径,区分大小写,如User/List
-  string servicePath = 2;
-}
-
-
-message SessionCheckReply {
-  int64 userId = 1;
-}
-
-message Service {
-  string path = 1;
-  string memo = 2;
-}
-
-message SaveServiceListRequest{
-  repeated Service list = 1;
-}
-
-message CreateSystemRequest{
-  string fullName = 1;
-  string shortname = 2;
-  string sysUrl = 3;
-  string memo = 4;
-}
-
-message UserGetColumnListRequest{
-  int64 userId = 1;
-  // 最顶层为0
-  int32 parentId = 2;
-  // 仅综合管理后台调用有效
-  int64 sysId = 3;
-}
-
-message Column{
-  string name = 1;
-  string url = 2;
-  string code = 3;
-  // 顺序
-  int32 sn = 4;
-  Status status = 5;
-  bool navShow = 6;
-  int64 id = 7;
-}
-
-message UserGetColumnListReply{
-  repeated Column list = 1;
-}
-
-message CreateRoleRequest{
-  string name = 1;
-  string memo = 2;
-}
-
-message Role {
-  int64  id = 1;
-  string name = 2;
-  string memo = 3;
-  Status status = 4;
-  string systemName = 5;
-}
-
-message RoleListRequest{
-  int64 userId = 1;
-  int64 sysId = 2;
-}
-
-message UserListRequest{
-  // 0为全部
-  int64 roleId = 1;
-  Status status = 2;
-  // 模糊查询
-  string name = 3;
-  int64 lcstypeid = 4;
-  // 仅总后台请求时有效
-  int64 sysId = 5;
-}
-
-message UserListReply{
-  repeated UserInfo list = 1;
-}
-
-message UserGetInfoRequest{
-  int64 userId = 1;
-}
-message UserRolesRequest{
-  int64 userId = 1;
-  repeated int64 roleIdList = 2;
-}
-
-message RoleListReply {
-  repeated Role list = 1;
-}
-
-message RolePermissionRequest{
-  int64 roleId = 1;
-  repeated string servicePath = 2;
-}
-
-message ServiceListRequest{
-  // 仅总系统有效
-  int64 sysId = 1;
-}
-
-message ServiceListReply{
-  repeated Service list = 1;
-}
-
-message ServiceRemoveRequest{
-  repeated string pathList = 1;
-}
-
-message CreateShopRequest{
-  string name = 1;
-  string key = 2;
-  //上级商家Id
-  int64  sId = 3;
-  string addr = 4;
-  string phone = 5;
-  string contacts = 6;
-  int64 createUser = 7;
-}
-
-message ShopListRequest{
-  // 子系统调用时,0:展示所有商家,大于0则展示本系统商家
-  int64 sysId = 1;
-  // 模糊查询
-  string name = 2;
-  // Status_Null查询全部
-  Status status = 3;
-  //上级商家Id, -1 时查询全部
-  int64 sId = 4;
-}
-
-message ShopInfo{
-  int64 shopId = 1;
-  string name = 2;
-  int64 sId = 3;
-  string addr = 4;
-  string phone = 5;
-  string contacts = 6;
-  Status status = 7;
-  int64 created_at = 8;
-  int64 created_user = 9;
-  int64 updated_at = 10;
-  int64 updated_user = 11;
-}
-
-message ShopListReply{
-  repeated ShopInfo list = 1;
-}
-
-message SystemAddShopRequest{
-  // 仅总后台调用有效
-  int64 sysId = 1;
-  int64 shopId = 2;
-}
-
-
-message SystemAddUserRequest{
-  // 仅总后台调用有效
-  int64 sysId = 1;
-  int64 userId = 2;
-}
-
-message Message{
-  int64 id = 1;
-  string title = 2;
-  string content = 3;
-  enum Level{
-    Null = 0;
-    Normal = 1;
-    Warn = 2;
-    Error = 3;
-  }
-
-  Level level = 4;
-  int64 createAt = 5;
-}

+ 0 - 2308
src/grpc/im_grpc_web_pb.js

@@ -1,2308 +0,0 @@
-/**
- * @fileoverview gRPC-Web generated client stub for im
- * @enhanceable
- * @public
- */
-
-// GENERATED CODE -- DO NOT EDIT!
-
-
-/* eslint-disable */
-// @ts-nocheck
-
-
-const grpc = {};
-grpc.web = require('grpc-web');
-
-const proto = {};
-proto.im = require('./im_pb.js');
-
-/**
- * @param {string} hostname
- * @param {?Object} credentials
- * @param {?Object} options
- * @constructor
- * @struct
- * @final
- */
-proto.im.ApiClient =
-    function (hostname, credentials, options) {
-        if (!options) options = {};
-        options['format'] = 'text';
-
-        /**
-         * @private @const {!grpc.web.GrpcWebClientBase} The client
-         */
-        this.client_ = new grpc.web.GrpcWebClientBase(options);
-
-        /**
-         * @private @const {string} The hostname
-         */
-        this.hostname_ = hostname;
-
-    };
-
-
-/**
- * @param {string} hostname
- * @param {?Object} credentials
- * @param {?Object} options
- * @constructor
- * @struct
- * @final
- */
-proto.im.ApiPromiseClient =
-    function (hostname, credentials, options) {
-        if (!options) options = {};
-        options['format'] = 'text';
-
-        /**
-         * @private @const {!grpc.web.GrpcWebClientBase} The client
-         */
-        this.client_ = new grpc.web.GrpcWebClientBase(options);
-
-        /**
-         * @private @const {string} The hostname
-         */
-        this.hostname_ = hostname;
-
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.SignUpRequest,
- *   !proto.im.SignUpReply>}
- */
-const methodDescriptor_Api_SignUpUserCode = new grpc.web.MethodDescriptor(
-    '/im.Api/SignUpUserCode',
-    grpc.web.MethodType.UNARY,
-    proto.im.SignUpRequest,
-    proto.im.SignUpReply,
-    /**
-     * @param {!proto.im.SignUpRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.SignUpReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.SignUpRequest,
- *   !proto.im.SignUpReply>}
- */
-const methodInfo_Api_SignUpUserCode = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.SignUpReply,
-    /**
-     * @param {!proto.im.SignUpRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.SignUpReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.SignUpRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.SignUpReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.SignUpReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.signUpUserCode =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SignUpUserCode',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SignUpUserCode,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.SignUpRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.SignUpReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.signUpUserCode =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SignUpUserCode',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SignUpUserCode);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.SignUpRequest,
- *   !proto.im.SignUpReply>}
- */
-const methodDescriptor_Api_SignUpPhone = new grpc.web.MethodDescriptor(
-    '/im.Api/SignUpPhone',
-    grpc.web.MethodType.UNARY,
-    proto.im.SignUpRequest,
-    proto.im.SignUpReply,
-    /**
-     * @param {!proto.im.SignUpRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.SignUpReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.SignUpRequest,
- *   !proto.im.SignUpReply>}
- */
-const methodInfo_Api_SignUpPhone = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.SignUpReply,
-    /**
-     * @param {!proto.im.SignUpRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.SignUpReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.SignUpRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.SignUpReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.SignUpReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.signUpPhone =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SignUpPhone',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SignUpPhone,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.SignUpRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.SignUpReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.signUpPhone =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SignUpPhone',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SignUpPhone);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.SignInPasswordRequest,
- *   !proto.im.TokenParam>}
- */
-const methodDescriptor_Api_SignInUserCode = new grpc.web.MethodDescriptor(
-    '/im.Api/SignInUserCode',
-    grpc.web.MethodType.UNARY,
-    proto.im.SignInPasswordRequest,
-    proto.im.TokenParam,
-    /**
-     * @param {!proto.im.SignInPasswordRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.TokenParam.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.SignInPasswordRequest,
- *   !proto.im.TokenParam>}
- */
-const methodInfo_Api_SignInUserCode = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.TokenParam,
-    /**
-     * @param {!proto.im.SignInPasswordRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.TokenParam.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.SignInPasswordRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.TokenParam)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.TokenParam>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.signInUserCode =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SignInUserCode',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SignInUserCode,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.SignInPasswordRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.TokenParam>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.signInUserCode =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SignInUserCode',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SignInUserCode);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.SignInPasswordRequest,
- *   !proto.im.TokenParam>}
- */
-const methodDescriptor_Api_SignInWithPhonePassword = new grpc.web.MethodDescriptor(
-    '/im.Api/SignInWithPhonePassword',
-    grpc.web.MethodType.UNARY,
-    proto.im.SignInPasswordRequest,
-    proto.im.TokenParam,
-    /**
-     * @param {!proto.im.SignInPasswordRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.TokenParam.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.SignInPasswordRequest,
- *   !proto.im.TokenParam>}
- */
-const methodInfo_Api_SignInWithPhonePassword = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.TokenParam,
-    /**
-     * @param {!proto.im.SignInPasswordRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.TokenParam.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.SignInPasswordRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.TokenParam)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.TokenParam>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.signInWithPhonePassword =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SignInWithPhonePassword',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SignInWithPhonePassword,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.SignInPasswordRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.TokenParam>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.signInWithPhonePassword =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SignInWithPhonePassword',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SignInWithPhonePassword);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.TokenParam,
- *   !proto.im.SessionCheckReply>}
- */
-const methodDescriptor_Api_SubSessionCheck = new grpc.web.MethodDescriptor(
-    '/im.Api/SubSessionCheck',
-    grpc.web.MethodType.UNARY,
-    proto.im.TokenParam,
-    proto.im.SessionCheckReply,
-    /**
-     * @param {!proto.im.TokenParam} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.SessionCheckReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.TokenParam,
- *   !proto.im.SessionCheckReply>}
- */
-const methodInfo_Api_SubSessionCheck = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.SessionCheckReply,
-    /**
-     * @param {!proto.im.TokenParam} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.SessionCheckReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.TokenParam} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.SessionCheckReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.SessionCheckReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.subSessionCheck =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SubSessionCheck',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SubSessionCheck,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.TokenParam} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.SessionCheckReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.subSessionCheck =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SubSessionCheck',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SubSessionCheck);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.PermissionCheck,
- *   !proto.im.SessionCheckReply>}
- */
-const methodDescriptor_Api_SubPermissionCheck = new grpc.web.MethodDescriptor(
-    '/im.Api/SubPermissionCheck',
-    grpc.web.MethodType.UNARY,
-    proto.im.PermissionCheck,
-    proto.im.SessionCheckReply,
-    /**
-     * @param {!proto.im.PermissionCheck} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.SessionCheckReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.PermissionCheck,
- *   !proto.im.SessionCheckReply>}
- */
-const methodInfo_Api_SubPermissionCheck = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.SessionCheckReply,
-    /**
-     * @param {!proto.im.PermissionCheck} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.SessionCheckReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.PermissionCheck} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.SessionCheckReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.SessionCheckReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.subPermissionCheck =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SubPermissionCheck',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SubPermissionCheck,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.PermissionCheck} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.SessionCheckReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.subPermissionCheck =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SubPermissionCheck',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SubPermissionCheck);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.TokenParam,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_SubSignOut = new grpc.web.MethodDescriptor(
-    '/im.Api/SubSignOut',
-    grpc.web.MethodType.UNARY,
-    proto.im.TokenParam,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.TokenParam} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.TokenParam,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_SubSignOut = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.TokenParam} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.TokenParam} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.subSignOut =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SubSignOut',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SubSignOut,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.TokenParam} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.subSignOut =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SubSignOut',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SubSignOut);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.SaveServiceListRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_SubServiceSaveList = new grpc.web.MethodDescriptor(
-    '/im.Api/SubServiceSaveList',
-    grpc.web.MethodType.UNARY,
-    proto.im.SaveServiceListRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.SaveServiceListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.SaveServiceListRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_SubServiceSaveList = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.SaveServiceListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.SaveServiceListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.subServiceSaveList =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SubServiceSaveList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SubServiceSaveList,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.SaveServiceListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.subServiceSaveList =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SubServiceSaveList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SubServiceSaveList);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.UserListRequest,
- *   !proto.im.UserListReply>}
- */
-const methodDescriptor_Api_UserList = new grpc.web.MethodDescriptor(
-    '/im.Api/UserList',
-    grpc.web.MethodType.UNARY,
-    proto.im.UserListRequest,
-    proto.im.UserListReply,
-    /**
-     * @param {!proto.im.UserListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.UserListReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.UserListRequest,
- *   !proto.im.UserListReply>}
- */
-const methodInfo_Api_UserList = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.UserListReply,
-    /**
-     * @param {!proto.im.UserListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.UserListReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.UserListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.UserListReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.UserListReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.userList =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/UserList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserList,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.UserListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.UserListReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.userList =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/UserList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserList);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.UserGetInfoRequest,
- *   !proto.im.UserInfo>}
- */
-const methodDescriptor_Api_UserGetInfo = new grpc.web.MethodDescriptor(
-    '/im.Api/UserGetInfo',
-    grpc.web.MethodType.UNARY,
-    proto.im.UserGetInfoRequest,
-    proto.im.UserInfo,
-    /**
-     * @param {!proto.im.UserGetInfoRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.UserInfo.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.UserGetInfoRequest,
- *   !proto.im.UserInfo>}
- */
-const methodInfo_Api_UserGetInfo = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.UserInfo,
-    /**
-     * @param {!proto.im.UserGetInfoRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.UserInfo.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.UserGetInfoRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.UserInfo)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.UserInfo>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.userGetInfo =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/UserGetInfo',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserGetInfo,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.UserGetInfoRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.UserInfo>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.userGetInfo =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/UserGetInfo',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserGetInfo);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.UserRolesRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_UserAddRoles = new grpc.web.MethodDescriptor(
-    '/im.Api/UserAddRoles',
-    grpc.web.MethodType.UNARY,
-    proto.im.UserRolesRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.UserRolesRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.UserRolesRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_UserAddRoles = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.UserRolesRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.UserRolesRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.userAddRoles =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/UserAddRoles',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserAddRoles,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.UserRolesRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.userAddRoles =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/UserAddRoles',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserAddRoles);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.UserRolesRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_UserRemoveRoles = new grpc.web.MethodDescriptor(
-    '/im.Api/UserRemoveRoles',
-    grpc.web.MethodType.UNARY,
-    proto.im.UserRolesRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.UserRolesRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.UserRolesRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_UserRemoveRoles = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.UserRolesRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.UserRolesRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.userRemoveRoles =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/UserRemoveRoles',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserRemoveRoles,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.UserRolesRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.userRemoveRoles =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/UserRemoveRoles',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserRemoveRoles);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.UserGetColumnListRequest,
- *   !proto.im.UserGetColumnListReply>}
- */
-const methodDescriptor_Api_UserGetColumnList = new grpc.web.MethodDescriptor(
-    '/im.Api/UserGetColumnList',
-    grpc.web.MethodType.UNARY,
-    proto.im.UserGetColumnListRequest,
-    proto.im.UserGetColumnListReply,
-    /**
-     * @param {!proto.im.UserGetColumnListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.UserGetColumnListReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.UserGetColumnListRequest,
- *   !proto.im.UserGetColumnListReply>}
- */
-const methodInfo_Api_UserGetColumnList = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.UserGetColumnListReply,
-    /**
-     * @param {!proto.im.UserGetColumnListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.UserGetColumnListReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.UserGetColumnListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.UserGetColumnListReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.UserGetColumnListReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.userGetColumnList =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/UserGetColumnList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserGetColumnList,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.UserGetColumnListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.UserGetColumnListReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.userGetColumnList =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/UserGetColumnList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_UserGetColumnList);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.CreateRoleRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_RoleCreate = new grpc.web.MethodDescriptor(
-    '/im.Api/RoleCreate',
-    grpc.web.MethodType.UNARY,
-    proto.im.CreateRoleRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.CreateRoleRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.CreateRoleRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_RoleCreate = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.CreateRoleRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.CreateRoleRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.roleCreate =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/RoleCreate',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleCreate,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.CreateRoleRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.roleCreate =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/RoleCreate',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleCreate);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.RoleListRequest,
- *   !proto.im.RoleListReply>}
- */
-const methodDescriptor_Api_RoleList = new grpc.web.MethodDescriptor(
-    '/im.Api/RoleList',
-    grpc.web.MethodType.UNARY,
-    proto.im.RoleListRequest,
-    proto.im.RoleListReply,
-    /**
-     * @param {!proto.im.RoleListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.RoleListReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.RoleListRequest,
- *   !proto.im.RoleListReply>}
- */
-const methodInfo_Api_RoleList = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.RoleListReply,
-    /**
-     * @param {!proto.im.RoleListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.RoleListReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.RoleListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.RoleListReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.RoleListReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.roleList =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/RoleList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleList,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.RoleListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.RoleListReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.roleList =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/RoleList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleList);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.Role,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_RoleEdit = new grpc.web.MethodDescriptor(
-    '/im.Api/RoleEdit',
-    grpc.web.MethodType.UNARY,
-    proto.im.Role,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.Role} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.Role,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_RoleEdit = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.Role} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.Role} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.roleEdit =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/RoleEdit',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleEdit,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.Role} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.roleEdit =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/RoleEdit',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleEdit);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.RolePermissionRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_RoleAddPermissions = new grpc.web.MethodDescriptor(
-    '/im.Api/RoleAddPermissions',
-    grpc.web.MethodType.UNARY,
-    proto.im.RolePermissionRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.RolePermissionRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.RolePermissionRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_RoleAddPermissions = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.RolePermissionRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.RolePermissionRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.roleAddPermissions =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/RoleAddPermissions',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleAddPermissions,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.RolePermissionRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.roleAddPermissions =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/RoleAddPermissions',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleAddPermissions);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.RolePermissionRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_RoleRemovePermissions = new grpc.web.MethodDescriptor(
-    '/im.Api/RoleRemovePermissions',
-    grpc.web.MethodType.UNARY,
-    proto.im.RolePermissionRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.RolePermissionRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.RolePermissionRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_RoleRemovePermissions = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.RolePermissionRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.RolePermissionRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.roleRemovePermissions =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/RoleRemovePermissions',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleRemovePermissions,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.RolePermissionRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.roleRemovePermissions =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/RoleRemovePermissions',
-            request,
-            metadata || {},
-            methodDescriptor_Api_RoleRemovePermissions);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.ServiceListRequest,
- *   !proto.im.ServiceListReply>}
- */
-const methodDescriptor_Api_ServiceList = new grpc.web.MethodDescriptor(
-    '/im.Api/ServiceList',
-    grpc.web.MethodType.UNARY,
-    proto.im.ServiceListRequest,
-    proto.im.ServiceListReply,
-    /**
-     * @param {!proto.im.ServiceListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.ServiceListReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.ServiceListRequest,
- *   !proto.im.ServiceListReply>}
- */
-const methodInfo_Api_ServiceList = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.ServiceListReply,
-    /**
-     * @param {!proto.im.ServiceListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.ServiceListReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.ServiceListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.ServiceListReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.ServiceListReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.serviceList =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/ServiceList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_ServiceList,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.ServiceListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.ServiceListReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.serviceList =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/ServiceList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_ServiceList);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.ServiceRemoveRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_ServiceRemoveList = new grpc.web.MethodDescriptor(
-    '/im.Api/ServiceRemoveList',
-    grpc.web.MethodType.UNARY,
-    proto.im.ServiceRemoveRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.ServiceRemoveRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.ServiceRemoveRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_ServiceRemoveList = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.ServiceRemoveRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.ServiceRemoveRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.serviceRemoveList =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/ServiceRemoveList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_ServiceRemoveList,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.ServiceRemoveRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.serviceRemoveList =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/ServiceRemoveList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_ServiceRemoveList);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.CreateShopRequest,
- *   !proto.im.CreateReply>}
- */
-const methodDescriptor_Api_ShopCreate = new grpc.web.MethodDescriptor(
-    '/im.Api/ShopCreate',
-    grpc.web.MethodType.UNARY,
-    proto.im.CreateShopRequest,
-    proto.im.CreateReply,
-    /**
-     * @param {!proto.im.CreateShopRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.CreateReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.CreateShopRequest,
- *   !proto.im.CreateReply>}
- */
-const methodInfo_Api_ShopCreate = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.CreateReply,
-    /**
-     * @param {!proto.im.CreateShopRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.CreateReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.CreateShopRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.CreateReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.CreateReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.shopCreate =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/ShopCreate',
-            request,
-            metadata || {},
-            methodDescriptor_Api_ShopCreate,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.CreateShopRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.CreateReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.shopCreate =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/ShopCreate',
-            request,
-            metadata || {},
-            methodDescriptor_Api_ShopCreate);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.ShopListRequest,
- *   !proto.im.ShopListReply>}
- */
-const methodDescriptor_Api_ShopList = new grpc.web.MethodDescriptor(
-    '/im.Api/ShopList',
-    grpc.web.MethodType.UNARY,
-    proto.im.ShopListRequest,
-    proto.im.ShopListReply,
-    /**
-     * @param {!proto.im.ShopListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.ShopListReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.ShopListRequest,
- *   !proto.im.ShopListReply>}
- */
-const methodInfo_Api_ShopList = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.ShopListReply,
-    /**
-     * @param {!proto.im.ShopListRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.ShopListReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.ShopListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.ShopListReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.ShopListReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.shopList =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/ShopList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_ShopList,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.ShopListRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.ShopListReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.shopList =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/ShopList',
-            request,
-            metadata || {},
-            methodDescriptor_Api_ShopList);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.SystemAddShopRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_SystemAddShop = new grpc.web.MethodDescriptor(
-    '/im.Api/SystemAddShop',
-    grpc.web.MethodType.UNARY,
-    proto.im.SystemAddShopRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.SystemAddShopRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.SystemAddShopRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_SystemAddShop = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.SystemAddShopRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.SystemAddShopRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.systemAddShop =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SystemAddShop',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SystemAddShop,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.SystemAddShopRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.systemAddShop =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SystemAddShop',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SystemAddShop);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.SystemAddUserRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_SystemAddUser = new grpc.web.MethodDescriptor(
-    '/im.Api/SystemAddUser',
-    grpc.web.MethodType.UNARY,
-    proto.im.SystemAddUserRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.SystemAddUserRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.SystemAddUserRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_SystemAddUser = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.SystemAddUserRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.SystemAddUserRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.systemAddUser =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/SystemAddUser',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SystemAddUser,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.SystemAddUserRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.systemAddUser =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/SystemAddUser',
-            request,
-            metadata || {},
-            methodDescriptor_Api_SystemAddUser);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.CreateSystemRequest,
- *   !proto.im.TokenParam>}
- */
-const methodDescriptor_Api_IMSystemCreate = new grpc.web.MethodDescriptor(
-    '/im.Api/IMSystemCreate',
-    grpc.web.MethodType.UNARY,
-    proto.im.CreateSystemRequest,
-    proto.im.TokenParam,
-    /**
-     * @param {!proto.im.CreateSystemRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.TokenParam.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.CreateSystemRequest,
- *   !proto.im.TokenParam>}
- */
-const methodInfo_Api_IMSystemCreate = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.TokenParam,
-    /**
-     * @param {!proto.im.CreateSystemRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.TokenParam.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.CreateSystemRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.TokenParam)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.TokenParam>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.iMSystemCreate =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/IMSystemCreate',
-            request,
-            metadata || {},
-            methodDescriptor_Api_IMSystemCreate,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.CreateSystemRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.TokenParam>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.iMSystemCreate =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/IMSystemCreate',
-            request,
-            metadata || {},
-            methodDescriptor_Api_IMSystemCreate);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.DefaultRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodDescriptor_Api_IMSignOut = new grpc.web.MethodDescriptor(
-    '/im.Api/IMSignOut',
-    grpc.web.MethodType.UNARY,
-    proto.im.DefaultRequest,
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.DefaultRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.DefaultRequest,
- *   !proto.im.DefaultReply>}
- */
-const methodInfo_Api_IMSignOut = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.DefaultReply,
-    /**
-     * @param {!proto.im.DefaultRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.DefaultReply.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.DefaultRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.DefaultReply)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.DefaultReply>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.iMSignOut =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/IMSignOut',
-            request,
-            metadata || {},
-            methodDescriptor_Api_IMSignOut,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.DefaultRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.DefaultReply>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.iMSignOut =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/IMSignOut',
-            request,
-            metadata || {},
-            methodDescriptor_Api_IMSignOut);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.DefaultRequest,
- *   !proto.im.UserInfo>}
- */
-const methodDescriptor_Api_IMSelfInfo = new grpc.web.MethodDescriptor(
-    '/im.Api/IMSelfInfo',
-    grpc.web.MethodType.UNARY,
-    proto.im.DefaultRequest,
-    proto.im.UserInfo,
-    /**
-     * @param {!proto.im.DefaultRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.UserInfo.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.DefaultRequest,
- *   !proto.im.UserInfo>}
- */
-const methodInfo_Api_IMSelfInfo = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.UserInfo,
-    /**
-     * @param {!proto.im.DefaultRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.UserInfo.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.DefaultRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @param {function(?grpc.web.Error, ?proto.im.UserInfo)}
- *     callback The callback function(error, response)
- * @return {!grpc.web.ClientReadableStream<!proto.im.UserInfo>|undefined}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.iMSelfInfo =
-    function (request, metadata, callback) {
-        return this.client_.rpcCall(this.hostname_ +
-            '/im.Api/IMSelfInfo',
-            request,
-            metadata || {},
-            methodDescriptor_Api_IMSelfInfo,
-            callback);
-    };
-
-
-/**
- * @param {!proto.im.DefaultRequest} request The
- *     request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!Promise<!proto.im.UserInfo>}
- *     Promise that resolves to the response
- */
-proto.im.ApiPromiseClient.prototype.iMSelfInfo =
-    function (request, metadata) {
-        return this.client_.unaryCall(this.hostname_ +
-            '/im.Api/IMSelfInfo',
-            request,
-            metadata || {},
-            methodDescriptor_Api_IMSelfInfo);
-    };
-
-
-/**
- * @const
- * @type {!grpc.web.MethodDescriptor<
- *   !proto.im.DefaultRequest,
- *   !proto.im.Message>}
- */
-const methodDescriptor_Api_IMMessageRcv = new grpc.web.MethodDescriptor(
-    '/im.Api/IMMessageRcv',
-    grpc.web.MethodType.SERVER_STREAMING,
-    proto.im.DefaultRequest,
-    proto.im.Message,
-    /**
-     * @param {!proto.im.DefaultRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.Message.deserializeBinary
-);
-
-
-/**
- * @const
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
- *   !proto.im.DefaultRequest,
- *   !proto.im.Message>}
- */
-const methodInfo_Api_IMMessageRcv = new grpc.web.AbstractClientBase.MethodInfo(
-    proto.im.Message,
-    /**
-     * @param {!proto.im.DefaultRequest} request
-     * @return {!Uint8Array}
-     */
-    function (request) {
-        return request.serializeBinary();
-    },
-    proto.im.Message.deserializeBinary
-);
-
-
-/**
- * @param {!proto.im.DefaultRequest} request The request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!grpc.web.ClientReadableStream<!proto.im.Message>}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiClient.prototype.iMMessageRcv =
-    function (request, metadata) {
-        return this.client_.serverStreaming(this.hostname_ +
-            '/im.Api/IMMessageRcv',
-            request,
-            metadata || {},
-            methodDescriptor_Api_IMMessageRcv);
-    };
-
-
-/**
- * @param {!proto.im.DefaultRequest} request The request proto
- * @param {?Object<string, string>} metadata User defined
- *     call metadata
- * @return {!grpc.web.ClientReadableStream<!proto.im.Message>}
- *     The XHR Node Readable Stream
- */
-proto.im.ApiPromiseClient.prototype.iMMessageRcv =
-    function (request, metadata) {
-        return this.client_.serverStreaming(this.hostname_ +
-            '/im.Api/IMMessageRcv',
-            request,
-            metadata || {},
-            methodDescriptor_Api_IMMessageRcv);
-    };
-
-
-module.exports = proto.im;
-

+ 0 - 7545
src/grpc/im_pb.js

@@ -1,7545 +0,0 @@
-// source: im.proto
-/**
- * @fileoverview
- * @enhanceable
- * @suppress {missingRequire} reports error on implicit type usages.
- * @suppress {messageConventions} JS Compiler reports an error if a variable or
- *     field starts with 'MSG_' and isn't a translatable message.
- * @public
- */
-// GENERATED CODE -- DO NOT EDIT!
-/* eslint-disable */
-// @ts-nocheck
-
-var jspb = require('google-protobuf');
-var goog = jspb;
-var global = Function('return this')();
-
-goog.exportSymbol('proto.im.Column', null, global);
-goog.exportSymbol('proto.im.CreateReply', null, global);
-goog.exportSymbol('proto.im.CreateRoleRequest', null, global);
-goog.exportSymbol('proto.im.CreateShopRequest', null, global);
-goog.exportSymbol('proto.im.CreateSystemRequest', null, global);
-goog.exportSymbol('proto.im.DefaultReply', null, global);
-goog.exportSymbol('proto.im.DefaultRequest', null, global);
-goog.exportSymbol('proto.im.ErrorCode', null, global);
-goog.exportSymbol('proto.im.Message', null, global);
-goog.exportSymbol('proto.im.Message.Level', null, global);
-goog.exportSymbol('proto.im.PermissionCheck', null, global);
-goog.exportSymbol('proto.im.Role', null, global);
-goog.exportSymbol('proto.im.RoleListReply', null, global);
-goog.exportSymbol('proto.im.RoleListRequest', null, global);
-goog.exportSymbol('proto.im.RolePermissionRequest', null, global);
-goog.exportSymbol('proto.im.SaveServiceListRequest', null, global);
-goog.exportSymbol('proto.im.Service', null, global);
-goog.exportSymbol('proto.im.ServiceListReply', null, global);
-goog.exportSymbol('proto.im.ServiceListRequest', null, global);
-goog.exportSymbol('proto.im.ServiceRemoveRequest', null, global);
-goog.exportSymbol('proto.im.SessionCheckReply', null, global);
-goog.exportSymbol('proto.im.ShopInfo', null, global);
-goog.exportSymbol('proto.im.ShopListReply', null, global);
-goog.exportSymbol('proto.im.ShopListRequest', null, global);
-goog.exportSymbol('proto.im.SignInPasswordRequest', null, global);
-goog.exportSymbol('proto.im.SignUpReply', null, global);
-goog.exportSymbol('proto.im.SignUpRequest', null, global);
-goog.exportSymbol('proto.im.Status', null, global);
-goog.exportSymbol('proto.im.SystemAddShopRequest', null, global);
-goog.exportSymbol('proto.im.SystemAddUserRequest', null, global);
-goog.exportSymbol('proto.im.TokenParam', null, global);
-goog.exportSymbol('proto.im.UserGetColumnListReply', null, global);
-goog.exportSymbol('proto.im.UserGetColumnListRequest', null, global);
-goog.exportSymbol('proto.im.UserGetInfoRequest', null, global);
-goog.exportSymbol('proto.im.UserInfo', null, global);
-goog.exportSymbol('proto.im.UserListReply', null, global);
-goog.exportSymbol('proto.im.UserListRequest', null, global);
-goog.exportSymbol('proto.im.UserRolesRequest', null, global);
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.DefaultRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.DefaultRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.DefaultRequest.displayName = 'proto.im.DefaultRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.TokenParam = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.TokenParam, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.TokenParam.displayName = 'proto.im.TokenParam';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.DefaultReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.DefaultReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.DefaultReply.displayName = 'proto.im.DefaultReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.SignUpReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.SignUpReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.SignUpReply.displayName = 'proto.im.SignUpReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.SignInPasswordRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.SignInPasswordRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.SignInPasswordRequest.displayName = 'proto.im.SignInPasswordRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.SignUpRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.SignUpRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.SignUpRequest.displayName = 'proto.im.SignUpRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.UserInfo = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.UserInfo, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.UserInfo.displayName = 'proto.im.UserInfo';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.CreateReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.CreateReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.CreateReply.displayName = 'proto.im.CreateReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.PermissionCheck = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.PermissionCheck, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.PermissionCheck.displayName = 'proto.im.PermissionCheck';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.SessionCheckReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.SessionCheckReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.SessionCheckReply.displayName = 'proto.im.SessionCheckReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.Service = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.Service, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.Service.displayName = 'proto.im.Service';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.SaveServiceListRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.SaveServiceListRequest.repeatedFields_, null);
-};
-goog.inherits(proto.im.SaveServiceListRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.SaveServiceListRequest.displayName = 'proto.im.SaveServiceListRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.CreateSystemRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.CreateSystemRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.CreateSystemRequest.displayName = 'proto.im.CreateSystemRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.UserGetColumnListRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.UserGetColumnListRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.UserGetColumnListRequest.displayName = 'proto.im.UserGetColumnListRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.Column = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.Column, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.Column.displayName = 'proto.im.Column';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.UserGetColumnListReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.UserGetColumnListReply.repeatedFields_, null);
-};
-goog.inherits(proto.im.UserGetColumnListReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.UserGetColumnListReply.displayName = 'proto.im.UserGetColumnListReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.CreateRoleRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.CreateRoleRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.CreateRoleRequest.displayName = 'proto.im.CreateRoleRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.Role = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.Role, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.Role.displayName = 'proto.im.Role';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.RoleListRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.RoleListRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.RoleListRequest.displayName = 'proto.im.RoleListRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.UserListRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.UserListRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.UserListRequest.displayName = 'proto.im.UserListRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.UserListReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.UserListReply.repeatedFields_, null);
-};
-goog.inherits(proto.im.UserListReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.UserListReply.displayName = 'proto.im.UserListReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.UserGetInfoRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.UserGetInfoRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.UserGetInfoRequest.displayName = 'proto.im.UserGetInfoRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.UserRolesRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.UserRolesRequest.repeatedFields_, null);
-};
-goog.inherits(proto.im.UserRolesRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.UserRolesRequest.displayName = 'proto.im.UserRolesRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.RoleListReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.RoleListReply.repeatedFields_, null);
-};
-goog.inherits(proto.im.RoleListReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.RoleListReply.displayName = 'proto.im.RoleListReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.RolePermissionRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.RolePermissionRequest.repeatedFields_, null);
-};
-goog.inherits(proto.im.RolePermissionRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.RolePermissionRequest.displayName = 'proto.im.RolePermissionRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.ServiceListRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.ServiceListRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.ServiceListRequest.displayName = 'proto.im.ServiceListRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.ServiceListReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.ServiceListReply.repeatedFields_, null);
-};
-goog.inherits(proto.im.ServiceListReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.ServiceListReply.displayName = 'proto.im.ServiceListReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.ServiceRemoveRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.ServiceRemoveRequest.repeatedFields_, null);
-};
-goog.inherits(proto.im.ServiceRemoveRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.ServiceRemoveRequest.displayName = 'proto.im.ServiceRemoveRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.CreateShopRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.CreateShopRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.CreateShopRequest.displayName = 'proto.im.CreateShopRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.ShopListRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.ShopListRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.ShopListRequest.displayName = 'proto.im.ShopListRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.ShopInfo = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.ShopInfo, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.ShopInfo.displayName = 'proto.im.ShopInfo';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.ShopListReply = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, proto.im.ShopListReply.repeatedFields_, null);
-};
-goog.inherits(proto.im.ShopListReply, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.ShopListReply.displayName = 'proto.im.ShopListReply';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.SystemAddShopRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.SystemAddShopRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.SystemAddShopRequest.displayName = 'proto.im.SystemAddShopRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.SystemAddUserRequest = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.SystemAddUserRequest, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.SystemAddUserRequest.displayName = 'proto.im.SystemAddUserRequest';
-}
-/**
- * Generated by JsPbCodeGenerator.
- * @param {Array=} opt_data Optional initial data array, typically from a
- * server response, or constructed directly in Javascript. The array is used
- * in place and becomes part of the constructed object. It is not cloned.
- * If no data is provided, the constructed object will be empty, but still
- * valid.
- * @extends {jspb.Message}
- * @constructor
- */
-proto.im.Message = function (opt_data) {
-    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
-};
-goog.inherits(proto.im.Message, jspb.Message);
-if (goog.DEBUG && !COMPILED) {
-    /**
-     * @public
-     * @override
-     */
-    proto.im.Message.displayName = 'proto.im.Message';
-}
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.DefaultRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.DefaultRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.DefaultRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.DefaultRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {};
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.DefaultRequest}
- */
-proto.im.DefaultRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.DefaultRequest;
-    return proto.im.DefaultRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.DefaultRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.DefaultRequest}
- */
-proto.im.DefaultRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.DefaultRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.DefaultRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.DefaultRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.DefaultRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.TokenParam.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.TokenParam.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.TokenParam} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.TokenParam.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            token: jspb.Message.getFieldWithDefault(msg, 1, "")
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.TokenParam}
- */
-proto.im.TokenParam.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.TokenParam;
-    return proto.im.TokenParam.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.TokenParam} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.TokenParam}
- */
-proto.im.TokenParam.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setToken(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.TokenParam.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.TokenParam.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.TokenParam} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.TokenParam.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getToken();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string token = 1;
- * @return {string}
- */
-proto.im.TokenParam.prototype.getToken = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.TokenParam} returns this
- */
-proto.im.TokenParam.prototype.setToken = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.DefaultReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.DefaultReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.DefaultReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.DefaultReply.toObject = function (includeInstance, msg) {
-        var f, obj = {};
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.DefaultReply}
- */
-proto.im.DefaultReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.DefaultReply;
-    return proto.im.DefaultReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.DefaultReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.DefaultReply}
- */
-proto.im.DefaultReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.DefaultReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.DefaultReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.DefaultReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.DefaultReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.SignUpReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.SignUpReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.SignUpReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.SignUpReply.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            userid: jspb.Message.getFieldWithDefault(msg, 1, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.SignUpReply}
- */
-proto.im.SignUpReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.SignUpReply;
-    return proto.im.SignUpReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.SignUpReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.SignUpReply}
- */
-proto.im.SignUpReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUserid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.SignUpReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.SignUpReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.SignUpReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.SignUpReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getUserid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 userId = 1;
- * @return {number}
- */
-proto.im.SignUpReply.prototype.getUserid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.SignUpReply} returns this
- */
-proto.im.SignUpReply.prototype.setUserid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.SignInPasswordRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.SignInPasswordRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.SignInPasswordRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.SignInPasswordRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            auth: jspb.Message.getFieldWithDefault(msg, 1, ""),
-            password: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            sysid: jspb.Message.getFieldWithDefault(msg, 3, 0),
-            expirationsec: jspb.Message.getFieldWithDefault(msg, 4, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.SignInPasswordRequest}
- */
-proto.im.SignInPasswordRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.SignInPasswordRequest;
-    return proto.im.SignInPasswordRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.SignInPasswordRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.SignInPasswordRequest}
- */
-proto.im.SignInPasswordRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setAuth(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setPassword(value);
-                break;
-            case 3:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSysid(value);
-                break;
-            case 4:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setExpirationsec(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.SignInPasswordRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.SignInPasswordRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.SignInPasswordRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.SignInPasswordRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getAuth();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-    f = message.getPassword();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getSysid();
-    if (f !== 0) {
-        writer.writeInt64(
-            3,
-            f
-        );
-    }
-    f = message.getExpirationsec();
-    if (f !== 0) {
-        writer.writeInt64(
-            4,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string auth = 1;
- * @return {string}
- */
-proto.im.SignInPasswordRequest.prototype.getAuth = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignInPasswordRequest} returns this
- */
-proto.im.SignInPasswordRequest.prototype.setAuth = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string password = 2;
- * @return {string}
- */
-proto.im.SignInPasswordRequest.prototype.getPassword = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignInPasswordRequest} returns this
- */
-proto.im.SignInPasswordRequest.prototype.setPassword = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional int64 sysId = 3;
- * @return {number}
- */
-proto.im.SignInPasswordRequest.prototype.getSysid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.SignInPasswordRequest} returns this
- */
-proto.im.SignInPasswordRequest.prototype.setSysid = function (value) {
-    return jspb.Message.setProto3IntField(this, 3, value);
-};
-
-
-/**
- * optional int64 expirationSec = 4;
- * @return {number}
- */
-proto.im.SignInPasswordRequest.prototype.getExpirationsec = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.SignInPasswordRequest} returns this
- */
-proto.im.SignInPasswordRequest.prototype.setExpirationsec = function (value) {
-    return jspb.Message.setProto3IntField(this, 4, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.SignUpRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.SignUpRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.SignUpRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.SignUpRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            usercode: jspb.Message.getFieldWithDefault(msg, 1, ""),
-            name: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            email: jspb.Message.getFieldWithDefault(msg, 3, ""),
-            phone: jspb.Message.getFieldWithDefault(msg, 4, ""),
-            wxopenid: jspb.Message.getFieldWithDefault(msg, 5, ""),
-            qq: jspb.Message.getFieldWithDefault(msg, 6, ""),
-            password: jspb.Message.getFieldWithDefault(msg, 7, ""),
-            question: jspb.Message.getFieldWithDefault(msg, 8, ""),
-            answer: jspb.Message.getFieldWithDefault(msg, 9, ""),
-            memo: jspb.Message.getFieldWithDefault(msg, 10, "")
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.SignUpRequest}
- */
-proto.im.SignUpRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.SignUpRequest;
-    return proto.im.SignUpRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.SignUpRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.SignUpRequest}
- */
-proto.im.SignUpRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setUsercode(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 3:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setEmail(value);
-                break;
-            case 4:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setPhone(value);
-                break;
-            case 5:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setWxopenid(value);
-                break;
-            case 6:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setQq(value);
-                break;
-            case 7:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setPassword(value);
-                break;
-            case 8:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setQuestion(value);
-                break;
-            case 9:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setAnswer(value);
-                break;
-            case 10:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setMemo(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.SignUpRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.SignUpRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.SignUpRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.SignUpRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getUsercode();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getEmail();
-    if (f.length > 0) {
-        writer.writeString(
-            3,
-            f
-        );
-    }
-    f = message.getPhone();
-    if (f.length > 0) {
-        writer.writeString(
-            4,
-            f
-        );
-    }
-    f = message.getWxopenid();
-    if (f.length > 0) {
-        writer.writeString(
-            5,
-            f
-        );
-    }
-    f = message.getQq();
-    if (f.length > 0) {
-        writer.writeString(
-            6,
-            f
-        );
-    }
-    f = message.getPassword();
-    if (f.length > 0) {
-        writer.writeString(
-            7,
-            f
-        );
-    }
-    f = message.getQuestion();
-    if (f.length > 0) {
-        writer.writeString(
-            8,
-            f
-        );
-    }
-    f = message.getAnswer();
-    if (f.length > 0) {
-        writer.writeString(
-            9,
-            f
-        );
-    }
-    f = message.getMemo();
-    if (f.length > 0) {
-        writer.writeString(
-            10,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string userCode = 1;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getUsercode = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setUsercode = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string name = 2;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional string email = 3;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getEmail = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setEmail = function (value) {
-    return jspb.Message.setProto3StringField(this, 3, value);
-};
-
-
-/**
- * optional string phone = 4;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getPhone = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setPhone = function (value) {
-    return jspb.Message.setProto3StringField(this, 4, value);
-};
-
-
-/**
- * optional string wxOpenId = 5;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getWxopenid = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setWxopenid = function (value) {
-    return jspb.Message.setProto3StringField(this, 5, value);
-};
-
-
-/**
- * optional string qq = 6;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getQq = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setQq = function (value) {
-    return jspb.Message.setProto3StringField(this, 6, value);
-};
-
-
-/**
- * optional string password = 7;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getPassword = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setPassword = function (value) {
-    return jspb.Message.setProto3StringField(this, 7, value);
-};
-
-
-/**
- * optional string question = 8;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getQuestion = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setQuestion = function (value) {
-    return jspb.Message.setProto3StringField(this, 8, value);
-};
-
-
-/**
- * optional string answer = 9;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getAnswer = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setAnswer = function (value) {
-    return jspb.Message.setProto3StringField(this, 9, value);
-};
-
-
-/**
- * optional string memo = 10;
- * @return {string}
- */
-proto.im.SignUpRequest.prototype.getMemo = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.SignUpRequest} returns this
- */
-proto.im.SignUpRequest.prototype.setMemo = function (value) {
-    return jspb.Message.setProto3StringField(this, 10, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.UserInfo.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.UserInfo.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.UserInfo} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.UserInfo.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            id: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            usercode: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            name: jspb.Message.getFieldWithDefault(msg, 3, ""),
-            email: jspb.Message.getFieldWithDefault(msg, 4, ""),
-            phone: jspb.Message.getFieldWithDefault(msg, 5, ""),
-            qq: jspb.Message.getFieldWithDefault(msg, 7, ""),
-            memo: jspb.Message.getFieldWithDefault(msg, 11, ""),
-            status: jspb.Message.getFieldWithDefault(msg, 12, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.UserInfo}
- */
-proto.im.UserInfo.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.UserInfo;
-    return proto.im.UserInfo.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.UserInfo} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.UserInfo}
- */
-proto.im.UserInfo.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setId(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setUsercode(value);
-                break;
-            case 3:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 4:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setEmail(value);
-                break;
-            case 5:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setPhone(value);
-                break;
-            case 7:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setQq(value);
-                break;
-            case 11:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setMemo(value);
-                break;
-            case 12:
-                var value = /** @type {!proto.im.Status} */ (reader.readEnum());
-                msg.setStatus(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.UserInfo.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.UserInfo.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.UserInfo} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.UserInfo.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getId();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getUsercode();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            3,
-            f
-        );
-    }
-    f = message.getEmail();
-    if (f.length > 0) {
-        writer.writeString(
-            4,
-            f
-        );
-    }
-    f = message.getPhone();
-    if (f.length > 0) {
-        writer.writeString(
-            5,
-            f
-        );
-    }
-    f = message.getQq();
-    if (f.length > 0) {
-        writer.writeString(
-            7,
-            f
-        );
-    }
-    f = message.getMemo();
-    if (f.length > 0) {
-        writer.writeString(
-            11,
-            f
-        );
-    }
-    f = message.getStatus();
-    if (f !== 0.0) {
-        writer.writeEnum(
-            12,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 id = 1;
- * @return {number}
- */
-proto.im.UserInfo.prototype.getId = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserInfo} returns this
- */
-proto.im.UserInfo.prototype.setId = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional string userCode = 2;
- * @return {string}
- */
-proto.im.UserInfo.prototype.getUsercode = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.UserInfo} returns this
- */
-proto.im.UserInfo.prototype.setUsercode = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional string name = 3;
- * @return {string}
- */
-proto.im.UserInfo.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.UserInfo} returns this
- */
-proto.im.UserInfo.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 3, value);
-};
-
-
-/**
- * optional string email = 4;
- * @return {string}
- */
-proto.im.UserInfo.prototype.getEmail = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.UserInfo} returns this
- */
-proto.im.UserInfo.prototype.setEmail = function (value) {
-    return jspb.Message.setProto3StringField(this, 4, value);
-};
-
-
-/**
- * optional string phone = 5;
- * @return {string}
- */
-proto.im.UserInfo.prototype.getPhone = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.UserInfo} returns this
- */
-proto.im.UserInfo.prototype.setPhone = function (value) {
-    return jspb.Message.setProto3StringField(this, 5, value);
-};
-
-
-/**
- * optional string qq = 7;
- * @return {string}
- */
-proto.im.UserInfo.prototype.getQq = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.UserInfo} returns this
- */
-proto.im.UserInfo.prototype.setQq = function (value) {
-    return jspb.Message.setProto3StringField(this, 7, value);
-};
-
-
-/**
- * optional string memo = 11;
- * @return {string}
- */
-proto.im.UserInfo.prototype.getMemo = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.UserInfo} returns this
- */
-proto.im.UserInfo.prototype.setMemo = function (value) {
-    return jspb.Message.setProto3StringField(this, 11, value);
-};
-
-
-/**
- * optional Status status = 12;
- * @return {!proto.im.Status}
- */
-proto.im.UserInfo.prototype.getStatus = function () {
-    return /** @type {!proto.im.Status} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
-};
-
-
-/**
- * @param {!proto.im.Status} value
- * @return {!proto.im.UserInfo} returns this
- */
-proto.im.UserInfo.prototype.setStatus = function (value) {
-    return jspb.Message.setProto3EnumField(this, 12, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.CreateReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.CreateReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.CreateReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.CreateReply.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            id: jspb.Message.getFieldWithDefault(msg, 1, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.CreateReply}
- */
-proto.im.CreateReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.CreateReply;
-    return proto.im.CreateReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.CreateReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.CreateReply}
- */
-proto.im.CreateReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setId(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.CreateReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.CreateReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.CreateReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.CreateReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getId();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 id = 1;
- * @return {number}
- */
-proto.im.CreateReply.prototype.getId = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.CreateReply} returns this
- */
-proto.im.CreateReply.prototype.setId = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.PermissionCheck.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.PermissionCheck.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.PermissionCheck} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.PermissionCheck.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            token: jspb.Message.getFieldWithDefault(msg, 1, ""),
-            servicepath: jspb.Message.getFieldWithDefault(msg, 2, "")
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.PermissionCheck}
- */
-proto.im.PermissionCheck.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.PermissionCheck;
-    return proto.im.PermissionCheck.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.PermissionCheck} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.PermissionCheck}
- */
-proto.im.PermissionCheck.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setToken(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setServicepath(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.PermissionCheck.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.PermissionCheck.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.PermissionCheck} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.PermissionCheck.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getToken();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-    f = message.getServicepath();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string token = 1;
- * @return {string}
- */
-proto.im.PermissionCheck.prototype.getToken = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.PermissionCheck} returns this
- */
-proto.im.PermissionCheck.prototype.setToken = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string servicePath = 2;
- * @return {string}
- */
-proto.im.PermissionCheck.prototype.getServicepath = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.PermissionCheck} returns this
- */
-proto.im.PermissionCheck.prototype.setServicepath = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.SessionCheckReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.SessionCheckReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.SessionCheckReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.SessionCheckReply.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            userid: jspb.Message.getFieldWithDefault(msg, 1, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.SessionCheckReply}
- */
-proto.im.SessionCheckReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.SessionCheckReply;
-    return proto.im.SessionCheckReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.SessionCheckReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.SessionCheckReply}
- */
-proto.im.SessionCheckReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUserid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.SessionCheckReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.SessionCheckReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.SessionCheckReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.SessionCheckReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getUserid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 userId = 1;
- * @return {number}
- */
-proto.im.SessionCheckReply.prototype.getUserid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.SessionCheckReply} returns this
- */
-proto.im.SessionCheckReply.prototype.setUserid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.Service.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.Service.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.Service} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.Service.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            path: jspb.Message.getFieldWithDefault(msg, 1, ""),
-            memo: jspb.Message.getFieldWithDefault(msg, 2, "")
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.Service}
- */
-proto.im.Service.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.Service;
-    return proto.im.Service.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.Service} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.Service}
- */
-proto.im.Service.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setPath(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setMemo(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.Service.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.Service.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.Service} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.Service.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getPath();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-    f = message.getMemo();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string path = 1;
- * @return {string}
- */
-proto.im.Service.prototype.getPath = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Service} returns this
- */
-proto.im.Service.prototype.setPath = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string memo = 2;
- * @return {string}
- */
-proto.im.Service.prototype.getMemo = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Service} returns this
- */
-proto.im.Service.prototype.setMemo = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.SaveServiceListRequest.repeatedFields_ = [1];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.SaveServiceListRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.SaveServiceListRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.SaveServiceListRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.SaveServiceListRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            listList: jspb.Message.toObjectList(msg.getListList(),
-                proto.im.Service.toObject, includeInstance)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.SaveServiceListRequest}
- */
-proto.im.SaveServiceListRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.SaveServiceListRequest;
-    return proto.im.SaveServiceListRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.SaveServiceListRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.SaveServiceListRequest}
- */
-proto.im.SaveServiceListRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = new proto.im.Service;
-                reader.readMessage(value, proto.im.Service.deserializeBinaryFromReader);
-                msg.addList(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.SaveServiceListRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.SaveServiceListRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.SaveServiceListRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.SaveServiceListRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getListList();
-    if (f.length > 0) {
-        writer.writeRepeatedMessage(
-            1,
-            f,
-            proto.im.Service.serializeBinaryToWriter
-        );
-    }
-};
-
-
-/**
- * repeated Service list = 1;
- * @return {!Array<!proto.im.Service>}
- */
-proto.im.SaveServiceListRequest.prototype.getListList = function () {
-    return /** @type{!Array<!proto.im.Service>} */ (
-        jspb.Message.getRepeatedWrapperField(this, proto.im.Service, 1));
-};
-
-
-/**
- * @param {!Array<!proto.im.Service>} value
- * @return {!proto.im.SaveServiceListRequest} returns this
- */
-proto.im.SaveServiceListRequest.prototype.setListList = function (value) {
-    return jspb.Message.setRepeatedWrapperField(this, 1, value);
-};
-
-
-/**
- * @param {!proto.im.Service=} opt_value
- * @param {number=} opt_index
- * @return {!proto.im.Service}
- */
-proto.im.SaveServiceListRequest.prototype.addList = function (opt_value, opt_index) {
-    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.im.Service, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.SaveServiceListRequest} returns this
- */
-proto.im.SaveServiceListRequest.prototype.clearListList = function () {
-    return this.setListList([]);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.CreateSystemRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.CreateSystemRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.CreateSystemRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.CreateSystemRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            fullname: jspb.Message.getFieldWithDefault(msg, 1, ""),
-            shortname: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            sysurl: jspb.Message.getFieldWithDefault(msg, 3, ""),
-            memo: jspb.Message.getFieldWithDefault(msg, 4, "")
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.CreateSystemRequest}
- */
-proto.im.CreateSystemRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.CreateSystemRequest;
-    return proto.im.CreateSystemRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.CreateSystemRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.CreateSystemRequest}
- */
-proto.im.CreateSystemRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setFullname(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setShortname(value);
-                break;
-            case 3:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setSysurl(value);
-                break;
-            case 4:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setMemo(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.CreateSystemRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.CreateSystemRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.CreateSystemRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.CreateSystemRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getFullname();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-    f = message.getShortname();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getSysurl();
-    if (f.length > 0) {
-        writer.writeString(
-            3,
-            f
-        );
-    }
-    f = message.getMemo();
-    if (f.length > 0) {
-        writer.writeString(
-            4,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string fullName = 1;
- * @return {string}
- */
-proto.im.CreateSystemRequest.prototype.getFullname = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateSystemRequest} returns this
- */
-proto.im.CreateSystemRequest.prototype.setFullname = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string shortname = 2;
- * @return {string}
- */
-proto.im.CreateSystemRequest.prototype.getShortname = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateSystemRequest} returns this
- */
-proto.im.CreateSystemRequest.prototype.setShortname = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional string sysUrl = 3;
- * @return {string}
- */
-proto.im.CreateSystemRequest.prototype.getSysurl = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateSystemRequest} returns this
- */
-proto.im.CreateSystemRequest.prototype.setSysurl = function (value) {
-    return jspb.Message.setProto3StringField(this, 3, value);
-};
-
-
-/**
- * optional string memo = 4;
- * @return {string}
- */
-proto.im.CreateSystemRequest.prototype.getMemo = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateSystemRequest} returns this
- */
-proto.im.CreateSystemRequest.prototype.setMemo = function (value) {
-    return jspb.Message.setProto3StringField(this, 4, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.UserGetColumnListRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.UserGetColumnListRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.UserGetColumnListRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.UserGetColumnListRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            userid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            parentid: jspb.Message.getFieldWithDefault(msg, 2, 0),
-            sysid: jspb.Message.getFieldWithDefault(msg, 3, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.UserGetColumnListRequest}
- */
-proto.im.UserGetColumnListRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.UserGetColumnListRequest;
-    return proto.im.UserGetColumnListRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.UserGetColumnListRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.UserGetColumnListRequest}
- */
-proto.im.UserGetColumnListRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUserid(value);
-                break;
-            case 2:
-                var value = /** @type {number} */ (reader.readInt32());
-                msg.setParentid(value);
-                break;
-            case 3:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSysid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.UserGetColumnListRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.UserGetColumnListRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.UserGetColumnListRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.UserGetColumnListRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getUserid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getParentid();
-    if (f !== 0) {
-        writer.writeInt32(
-            2,
-            f
-        );
-    }
-    f = message.getSysid();
-    if (f !== 0) {
-        writer.writeInt64(
-            3,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 userId = 1;
- * @return {number}
- */
-proto.im.UserGetColumnListRequest.prototype.getUserid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserGetColumnListRequest} returns this
- */
-proto.im.UserGetColumnListRequest.prototype.setUserid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional int32 parentId = 2;
- * @return {number}
- */
-proto.im.UserGetColumnListRequest.prototype.getParentid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserGetColumnListRequest} returns this
- */
-proto.im.UserGetColumnListRequest.prototype.setParentid = function (value) {
-    return jspb.Message.setProto3IntField(this, 2, value);
-};
-
-
-/**
- * optional int64 sysId = 3;
- * @return {number}
- */
-proto.im.UserGetColumnListRequest.prototype.getSysid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserGetColumnListRequest} returns this
- */
-proto.im.UserGetColumnListRequest.prototype.setSysid = function (value) {
-    return jspb.Message.setProto3IntField(this, 3, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.Column.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.Column.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.Column} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.Column.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            name: jspb.Message.getFieldWithDefault(msg, 1, ""),
-            url: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            code: jspb.Message.getFieldWithDefault(msg, 3, ""),
-            sn: jspb.Message.getFieldWithDefault(msg, 4, 0),
-            status: jspb.Message.getFieldWithDefault(msg, 5, 0),
-            navshow: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
-            id: jspb.Message.getFieldWithDefault(msg, 7, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.Column}
- */
-proto.im.Column.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.Column;
-    return proto.im.Column.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.Column} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.Column}
- */
-proto.im.Column.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setUrl(value);
-                break;
-            case 3:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setCode(value);
-                break;
-            case 4:
-                var value = /** @type {number} */ (reader.readInt32());
-                msg.setSn(value);
-                break;
-            case 5:
-                var value = /** @type {!proto.im.Status} */ (reader.readEnum());
-                msg.setStatus(value);
-                break;
-            case 6:
-                var value = /** @type {boolean} */ (reader.readBool());
-                msg.setNavshow(value);
-                break;
-            case 7:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setId(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.Column.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.Column.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.Column} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.Column.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-    f = message.getUrl();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getCode();
-    if (f.length > 0) {
-        writer.writeString(
-            3,
-            f
-        );
-    }
-    f = message.getSn();
-    if (f !== 0) {
-        writer.writeInt32(
-            4,
-            f
-        );
-    }
-    f = message.getStatus();
-    if (f !== 0.0) {
-        writer.writeEnum(
-            5,
-            f
-        );
-    }
-    f = message.getNavshow();
-    if (f) {
-        writer.writeBool(
-            6,
-            f
-        );
-    }
-    f = message.getId();
-    if (f !== 0) {
-        writer.writeInt64(
-            7,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string name = 1;
- * @return {string}
- */
-proto.im.Column.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Column} returns this
- */
-proto.im.Column.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string url = 2;
- * @return {string}
- */
-proto.im.Column.prototype.getUrl = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Column} returns this
- */
-proto.im.Column.prototype.setUrl = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional string code = 3;
- * @return {string}
- */
-proto.im.Column.prototype.getCode = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Column} returns this
- */
-proto.im.Column.prototype.setCode = function (value) {
-    return jspb.Message.setProto3StringField(this, 3, value);
-};
-
-
-/**
- * optional int32 sn = 4;
- * @return {number}
- */
-proto.im.Column.prototype.getSn = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.Column} returns this
- */
-proto.im.Column.prototype.setSn = function (value) {
-    return jspb.Message.setProto3IntField(this, 4, value);
-};
-
-
-/**
- * optional Status status = 5;
- * @return {!proto.im.Status}
- */
-proto.im.Column.prototype.getStatus = function () {
-    return /** @type {!proto.im.Status} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
-};
-
-
-/**
- * @param {!proto.im.Status} value
- * @return {!proto.im.Column} returns this
- */
-proto.im.Column.prototype.setStatus = function (value) {
-    return jspb.Message.setProto3EnumField(this, 5, value);
-};
-
-
-/**
- * optional bool navShow = 6;
- * @return {boolean}
- */
-proto.im.Column.prototype.getNavshow = function () {
-    return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
-};
-
-
-/**
- * @param {boolean} value
- * @return {!proto.im.Column} returns this
- */
-proto.im.Column.prototype.setNavshow = function (value) {
-    return jspb.Message.setProto3BooleanField(this, 6, value);
-};
-
-
-/**
- * optional int64 id = 7;
- * @return {number}
- */
-proto.im.Column.prototype.getId = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.Column} returns this
- */
-proto.im.Column.prototype.setId = function (value) {
-    return jspb.Message.setProto3IntField(this, 7, value);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.UserGetColumnListReply.repeatedFields_ = [1];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.UserGetColumnListReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.UserGetColumnListReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.UserGetColumnListReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.UserGetColumnListReply.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            listList: jspb.Message.toObjectList(msg.getListList(),
-                proto.im.Column.toObject, includeInstance)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.UserGetColumnListReply}
- */
-proto.im.UserGetColumnListReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.UserGetColumnListReply;
-    return proto.im.UserGetColumnListReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.UserGetColumnListReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.UserGetColumnListReply}
- */
-proto.im.UserGetColumnListReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = new proto.im.Column;
-                reader.readMessage(value, proto.im.Column.deserializeBinaryFromReader);
-                msg.addList(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.UserGetColumnListReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.UserGetColumnListReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.UserGetColumnListReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.UserGetColumnListReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getListList();
-    if (f.length > 0) {
-        writer.writeRepeatedMessage(
-            1,
-            f,
-            proto.im.Column.serializeBinaryToWriter
-        );
-    }
-};
-
-
-/**
- * repeated Column list = 1;
- * @return {!Array<!proto.im.Column>}
- */
-proto.im.UserGetColumnListReply.prototype.getListList = function () {
-    return /** @type{!Array<!proto.im.Column>} */ (
-        jspb.Message.getRepeatedWrapperField(this, proto.im.Column, 1));
-};
-
-
-/**
- * @param {!Array<!proto.im.Column>} value
- * @return {!proto.im.UserGetColumnListReply} returns this
- */
-proto.im.UserGetColumnListReply.prototype.setListList = function (value) {
-    return jspb.Message.setRepeatedWrapperField(this, 1, value);
-};
-
-
-/**
- * @param {!proto.im.Column=} opt_value
- * @param {number=} opt_index
- * @return {!proto.im.Column}
- */
-proto.im.UserGetColumnListReply.prototype.addList = function (opt_value, opt_index) {
-    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.im.Column, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.UserGetColumnListReply} returns this
- */
-proto.im.UserGetColumnListReply.prototype.clearListList = function () {
-    return this.setListList([]);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.CreateRoleRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.CreateRoleRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.CreateRoleRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.CreateRoleRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            name: jspb.Message.getFieldWithDefault(msg, 1, ""),
-            memo: jspb.Message.getFieldWithDefault(msg, 2, "")
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.CreateRoleRequest}
- */
-proto.im.CreateRoleRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.CreateRoleRequest;
-    return proto.im.CreateRoleRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.CreateRoleRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.CreateRoleRequest}
- */
-proto.im.CreateRoleRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setMemo(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.CreateRoleRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.CreateRoleRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.CreateRoleRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.CreateRoleRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-    f = message.getMemo();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string name = 1;
- * @return {string}
- */
-proto.im.CreateRoleRequest.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateRoleRequest} returns this
- */
-proto.im.CreateRoleRequest.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string memo = 2;
- * @return {string}
- */
-proto.im.CreateRoleRequest.prototype.getMemo = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateRoleRequest} returns this
- */
-proto.im.CreateRoleRequest.prototype.setMemo = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.Role.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.Role.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.Role} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.Role.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            id: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            name: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            memo: jspb.Message.getFieldWithDefault(msg, 3, ""),
-            status: jspb.Message.getFieldWithDefault(msg, 4, 0),
-            systemname: jspb.Message.getFieldWithDefault(msg, 5, "")
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.Role}
- */
-proto.im.Role.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.Role;
-    return proto.im.Role.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.Role} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.Role}
- */
-proto.im.Role.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setId(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 3:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setMemo(value);
-                break;
-            case 4:
-                var value = /** @type {!proto.im.Status} */ (reader.readEnum());
-                msg.setStatus(value);
-                break;
-            case 5:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setSystemname(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.Role.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.Role.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.Role} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.Role.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getId();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getMemo();
-    if (f.length > 0) {
-        writer.writeString(
-            3,
-            f
-        );
-    }
-    f = message.getStatus();
-    if (f !== 0.0) {
-        writer.writeEnum(
-            4,
-            f
-        );
-    }
-    f = message.getSystemname();
-    if (f.length > 0) {
-        writer.writeString(
-            5,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 id = 1;
- * @return {number}
- */
-proto.im.Role.prototype.getId = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.Role} returns this
- */
-proto.im.Role.prototype.setId = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional string name = 2;
- * @return {string}
- */
-proto.im.Role.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Role} returns this
- */
-proto.im.Role.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional string memo = 3;
- * @return {string}
- */
-proto.im.Role.prototype.getMemo = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Role} returns this
- */
-proto.im.Role.prototype.setMemo = function (value) {
-    return jspb.Message.setProto3StringField(this, 3, value);
-};
-
-
-/**
- * optional Status status = 4;
- * @return {!proto.im.Status}
- */
-proto.im.Role.prototype.getStatus = function () {
-    return /** @type {!proto.im.Status} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
-};
-
-
-/**
- * @param {!proto.im.Status} value
- * @return {!proto.im.Role} returns this
- */
-proto.im.Role.prototype.setStatus = function (value) {
-    return jspb.Message.setProto3EnumField(this, 4, value);
-};
-
-
-/**
- * optional string systemName = 5;
- * @return {string}
- */
-proto.im.Role.prototype.getSystemname = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Role} returns this
- */
-proto.im.Role.prototype.setSystemname = function (value) {
-    return jspb.Message.setProto3StringField(this, 5, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.RoleListRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.RoleListRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.RoleListRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.RoleListRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            userid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            sysid: jspb.Message.getFieldWithDefault(msg, 2, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.RoleListRequest}
- */
-proto.im.RoleListRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.RoleListRequest;
-    return proto.im.RoleListRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.RoleListRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.RoleListRequest}
- */
-proto.im.RoleListRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUserid(value);
-                break;
-            case 2:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSysid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.RoleListRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.RoleListRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.RoleListRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.RoleListRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getUserid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getSysid();
-    if (f !== 0) {
-        writer.writeInt64(
-            2,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 userId = 1;
- * @return {number}
- */
-proto.im.RoleListRequest.prototype.getUserid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.RoleListRequest} returns this
- */
-proto.im.RoleListRequest.prototype.setUserid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional int64 sysId = 2;
- * @return {number}
- */
-proto.im.RoleListRequest.prototype.getSysid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.RoleListRequest} returns this
- */
-proto.im.RoleListRequest.prototype.setSysid = function (value) {
-    return jspb.Message.setProto3IntField(this, 2, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.UserListRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.UserListRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.UserListRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.UserListRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            roleid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            status: jspb.Message.getFieldWithDefault(msg, 2, 0),
-            name: jspb.Message.getFieldWithDefault(msg, 3, ""),
-            lcstypeid: jspb.Message.getFieldWithDefault(msg, 4, 0),
-            sysid: jspb.Message.getFieldWithDefault(msg, 5, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.UserListRequest}
- */
-proto.im.UserListRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.UserListRequest;
-    return proto.im.UserListRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.UserListRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.UserListRequest}
- */
-proto.im.UserListRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setRoleid(value);
-                break;
-            case 2:
-                var value = /** @type {!proto.im.Status} */ (reader.readEnum());
-                msg.setStatus(value);
-                break;
-            case 3:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 4:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setLcstypeid(value);
-                break;
-            case 5:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSysid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.UserListRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.UserListRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.UserListRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.UserListRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getRoleid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getStatus();
-    if (f !== 0.0) {
-        writer.writeEnum(
-            2,
-            f
-        );
-    }
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            3,
-            f
-        );
-    }
-    f = message.getLcstypeid();
-    if (f !== 0) {
-        writer.writeInt64(
-            4,
-            f
-        );
-    }
-    f = message.getSysid();
-    if (f !== 0) {
-        writer.writeInt64(
-            5,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 roleId = 1;
- * @return {number}
- */
-proto.im.UserListRequest.prototype.getRoleid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserListRequest} returns this
- */
-proto.im.UserListRequest.prototype.setRoleid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional Status status = 2;
- * @return {!proto.im.Status}
- */
-proto.im.UserListRequest.prototype.getStatus = function () {
-    return /** @type {!proto.im.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
-};
-
-
-/**
- * @param {!proto.im.Status} value
- * @return {!proto.im.UserListRequest} returns this
- */
-proto.im.UserListRequest.prototype.setStatus = function (value) {
-    return jspb.Message.setProto3EnumField(this, 2, value);
-};
-
-
-/**
- * optional string name = 3;
- * @return {string}
- */
-proto.im.UserListRequest.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.UserListRequest} returns this
- */
-proto.im.UserListRequest.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 3, value);
-};
-
-
-/**
- * optional int64 lcstypeid = 4;
- * @return {number}
- */
-proto.im.UserListRequest.prototype.getLcstypeid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserListRequest} returns this
- */
-proto.im.UserListRequest.prototype.setLcstypeid = function (value) {
-    return jspb.Message.setProto3IntField(this, 4, value);
-};
-
-
-/**
- * optional int64 sysId = 5;
- * @return {number}
- */
-proto.im.UserListRequest.prototype.getSysid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserListRequest} returns this
- */
-proto.im.UserListRequest.prototype.setSysid = function (value) {
-    return jspb.Message.setProto3IntField(this, 5, value);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.UserListReply.repeatedFields_ = [1];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.UserListReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.UserListReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.UserListReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.UserListReply.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            listList: jspb.Message.toObjectList(msg.getListList(),
-                proto.im.UserInfo.toObject, includeInstance)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.UserListReply}
- */
-proto.im.UserListReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.UserListReply;
-    return proto.im.UserListReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.UserListReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.UserListReply}
- */
-proto.im.UserListReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = new proto.im.UserInfo;
-                reader.readMessage(value, proto.im.UserInfo.deserializeBinaryFromReader);
-                msg.addList(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.UserListReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.UserListReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.UserListReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.UserListReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getListList();
-    if (f.length > 0) {
-        writer.writeRepeatedMessage(
-            1,
-            f,
-            proto.im.UserInfo.serializeBinaryToWriter
-        );
-    }
-};
-
-
-/**
- * repeated UserInfo list = 1;
- * @return {!Array<!proto.im.UserInfo>}
- */
-proto.im.UserListReply.prototype.getListList = function () {
-    return /** @type{!Array<!proto.im.UserInfo>} */ (
-        jspb.Message.getRepeatedWrapperField(this, proto.im.UserInfo, 1));
-};
-
-
-/**
- * @param {!Array<!proto.im.UserInfo>} value
- * @return {!proto.im.UserListReply} returns this
- */
-proto.im.UserListReply.prototype.setListList = function (value) {
-    return jspb.Message.setRepeatedWrapperField(this, 1, value);
-};
-
-
-/**
- * @param {!proto.im.UserInfo=} opt_value
- * @param {number=} opt_index
- * @return {!proto.im.UserInfo}
- */
-proto.im.UserListReply.prototype.addList = function (opt_value, opt_index) {
-    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.im.UserInfo, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.UserListReply} returns this
- */
-proto.im.UserListReply.prototype.clearListList = function () {
-    return this.setListList([]);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.UserGetInfoRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.UserGetInfoRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.UserGetInfoRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.UserGetInfoRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            userid: jspb.Message.getFieldWithDefault(msg, 1, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.UserGetInfoRequest}
- */
-proto.im.UserGetInfoRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.UserGetInfoRequest;
-    return proto.im.UserGetInfoRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.UserGetInfoRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.UserGetInfoRequest}
- */
-proto.im.UserGetInfoRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUserid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.UserGetInfoRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.UserGetInfoRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.UserGetInfoRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.UserGetInfoRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getUserid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 userId = 1;
- * @return {number}
- */
-proto.im.UserGetInfoRequest.prototype.getUserid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserGetInfoRequest} returns this
- */
-proto.im.UserGetInfoRequest.prototype.setUserid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.UserRolesRequest.repeatedFields_ = [2];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.UserRolesRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.UserRolesRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.UserRolesRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.UserRolesRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            userid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            roleidlistList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.UserRolesRequest}
- */
-proto.im.UserRolesRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.UserRolesRequest;
-    return proto.im.UserRolesRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.UserRolesRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.UserRolesRequest}
- */
-proto.im.UserRolesRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUserid(value);
-                break;
-            case 2:
-                var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]);
-                for (var i = 0; i < values.length; i++) {
-                    msg.addRoleidlist(values[i]);
-                }
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.UserRolesRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.UserRolesRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.UserRolesRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.UserRolesRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getUserid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getRoleidlistList();
-    if (f.length > 0) {
-        writer.writePackedInt64(
-            2,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 userId = 1;
- * @return {number}
- */
-proto.im.UserRolesRequest.prototype.getUserid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.UserRolesRequest} returns this
- */
-proto.im.UserRolesRequest.prototype.setUserid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * repeated int64 roleIdList = 2;
- * @return {!Array<number>}
- */
-proto.im.UserRolesRequest.prototype.getRoleidlistList = function () {
-    return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
-};
-
-
-/**
- * @param {!Array<number>} value
- * @return {!proto.im.UserRolesRequest} returns this
- */
-proto.im.UserRolesRequest.prototype.setRoleidlistList = function (value) {
-    return jspb.Message.setField(this, 2, value || []);
-};
-
-
-/**
- * @param {number} value
- * @param {number=} opt_index
- * @return {!proto.im.UserRolesRequest} returns this
- */
-proto.im.UserRolesRequest.prototype.addRoleidlist = function (value, opt_index) {
-    return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.UserRolesRequest} returns this
- */
-proto.im.UserRolesRequest.prototype.clearRoleidlistList = function () {
-    return this.setRoleidlistList([]);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.RoleListReply.repeatedFields_ = [1];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.RoleListReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.RoleListReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.RoleListReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.RoleListReply.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            listList: jspb.Message.toObjectList(msg.getListList(),
-                proto.im.Role.toObject, includeInstance)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.RoleListReply}
- */
-proto.im.RoleListReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.RoleListReply;
-    return proto.im.RoleListReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.RoleListReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.RoleListReply}
- */
-proto.im.RoleListReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = new proto.im.Role;
-                reader.readMessage(value, proto.im.Role.deserializeBinaryFromReader);
-                msg.addList(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.RoleListReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.RoleListReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.RoleListReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.RoleListReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getListList();
-    if (f.length > 0) {
-        writer.writeRepeatedMessage(
-            1,
-            f,
-            proto.im.Role.serializeBinaryToWriter
-        );
-    }
-};
-
-
-/**
- * repeated Role list = 1;
- * @return {!Array<!proto.im.Role>}
- */
-proto.im.RoleListReply.prototype.getListList = function () {
-    return /** @type{!Array<!proto.im.Role>} */ (
-        jspb.Message.getRepeatedWrapperField(this, proto.im.Role, 1));
-};
-
-
-/**
- * @param {!Array<!proto.im.Role>} value
- * @return {!proto.im.RoleListReply} returns this
- */
-proto.im.RoleListReply.prototype.setListList = function (value) {
-    return jspb.Message.setRepeatedWrapperField(this, 1, value);
-};
-
-
-/**
- * @param {!proto.im.Role=} opt_value
- * @param {number=} opt_index
- * @return {!proto.im.Role}
- */
-proto.im.RoleListReply.prototype.addList = function (opt_value, opt_index) {
-    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.im.Role, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.RoleListReply} returns this
- */
-proto.im.RoleListReply.prototype.clearListList = function () {
-    return this.setListList([]);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.RolePermissionRequest.repeatedFields_ = [2];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.RolePermissionRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.RolePermissionRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.RolePermissionRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.RolePermissionRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            roleid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            servicepathList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.RolePermissionRequest}
- */
-proto.im.RolePermissionRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.RolePermissionRequest;
-    return proto.im.RolePermissionRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.RolePermissionRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.RolePermissionRequest}
- */
-proto.im.RolePermissionRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setRoleid(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.addServicepath(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.RolePermissionRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.RolePermissionRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.RolePermissionRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.RolePermissionRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getRoleid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getServicepathList();
-    if (f.length > 0) {
-        writer.writeRepeatedString(
-            2,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 roleId = 1;
- * @return {number}
- */
-proto.im.RolePermissionRequest.prototype.getRoleid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.RolePermissionRequest} returns this
- */
-proto.im.RolePermissionRequest.prototype.setRoleid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * repeated string servicePath = 2;
- * @return {!Array<string>}
- */
-proto.im.RolePermissionRequest.prototype.getServicepathList = function () {
-    return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
-};
-
-
-/**
- * @param {!Array<string>} value
- * @return {!proto.im.RolePermissionRequest} returns this
- */
-proto.im.RolePermissionRequest.prototype.setServicepathList = function (value) {
-    return jspb.Message.setField(this, 2, value || []);
-};
-
-
-/**
- * @param {string} value
- * @param {number=} opt_index
- * @return {!proto.im.RolePermissionRequest} returns this
- */
-proto.im.RolePermissionRequest.prototype.addServicepath = function (value, opt_index) {
-    return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.RolePermissionRequest} returns this
- */
-proto.im.RolePermissionRequest.prototype.clearServicepathList = function () {
-    return this.setServicepathList([]);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.ServiceListRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.ServiceListRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.ServiceListRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.ServiceListRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            sysid: jspb.Message.getFieldWithDefault(msg, 1, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.ServiceListRequest}
- */
-proto.im.ServiceListRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.ServiceListRequest;
-    return proto.im.ServiceListRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.ServiceListRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.ServiceListRequest}
- */
-proto.im.ServiceListRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSysid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.ServiceListRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.ServiceListRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.ServiceListRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.ServiceListRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getSysid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 sysId = 1;
- * @return {number}
- */
-proto.im.ServiceListRequest.prototype.getSysid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ServiceListRequest} returns this
- */
-proto.im.ServiceListRequest.prototype.setSysid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.ServiceListReply.repeatedFields_ = [1];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.ServiceListReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.ServiceListReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.ServiceListReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.ServiceListReply.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            listList: jspb.Message.toObjectList(msg.getListList(),
-                proto.im.Service.toObject, includeInstance)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.ServiceListReply}
- */
-proto.im.ServiceListReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.ServiceListReply;
-    return proto.im.ServiceListReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.ServiceListReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.ServiceListReply}
- */
-proto.im.ServiceListReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = new proto.im.Service;
-                reader.readMessage(value, proto.im.Service.deserializeBinaryFromReader);
-                msg.addList(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.ServiceListReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.ServiceListReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.ServiceListReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.ServiceListReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getListList();
-    if (f.length > 0) {
-        writer.writeRepeatedMessage(
-            1,
-            f,
-            proto.im.Service.serializeBinaryToWriter
-        );
-    }
-};
-
-
-/**
- * repeated Service list = 1;
- * @return {!Array<!proto.im.Service>}
- */
-proto.im.ServiceListReply.prototype.getListList = function () {
-    return /** @type{!Array<!proto.im.Service>} */ (
-        jspb.Message.getRepeatedWrapperField(this, proto.im.Service, 1));
-};
-
-
-/**
- * @param {!Array<!proto.im.Service>} value
- * @return {!proto.im.ServiceListReply} returns this
- */
-proto.im.ServiceListReply.prototype.setListList = function (value) {
-    return jspb.Message.setRepeatedWrapperField(this, 1, value);
-};
-
-
-/**
- * @param {!proto.im.Service=} opt_value
- * @param {number=} opt_index
- * @return {!proto.im.Service}
- */
-proto.im.ServiceListReply.prototype.addList = function (opt_value, opt_index) {
-    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.im.Service, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.ServiceListReply} returns this
- */
-proto.im.ServiceListReply.prototype.clearListList = function () {
-    return this.setListList([]);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.ServiceRemoveRequest.repeatedFields_ = [1];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.ServiceRemoveRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.ServiceRemoveRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.ServiceRemoveRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.ServiceRemoveRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            pathlistList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.ServiceRemoveRequest}
- */
-proto.im.ServiceRemoveRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.ServiceRemoveRequest;
-    return proto.im.ServiceRemoveRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.ServiceRemoveRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.ServiceRemoveRequest}
- */
-proto.im.ServiceRemoveRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.addPathlist(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.ServiceRemoveRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.ServiceRemoveRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.ServiceRemoveRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.ServiceRemoveRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getPathlistList();
-    if (f.length > 0) {
-        writer.writeRepeatedString(
-            1,
-            f
-        );
-    }
-};
-
-
-/**
- * repeated string pathList = 1;
- * @return {!Array<string>}
- */
-proto.im.ServiceRemoveRequest.prototype.getPathlistList = function () {
-    return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
-};
-
-
-/**
- * @param {!Array<string>} value
- * @return {!proto.im.ServiceRemoveRequest} returns this
- */
-proto.im.ServiceRemoveRequest.prototype.setPathlistList = function (value) {
-    return jspb.Message.setField(this, 1, value || []);
-};
-
-
-/**
- * @param {string} value
- * @param {number=} opt_index
- * @return {!proto.im.ServiceRemoveRequest} returns this
- */
-proto.im.ServiceRemoveRequest.prototype.addPathlist = function (value, opt_index) {
-    return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.ServiceRemoveRequest} returns this
- */
-proto.im.ServiceRemoveRequest.prototype.clearPathlistList = function () {
-    return this.setPathlistList([]);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.CreateShopRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.CreateShopRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.CreateShopRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.CreateShopRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            name: jspb.Message.getFieldWithDefault(msg, 1, ""),
-            key: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            sid: jspb.Message.getFieldWithDefault(msg, 3, 0),
-            addr: jspb.Message.getFieldWithDefault(msg, 4, ""),
-            phone: jspb.Message.getFieldWithDefault(msg, 5, ""),
-            contacts: jspb.Message.getFieldWithDefault(msg, 6, ""),
-            createuser: jspb.Message.getFieldWithDefault(msg, 7, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.CreateShopRequest}
- */
-proto.im.CreateShopRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.CreateShopRequest;
-    return proto.im.CreateShopRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.CreateShopRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.CreateShopRequest}
- */
-proto.im.CreateShopRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setKey(value);
-                break;
-            case 3:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSid(value);
-                break;
-            case 4:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setAddr(value);
-                break;
-            case 5:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setPhone(value);
-                break;
-            case 6:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setContacts(value);
-                break;
-            case 7:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setCreateuser(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.CreateShopRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.CreateShopRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.CreateShopRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.CreateShopRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            1,
-            f
-        );
-    }
-    f = message.getKey();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getSid();
-    if (f !== 0) {
-        writer.writeInt64(
-            3,
-            f
-        );
-    }
-    f = message.getAddr();
-    if (f.length > 0) {
-        writer.writeString(
-            4,
-            f
-        );
-    }
-    f = message.getPhone();
-    if (f.length > 0) {
-        writer.writeString(
-            5,
-            f
-        );
-    }
-    f = message.getContacts();
-    if (f.length > 0) {
-        writer.writeString(
-            6,
-            f
-        );
-    }
-    f = message.getCreateuser();
-    if (f !== 0) {
-        writer.writeInt64(
-            7,
-            f
-        );
-    }
-};
-
-
-/**
- * optional string name = 1;
- * @return {string}
- */
-proto.im.CreateShopRequest.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateShopRequest} returns this
- */
-proto.im.CreateShopRequest.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 1, value);
-};
-
-
-/**
- * optional string key = 2;
- * @return {string}
- */
-proto.im.CreateShopRequest.prototype.getKey = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateShopRequest} returns this
- */
-proto.im.CreateShopRequest.prototype.setKey = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional int64 sId = 3;
- * @return {number}
- */
-proto.im.CreateShopRequest.prototype.getSid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.CreateShopRequest} returns this
- */
-proto.im.CreateShopRequest.prototype.setSid = function (value) {
-    return jspb.Message.setProto3IntField(this, 3, value);
-};
-
-
-/**
- * optional string addr = 4;
- * @return {string}
- */
-proto.im.CreateShopRequest.prototype.getAddr = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateShopRequest} returns this
- */
-proto.im.CreateShopRequest.prototype.setAddr = function (value) {
-    return jspb.Message.setProto3StringField(this, 4, value);
-};
-
-
-/**
- * optional string phone = 5;
- * @return {string}
- */
-proto.im.CreateShopRequest.prototype.getPhone = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateShopRequest} returns this
- */
-proto.im.CreateShopRequest.prototype.setPhone = function (value) {
-    return jspb.Message.setProto3StringField(this, 5, value);
-};
-
-
-/**
- * optional string contacts = 6;
- * @return {string}
- */
-proto.im.CreateShopRequest.prototype.getContacts = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.CreateShopRequest} returns this
- */
-proto.im.CreateShopRequest.prototype.setContacts = function (value) {
-    return jspb.Message.setProto3StringField(this, 6, value);
-};
-
-
-/**
- * optional int64 createUser = 7;
- * @return {number}
- */
-proto.im.CreateShopRequest.prototype.getCreateuser = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.CreateShopRequest} returns this
- */
-proto.im.CreateShopRequest.prototype.setCreateuser = function (value) {
-    return jspb.Message.setProto3IntField(this, 7, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.ShopListRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.ShopListRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.ShopListRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.ShopListRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            sysid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            name: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            status: jspb.Message.getFieldWithDefault(msg, 3, 0),
-            sid: jspb.Message.getFieldWithDefault(msg, 4, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.ShopListRequest}
- */
-proto.im.ShopListRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.ShopListRequest;
-    return proto.im.ShopListRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.ShopListRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.ShopListRequest}
- */
-proto.im.ShopListRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSysid(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 3:
-                var value = /** @type {!proto.im.Status} */ (reader.readEnum());
-                msg.setStatus(value);
-                break;
-            case 4:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.ShopListRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.ShopListRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.ShopListRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.ShopListRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getSysid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getStatus();
-    if (f !== 0.0) {
-        writer.writeEnum(
-            3,
-            f
-        );
-    }
-    f = message.getSid();
-    if (f !== 0) {
-        writer.writeInt64(
-            4,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 sysId = 1;
- * @return {number}
- */
-proto.im.ShopListRequest.prototype.getSysid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ShopListRequest} returns this
- */
-proto.im.ShopListRequest.prototype.setSysid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional string name = 2;
- * @return {string}
- */
-proto.im.ShopListRequest.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.ShopListRequest} returns this
- */
-proto.im.ShopListRequest.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional Status status = 3;
- * @return {!proto.im.Status}
- */
-proto.im.ShopListRequest.prototype.getStatus = function () {
-    return /** @type {!proto.im.Status} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
-};
-
-
-/**
- * @param {!proto.im.Status} value
- * @return {!proto.im.ShopListRequest} returns this
- */
-proto.im.ShopListRequest.prototype.setStatus = function (value) {
-    return jspb.Message.setProto3EnumField(this, 3, value);
-};
-
-
-/**
- * optional int64 sId = 4;
- * @return {number}
- */
-proto.im.ShopListRequest.prototype.getSid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ShopListRequest} returns this
- */
-proto.im.ShopListRequest.prototype.setSid = function (value) {
-    return jspb.Message.setProto3IntField(this, 4, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.ShopInfo.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.ShopInfo.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.ShopInfo} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.ShopInfo.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            shopid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            name: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            sid: jspb.Message.getFieldWithDefault(msg, 3, 0),
-            addr: jspb.Message.getFieldWithDefault(msg, 4, ""),
-            phone: jspb.Message.getFieldWithDefault(msg, 5, ""),
-            contacts: jspb.Message.getFieldWithDefault(msg, 6, ""),
-            status: jspb.Message.getFieldWithDefault(msg, 7, 0),
-            createdAt: jspb.Message.getFieldWithDefault(msg, 8, 0),
-            createdUser: jspb.Message.getFieldWithDefault(msg, 9, 0),
-            updatedAt: jspb.Message.getFieldWithDefault(msg, 10, 0),
-            updatedUser: jspb.Message.getFieldWithDefault(msg, 11, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.ShopInfo}
- */
-proto.im.ShopInfo.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.ShopInfo;
-    return proto.im.ShopInfo.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.ShopInfo} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.ShopInfo}
- */
-proto.im.ShopInfo.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setShopid(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setName(value);
-                break;
-            case 3:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSid(value);
-                break;
-            case 4:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setAddr(value);
-                break;
-            case 5:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setPhone(value);
-                break;
-            case 6:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setContacts(value);
-                break;
-            case 7:
-                var value = /** @type {!proto.im.Status} */ (reader.readEnum());
-                msg.setStatus(value);
-                break;
-            case 8:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setCreatedAt(value);
-                break;
-            case 9:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setCreatedUser(value);
-                break;
-            case 10:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUpdatedAt(value);
-                break;
-            case 11:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUpdatedUser(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.ShopInfo.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.ShopInfo.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.ShopInfo} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.ShopInfo.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getShopid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getName();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getSid();
-    if (f !== 0) {
-        writer.writeInt64(
-            3,
-            f
-        );
-    }
-    f = message.getAddr();
-    if (f.length > 0) {
-        writer.writeString(
-            4,
-            f
-        );
-    }
-    f = message.getPhone();
-    if (f.length > 0) {
-        writer.writeString(
-            5,
-            f
-        );
-    }
-    f = message.getContacts();
-    if (f.length > 0) {
-        writer.writeString(
-            6,
-            f
-        );
-    }
-    f = message.getStatus();
-    if (f !== 0.0) {
-        writer.writeEnum(
-            7,
-            f
-        );
-    }
-    f = message.getCreatedAt();
-    if (f !== 0) {
-        writer.writeInt64(
-            8,
-            f
-        );
-    }
-    f = message.getCreatedUser();
-    if (f !== 0) {
-        writer.writeInt64(
-            9,
-            f
-        );
-    }
-    f = message.getUpdatedAt();
-    if (f !== 0) {
-        writer.writeInt64(
-            10,
-            f
-        );
-    }
-    f = message.getUpdatedUser();
-    if (f !== 0) {
-        writer.writeInt64(
-            11,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 shopId = 1;
- * @return {number}
- */
-proto.im.ShopInfo.prototype.getShopid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setShopid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional string name = 2;
- * @return {string}
- */
-proto.im.ShopInfo.prototype.getName = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setName = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional int64 sId = 3;
- * @return {number}
- */
-proto.im.ShopInfo.prototype.getSid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setSid = function (value) {
-    return jspb.Message.setProto3IntField(this, 3, value);
-};
-
-
-/**
- * optional string addr = 4;
- * @return {string}
- */
-proto.im.ShopInfo.prototype.getAddr = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setAddr = function (value) {
-    return jspb.Message.setProto3StringField(this, 4, value);
-};
-
-
-/**
- * optional string phone = 5;
- * @return {string}
- */
-proto.im.ShopInfo.prototype.getPhone = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setPhone = function (value) {
-    return jspb.Message.setProto3StringField(this, 5, value);
-};
-
-
-/**
- * optional string contacts = 6;
- * @return {string}
- */
-proto.im.ShopInfo.prototype.getContacts = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setContacts = function (value) {
-    return jspb.Message.setProto3StringField(this, 6, value);
-};
-
-
-/**
- * optional Status status = 7;
- * @return {!proto.im.Status}
- */
-proto.im.ShopInfo.prototype.getStatus = function () {
-    return /** @type {!proto.im.Status} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
-};
-
-
-/**
- * @param {!proto.im.Status} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setStatus = function (value) {
-    return jspb.Message.setProto3EnumField(this, 7, value);
-};
-
-
-/**
- * optional int64 created_at = 8;
- * @return {number}
- */
-proto.im.ShopInfo.prototype.getCreatedAt = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setCreatedAt = function (value) {
-    return jspb.Message.setProto3IntField(this, 8, value);
-};
-
-
-/**
- * optional int64 created_user = 9;
- * @return {number}
- */
-proto.im.ShopInfo.prototype.getCreatedUser = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setCreatedUser = function (value) {
-    return jspb.Message.setProto3IntField(this, 9, value);
-};
-
-
-/**
- * optional int64 updated_at = 10;
- * @return {number}
- */
-proto.im.ShopInfo.prototype.getUpdatedAt = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setUpdatedAt = function (value) {
-    return jspb.Message.setProto3IntField(this, 10, value);
-};
-
-
-/**
- * optional int64 updated_user = 11;
- * @return {number}
- */
-proto.im.ShopInfo.prototype.getUpdatedUser = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.ShopInfo} returns this
- */
-proto.im.ShopInfo.prototype.setUpdatedUser = function (value) {
-    return jspb.Message.setProto3IntField(this, 11, value);
-};
-
-
-/**
- * List of repeated fields within this message type.
- * @private {!Array<number>}
- * @const
- */
-proto.im.ShopListReply.repeatedFields_ = [1];
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.ShopListReply.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.ShopListReply.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.ShopListReply} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.ShopListReply.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            listList: jspb.Message.toObjectList(msg.getListList(),
-                proto.im.ShopInfo.toObject, includeInstance)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.ShopListReply}
- */
-proto.im.ShopListReply.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.ShopListReply;
-    return proto.im.ShopListReply.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.ShopListReply} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.ShopListReply}
- */
-proto.im.ShopListReply.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = new proto.im.ShopInfo;
-                reader.readMessage(value, proto.im.ShopInfo.deserializeBinaryFromReader);
-                msg.addList(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.ShopListReply.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.ShopListReply.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.ShopListReply} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.ShopListReply.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getListList();
-    if (f.length > 0) {
-        writer.writeRepeatedMessage(
-            1,
-            f,
-            proto.im.ShopInfo.serializeBinaryToWriter
-        );
-    }
-};
-
-
-/**
- * repeated ShopInfo list = 1;
- * @return {!Array<!proto.im.ShopInfo>}
- */
-proto.im.ShopListReply.prototype.getListList = function () {
-    return /** @type{!Array<!proto.im.ShopInfo>} */ (
-        jspb.Message.getRepeatedWrapperField(this, proto.im.ShopInfo, 1));
-};
-
-
-/**
- * @param {!Array<!proto.im.ShopInfo>} value
- * @return {!proto.im.ShopListReply} returns this
- */
-proto.im.ShopListReply.prototype.setListList = function (value) {
-    return jspb.Message.setRepeatedWrapperField(this, 1, value);
-};
-
-
-/**
- * @param {!proto.im.ShopInfo=} opt_value
- * @param {number=} opt_index
- * @return {!proto.im.ShopInfo}
- */
-proto.im.ShopListReply.prototype.addList = function (opt_value, opt_index) {
-    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.im.ShopInfo, opt_index);
-};
-
-
-/**
- * Clears the list making it empty but non-null.
- * @return {!proto.im.ShopListReply} returns this
- */
-proto.im.ShopListReply.prototype.clearListList = function () {
-    return this.setListList([]);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.SystemAddShopRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.SystemAddShopRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.SystemAddShopRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.SystemAddShopRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            sysid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            shopid: jspb.Message.getFieldWithDefault(msg, 2, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.SystemAddShopRequest}
- */
-proto.im.SystemAddShopRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.SystemAddShopRequest;
-    return proto.im.SystemAddShopRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.SystemAddShopRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.SystemAddShopRequest}
- */
-proto.im.SystemAddShopRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSysid(value);
-                break;
-            case 2:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setShopid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.SystemAddShopRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.SystemAddShopRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.SystemAddShopRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.SystemAddShopRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getSysid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getShopid();
-    if (f !== 0) {
-        writer.writeInt64(
-            2,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 sysId = 1;
- * @return {number}
- */
-proto.im.SystemAddShopRequest.prototype.getSysid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.SystemAddShopRequest} returns this
- */
-proto.im.SystemAddShopRequest.prototype.setSysid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional int64 shopId = 2;
- * @return {number}
- */
-proto.im.SystemAddShopRequest.prototype.getShopid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.SystemAddShopRequest} returns this
- */
-proto.im.SystemAddShopRequest.prototype.setShopid = function (value) {
-    return jspb.Message.setProto3IntField(this, 2, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.SystemAddUserRequest.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.SystemAddUserRequest.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.SystemAddUserRequest} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.SystemAddUserRequest.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            sysid: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            userid: jspb.Message.getFieldWithDefault(msg, 2, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.SystemAddUserRequest}
- */
-proto.im.SystemAddUserRequest.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.SystemAddUserRequest;
-    return proto.im.SystemAddUserRequest.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.SystemAddUserRequest} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.SystemAddUserRequest}
- */
-proto.im.SystemAddUserRequest.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setSysid(value);
-                break;
-            case 2:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setUserid(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.SystemAddUserRequest.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.SystemAddUserRequest.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.SystemAddUserRequest} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.SystemAddUserRequest.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getSysid();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getUserid();
-    if (f !== 0) {
-        writer.writeInt64(
-            2,
-            f
-        );
-    }
-};
-
-
-/**
- * optional int64 sysId = 1;
- * @return {number}
- */
-proto.im.SystemAddUserRequest.prototype.getSysid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.SystemAddUserRequest} returns this
- */
-proto.im.SystemAddUserRequest.prototype.setSysid = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional int64 userId = 2;
- * @return {number}
- */
-proto.im.SystemAddUserRequest.prototype.getUserid = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.SystemAddUserRequest} returns this
- */
-proto.im.SystemAddUserRequest.prototype.setUserid = function (value) {
-    return jspb.Message.setProto3IntField(this, 2, value);
-};
-
-
-if (jspb.Message.GENERATE_TO_OBJECT) {
-    /**
-     * Creates an object representation of this proto.
-     * Field names that are reserved in JavaScript and will be renamed to pb_name.
-     * Optional fields that are not set will be set to undefined.
-     * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
-     * For the list of reserved names please see:
-     *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
-     * @param {boolean=} opt_includeInstance Deprecated. whether to include the
-     *     JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @return {!Object}
-     */
-    proto.im.Message.prototype.toObject = function (opt_includeInstance) {
-        return proto.im.Message.toObject(opt_includeInstance, this);
-    };
-
-
-    /**
-     * Static version of the {@see toObject} method.
-     * @param {boolean|undefined} includeInstance Deprecated. Whether to include
-     *     the JSPB instance for transitional soy proto support:
-     *     http://goto/soy-param-migration
-     * @param {!proto.im.Message} msg The msg instance to transform.
-     * @return {!Object}
-     * @suppress {unusedLocalVariables} f is only used for nested messages
-     */
-    proto.im.Message.toObject = function (includeInstance, msg) {
-        var f, obj = {
-            id: jspb.Message.getFieldWithDefault(msg, 1, 0),
-            title: jspb.Message.getFieldWithDefault(msg, 2, ""),
-            content: jspb.Message.getFieldWithDefault(msg, 3, ""),
-            level: jspb.Message.getFieldWithDefault(msg, 4, 0),
-            createat: jspb.Message.getFieldWithDefault(msg, 5, 0)
-        };
-
-        if (includeInstance) {
-            obj.$jspbMessageInstance = msg;
-        }
-        return obj;
-    };
-}
-
-
-/**
- * Deserializes binary data (in protobuf wire format).
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
- * @return {!proto.im.Message}
- */
-proto.im.Message.deserializeBinary = function (bytes) {
-    var reader = new jspb.BinaryReader(bytes);
-    var msg = new proto.im.Message;
-    return proto.im.Message.deserializeBinaryFromReader(msg, reader);
-};
-
-
-/**
- * Deserializes binary data (in protobuf wire format) from the
- * given reader into the given message object.
- * @param {!proto.im.Message} msg The message object to deserialize into.
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
- * @return {!proto.im.Message}
- */
-proto.im.Message.deserializeBinaryFromReader = function (msg, reader) {
-    while (reader.nextField()) {
-        if (reader.isEndGroup()) {
-            break;
-        }
-        var field = reader.getFieldNumber();
-        switch (field) {
-            case 1:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setId(value);
-                break;
-            case 2:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setTitle(value);
-                break;
-            case 3:
-                var value = /** @type {string} */ (reader.readString());
-                msg.setContent(value);
-                break;
-            case 4:
-                var value = /** @type {!proto.im.Message.Level} */ (reader.readEnum());
-                msg.setLevel(value);
-                break;
-            case 5:
-                var value = /** @type {number} */ (reader.readInt64());
-                msg.setCreateat(value);
-                break;
-            default:
-                reader.skipField();
-                break;
-        }
-    }
-    return msg;
-};
-
-
-/**
- * Serializes the message to binary data (in protobuf wire format).
- * @return {!Uint8Array}
- */
-proto.im.Message.prototype.serializeBinary = function () {
-    var writer = new jspb.BinaryWriter();
-    proto.im.Message.serializeBinaryToWriter(this, writer);
-    return writer.getResultBuffer();
-};
-
-
-/**
- * Serializes the given message to binary data (in protobuf wire
- * format), writing to the given BinaryWriter.
- * @param {!proto.im.Message} message
- * @param {!jspb.BinaryWriter} writer
- * @suppress {unusedLocalVariables} f is only used for nested messages
- */
-proto.im.Message.serializeBinaryToWriter = function (message, writer) {
-    var f = undefined;
-    f = message.getId();
-    if (f !== 0) {
-        writer.writeInt64(
-            1,
-            f
-        );
-    }
-    f = message.getTitle();
-    if (f.length > 0) {
-        writer.writeString(
-            2,
-            f
-        );
-    }
-    f = message.getContent();
-    if (f.length > 0) {
-        writer.writeString(
-            3,
-            f
-        );
-    }
-    f = message.getLevel();
-    if (f !== 0.0) {
-        writer.writeEnum(
-            4,
-            f
-        );
-    }
-    f = message.getCreateat();
-    if (f !== 0) {
-        writer.writeInt64(
-            5,
-            f
-        );
-    }
-};
-
-
-/**
- * @enum {number}
- */
-proto.im.Message.Level = {
-    NULL: 0,
-    NORMAL: 1,
-    WARN: 2,
-    ERROR: 3
-};
-
-/**
- * optional int64 id = 1;
- * @return {number}
- */
-proto.im.Message.prototype.getId = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.Message} returns this
- */
-proto.im.Message.prototype.setId = function (value) {
-    return jspb.Message.setProto3IntField(this, 1, value);
-};
-
-
-/**
- * optional string title = 2;
- * @return {string}
- */
-proto.im.Message.prototype.getTitle = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Message} returns this
- */
-proto.im.Message.prototype.setTitle = function (value) {
-    return jspb.Message.setProto3StringField(this, 2, value);
-};
-
-
-/**
- * optional string content = 3;
- * @return {string}
- */
-proto.im.Message.prototype.getContent = function () {
-    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
-};
-
-
-/**
- * @param {string} value
- * @return {!proto.im.Message} returns this
- */
-proto.im.Message.prototype.setContent = function (value) {
-    return jspb.Message.setProto3StringField(this, 3, value);
-};
-
-
-/**
- * optional Level level = 4;
- * @return {!proto.im.Message.Level}
- */
-proto.im.Message.prototype.getLevel = function () {
-    return /** @type {!proto.im.Message.Level} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
-};
-
-
-/**
- * @param {!proto.im.Message.Level} value
- * @return {!proto.im.Message} returns this
- */
-proto.im.Message.prototype.setLevel = function (value) {
-    return jspb.Message.setProto3EnumField(this, 4, value);
-};
-
-
-/**
- * optional int64 createAt = 5;
- * @return {number}
- */
-proto.im.Message.prototype.getCreateat = function () {
-    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
-};
-
-
-/**
- * @param {number} value
- * @return {!proto.im.Message} returns this
- */
-proto.im.Message.prototype.setCreateat = function (value) {
-    return jspb.Message.setProto3IntField(this, 5, value);
-};
-
-
-/**
- * @enum {number}
- */
-proto.im.ErrorCode = {
-    OK: 0,
-    PARAM: 4001,
-    EXIST: 4002,
-    TOKEN: 4003
-};
-
-/**
- * @enum {number}
- */
-proto.im.Status = {
-    NULL: 0,
-    BAN: 1,
-    ON: 2,
-    DELETE: 9
-};
-
-goog.object.extend(exports, proto.im);

+ 9 - 2
src/grpc/package.json

@@ -1,5 +1,12 @@
 {
+  "name": "grpc-web-commonjs-example",
+  "dependencies": {
+    "google-protobuf": "^3.6.1",
+    "grpc-web": "^0.4.0"
+  },
   "devDependencies": {
-    "compression-webpack-plugin": "^1.1.12"
+    "browserify": "^16.2.2",
+    "webpack": "^4.16.5",
+    "webpack-cli": "^3.1.0"
   }
-}
+}

+ 72 - 10
src/grpc/readme.md

@@ -1,4 +1,13 @@
 # readme
+##grpc调试
+#im
+grpcui -port 20001 -plaintext 192.168.0.3:20011
+#base
+grpcui -port 20002 -plaintext 192.168.0.3:20014
+
+go get github.com/fullstorydev/grpcui/...
+go install github.com/fullstorydev/grpcui/cmd/grpcui
+
 
 ## 生成服务
 
@@ -18,9 +27,12 @@ import {SignInPasswordRequest, FlushDataRequest, Data} from "@/assets/grpcBack/i
 import {ApiClient} from "@/assets/grpcBack/im_grpc_web_pb"; // 固定内容无需修改
 
 [comment]: <> (function)
-let that = this; //端口地址 this.client = new ApiClient("http://192.168.0.3:20010", null, null);
+let that = this; //端口地址 
 
-// 报文内容和方法,方法取自im.proto文件 rpc rpc SignInUserCode (SignInPasswordRequest) returns (TokenParam)  {}
+this.client = new ApiClient("http://192.168.0.3:20010", null, null);
+
+// 报文内容和方法,方法取自im.proto文件 rpc rpc 
+SignInUserCode (SignInPasswordRequest) returns (TokenParam)  {}
 
 let pwdtext = "asdf*123"
 let authtext = "admin"
@@ -41,15 +53,65 @@ this.message = response.getToken(); });
 
 #### 全局使用
 
-main.js 里 import {ApiClient} from "../src/grpc/im_grpc_web_pb"; // 建立grpc连接服务 let client = new
-ApiClient("http://192.168.0.3:20010", null, null); // 挂载为全局方法 Vue.prototype.client = client;
+main.js 里 
+import {ApiClient} from "../src/grpc/im_grpc_web_pb"; 
+// 建立grpc连接服务 
+let client = new ApiClient("http://192.168.0.3:20010", null, null); 
+// 挂载为全局方法 
+Vue.prototype.client = client;
 
-目标vue页面 里 按需引入 import {SignInPasswordRequest} from "@/grpc/im_pb";
+目标vue页面 里 按需引入 
+import {SignInPasswordRequest} from "@/grpc/im_pb";
 
 ...
 
-methods: { grpcServe(){ let that = this; let getRequest = new SignInPasswordRequest(); getRequest.setPassword("asdf*
-123"); getRequest.setAuth("admin"); getRequest.setExpirationsec(10000); that.client.signInUserCode(getRequest, {}, (err,
-response) => { that.TodayCalcValues = response.getToken(); }); },
-
-//TodayCalcValues为显示容器
+methods: { 
+grpcServe(){ 
+    let that = this; 
+    let getRequest = new SignInPasswordRequest(); 
+    getRequest.setPassword("asdf*123"); 
+    getRequest.setAuth("admin"); 
+    getRequest.setExpirationsec(10000);
+    that.client.signInUserCode(getRequest, {},
+        (err,response) => { 
+            that.TodayCalcValues = response.getToken(); 
+            }); 
+},
+//TodayCalcValues为显示容器
+
+import {
+StandardRequest
+} from "@/grpc/base_pb";
+
+//含参数调用过程
+const jsonStr = {
+shopId: localStorage.shopId,
+vipType: -99,
+start: that.start,
+tableMax: that.pageination.pageItem
+};
+
+let paraRequest = new StandardRequest();
+paraRequest.setShopid(localStorage.shopId);
+paraRequest.setJsonstr(JSON.stringify(jsonStr));
+paraRequest.setSign(getSignStr(jsonStr));
+console.log(paraRequest);
+that.client.TODO(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+    if (err == null) {
+        console.log(StandardReply.getJsonrst());
+        let res = JSON.parse(StandardReply);
+        if (res.code === 0) {
+            if(res.rs){
+                //TODO
+            }else{
+                //TODO
+                }
+        } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });

+ 2 - 2
src/main.js

@@ -7,7 +7,7 @@ import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
 import axios from 'axios'
 
-import {ApiClient} from "../src/grpc/im_grpc_web_pb";
+import {ApiClient} from "../src/grpc/base_grpc_web_pb";
 
 Vue.config.productionTip = false;
 import VCharts from 'v-charts'
@@ -30,7 +30,7 @@ if (process.env.NODE_ENV === 'development') {
 // require('./Mock/index.js');
 
 // 建立grpc连接服务
-let client = new ApiClient("http://192.168.0.3:20010", null, null);
+let client = new ApiClient("http://192.168.0.3:20014", null, null);
 // 挂载为全局方法
 Vue.prototype.client = client;
 

+ 14 - 14
src/router/index.js

@@ -38,9 +38,9 @@ const routes = [
                 }
             },
             {
-                path: '/tempUser',
-                name: 'tempUser',
-                component: () => import('@/views/User/tempUser.vue'),
+                path: '/tempMember',
+                name: 'tempMember',
+                component: () => import('@/views/User/tempMember.vue'),
                 meta: {
                     title: "临时会员",
                     // clmid: "33",
@@ -50,31 +50,31 @@ const routes = [
                 name: 'Lesson',
                 component: () => import('@/views/Class/Lesson.vue'),
                 meta: {
-                    title: "课程模板",
+                    title: "科目管理",
                     // clmid: "3",
                 }
             }, {
-                path: '/lessonTable',
-                name: 'lessonTable',
-                component: () => import('@/views/Class/LessonTable.vue'),
+                path: '/lessonTemplate',
+                name: 'lessonTemplate',
+                component: () => import('@/views/Class/LessonTemplate.vue'),
                 meta: {
                     title: "课程表模板",
                     // clmid: "4",
                 }
             }, {
-                path: '/editLessonTable',
-                name: 'EditLessonTable',
-                component: () => import('@/views/SttPlan/EditLessonTable.vue'),
+                path: '/lessonTemplateEdit',
+                name: 'lessonTemplateEdit',
+                component: () => import('@/views/SttPlan/LessonTemplateEdit.vue'),
                 meta: {
                     title: "编辑课程表模板",
                     // clmid: "4",
                 }
             }, {
-                path: '/editLessonManage',
-                name: 'EditLessonManage',
-                component: () => import('@/views/SchoolTimeTable/EditLessonManage.vue'),
+                path: '/lessonManage',
+                name: 'lessonManage',
+                component: () => import('@/views/SchoolTimeTable/LessonManage.vue'),
                 meta: {
-                    title: "编辑课程表",
+                    title: "课程表管理",
                     // clmid: "5",
                 }
             }, {

+ 212 - 106
src/views/Auth/Login.vue

@@ -4,8 +4,8 @@
       <el-header></el-header>
       <el-main>
         <div class="bg">
-
-          <el-card class="box-card">
+          <!--登录框-->
+          <el-card v-if="!selectShop" class="box-card">
             <h5 class="title">
               <img src="../../assets/img/login/logo.png" alt="">
             </h5>
@@ -23,14 +23,39 @@
                 <img id="validImg" :src="valImgSrc" alt="" width="100px" height="42px"
                      title="看不清?刷一下试试!" @click="getGenVerifyPic">
               </el-form-item>
-              <br>
-              <br>
               <el-form-item>
                 <el-button type="primary" @click="onSubmit">登陆</el-button>
               </el-form-item>
             </el-form>
           </el-card>
+
+          <!--门店选择框-->
+          <el-card v-if="selectShop" class="box-card">
+            <h5 class="title">
+              <img src="../../assets/img/login/logo.png" alt="">
+            </h5>
+
+            <span class="subtitle">小飞龙场馆管理系统</span>
+
+            <el-table ref="singleTable" :data="shopTableData" highlight-current-row
+                      @current-change="handleCurrentChange"
+                      style="width: 100%">
+              <el-table-column width="55">
+                <template slot-scope="scope">
+                  <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+                </template>
+              </el-table-column>
+              <el-table-column prop="name" label="店名" width="120"/>
+              <el-table-column prop="contacts" label="联系人" width="120"/>
+              <el-table-column prop="addr" label="地址"/>
+            </el-table>
+
+            <el-button type="primary" @click="enterShop()" style="margin-top: 150px">确定</el-button>
+
+          </el-card>
+
         </div>
+
       </el-main>
       <el-footer></el-footer>
     </el-container>
@@ -38,23 +63,30 @@
 </template>
 
 <script>
+
 import {
-  SignIn,
-  GenVerifyPic,
-  ManagerSelfQuery
-} from "../../api/getApiRes";
+  GenVerifyImageRequest,
+  GetShopNaviRequest,
+  SignInRequest,
+  ShopListRequest
+} from "@/grpc/base_pb";
+import Global from '../../Global.js'
 
 let qs = require('qs');
-import Global from '../../Global.js'
+
 export default {
   data() {
     return {
+      selectShop: false,//控制显示页面步骤
       form: {
         name: '',
         pwd: '',
         valid: '',
         picId: '',
       },
+      tableRadio: [],
+      shopTableData: [],
+      currentRow: null,
       valImgSrc: '',
       valImgId: '',
       overtime: '',
@@ -66,147 +98,218 @@ export default {
     this.overtime = new Date();
     this.getGenVerifyPic();
     // 如果是手动退出用户
-    if (this.$route.query.status == 1) {
+    if (this.$route.query.status === 1) {
       // 刷新验证图
       this.changeValImg();
       // 重置倒计时
       this.overtime = new Date();
+      console.log(1212121222);
     }
-
     // checkScreen
     if (document.body.clientWidth < 1024) {
       this.$message.warning('请横屏使用本系统');
     }
   },
   methods: {
+    //切换table当前选中行
+    handleCurrentChange(val) {
+      this.currentRow = val;
+      this.tableRadio = val
+    },
+    //刷新验证码
     getGenVerifyPic() {
       let that = this;
-      let param = {
-        token: localStorage.token,
-        width: 100,
-        height: 42,
-        noiseCount: 10,
-        length: 4,
-        source: 123456789,
-      };
-      let postdata = qs.stringify(param);
-      GenVerifyPic(postdata).then(res => {
-        let json = res;
-        that.valImgSrc = json.Pic;
-        that.valImgId = json.Id;
-        that.form.picId = json.Id;
-      })
+      let getRequest = new GenVerifyImageRequest();
+      getRequest.setWidth(200);
+      getRequest.setHeight(100);
+      that.client.genVerifyImage(getRequest, {}, (err, GenVerifyImageReply) => {
+        that.valImgSrc = GenVerifyImageReply.getImagebase64()
+        that.valImgId = GenVerifyImageReply.getCodeid()
+        that.form.picId = GenVerifyImageReply.getCodeid()
+      });
     },
-    //            点击验证码切换
+    //点击验证码切换
     changeValImg: function () {
       // 刷新验证图
       this.getGenVerifyPic();
     },
-    // 登陆
+    //提交登陆
     onSubmit() {
-      this.pwdLoginBtn()
-    },
-    // 密码登陆
-    pwdLoginBtn() {
       let that = this;
       let username = this.form.name;
-      let userpwd = this.form.pwd;
-      let uservalid = this.form.valid;
+      let userPwd = this.form.pwd;
+      let userValid = this.form.valid;
       // 重置验证码超时
       that.overtime = new Date();
       if (!globalValid(username, 2, 17, '用户名', that)) return;
-      if (!globalValid(userpwd, 5, 17, '密码', that)) return;
-      if (!globalValid(uservalid, 3, 5, '验证码', that)) return;
-      this.loginInfo();
-    },
-    getManagerSelfQuery() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ManagerSelfQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.userLevelText = json.Rs.Role.Name;
-          // 1 会员 2 系统 3 店铺 4 教练
-          that.userLevel = json.Rs.Role.Id;
-          localStorage.shopId = json.Rs.ShopId;
-          localStorage.ShopId = json.Rs.ShopId;
-
-          switch (parseInt(that.userLevel)) {
-            case 1:
-              that.$router.push({path: '/'});
-              break;
-            case 2:
-              that.$router.push({path: '/shopManage'});
-              break;
-            case 3:
-              that.$router.push({path: '/'});
-              break;
-            case 4:
-              that.$router.push({path: '/'});
-              break;
-
-          }
-        } else {
-          if (json.Code == 1010) {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-            that.$router.push({path: '/login', query: {status: 1}});
-            return false
-          }
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
-        }
-      })
+      if (!globalValid(userPwd, 5, 17, '密码', that)) return;
+      if (!globalValid(userValid, 3, 5, '验证码', that)) return;
+      this.userLogin();
     },
-    // pwd登陆
-    loginInfo: function () {
+    // 用户登录
+    userLogin: function () {
       const that = this;
-      let url = headapi + '?ctl=ajax&mod=index&act=login';
       let username = this.form.name;
-      let userpwd = this.form.pwd;
-      let uservalid = this.form.valid;
-      let current = new Date();
-      let betweenTime = current - that.overtime;
+      let userPwd = this.form.pwd;
+      let userValid = this.form.valid;
+      let currDate = new Date();
+      let betweenTime = currDate - that.overtime;
       let s = 120;
       if (betweenTime > s * 1000) {
         that.changeValImg();
         that.$message.error('验证码已超时,请重新输入');
         return false
       }
-      let param = {
-        verifyName: username,
-        verifyCode: userpwd,
-        picCode: uservalid,
-        picId: this.form.picId,
-        channel: 2
-      };
-      let postdata = qs.stringify(param);
-      SignIn(postdata).then(res => {
-        if (res.Code == 0) {
-          that.res = res.Rs;
-          localStorage.userName = username;
-          localStorage.token = res.Rs.token;
-          this.getManagerSelfQuery();
+      let paraRequest = new SignInRequest();
+      paraRequest.setCodeid(this.form.picId);
+      paraRequest.setVerifycode(userValid);
+      paraRequest.setName(username);
+      paraRequest.setPassword(userPwd);
+      that.client.signIn(paraRequest, {}, (error, paraReply) => {
+        if (error == null) {
+          localStorage.token = paraReply.getToken();
+          this.checkUserShopList();
         } else {
-          if (res.Code == 10005) {
-            that.$refs.userpwd.value = '';
+          let res = error;
+          if (res.code == 403) {
+            that.form.pwd = '';
             that.$notify({
               title: '警告',
               message: '密码错误,请重新输入',
               type: 'warning'
             });
+          } else if (res.code == 4005) {
+            that.$notify({
+              title: '警告',
+              message: '验证码错误,请重新输入',
+              type: 'warning'
+            });
           } else {
             that.$notify({
               title: '警告',
-              message: res.Memo + ',错误代码:' + res.Code,
+              message: res.message + ',错误代码:' + res.code,
               type: 'warning'
             });
-            that.form.valid = '';
-            that.changeValImg();
           }
+          that.form.valid = '';
+          that.selectShop = false;
+          that.changeValImg();
         }
-      })
+      });
+    },
+    // 用户可选择门店列表
+    checkUserShopList: function () {
+      let that = this;
+
+      let paraRequest = new ShopListRequest();
+      paraRequest.setName("");
+      paraRequest.setStatus(99);//99:全部 9:已删除 1:正常 0:禁止
+      paraRequest.setSid(-1);//上级ID,-1查全部
+
+      console.log(localStorage.token);
+      that.client.manageableShopList(paraRequest, {"Token": localStorage.token}, (err, ShopListReply) => {
+            if (err == null) {
+              console.log(ShopListReply.getListList());
+              let res = ShopListReply.getListList();
+              if (res) {
+                //账号下只有一家店铺
+                if (res.length === 1) {
+                  localStorage.shopId = res[0].getShopuuid();
+                  localStorage.shopName = res[0].getName();
+                  console.log(localStorage.shopId);
+                  if(res[0].getStatus(0) === 1){
+                    that.$router.push({path: '/'});
+                  }else{
+                    that.$message.error( '该商家当前状态异常' + res[0].getStatus());
+                  }
+                }
+                // //账号下有多家店铺
+                if (res.length > 1) {
+                  that.selectShop = true;
+                  let jsonObjList = [];
+                  res.forEach((item, i) => {
+                    console.log(i,item.getShopuuid());
+                    let jsonObj = {shopId: "",name: "", addr: "", contacts: "",status:1};
+                    jsonObj.shopId = item.getShopuuid();
+                    jsonObj.name = item.getName();
+                    jsonObj.addr = item.getAddr();
+                    jsonObj.contacts = item.getContacts();
+                    jsonObj.status = item.getStatus();
+                    jsonObjList.push(jsonObj);
+                  })
+                  that.shopTableData = jsonObjList;
+                }
+              }
+            } else {
+              let res = err;
+              that.$message.error(res.message + ',错误代码:' + res.code);
+              console.log(res);
+            }
+          }
+      )
+    },
+    //提交选中行事件
+    enterShop() {
+      let that = this;
+      console.log(this.currentRow);
+      localStorage.shopId = this.currentRow.shopId;
+      localStorage.shopName = this.currentRow.name;
+      if (this.currentRow.status === 1) {
+        that.$router.push({path: '/'});
+      } else {
+        that.$message.error('该商家当前状态异常\t' + this.currentRow.status);
+      }
+    },
+    getManagerSelfQuery() {
+      let that = this;
+      let getRequest = new GetShopNaviRequest();
+      getRequest.setShopid(0);
+
+      that.client.getShopNavi(getRequest, {}, (err, response) => {
+        let res = response.toObject()
+        console.log(res);
+      });
+
+      // let param = {
+      //   token: localStorage.token,
+      // };
+
+      // let postdata = qs.stringify(param);
+      // console.log(postdata);
+
+      // ManagerSelfQuery(postdata).then(res => {
+      //   let json = res;
+      //   if (json.Code == 0) {
+      //     that.userLevelText = json.Rs.Role.Name;
+      //     // 1 会员 2 系统 3 店铺 4 教练
+      //     that.userLevel = json.Rs.Role.Id;
+      //     localStorage.shopId = json.Rs.ShopId;
+      //     localStorage.ShopId = json.Rs.ShopId;
+      //
+      //     switch (parseInt(that.userLevel)) {
+      //       case 1:
+      //         that.$router.push({path: '/'});
+      //         break;
+      //       case 2:
+      //         that.$router.push({path: '/shopManage'});
+      //         break;
+      //       case 3:
+      //         that.$router.push({path: '/'});
+      //         break;
+      //       case 4:
+      //         that.$router.push({path: '/'});
+      //         break;
+      //
+      //     }
+      //   } else {
+      //     if (json.Code == 1010) {
+      //       that.$message.error(json.Memo + ' 错误码:' + json.Code);
+      //       that.$router.push({path: '/login', query: {status: 1}});
+      //       return false
+      //     }
+      //     that.$message.error(json.Memo + ' 错误码:' + json.Code);
+      //   }
+      // })
     }
   },
 }
@@ -219,8 +322,7 @@ export default {
   overflow: hidden;
   display: block;
   margin: 0 auto;
-  background-color: #F0F2F5;
-  background: url("../../assets/img/login/bg.png") top center no-repeat;
+  background: #F0F2F5 url("../../assets/img/login/bg.png") no-repeat top center;
   background-size: 100% 100%;
 }
 
@@ -293,21 +395,25 @@ export default {
   margin: 0 auto;
   font-size: 18px;
 }
+
 /*ipad only*/
 @media only screen and (max-width: 1366px) {
   #bg {
     background-size: 100%;
     background-color: #F2F2F2;
   }
+
   .box-card {
     width: 500px;
     height: 550px;
     margin-top: 0;
     margin-right: 1%;
   }
+
   .subtitle {
     margin-bottom: 10px;
   }
+
   .el-form-item {
     margin-bottom: 12px;
   }

+ 960 - 878
src/views/Class/Lesson.vue

@@ -1,893 +1,975 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <h5>课目管理</h5>
-        </div>
-        <div class="change">
-            <el-button type="primary" @click="addLesson" v-if="userLevel != 4" size="mini">新增课程</el-button>
-            <el-button @click="lessonStudenChange" v-if="userLevel != 4" size="mini">增删课程会员</el-button>
-            <el-button type="danger" @click="delList" v-if="userLevel != 4" size="mini">删除</el-button>
-            <el-button type="success" @click="query" :disabled="serachBtnStatus" size="mini">刷新</el-button>
-        </div>
-        <div class="table">
-            <el-table
-                    :data="tableData"
-                    border
-                    is-horizontal-resize
-                    :default-sort="{prop: 'date', order: 'descending'}"
-                    element-loading-background="rgba(0, 0, 0, 0.8)"
-                    @selection-change="handleSelectionChange"
-                    @current-change="clickChange"
+  <div class="context">
+    <div class="panel">
+      <h5>科目管理</h5>
+    </div>
+    <div class="change">
+      <el-button type="primary" @click="addLesson" size="mini">新增课程</el-button>
+      <el-button @click="lessonsMemberEdit" size="mini">增删课程会员</el-button>
+      <el-button type="danger" @click="delList" size="mini">删除</el-button>
+      <el-button type="success" @click="query" :disabled="serachBtnStatus" size="mini">刷新</el-button>
+    </div>
+    <div class="table">
+      <el-table
+          :data="tableData"
+          border
+          is-horizontal-resize
+          :default-sort="{prop: 'date', order: 'descending'}"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+          @selection-change="handleSelectionChange"
+          @current-change="clickChange"
+      >
+        <el-table-column label="选择" width="55">
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template scope="scope">
+            <span>{{ (start) + scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="class_name" label="课程名称" width="120"/>
+        <el-table-column prop="is_curr" label="是否跨店" width="110" align="center" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.is_curr!= 1">否</span>
+            <span v-if="scope.row.is_curr == 1">是</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="class_type" label="课程类型" width="110" align="center" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.class_type != 0">占用课时</span>
+            <span v-if="scope.row.class_type == 0">不占课时</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="consume_hour" label="消耗课时" width="110" align="center" sortable>
+        </el-table-column>
+        <el-table-column prop="top_limit" label="建议人数" width="120" align="center" sortable>
+        </el-table-column>
+        <el-table-column prop="wx_visible" label="微信可见" align="center" width="120">
+          <template slot-scope="scope">
+            <el-switch
+                v-model="scope.row.wx_visible"
+                :active-value="1"
+                :inactive-value="0"
+                active-color="#409EFF"
+                inactive-color="#D9D9D9"
+                @change=changeWechat($event,scope.row)
             >
-                >
-                <el-table-column label="选择" width="55">
-                    <template slot-scope="scope">
-                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-                    </template>
-                </el-table-column>
-                <el-table-column label="序号" type="index" width="50" align="center">
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.ClassName"
-                        label="课程名称"
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.ShopId"
-                        label="是否跨店"
-                        width="110"
-                        align="center"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.ClassSelf.ShopId != 0">否</span>
-                        <span v-if="scope.row.ClassSelf.ShopId == 0">是</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.ShopId"
-                        label="课程类型"
-                        width="110"
-                        align="center"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.ClassSelf.ClassType != 0">占用课时</span>
-                        <span v-if="scope.row.ClassSelf.ClassType == 0">不占课时</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.ConsumeHour"
-                        label="消耗课时"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.TopLimit"
-                        label="建议上课人数"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.WxVisible"
-                        label="微信可见"
-                        v-if="userLevel != 4"
-                >
-                    <template slot-scope="scope">
-                        <el-switch
-                                v-model="scope.row.ClassSelf.WxVisible"
-                                :active-value="1"
-                                :inactive-value="0"
-                                active-color="#409EFF"
-                                inactive-color="#D9D9D9"
-                                @change=changeWechat($event,scope.row.ClassSelf)
-                        >
-                        </el-switch>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.ClassColor"
-                        label="课程颜色"
-                        width="110"
-                        v-if="userLevel != 4"
-                >
-                    <template slot-scope="scope">
-                        <el-color-picker :predefine="predefineColors" v-model="scope.row.ClassSelf.ClassColor"
-                                         @change="changeColor(scope.row.ClassSelf.ClassColor,scope.row.ClassSelf)"></el-color-picker>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.Memo"
-                        label="备注">
-                    <template slot-scope="scope">
+            </el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column prop="class_color" label="课程颜色" width="110" align="center">
+          <template slot-scope="scope">
+            <el-color-picker
+                :predefine="predefineColors"
+                v-model="scope.row.class_color"
+                @change="changeColor(scope.row.class_color,scope.row)"></el-color-picker>
+          </template>
+        </el-table-column>
+        <el-table-column prop="memo" label="备注" width="180">
+          <template slot-scope="scope">
+                      <span v-if="scope.row.memo != null">
                         <el-popover
-                                placement="top"
-                                title="标题"
-                                width="200"
-                                trigger="hover"
-                                :content="scope.row.ClassSelf.Memo">
+                            placement="top"
+                            title="标题"
+                            width="200"
+                            trigger="hover"
+                            :content="scope.row.memo">
                             <span slot="reference"
-                                  v-if="scope.row.ClassSelf.Memo.length > 6">{{ scope.row.ClassSelf.Memo.substr(0, 6) }} ....</span>
+                                  v-if="scope.row.memo.length > 6">{{ scope.row.memo.substr(0, 6) }} ....</span>
                         </el-popover>
-                        <span v-if="scope.row.ClassSelf.Memo.length <= 6">{{ scope.row.ClassSelf.Memo }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ClassSelf.ClassId"
-                        label="操作"
-                          width="120px"
-                >
-                    <template slot-scope="scope">
-                        <el-button type="text" @click="editLesson(scope.row.ClassSelf)" v-if="userLevel != 4">编辑
-                        </el-button>
-                        <el-button type="text" @click="Lessonmember(scope.row.Userlist)">课程会员</el-button>
-                    </template>
-                </el-table-column>
-
-            </el-table>
-            <br>
-            <el-pagination
-                    background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
-                    @current-change="pageChange"
-            ></el-pagination>
-        </div>
-
-        <el-dialog :title="dialogTitle" :visible.sync="dialogLesson" :width="form.btnType == 0? '1200px':'650px'">
-            <div>
-                <div class="pull-left">
-                    <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="课程名称" :required="true">
-                            <el-input v-model="form.ClassName"></el-input>
-                        </el-form-item>
-                        <el-form-item label="消耗课时">
-                            <el-input-number v-model="form.ConsumeHour" :min="0" :max="99999"
-                                             label="(天)"></el-input-number>
-                        </el-form-item>
-                        <el-form-item label="建议上课人数">
-                            <el-input-number v-model="form.TopLimit" :min="0" :max="99999"
-                                             label="(天)"></el-input-number>
-                        </el-form-item>
-                        <el-form-item label="微信可见" v-if="form.btnType == 0">
-                            <el-switch
-                                    v-model="form.wxVisible"
-                                    :active-value="1"
-                                    :inactive-value="0"
-                                    active-color="#409EFF"
-                                    inactive-color="#D9D9D9">
-                            </el-switch>
-                        </el-form-item>
-                        <el-form-item label="是否可选课">
-                            <el-switch
-                                    v-model="form.ClassType"
-                                    :active-value="1"
-                                    :inactive-value="0"
-                                    active-color="#409EFF"
-                                    inactive-color="#D9D9D9">
-                            </el-switch>
-                        </el-form-item>
-                        <el-form-item label="是否跨店">
-                            <el-switch
-                                    v-model="form.allUse"
-                                    :active-value="0"
-                                    :inactive-value="1"
-                                    active-color="#409EFF"
-                                    inactive-color="#D9D9D9"
-                            >
-                                <!--:disabled="true"-->
-                            </el-switch>
-                        </el-form-item>
-                        <el-form-item label="课程颜色">
-                            <el-color-picker :predefine="predefineColors" v-model="form.ClassColor"></el-color-picker>
-                        </el-form-item>
-                        <el-form-item label="备注">
-                            <el-input v-model="form.Memo"></el-input>
-                        </el-form-item>
-                    </el-form>
-                </div>
-                <div class="pull-right" v-if="form.btnType == 0">
-                    <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="课程会员">
-                            <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"
-                                         :titles="['全部会员','已选会员']"></el-transfer>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddLesson">确定</el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditLesson">确定
-                </el-button>
-                <el-button size="small" @click="dialogLesson = false">取消</el-button>
-            </div>
-        </el-dialog>
-
-        <el-dialog title="增删课程会员" :visible.sync="dialogVisible" width="650px">
-            <div class="dialogTitle">
-                <span>基础功能</span>
-            </div>
-            <div>
-                <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"
-                             :titles="['会员列表', '已添加会员']"></el-transfer>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" @click="cofirmClassVipuserEdit">确定</el-button>
-                <el-button @click=" dialogVisible = false" size="small">取消</el-button>
-            </div>
-        </el-dialog>
-
-        <el-dialog title="课程会员" :visible.sync="dialogTableVisible" style="overflow-y: scroll">
-            <el-table :data="gridData">
-                <el-table-column property="Name" label="姓名" width="200"></el-table-column>
-                <el-table-column property="Phone" label="手机"></el-table-column>
-                <el-table-column property="VipType" label="会员类型">
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.VipType == 1">年费会员</span>
-                        <span v-if="scope.row.VipType == 2">充值会员</span>
-                    </template>
-                </el-table-column>
-                <el-table-column property="ExpTime" label="有效期" :formatter="filterFmtDate"></el-table-column>
-            </el-table>
-        </el-dialog>
+                        <span v-if="scope.row.memo.length <= 6">{{ scope.row.memo }}</span>
+                        </span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="ClassSelf.ClassId" label="操作" width="220px">
+          <template slot-scope="scope">
+            <el-button type="text" @click="editLesson(scope.row)">编辑课程</el-button>
+            <el-button type="text" @click="viewLessonMember(scope.row)">查看会员</el-button>
+          </template>
+        </el-table-column>
+
+      </el-table>
+      <br>
+      <el-pagination
+          background
+          :total="pageination.total"
+          :page-size="pageination.pageItem"
+          @current-change="pageChange"
+      ></el-pagination>
     </div>
+
+    <el-dialog :title="dialogTitle" :visible.sync="dialogLesson" :width="form.btnType == 0? '450px':'450px'">
+      <div>
+        <div class="pull-left">
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="课程名称" :required="true">
+              <el-input v-model="form.ClassName"></el-input>
+            </el-form-item>
+            <el-form-item label="消耗课时">
+              <el-input-number v-model="form.ConsumeHour" :min="0" :max="99999" label="(天)"></el-input-number>
+            </el-form-item>
+            <el-form-item label="建议上课人数">
+              <el-input-number v-model="form.TopLimit" :min="0" :max="99999" label="(天)"></el-input-number>
+            </el-form-item>
+            <el-form-item label="微信可见" v-if="form.btnType == 0">
+              <el-switch
+                  v-model="form.wxVisible"
+                  :active-value="1"
+                  :inactive-value="0"
+                  active-color="#409EFF"
+                  inactive-color="#D9D9D9">
+              </el-switch>
+            </el-form-item>
+            <el-form-item label="是否可选课">
+              <el-switch
+                  v-model="form.ClassType"
+                  :active-value="1"
+                  :inactive-value="0"
+                  active-color="#409EFF"
+                  inactive-color="#D9D9D9">
+              </el-switch>
+            </el-form-item>
+            <el-form-item label="是否跨店">
+              <el-switch
+                  v-model="form.isCurr"
+                  :active-value="1"
+                  :inactive-value="0"
+                  active-color="#409EFF"
+                  inactive-color="#D9D9D9"
+              >
+                <!--:disabled="true"-->
+              </el-switch>
+            </el-form-item>
+            <el-form-item label="课程颜色">
+              <el-color-picker :predefine="predefineColors" v-model="form.ClassColor"></el-color-picker>
+            </el-form-item>
+            <el-form-item label="备注">
+              <el-input v-model="form.Memo"></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddLesson">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditLesson">确定</el-button>
+        <el-button size="small" @click="dialogLesson = false">取消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="增删课程会员" :visible.sync="dialogVisible" width="650px">
+      <div class="dialogTitle">
+        <span>基础功能</span>
+      </div>
+      <div>
+        <el-transfer filterable v-model="trMemberValue" :data="trMemberData" :titles="['会员列表', '已加会员']"/>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" @click="confirmLessonMemberEdit">确定</el-button>
+        <el-button @click="dialogVisible = false" size="small">取消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="课程会员" :visible.sync="dialogTableVisible" style="overflow-y: scroll">
+      <el-table :data="gridData">
+        <el-table-column property="user_name" label="姓名" width="200"></el-table-column>
+        <el-table-column property="usercode" label="手机"></el-table-column>
+        <el-table-column property="vip_type" label="会员类型">
+          <template slot-scope="scope">
+            <span v-if="scope.row.vip_type == 1">年费会员</span>
+            <span v-if="scope.row.vip_type == 2">充值会员</span>
+          </template>
+        </el-table-column>
+        <el-table-column property="exp_time" label="有效期" :formatter="filterFmtDate"/>
+      </el-table>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import Global from '../../Global.js'
-    import {
-        ClassAdd,
-        ClassEdit,
-        ClassListQuery,
-        ClassColorEdit,
-        ClassStatusEdit,
-        VipUserListQuery,
-        ClassVisibleStatusEdit,
-        ClassVipuserQuery,
-        ClassVipuserEdit,
-        testTable,
-        testSelect
-    } from "../../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                serachBtnStatus: false,
-                dialogLesson: false,//新增课程
-                dialogVisible: false,
-                dialogTableVisible: false,
-                dialogTitle: '',
-                dialogdata: [],
-                gridData: [],
-                dialogValue: [],
-                allTableData: [],
-                start: 0,
-                draw: 1,
-                // panel 配置项目
-                panel: {
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    taskstatus: 99,
-                    tableData: [],
-                    allTableData: [],
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    options: [
-                        {value: 99, label: '全部'},
-                        {value: 1, label: '进行中'},
-                        {value: 2, label: '已完成'},
-                    ],
-                    time1: globalBt(),
-                },
-                form: {
-                    ClassName: "",
-                    ConsumeHour: 0,
-                    TopLimit: 0,
-                    ClassType: 0,
-                    wxVisible: 1,
-                    ClassColor: "#ffffff",
-                    teacherId: "",
-                    classId: "",
-                    allUse: "",
-                    Memo: "",
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 100,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                tableData: [],
-                tableRadio: [],
-                userLevel: localStorage.userLevel,
-                predefineColors: [
-                    '#8ABFF7',
-                    '#73C1BC',
-                    '#ADE5C7',
-                    '#CBECF0',
-                    '#DCEDC8',
-                    '#EBF2DB',
-                    '#C9D1FD',
-                    '#C6ACF4',
-                    '#E2B5FA',
-                    '#E1BEE7',
-                    '#FFA5D9',
-                    '#F89A9A',
-                    '#F2B1AC',
-                    '#F8BBD0',
-                    '#FFCDD2',
-                    '#FCC66C',
-                    '#D6B9A7',
-                    '#D9D9C4',
-                    '#FCECBE',
-                    '#E9E9E9',
-                    '#FFA5FC',
-                    '#B7BEFF',
-                    '#91E5FF',
-                    '#97FFF8',
-                    '#A7FFB8',
-                    '#75FF65',
-                    '#FFFF94',
-                    '#FFE0AC',
-                    '#FFB770',
-                    '#FFCCB5'
-                ]
+import Global from '../../Global.js'
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      serachBtnStatus: false,
+      dialogLesson: false,//新增课程
+      dialogVisible: false,
+      dialogTableVisible: false,
+      dialogTitle: '',
+      gridData: [],
+      trMemberData: [],
+      trMemberValue: [],
+      allTableData: [],
+      start: 0,
+      draw: 1,
+      // panel 配置项目
+      panel: {
+        usercode: '',
+        username: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        taskstatus: 99,
+        tableData: [],
+        allTableData: [],
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        options: [
+          {value: 99, label: '全部'},
+          {value: 1, label: '进行中'},
+          {value: 2, label: '已完成'},
+        ],
+        time1: globalBt(),
+      },
+      form: {
+        ClassName: "",
+        ConsumeHour: 0,
+        TopLimit: 0,
+        ClassType: 0,
+        wxVisible: 1,
+        ClassColor: "#ffffff",
+        teacherId: "",
+        classId: "",
+        isCurr: "",
+        Memo: "",
+      },
+      multipleSelection: [],
+      pageination: {
+        pageItem: 10,//每页的条数
+        pageoptions: pageOptions(),
+        total: 10,
+        pageIndex: 1,
+      },
+      tableData: [],
+      tableRadio: [],
+      predefineColors: [
+        '#8ABFF7',
+        '#73C1BC',
+        '#ADE5C7',
+        '#CBECF0',
+        '#DCEDC8',
+        '#EBF2DB',
+        '#C9D1FD',
+        '#C6ACF4',
+        '#E2B5FA',
+        '#E1BEE7',
+        '#FFA5D9',
+        '#F89A9A',
+        '#F2B1AC',
+        '#F8BBD0',
+        '#FFCDD2',
+        '#FCC66C',
+        '#D6B9A7',
+        '#D9D9C4',
+        '#FCECBE',
+        '#E9E9E9',
+        '#FFA5FC',
+        '#B7BEFF',
+        '#91E5FF',
+        '#97FFF8',
+        '#A7FFB8',
+        '#75FF65',
+        '#FFFF94',
+        '#FFE0AC',
+        '#FFB770',
+        '#FFCCB5'
+      ]
+    }
+  },
+  mounted() {
+    this.panelSelect();
+    this.getTableQuery();
+  },
+  methods: {
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    // 新增课程
+    addLesson() {
+      this.form.btnType = 0; //新增
+      // clear
+      this.form.ClassName = '';
+      this.form.ConsumeHour = 0;
+      this.form.TopLimit = 0;
+      this.form.wxVisible = 1;
+      this.form.ClassColor = "#ffffff";
+      this.form.Memo = "";
+      this.dialogLesson = true;
+      this.dialogTitle = '新增课程'
+      this.panelSelect();
+    },
+    // 确认添加课程
+    confirmAddLesson() {
+      let that = this;
+      if (!that.form.ClassName) {
+        this.$message.error('错了哦,课程名称不能为空');
+        return false
+      }
+      if (that.form.ClassName.length > 8) {
+        this.$message.error('错了哦,课程名称字数超过8个字');
+        return false
+      }
+      if (that.form.Memo) {
+        if (that.form.Memo.length > 200) {
+          this.$message.error('错了哦,备注字数超过200个字');
+          return false
+        }
+      }
+
+      const jsonStr = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        className: that.form.ClassName,
+        isCurr: that.form.isCurr,
+        consumeHour: that.form.ConsumeHour,
+        topLimit: that.form.TopLimit,
+        classType: that.form.ClassType,
+        wxVisible: that.form.wxVisible,
+        classColor: that.form.ClassColor,
+        memo: that.form.Memo,
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classAdd(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            // 关闭弹窗
+            that.dialogLesson = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '添加课程成功!',
+              type: 'success'
+            });
+            this.getTableQuery()
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 编辑
+    editLesson(row) {
+      let that = this;
+      this.clearForm();
+      this.form.btnType = 1; //编辑
+      this.form.ClassName = row.class_name;
+      this.form.ConsumeHour = row.consume_hour;
+      this.form.TopLimit = row.top_limit;
+      this.form.wxVisible = row.wx_visible;
+      this.form.ClassColor = row.class_color;
+      this.form.classId = row.class_id;
+      this.form.ClassType = row.class_type;
+      this.form.ShopId = row.shop_id;
+      this.form.isCurr = row.is_curr;
+      this.form.Memo = row.memo;
+      this.dialogLesson = true;
+      this.dialogTitle = '编辑课程'
+    },
+    //确认编辑课程
+    confirmEditLesson() {
+      let that = this;
+      // checkNum
+      if (!that.form.ClassName) {
+        this.$message.error('错了哦,课程名称不能为空');
+        return false
+      }
+      if (that.form.ClassName.length > 8) {
+        this.$message.error('错了哦,课程名称字数超过8个字');
+        return false
+      }
+      if (that.form.Memo) {
+        if (that.form.Memo.length > 200) {
+          this.$message.error('错了哦,备注字数超过200个字');
+          return false
+        }
+      }
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classId: that.form.classId,
+        isCurr: that.form.isCurr,
+        className: that.form.ClassName,
+        consumeHour: that.form.ConsumeHour,
+        topLimit: that.form.TopLimit,
+        classType: that.form.ClassType,
+        wxVisble: that.form.wxVisible,
+        classColor: that.form.ClassColor,
+        memo: that.form.Memo,
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            // 关闭弹窗
+            that.dialogLesson = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '课程编辑成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 删除
+    delList() {
+      let that = this;
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = that.tableRadio;
+
+      const jsonStr = {
+        classId: row.class_id,
+        status: 9//状态9是删除
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      this.$confirm('此操作将永久删除该课程, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        that.client.classStatusEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: '选中的课程已删除!',
+                type: 'success'
+              });
+              // 重载列表
+              that.getTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    // 修改微信可见状态
+    changeWechat(e, row) {
+      let that = this;
+      const jsonStr = {
+        classId: row.class_id,
+        wxVisible: e
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classWxVisibleEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          let text = parseInt(e) == 1 ? '可见' : '不可见';
+          if (res.code === 0) {
+            that.$message({
+              showClose: true,
+              message: '当前用户微信已' + text,
+              type: 'success'
+            });
+            // 重载列表
+            that.getTableQuery();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      })
+    },
+    // 改色
+    changeColor(c, row) {
+      let that = this;
+      const jsonStr = {
+        classId: row.class_id,
+        classColor: c,//
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classColorEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.$message({
+              showClose: true,
+              message: '课程颜色已编辑',
+              type: 'success'
+            });
+            // 重载列表
+            that.getTableQuery();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      })
+    },
+    // 增删会员课程
+    lessonsMemberEdit() {
+      let that = this;
+      let row = this.tableRadio;
+
+      if (row.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      this.panelSelect();
+
+      this.dialogVisible = true
+      this.form.classId = row.class_id;
+      that.trMemberValue = [];
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classId: row.class_id,//-99代表查询全部
+        isAcross: -99//0:不跨店 1跨店  -99是全部
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.vipUserSimpleQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            if (res.rs) {
+              let userArray = [];
+              res.rs.map(function (item) {
+                userArray.push(item.uu_user_id)
+              });
+              that.trMemberValue = userArray;
+            } else {
+              return false;
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 确认课程会员增删
+    confirmLessonMemberEdit() {
+      let that = this;
+      let userlist = that.trMemberValue.toString();
+
+      const jsonStr = {
+        classId: this.form.classId,
+        UuUserIdList: userlist,
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classVipEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.$message({
+              showClose: true,
+              message: '修改成功!',
+              type: 'success'
+            });
+            that.dialogVisible = false;
+            that.getTableQuery();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    clearForm() {
+      // clear
+      this.form.ClassName = '';
+      this.form.ConsumeHour = 0;
+      this.form.TopLimit = 0;
+      this.form.wxVisible = 1;
+      this.form.ClassColor = '';
+      this.form.Memo = '';
+    },
+
+    //查看会员
+    viewLessonMember(row) {
+      let that = this;
+
+      that.gridData = [];
+      that.dialogTableVisible = true;
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classId: row.class_id,
+        isAcross: -99//0:不跨店 1跨店  -99是全部
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.vipUserSimpleQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            if (res.rs) {
+              this.gridData = res.rs
+            } else {
+              return false;
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      this.getTableQuery();
+      that.serachBtnStatus = true;
+      let totalTime = 2
+      let clock = window.setInterval(() => {
+        totalTime--
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
+        }
+      }, 1000)
+      this.$message.success('查询完毕');
+    },
+    // 加载选项
+    panelSelect() {
+      let that = this;
+      that.trMemberData = [];
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classId: -99,//代表查询全部
+        isAcross: -99//0:不跨店 1跨店  -99是全部
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.vipUserSimpleQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err === null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            if (res.rs) {
+              that.trMemberData = turnResToOption(res.rs)
+            } else {
+              return false;
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classType: 1,//0:选课时不显示(显示午休/午餐的类似的课程) 1:选课显示
+        start: that.start,
+        tableMax: that.pageination.pageItem
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            if (res.rs) {
+              that.allTableData = res.rs;
+              that.recordsTotal = res.pagecount * that.pageination.pageItem;
+            } else {
+              that.allTableData = [];
+              that.recordsTotal = 0;
             }
-        },
-        mounted() {
-            this.panelSelect();
-            this.getTableQuery();
-        },
-        methods: {
-            clickChange(item) {
-                this.tableRadio = item
-            },
-
-            // 课程会员增删
-            cofirmClassVipuserEdit() {
-                let that = this;
-                let userlist = that.dialogValue.toString();
-                let param = {
-                    token: localStorage.token,
-                    classId: this.form.classId,
-                    userlist: userlist,
-                };
-                let postdata = qs.stringify(param);
-                ClassVipuserEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '接口修改成功!',
-                            type: 'success'
-                        });
-                        that.dialogVisible = false;
-                        that.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认添加课程
-            confirmAddLesson() {
-                let that = this;
-
-                // checkNum
-                if (!that.form.ClassName) {
-                    this.$message.error('错了哦,课程名称不能为空');
-                    return false
-                }
-                if (that.form.ClassName.length > 8) {
-                    this.$message.error('错了哦,课程名称字数超过8个字');
-                    return false
-                }
-                if (that.form.Memo) {
-                    if (that.form.Memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-                // 通用是0,非通用是shopid
-                let shopId = that.form.allUse == 0 ? 0 : localStorage.ShopId;
-                let userlist = that.form.dialogValue.toString();
-                let param = {
-                    token: localStorage.token,
-                    shopId: shopId,
-                    className: that.form.ClassName,
-                    consumeHour: that.form.ConsumeHour,
-                    topLimit: that.form.TopLimit,
-                    classType: that.form.ClassType,
-                    wxVisible: that.form.wxVisible,
-                    classColor: that.form.ClassColor,
-                    userlist: userlist,
-                    teacherId: 0,//预留
-                    memo: that.form.Memo,
-                };
-                let postdata = qs.stringify(param);
-                ClassAdd(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogLesson = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '添加课程成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            confirmEditLesson() {
-                let that = this;
-                // checkNum
-                if (!that.form.ClassName) {
-                    this.$message.error('错了哦,课程名称不能为空');
-                    return false
-                }
-                if (that.form.ClassName.length > 8) {
-                    this.$message.error('错了哦,课程名称字数超过8个字');
-                    return false
-                }
-                if (that.form.Memo) {
-                    if (that.form.Memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-
-                let teacherId = that.form.dialogValue ? that.form.dialogValue.toString() : '';
-                // 通用是0,非通用是shopid
-                let shopId = that.form.allUse == 0 ? 0 : localStorage.ShopId;
-                let param = {
-                    token: localStorage.token,
-                    shopId: shopId,
-                    classId: that.form.classId,
-                    className: that.form.ClassName,
-                    consumeHour: that.form.ConsumeHour,
-                    topLimit: that.form.TopLimit,
-                    classType: that.form.ClassType,
-                    wxVisible: that.form.wxVisible,
-                    classColor: that.form.ClassColor,
-                    teacherId: teacherId,
-                    memo: that.form.Memo,
-                };
-                let postdata = qs.stringify(param);
-                ClassEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogLesson = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员课程调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 新增课程
-            addLesson() {
-                this.form.btnType = 0; //新增
-                // clear
-                this.form.ClassName = '';
-                this.form.ConsumeHour = 0;
-                this.form.TopLimit = 0;
-                this.form.wxVisible = 1;
-                this.form.ClassColor = "#ffffff";
-                this.form.Memo = "";
-                this.form.dialogValue = [];
-                this.dialogLesson = true;
-                this.dialogTitle = '新增课程'
-                this.panelSelect();
-            },
-            // 改色
-            changeColor(c, row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    classId: row.ClassId,//
-                    classColor: c,//
-                };
-                let postdata = qs.stringify(param);
-                ClassColorEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '课程颜色已编辑',
-                            type: 'success'
-                        });
-                        // 重载列表
-                        that.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 删除
-            delList() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = that.tableRadio;
-                let param = {
-                    token: localStorage.token,
-                    classId: row.ClassSelf.ClassId,
-                    status: 9,//0禁用1启用9删除
-                };
-                let postdata = qs.stringify(param);
-
-                this.$confirm('此操作将永久删除该课程, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    ClassStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的课程已删除!',
-                                type: 'success'
-                            });
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            // 加载选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    vipType: '',
-                    start: 1,
-                    expDay: '',
-                    tableMax: 9999,
-                };
-                let postdata = qs.stringify(param);
-                VipUserListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        if (json.Rs == null) return false;
-                        // that.dialogdata = json.Rs;
-                        that.form.dialogdata = turnResToOption(json.Rs)
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 微信可见与否
-            changeWechat(e, row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    classId: row.ClassId,//
-                    wxVisible: e,//
-                };
-                let postdata = qs.stringify(param);
-                ClassVisibleStatusEdit(postdata).then(res => {
-                    let json = res;
-                    let text = parseInt(e) == 1 ? '可见' : '不可见';
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '当前用户微信已' + text,
-                            type: 'success'
-                        });
-                        // 重载列表
-                        that.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 增删会员课程
-            lessonStudenChange() {
-                this.panelSelect();
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                let userArrary = [];
-                row.Userlist.map(function (item) {
-                    userArrary.push(item.Id)
-                });
-                this.form.classId = row.ClassSelf.ClassId;
-                this.dialogValue = userArrary;
-                this.dialogVisible = true
-                // 读取左侧会员列表
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            clearForm() {
-                // clear
-                this.form.ClassName = '';
-                this.form.ConsumeHour = 0;
-                this.form.TopLimit = 0;
-                this.form.wxVisible = 1;
-                this.form.ClassColor = '';
-                this.form.Memo = '';
-            },
-            // 编辑
-            editLesson(row) {
-                let that = this;
-                this.clearForm();
-                this.form.btnType = 1; //编辑
-                this.form.ClassName = row.ClassName;
-                this.form.ConsumeHour = row.ConsumeHour;
-                this.form.TopLimit = row.TopLimit;
-                this.form.wxVisible = row.WxVisible;
-                this.form.ClassColor = row.ClassColor;
-                this.form.Memo = row.Memo;
-                this.form.dialogValue = row.teacherId;
-                this.form.classId = row.ClassId;
-                this.form.ClassType = row.ClassType;
-                this.form.ShopId = row.ShopId;
-                this.form.allUse = row.ShopId;
-                this.dialogLesson = true;
-                // 读取已选的会员
-                console.log(row);
-                this.form.dialogValue = [];
-
-                this.dialogTitle = '编辑课程'
-            },
-            Lessonmember(Userlist) {
-                this.dialogTableVisible = true;
-                this.gridData = Userlist;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                this.getTableQuery();
-                that.serachBtnStatus = true;
-                let totalTime = 2
-                let clock = window.setInterval(() => {
-                    totalTime--
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000)
-                this.$message.success('查询完毕');
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    supregionid: 0,//
-                    regionid: this.panel.regionid,//
-                    comid: 1,//
-                    tagname: that.panel.tagname,//标签名
-                    start: 1,//
-                    tableMax: 9999,//
-                };
-                let postdata = qs.stringify(param);
-                ClassListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.Rs.length;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
             // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-
-                that.start = index * that.draw;
-                // that.getTableQuery();
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                if (column == "0001-01-01T08:05:43+08:05") {
-                    return '无有效期';
-                } else {
-                    return nonTfmtDate(column, 11);
-                }
-            },
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'Lesson') {
-                    this.panelSelect();
-                    this.getTableQuery();
-                }
-            },
-        },
-    }
+            that.setPaginations();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (let i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+
+      that.start = index * that.draw;
+      that.getTableQuery();
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
+        return '无有效期';
+      } else {
+        return nonTfmtDatetoLength(column, 10);
+      }
+    },
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'Lesson') {
+        this.panelSelect();
+        this.getTableQuery();
+      }
+    },
+  },
+}
 </script>
 
 <style scoped>
-    @import "../../assets/css/panel.css";
-
-    .context {
-        /* height: 770px; */
-        overflow-y: scroll;
-
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-    }
-
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
-
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-
-    .change button {
-        float: left;
-    }
-
-    .change button.pull-right {
-        float: right;
-    }
-
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
-
-    .dialogTitle span {
-        width: 169px;
-        height: 40px;
-        line-height: 40px;
-        text-align: center;
-        color: #fff;
-        background: #3799FF;
-        border-radius: 250px;
-        font-size: 18px;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-bottom: 30px;
-    }
-
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
-
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
-
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
-
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
-
-    .pull-left {
-        width: 30%;
-        float: left;
-    }
-
-    .pull-right {
-        width: 70%;
-        float: right;
-    }
-
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 15px;
-    }
-
-    /deep/ .el-dialog .el-input__inner {
-        min-width: 180px;
-    }
-
-    /*隐藏调色盘*/
-    .el-color-dropdown__main-wrapper {
-        display: none !important;
-    }
-
-    /deep/ .el-color-dropdown__main-wrapper {
-        display: none !important;
-    }
+@import "../../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle span {
+  width: 169px;
+  height: 40px;
+  line-height: 40px;
+  text-align: center;
+  color: #fff;
+  background: #3799FF;
+  border-radius: 250px;
+  font-size: 18px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-bottom: 30px;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799FF;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  margin-top: 50px;
+}
+
+.pull-left {
+  width: 30%;
+  float: left;
+}
+
+.pull-right {
+  width: 70%;
+  float: right;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 15px;
+}
+
+/deep/ .el-dialog .el-input__inner {
+  min-width: 180px;
+}
+
+/*隐藏调色盘*/
+.el-color-dropdown__main-wrapper {
+  display: none !important;
+}
+
+/deep/ .el-color-dropdown__main-wrapper {
+  display: none !important;
+}
 </style>

+ 0 - 592
src/views/Class/LessonTable.vue

@@ -1,592 +0,0 @@
-<template>
-    <div class="context">
-        <div class="panel">
-            <h5>课程表模板</h5>
-        </div>
-        <div class="change">
-            <el-button type="primary" @click="addLessonTable" size="mini">新增课程表模板</el-button>
-            <el-button type="" @click="copyDialog" size="mini">复制</el-button>
-            <el-button type="danger" @click="delList" size="mini">删除</el-button>
-        </div>
-        <div class="table">
-            <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
-                element-loading-background="rgba(0, 0, 0, 0.8)" class="" @selection-change="handleSelectionChange"
-                @current-change="clickChange">
-                >
-                <el-table-column label="选择" width="55">
-                    <template slot-scope="scope">
-                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-                    </template>
-                </el-table-column>
-                <el-table-column label="序号" type="index" width="50" align="center">
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="PlanName" label="课程表模板名称">
-                    <template slot-scope="scope">
-                        <span class="link" @click="goEdit(scope.row)">
-                            {{scope.row.PlanName}}
-                        </span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="CreateColumn.CreatedAt" label="最后编辑时间" :formatter="filterFmtDate" sortable>
-                </el-table-column>
-                <el-table-column prop="ShopId" label="是否跨店" sortable>
-                    <template slot-scope="scope">
-                        <el-switch v-model="scope.row.allUse" :active-value="0" :inactive-value="switchTurn"
-                            active-color="#409EFF" inactive-color="#D9D9D9" @change=changeShopId($event,scope.row)>
-                        </el-switch>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="Status" label="状态" width="110" align="center" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.Status == 2">已发布</span>
-                        <span v-if="scope.row.Status == 1">未发布</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="Status" label="操作" width=220px>
-                    <template slot-scope="scope">
-                        <el-button type="text" @click="goEdit(scope.row)">编辑</el-button>
-                        <el-button type="text" @click="seeWeek(scope.row)">预览本周</el-button>
-                        <el-button type="success" size="mini" @click="openLessonTable(scope.row)">发布
-                        </el-button>
-                    </template>
-                </el-table-column>
-
-            </el-table>
-            <br>
-            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
-                @current-change="pageChange"></el-pagination>
-        </div>
-
-        <el-dialog title="课程表模板复制" :visible.sync="dialogCopyVisible" width="640px">
-            <el-form ref="form" :model="copyForm" label-width="160px">
-                <el-form-item label="新模板名称">
-                    <el-input v-model="copyForm.name" placeholder="请输入新模板名称"></el-input>
-
-                </el-form-item>
-            </el-form>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" @click="copy">确定</el-button>
-                <el-button @click="dialogCopyVisible = false" size="small">取消</el-button>
-            </div>
-        </el-dialog>
-
-        <el-dialog title="发布课程表" :visible.sync="dialogVisible" width="640px">
-            <div class="dialogTitle">
-                <span>{{form.name}}</span>
-            </div>
-            <div>
-                <span class="demonstration">选择发布日期(按周选取)</span>
-                <br>
-                <br>
-                <el-date-picker v-model="form.week" type="week" :picker-options="{'firstDayOfWeek': 1}"
-                    format="yyyy 第 WW 周" placeholder="选择周">
-                </el-date-picker>
-                <br>
-                <br>
-                <span>
-                    微信可预约
-                </span>
-                <el-switch v-model="form.appoint" :active-value="1" :inactive-value="0" active-color="#409EFF"
-                    inactive-color="#D9D9D9">
-                </el-switch>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" @click="public">确定</el-button>
-                <el-button @click="dialogVisible = false" size="small">取消</el-button>
-            </div>
-        </el-dialog>
-        <el-dialog title="" :visible.sync="previewShow" width="1200px">
-            <preview :preview-date="previewDate" :big-title="BigTitle" :small-title="smallTitle"></preview>
-            <div class="dialogFooter">
-                <el-button @click="previewShow = false" size="small">关闭</el-button>
-            </div>
-        </el-dialog>
-
-    </div>
-</template>
-
-<script>
-    import Global from '../../Global.js'
-    import preview from '@/components/preview.vue'
-    import {
-        SttPlanBasicListQuery,
-        ClassVisibleStatusEdit,
-        SttPlanBasicShopEdit,
-        SttPlanBasicStatusEdit,
-        SttPlanCopy,
-        SttPlanPublish,
-        SttPlanPreview,
-        testTable,
-        testSelect,
-    } from "../../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                previewShow: false,
-                switchTurn: localStorage.shopId,
-                previewDate: {},
-                BigTitle: '',
-                smallTitle: '',
-                dialogVisible: false,
-                dialogCopyVisible: false,
-                previewVisible: false,//todo
-                dialogdata: [],
-                dialogValue: [],
-                start: 0,
-                draw: 1,
-                // panel 配置项目
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    Id: '',
-                    name: '',
-                    week: '',
-                    wechat: 1,
-                    appoint: 1,
-                },
-                copyForm: {
-                    Id: '',
-                    name: '',
-                },
-                tableData: [],
-                tableRadio: [],
-            }
-        },
-        mounted() {
-            this.getTableQuery();
-        },
-        methods: {
-            clickChange(item) {
-                this.tableRadio = item
-            },
-            seeWeek(row) {
-                let that = this;
-
-                let param = {
-                    token: localStorage.token,
-                    planId: row.PlanId,
-                };
-                let postdata = qs.stringify(param);
-                SttPlanPreview(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.BigTitle = row.PlanName;
-                        that.smallTitle = ' ';
-                        that.previewDate = json.Rs;
-                        // 前台排序
-                        that.previewDate.SttPlanPreviewClassList.sort((a, b) => a.ClassIndex - b.ClassIndex);//升序
-                        that.previewShow = true;
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 跨店修改
-            changeShopId(e, row) {
-                let that = this;
-                let shopId = 0;
-                if (e != 0) {
-                    shopId = localStorage.shopId;
-                    row.allUse = localStorage.shopId;
-                } else {
-                    shopId = 0;
-                    row.allUse = 0
-                }
-
-                let param = {
-                    token: localStorage.token,
-                    planId: row.PlanId,//
-                    shopId: shopId,//跨店课程,跨店 >0: 本店特有课程,不跨店
-                };
-                let postdata = qs.stringify(param);
-                SttPlanBasicShopEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '当前课程表模板已' + json.Memo,
-                            type: 'success'
-                        });
-                        // 重载列表
-                        // that.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            addLessonTable() {
-                this.$router.push({
-                    path: '/editLessonTable', query: {
-                        id: 0,
-                    }
-                });
-            },
-            // 删除
-            delList() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = that.tableRadio;
-
-                let param = {
-                    token: localStorage.token,
-                    planId: row.PlanId,
-                    status: 9,//9删除
-                };
-                let postdata = qs.stringify(param);
-
-                this.$confirm('此操作将永久删除该课程表模板, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    SttPlanBasicStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的课程表模板已删除!',
-                                type: 'success'
-                            });
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            copyDialog() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = that.tableRadio;
-                this.copyForm.name = '';
-                this.copyForm.Id = row.PlanId;
-                this.dialogCopyVisible = true;
-            },
-            copy() {
-                let that = this;
-                // checkNum
-                if (!that.copyForm.name) {
-                    this.$message.error('错了哦,新模版名不能为空');
-                    return false
-                }
-                if (that.copyForm.name.length > 20) {
-                    this.$message.error('错了哦,新模版名字的字数超过20个字');
-                    return false
-                }
-
-                let param = {
-                    token: localStorage.token,
-                    planId: that.copyForm.Id,
-                    planName: that.copyForm.name,
-                };
-                let postdata = qs.stringify(param);
-
-                // this.$confirm('此操作将复制相同内容的课程表, 是否继续?', '提示', {
-                //     confirmButtonText: '确定',
-                //     cancelButtonText: '取消',
-                //     type: 'warning'
-                // }).then(() => {
-                SttPlanCopy(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '选中的课程表已复制!',
-                            type: 'success'
-                        });
-                        // 关闭弹窗
-                        that.dialogCopyVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                });
-                // }).catch(() => {
-                //     this.$message({
-                //         type: 'info',
-                //         message: '已取消复制'
-                //     });
-                // });
-            },
-            // 发布课程表
-            openLessonTable(row) {
-                this.dialogVisible = true;
-                this.form.name = row.PlanName;
-                this.form.Id = row.PlanId;
-                this.form.week = '';
-            },
-            // 发布
-            public() {
-                let that = this;
-                if (!this.form.week) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,发布周期不能空',
-                        type: 'error'
-                    });
-                    return false
-                }
-
-                let param = {
-                    token: localStorage.token,
-                    planId: this.form.Id,
-                    incomingDate: nonTfmtDatetoLength(this.form.week, 10),//对应日期 字符串 年-月-日 格式
-                    wxOrder: this.form.appoint,
-                };
-                let postdata = qs.stringify(param);
-                SttPlanPublish(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: this.form.name + '已发布!',
-                            type: 'success'
-                        });
-                        // 重载列表
-                        that.getTableQuery();
-                        this.dialogVisible = false;
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                });
-            },
-            // 取消发布
-            unpubilc(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    detectorid: row.Id,
-                    status: 4,//0禁用1启用9删除
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '选中的课程表模板已取消发布!',
-                            type: 'success'
-                        });
-                        // 重载列表
-                        that.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                });
-            },
-            // 编辑课程表模板
-            goEdit(row) {
-                this.$router.push({
-                    path: '/editLessonTable', query: {
-                        id: row.PlanId,
-                        name: row.PlanName
-                    }
-                });
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                SttPlanBasicListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            json.Rs.map(function (item) {
-                                item.allUse = item.ShopId > 0 ? 1 : 0
-                            })
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.Rs.length;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                // that.getTableQuery();
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return nonTfmtDate(column, 11);
-            },
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'lessonTable') {
-                    this.getTableQuery()
-                }
-            },
-        },
-        components: {
-            preview
-        }
-    }
-</script>
-
-<style scoped>
-    @import "../../assets/css/panel.css";
-
-    .context {
-        /* height: 770px; */
-
-        overflow-y: scroll;
-
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-    }
-
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
-
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-
-    .change button {
-        float: left;
-    }
-
-    .change button.pull-right {
-        float: right;
-    }
-
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
-
-    .dialogTitle span {
-        width: 169px;
-        height: 40px;
-        line-height: 40px;
-        text-align: center;
-        color: #fff;
-        background: #3799FF;
-        border-radius: 250px;
-        font-size: 14px;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-bottom: 30px;
-    }
-
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
-
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
-
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
-
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
-
-    .link {
-        color: #03B1FF;
-        text-decoration: underline;
-        cursor: pointer;
-    }
-
-    em {
-        font-style: normal;
-    }
-</style>

+ 5 - 4
src/views/Class/grpcDemo.vue

@@ -7,13 +7,13 @@
 </template>
 
 <script>
-import {SignInPasswordRequest} from "@/grpc/im_pb";
+import {SignInPasswordRequest} from "@/grpc/base_pb";
 
 export default {
   data() {
     return {
       eqSn: '30:9C:23:0C:8B:1E',
-      TodayCalcValues: '112233',
+      TodayCalcValues: '11332233',
     }
   },
   mounted() {
@@ -24,9 +24,10 @@ export default {
       let that = this;
       let getRequest = new SignInPasswordRequest();
       getRequest.setPassword("asdf*123");
-      getRequest.setAuth("admin");
       getRequest.setExpirationsec(10000);
-      that.client.signInUserCode(getRequest, {}, (err, response) => {
+      console.log("getRequest:" + getRequest);
+      that.client.genPhoneVerifyCode(getRequest, {}, (err, response) => {
+        console.log(err)
         that.TodayCalcValues = response.getToken();
       });
     },

+ 14 - 14
src/views/Index/Main.vue

@@ -236,21 +236,21 @@ export default {
   mounted() {
     let that = this;
     // 下课管理
-    this.getVipUserStatistics();
-    this.getClassStatistics();
-    this.ClassQuery();
-    this.getClassHourStatistics();
-    this.getVipUserOrderQuery();
+    // this.getVipUserStatistics();
+    // this.getClassStatistics();
+    // this.ClassQuery();
+    // this.getClassHourStatistics();
+    // this.getVipUserOrderQuery();
     // 预约统计
-    this.getOrderStatistics();
-    this.getWaitingBeginClassList();
+    // this.getOrderStatistics();
+    // this.getWaitingBeginClassList();
     this.timer = setInterval(() => {
-      that.getVipUserOrderQuery();
-      this.getVipUserStatistics();
-      this.getClassStatistics();
-      this.ClassQuery();
-      this.getOrderStatistics();
-      this.getWaitingBeginClassList();
+      // that.getVipUserOrderQuery();
+      // this.getVipUserStatistics();
+      // this.getClassStatistics();
+      // this.ClassQuery();
+      // this.getOrderStatistics();
+      // this.getWaitingBeginClassList();
     }, 10000);
   },
   watch: {
@@ -447,7 +447,7 @@ export default {
       let param = {
         token: localStorage.token,
         classId: 0,
-        orderDate: globalcurrent(),
+        orderDate: getDate(0,0),
         stdId: 0,
       };
       let postdata = qs.stringify(param);

+ 0 - 0
src/views/SchoolTimeTable/EditLessonManage.vue → src/views/SchoolTimeTable/LessonManage.vue


+ 1 - 1
src/views/Shop/online.vue

@@ -263,7 +263,7 @@ export default {
         },
         // 计算团队竞技课持续时间
         ClacClassTime() {
-            let BeginTime = new Date(globalcurrent() + ' ' + this.BeginTime);//结束时间
+            let BeginTime = new Date(getDate(0,0) + ' ' + this.BeginTime);//结束时间
             let nowDate = new Date();
             let date = new Date(nowDate - BeginTime - 8 * 60 * 60 * 1000);//减掉东八区时区问题
 

+ 0 - 780
src/views/SttPlan/EditLessonTable.vue

@@ -1,780 +0,0 @@
-<template>
-    <div class="context">
-        <div class="panel">
-            <h5>{{ pageTitle }}</h5>
-        </div>
-        <div class="panel-body">
-            <div class="panel_control">
-                <el-row :gutter="20">
-                    <el-col :span="9">
-                        <em> <span style="color: red">*</span>课程表模板名称:</em>
-                        <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
-                    </el-col>
-                    <!--                    默认不通用-->
-                    <!--        todo-->
-                    <!--        <el-button class="seeTemp" @click.native="seeWeekTemp">预览模板</el-button>-->
-                    <el-button type="default" class="seeTemp" @click="$router.push('/lessonTable')">返回课程表模板</el-button>
-                </el-row>
-            </div>
-        </div>
-        <br>
-        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-            <el-tab-pane label="星期一" name="1"></el-tab-pane>
-            <el-tab-pane label="星期二" name="2"></el-tab-pane>
-            <el-tab-pane label="星期三" name="3"></el-tab-pane>
-            <el-tab-pane label="星期四" name="4"></el-tab-pane>
-            <el-tab-pane label="星期五" name="5"></el-tab-pane>
-            <el-tab-pane label="星期六" name="6"></el-tab-pane>
-            <el-tab-pane label="星期天" name="7"></el-tab-pane>
-        </el-tabs>
-
-        <div class="table">
-            <el-table
-                    v-for="tab in tabs"
-                    :data="tab.tableData"
-                    v-if="tab.days == activeName"
-                    border
-                    is-horizontal-resize
-                    :default-sort="{prop: 'date', order: 'descending'}"
-                    element-loading-background="rgba(0, 0, 0, 0.8)"
-                    class=""
-                    @selection-change="handleSelectionChange"
-            >
-                >
-                <el-table-column
-                        prop="timeScope"
-                        label="时间1"
-                        width="260px"
-                        align="center"
-                >
-                    <template slot-scope="scope">
-                        <el-time-picker
-                                is-range
-                                v-model="scope.row.timeLong"
-                                range-separator="至"
-                                start-placeholder="开始时间"
-                                end-placeholder="结束时间"
-                                placeholder="选择时间范围"
-                        >
-                        </el-time-picker>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ClassId"
-                        label="课程"
-                        align="center"
-                >
-                    <template slot-scope="scope">
-                        <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)">
-                            <el-option
-                                    v-for="item in panel.options"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value">
-                            </el-option>
-                        </el-select>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="TopLimit"
-                        label="预约名额"
-                        align="center"
-                >
-                    <template slot-scope="scope">
-                        <el-input-number v-model="scope.row.TopLimit" :min="1" :max="9999" label=""></el-input-number>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ConsumeHour"
-                        label="消耗课时"
-                        align="center"
-                >
-                    <template slot-scope="scope">
-                        <el-input-number v-model="scope.row.ConsumeHour" :min="0" :max="9999"
-                                         label=""></el-input-number>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="操作"
-                        width="100px"
-                        align="center"
-                >
-                    <template slot-scope="scope">
-                        <el-button type="text" class="red" @click="delRow(scope)">删除</el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <div class="rowBottom">
-                <el-button type="default" @click="$router.push('/lessonTable')">返回课程表模板</el-button>
-
-                <!--                ID为0是新建,不为0是修改-->
-                <el-button type="primary" class="pull-right" @click="confirmLessonTable"
-                           v-if="this.$route.query.id == 0" :disabled="serachBtnStatus">提交
-                </el-button>
-                <el-button type="primary" class="pull-right" @click="confirmEditLessonTable"
-                           v-if="this.$route.query.id != 0" :disabled="serachBtnStatus">提交
-                </el-button>
-                <el-button type="primary" class="pull-right" @click="addRow">新增课程</el-button>
-            </div>
-            <div>
-                <br>
-                <em class="red wrning">
-                    *所有操作提交后生效
-                </em>
-            </div>
-        </div>
-        <br>
-
-
-        <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
-            <div class="dialogTitle">
-                <span>基础功能</span>
-            </div>
-            <div>
-                <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small">确定</el-button>
-                <el-button @click="dialogVisible = false" size="small">取消</el-button>
-            </div>
-        </el-dialog>
-
-        <el-dialog title="预览" :visible.sync="previewShow" width="1200px">
-            <preview :preview-date="previewDate" :big-title="BigTitle" :small-title="smallTitle"></preview>
-            <div class="dialogFooter">
-                <el-button @click="previewShow = false" size="small">关闭</el-button>
-            </div>
-        </el-dialog>
-    </div>
-</template>
-
-<script>
-    import Global from '../../Global.js'
-    import preview from '@/components/preview.vue'
-
-    import {
-        SttPlanBasicAdd,
-        SttPlanDetailListQuery,
-        SttPlanDetailBatchSave,
-        SttPlanBasicEdit,
-        ClassDetailOne,
-        testTable,
-        testTableLong,
-        testSelect, ClassListQuery, SttPlanPreview
-    } from "../../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                previewShow: false,
-                previewDate: {},
-                BigTitle: '',
-                smallTitle: '',
-                pageTitle: '新增课程表模板',
-                dialogVisible: false,
-                dialogdata: [],
-                dialogValue: [],
-                temId: '',
-                activeName: '1',
-                tableData: [],
-                // panel 配置项目
-                panel: {
-                    name: '',
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    taskstatus: 99,
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    options: [],
-                    time1: globalBt(),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                testRow: {
-                    timeLong: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 23, 59)],
-                    BeginStr: '08:30',
-                    EndStr: '23:59',
-                    ClassId: '',
-                    TopLimit: 1,
-                    ConsumeHour: 0,
-                },
-                tabs: [
-                    {
-                        tableData: [], days: '1'
-                    },
-                    {
-                        tableData: [], days: '2'
-                    },
-                    {
-                        tableData: [], days: '3'
-                    },
-                    {
-                        tableData: [], days: '4'
-                    },
-                    {
-                        tableData: [], days: '5'
-                    },
-                    {
-                        tableData: [], days: '6'
-                    },
-                    {
-                        tableData: [], days: '7'
-                    },
-                ],
-                DataAssemblyRs: [],
-                serachBtnStatus: false,
-            }
-        },
-        mounted() {
-            // 加载课程选项
-            this.panelSelect();
-            if (this.$route.query.id == 0) {
-                this.pageTitle = '新增课程表模板'
-                //  深拷贝赋初始值
-                this.deepValue();
-                this.panel.name = '';
-            } else {
-                this.pageTitle = '编辑课程表模板'
-                // 读取赋值
-                this.getTableQuery();
-            }
-        },
-        methods: {
-            // 加载选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    vipType: '',
-                    start: 1,
-                    expDay: 0,
-                    tableMax: 9999,
-                };
-                let postdata = qs.stringify(param);
-                ClassListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        if (json.Rs == null) return false
-                        that.panel.options = turnClassResToOption(json.Rs)
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 选择课程后,获取当前课程的建议上课人数和课时消耗
-            getRowTop(row) {
-                let that = this;
-                console.log(row);
-                let param = {
-                    token: localStorage.token,
-                    classId: row.ClassId,
-                };
-                let postdata = qs.stringify(param);
-                ClassDetailOne(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        row.TopLimit = json.Rs.TopLimit;
-                        row.ConsumeHour = json.Rs.ConsumeHour;
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            confirmEditLessonTable() {
-                let that = this;
-
-                // 按钮倒计时
-                that.serachBtnStatus = true;
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000);
-
-                if (!this.panel.name) {
-                    this.$message.error('模板名称不能为空');
-                    return false
-                }
-                if (this.panel.name.length < 3) {
-                    this.$message.error('模板名称不能小于3个字符');
-                    return false
-                }
-                if (this.panel.name.length > 20) {
-                    this.$message.error('模板名称不能大于20个字符');
-                    return false
-                }
-                if (!this.checkData()) {
-                    return false
-                }
-                let param = {
-                    token: localStorage.token,
-                    planId: this.$route.query.id,
-                    planName: this.panel.name
-                };
-                let postdata = qs.stringify(param);
-                SttPlanBasicEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        let id = that.$route.query.id;
-                        // 提交课程内容
-                        that.EditLessonTable(id);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 删除
-            delRow(scope) {
-                let delIndex = parseInt(scope.$index)
-                let curIndex = parseInt(this.activeName) - 1;
-                this.tabs[curIndex].tableData.splice(delIndex, 1)
-            },
-            // 提交课程模板
-            confirmLessonTable() {
-                if (!this.panel.name) {
-                    this.$message.error('模板名称不能为空');
-                    return false
-                }
-                if (this.panel.name.length < 3) {
-                    this.$message.error('模板名称不能小于3个字符');
-                    return false
-                }
-                if (this.panel.name.length > 20) {
-                    this.$message.error('模板名称不能大于20个字符');
-                    return false
-                }
-                if (!this.checkData()) {
-                    return false
-                }
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    planName: this.panel.name,
-                };
-                let postdata = qs.stringify(param);
-                SttPlanBasicAdd(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.panel.tabId = json.Id;
-                        // 提交课程内容
-                        that.EditLessonTable(json.Id);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 数据组装
-            DataAssembly() {
-                let thisRow = {};
-                for (let i = 0; i < this.tabs.length; i++) {
-                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
-                        thisRow = this.tabs[i].tableData[j];
-                        thisRow.lessonIndex = parseInt(j);
-                        if (planId) {
-                            thisRow.PlanId = parseInt(planId);
-                        } else {
-                            thisRow.PlanId = parseInt(this.$route.query.id);
-                        }
-                        thisRow.WeekDay = parseInt(i + 1);
-                        thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
-                        thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
-                        this.$delete(thisRow, 'Base');
-                        this.$delete(thisRow, 'SpdId');
-                        this.DataAssemblyRs.push(thisRow)
-                    }
-                }
-            },
-            // 修改课程模板
-            EditLessonTable(planId) {
-                let that = this;
-                // 提交数据
-
-                let planRs = [];
-                let thisRow = {};
-                for (let i = 0; i < this.tabs.length; i++) {
-                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
-                        thisRow = this.tabs[i].tableData[j];
-                        thisRow.lessonIndex = parseInt(j);
-                        if (planId) {
-                            thisRow.PlanId = parseInt(planId);
-                        } else {
-                            thisRow.PlanId = parseInt(this.$route.query.id);
-                        }
-                        thisRow.WeekDay = parseInt(i + 1);
-                        thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
-                        thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
-                        this.$delete(thisRow, 'Base');
-                        this.$delete(thisRow, 'SpdId');
-                        planRs.push(thisRow)
-                    }
-                }
-
-                let res = JSON.stringify(planRs);
-                // 如果传入0就用url里的,如果非0就用传入的
-                // let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
-                let param = {
-                    token: localStorage.token,
-                    // planId: this.$route.query.id,
-                    planId: planId,
-                    planRs: res,
-                };
-                let postdata = qs.stringify(param);
-                // 得等数组装完才能校验
-                SttPlanDetailBatchSave(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '课程模板已上传成功!',
-                            type: 'success'
-                        });
-                        this.$router.push({
-                            path: '/lessonTable'
-                        });
-                        // 提交后清掉内存里的课表
-                        this.clearTableRAM();
-
-                        // this.getTableQuery();
-                    } else {
-                        // this.$router.push({
-                        //   path: '/lessonTable'
-                        // });
-                        // 提交后清掉内存里的课表
-                        // this.clearTableRAM();
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            clearTableRAM() {
-                this.tabs = [
-                    {
-                        tableData: [], days: '1'
-                    },
-                    {
-                        tableData: [], days: '2'
-                    },
-                    {
-                        tableData: [], days: '3'
-                    },
-                    {
-                        tableData: [], days: '4'
-                    },
-                    {
-                        tableData: [], days: '5'
-                    },
-                    {
-                        tableData: [], days: '6'
-                    },
-                    {
-                        tableData: [], days: '7'
-                    },
-                ];
-
-            },
-            // 检查数据
-            checkData() {
-                let res = true;
-                for (let i = 0; i < this.tabs.length; i++) {
-                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
-                        if (!this.tabs[i].tableData[j].ClassId) {
-                            let days = numberToWeekdays(i + 1);
-                            let lessonIndex = j + 1;
-                            this.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交');
-                            res = false;
-                            break;
-                        }
-                    }
-                }
-                return res
-            },
-            checkData2() {
-                // 目前报错规则:StbId  WeekDay ClassId 不能为空为 0 BeginStr EndStr 必须是5位数字符串
-                let that = this;
-                this.DataAssembly();
-                let tableDate = this.DataAssemblyRs;
-                console.log(123);
-                tableDate.map(function (item) {
-                    if (!item.ClassId) {
-                        let days = numberToWeekdays(item.WeekDay);
-                        let lessonIndex = parseInt(item.lessonIndex + 1);
-                        that.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交');
-                        return false
-                    } else {
-                        return true
-                    }
-                })
-            },
-            // 新增一行
-            addRow() {
-                // 读取当前周几
-                let index = parseInt(this.activeName) - 1;
-                let rows = this.testRow;
-                let res = this.deepClone(rows);
-                this.tabs[index].tableData.push(res);
-            },
-            //  深拷贝赋初始值
-            deepValue() {
-                let that = this;
-                let valus = [
-                    this.testRow
-                    // {BeginStr: '08:30', EndStr: '09:30', ClassId: 0, TopLimit: 0, ConsumeHour: 0},
-                ];
-                this.tabs.map(function (item) {
-                    let res = that.deepClone(valus);
-                    item.tableData = res;
-                })
-            },
-            deepClone(obj) {
-                let _obj = JSON.stringify(obj),
-                    objClone = JSON.parse(_obj);
-                return objClone
-            },
-            handleClick() {
-            },
-            // 增删会员课程
-            lessonStudenChange() {
-                this.dialogVisible = true
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    planId: this.$route.query.id,//
-                };
-                this.panel.name = this.$route.query.name;
-                let postdata = qs.stringify(param);
-                SttPlanDetailListQuery(postdata).then(res => {
-                    let json = res;
-                    let Rs = json.Rs
-                    let bt = '';
-                    let et = '';
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        // 清掉上次的记录
-                        for (let i = 0; i < that.tabs.length; i++) {
-                            that.tabs[i].tableData = []
-                        }
-                        if (Rs) {
-                            // 遍历分配
-                            Rs.map(function (item) {
-                                for (let i = 0; i < 7; i++) {
-                                    if (item.WeekDay == i + 1) {
-                                        bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
-                                        et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
-                                        item.timeLong = [bt, et];
-                                        that.tabs[i].tableData.push(item);
-
-                                    }
-                                }
-                            })
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            seeWeekTemp() {
-                // 只看保存过的
-            },
-            // 去重
-            unique(arr) {
-                const res = new Map();
-                return arr.filter((arr) => !res.has(arr.EndStr) && res.set(arr.EndStr, 1))
-            }
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'EditLessonTable') {
-                    this.temId = this.$route.query.id;
-                    this.panelSelect();
-                    if (parseInt(this.temId) == 0) {
-                        this.pageTitle = '新增课程表模板';
-                        this.deepValue();
-                        this.panel.name = '';
-                    } else {
-                        this.pageTitle = '编辑课程表模板';
-                        this.getTableQuery();
-                        console.log(123);
-                    }
-                }
-            },
-        },
-        components: {
-            preview
-        }
-    }
-</script>
-
-<style scoped>
-    @import "../../assets/css/panel.css";
-
-    em {
-        font-style: normal;
-    }
-
-    .context {
-        /* height: 770px; */
-
-        overflow-y: scroll;
-
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-    }
-
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
-
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-
-    .change button {
-        float: left;
-    }
-
-    .change button.pull-right {
-        float: right;
-    }
-
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
-
-    .dialogTitle span {
-        width: 169px;
-        height: 40px;
-        line-height: 40px;
-        text-align: center;
-        color: #fff;
-        background: #3799FF;
-        border-radius: 250px;
-        font-size: 18px;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-bottom: 30px;
-    }
-
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
-
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
-
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
-
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
-
-    /deep/ .panel_control .el-input {
-        width: 200px;
-        float: left;
-    }
-
-    .panel_control em {
-        float: left;
-        font-size: 14px;
-        color: #545454;
-        line-height: 45px;
-        margin-right: 10px;
-    }
-
-    .seeTemp {
-        /*position: relative;*/
-        float: right;
-        bottom: 0px;
-        z-index: 22;
-        margin-left: 10px;
-    }
-
-    .table {
-        position: relative;
-        /*top: -50px;*/
-        top: 0px;
-    }
-
-    .el-range-editor.el-input__inner {
-        width: 220px;
-        padding: 3px 6px;
-    }
-
-    .rowBottom {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
-
-    .rowBottom button {
-        float: left;
-        margin-right: 10px;
-    }
-
-    .wrning {
-        float: right;
-        font-size: 12px;
-    }
-
-    .rowBottom button.pull-right {
-        float: right;
-    }
-</style>

+ 804 - 0
src/views/SttPlan/LessonTemplateEdit.vue

@@ -0,0 +1,804 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <h5>{{ pageTitle }}</h5>
+    </div>
+    <div class="panel-body">
+      <div class="panel_control">
+        <el-row :gutter="20">
+          <el-col :span="9">
+            <em> <span style="color: red">*</span>课程表模板名称:</em>
+            <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
+          </el-col>
+          <!--                    默认不通用-->
+          <!--        todo-->
+          <!--        <el-button class="seeTemp" @click.native="seeWeekTemp">预览模板</el-button>-->
+          <el-button type="default" class="seeTemp" @click="$router.push('/lessonTemplate')">返回课程表模板</el-button>
+        </el-row>
+      </div>
+    </div>
+    <br>
+    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+      <el-tab-pane label="星期一" name="1"></el-tab-pane>
+      <el-tab-pane label="星期二" name="2"></el-tab-pane>
+      <el-tab-pane label="星期三" name="3"></el-tab-pane>
+      <el-tab-pane label="星期四" name="4"></el-tab-pane>
+      <el-tab-pane label="星期五" name="5"></el-tab-pane>
+      <el-tab-pane label="星期六" name="6"></el-tab-pane>
+      <el-tab-pane label="星期天" name="7"></el-tab-pane>
+    </el-tabs>
+
+    <div class="table">
+      <el-table
+          v-for="tab in tabs"
+          :data="tab.tableData"
+          v-if="tab.days == activeName"
+          border
+          is-horizontal-resize
+          :default-sort="{prop: 'date', order: 'descending'}"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+          class=""
+          @selection-change="handleSelectionChange"
+      >
+        >
+        <el-table-column
+            prop="timeScope"
+            label="时间"
+            width="260px"
+            align="center"
+        >
+          <template slot-scope="scope">
+            <el-time-picker
+                is-range
+                v-model="scope.row.timeLong"
+                range-separator="至"
+                start-placeholder="开始时间"
+                end-placeholder="结束时间"
+                placeholder="选择时间范围"
+            >
+            </el-time-picker>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="class_id"
+            label="课程"
+            align="center"
+        >
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.class_id" @change="getRowTop(scope.row)">
+              <el-option
+                  v-for="item in panel.options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="TopLimit"
+            label="预约名额"
+            align="center"
+        >
+          <template slot-scope="scope">
+            <el-input-number v-model="scope.row.TopLimit" :min="1" :max="9999" label=""></el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="ConsumeHour"
+            label="消耗课时"
+            align="center"
+        >
+          <template slot-scope="scope">
+            <el-input-number v-model="scope.row.ConsumeHour" :min="0" :max="9999"
+                             label=""></el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="Status"
+            label="操作"
+            width="100px"
+            align="center"
+        >
+          <template slot-scope="scope">
+            <el-button type="text" class="red" @click="delRow(scope)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="rowBottom">
+        <el-button type="default" @click="$router.push('/lessonTemplate')">返回课程表模板</el-button>
+        <!--ID为0是新建,不为0是修改-->
+        <el-button type="primary" class="pull-right" @click="confirmLessonTable"
+                   v-if="this.$route.query.id == 0" :disabled="serachBtnStatus">提交
+        </el-button>
+        <el-button type="primary" class="pull-right" @click="confirmEditLessonTable"
+                   v-if="this.$route.query.id != 0" :disabled="serachBtnStatus">提交
+        </el-button>
+        <el-button type="primary" class="pull-right" @click="addRow">新增课程</el-button>
+      </div>
+      <div>
+        <br>
+        <em class="red wrning">
+          *所有操作提交后生效
+        </em>
+      </div>
+    </div>
+    <br>
+
+
+    <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
+      <div class="dialogTitle">
+        <span>基础功能</span>
+      </div>
+      <div>
+        <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small">确定</el-button>
+        <el-button @click="dialogVisible = false" size="small">取消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="预览" :visible.sync="previewShow" width="1200px">
+      <preview :preview-date="previewDate" :big-title="BigTitle" :small-title="smallTitle"></preview>
+      <div class="dialogFooter">
+        <el-button @click="previewShow = false" size="small">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Global from '../../Global.js'
+import preview from '@/components/preview.vue'
+
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
+import {
+  SttPlanBasicAdd,
+  SttPlanDetailBatchSave,
+  SttPlanBasicEdit,
+  ClassDetailOne,
+  ClassListQuery,
+} from "../../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      previewShow: false,
+      previewDate: {},
+      BigTitle: '',
+      smallTitle: '',
+      pageTitle: '新增课程表模板',
+      dialogVisible: false,
+      dialogdata: [],
+      dialogValue: [],
+      temId: '',
+      activeName: '1',
+      tableData: [],
+      // panel 配置项目
+      panel: {
+        name: '',
+        usercode: '',
+        username: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        taskstatus: 99,
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        options: [],
+        time1: globalBt(),
+      },
+      multipleSelection: [],
+      pageination: {
+        pageItem: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      testRow: {
+        timeLong: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 23, 59)],
+        BeginStr: '08:30',
+        EndStr: '23:59',
+        ClassId: '',
+        TopLimit: 1,
+        ConsumeHour: 0,
+      },
+      tabs: [
+        {
+          tableData: [], days: '1'
+        },
+        {
+          tableData: [], days: '2'
+        },
+        {
+          tableData: [], days: '3'
+        },
+        {
+          tableData: [], days: '4'
+        },
+        {
+          tableData: [], days: '5'
+        },
+        {
+          tableData: [], days: '6'
+        },
+        {
+          tableData: [], days: '7'
+        },
+      ],
+      DataAssemblyRs: [],
+      serachBtnStatus: false,
+    }
+  },
+  mounted() {
+    console.log('加载课程选项');
+
+    // 加载课程选项
+    this.panelSelect();
+    if (this.$route.query.id === 0) {
+      this.pageTitle = '新增课程表模板'
+      //  深拷贝赋初始值
+      this.deepValue();
+      this.panel.name = '';
+    } else {
+      console.log(this.$route.query.id);
+      this.pageTitle = '编辑课程表模板'
+      // 读取赋值
+      this.getTableQuery();
+    }
+  },
+  methods: {
+    // 加载选项
+    panelSelect() {
+      let that = this;
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        classType: 1,
+        start: 1,
+        tableMax: 9999,
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.classQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            if(res.rs != null){
+              that.panel.options = turnClassResToOption(res.rs)
+            }else{
+              return false
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 选择课程后,获取当前课程的建议上课人数和课时消耗
+    getRowTop(row) {
+      let that = this;
+      console.log(row);
+      let param = {
+        token: localStorage.token,
+        classId: row.class_id,
+      };
+      let postdata = qs.stringify(param);
+      ClassDetailOne(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          row.TopLimit = json.Rs.TopLimit;
+          row.ConsumeHour = json.Rs.ConsumeHour;
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    confirmEditLessonTable() {
+      let that = this;
+
+      // 按钮倒计时
+      that.serachBtnStatus = true;
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
+        }
+      }, 1000);
+
+      if (!this.panel.name) {
+        this.$message.error('模板名称不能为空');
+        return false
+      }
+      if (this.panel.name.length < 3) {
+        this.$message.error('模板名称不能小于3个字符');
+        return false
+      }
+      if (this.panel.name.length > 20) {
+        this.$message.error('模板名称不能大于20个字符');
+        return false
+      }
+      if (!this.checkData()) {
+        return false
+      }
+      let param = {
+        token: localStorage.token,
+        planId: this.$route.query.id,
+        planName: this.panel.name
+      };
+      let postdata = qs.stringify(param);
+      SttPlanBasicEdit(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          let id = that.$route.query.id;
+          // 提交课程内容
+          that.LessonTemplateEdit(id);
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 删除
+    delRow(scope) {
+      let delIndex = parseInt(scope.$index)
+      let curIndex = parseInt(this.activeName) - 1;
+      this.tabs[curIndex].tableData.splice(delIndex, 1)
+    },
+    // 提交课程模板
+    confirmLessonTable() {
+      if (!this.panel.name) {
+        this.$message.error('模板名称不能为空');
+        return false
+      }
+      if (this.panel.name.length < 3) {
+        this.$message.error('模板名称不能小于3个字符');
+        return false
+      }
+      if (this.panel.name.length > 20) {
+        this.$message.error('模板名称不能大于20个字符');
+        return false
+      }
+      if (!this.checkData()) {
+        return false
+      }
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        planName: this.panel.name,
+      };
+      let postdata = qs.stringify(param);
+      SttPlanBasicAdd(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.panel.tabId = json.Id;
+          // 提交课程内容
+          that.LessonTemplateEdit(json.Id);
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 数据组装
+    DataAssembly() {
+      let thisRow = {};
+      for (let i = 0; i < this.tabs.length; i++) {
+        for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+          thisRow = this.tabs[i].tableData[j];
+          thisRow.lessonIndex = parseInt(j);
+          if (planId) {
+            thisRow.PlanId = parseInt(planId);
+          } else {
+            thisRow.PlanId = parseInt(this.$route.query.id);
+          }
+          thisRow.WeekDay = parseInt(i + 1);
+          thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
+          thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
+          this.$delete(thisRow, 'Base');
+          this.$delete(thisRow, 'SpdId');
+          this.DataAssemblyRs.push(thisRow)
+        }
+      }
+    },
+    // 修改课程模板
+    EditLessonTable(planId) {
+      let that = this;
+      // 提交数据
+
+      let planRs = [];
+      let thisRow = {};
+      for (let i = 0; i < this.tabs.length; i++) {
+        for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+          thisRow = this.tabs[i].tableData[j];
+          thisRow.lessonIndex = parseInt(j);
+          if (planId) {
+            thisRow.PlanId = parseInt(planId);
+          } else {
+            thisRow.PlanId = parseInt(this.$route.query.id);
+          }
+          thisRow.WeekDay = parseInt(i + 1);
+          thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
+          thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
+          this.$delete(thisRow, 'Base');
+          this.$delete(thisRow, 'SpdId');
+          planRs.push(thisRow)
+        }
+      }
+
+      let res = JSON.stringify(planRs);
+      // 如果传入0就用url里的,如果非0就用传入的
+      // let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
+      let param = {
+        token: localStorage.token,
+        // planId: this.$route.query.id,
+        planId: planId,
+        planRs: res,
+      };
+      let postdata = qs.stringify(param);
+      // 得等数组装完才能校验
+      SttPlanDetailBatchSave(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '课程模板已上传成功!',
+            type: 'success'
+          });
+          this.$router.push({
+            path: '/lessonTemplateEdit'
+          });
+          // 提交后清掉内存里的课表
+          this.clearTableRAM();
+
+          // this.getTableQuery();
+        } else {
+          // this.$router.push({
+          //   path: '/lessonTable'
+          // });
+          // 提交后清掉内存里的课表
+          // this.clearTableRAM();
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    clearTableRAM() {
+      this.tabs = [
+        {
+          tableData: [], days: '1'
+        },
+        {
+          tableData: [], days: '2'
+        },
+        {
+          tableData: [], days: '3'
+        },
+        {
+          tableData: [], days: '4'
+        },
+        {
+          tableData: [], days: '5'
+        },
+        {
+          tableData: [], days: '6'
+        },
+        {
+          tableData: [], days: '7'
+        },
+      ];
+
+    },
+    // 检查数据
+    checkData() {
+      let res = true;
+      for (let i = 0; i < this.tabs.length; i++) {
+        for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+          if (!this.tabs[i].tableData[j].ClassId) {
+            let days = numberToWeekdays(i + 1);
+            let lessonIndex = j + 1;
+            this.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交');
+            res = false;
+            break;
+          }
+        }
+      }
+      return res
+    },
+    checkData2() {
+      // 目前报错规则:StbId  WeekDay ClassId 不能为空为 0 BeginStr EndStr 必须是5位数字符串
+      let that = this;
+      this.DataAssembly();
+      let tableDate = this.DataAssemblyRs;
+      console.log(123);
+      tableDate.map(function (item) {
+        if (!item.ClassId) {
+          let days = numberToWeekdays(item.WeekDay);
+          let lessonIndex = parseInt(item.lessonIndex + 1);
+          that.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交');
+          return false
+        } else {
+          return true
+        }
+      })
+    },
+    // 新增一行
+    addRow() {
+      // 读取当前周几
+      let index = parseInt(this.activeName) - 1;
+      let rows = this.testRow;
+      let res = this.deepClone(rows);
+      this.tabs[index].tableData.push(res);
+    },
+    //  深拷贝赋初始值
+    deepValue() {
+      let that = this;
+      let valus = [
+        this.testRow
+        // {BeginStr: '08:30', EndStr: '09:30', ClassId: 0, TopLimit: 0, ConsumeHour: 0},
+      ];
+      this.tabs.map(function (item) {
+        let res = that.deepClone(valus);
+        item.tableData = res;
+      })
+    },
+    deepClone(obj) {
+      let _obj = JSON.stringify(obj),
+          objClone = JSON.parse(_obj);
+      return objClone
+    },
+    handleClick() {
+    },
+    // 增删会员课程
+    lessonStudenChange() {
+      this.dialogVisible = true
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      this.panel.name = this.$route.query.name;
+      // 清掉上次的记录
+      for (let i = 0; i < that.tabs.length; i++) {
+        that.tabs[i].tableData = []
+      }
+      const jsonStr = {
+        planId: this.$route.query.id
+      };
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.sttPlanDetailQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            let bt = '';
+            let et = '';
+            that.loading = false;
+
+            if (res.rs) {
+              // 遍历分配
+              res.rs.map(function (item) {
+                for (let i = 0; i < 7; i++) {
+                  if (item.week_day == i + 1) {
+                    bt = new Date(2016, 9, 10, item.begin_str.substr(0, 2), item.begin_str.substr(3, 2));
+                    et = new Date(2016, 9, 10, item.end_str.substr(0, 2), item.end_str.substr(3, 2));
+                    item.timeLong = [bt, et];
+                    that.tabs[i].tableData.push(item);
+                  }
+                }
+              })
+            } else {
+              that.allTableData = [];
+              that.recordsTotal = 0;
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    seeWeekTemp() {
+      // 只看保存过的
+    },
+    // 去重
+    unique(arr) {
+      const res = new Map();
+      return arr.filter((arr) => !res.has(arr.EndStr) && res.set(arr.EndStr, 1))
+    }
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'lessonTemplateEdit') {
+        this.temId = this.$route.query.id;
+        this.panelSelect();
+        if (parseInt(this.temId) == 0) {
+          this.pageTitle = '新增课程表模板';
+          this.deepValue();
+          this.panel.name = '';
+        } else {
+          this.pageTitle = '编辑课程表模板';
+          this.getTableQuery();
+        }
+      }
+    },
+  },
+  components: {
+    preview
+  }
+}
+</script>
+
+<style scoped>
+@import "../../assets/css/panel.css";
+
+em {
+  font-style: normal;
+}
+
+.context {
+  /* height: 770px; */
+
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle span {
+  width: 169px;
+  height: 40px;
+  line-height: 40px;
+  text-align: center;
+  color: #fff;
+  background: #3799FF;
+  border-radius: 250px;
+  font-size: 18px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-bottom: 30px;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799FF;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+/deep/ .panel_control .el-input {
+  width: 200px;
+  float: left;
+}
+
+.panel_control em {
+  float: left;
+  font-size: 14px;
+  color: #545454;
+  line-height: 45px;
+  margin-right: 10px;
+}
+
+.seeTemp {
+  /*position: relative;*/
+  float: right;
+  bottom: 0px;
+  z-index: 22;
+  margin-left: 10px;
+}
+
+.table {
+  position: relative;
+  /*top: -50px;*/
+  top: 0px;
+}
+
+.el-range-editor.el-input__inner {
+  width: 220px;
+  padding: 3px 6px;
+}
+
+.rowBottom {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.rowBottom button {
+  float: left;
+  margin-right: 10px;
+}
+
+.wrning {
+  float: right;
+  font-size: 12px;
+}
+
+.rowBottom button.pull-right {
+  float: right;
+}
+</style>

+ 1366 - 1389
src/views/User/Member.vue

@@ -1,1434 +1,1411 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <h5>会员管理</h5>
-            <div class="panel-body">
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="5">
-                            <em>姓名:</em>
-                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
-                        </el-col>
-                        <el-col :span="5">
-                            <em>手机号:</em>
-                            <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
-                        </el-col>
-                        <el-col :span="5">
-                            <em>会员类型:</em>
-                            <el-select v-model="panel.vipType">
-                                <el-option v-for="item in panel.vipOptions" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="5">
-                            <em>到期日:</em>
-                            <el-select v-model="panel.expDay">
-                                <el-option v-for="item in panel.endTypeOptions" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="2">
-                            <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
-                            </el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
-        </div>
-        <div class="change">
-            <el-button @click="addMember" v-if="userLevel != 4" type="primary" size="mini">新增会员</el-button>
-            <el-button @click="delList" v-if="userLevel != 4" size="mini">删除会员</el-button>
-            <el-button @click="lessonChange" v-if="userLevel != 4" size="mini">课时调整</el-button>
-            <el-button @click="giftChange" v-if="userLevel != 4" size="mini">赠送课时调整</el-button>
-            <el-button @click="ExpTimeChange" v-if="userLevel != 4" size="mini">有效期调整</el-button>
-            <el-button @click="lessonStudenChange" v-if="userLevel != 4" size="mini">增删会员可预约课程</el-button>
-            <!--            <el-button class="pull-right" icon="el-icon-position">导出</el-button>-->
+  <div class="context">
+    <div class="panel">
+      <h5>会员管理</h5>
+      <div class="panel-body">
+        <div>
+          <el-row :gutter="20">
+            <el-col :span="5" style=" width: 200px">
+              <em>姓名:</em>
+              <el-input style="margin-left:10px; width: 130px" v-model="panel.name" placeholder="请输入姓名"></el-input>
+            </el-col>
+            <el-col :span="5" style=" width: 260px">
+              <em>手机号:</em>
+              <el-input style="margin-left:10px; width: 140px" v-model="panel.phone" placeholder="请输入手机号"
+                        type="number"></el-input>
+            </el-col>
+            <el-col :span="5" style="width: 260px">
+              <em>会员类型:</em>
+              <el-select style="margin-left:10px; width: 150px" v-model="panel.vipType">
+                <el-option v-for="item in panel.vipOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="5" style=" width: 260px">
+              <em>到期日:</em>
+              <el-select style="margin-left:10px; width: 150px" v-model="panel.expDay">
+                <el-option v-for="item in panel.endTypeOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="2">
+              <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询</el-button>
+            </el-col>
+          </el-row>
         </div>
-        <div class="table">
-            <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+      </div>
+    </div>
+    <div class="change">
+      <el-button @click="addMember" type="primary" size="mini">新增会员</el-button>
+      <el-button @click="lessonChange"  size="mini">课时调整</el-button>
+      <el-button @click="lessonStudenChange" size="mini">增删会员可预约课程</el-button>
+      <el-button @click="deleteMember"   size="mini">删除会员</el-button>
+    </div>
+    <div class="table">
+      <br>
+      <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
                 element-loading-background="rgba(0, 0, 0, 0.8)" @selection-change="handleSelectionChange"
                 @current-change="clickChange">
-                >
-                <el-table-column label="选择" width="55" fixed>
-                    <template slot-scope="scope">
-                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-                    </template>
-                </el-table-column>
-                <!-- <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-                        width="50"
-                >
-                </el-table-column> -->
-                <el-table-column label="序号" type="index" width="50" align="center" fixed>
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.Name" label="会员名" width="90" fixed>
-                </el-table-column>
-                <el-table-column prop="UserInfo.Phone" label="手机号" width="110" sortable fixed>
-                </el-table-column>
-                <el-table-column prop="UserInfo.head" label="头像" width="50">
-                    <template slot-scope="scope">
-                        <div class="demo-image__preview" v-if="scope.row.UserInfo.Head">
-                            <el-image style="width: 25px; height: 25px" :src="scope.row.UserInfo.Head"
-                                :preview-src-list="[scope.row.UserInfo.Head]">
-                            </el-image>
-                        </div>
-                        <img src="../../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.VipType" label="类型" align="center" width="80px" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.UserInfo.VipType == 1">年费</span>
-                        <span v-if="scope.row.UserInfo.VipType == 2">充值</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.ExpTime" label="会员有效期" width="115" :formatter="filterFmtDate" sortable>
-                </el-table-column>
-                <el-table-column prop="UserInfo.RemainNormalhour" label="剩余课时" width="105" sortable>
-                </el-table-column>
-                <el-table-column prop="UserInfo.RemainGifthour" label="剩余赠送" width="105" sortable>
-                </el-table-column>
-                <el-table-column prop="UserInfo.ConsumeNormalhour" label="消费课时" width="105" sortable>
-                </el-table-column>
-                <el-table-column prop="UserInfo.ConsumeGifthour" label="消费赠送" width="105" sortable>
-                </el-table-column>
-                <el-table-column prop="ClassInfo" label="会员课程" width="220px">
-                    <template slot-scope="scope">
-                        <span class="lessonSpan" :style="{background:lesson.ClassColor}"
-                            v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.IsAcross" label="跨店会员" width="105" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.UserInfo.IsAcross == 0" class="green">本店用户</span>
-                        <span v-else class="red">跨店用户</span>
-                    </template>
-                </el-table-column>
-                <!-- <el-table-column
-                        prop="TakeId"
-                        label="Take绑定"
-                        width="105"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.UserInfo.TakeId == 0" class="red">未绑定</span>
-                        <span v-else>已绑定</span>
-                    </template>
-                </el-table-column> -->
-                <el-table-column prop="UserInfo.Memo" label="备注">
-                    <template slot-scope="scope">
-                        <el-popover placement="top" title="" width="200" trigger="hover"
-                            :content="scope.row.UserInfo.Memo">
-                            <span slot="reference" v-if="scope.row.UserInfo.Memo.length > 6">{{
-                                scope.row.UserInfo.Memo.substr(0, 6) }} ....</span>
-                        </el-popover>
-                        <span v-if="scope.row.UserInfo.Memo.length <= 6">{{ scope.row.UserInfo.Memo }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.Status" label="操作" width="120px">
-                    <template slot-scope="scope">
-                        <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)"
-                            v-if="userLevel != 4">编辑
-                        </el-button>
-                        <el-button class="btn" type="danger" v-if="scope.row.UserInfo.Status == 1" size="mini"
-                            @click="pauseRow(scope.row)">
-                            禁用
-                        </el-button>
-                        <el-button class="btn" type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
-                            @click="runRow(scope.row)">
-                            启用
-                        </el-button>
-                        <!-- <el-button class="btn" type="primary" size="mini"
-                                   @click="addTake(scope.row)">Take绑定
-                        </el-button> -->
-                        <el-button class="btn relevance" type="default" size="mini" @click="goRelevance(scope.row)">
-                            关联手机号
-                        </el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <div v-if="pageshow">
-                <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
-                    @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
-            </div>
-        </div>
+        <el-table-column label="选择" width="55" fixed>
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column label="序号" type="index" width="50" align="center" fixed>
+          <template scope="scope">
+            <span>{{ (start) + scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
 
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible"
-            :width="form.btnType == 1 ?'650px':'1200px'">
-            <div class="dialogContent">
-                <div :class="['pull-left',{'tabwild':form.btnType == 1}]">
-                    <el-form ref="form" :model="form" label-width="80px">
-                        <el-form-item label="手机号" :required="true">
-                            <el-input v-model="form.phone" @blur="getUsrInfoList()"></el-input>
-                        </el-form-item>
-                        <el-form-item label="会员名" :required="true">
-                            <el-input v-model="form.name"></el-input>
-                        </el-form-item>
-                        <el-form-item label="会员类型" v-if="form.btnType == 0">
-                            <el-select v-model="form.vipType" placeholder="请选择所属门店">
-                                <el-option v-for="item in memberTypes" :key="item.value" :label="item.label"
-                                    :value="item.value"></el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="课时" v-if="form.btnType == 0">
-                            <el-input-number v-model="form.normalhour " :min="0" :max="99999" label="(天)">
-                            </el-input-number>
-                        </el-form-item>
-                        <el-form-item label="赠送课时" v-if="form.btnType == 0">
-                            <el-input-number v-model="form.gifthour " :min="0" :max="99999" label="(天)">
-                            </el-input-number>
-                        </el-form-item>
-                        <el-form-item label="备注">
-                            <el-input v-model="form.memo"></el-input>
-                        </el-form-item>
-                        <el-form-item label="身高" :required="true">
-                            <el-input v-model="form.height" placeholder="cm" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="体重" :required="true">
-                            <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="静态心率">
-                            <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="性别" :required="true">
-                            <el-select v-model="form.sex " placeholder="">
-                                <el-option v-for="item in sexOptions" :key="item.value" :label="item.label"
-                                    :value="item.value"></el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="头像" :required="true">
-                            <!--                            <div class="upload">-->
-                            <!--                                <el-upload-->
-                            <!--                                        class="avatar-uploader"-->
-                            <!--                                        :action=domain-->
-                            <!--                                        :http-request=upqiniu-->
-                            <!--                                        :show-file-list="false"-->
-                            <!--                                        :before-upload="beforeUpload">-->
-                            <!--                                    &lt;!&ndash;<i v-else class="el-icon-plus avatar-uploader-icon"></i>&ndash;&gt;-->
-                            <!--                                </el-upload>-->
-                            <img v-if="imageUrl" :src="imageUrl" class="avatar">
-                            <cropper :width="300" :height="300" :fixed-number="[1,1]" @subUploadSucceed="getShopImages">
-                            </cropper>
-                            <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
-                            <!--                            </div>-->
-                        </el-form-item>
-                        <el-form-item label="出生年份" :required="true">
-                            <el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期">
-                            </el-date-picker>
-                        </el-form-item>
-                    </el-form>
-                </div>
-                <div class="pull-right" v-if="form.btnType == 0 && pullRight">
-                    <el-form ref="form" :model="form" label-width="10px">
-                        <el-form-item label="">
-                            <el-transfer filterable v-model="form.classlist" :data="form.dialogdata"
-                                :titles="['全部课程','已选课程']"></el-transfer>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button :disabled="addDisabled" type="primary" size="small" v-if="form.btnType == 0"
-                    @click="confirmMember">确定
-                </el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
-                </el-button>
-                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
-
-        <el-dialog :visible.sync="dialogVisible" width="650px">
-            <div class="dialogTitle">
-                <h5>
-                    用户:
-                    <em class="blue">【 {{ form.rowName }}】</em>
-                    <br>
-                    <br>
-                    <span v-if="dialogLesson">当前课时 {{ form.normalhour }}</span>
-                    <span v-if="dialogGift">赠送课时 {{ form.gifthour }}</span>
-                    <span v-if="dialogExpTime">当前到期时间</span>
-                    <span v-if="dialogLessonTable">增删会员可预约课程</span>
-                </h5>
-            </div>
-            <div v-if="dialogLesson">
-                <el-input-number v-model="form.newnormalhour" :min="-9999" :max="9999" label="课时调整"></el-input-number>
-            </div>
-            <div v-if="dialogGift">
-                <el-input-number v-model="form.newgifthour" :min="-9999" :max="9999" label="赠送课时调整"></el-input-number>
-            </div>
-            <div v-if="dialogExpTime">
-                <el-date-picker v-model="form.expTime" type="date" placeholder="选择日期">
-                </el-date-picker>
-            </div>
-            <div v-if="dialogLessonTable">
-                <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata" :titles="['全部课程','已选课程']">
-                </el-transfer>
-            </div>
-            <div class="dialogFooter">
-                <!--课时调整-->
-                <el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
-                <!--赠送课时调整-->
-                <el-button type="primary" size="small" @click="confirmGift" v-if="dialogGift">确定</el-button>
-                <!--                有效期调整-->
-                <el-button type="primary" size="small" @click="confirmExpTime" v-if="dialogExpTime">确定</el-button>
-                <!--                课程增删-->
-                <el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定
-                </el-button>
-                <el-button size="small" @click="dialogVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
-
-        <el-dialog title="Take绑定" :visible.sync="TakeVisible" width="650px">
-            <div>
-                <el-select v-model="Takevalue" placeholder="请选择">
-                    <el-option v-for="item in Takeoptions" :key="item.Id" :label="item.Name + item.PhoneNo"
-                        :value="item.Id">
-                    </el-option>
-                </el-select>
-            </div>
-            <div class="dialogFooter">
-                <!--take绑定调整-->
-                <el-button type="primary" size="small" @click="confirmTake">确定</el-button>
-                <el-button size="small" @click="TakeVisible = false">取消</el-button>
+        <el-table-column prop="headurl" label="头像" width="50">
+          <template slot-scope="scope">
+            <div class="demo-image__preview" v-if="scope.row.headurl">
+              <el-image style="width: 25px; height: 25px" :src="scope.row.headurl"
+                        :preview-src-list="[scope.row.headurl]">
+              </el-image>
             </div>
-        </el-dialog>
+            <img src="../../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
+          </template>
+        </el-table-column>
+        <el-table-column prop="user_name" label="会员名" width="90" fixed/>
+        <el-table-column prop="usercode" label="手机号" width="110" sortable fixed/>
+        <el-table-column align="center" label="会员卡信息">
+          <el-table-column prop="vip_type" label="类型" align="center" width="80px" sortable>
+            <template slot-scope="scope">
+              <span v-if="scope.row.vip_type == 1">年费</span>
+              <span v-if="scope.row.vip_type == 2">充值</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="exp_time" label="到期日" width="100" :formatter="filterFmtDate" sortable/>
+        </el-table-column>
+
+        <el-table-column align="center" label="剩余课时">
+          <el-table-column prop="remain_normalhour" label="普通课时" width="105" align="center" sortable/>
+          <el-table-column prop="remain_gifthour" label="赠送课时" width="105" align="center" sortable/>
+        </el-table-column>
+        <el-table-column align="center" label="消费课时">
+          <el-table-column prop="consume_normalhour" label="普通课时" width="105" align="center" sortable/>
+          <el-table-column prop="consume_gifthour" label="赠送课时" width="105" align="center" sortable/>
+        </el-table-column>
+
+        <el-table-column prop="is_across" label="跨店会员" width="105" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.is_across == 0" class="green">本店用户</span>
+            <span v-else class="red">跨店用户</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="memo" label="备注">
+          <template slot-scope="scope">
+            <el-popover placement="top" title="" width="100px" trigger="hover" :content="scope.row.memo">
+              <span slot="reference" v-if="scope.row.memo.length > 6">{{ scope.row.memo.substr(0, 6) }} ....</span>
+            </el-popover>
+            <span v-if="scope.row.memo.length <= 6">{{ scope.row.memo }}</span>
+          </template>
+        </el-table-column>
+        <!--        <el-table-column prop="ClassInfo" label="会员课程" width="180px"/>-->
+        <el-table-column prop="en_status" label="操作" width="300px">
+          <template slot-scope="scope">
+            <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)"  >
+              编辑
+            </el-button>
+            <el-popover placement="left" title="开通课程" width="400" trigger="click">
+              <el-button slot="reference" class="btn" type="default" size="mini" @click="queryUserClass(scope.row)">
+                会员课程
+              </el-button>
+              <el-table :data="userClassInfo">
+                <el-table-column property="class_name"></el-table-column>
+              </el-table>
+            </el-popover>
+            <el-button class="btn" type="default" size="mini" @click="goRelevance(scope.row)">关联手机</el-button>
+            <el-button class="btn" type="success" v-if="scope.row.en_status == 0" size="mini"
+                       @click="enableMember(scope.row)">启用
+            </el-button>
+            <el-button class="btn" type="danger" v-if="scope.row.en_status == 1" size="mini"
+                       @click="disableMember(scope.row)">禁用
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div v-if="pageshow">
+        <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+                       @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
+      </div>
     </div>
+
+    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible"
+               :width="form.btnType == 1 ?'650px':'1200px'">
+      <div class="dialogContent">
+        <div :class="['pull-left',{'tabwild':form.btnType == 1}]">
+          <el-form ref="form" :model="form" label-width="80px">
+            <el-form-item label="手机号" :required="true">
+              <el-input v-model="form.phone" @blur="getUsrInfoList()"></el-input>
+            </el-form-item>
+            <el-form-item label="会员名" :required="true">
+              <el-input v-model="form.name"></el-input>
+            </el-form-item>
+            <el-form-item label="会员类型" v-if="form.btnType == 0">
+              <el-select v-model="form.vipType" placeholder="请选择所属门店">
+                <el-option v-for="item in memberTypes" :key="item.value" :label="item.label"
+                           :value="item.value"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="课时" v-if="form.btnType == 0">
+              <el-input-number v-model="form.normalhour " :min="0" :max="99999" label="(天)">
+              </el-input-number>
+            </el-form-item>
+            <el-form-item label="赠送课时" v-if="form.btnType == 0">
+              <el-input-number v-model="form.gifthour " :min="0" :max="99999" label="(天)">
+              </el-input-number>
+            </el-form-item>
+            <el-form-item label="备注">
+              <el-input v-model="form.memo"></el-input>
+            </el-form-item>
+            <el-form-item label="身高" :required="true">
+              <el-input v-model="form.height" placeholder="cm" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="体重" :required="true">
+              <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="静态心率">
+              <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="性别" :required="true">
+              <el-select v-model="form.sex " placeholder="">
+                <el-option v-for="item in sexOptions" :key="item.value" :label="item.label"
+                           :value="item.value"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="出生年份" :required="true">
+              <el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item label="头像" :required="true">
+              <div class="upload">
+                <img v-if="imageUrl" :src="imageUrl" class="avatar">
+                <el-upload class="avatar-uploader" :action=domain :before-upload="beforeUpload" :show-file-list="false">
+                  <!--<i v-else class="el-icon-plus avatar-uploader-icon"/>-->
+                </el-upload>
+                <cropper :width="300" :height="300" :fixed-number="[1,1]" @subUploadSucceed="getShopImages"/>
+                <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
+              </div>
+            </el-form-item>
+
+          </el-form>
+        </div>
+        <div class="pull-right" v-if="form.btnType == 0 && pullRight">
+          <el-form ref="form" :model="form" label-width="10px">
+            <el-form-item label="">
+              <el-transfer filterable v-model="form.classlist" :data="form.dialogdata"
+                           :titles="['全部课程','已选课程']"></el-transfer>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button :disabled="addDisabled" type="primary" size="small" v-if="form.btnType == 0"
+                   @click="confirmMember">确定
+        </el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
+        </el-button>
+        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :visible.sync="dialogVisible">
+      <div class="dialogTitle">
+        <h5>
+          <span v-if="dialogLessonTable">编辑会员 <em class="blue">[{{ form.rowName }}]</em>  可预约课程</span>
+          <span v-if="dialogLesson">调整会员 <em class="blue">[{{ form.rowName }}]</em>  课时</span>
+        </h5>
+      </div>
+      <div v-if="dialogLesson">
+        <span>当前会员类型:</span>
+        <el-select v-model="form.vipType" style="width:185px; margin-left:20px; ">
+          <el-option v-for="item in memberTypes" :key="item.value" :label="item.label"
+                     :value="item.value"></el-option>
+        </el-select>
+        <br/><br/>
+        <div v-if="form.vipType === 1">
+          <span>会员到期时间:</span>
+          <el-date-picker v-model="form.expTime" type="date" style="width:185px; margin-left:20px; "/>
+        </div>
+        <br/>
+
+        <span style="margin-right: 15px">剩余普通课时: {{ form.normalhour }}</span>
+        <el-input-number v-model="form.newnormalhour" :min="-9999" :max="9999" label="课时调整" style="width:180px"/>
+        <br/><br/>
+        <span style="margin-right: 20px">剩余赠送课时: {{ form.gifthour }}</span>
+        <el-input-number v-model="form.newgifthour" :min="-9999" :max="9999" label="赠送课时调整" style="width:180px"/>
+        <br/><br/>
+
+      </div>
+
+      <div v-if="dialogLessonTable">
+        <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata" :titles="['全部课程','已选课程']"/>
+      </div>
+      <div class="dialogFooter" align="center">
+        <!--课时调整-->
+        <el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
+        <!--课程增删-->
+        <el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定</el-button>
+        <!--取消-->
+        <el-button size="small" @click="dialogVisible = false">取消</el-button>
+      </div>
+
+    </el-dialog>
+
+
+  </div>
 </template>
 
 <script>
-    import Global from '../../Global.js'
-    import ImgCutter from 'vue-img-cutter'
-    import {
-        VipUserListQuery,
-        ClassListQuery,
-        VipUserAdd,
-        VipUserStatusEdit,
-        VipUserEdit,
-        VipUserHourEdit,
-        VipUserExpEdit,
-        VipUserClassEdit,
-        QueryTakeCustomerByName,
-        BindTakeCustomer,
-        VipUserQueryByPhone,
-        testTable,
-        testSelect
-    } from "../../api/getApiRes";
-    import cropper from '@/components/cropper.vue'
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                imageUrl: '',
-                token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
-                domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
-                qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
-                pullRight: true,//其他dialog
-                addDisabled: true,//禁止添加新用户
-                dialogVisible: false,//其他dialog
-                TakeVisible: false,//take dialog
-                dialogMemberVisible: false,//新增会员dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//会员课程
-                dialogTitle: '新增会员',
-                dialogValue: [],
-                Takevalue: 0,
-                Takeoptions: [],
-                TakeHid: 0,
-                start: 0,
-                draw: 1,
-                cur_page: 1,
-                pageshow: true,
-                sexOptions: [
-                    { value: 1, label: '男' },//性别 1:男, 2:女
-                    { value: 2, label: '女' },
-                ],
-                yearOptions: getyearOptions(15),
-                // panel 配置项目
-                panel: {
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    vipType: '',
-                    expDay: '',
-                    vipOptions: vipOptions(0),
-                    endTypeOptions: endTypeOptions(),
-                    time1: globalBt(),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 10,
-                    pageIndex: 1,
-                },
-                form: {
-                    phone: '',
-                    name: '',
-                    userCode: '',
-                    shopId: '',
-                    Id: '',
-                    userId: '',
-                    height: '',
-                    weight: '',
-                    staticHr: '',
-                    head: '',
-                    birthday: '',
-                    sex: 1,
-                    vipType: 1,
-                    normalhour: 0,
-                    newnormalhour: 0,
-                    gifthour: 0,
-                    newgifthour: 0,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    expTime: '',
-                    classlist: [],
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-                memberTypes: vipOptions(1),
-                tableData: [],
-                tableRadio: [],
-                userLevel: localStorage.userLevel,
-                serachBtnStatus: false
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
+
+
+import cropper from '@/components/cropper.vue'
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      imageUrl: '',
+      token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
+      domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
+      qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
+      pullRight: true,//其他dialog
+      addDisabled: true,//禁止添加新用户
+      dialogVisible: false,//其他dialog
+      TakeVisible: false,//take dialog
+      dialogMemberVisible: false,//新增会员dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//会员课程
+      dialogTitle: '新增会员',
+      dialogValue: [],
+      Takevalue: 0,
+      Takeoptions: [],
+      TakeHid: 0,
+      start: 0,
+      draw: 1,
+      cur_page: 1,
+      pageshow: true,
+      sexOptions: [
+        {value: 1, label: '男'},//性别 1:男, 2:女
+        {value: 2, label: '女'},
+      ],
+      yearOptions: getyearOptions(15),
+      userClassInfo: [],
+      // panel 配置项目
+      panel: {
+        usercode: '',
+        username: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        taskstatus: 99,
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        vipType: -99,
+        expDay: -99999,
+        vipOptions: vipOptions(0),
+        endTypeOptions: endTypeOptions(),
+        time1: globalBt(),
+      },
+      multipleSelection: [],
+      //分页数据
+      pageination: {
+        pageItem: 10,//每页的条数
+        pageoptions: pageOptions(),
+        total: 10,
+        pageIndex: 1,
+      },
+      form: {
+        phone: '',
+        name: '',
+        userCode: '',
+        shopId: '',
+        Id: '',
+        userId: '',
+        height: '',
+        weight: '',
+        staticHr: '',
+        head: '',
+        birthday: '',
+        sex: 1,
+        vipType: 1,
+        normalhour: 0,
+        newnormalhour: 0,
+        gifthour: 0,
+        newgifthour: 0,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        expTime: '',
+        classlist: [],
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      memberTypes: vipOptions(1),
+      tableData: [],
+      tableRadio: [],
+      serachBtnStatus: false
+    }
+  },
+  mounted() {
+    // 加载课程选项
+    this.panelSelect();
+    // 读取列表
+    this.getTableQuery();
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'Member') {
+        // 加载课程选项
+        this.panelSelect();
+        // 读取列表
+        this.getTableQuery();
+      }
+    },
+  },
+  methods: {
+    // 查询用户是否乃跨店用户
+    // todo 逻辑
+    //  1.新用户正常注册
+    //  2.
+
+    getUsrInfoList() {
+      let that = this;
+      // 只有新增的时候启用当前功能
+      if (this.form.btnType == 1) {
+        return false
+      }
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        phone: this.form.phone
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setSign(getSignStr(jsonStr));
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      console.log(standardReq.getJsonstr());
+      that.client.vipMainPhoneCheck(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply)
+          console.log(res);
+          if (res.code == 20101) {//该手机号在本店已存在
+            that.$message.error('用户已存在,手机号不能重复添加');
+            that.addDisabled = true;
+          }
+          if (res.code == 20102) {//该手机号在分店作为副手机号存在
+            that.$message.error('手机号已经关联其他用户不能重复添加');
+            that.addDisabled = true;
+          }
+          if (res.code == 0) {
+            that.pullRight = true;
+            that.addDisabled = false;
+            that.pullRight = true;
+            that.form.name = '';
+            that.form.height = '';
+            that.form.weight = '';
+            that.form.birthday = '';
+            that.imageUrl = '';
+            that.form.head = '';
+            this.form.sex = 1;
+
+            if (res.usertype == 3) {//其他分店存在用户信息,反填入输入框
+              let userInfo = res.rs[0];
+
+              that.$message.success('已读取到当前用户信息');
+              // 关掉右侧
+              that.pullRight = false;
+              that.form.name = userInfo.user_name;
+              that.form.height = userInfo.height;
+              that.form.weight = parseInt(userInfo.weight);
+              that.form.birthday = userInfo.birthday;
+              that.imageUrl = userInfo.headurl;
+              that.form.head = userInfo.headurl;
+              that.form.sex = userInfo.sex;
+              that.form.staticHr = userInfo.static_hr;
             }
-        },
-        mounted() {
-            // 加载课程选项
-            this.panelSelect();
-            // 读取列表
-            this.getTableQuery();
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'Member') {
-                    // 加载课程选项
-                    this.panelSelect();
-                    // 读取列表
-                    this.getTableQuery();
-                }
-            },
-        },
-        methods: {
-            // 查询用户是否乃跨店用户
-            // todo 逻辑
-            //  1.新用户正常注册
-            //  2.
-
-            getUsrInfoList() {
-
-                // 只有新增的时候启用当前功能
-                if (this.form.btnType == 1) {
-                    return false
-                }
-
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    phone: this.form.phone,
-                };
-                let postdata = qs.stringify(param);
-                VipUserQueryByPhone(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        let Status = json.Status;
-                        let Info = json.Info;
-                        // clear info
-                        that.pullRight = true;
-                        that.addDisabled = false;
-                        that.pullRight = true;
-                        that.form.name = '';
-                        that.form.height = '';
-                        that.form.weight = '';
-                        that.form.birthday = '';
-                        that.imageUrl = '';
-                        that.form.head = '';
-                        this.form.sex = 1;
-                        switch (parseInt(Status)) {
-                            case 1:
-                                that.$message.error('用户已存在,手机号不能重复添加');
-                                that.addDisabled = true;
-                                break;
-                            case 2:
-                                that.$message.success('已读取到当前用户信息');
-                                // 关掉右侧
-                                that.pullRight = false;
-                                that.form.name = Info.UserName;
-                                that.form.height = Info.Height;
-                                that.form.weight = parseInt(Info.Weight) / 10;
-                                that.form.birthday = Info.Birthday;
-                                that.imageUrl = Info.Head;
-                                that.form.head = Info.Head;
-                                this.form.sex = Info.Sex;
-                                break;
-                            case 3:
-                                that.$message.error('手机号已经关联其他用户不能重复添加');
-                                that.addDisabled = true;
-                                break;
-                            case 4:
-                                // 手机号在本店不存在,在其他店也不存在,前台应允许用户填写
-                                break;
-                        }
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 关联手机号跳转
-            goRelevance(row) {
-                this.$router.push({ path: '/relevancePhone', query: { userId: row.UserInfo.Id } });
-            },
-            cutDown(e) {
-                console.log(e);
-                this.imageUrl = e.dataURL;
-                this.upqiniu(e);
-            },
-            // 上传文件到七牛云
-            upqiniu(req) {
-                let that = this;
-                const config = {
-                    headers: { 'Content-Type': 'multipart/form-data' }
-                };
-                let filetype = '';
-                if (req.file.type === 'image/png') {
-                    filetype = 'png'
-                } else {
-                    filetype = 'jpg'
-                }
-                // 重命名要上传的文件
-                const keyname = 'GoAllOut' + new Date().valueOf() + Math.floor(Math.random() * 100) + '.' + filetype;
-                // 从后端获取上传凭证token
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                this.axios.post(headapi + 'v1/QiNiu/GetSimpleQiNiuToken', postdata).then(res => {
-                    const formdata = new FormData();
-                    formdata.append('file', req.file);
-                    formdata.append('token', res.data.QiNinToken);
-                    formdata.append('key', keyname);
-                    // 获取到凭证之后再将文件上传到七牛云空间
-                    this.axios.post(this.domain, formdata, config).then(res => {
-                        this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key;
-                        this.form.head = 'http://' + this.qiniuaddr + '/' + keyname;
-                    })
-                })
-            },
-            // 验证文件合法性
-            beforeUpload(file) {
-                const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
-                const isLt2M = file.size / 1024 / 1024 < 70;
-                if (!isJPG) {
-                    this.$message.error('上传头像图片只能是 JPG 格式!')
-                }
-                if (!isLt2M) {
-                    this.$message.error('上传头像图片大小不能超过 70MB!')
-                }
-                return isJPG && isLt2M
-            },
-            // 打开take绑定和拉取take数据
-            addTake(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    userId: row.UserInfo.Id,
-                };
-                this.TakeHid = row.UserInfo.HId;
-                let postdata = qs.stringify(param);
-                QueryTakeCustomerByName(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        if (json.Rs != '') {
-                            that.Takeoptions = json.Rs;
-                            that.Takevalue = json.Rs[0].Id;
-                            // 有值才能打开
-                            this.TakeVisible = true;
-                        } else {
-                            that.$message.error('当前用户没有可用的Take账号');
-                            this.TakeVisible = false;
-                            console.log('null');
-                        }
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 绑定take
-            confirmTake() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    hId: this.TakeHid,
-                    customerId: this.Takevalue,
-                    memo: '后台管理手动绑定',
-                };
-                let postdata = qs.stringify(param);
-                BindTakeCustomer(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: 'Take绑定成功!',
-                            type: 'success'
-                        });
-                        this.TakeVisible = false;
-                        // 读取列表
-                        this.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-
-            clickChange(item) {
-                this.tableRadio = item
-            },
-            // 编辑
-            editMember(row) {
-                let that = this;
-                this.clearForm();
-                this.form.phone = row.UserInfo.Phone;
-                this.form.name = row.UserInfo.Name;
-                this.form.memo = row.UserInfo.Memo;
-                this.imageUrl = row.UserInfo.Head;
-                this.form.height = row.UserInfo.Height;
-                this.form.weight = parseInt(row.UserInfo.Weight) / 10;
-                this.form.staticHr = row.UserInfo.StaticHr;
-                this.form.sex = row.UserInfo.Sex;
-                this.form.birthday = row.UserInfo.Birthday;
-                this.form.ubId = row.UserInfo.UbId;
-                this.form.btnType = 1;
-                this.form.shopId = row.UserInfo.ShopId;
-                this.form.Id = row.UserInfo.Id;
-                this.dialogMemberVisible = true;
-                this.dialogTitle = '编辑会员'
-            },
-            // 禁用
-            pauseRow(row) {
-                let that = this;
-                this.$confirm('是否禁用用户' + row.UserInfo.Name + '?', '禁用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        userId: row.UserInfo.Id,
-                        status: 8,//状态 8:禁用 1:启用 9:删除
-                    };
-                    let postdata = qs.stringify(param);
-                    VipUserStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.UserInfo.Name + '禁用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消禁用'
-                    });
-                });
-            },
-            // 启用
-            runRow(row) {
-                let that = this;
-                this.$confirm('是否启用用户' + row.UserInfo.Name + '?', '启用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        userId: row.UserInfo.Id,
-                        status: 1,//状态 8:禁用 1:启用 9:删除
-                    };
-                    let postdata = qs.stringify(param);
-                    VipUserStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.UserInfo.Name + '启用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消启用'
-                    });
-                });
-            },
-            // 关闭所有
-            allDialogClose() {
-                this.dialogVisible = false;
-                this.dialogGift = false;
-                this.dialogLesson = false;
-                this.dialogExpTime = false;
-                this.dialogLessonTable = false;
-            },
-            // 有效期调整
-            ExpTimeChange() {
-                // 仅针对年费用户,使用日期格式
-                this.allDialogClose();
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                if (parseInt(row.UserInfo.VipType) == 2) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,充值会员不能调整有效期',
-                        type: 'error'
-                    });
-                    return false
-                }
-                this.form.rowName = row.UserInfo.Name;
-                this.form.userId = row.UserInfo.Id;
-                this.form.expTime = row.UserInfo.ExpTime
-                this.dialogVisible = true;
-                this.dialogExpTime = true;
-            },
-            // 课时调整
-            lessonChange() {
-                this.allDialogClose();
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.normalhour = row.UserInfo.RemainNormalhour;
-                this.form.newnormalhour = 0;
-                this.form.rowName = row.UserInfo.Name;
-                this.form.userId = row.UserInfo.Id;
-                this.dialogVisible = true;
-                this.dialogLesson = true;
-
-            },
-            // 赠送调整
-            giftChange() {
-                this.allDialogClose();
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.gifthour = row.UserInfo.RemainGifthour;
-                this.form.newgifthour = 0;
-                this.form.rowName = row.UserInfo.Name;
-                this.form.userId = row.UserInfo.Id;
-                this.dialogVisible = true;
-                this.dialogGift = true;
-
-            },
-            // 增删会员课程
-            lessonStudenChange() {
-                let that = this;
-                this.allDialogClose();
-                // 重载课程列表选项
-                this.form.dialogValue = [];
-                this.panelSelect();
-                if (this.tableRadio.length == 0) {
-                    that.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.rowName = row.UserInfo.Name;
-                this.form.userId = row.UserInfo.Id;
-                if (row.ClassInfo) {
-                    row.ClassInfo.map(function (item) {
-                        that.form.dialogValue.push(item.ClassId)
-                    })
-                }
-                this.dialogVisible = true;
-                this.dialogLessonTable = true;
-            },
-            // 确认提交新增会员
-            confirmMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.phone) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.phone)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (!that.form.name) {
-                    this.$message.error('错了哦,会员名不能为空');
-                    return false
-                }
-                if (that.form.name.length > 8) {
-                    this.$message.error('错了哦,会员名字数超过8个字');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-
-                if (!that.form.height) {
-                    this.$message.error('错了哦,身高不能为空');
-                    return false
-                }
-                if (!that.form.weight) {
-                    this.$message.error('错了哦,体重不能为空');
-                    return false
-                }
-                // if (!that.form.staticHr) {
-                //     this.$message.error('错了哦,静态心率不能为空');
-                //     return false
-                // }
-                if (!that.form.birthday) {
-                    this.$message.error('错了哦,出生年份不能为空');
-                    return false
-                }
-
-                // 课程添加使用字符串形式
-                let curClasslist = '';
-                if (that.form.classlist) {
-                    curClasslist = that.form.classlist.toString();
-                }
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    phone: that.form.phone,
-                    name: that.form.name,
-                    vipType: that.form.vipType,
-                    normalhour: that.form.normalhour,
-                    gifthour: that.form.gifthour,
-                    classlist: curClasslist,
-                    memo: that.form.memo,
-                    height: that.form.height,
-                    weight: that.form.weight,
-                    staticHr: that.form.staticHr,
-                    sex: that.form.sex,
-                    head: that.form.head,
-                    birthday: nonTfmtDatetoLength(that.form.birthday, 10),
-                };
-                let postdata = qs.stringify(param);
-                VipUserAdd(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员添加成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            confirmEditMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.phone) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.phone)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (!that.form.name) {
-                    this.$message.error('错了哦,会员名不能为空');
-                    return false
-                }
-                if (that.form.name.length > 8) {
-                    this.$message.error('错了哦,会员名字数超过8个字');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-
-                if (!that.form.height) {
-                    this.$message.error('错了哦,身高不能为空');
-                    return false
-                }
-                if (!that.form.weight) {
-                    this.$message.error('错了哦,体重不能为空');
-                    return false
-                }
-                // if (!that.form.staticHr) {
-                //     this.$message.error('错了哦,静态心率不能为空');
-                //     return false
-                // }
-                if (!that.form.birthday) {
-                    this.$message.error('错了哦,出生年份不能为空');
-                    return false
-                }
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.Id,
-                    phone: that.form.phone,
-                    name: that.form.name,
-                    memo: that.form.memo,
-                    head: that.form.head,
-                    height: that.form.height,
-                    weight: that.form.weight,
-                    staticHr: that.form.staticHr,
-                    sex: that.form.sex,
-                    birthday: nonTfmtDatetoLength(that.form.birthday, 10),
-                    ubId: that.form.ubId
-                };
-                let postdata = qs.stringify(param);
-                console.log(param);
-                VipUserEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员信息编辑成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交课时
-            confirmLesson() {
-                let that = this;
-                // checkNum
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.userId,
-                    chgHour: that.form.newnormalhour,
-                    chgType: 1,//课时类型 1:普通课时 2:赠送课时
-                };
-                let postdata = qs.stringify(param);
-                VipUserHourEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交赠送
-            confirmGift() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.userId,
-                    chgHour: that.form.newgifthour,
-                    chgType: 2,//课时类型 1:普通课时 2:赠送课时
-                };
-                let postdata = qs.stringify(param);
-                VipUserHourEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '赠送课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交有效期
-            confirmExpTime() {
-                let that = this;
-                // checkNum
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.userId,
-                    expTime: nonTfmtDate(that.form.expTime, 16),
-                };
-                let postdata = qs.stringify(param);
-                VipUserExpEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '赠送课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交会员课程
-            confirmLessonTable() {
-                let that = this;
-                // checkNum
-                let classList = that.form.dialogValue ? that.form.dialogValue.toString() : '';
-
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.userId,
-                    classList: classList,
-                };
-                let postdata = qs.stringify(param);
-                VipUserClassEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员课程调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 加载课程列表选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    vipType: '',
-                    classType: 1,//不显示 午饭类 课程
-                    start: 1,
-                    expDay: 0,
-                    tableMax: 9999,
-                };
-                let postdata = qs.stringify(param);
-                ClassListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        if (json.Rs == null) return false
-                        that.form.dialogdata = turnClassResToOption(json.Rs);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 新增会员
-            addMember() {
-                this.clearForm();
-                this.panelSelect();
-                this.dialogMemberVisible = true;
-                this.btnType = 0;
-                this.form.btnType = 0;
-                this.dialogTitle = '新增会员'
-            },
-            // 删除
-            delList() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    that.$message.error("请先选中一条记录");
-                    return false
-                }
-                let detectorid = this.tableRadio.UserInfo.Id;
-
-                let param = {
-                    token: localStorage.token,
-                    userId: detectorid,
-                    status: 9,//0禁用1启用9删除
-                };
-                let postdata = qs.stringify(param);
-
-                this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    VipUserStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的会员已删除!',
-                                type: 'success'
-                            });
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                that.serachBtnStatus = true;
-                that.getTableQuery();
-                this.pageshow = false;//让分页隐藏
-                this.$nextTick(() => {//重新渲染分页
-                    this.pageshow = true;
-                });
-                that.$message.success('查询完毕');
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000)
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.head = '';
-                this.imageUrl = '';
-                this.form.phone = '';
-                this.form.memo = '';
-                this.form.normalhour = 0;
-                this.form.gifthour = 0;
-                this.form.height = '';
-                this.form.weight = '';
-                this.form.staticHr = '';
-                this.form.sex = 1;
-                this.form.birthday = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-                this.form.classlist = [];
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    vipType: that.panel.vipType,//
-                    phone: that.panel.phone,//
-                    name: that.panel.name,//
-                    expDay: that.panel.expDay,//
-                    start: that.start,//
-                    tableMax: 10,//
-                };
-                that.allTableData = [];
-                that.recordsTotal = 0;
-                let postdata = qs.stringify(param);
-                VipUserListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.PageCount * that.pageination.pageItem;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                // that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                that.getTableQuery();
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
-                    return '无有效期';
-                } else {
-                    return nonTfmtDatetoLength(column, 10);
-                }
-            },
-            // 海报上传成功
-            getShopImages(url) {
-                this.imageUrl = url;
-                this.form.head = url;
+            if (res.usertype == 4) {//不存在用户信息
+              // 该手机号不存在,可正常录入信息
             }
-        },
-        components: {
-            cropper
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      })
+    },
+    // 关联手机号跳转
+    goRelevance(row) {
+      this.$router.push({path: '/relevancePhone', query: {userId: row.uu_user_id,shopId: row.shop_id}});
+    },
+    cutDown(e) {
+      console.log(e);
+      this.imageUrl = e.dataURL;
+      this.upqiniu(e);
+    },
+    // 验证文件合法性
+    beforeUpload(file) {
+      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+      const isLt2M = file.size / 1024 / 1024 < 70;
+      if (!isJPG) {
+        this.$message.error('上传头像图片只能是 JPG 格式!')
+      }
+      if (!isLt2M) {
+        this.$message.error('上传头像图片大小不能超过 70MB!')
+      }
+      return isJPG && isLt2M
+    },
+
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    // 查询会员开通课程信息
+    queryUserClass(row) {
+      let that = this;
+      that.userClassInfo = [];//清空之前加载出的数据
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        UuUserId: row.uu_user_id
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      standardReq.setSign(getSignStr(jsonStr));
+      console.log(standardReq.getJsonstr());
+      that.client.vipUserClassQuery(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code == 0) {
+            console.log(res);
+            that.userClassInfo = res.rs;
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误码:' + res.code);
+          console.log("err:" + err);
+        }
+      })
+
+
+    },
+    // 编辑会员信息
+    editMember(row) {
+      let that = this;
+      this.clearForm();
+      this.form.Id = row.uu_user_id;
+      this.form.shopId = row.shop_id;
+      this.form.phone = row.usercode;
+      this.form.name = row.user_name;
+      this.form.memo = row.memo;
+      this.imageUrl = row.headurl;
+      this.form.head = row.headurl;
+      this.form.height = row.height;
+      this.form.weight = parseInt(row.weight);
+      this.form.staticHr = row.static_hr;
+      this.form.sex = row.sex;
+      this.form.birthday = row.birthday;
+      // this.form.ubId = row.UserInfo.UbId;
+      this.form.btnType = 1;
+      this.dialogMemberVisible = true;
+      this.dialogTitle = '编辑会员'
+    },
+    // 禁用账户
+    disableMember(row) {
+      let that = this;
+      this.$confirm('是否禁用用户' + row.user_name + '?', '禁用操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const jsonStr = {
+          UuHId: row.uu_h_id,
+          status: 0,//状态 0:禁用 1:启用 9:删除
+        };
+
+        let standardReq = new StandardRequest();
+        standardReq.setShopid(localStorage.shopId);
+        standardReq.setJsonstr(JSON.stringify(jsonStr));
+        standardReq.setSign(getSignStr(jsonStr));
+        console.log(standardReq.getJsonstr());
+        that.client.shopVipUserStatusEdit(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+
+            if (res.code == 0) {
+              that.$message({
+                showClose: true,
+                message: row.user_name + '禁用成功!',
+                type: 'success'
+              });
+              // table 重载
+              that.getTableQuery();
+            } else {
+              that.$message({
+                showClose: true,
+                message: row.user_name + '禁用失败',
+                type: 'fail'
+              });
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误码:' + res.code);
+            console.log("err:" + err);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消禁用'
+        });
+      });
+    },
+    // 启用账户
+    enableMember(row) {
+      let that = this;
+      this.$confirm('是否启用用户' + row.user_name + '?', '启用操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const jsonStr = {
+          UuHId: row.uu_h_id,
+          status: 1,//状态 0:禁用 1:启用 9:删除
+        };
+
+        let standardReq = new StandardRequest();
+        standardReq.setShopid(localStorage.shopId);
+        standardReq.setJsonstr(JSON.stringify(jsonStr));
+        standardReq.setSign(getSignStr(jsonStr));
+        console.log(standardReq.getJsonstr());
+        that.client.shopVipUserStatusEdit(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+
+            if (res.code == 0) {
+              that.$message({
+                showClose: true,
+                message: row.user_name + '启用成功!',
+                type: 'success'
+              });
+              // table 重载
+              that.getTableQuery();
+            } else {
+              that.$message({
+                showClose: true,
+                message: row.user_name + '启用失败',
+                type: 'fail'
+              });
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误码:' + res.code);
+            console.log("err:" + err);
+          }
+        })
+
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消启用'
+        });
+      });
+    },
+    // 删除
+    deleteMember() {
+      let that = this;
+      let row = this.tableRadio;
+      if (that.tableRadio.length == 0) {
+        that.$message.error("请先选中一条记录");
+        return false
+      }
+      const jsonStr = {
+        UuHId: row.uu_h_id,
+        status: 9,//状态 0:禁用 1:启用 9:删除
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      standardReq.setSign(getSignStr(jsonStr));
+      console.log(standardReq.getJsonstr());
+
+      this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        that.client.shopVipUserStatusEdit(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+
+            if (res.code == 0) {
+              that.$message({
+                showClose: true,
+                message: '选中的会员已删除!',
+                type: 'success'
+              });
+              // table 重载
+              that.getTableQuery();
+            } else {
+              that.$message({
+                showClose: true,
+                message: row.user_name + '删除失败',
+                type: 'fail'
+              });
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误码:' + res.code);
+            console.log("err:" + err);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    // 关闭所有对话框
+    allDialogClose() {
+      this.dialogVisible = false;
+      this.dialogGift = false;
+      this.dialogLesson = false;
+      this.dialogExpTime = false;
+      this.dialogLessonTable = false;
+    },
+    // 有效期调整
+    ExpTimeChange() {
+      // 仅针对年费用户,使用日期格式
+      this.allDialogClose();
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      if (parseInt(row.vip_type) == 2) {
+        this.$message({
+          showClose: true,
+          message: '错了哦,充值会员不能调整有效期',
+          type: 'error'
+        });
+        return false
+      }
+      this.form.rowName = row.user_name;
+      this.form.userId = row.uu_user_id;
+      this.dialogVisible = true;
+      this.dialogExpTime = true;
+    },
+    // 课时调整
+    lessonChange() {
+      this.allDialogClose();
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      this.form.userId = row.uu_h_id;//调整课时使用
+      this.form.rowName = row.user_name;//赋值操作的用户名
+      this.form.expTime = row.exp_time//赋值当前用户的到期时间
+      this.form.normalhour = row.remain_normalhour;//赋值当前用户的课时
+      this.form.gifthour = row.remain_gifthour;//赋值当前用户的赠送课时
+      this.form.vipType = row.vip_type;//赋值当前用户的会员类型
+      this.form.newnormalhour = 0;//赋值新增加的课时
+      this.form.newgifthour = 0;//赋值新增加的赠送课时
+      this.dialogLesson = true;
+      this.dialogVisible = true;
+    },
+
+    // 增删会员课程
+    lessonStudenChange() {
+      let that = this;
+      this.allDialogClose();
+      // 重载课程列表选项
+      this.form.dialogValue = [];
+      this.panelSelect();
+      if (this.tableRadio.length == 0) {
+        that.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      this.form.rowName = row.user_name;
+      this.form.userId = row.uu_user_id;
+      //查询该用户开通课程
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        UuUserId: row.uu_user_id
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      standardReq.setSign(getSignStr(jsonStr));
+      console.log(standardReq.getJsonstr());
+      that.client.vipUserClassQuery(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+
+          if (res.rs) {
+            console.log(res);
+            res.rs.map(function (item) {
+              that.form.dialogValue.push(item.class_id)
+            })
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误码:' + res.code);
+          console.log("err:" + JSON.parse(err));
         }
+      })
+
+      this.dialogVisible = true;
+      this.dialogLessonTable = true;
+    },
+    // 确认提交新增会员
+    confirmMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.phone) {
+        this.$message.error('错了哦,手机号不能为空');
+        return false
+      }
+      if (!globalCheckPhone(that.form.phone)) {
+        this.$message.error('错了哦,手机号格式不正确');
+        return false
+      }
+      if (!that.form.name) {
+        this.$message.error('错了哦,会员名不能为空');
+        return false
+      }
+      if (that.form.name.length > 8) {
+        this.$message.error('错了哦,会员名字数超过8个字');
+        return false
+      }
+      if (that.form.memo) {
+        if (that.form.memo.length > 200) {
+          this.$message.error('错了哦,备注字数超过200个字');
+          return false
+        }
+      }
+
+      if (!that.form.height) {
+        this.$message.error('错了哦,身高不能为空');
+        return false
+      }
+      if (!that.form.weight) {
+        this.$message.error('错了哦,体重不能为空');
+        return false
+      }
+      if (!that.form.birthday) {
+        this.$message.error('错了哦,出生年份不能为空');
+        return false
+      }
+
+      // 课程添加使用字符串形式
+      let curClasslist = '';
+      if (that.form.classlist) {
+        curClasslist = that.form.classlist.toString();
+      }
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        phone: that.form.phone,
+        name: that.form.name,
+        vipType: that.form.vipType,
+        normalhour: that.form.normalhour,
+        gifthour: that.form.gifthour,
+        classList: curClasslist,
+        memo: that.form.memo,
+        height: that.form.height,
+        weight: that.form.weight,
+        staticHr: that.form.staticHr,
+        sex: that.form.sex,
+        expTime: getDate(1, 0),
+        headIconUrl: that.form.head,
+        birthday: nonTfmtDatetoLength(that.form.birthday, 10)
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setSign(getSignStr(jsonStr));
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      console.log(standardReq.getJsonstr());
+      that.client.shopVipUserAdd(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+
+          if (res.code == 0) {
+            // 关闭弹窗
+            that.dialogMemberVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '会员添加成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      })
+    },
+    confirmEditMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.phone) {
+        this.$message.error('错了哦,手机号不能为空');
+        return false
+      }
+      if (!globalCheckPhone(that.form.phone)) {
+        this.$message.error('错了哦,手机号格式不正确');
+        return false
+      }
+      if (!that.form.name) {
+        this.$message.error('错了哦,会员名不能为空');
+        return false
+      }
+      if (that.form.name.length > 8) {
+        this.$message.error('错了哦,会员名字数超过8个字');
+        return false
+      }
+      if (that.form.memo) {
+        if (that.form.memo.length > 200) {
+          this.$message.error('错了哦,备注字数超过200个字');
+          return false
+        }
+      }
+      if (!that.form.height) {
+        this.$message.error('错了哦,身高不能为空');
+        return false
+      }
+      if (!that.form.weight) {
+        this.$message.error('错了哦,体重不能为空');
+        return false
+      }
+      if (!that.form.birthday) {
+        this.$message.error('错了哦,出生年份不能为空');
+        return false
+      }
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        uuUserId: that.form.Id,
+        phone: that.form.phone,
+        name: that.form.name,
+        memo: that.form.memo,
+        height: that.form.height,
+        weight: that.form.weight,
+        staticHr: that.form.staticHr,
+        sex: that.form.sex,
+        headIconUrl: that.form.head,
+        birthday: nonTfmtDatetoLength(that.form.birthday, 10)
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setSign(getSignStr(jsonStr));
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      console.log(standardReq.getJsonstr());
+      that.client.shopVipUserEdit(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+
+          if (res.code == 0) {
+            // 关闭弹窗
+            that.dialogMemberVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '会员信息修改成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          console.log(err);
+          that.$message.error(res.message + ',错误码:' + res.code);
+        }
+      })
+    },
+    // 确认提交课时
+    confirmLesson() {
+      let that = this;
+      const jsonStr = {
+        UuHId: that.form.userId,
+        chgVipType: that.form.vipType,
+        chgNormalHour: that.form.newnormalhour,
+        chgGiftHour: that.form.newgifthour,
+        chgExpTime: nonTfmtDatetoLength(that.form.expTime, 10),
+      };
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setSign(getSignStr(jsonStr));
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      console.log(standardReq.getJsonstr());
+      that.client.vipHourEdit(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+
+          if (res.code == 0) {
+            // 关闭弹窗
+            that.dialogVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '课时调整成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      })
+    },
+    // 确认提交会员课程
+    confirmLessonTable() {
+      let that = this;
+      // checkNum
+      let classList = that.form.dialogValue ? that.form.dialogValue.toString() : '';
+
+      //含参数调用过程
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        UuUserId: that.form.userId,
+        classList: classList
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setSign(getSignStr(jsonStr));
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      console.log(standardReq.getJsonstr());
+      that.client.vipClassRelationEdit(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+
+          if (res.code == 0) {
+            console.log(res);
+            // 关闭弹窗
+            that.dialogVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '会员课程调整成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误码:' + res.code);
+          console.log("err:" + err);
+        }
+      })
+    },
+    // 加载课程列表选项
+    panelSelect() {
+      let that = this;
+      let jsonStr = {
+        shopId: localStorage.shopId,
+        classType: 1,    //课程类型 0:选课时不显示 1:选课显示 ,基本上都是选1
+        start: 1,
+        tableMax: 99
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setSign(getSignStr(jsonStr));
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+
+      that.client.classQuery(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code ==0) {
+            that.form.dialogdata = turnClassResToOption(res.rs);
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          console.log("err:" + err.toObject);
+          let res = JSON.parse(err);
+          that.$message.error(res.message + ',错误代码:' + res.code);
+        }
+      })
+    },
+    // 新增会员
+    addMember() {
+      this.clearForm();
+      this.panelSelect();
+      this.dialogMemberVisible = true;
+      this.btnType = 0;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增会员'
+      this.pullRight = true;
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      that.serachBtnStatus = true;
+      that.getTableQuery();
+      this.pageshow = false;//让分页隐藏
+      this.$nextTick(() => {//重新渲染分页
+        this.pageshow = true;
+      });
+      that.$message.success('查询完毕');
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
+        }
+      }, 1000)
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.head = '';
+      this.imageUrl = '';
+      this.form.phone = '';
+      this.form.memo = '';
+      this.form.normalhour = 0;
+      this.form.gifthour = 0;
+      this.form.height = '';
+      this.form.weight = '';
+      this.form.staticHr = '';
+      this.form.sex = 1;
+      this.form.birthday = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+      this.form.classlist = [];
+    },
+    // 页面数据查询
+     getTableQuery() {
+      let that = this;
+      that.loading = true;
+      that.allTableData = [];
+      that.recordsTotal = 0;
+      let jsonStr = {
+        shopId: localStorage.shopId,
+        vipType: that.panel.vipType,
+        name: that.panel.name,
+        phone: that.panel.phone,
+        expDay: that.panel.expDay,
+        start: that.start,
+        tableMax: that.pageination.pageItem
+      };
+
+      let standardReq = new StandardRequest();
+      standardReq.setShopid(localStorage.shopId);
+      standardReq.setSign(getSignStr(jsonStr));
+      standardReq.setJsonstr(JSON.stringify(jsonStr));
+      console.log(standardReq.getJsonstr());
+      console.log(localStorage.token);
+
+      that.allTableData = [];
+      that.recordsTotal = 0;
+
+      that.client.shopVipUserQuery(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+
+          that.loading = false;
+          if (res.rs) {
+            that.allTableData = res.rs;
+            that.recordsTotal = res.pagecount * that.pageination.pageItem;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      that.getTableQuery();
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
+        return '无有效期';
+      } else {
+        return nonTfmtDatetoLength(column, 10);
+      }
+    },
+    // 海报上传成功
+    getShopImages(url) {
+      this.imageUrl = url;
+      this.form.head = url;
     }
+  },
+  components: {
+    cropper
+  }
+}
 </script>
 
 <style scoped>
-    @import "../../assets/css/panel.css";
-
-    .context {
-        border-radius: 12px;
-        /*  height: 770px;*/
-        overflow-y: scroll;
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-        padding-bottom: 30px;
-    }
+@import "../../assets/css/panel.css";
 
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
+.context {
+  border-radius: 12px;
+  /*  height: 770px;*/
+  overflow-y: scroll;
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+  padding-bottom: 30px;
+}
 
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
 
-    .change button {
-        float: left;
-    }
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
 
-    .change button.pull-right {
-        float: right;
-    }
+.change button {
+  float: left;
+}
 
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
+.change button.pull-right {
+  float: right;
+}
 
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
 
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799FF;
+  margin: 0;
+}
 
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
 
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
+.dialogFooter {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin-top: 20px;
+}
 
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+.dialogFooter button {
+  margin-left: 10px;
+}
 
-    .dialogContent .pull-left {
-        width: 40%;
-        float: left;
-    }
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    .dialogContent .pull-right {
-        width: 60%;
-        float: right;
-    }
+.dialogContent .pull-left {
+  width: 40%;
+  float: left;
+}
 
-    .tabwild {
-        width: 100% !important;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+.dialogContent .pull-right {
+  width: 60%;
+  float: right;
+}
 
-    .lessonSpan {
-        width: 78px;
-        height: 22px;
-        border-radius: 11px;
-        margin-right: 5px;
-        float: left;
-        margin-bottom: 3px;
-        text-align: center;
-        color: #000;
-        font-size: 12px;
-    }
+.tabwild {
+  width: 100% !important;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    .btn {
-        float: left !important;
-        margin-right: 5px;
-    }
+.lessonSpan {
+  width: 78px;
+  height: 22px;
+  border-radius: 11px;
+  margin-right: 5px;
+  float: left;
+  margin-bottom: 3px;
+  text-align: center;
+  color: #000;
+  font-size: 12px;
+}
 
-    /deep/ table .el-button+.el-button {
-        margin-left: 0;
-        margin-right: 3px;
-        /*float: left;*/
-        padding: 7px 6px;
-    }
+.btn {
+  float: left !important;
+  margin-right: 5px;
+}
 
-    table {
-        width: 100%;
-        display: block;
-        margin: 0 auto;
-        overflow: scroll;
+/deep/ table .el-button + .el-button {
+  margin-left: 0;
+  margin-right: 3px;
+  /*float: left;*/
+  padding: 7px 6px;
+}
 
-    }
+table {
+  width: 100%;
+  display: block;
+  margin: 0 auto;
+  overflow: scroll;
 
-    .pull-left /deep/ .el-form .el-form-item {
-        width: 50%;
-        float: left;
-    }
+}
 
-    .pull-left /deep/ .el-form-item__content {
-        margin-left: 20px;
-    }
+.pull-left /deep/ .el-form .el-form-item {
+  width: 50%;
+  float: left;
+}
 
-    .pull-left .el-input-number {
-        width: 130px;
-    }
+.pull-left /deep/ .el-form-item__content {
+  margin-left: 20px;
+}
 
-    .cell img {
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+.pull-left .el-input-number {
+  width: 130px;
+}
 
-    .el-date-editor.el-input__inner {
-        width: 156px;
-    }
+.cell img {
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    .avatar-uploader {
-        /*border: 1px solid #ccc;*/
-        cursor: pointer;
-        border-radius: 5px;
-    }
+.el-date-editor.el-input__inner {
+  width: 156px;
+}
 
-    /deep/ .el-upload {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+.avatar-uploader {
+  /*border: 1px solid #ccc;*/
+  cursor: pointer;
+  border-radius: 5px;
+}
 
-    /deep/ .el-upload img {
-        width: 70px;
-        height: 70px;
-        float: left;
-    }
+/deep/ .el-upload {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    .relevance {
-        margin-top: 10px;
-    }
+/deep/ .el-upload img {
+  width: 70px;
+  height: 70px;
+  float: left;
+}
+
+.relevance {
+  margin-top: 10px;
+}
 </style>

+ 656 - 619
src/views/User/relevancePhone.vue

@@ -1,653 +1,690 @@
 <template>
-    <div class="context">
-        <el-page-header @back="goBack" content="关联手机号"></el-page-header>
-        <div class="panel">
-            <br>
-            <h5> {{regionName}}</h5>
-        </div>
-        <div class="change">
-            <el-button @click="addMember" type="primary">新增手机号</el-button>
-            <el-button @click="editList">编辑手机号</el-button>
-        </div>
-        <div class="table">
-            <el-table
-                    :data="tableData"
-                    border
-                    is-horizontal-resize
-                    :default-sort="{prop: 'date', order: 'descending'}"
-                    element-loading-background="rgba(0, 0, 0, 0.8)"
-                    class=""
-                    @selection-change="handleSelectionChange" @current-change="clickChange"
-
-            >
-                <el-table-column label="选择" width="55">
-                    <template slot-scope="scope">
-                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-                        width="50">
-                </el-table-column>
-                <el-table-column
-                        prop="UserName"
-                        label="主账号用户名"
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="UserPhone"
-                        label="手机号"
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="状态"
-                >
-                    <!--1:启用  8:暂停  9:删除-->
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.Status == 1" style="color: yellowgreen">启用</span>
-                        <span v-if="scope.row.Status == 8" style="color: yellow">暂停</span>
-                        <span v-if="scope.row.Status == 9" style="color: red">删除</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="Memo"
-                        label="备注"
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="UserPhone"
-                        label="操作">
-                    <template slot-scope="scope">
-                        <el-button type="danger" size="mini"
-                                   @click="pauseRowDel(scope.row)">
-                            删除
-                        </el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination
-                    background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
-                    @current-change="pageChange"
-            ></el-pagination>
-        </div>
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
-            <div class="dialogContent">
-                <div class="">
-                    <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="手机号">
-                            <el-input v-model="form.phone"></el-input>
-                        </el-form-item>
-                        <el-form-item label="备注">
-                            <el-input v-model="form.memo" placeholder="姓名或家庭关系"></el-input>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
-                </el-button>
-                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
+  <div class="context">
+    <el-page-header @back="goBack" content="关联手机号"></el-page-header>
+    <div class="panel">
+      <br>
+      <h5> {{ regionName }}</h5>
     </div>
-</template>
-
-<script>
-    import Global from '../../Global.js'
-    import {
-        testTable,
-        ShopManagerStatusEdit,
-        VipUserAssociatedPhoneSimpleQuery,
-        VipUserAssociatedPhoneAdd,
-        EditShopVenueEquip,
-        VipUserAssociatedPhoneEdit,
-        VipUserAssociatedPhoneDel,
-        VipUserAssociatedPhoneStatusEdit
-    } from "../../api/getApiRes";
+    <div class="change">
+      <el-button @click="addPhone" type="primary">新增手机号</el-button>
+      <el-button @click="editPhone" type="info">编辑手机号</el-button>
+      <el-button @click="enablePhone" type="success">启用手机号</el-button>
+      <el-button @click="disablePhone" type="warning">禁用手机号</el-button>
+      <el-button @click="deletePhone" type="danger">删除手机号</el-button>
+    </div>
+    <div class="table">
+      <el-table
+          :data="tableData"
+          border
+          is-horizontal-resize
+          :default-sort="{prop: 'date', order: 'descending'}"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+          class=""
+          @selection-change="handleSelectionChange" @current-change="clickChange"
 
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                regionName: '',
-                dialogVisible: false,
-                dialogMemberVisible: false,
-                dialogTitle: '新增手机号',
-                // panel 配置项目
-                multipleSelection: [],
-                tableRadio: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    phone: '',
-                    memo: '',
-                    eqId: '',
-                    eqSn: '',
-                    name: '',
-                    version: '',
-                    userCode: '',
-                    shopId: '',
-                    pId: '',
-                    btnType: 0,
-                    equipType: 1,
-                },
-                options: [
-                    {value: 1, label: 'TVBox'},
-                    {value: 2, label: 'BLEHub'},
-                ],
-                shops: [],
-                tableData: [],
-                serachBtnStatus: false,
-            }
-        },
-        mounted() {
-            this.regionName = this.$route.query.name;
-            this.getTableQuery();
-        },
-        methods: {
-            goBack() {
-                this.$router.push({
-                    path: '/member', query: {}
-                });
-            },
-            // 删除
-            pauseRowDel(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    userId: this.$route.query.userId,
-                    pId: row.PId,
-                };
-                let postdata = qs.stringify(param);
-                this.$confirm('此操作将永久删除该手机号, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    VipUserAssociatedPhoneDel(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的手机号已删除!',
-                                type: 'success'
-                            });
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.phone = '';
-                this.form.memo = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-                this.form.eqSn = '';
-                this.form.version = '';
-                this.form.pId = '';
-                this.form.equipType = 1;
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 新增手机号
-            addMember() {
-                this.clearForm();
-                this.dialogMemberVisible = true;
-                this.form.btnType = 0;
-                this.dialogTitle = '新增手机号'
-            },
-            clickChange(item) {
-                this.tableRadio = item
-            },
-            // 删除
-            delList() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let userId = this.tableRadio.Id;
+      >
+        <el-table-column label="选择" width="55">
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column
+            type="index"
+            label="序号"
+            align="center"
+            width="50">
+        </el-table-column>
+        <el-table-column
+            prop="user_name"
+            label="用户名"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="user_phone"
+            label="手机号"
+        >
+        </el-table-column>
 
-                let param = {
-                    key: localStorage.ServiceKey,
-                    shopId: localStorage.ServiceId,
-                    svId: this.$route.query.svId,
-                    eqId: this.tableRadio.EqId,
-                    status: 9,//1:启用 8:暂停 9:删除
-                };
-                let postdata = qs.stringify(param);
+        <el-table-column
+            prop="is_main"
+            label="类型"
+        >
+          <template slot-scope="scope">
+            <span v-if="scope.row.is_main == 1">主手机号</span>
+            <span v-else>关联手机</span>
+          </template>
+        </el-table-column>
 
-                this.$confirm('此操作将永久删除该手机号, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    VipUserAssociatedPhoneStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的手机号已删除!',
-                                type: 'success'
-                            });
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            // 编辑
-            editList() {
-                let that = this;
-                this.clearForm();
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.shopid = row.ShopId;
-                this.form.userId = row.Id;
-                this.form.name = row.Name;
-                this.form.phone = row.UserPhone;
-                this.form.userCode = row.Usercode;
-                this.form.pId = row.PId;
-                this.form.password = '';
-                this.form.eqId = row.EqId;
-                this.form.equipType = row.EquipType;
-                this.form.memo = row.Memo;
-                this.form.adminType = row.AdminType;
-                this.dialogVisible = true;
-                this.dialogTitle = '编辑手机号';
-                this.form.btnType = 1;
-                this.dialogMemberVisible = true
-            },
-            // 确认提交新增手机号
-            confirmMember() {
-                let that = this;
+        <el-table-column
+            prop="memo"
+            label="备注"
+        >
+        </el-table-column>
 
-                if (!that.form.phone) {
-                    this.$message.error('错了哦,手机号码不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.phone)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
+        <el-table-column
+            prop="status"
+            label="状态"
+        >
+          <!--1:启用  8:暂停  9:删除-->
+          <template slot-scope="scope">
+            <span v-if="scope.row.status == 1" style="color: yellowgreen">启用</span>
+            <span v-if="scope.row.status == 0" style="color: red">禁用</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <el-pagination
+          background
+          :total="pageination.total"
+          :page-size="pageination.pageItem"
+          @current-change="pageChange"
+      ></el-pagination>
+    </div>
+    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+      <div class="dialogContent">
+        <div class="">
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="手机号">
+              <el-input v-model="form.phone"></el-input>
+            </el-form-item>
+            <el-form-item label="备注">
+              <el-input v-model="form.memo" placeholder="姓名或家庭关系"></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAdd">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEdit">确定</el-button>
+        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
 
-                let param = {
-                    token: localStorage.token,
-                    userId: this.$route.query.userId,
-                    phone: this.form.phone,
-                    memo: this.form.memo,
-                };
-                let postdata = qs.stringify(param);
-                VipUserAssociatedPhoneAdd(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '所属设备添加成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            confirmEditMember() {
-                let that = this;
-                console.log(that.form.version.length);
+<script>
+import Global from '../../Global.js'
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
 
-                // checkNum
-                if (!that.form.phone) {
-                    this.$message.error('错了哦,手机号码不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.phone)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-                let param = {
-                    token: localStorage.token,
-                    userId: this.$route.query.userId,
-                    phone: this.form.phone,
-                    memo: this.form.memo,
-                    pId: this.form.pId,
-                };
-                let postdata = qs.stringify(param);
-                VipUserAssociatedPhoneEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '手机号信息编辑成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 查询按钮
-            query() {
-                // 按钮倒计时
-                let that = this;
-                that.serachBtnStatus = true;
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000);
+let qs = require('qs');
 
-                this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    userId: this.$route.query.userId,
-                };
-                let postdata = qs.stringify(param);
-                VipUserAssociatedPhoneSimpleQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.Rs.length;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                // that.getTableQuery();
-            },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return nonTfmtDate(column, 11);
-            },
-            // 暂停
-            pause(row) {
-                let that = this;
-                console.log(row);
-                this.$confirm('是否暂停设备' + row.EqSn + '?', '暂停操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
+export default {
+  data() {
+    return {
+      regionName: '',
+      dialogVisible: false,
+      dialogMemberVisible: false,
+      dialogTitle: '新增手机号',
+      // panel 配置项目
+      multipleSelection: [],
+      tableRadio: [],
+      pageination: {
+        pageItem: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        pId: '',
+        shopId: '',
+        name: '',
+        phone: '',
+        memo: '',
+        btnType: 0
+      },
+      shops: [],
+      tableData: [],
+      serachBtnStatus: false,
+    }
+  },
+  mounted() {
+    this.regionName = this.$route.query.name;
+    this.getTableQuery();
+  },
+  methods: {
+    goBack() {
+      this.$router.push({
+        path: '/member', query: {}
+      });
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.phone = '';
+      this.form.memo = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+      this.form.eqSn = '';
+      this.form.pId = '';
+      this.form.equipType = 1;
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    // 新增手机号
+    addPhone() {
+      this.clearForm();
+      this.dialogMemberVisible = true;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增手机号'
+    },
+    // 编辑
+    editPhone() {
+      this.clearForm();
+      if (this.tableRadio == null || this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      if (row.is_main === 1) {
+        this.$message.error("主手机信息请在会员管理页修改");
+        return false
+      }
+      this.form.shopid = this.$route.query.shopId;
+      this.form.userId = this.$route.query.userId;
+      this.form.name = row.user_name;
+      this.form.phone = row.user_phone;
+      this.form.pId = row.p_id;
+      this.form.userCode = row.usercode;
+      this.form.memo = row.memo;
+      this.dialogVisible = true;
+      this.dialogTitle = '编辑手机号';
+      this.form.btnType = 1;
+      this.dialogMemberVisible = true
+    },
+    // 确认提交新增手机号
+    confirmAdd() {
+      let that = this;
+      if (!that.form.phone) {
+        this.$message.error('错了哦,手机号码不能为空');
+        return false
+      }
+      if (!globalCheckPhone(that.form.phone)) {
+        this.$message.error('错了哦,手机号格式不正确');
+        return false
+      }
+      if (that.form.memo) {
+        if (that.form.memo.length > 200) {
+          this.$message.error('错了哦,备注字数超过200个字');
+          return false
+        }
+      }
+      const jsonStr = {
+        UuUserId: this.$route.query.userId,
+        shopId: this.$route.query.shopId,
+        otherPhone: that.form.phone,
+        memo: that.form.memo
+      };
+      console.log(jsonStr);
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.vipOtherPhoneAdd(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            // 关闭弹窗
+            that.dialogMemberVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '添加成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 确认提交编辑手机号
+    confirmEdit() {
+      let that = this;
+      if (!that.form.phone) {
+        this.$message.error('错了哦,手机号码不能为空');
+        return false
+      }
+      if (!globalCheckPhone(that.form.phone)) {
+        this.$message.error('错了哦,手机号格式不正确');
+        return false
+      }
+      if (that.form.memo) {
+        if (that.form.memo.length > 200) {
+          this.$message.error('错了哦,备注字数超过200个字');
+          return false
+        }
+      }
+      const jsonStr = {
+        pid: that.form.pId,
+        otherPhone: that.form.phone,
+        memo: that.form.memo
+      };
+      console.log(jsonStr);
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.vipOtherPhoneEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            // 关闭弹窗
+            that.dialogMemberVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '手机号信息编辑成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 启用手机号
+    enablePhone() {
+      let that = this;
+      if (this.tableRadio == null || this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      if (row.status === 1) {
+        this.$message.error("该账号目前没有被禁用");
+        return false
+      }
+      if (row.is_main === 1) {
+        this.$message.error("主手机账号无法操作");
+        return false
+      }
+      this.$confirm('是否开启' + row.user_phone + '?', '启用操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const jsonStr = {
+          pid: row.p_id,
+          status: 1
+        };
+        console.log(jsonStr);
+        let paraRequest = new StandardRequest();
+        paraRequest.setShopid(localStorage.shopId);
+        paraRequest.setJsonstr(JSON.stringify(jsonStr));
+        paraRequest.setSign(getSignStr(jsonStr));
+        console.log(paraRequest);
+        that.client.vipOtherPhoneStatusEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: row.user_phone + '开启成功!',
+                type: 'success'
+              });
+              // table 重载
+              that.getTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消开启'
+        });
+      });
+    },
+    // 禁用手机号
+    disablePhone() {
+      let that = this;
+      if (this.tableRadio == null || this.tableRadio.length === 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      if (row.status === 0) {
+        this.$message.error("该账号目前没有被启用");
+        return false
+      }
+      if (row.is_main === 1) {
+        this.$message.error("主手机账号无法操作");
+        return false
+      }
 
-                    let param = {
-                        key: localStorage.ServiceKey,
-                        shopId: localStorage.ServiceId,
-                        svId: this.$route.query.svId,
-                        eqId: row.EqId,
-                        status: 8,//1:启用 8:暂停 9:删除
-                    };
+      this.$confirm('是否禁用' + row.user_phone + '?', '禁用操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const jsonStr = {
+          pid: row.p_id,
+          status: 0
+        };
+        console.log(jsonStr);
+        let paraRequest = new StandardRequest();
+        paraRequest.setShopid(localStorage.shopId);
+        paraRequest.setJsonstr(JSON.stringify(jsonStr));
+        paraRequest.setSign(getSignStr(jsonStr));
+        console.log(paraRequest);
+        that.client.vipOtherPhoneStatusEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: row.user_phone + '开启成功!',
+                type: 'success'
+              });
+              // table 重载
+              that.getTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消禁用'
+        });
+      });
+    },
+    // 删除
+    deletePhone() {
+      let that = this;
+      if (this.tableRadio == null || this.tableRadio.length === 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      if (row.status === 9) {
+        this.$message.error("该账号目前已被删除");
+        return false
+      }
+      if (row.is_main === 1) {
+        this.$message.error("主手机账号无法删除");
+        return false
+      }
 
-                    let postdata = qs.stringify(param);
-                    VipUserAssociatedPhoneStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.EqSn + '暂停成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消暂停'
-                    });
-                });
-            },
-            // 开启
-            run(row) {
-                let that = this;
-                this.$confirm('是否开启设备' + row.EqSn + '?', '开启操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
+      this.$confirm('是否删除' + row.user_phone + '?', '禁用操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const jsonStr = {
+          pid: row.p_id,
+          status: 9
+        };
+        console.log(jsonStr);
+        let paraRequest = new StandardRequest();
+        paraRequest.setShopid(localStorage.shopId);
+        paraRequest.setJsonstr(JSON.stringify(jsonStr));
+        paraRequest.setSign(getSignStr(jsonStr));
+        console.log(paraRequest);
+        that.client.vipOtherPhoneStatusEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: row.user_phone + '删除成功!',
+                type: 'success'
+              });
+              // table 重载
+              that.getTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    // 查询按钮
+    query() {
+      // 按钮倒计时
+      let that = this;
+      that.serachBtnStatus = true;
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
+        }
+      }, 1000);
 
-                    let param = {
-                        key: localStorage.ServiceKey,
-                        shopId: localStorage.ServiceId,
-                        svId: this.$route.query.svId,
-                        eqId: row.EqId,
-                        status: 1,//1:启用 8:暂停 9:删除
-                    };
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      const jsonStr = {
+        UuUserId: this.$route.query.userId,
+        shopId: this.$route.query.shopId
+      };
+      console.log(jsonStr);
+      let paraRequest = new StandardRequest();
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.vipPhoneQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.loading = false;
+            if (res.rs) {
+              that.allTableData = res.rs;
+              that.recordsTotal = res.rs.length;
+            } else {
+              that.allTableData = [];
+              that.recordsTotal = 0;
+            }
+            // 设置分页数据
+            that.setPaginations();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      return nonTfmtDate(column, 11);
+    },
 
-                    let postdata = qs.stringify(param);
-                    VipUserAssociatedPhoneStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.EqSn + '开启成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消开启'
-                    });
-                });
-            },
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'relevancePhone') {
-                    this.getTableQuery();
-                }
-            },
-        },
-    }
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'relevancePhone') {
+        this.getTableQuery();
+      }
+    },
+  },
+}
 </script>
 
 <style scoped>
-    @import "../../assets/css/panel.css";
+@import "../../assets/css/panel.css";
 
-    .context {
-        /* height: 770px; */
-        overflow-y: scroll;
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
 
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-        padding-bottom: 60px;
-    }
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+  padding-bottom: 60px;
+}
 
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
 
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
 
-    .change button {
-        float: left;
-    }
+.change button {
+  float: left;
+}
 
-    .change button.pull-right {
-        float: right;
-    }
+.change button.pull-right {
+  float: right;
+}
 
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
 
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799FF;
+  margin: 0;
+}
 
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
 
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
 
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
 
-    /deep/ .el-date-editor .el-range__icon {
-        line-height: 22px;
-    }
+/deep/ .el-date-editor .el-range__icon {
+  line-height: 22px;
+}
 
-    .panel /deep/ .el-date-editor .el-range-separator {
-        line-height: 22px;
-    }
+.panel /deep/ .el-date-editor .el-range-separator {
+  line-height: 22px;
+}
 
-    /deep/ .el-select {
-        width: 100%;
-    }
+/deep/ .el-select {
+  width: 100%;
+}
 
-    .panel h5 {
-        font-size: 24px;
-    }
+.panel h5 {
+  font-size: 24px;
+}
 
-    /*ipad only*/
-    @media only screen and (max-width: 1366px) {
-        .panel /deep/ .el-date-editor--daterange {
-            width: 100%;
-        }
-    }
+/*ipad only*/
+@media only screen and (max-width: 1366px) {
+  .panel /deep/ .el-date-editor--daterange {
+    width: 100%;
+  }
+}
 
 </style>

+ 730 - 0
src/views/User/tempMember.vue

@@ -0,0 +1,730 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <h5>临时会员</h5>
+      <div class="panel-body">
+        <el-row :gutter="20">
+          <el-col :span="5" style="width: 270px">
+            <em>姓名:</em>
+            <el-input style="margin-left:10px;width: 180px" v-model="panel.name" placeholder="请输入姓名"></el-input>
+          </el-col>
+          <el-col :span="5" style="width: 270px">
+            <em>手机号:</em>
+            <el-input style="margin-left:10px;width: 180px" v-model="panel.phone" placeholder="请输入手机号"
+                      type="number"></el-input>
+          </el-col>
+          <el-col :span="3">
+            <el-button size="" type="primary" @click="query" plain :disabled="searchBtnStatus">查询
+            </el-button>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+    <div class="change">
+      <el-button @click="addMember" type="primary" size="mini">新增临时会员</el-button>
+      <el-button @click="delMember" size="mini">删除临时会员</el-button>
+    </div>
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+                element-loading-background="rgba(0, 0, 0, 0.8)" @selection-change="handleSelectionChange"
+                @current-change="clickChange">
+        >
+        <el-table-column label="选择" width="55" fixed>
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column label="序号" type="index" width="50" align="center" fixed>
+          <template scope="scope">
+            <span>{{ (start) + scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="user_name" label="会员名" width="90" fixed/>
+        <el-table-column prop="usercode" label="手机号" width="110" fixed/>
+        <el-table-column prop="headurl" label="头像" width="50">
+          <template slot-scope="scope">
+            <div class="demo-image__preview" v-if="scope.row.headurl">
+              <el-image style="width: 25px; height: 25px" :src="scope.row.headurl"
+                        :preview-src-list="[scope.row.headurl]">
+              </el-image>
+            </div>
+            <img src="../../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
+          </template>
+        </el-table-column>
+        <el-table-column prop="static_hr" label="静态心率" width="110" align="center" sortable/>
+        <el-table-column prop="height" label="身高(CM)" width="110" align="center" sortable/>
+        <el-table-column prop="weight" label="体重(KG)" width="110" align="center" sortable>
+          <template slot-scope="scope">
+            <span>{{ scope.row.weight }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="sex" label="类型" align="center" width="80px" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.sex == 1">男</span>
+            <span v-if="scope.row.sex == 2">女</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="birthday" label="生日" width="110" :formatter="filterFmtDate" sortable/>
+        <el-table-column prop="memo" label="备注">
+          <template slot-scope="scope">
+            <el-popover placement="top" title="" width="200" trigger="hover" :content="scope.row.memo">
+                            <span slot="reference" v-if="scope.row.memo.length > 6">{{ scope.row.memo.substr(0, 6) }}
+                                ....</span>
+            </el-popover>
+            <span v-if="scope.row.memo.length <= 6">{{ scope.row.memo }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="UserInfo.Status" label="操作" width="160px">
+          <template slot-scope="scope">
+            <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)">编辑</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+                     @current-change="pageChange"
+                     :current-page.sync="cur_page"
+      ></el-pagination>
+    </div>
+
+    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" :width="form.btnType == 1 ?'650px':'650px'">
+      <div class="dialogContent">
+        <div :class="['pull-left',{'tabwild':form.btnType == 1}]">
+          <el-form ref="form" :model="form" label-width="80px">
+            <el-form-item label="手机号" :required="true">
+              <el-input v-model="form.phone"></el-input>
+            </el-form-item>
+            <el-form-item label="会员名" :required="true">
+              <el-input v-model="form.name"></el-input>
+            </el-form-item>
+            <el-form-item label="备注">
+              <el-input v-model="form.memo"></el-input>
+            </el-form-item>
+            <el-form-item label="身高" :required="true">
+              <el-input v-model="form.height" placeholder="cm" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="体重" :required="true">
+              <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="静态心率">
+              <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="性别" :required="true">
+              <el-select v-model="form.sex " placeholder="">
+                <el-option v-for="item in sexOptions" :key="item.value" :label="item.label"
+                           :value="item.value"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="出生年份" :required="true">
+              <el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item label="头像">
+              <div class="upload">
+                <el-upload class="avatar-uploader" :action=domain :http-request=upqiniu
+                           :show-file-list="false" :before-upload="beforeUpload">
+                  <!--<i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
+                </el-upload>
+                <img v-if="imageUrl" :src="imageUrl" class="avatar">
+                <cropper :width="300" :height="300" :fixed-number="[1,1]"
+                         @subUploadSucceed="getShopImages"></cropper>
+                <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
+              </div>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button :disabled="addDisabled" :loading="addDisabled" type="primary" size="small"
+                   v-if="form.btnType == 0" @click="confirmMember">确定
+        </el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
+        </el-button>
+        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+
+</template>
+
+<script>
+import Global from '../../Global.js'
+import ImgCutter from 'vue-img-cutter'
+
+import cropper from '@/components/cropper.vue'
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      imageUrl: '',
+      token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
+      domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
+      qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
+      tableData: [],
+      tableRadio: [],
+      searchBtnStatus: false,
+      addDisabled: false,
+      start: 0,
+      draw: 1,
+      cur_page: 1,
+      dialogTitle: '新增临时会员',
+      dialogMemberVisible: false,//新增会员dialog
+      sexOptions: [
+        {value: 1, label: '男'},//性别 1:男, 2:女
+        {value: 2, label: '女'},
+      ],
+      panel: {
+        usercode: '',
+        username: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        taskstatus: 99,
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        vipType: '',
+        expDay: '',
+        vipOptions: vipOptions(0),
+        endTypeOptions: endTypeOptions(),
+        time1: globalBt(),
+      },
+      multipleSelection: [],
+      pageination: {
+        pageItem: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        phone: '',
+        name: '',
+        userCode: '',
+        shopId: '',
+        Id: '',
+        userId: '',
+        height: '',
+        weight: '',
+        staticHr: '',
+        head: '',
+        birthday: '',
+        sex: 1,
+        vipType: 1,
+        normalhour: 0,
+        newnormalhour: 0,
+        gifthour: 0,
+        newgifthour: 0,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        expTime: '',
+        classlist: [],
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+    }
+  },
+  mounted() {
+    // 读取列表
+    this.getTableQuery();
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'tempMember') {
+        // 读取列表
+        this.getTableQuery();
+      }
+    },
+  },
+  methods: {
+    addMember() {
+      this.clearForm();
+      this.dialogMemberVisible = true;
+      this.btnType = 0;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增临时会员'
+    },
+    // 确认提交新增会员
+    confirmMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.phone) {
+        this.$message.error('错了哦,手机号不能为空');
+        return false
+      }
+      if (!globalCheckPhone(that.form.phone)) {
+        this.$message.error('错了哦,手机号格式不正确');
+        return false
+      }
+      if (!that.form.name) {
+        this.$message.error('错了哦,会员名不能为空');
+        return false
+      }
+      if (that.form.name.length > 8) {
+        this.$message.error('错了哦,会员名字数超过8个字');
+        return false
+      }
+      if (that.form.memo) {
+        if (that.form.memo.length > 200) {
+          this.$message.error('错了哦,备注字数超过200个字');
+          return false
+        }
+      }
+      if (!that.form.height) {
+        this.$message.error('错了哦,身高不能为空');
+        return false
+      }
+      if (!that.form.weight) {
+        this.$message.error('错了哦,体重不能为空');
+        return false
+      }
+      if (!that.form.birthday) {
+        this.$message.error('错了哦,出生年份不能为空');
+        return false
+      }
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        phone: that.form.phone,
+        name: that.form.name,
+        sex: that.form.sex,
+        birthday: nonTfmtDatetoLength(that.form.birthday, 10),
+        height: that.form.height,
+        weight: that.form.weight,
+        staticHr: that.form.staticHr,
+        headIconUrl: that.form.head,
+        memo: that.form.memo,
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.tempVipUserAdd(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            // 关闭弹窗
+            that.dialogMemberVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '临时会员添加成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    delMember() {
+      let that = this;
+      if (this.tableRadio.length == 0) {
+        that.$message.error("请先选中一条记录");
+        return false
+      }
+      this.$confirm('此操作将永久删除该临时会员, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+
+        const jsonStr = {
+          UuTuId: this.tableRadio.uu_tu_id,
+          status: 9 //0:禁用  1:启用 9:删除
+        };
+
+        let paraRequest = new StandardRequest();
+        paraRequest.setShopid(localStorage.shopId);
+        paraRequest.setJsonstr(JSON.stringify(jsonStr));
+        paraRequest.setSign(getSignStr(jsonStr));
+        console.log(paraRequest);
+
+        that.client.tempVipUserStatusEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: '选中的临时会员已删除!',
+                type: 'success'
+              });
+              // 重载列表
+              that.getTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
+          } else {
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    clickChange(item) {
+      this.tableRadio = item
+    },
+
+    // 编辑
+    editMember(row) {
+      let that = this;
+      this.clearForm();
+      this.form.tuId = row.uu_tu_id;
+      this.form.name = row.user_name;
+      this.form.shopId = row.shop_id;
+      this.form.phone = row.usercode;
+      this.imageUrl = row.headurl;
+      this.form.sex = row.sex;
+      this.form.birthday = row.birthday;
+      this.form.height = row.height;
+      this.form.weight = row.weight;
+      this.form.staticHr = row.static_hr;
+      this.form.memo = row.memo;
+      this.form.btnType = 1;
+      this.dialogMemberVisible = true;
+      this.dialogTitle = '编辑会员'
+    },
+    confirmEditMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.phone) {
+        this.$message.error('错了哦,手机号不能为空');
+        return false
+      }
+      if (!globalCheckPhone(that.form.phone)) {
+        this.$message.error('错了哦,手机号格式不正确');
+        return false
+      }
+      if (!that.form.name) {
+        this.$message.error('错了哦,会员名不能为空');
+        return false
+      }
+      if (that.form.name.length > 8) {
+        this.$message.error('错了哦,会员名字数超过8个字');
+        return false
+      }
+      if (that.form.memo) {
+        if (that.form.memo.length > 200) {
+          this.$message.error('错了哦,备注字数超过200个字');
+          return false
+        }
+      }
+      if (!that.form.height) {
+        this.$message.error('错了哦,身高不能为空');
+        return false
+      }
+      if (!that.form.weight) {
+        this.$message.error('错了哦,体重不能为空');
+        return false
+      }
+      if (!that.form.birthday) {
+        this.$message.error('错了哦,出生年份不能为空');
+        return false
+      }
+      const jsonStr = {
+        token: localStorage.token,
+        UuTuId: that.form.tuId,
+        name: that.form.name,
+        phone: that.form.phone,
+        memo: that.form.memo,
+        birthday: nonTfmtDatetoLength(that.form.birthday, 10),
+        sex: that.form.sex,
+        staticHr: that.form.staticHr,
+        headIconUrl: that.form.head,
+        height: that.form.height,
+        weight: that.form.weight
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.tempVipUserEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            // 关闭弹窗
+            that.dialogMemberVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '会员信息编辑成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 验证文件合法性
+    beforeUpload(file) {
+      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+      const isLt2M = file.size / 1024 / 1024 < 70;
+      if (!isJPG) {
+        this.$message.error('上传头像图片只能是 JPG 格式!')
+      }
+      if (!isLt2M) {
+        this.$message.error('上传头像图片大小不能超过 70MB!')
+      }
+      return isJPG && isLt2M
+    },
+    cutDown(e) {
+      console.log(e);
+      this.imageUrl = e.dataURL;
+      this.upqiniu(e);
+    },
+    // 上传文件到七牛云
+    upqiniu(req) {
+      let that = this;
+      const config = {
+        headers: {'Content-Type': 'multipart/form-data'}
+      };
+      let filetype = '';
+      if (req.file.type === 'image/png') {
+        filetype = 'png'
+      } else {
+        filetype = 'jpg'
+      }
+      // 重命名要上传的文件
+      const keyname = 'GoAllOut' + new Date().valueOf() + Math.floor(Math.random() * 100) + '.' + filetype;
+      // 从后端获取上传凭证token
+      let param = {
+        token: localStorage.token,
+      };
+      let postdata = qs.stringify(param);
+      this.axios.post(headapi + 'v1/QiNiu/GetSimpleQiNiuToken', postdata).then(res => {
+        const formdata = new FormData();
+        formdata.append('file', req.file);
+        formdata.append('token', res.data.QiNinToken);
+        formdata.append('key', keyname);
+        // 获取到凭证之后再将文件上传到七牛云空间
+        this.axios.post(this.domain, formdata, config).then(res => {
+          this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key;
+          this.form.head = 'http://' + this.qiniuaddr + '/' + keyname;
+        })
+      })
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      that.serachBtnStatus = true;
+      that.getTableQuery();
+      that.$message.success('查询完毕');
+      let totalTime = 2
+      let clock = window.setInterval(() => {
+        totalTime--
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
+        }
+      }, 1000)
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        name: that.panel.name,
+        phone: that.panel.phone,
+        start: that.start,
+        tableMax: that.pageination.pageItem
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.tempVipUserQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.loading = false;
+            if (res.rs) {
+              that.allTableData = res.rs;
+              that.recordsTotal = res.pagecount * that.pageination.pageItem;
+            } else {
+              that.allTableData = [];
+              that.recordsTotal = 0;
+            }
+            // 设置分页数据
+            that.setPaginations();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.head = '';
+      this.imageUrl = '';
+      this.form.phone = '';
+      this.form.memo = '';
+      this.form.normalhour = 0;
+      this.form.gifthour = 0;
+      this.form.height = '';
+      this.form.weight = '';
+      this.form.staticHr = '';
+      this.form.sex = 1;
+      this.form.birthday = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+      this.form.classlist = [];
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      console.log(index);
+      console.log(that.draw);
+      that.getTableQuery();
+    },
+    //过滤时间
+    filterFmtDate(value, row, column) {
+      return nonTfmtDatetoLength(column, 11);
+    },
+    // 海报上传成功
+    getShopImages(url) {
+      this.imageUrl = url;
+      this.form.head = url;
+    }
+  },
+  components: {
+    cropper
+  }
+}
+</script>
+
+<style scoped>
+@import "../../assets/css/panel.css";
+
+.context {
+  border-radius: 12px;
+  /* height: 770px; */
+  overflow-y: scroll;
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+  padding-bottom: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 100%;
+  float: left;
+}
+
+.el-form-item {
+  width: 50%;
+  float: left;
+}
+</style>

+ 0 - 720
src/views/User/tempUser.vue

@@ -1,720 +0,0 @@
-<template>
-    <div class="context">
-        <div class="panel">
-            <h5>临时会员</h5>
-            <div class="panel-body">
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="5">
-                            <em>姓名:</em>
-                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
-                        </el-col>
-                        <el-col :span="5">
-                            <em>手机号:</em>
-                            <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
-                        </el-col>
-                        <el-col :span="3">
-                            <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
-                            </el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
-        </div>
-        <div class="change">
-            <el-button @click="addMember" type="primary" size="mini">新增临时会员</el-button>
-            <el-button @click="delList" size="mini">删除临时会员</el-button>
-        </div>
-        <div class="table">
-            <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
-                element-loading-background="rgba(0, 0, 0, 0.8)" @selection-change="handleSelectionChange"
-                @current-change="clickChange">
-                >
-                <el-table-column label="选择" width="55" fixed>
-                    <template slot-scope="scope">
-                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-                    </template>
-                </el-table-column>
-                <el-table-column label="序号" type="index" width="50" align="center" fixed>
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserName" label="会员名" width="90" fixed>
-                </el-table-column>
-                <el-table-column prop="Phone" label="手机号" width="110" fixed>
-                </el-table-column>
-                <el-table-column prop="UserInfo.head" label="头像" width="50">
-                    <template slot-scope="scope">
-                        <div class="demo-image__preview" v-if="scope.row.Head">
-                            <el-image style="width: 25px; height: 25px" :src="scope.row.Head"
-                                :preview-src-list="[scope.row.Head]">
-                            </el-image>
-                        </div>
-                        <img src="../../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
-                    </template>
-                </el-table-column>
-                <el-table-column prop="StaticHr" label="静态心率" width="110" sortable>
-                </el-table-column>
-                <el-table-column prop="Height" label="身高(CM)" width="110" sortable>
-                </el-table-column>
-                <el-table-column prop="Weight" label="体重(KG)" width="110" sortable>
-                    <template slot-scope="scope">
-                        <span>{{scope.row.Weight / 10}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="Sex" label="类型" align="center" width="80px" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.Sex == 1">男</span>
-                        <span v-if="scope.row.Sex == 2">女</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="Birthday" label="生日" width="110" :formatter="filterFmtDate" sortable>
-                </el-table-column>
-                <!--<el-table-column-->
-                <!--prop="ClassInfo"-->
-                <!--label="会员课程"-->
-                <!--width="220px"-->
-                <!--&gt;-->
-                <!--<template slot-scope="scope">-->
-                <!--<span class="lessonSpan" :style="{background:lesson.ClassColor}"-->
-                <!--v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>-->
-                <!--</template>-->
-                <!--</el-table-column>-->
-                <el-table-column prop="UserInfo.Memo" label="备注">
-                    <template slot-scope="scope">
-                        <el-popover placement="top" title="" width="200" trigger="hover" :content="scope.row.Memo">
-                            <span slot="reference" v-if="scope.row.Memo.length > 6">{{ scope.row.Memo.substr(0, 6) }}
-                                ....</span>
-                        </el-popover>
-                        <span v-if="scope.row.Memo.length <= 6">{{ scope.row.Memo }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.Status" label="操作" width="160px">
-                    <template slot-scope="scope">
-                        <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)"
-                            v-if="userLevel != 4">编辑
-                        </el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
-                @current-change="pageChange"
-                :current-page.sync="cur_page"
-                ></el-pagination>
-        </div>
-
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" :width="form.btnType == 1 ?'650px':'650px'">
-            <div class="dialogContent">
-                <div :class="['pull-left',{'tabwild':form.btnType == 1}]">
-                    <el-form ref="form" :model="form" label-width="80px">
-                        <el-form-item label="手机号" :required="true">
-                            <el-input v-model="form.phone"></el-input>
-                        </el-form-item>
-                        <el-form-item label="会员名" :required="true">
-                            <el-input v-model="form.name"></el-input>
-                        </el-form-item>
-                        <el-form-item label="备注">
-                            <el-input v-model="form.memo"></el-input>
-                        </el-form-item>
-                        <el-form-item label="身高" :required="true">
-                            <el-input v-model="form.height" placeholder="cm" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="体重" :required="true">
-                            <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="静态心率">
-                            <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="性别" :required="true">
-                            <el-select v-model="form.sex " placeholder="">
-                                <el-option v-for="item in sexOptions" :key="item.value" :label="item.label"
-                                    :value="item.value"></el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="出生年份" :required="true">
-                            <el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期">
-                            </el-date-picker>
-                        </el-form-item>
-                        <el-form-item label="头像">
-                            <div class="upload">
-                                <el-upload class="avatar-uploader" :action=domain :http-request=upqiniu
-                                    :show-file-list="false" :before-upload="beforeUpload">
-                                    <!--<i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
-                                </el-upload>
-                                <img v-if="imageUrl" :src="imageUrl" class="avatar">
-                                <cropper :width="300" :height="300" :fixed-number="[1,1]"
-                                    @subUploadSucceed="getShopImages"></cropper>
-                                <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
-                            </div>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button :disabled="addDisabled" :loading="addDisabled" type="primary" size="small"
-                    v-if="form.btnType == 0" @click="confirmMember">确定
-                </el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
-                </el-button>
-                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
-    </div>
-
-</template>
-
-<script>
-    import Global from '../../Global.js'
-    import ImgCutter from 'vue-img-cutter'
-    import {
-        TmpUserQuery,
-        TmpUserAdd,
-        TmpUserEdit,
-        TmpUserDel,
-        testTable,
-        testSelect
-    } from "../../api/getApiRes";
-    import cropper from '@/components/cropper.vue'
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                imageUrl: '',
-                token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
-                domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
-                qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
-                tableData: [],
-                tableRadio: [],
-                userLevel: localStorage.userLevel,
-                serachBtnStatus: false,
-                addDisabled: false,
-                start: 0,
-                draw: 1,
-                dialogTitle: '新增临时会员',
-                dialogMemberVisible: false,//新增会员dialog
-                sexOptions: [
-                    { value: 1, label: '男' },//性别 1:男, 2:女
-                    { value: 2, label: '女' },
-                ],
-                panel: {
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    vipType: '',
-                    expDay: '',
-                    vipOptions: vipOptions(0),
-                    endTypeOptions: endTypeOptions(),
-                    time1: globalBt(),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    phone: '',
-                    name: '',
-                    userCode: '',
-                    shopId: '',
-                    Id: '',
-                    userId: '',
-                    height: '',
-                    weight: '',
-                    staticHr: '',
-                    head: '',
-                    birthday: '',
-                    sex: 1,
-                    vipType: 1,
-                    normalhour: 0,
-                    newnormalhour: 0,
-                    gifthour: 0,
-                    newgifthour: 0,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    expTime: '',
-                    classlist: [],
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-            }
-        },
-        mounted() {
-            // 读取列表
-            this.getTableQuery();
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'tempUser') {
-                    // 读取列表
-                    this.getTableQuery();
-                }
-            },
-        },
-        methods: {
-            addMember() {
-                this.clearForm();
-                this.dialogMemberVisible = true;
-                this.btnType = 0;
-                this.form.btnType = 0;
-                this.dialogTitle = '新增临时会员'
-            },
-            delList() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    that.$message.error("请先选中一条记录");
-                    return false
-                }
-                let detectorid = this.tableRadio.TuId;
-
-                let param = {
-                    token: localStorage.token,
-                    tuId: detectorid,
-                };
-                let postdata = qs.stringify(param);
-
-                this.$confirm('此操作将永久删除该临时会员, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    TmpUserDel(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的临时会员已删除!',
-                                type: 'success'
-                            });
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            clickChange(item) {
-                this.tableRadio = item
-            },
-            // 确认提交新增会员
-            confirmMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.phone) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.phone)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (!that.form.name) {
-                    this.$message.error('错了哦,会员名不能为空');
-                    return false
-                }
-                if (that.form.name.length > 8) {
-                    this.$message.error('错了哦,会员名字数超过8个字');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-                if (!that.form.height) {
-                    this.$message.error('错了哦,身高不能为空');
-                    return false
-                }
-                if (!that.form.weight) {
-                    this.$message.error('错了哦,体重不能为空');
-                    return false
-                }
-                // if (!that.form.staticHr) {
-                //     this.$message.error('错了哦,静态心率不能为空');
-                //     return false
-                // }
-                if (!that.form.birthday) {
-                    this.$message.error('错了哦,出生年份不能为空');
-                    return false
-                }
-
-
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    phone: that.form.phone,
-                    name: that.form.name,
-                    sex: that.form.sex,
-                    birthday: nonTfmtDatetoLength(that.form.birthday, 10),
-                    height: that.form.height,
-                    weight: that.form.weight,
-                    staticHr: that.form.staticHr,
-                    head: that.form.head,
-                    memo: that.form.memo,
-                };
-                let postdata = qs.stringify(param);
-                TmpUserAdd(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '临时会员添加成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 编辑
-            editMember(row) {
-                let that = this;
-                this.clearForm();
-                this.form.phone = row.Phone;
-                this.form.name = row.UserName;
-                this.form.memo = row.Memo;
-                this.imageUrl = row.Head;
-                this.form.height = row.Height;
-                this.form.weight = parseInt(row.Weight) / 10;
-                this.form.staticHr = row.StaticHr;
-                this.form.sex = row.Sex;
-                this.form.birthday = row.Birthday;
-                this.form.tuId = row.TuId;
-                this.form.btnType = 1;
-                this.form.shopId = localStorage.shopId;
-                this.form.Id = row.Id;
-                this.dialogMemberVisible = true;
-                this.dialogTitle = '编辑会员'
-
-            },
-            confirmEditMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.phone) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.phone)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (!that.form.name) {
-                    this.$message.error('错了哦,会员名不能为空');
-                    return false
-                }
-                if (that.form.name.length > 8) {
-                    this.$message.error('错了哦,会员名字数超过8个字');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-
-                if (!that.form.height) {
-                    this.$message.error('错了哦,身高不能为空');
-                    return false
-                }
-                if (!that.form.weight) {
-                    this.$message.error('错了哦,体重不能为空');
-                    return false
-                }
-                // if (!that.form.staticHr) {
-                //     this.$message.error('错了哦,静态心率不能为空');
-                //     return false
-                // }
-                if (!that.form.birthday) {
-                    this.$message.error('错了哦,出生年份不能为空');
-                    return false
-                }
-                let param = {
-                    token: localStorage.token,
-                    shopId: that.form.shopId,
-                    userId: that.form.Id,
-                    phone: that.form.phone,
-                    name: that.form.name,
-                    memo: that.form.memo,
-                    head: that.form.head,
-                    height: that.form.height,
-                    weight: that.form.weight,
-                    staticHr: that.form.staticHr,
-                    sex: that.form.sex,
-                    birthday: nonTfmtDatetoLength(that.form.birthday, 10),
-                    tuId: that.form.tuId
-                };
-                let postdata = qs.stringify(param);
-                TmpUserEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员信息编辑成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 验证文件合法性
-            beforeUpload(file) {
-                const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
-                const isLt2M = file.size / 1024 / 1024 < 70;
-                if (!isJPG) {
-                    this.$message.error('上传头像图片只能是 JPG 格式!')
-                }
-                if (!isLt2M) {
-                    this.$message.error('上传头像图片大小不能超过 70MB!')
-                }
-                return isJPG && isLt2M
-            },
-            cutDown(e) {
-                console.log(e);
-                this.imageUrl = e.dataURL;
-                this.upqiniu(e);
-            },
-            // 上传文件到七牛云
-            upqiniu(req) {
-                let that = this;
-                const config = {
-                    headers: { 'Content-Type': 'multipart/form-data' }
-                };
-                let filetype = '';
-                if (req.file.type === 'image/png') {
-                    filetype = 'png'
-                } else {
-                    filetype = 'jpg'
-                }
-                // 重命名要上传的文件
-                const keyname = 'GoAllOut' + new Date().valueOf() + Math.floor(Math.random() * 100) + '.' + filetype;
-                // 从后端获取上传凭证token
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                this.axios.post(headapi + 'v1/QiNiu/GetSimpleQiNiuToken', postdata).then(res => {
-                    const formdata = new FormData();
-                    formdata.append('file', req.file);
-                    formdata.append('token', res.data.QiNinToken);
-                    formdata.append('key', keyname);
-                    // 获取到凭证之后再将文件上传到七牛云空间
-                    this.axios.post(this.domain, formdata, config).then(res => {
-                        this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key;
-                        this.form.head = 'http://' + this.qiniuaddr + '/' + keyname;
-                    })
-                })
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                that.serachBtnStatus = true;
-                that.getTableQuery();
-                that.$message.success('查询完毕');
-                let totalTime = 2
-                let clock = window.setInterval(() => {
-                    totalTime--
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000)
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    shopId: that.panel.shopId,//
-                    name: that.panel.name,//
-                    expDay: that.panel.expDay,//
-                    start: that.start,//
-                    tableMax: 10,//
-                };
-                let postdata = qs.stringify(param);
-                TmpUserQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.PageCount * that.pageination.pageItem;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.head = '';
-                this.imageUrl = '';
-                this.form.phone = '';
-                this.form.memo = '';
-                this.form.normalhour = 0;
-                this.form.gifthour = 0;
-                this.form.height = '';
-                this.form.weight = '';
-                this.form.staticHr = '';
-                this.form.sex = 1;
-                this.form.birthday = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-                this.form.classlist = [];
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                // that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                console.log(index);
-                console.log(that.draw);
-                that.getTableQuery();
-            },
-            //            过滤时间
-            filterFmtDate(value, row, column) {
-                return nonTfmtDatetoLength(column, 11);
-            },
-            // 海报上传成功
-            getShopImages(url) {
-                this.imageUrl = url;
-                this.form.head = url;
-            }
-        },
-        components: {
-            cropper
-        }
-    }
-</script>
-
-<style scoped>
-    @import "../../assets/css/panel.css";
-
-    .context {
-        border-radius: 12px;
-        /* height: 770px; */
-        overflow-y: scroll;
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-        padding-bottom: 30px;
-    }
-
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
-
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-
-    .change button {
-        float: left;
-    }
-
-    .change button.pull-right {
-        float: right;
-    }
-
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .dialogContent .pull-left {
-        width: 100%;
-        float: left;
-    }
-
-    .el-form-item {
-        width: 50%;
-        float: left;
-    }
-</style>