1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
| <!--index.vue-->
| <template>
| <div>
| <div class="chat-wrap">
| <!-- 聊天人名称 -->
| <!-- <div class="chat-title">chatGPT</div> -->
|
| <!-- 聊天内容 -->
| <chatList
| ref="refChatList"
| :userid="id"
| />
|
| </div>
| </div>
| </template>
|
| <script>
| import Login from '../utils/jun_login.js'
| import chatList from '@/components/ChatList/chat_list'
| export default {
| name: 'Index',
| components: { chatList },
| inject: ['noop'],
| data() {
| return {
| id: '',
|
| chatInfo: ''
| }
| },
| computed: {},
| mounted() {
| console.log('index mounted')
| this.init()
| },
| destroyed() {},
| methods: {
| init() {
| },
|
| login() {
| const code = this.getQueryString('code')
| Login.loginReq({
| data: {
| code
| }
| }).then((res) => {
| this.setLocalStorage('code', code || '')
| }).catch((res) => {
| if (res.data.msg.indexOf('用户') > -1) {
| Login.toLongUrl()
| } else {
| window.appToast(res.data.msg)
| }
| })
| }
| }
| }
| </script>
|
| <style scoped>
| .chat-wrap{
| background-color: #fff;
| width: 100%;
| box-sizing: border-box;
| margin: 0 auto;
| }
| .chat-title{
| height: 60PX;
| line-height: 60PX;
| font-size: 28px;
| border-bottom: 1px solid #dcdfe6;
| margin-left: 20px;
| }
| </style>
|
|