小助理

This commit is contained in:
liuye
2024-07-16 09:13:30 +08:00
parent 38f2404ef3
commit 77216cbc13
2 changed files with 39 additions and 12 deletions

View File

@@ -1,9 +1,12 @@
<template> <template>
<div class="AppDialogue"> <div class="AppDialogue">
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false" height="88"></u-navbar> <u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false" :height="44"></u-navbar>
<!-- <scroll-view scroll-y="true" class="scroll-Y" @scroll="scroll"> --> <!-- <scroll-view scroll-y="true" class="scroll-Y" @scroll="scroll"> -->
<div class="top-select" @click="showType=true"> <div class="top-fixed">
{{aiConfigName || '选择应用'}} <u-icon name="arrow-down" color="#fff" size="28"></u-icon> <div class="top-select" @click="showType=true">
{{aiConfigName || '选择应用'}} <u-icon name="arrow-down" color="#fff" size="28"></u-icon>
</div>
<p>已切换至{{aiConfigName}}大模型</p>
</div> </div>
<div class="service-content" v-if="!messageList.length"> <div class="service-content" v-if="!messageList.length">
<div class="text-content"> <div class="text-content">
@@ -92,6 +95,8 @@ innerAudioContext.autoplay = true;
export default { export default {
customNavigation: true, customNavigation: true,
enablePullDownRefresh: true, enablePullDownRefresh: true,
navigationBarBackgroundColor: '#ffffff',
navigationBarTextStyle: 'black',
name: 'AppDialogue', name: 'AppDialogue',
appName: 'Copilot小助理(对话)', appName: 'Copilot小助理(对话)',
data() { data() {
@@ -351,19 +356,35 @@ page {
height: 100vh; height: 100vh;
background-color: #fff; background-color: #fff;
position: relative; position: relative;
.top-fixed {
width: 100%;
position: fixed;
left: 28px;
z-index: 9;
background-image: url('https://cdn.sinoecare.com/i/2024/07/15/6694f173557c9.png');
background-size: 100vw;
background-repeat: no-repeat;
p {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24px;
color: #708099;
text-align: center;
padding: 10px 0 8px 0;
line-height: 34px;
}
}
.top-select { .top-select {
display: inline-block;
line-height: 64px; line-height: 64px;
background: #026AF2; background: #026AF2;
border-radius: 32px; border-radius: 32px;
position: fixed;
left: 28px;
text-align: center; text-align: center;
padding: 0 24px; padding: 0 24px;
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 500; font-weight: 500;
font-size: 28px; font-size: 28px;
color: #FFF; color: #FFF;
z-index: 9;
u-icon { u-icon {
margin-left: 8px; margin-left: 8px;
} }

View File

@@ -1,6 +1,7 @@
<template> <template>
<div class="AppRecord"> <div class="AppRecord">
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false" :height="44"></u-navbar> <u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true"
:background="backgroundNavbar" :is-back="false" :is-fixed="true" height="44"></u-navbar>
<div class="list-bg"> <div class="list-bg">
<div class="search-content"> <div class="search-content">
<u-search v-model="searchVal" :clearabled="true" placeholder="请输入搜索关键词…" :show-action="false" <u-search v-model="searchVal" :clearabled="true" placeholder="请输入搜索关键词…" :show-action="false"
@@ -8,7 +9,7 @@
</u-search> </u-search>
</div> </div>
</div> </div>
<div class="list-content"> <div class="list-content" >
<div class="item" v-for="(item, index) in messageList" :key="index"> <div class="item" v-for="(item, index) in messageList" :key="index">
<p class="item-text">{{item.content}}</p> <p class="item-text">{{item.content}}</p>
<div class="time-flex"> <div class="time-flex">
@@ -32,6 +33,8 @@ import {mapActions, mapState} from "vuex";
export default { export default {
customNavigation: true, customNavigation: true,
enablePullDownRefresh: true, enablePullDownRefresh: true,
navigationBarBackgroundColor: '#ffffff',
navigationBarTextStyle: 'black',
name: 'AppRecord', name: 'AppRecord',
appName: 'Copilot小助理(记录)', appName: 'Copilot小助理(记录)',
data() { data() {
@@ -50,6 +53,7 @@ export default {
], ],
current: 1, current: 1,
pages: 2, pages: 2,
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
} }
}, },
computed: { computed: {
@@ -109,7 +113,7 @@ export default {
uni.navigateTo({url: `./Detail?aiConfigId=${e.aiConfigId}`}) uni.navigateTo({url: `./Detail?aiConfigId=${e.aiConfigId}`})
}, },
del(e) { del(e) {
this.$confirm('确定删除该数据?').then(() => { this.$dialog.confirm({content: "确定删除该数据?"}).then(() => {
uni.showLoading() uni.showLoading()
this.$instance.post(`appaicopilotinfo/deleteConversation?conversationId=${e.conversationId}`).then((res) => { this.$instance.post(`appaicopilotinfo/deleteConversation?conversationId=${e.conversationId}`).then((res) => {
if (res.code == 0) { if (res.code == 0) {
@@ -140,7 +144,6 @@ page {
background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png"); background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png");
position: fixed; position: fixed;
left: 0; left: 0;
z-index: 1;
background-size: 100vw; background-size: 100vw;
background-repeat: no-repeat; background-repeat: no-repeat;
.search-content { .search-content {
@@ -156,8 +159,10 @@ page {
.list-content { .list-content {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; padding: 144px 32px 32px;
padding: 144px 32px 364px; position: absolute;
left: 0;
z-index: 2;
.item { .item {
.item-text { .item-text {
line-height: 40px; line-height: 40px;
@@ -183,6 +188,7 @@ page {
display: inline-block; display: inline-block;
font-size: 28px; font-size: 28px;
color: #216AFD; color: #216AFD;
padding: 16px;
} }
div { div {
display: inline-block; display: inline-block;