diff --git a/App.vue b/App.vue index 5990fbc..0e94c79 100644 --- a/App.vue +++ b/App.vue @@ -36,6 +36,7 @@ export default { } }, }); + return if (!that.vuex_user.isFill) { this.$u.vuex("vuex_msgList", ""); this.$u.vuex("vuex_user", ""); @@ -242,7 +243,7 @@ export default { .catch((err) => { }); //初始化获取定位 - this.getLocation() + // this.getLocation() } else { setTimeout(() => { this.CharLogin() diff --git a/common/http.api.js b/common/http.api.js index b412aaa..24fd3bf 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -90,6 +90,9 @@ const install = (Vue, vm) => { //【管理端】获取当前是否开启匿名 开启true 关闭false let CheckNM = (params = {}) => vm.$u.get("/app/My/CheckNM", params) + // 发送消息 + let SendMessageApi = (params = {}) => vm.$u.post('api/ChatAI/CreateChat', params); + // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 vm.$u.api = { LoginApp, @@ -128,7 +131,8 @@ const install = (Vue, vm) => { getAPIToken, getVerifyInfo, getInfoByCard, - updateCard + updateCard, + SendMessageApi }; } diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 53b347e..7c5c0eb 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -4,8 +4,8 @@ const install = (Vue, vm) => { Vue.prototype.$u.http.setConfig({ // baseUrl: 'https://xy.apps.service.zheke.com', // imgUrl: 'https://xy.apps.service.zheke.com/', - baseUrl: 'http://sl.vrgon.com:8003', - imgUrl: 'http://sl.vrgon.com:8003/', + baseUrl: 'http://120.55.234.65:8082', + imgUrl: 'http://120.55.234.65:8082/', // imgUrl:'http://115.238.47.235:8987/', // baseUrl: 'http://115.238.47.235:8993', // 如果将此值设置为true,拦截回调中将会返回服务端返回的所有数据response,而不是response.data diff --git a/components/AdvicePhone.vue b/components/AdvicePhone.vue new file mode 100644 index 0000000..812fa4c --- /dev/null +++ b/components/AdvicePhone.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/components/LeaveMessage.vue b/components/LeaveMessage.vue new file mode 100644 index 0000000..3c0ce37 --- /dev/null +++ b/components/LeaveMessage.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/manifest.json b/manifest.json index a0c4787..018a9d1 100644 --- a/manifest.json +++ b/manifest.json @@ -161,7 +161,7 @@ "enable" : true } }, - "title" : "笑柚", + "title" : "源小新", "sdkConfigs" : { "maps" : { "qqmap" : { diff --git a/pages.json b/pages.json index 1f6f6f3..cec711b 100644 --- a/pages.json +++ b/pages.json @@ -33,6 +33,30 @@ "navigationStyle": "custom" } }, + { + "path": "pages/home/admissions/index", + "style": { + "navigationBarTitleText": "招办在线", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/home/teacherInfo/index", + "style": { + "navigationBarTitleText": "老师详情", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/login/login/index", + "style": { + "navigationBarTitleText": "登录", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { "path": "pages/login/login/login", "style": { diff --git a/pages/home/admissions/index.vue b/pages/home/admissions/index.vue new file mode 100644 index 0000000..1829c3c --- /dev/null +++ b/pages/home/admissions/index.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/pages/home/index/index.vue b/pages/home/index/index.vue index 6112032..6e2eecf 100644 --- a/pages/home/index/index.vue +++ b/pages/home/index/index.vue @@ -1,128 +1,999 @@ \ No newline at end of file +page { + height: 100vh; + background-image: url("/static/common/images/images_bg.png"); + width: 100%; + background-repeat: no-repeat; + background-size: 100% 100%; + background-position: 0 88rpx; +} + +.home-container { + height: 100vh; + // background-color: #f5f7fc; + padding-bottom: calc( + 112rpx + env(safe-area-inset-bottom) + ); /* 为自定义tabBar预留空间 */ + padding-top: 88rpx; + + .header { + position: fixed; + top: 0; + left: 0; + right: 0; + background-color: #ffffff; + height: 88rpx; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 30rpx; + z-index: 99; + + .header-left { + width: 40rpx; + font-size: 36rpx; + } + + .header-title { + font-size: 36rpx; + font-weight: bold; + color: #333333; + } + + .header-right { + width: 40rpx; + } + } + + .content { + padding: 30rpx; + padding-top: 100rpx; + + .welcome-message { + // display: inline-block; + // flex-wrap: wrap; + background-color: rgba(255, 255, 255, 0.8); + border-radius: 16rpx; + padding: 24rpx; + margin-bottom: 32rpx; + // margin-bottom: 100rpx; + + .avatar { + display: inline-block; + width: 42rpx; + height: 34rpx; + margin-right: 12rpx; + } + + .message-text { + font-size: 28rpx; + color: #333333; + font-family: PingFang SC; + vertical-align: super; + } + } + + .qa-section { + background-color: #ffffff; + border-radius: 16rpx; + padding: 30rpx; + margin-bottom: 32rpx; + + .qa-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 30rpx; + + .qa-title { + font-size: 32rpx; + font-weight: 500; + color: #333; + } + + .more-link { + .more-text { + font-size: 26rpx; + color: #999; + } + } + } + + .qa-list { + .qa-item { + margin-bottom: 24rpx; + + .qa-question { + font-size: 28rpx; + color: #333; + line-height: 1.5; + } + } + } + + .chat-button { + display: flex; + align-items: center; + justify-content: center; + background-color: #4377fe; + border-radius: 16rpx; + height: 88rpx; + width: 100%; + margin-top: 30rpx; + border: none; + + .chat-icon { + width: 38rpx; + height: 32rpx; + margin-right: 12rpx; + } + + .chat-text { + color: #ffffff; + font-size: 32rpx; + } + } + } + + .start-chat { + .chat-button { + display: flex; + align-items: center; + justify-content: center; + background-color: #4377fe; + border-radius: 16rpx; + height: 88rpx; + width: 100%; + margin-top: 30rpx; + border: none; + + .chat-icon { + width: 38rpx; + height: 32rpx; + margin-right: 12rpx; + } + + .chat-text { + color: #ffffff; + font-size: 32rpx; + } + } + } + + .feature-grid { + background-color: #ffffff; + border-radius: 16rpx; + padding: 30rpx; + display: flex; + justify-content: space-between; + margin-top: 32rpx; + gap: 30rpx; + + .feature-item { + height: 210rpx; + border-radius: 16rpx; + background-color: #fafafc; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + // gap: 20rpx; + flex: 1; + + .feature-icon { + width: 80rpx; + height: 80rpx; + margin-bottom: 12rpx; + } + + .feature-text { + font-size: 26rpx; + color: #333333; + } + } + } + } +} + +.drawer-container { + padding: 32rpx; + display: flex; + flex-direction: column; + height: 100vh; + background-color: #ffffff; + + .chat-history-list { + flex: 1; + // padding: 30rpx 40rpx; + height: calc(100vh - 200rpx); + + .chat-day { + display: flex; + margin: 20rpx 0 20rpx 30rpx; + + .day-text { + font-size: 24rpx; + color: #999999; + font-family: PingFang SC; + margin-bottom: 10rpx; + } + } + + .chat-item { + padding: 24rpx 30rpx; + border-radius: 16rpx; + // margin-bottom: 30rpx; + + .chat-text { + font-size: 28rpx; + color: #303030; + font-family: PingFang SC; + } + + &-active { + background-color: #4f6aff; + + .chat-text { + color: #fff; + } + } + } + } + + .drawer-footer { + height: 130rpx; + border: 1rpx solid #eeeeee; + border-radius: 12rpx; + padding: 0 30rpx; + display: flex; + justify-content: space-between; + align-items: center; + + .user-info { + display: flex; + align-items: center; + + .user-avatar { + width: 56rpx; + height: 56rpx; + border-radius: 50%; + margin-right: 30rpx; + } + + .user-name { + font-size: 28rpx; + font-weight: bold; + font-family: DouyinSans; + color: #333; + } + } + + .settings { + padding: 10rpx; + } + } +} + +/* 响应式布局 - PC端样式 */ +@media screen and (min-width: 768px) { + .home-container { + .content { + max-width: 1200rpx; + margin: 0 auto; + + .qa-section { + .qa-list { + display: flex; + flex-wrap: wrap; + + .qa-item { + width: 48%; + margin-right: 2%; + } + } + } + + .feature-grid { + max-width: 1200rpx; + margin: 40rpx auto 0; + } + } + } +} + +.chat-container { + display: flex; + flex-direction: column; + padding: 30rpx; + box-sizing: border-box; + + .chat-scroll { + flex: 1; + flex-shrink: 0; + // overflow-y: auto; /* 使用auto而不是scroll */ // 添加这行会导致滚动条不见 + } + + .chat-card { + // background-color: #ffffff; + // border-radius: 16rpx; + padding: 30rpx; + margin-bottom: 30rpx; + + .chat-card-title { + font-family: DouyinSans; + font-weight: bold; + font-size: 36rpx; + color: #5255e6; + // line-height: 24rpx; + background: linear-gradient(-56deg, #4d50dd 0%, #3e6aff 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + margin-bottom: 12rpx; + } + + .chat-card-desc { + font-family: PingFang SC; + font-weight: 500; + font-size: 24rpx; + color: #9ba5c7; + line-height: 24rpx; + margin-bottom: 12rpx; + } + + .chat-card-questions { + display: flex; + flex-direction: column; + gap: 16rpx; + + .question-item { + font-size: 28rpx; + color: #333333; + line-height: 1.5; + } + } + } + + .chat-content { + flex: 1; + padding: 20rpx 0; + margin-bottom: 150rpx; + + .message-time { + text-align: center; + font-size: 24rpx; + color: #999999; + padding: 20rpx; + } + + .message-left, + .message-right { + display: flex; + margin-bottom: 32rpx; + align-items: flex-start; + } + + .message-left { + .ai-avatar { + width: 64rpx; + height: 64rpx; + border-radius: 50%; + margin-right: 16rpx; + flex-shrink: 0; + } + + .message-content { + background-color: #ffffff; + color: #333333; + max-width: 70%; + padding: 20rpx 24rpx; + border-radius: 0 16rpx 16rpx 16rpx; + font-size: 28rpx; + line-height: 1.5; + } + } + + .message-right { + justify-content: flex-end; + + .user-avatar { + width: 64rpx; + height: 64rpx; + border-radius: 50%; + margin-left: 16rpx; + background-color: #f0f0f0; + flex-shrink: 0; + } + + .message-content { + background-color: #4370fe; + color: #ffffff; + max-width: 70%; + padding: 20rpx 24rpx; + border-radius: 16rpx 0 16rpx 16rpx; + font-size: 28rpx; + line-height: 1.5; + text-align: left; + } + } + } + + .chat-footer { + position: fixed; + bottom: 0; + left: 0; + right: 0; + + .floating-tabs { + display: flex; + justify-content: flex-start; + margin: 0 0 20rpx 20rpx; + + .tab-item { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + background-color: #ffffff; + padding: 8rpx 24rpx; + border-radius: 50rpx; + box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1); + margin-right: 12rpx; + + .tab-icon { + width: 28rpx; + height: 28rpx; + margin-right: 10rpx; + } + + text { + font-size: 28rpx; + color: #333333; + } + } + } + + .input-container { + padding: 32rpx; + background-color: #fff; + box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05); + + .input-area { + display: flex; + align-items: center; + background-color: #f2f4f9; + border-radius: 20rpx; + padding: 16rpx 24rpx; + box-sizing: border-box; + + .chat-input { + flex: 1; + height: 40rpx; + font-size: 28rpx; + color: #333; + background-color: transparent; + } + + .send-btn { + width: 50rpx; + height: 50rpx; + display: flex; + align-items: center; + justify-content: center; + + .send-icon { + width: 40rpx; + height: 46rpx; + } + } + } + } + } +} + diff --git a/pages/home/teacherInfo/index.vue b/pages/home/teacherInfo/index.vue new file mode 100644 index 0000000..0312a4d --- /dev/null +++ b/pages/home/teacherInfo/index.vue @@ -0,0 +1,456 @@ + + + + + diff --git a/pages/login/login/index.vue b/pages/login/login/index.vue new file mode 100644 index 0000000..b2ce040 --- /dev/null +++ b/pages/login/login/index.vue @@ -0,0 +1,296 @@ + + + + + diff --git a/static/common/avatar/male.png b/static/common/avatar/male.png new file mode 100644 index 0000000..68db854 Binary files /dev/null and b/static/common/avatar/male.png differ diff --git a/static/common/avatar/user.png b/static/common/avatar/user.png new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/static/common/avatar/user.png @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/common/feature/phone.png b/static/common/feature/phone.png new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/static/common/feature/phone.png @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/common/icon/ai-avatar.png b/static/common/icon/ai-avatar.png new file mode 100644 index 0000000..60fed09 --- /dev/null +++ b/static/common/icon/ai-avatar.png @@ -0,0 +1 @@ +// 这是一个占位文件,需要替换为实际的AI头像图标 \ No newline at end of file diff --git a/static/common/icon/board-icon.png b/static/common/icon/board-icon.png new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/static/common/icon/board-icon.png @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/common/icon/chat-icon.png b/static/common/icon/chat-icon.png new file mode 100644 index 0000000..de5fb4f --- /dev/null +++ b/static/common/icon/chat-icon.png @@ -0,0 +1 @@ +// 这是一个占位文件,需要替换为实际的聊天图标 \ No newline at end of file diff --git a/static/common/icon/menu-icon.png b/static/common/icon/menu-icon.png new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/static/common/icon/menu-icon.png @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/common/icon/phone-icon.png b/static/common/icon/phone-icon.png new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/static/common/icon/phone-icon.png @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/common/icon/recruit-icon.png b/static/common/icon/recruit-icon.png new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/static/common/icon/recruit-icon.png @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/common/icon/send-icon.png b/static/common/icon/send-icon.png new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/static/common/icon/send-icon.png @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/common/images/avatar.png b/static/common/images/avatar.png new file mode 100644 index 0000000..ad56521 Binary files /dev/null and b/static/common/images/avatar.png differ diff --git a/static/common/images/avatar2.png b/static/common/images/avatar2.png new file mode 100644 index 0000000..df4cf87 Binary files /dev/null and b/static/common/images/avatar2.png differ diff --git a/static/common/images/avatar_ai.png b/static/common/images/avatar_ai.png new file mode 100644 index 0000000..2143f83 Binary files /dev/null and b/static/common/images/avatar_ai.png differ diff --git a/static/common/images/icon_admissions.png b/static/common/images/icon_admissions.png new file mode 100644 index 0000000..cfb68d1 Binary files /dev/null and b/static/common/images/icon_admissions.png differ diff --git a/static/common/images/icon_admissions2.png b/static/common/images/icon_admissions2.png new file mode 100644 index 0000000..47614e4 Binary files /dev/null and b/static/common/images/icon_admissions2.png differ diff --git a/static/common/images/icon_chat.png b/static/common/images/icon_chat.png new file mode 100644 index 0000000..a5edd10 Binary files /dev/null and b/static/common/images/icon_chat.png differ diff --git a/static/common/images/icon_college.png b/static/common/images/icon_college.png new file mode 100644 index 0000000..00e092c Binary files /dev/null and b/static/common/images/icon_college.png differ diff --git a/static/common/images/icon_consult.png b/static/common/images/icon_consult.png new file mode 100644 index 0000000..b046a17 Binary files /dev/null and b/static/common/images/icon_consult.png differ diff --git a/static/common/images/icon_edit.png b/static/common/images/icon_edit.png new file mode 100644 index 0000000..23a2479 Binary files /dev/null and b/static/common/images/icon_edit.png differ diff --git a/static/common/images/icon_major.png b/static/common/images/icon_major.png new file mode 100644 index 0000000..6aa78f4 Binary files /dev/null and b/static/common/images/icon_major.png differ diff --git a/static/common/images/icon_messageBoard.png b/static/common/images/icon_messageBoard.png new file mode 100644 index 0000000..1bfab4b Binary files /dev/null and b/static/common/images/icon_messageBoard.png differ diff --git a/static/common/images/icon_messageBoard2.png b/static/common/images/icon_messageBoard2.png new file mode 100644 index 0000000..0101d35 Binary files /dev/null and b/static/common/images/icon_messageBoard2.png differ diff --git a/static/common/images/icon_phone.png b/static/common/images/icon_phone.png new file mode 100644 index 0000000..9e7f69f Binary files /dev/null and b/static/common/images/icon_phone.png differ diff --git a/static/common/images/icon_phone2.png b/static/common/images/icon_phone2.png new file mode 100644 index 0000000..ec55c53 Binary files /dev/null and b/static/common/images/icon_phone2.png differ diff --git a/static/common/images/icon_record.png b/static/common/images/icon_record.png new file mode 100644 index 0000000..87564b3 Binary files /dev/null and b/static/common/images/icon_record.png differ diff --git a/static/common/images/icon_send.png b/static/common/images/icon_send.png new file mode 100644 index 0000000..b762a37 Binary files /dev/null and b/static/common/images/icon_send.png differ diff --git a/static/common/images/images_bg.png b/static/common/images/images_bg.png new file mode 100644 index 0000000..d969724 Binary files /dev/null and b/static/common/images/images_bg.png differ diff --git a/static/common/images/images_logo.png b/static/common/images/images_logo.png new file mode 100644 index 0000000..1002ea8 Binary files /dev/null and b/static/common/images/images_logo.png differ diff --git a/static/common/images/student.png b/static/common/images/student.png new file mode 100644 index 0000000..517f03b Binary files /dev/null and b/static/common/images/student.png differ diff --git a/static/common/js/router.js b/static/common/js/router.js index bf2d8ac..31ee8d1 100644 --- a/static/common/js/router.js +++ b/static/common/js/router.js @@ -26,8 +26,11 @@ const initApp = function(vm) { // title: '请先登录', // icon: 'none' // }) + // uni.navigateTo({ + // url: config.loginPage + // }) uni.navigateTo({ - url: config.loginPage + url: '/' }) return false } else {