guhongwei 3 năm trước cách đây
mục cha
commit
1c510ad08c
1 tập tin đã thay đổi với 16 bổ sung9 xóa
  1. 16 9
      src/views/index.vue

+ 16 - 9
src/views/index.vue

@@ -3,7 +3,17 @@
     <el-row>
     <el-row>
       <el-col :span="24" class="main">
       <el-col :span="24" class="main">
         <el-col :span="24" class="btn">
         <el-col :span="24" class="btn">
-          <el-button type="primary" size="mini" @click="openBtn">在线客服</el-button>
+          <el-form ref="form" :model="form" label-width="80px">
+            <el-form-item label="用户id">
+              <el-input v-model="userInfo.client_id"></el-input>
+            </el-form-item>
+            <el-form-item label="用户名称">
+              <el-input v-model="userInfo.client_name"></el-input>
+            </el-form-item>
+          </el-form>
+          <el-col :span="24" style="text-align: center">
+            <el-button type="primary" size="mini" @click="openBtn">点击联系在线客服</el-button>
+          </el-col>
         </el-col>
         </el-col>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
@@ -26,20 +36,17 @@ export default {
   data: function () {
   data: function () {
     return {
     return {
       show: false,
       show: false,
-      userInfo: {},
+      userInfo: {
+        _tenant: 'platform',
+        client_id: '5fa34a8e3849fd0eecf7f1c7',
+        client_name: '顾红伟',
+      },
     };
     };
   },
   },
   created() {},
   created() {},
   methods: {
   methods: {
     // 打开在线聊天
     // 打开在线聊天
     openBtn() {
     openBtn() {
-      // 创建用户
-      let data = {
-        _tenant: 'platform',
-        client_id: '5fa34a8e3849fd0eecf7f1c7',
-        client_name: '顾红伟',
-      };
-      this.$set(this, `userInfo`, data);
       this.show = true;
       this.show = true;
     },
     },
     // 关闭在线聊天
     // 关闭在线聊天