From 9860e221460a0a4ac1903dad2c97160d0eed0e63 Mon Sep 17 00:00:00 2001 From: long <515897141@qq.com> Date: 星期五, 03 三月 2023 10:59:42 +0800 Subject: [PATCH] 初始化 --- src/pages/index.vue | 76 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 76 insertions(+), 0 deletions(-) diff --git a/src/pages/index.vue b/src/pages/index.vue new file mode 100644 index 0000000..a434be8 --- /dev/null +++ b/src/pages/index.vue @@ -0,0 +1,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> -- Gitblit v1.8.0