From 994999f9d2f01708876a96ba414886b4288adbd3 Mon Sep 17 00:00:00 2001
From: yma16 <17685043634@163.com>
Date: Sun, 12 Feb 2023 16:56:39 +0800
Subject: [PATCH] openai
---
.idea/deployment.xml | 14 ++
.idea/inspectionProfiles/Project_Default.xml | 6 +
.idea/misc.xml | 6 +
.idea/modules.xml | 8 +
.idea/vcs.xml | 6 +
.idea/webServers.xml | 15 ++
.idea/workspace.xml | 206 +++++++++++++++++
.idea/yma16_program.iml | 12 +
miniprogram/app.js | 3 +-
miniprogram/app.wxss | 2 +-
.../components/base/blockInfo/blockInfo.wxml | 2 +-
.../components/base/blockInfo/blockInfo.wxss | 9 +-
.../visualComponent/geoMap/geoMap.wxss | 2 +-
.../visualComponent/lineChart/lineChart.js | 32 +--
.../visualComponent/lineChart/lineChart.wxss | 2 +-
miniprogram/pages/blog/blog.js | 7 +-
miniprogram/pages/blog/blog.wxml | 8 +-
miniprogram/pages/blog/blog.wxss | 26 ++-
miniprogram/pages/future/future.js | 210 ++++++++----------
miniprogram/pages/future/future.json | 5 +-
miniprogram/pages/future/future.wxml | 43 +++-
miniprogram/pages/future/future.wxss | 126 +++++++----
miniprogram/pages/home/home.js | 11 +-
miniprogram/pages/home/home.wxml | 8 +-
miniprogram/pages/home/home.wxss | 3 +-
miniprogram/pages/homeContent/homeContent.js | 8 +
.../pages/homeContent/homeContent.wxml | 4 +-
.../pages/homeContent/homeContent.wxss | 8 +-
miniprogram/pages/index/index.js | 32 +--
miniprogram/pages/index/index.wxml | 1 -
miniprogram/pages/life/life.wxml | 22 --
miniprogram/pages/life/life.wxss | 10 +-
32 files changed, 600 insertions(+), 257 deletions(-)
create mode 100644 .idea/deployment.xml
create mode 100644 .idea/inspectionProfiles/Project_Default.xml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 .idea/webServers.xml
create mode 100644 .idea/workspace.xml
create mode 100644 .idea/yma16_program.iml
diff --git a/.idea/deployment.xml b/.idea/deployment.xml
new file mode 100644
index 0000000..3d900d9
--- /dev/null
+++ b/.idea/deployment.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..03d9549
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..28a804d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..21391d8
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/webServers.xml b/.idea/webServers.xml
new file mode 100644
index 0000000..26626ee
--- /dev/null
+++ b/.idea/webServers.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..7e1fd50
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1665923387310
+
+
+ 1665923387310
+
+
+
+
+ 1665930867783
+
+
+
+ 1665930867784
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/yma16_program.iml b/.idea/yma16_program.iml
new file mode 100644
index 0000000..24643cc
--- /dev/null
+++ b/.idea/yma16_program.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miniprogram/app.js b/miniprogram/app.js
index f473f0d..44d34f9 100644
--- a/miniprogram/app.js
+++ b/miniprogram/app.js
@@ -11,7 +11,7 @@ App({
* @type object[{name:'',adcode:''}]
*/
geoAdcodeMap:[],
- targetItem:{}
+ targetItem:{},
},
remoteConfig:{
baseUrl:'https://yongma16.xyz'
@@ -53,6 +53,7 @@ App({
this.setData({
globalData:{userInfo: res.userInfo,hasUserInfo: true},
})
+ wx.setStorageSync('currentUserInfo', res.userInfo)
}
})
diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss
index 4e6a5f4..91f0cd0 100644
--- a/miniprogram/app.wxss
+++ b/miniprogram/app.wxss
@@ -4,7 +4,7 @@
flex-direction: column;
align-items: center;
box-sizing: border-box;
- color: #fff;
+ color: rgb(255, 255, 255);
}
button {
diff --git a/miniprogram/components/base/blockInfo/blockInfo.wxml b/miniprogram/components/base/blockInfo/blockInfo.wxml
index 0856a35..e7c0192 100644
--- a/miniprogram/components/base/blockInfo/blockInfo.wxml
+++ b/miniprogram/components/base/blockInfo/blockInfo.wxml
@@ -24,4 +24,4 @@
->
+
diff --git a/miniprogram/components/base/blockInfo/blockInfo.wxss b/miniprogram/components/base/blockInfo/blockInfo.wxss
index 2d1796f..af5815d 100644
--- a/miniprogram/components/base/blockInfo/blockInfo.wxss
+++ b/miniprogram/components/base/blockInfo/blockInfo.wxss
@@ -1,16 +1,16 @@
/* components/base/blockInfo/blockInfo.wxss */
.container-block{
- width: 100vw;
+ width: 100%;
margin-top: 30px;
- background: rgba(255,255,255,0.8);
- padding: 10px;
+ background: rgba(255,255,255,0);
+ padding: 30px 0;
text-align: center;
}
.total-container{
display: flex;
- width: 100vw;
+ width: 100%;
font-weight: bold;
}
.block{
@@ -24,6 +24,7 @@
}
.block-title{
font-weight: bold;
+ margin:20px 0 5px 0;
background: cornflowerblue;
}
.block-uni-title{
diff --git a/miniprogram/components/visualComponent/geoMap/geoMap.wxss b/miniprogram/components/visualComponent/geoMap/geoMap.wxss
index c34e9ca..5a34d33 100644
--- a/miniprogram/components/visualComponent/geoMap/geoMap.wxss
+++ b/miniprogram/components/visualComponent/geoMap/geoMap.wxss
@@ -5,5 +5,5 @@
margin-top: 50px;
width:100vw;
height:300px;
- background: rgba(255,255,255,0.8);
+ background: rgba(255,255,255,0);
}
diff --git a/miniprogram/components/visualComponent/lineChart/lineChart.js b/miniprogram/components/visualComponent/lineChart/lineChart.js
index bc8a498..ec69c76 100644
--- a/miniprogram/components/visualComponent/lineChart/lineChart.js
+++ b/miniprogram/components/visualComponent/lineChart/lineChart.js
@@ -1,10 +1,10 @@
// components/visualComponent/lineChart/lineChart.js
import * as echarts from '../../../ec-canvas/ec-canvas/echarts';
-const app=getApp();
+const app = getApp();
function initChart(canvas, width, height, dpr) {
const geoAdcodeMap = [...app.globalData.geoAdcodeMap]
- const targetItem = {...app.globalData.hotData.targetItem};
+ const targetItem = { ...app.globalData.hotData.targetItem };
/**
* @type object data热力值 max最大值
*/
@@ -33,13 +33,14 @@ function initChart(canvas, width, height, dpr) {
devicePixelRatio: dpr
});
canvas.setChart(chart);
- const lineObj={
- labelArray:[],
- totalData:[],
- todayData:[]
+ const lineObj = {
+ labelArray: [],
+ totalData: [],
+ todayData: []
}
- hotObj.data.forEach(item=>{
- lineObj.labelArray.push(item.name)
+ hotObj.data.forEach(item => {
+ const name = item.name.toString().includes('黔南') ? '黔南' : item.name.toString().substring(0, 3);
+ lineObj.labelArray.push(name)
lineObj.totalData.push(item.totalConfirm)
lineObj.todayData.push(item.todayConfirm)
})
@@ -54,13 +55,13 @@ function initChart(canvas, width, height, dpr) {
},
legend: {
data: ['累计确诊', '新增确诊'],
-
+
},
toolbox: {
+ show: false,
orient: 'vertical',
left: 'right',
top: 'center',
- show: true,
feature: {
// dataView: { show: true, readOnly: false },
magicType: { show: true, type: ['line', 'bar'] },
@@ -72,13 +73,18 @@ function initChart(canvas, width, height, dpr) {
xAxis: [
{
type: 'category',
- // prettier-ignore
- data: lineObj.labelArray
+ data: lineObj.labelArray,
+ axisLabel: {
+ show: true,
+ formatter: function (value) {
+ return value.split("").join("\n");
+ }
+ }
}
],
yAxis: [
{
- type: 'value'
+ type: 'value',
}
],
series: [
diff --git a/miniprogram/components/visualComponent/lineChart/lineChart.wxss b/miniprogram/components/visualComponent/lineChart/lineChart.wxss
index 823ccd7..a6df40a 100644
--- a/miniprogram/components/visualComponent/lineChart/lineChart.wxss
+++ b/miniprogram/components/visualComponent/lineChart/lineChart.wxss
@@ -4,5 +4,5 @@
margin-top: 30px;
width: 100vw;
height: 350px;
- background: rgba(255,255,255,0.8);
+ background: rgba(255,255,255,0);
}
\ No newline at end of file
diff --git a/miniprogram/pages/blog/blog.js b/miniprogram/pages/blog/blog.js
index c11a05a..c8fe6ca 100644
--- a/miniprogram/pages/blog/blog.js
+++ b/miniprogram/pages/blog/blog.js
@@ -101,7 +101,6 @@ Component({
* @param {*} title
*/
setArticleNode(articleStr,title){
- console.log('接受',articleStr,title)
const markdownText = app.towxml(articleStr,'markdown',{
theme:'light', //主题 dark 黑色,light白色,不填默认light
events:{ //为元素绑定的事件方法
@@ -119,6 +118,12 @@ Component({
currentTitle:title
})
},
+ clearArticleNode(){
+ this.setData({
+ article:null,
+ currentTitle:'加载中...'
+ })
+ },
onMyButtonTap: function(){
this.setData({
// 更新属性和数据的方法与更新页面数据的方法类似
diff --git a/miniprogram/pages/blog/blog.wxml b/miniprogram/pages/blog/blog.wxml
index ec79fe8..57c4256 100644
--- a/miniprogram/pages/blog/blog.wxml
+++ b/miniprogram/pages/blog/blog.wxml
@@ -1,12 +1,14 @@
+
+{{currentTitle}}
+
-
-{{currentTitle}}
+
+
-
diff --git a/miniprogram/pages/blog/blog.wxss b/miniprogram/pages/blog/blog.wxss
index 976e9a6..f32f647 100644
--- a/miniprogram/pages/blog/blog.wxss
+++ b/miniprogram/pages/blog/blog.wxss
@@ -2,9 +2,9 @@
.container-blog{
position: relative;
width: 100vw;
- height:100vh;
+ height:90vh;
background: rgba(255,255,255,0.8); /* fallback for old browsers */
- overflow: auto;
+ overflow: hidden;
}
.loading{
@@ -13,21 +13,29 @@
height: 100px;
perspective: 780px;
position: relative;
- top:25%;
+ top:20%;
left:50%;
- transform: translate(-50%,-25%);
+ transform: translate(-50%,-20%);
+}
+.blog-container-box{
+ width: 100vw;
+ height: calc(100vh - 110px);
+ overflow: auto;
}
.blog-container{
- margin-top:30px;
+ margin-top:100px;
width: 100vw;
- height: 100vh;
+ height: auto;
+ margin-bottom:10px;
}
.blog-title{
text-align: center;
font-weight: bold;
- background: rgb(114, 158, 240);
- position: absolute;
+ background: rgba(114, 158, 240);
+ color: #ffffff;
+ position: relative;
margin:0;
- padding:0;
+ padding: 10px;
width: 100%;
+ min-height: 20px;
}
\ No newline at end of file
diff --git a/miniprogram/pages/future/future.js b/miniprogram/pages/future/future.js
index df1a23a..da12ccd 100644
--- a/miniprogram/pages/future/future.js
+++ b/miniprogram/pages/future/future.js
@@ -9,15 +9,40 @@ Component({
options: {
addGlobalClass: true,
},
+
+ // 属性定义
+ properties: {
+ // 用户信息
+ userInfo: {
+ type: Object,
+ value: ()=>{
+ return {
+
+ }
+ },
+ observer: function(newVal, oldVal) {
+ // 属性值变化时执行
+ console.log(newVal,oldVal,'change')
+ }
+ }
+ },
/**
*组件的初始数据
*/
data: {
- content: '子组件的content',
- btnType:'map',
- homeHeaderItem: '',
- isLoading: false,
- article: { 'key': 12 },
+ mode:'introduce',
+ article:{},
+ articleId:44,
+ baseUrl:'https://yongma16.xyz/api/',
+ path:'article/blog/',
+ currentUserInfo:{
+ nickName:'',
+ avatarUrl:''
+ },
+ aiConfig:{
+ avatarUrl:'https://yongma16.xyz/staticFile/common/img/aiTop.jpg',
+ bgUrl:'https://yongma16.xyz/staticFile/common/img/aiBg.jpg'
+ },
searchOpenAiText:'',
responseText:'',
// questions,answer,index
@@ -29,13 +54,11 @@ Component({
}],
currentIndex:0
}
- },
- observers: {
-
},
lifetimes: {
// 生命周期函数,可以为函数,或一个在 methods 段中定义的方法名
attached: function () {
+ this.getRemoteArticle(this.data.articleId)
if(wx.getStorageSync('openAiOptions')){
this.setData(
{
@@ -43,6 +66,16 @@ Component({
}
)
}
+
+ if(wx.getStorageSync('currentUserInfo')){
+ console.log('currentUserInfo',wx.getStorageSync('currentUserInfo'))
+ this.setData(
+ {
+ currentUserInfo:wx.getStorageSync('currentUserInfo')
+ }
+ )
+ }
+
},
moved: function () { },
detached: function () {
@@ -50,20 +83,52 @@ Component({
},
},
- // 生命周期函数,可以为函数,或一个在 methods 段中定义的方法名
- // attached: function () { }, // 此处 attached 的声明会被 lifetimes 字段中的声明覆盖
- // ready: function() { },
-
- pageLifetimes: {
- // 组件所在页面的生命周期函数
- show: function () {
- console.log('pageLifetimes')
- },
- hide: function () { },
- resize: function () { },
- },
-
methods: {
+ getRemoteArticle:function(id){
+ this.setData({
+ isLoading:true
+ })
+ const baseUrl=this.data.baseUrl
+ const path=this.data.path
+ const headers = {'Content-Type':'application/json;charset=UTF-8'}
+ const that=this
+ const params={
+ id:id
+ }
+ wx.request({
+ url: baseUrl+path,
+ headers:headers,
+ data:params,
+ method:'POST',
+ success: (res) => {
+ const data=res.data
+ const articleStr=data&&data.article&&data.article
+ const markdownText = app.towxml(articleStr,'markdown',{
+ theme:'light', //主题 dark 黑色,light白色,不填默认light
+ base: baseUrl+path,
+ events:{ //为元素绑定的事件方法
+ tap:e => {
+ console.log('tap',e);
+ },
+ change:e => {
+ console.log('todo',e);
+ }
+ }
+ });
+ that.setData({
+ isLoading:false,
+ article:markdownText
+ })
+ }
+ });
+ },
+ changeMode(e){
+ const {mode}=e.currentTarget.dataset
+ console.log(mode,'mode')
+ this.setData({
+ mode:mode
+ })
+ },
bindKeyInput(e) {
const {columnIndex}=e.currentTarget.dataset
console.log('this.data.chatObjConfig',this.data.chatObjConfig)
@@ -91,6 +156,7 @@ Component({
cancelColor: 'cancelColor',
title:'请输入!'
})
+ return
}
wx.showLoading({
title: '加载中',
@@ -138,117 +204,21 @@ Component({
thisBack.setData(
{
isLoading: false,
+ searchOpenAiText:'',
chatObjConfig:chatObjConfig
}
)
- setTimeout(function () {
- wx.hideLoading()
- }, 2000)
+ wx.hideLoading()
resolve(res)
},
fail: error => {
thisBack.setData({
isLoading: false
})
- setTimeout(function () {
- wx.hideLoading()
- }, 2000)
- reject(error)
+ wx.hideLoading()
}
});
})
- },
-
- clickHeadBtn(e){
- console.log(e)
- const {btnType}=e.currentTarget.dataset
- this.setData(
- {btnType:btnType}
- )
- },
- async initData() {
- await this.getGeoJson()
- await this.getOutBreakData()
- this.setData({
- isLoading: false
- })
- },
- getGeoJson() {
- if(app.globalData.geoJson){
- return new Promise(resolve=>{
- resolve()
- })
- }
- const path = '/common-api/mapApp/getGeoJson/'
- const headers = { 'Content-Type': 'application/json;charset=UTF-8' }
- return new Promise((resolve, reject) => {
- wx.request({
- url: baseUrl + path,
- headers: headers,
- method: 'GET',
- success: (res) => {
- app.globalData.geoJson = res.data.data
- const geoAdcodeMap = []
- app.globalData.geoJson.features.map(item => {
- const { properties } = item
- geoAdcodeMap.push({
- name: properties.name,
- adcode: properties.adcode
- })
- })
- app.globalData.geoAdcodeMap = [...geoAdcodeMap]
- resolve(res.data.data)
- },
- fail: error => {
- reject(error)
- }
- });
- })
- },
-
- getOutBreakData() {
- if(app.globalData.hotData){
- return new Promise(resolve=>{
- resolve()
- })
- }
- const path = '/common-api/mapApp/outBreak/'
- const headers = { 'Content-Type': 'application/json;charset=UTF-8' }
- return new Promise((resolve, reject) => {
- wx.request({
- url: baseUrl + path,
- headers: headers,
- method: 'GET',
- success: (res) => {
- app.globalData.hotData = res.data.data
- /**
- * @type {string} 贵州省 adcode
- */
- const targetAdcode = "520000"
- const targetItem = app.globalData.hotData.areaTree[0].children.find(item => { return item.adcode === targetAdcode })
- app.globalData.hotData.targetItem={...targetItem}
- resolve(res.data.data)
- },
- fail: error => {
- reject(error)
- }
- });
- })
- },
- onMyButtonTap: function () {
- this.setData({
- // 更新属性和数据的方法与更新页面数据的方法类似
- })
- },
- // 内部方法建议以下划线开头
- _myPrivateMethod: function () {
- // 这里将 data.A[0].B 设为 'myPrivateData'
- // this.setData({
- // 'A[0].B': 'myPrivateData'
- // })
- },
- _propertyChange: function (newVal, oldVal) {
-
}
}
})
\ No newline at end of file
diff --git a/miniprogram/pages/future/future.json b/miniprogram/pages/future/future.json
index 5ef701d..d7b07c7 100644
--- a/miniprogram/pages/future/future.json
+++ b/miniprogram/pages/future/future.json
@@ -2,6 +2,7 @@
"usingComponents": {
"geoMap":"/components/visualComponent/geoMap/geoMap",
"lineChart":"/components/visualComponent/lineChart/lineChart",
- "blockInfo":"/components/base/blockInfo/blockInfo"
+ "blockInfo":"/components/base/blockInfo/blockInfo",
+ "towxml":"/towxml/towxml"
}
-}
\ No newline at end of file
+}
diff --git a/miniprogram/pages/future/future.wxml b/miniprogram/pages/future/future.wxml
index a5840cf..1ff2ac9 100644
--- a/miniprogram/pages/future/future.wxml
+++ b/miniprogram/pages/future/future.wxml
@@ -1,5 +1,5 @@
-
+
-
+
+
+
+
+
+
+
-
+
- 问:$
-
-
- 问:$ {{item.question}}
+
+
+ ({{currentUserInfo.nickName}}):
+
+
+
+ ({{currentUserInfo.nickName}}):$ {{item.question}}
+
-
- openai回答:$ {{item.answer}}
+
+
+
+ (openai):$ {{item.answer}}
+
+
-
-
+
+
diff --git a/miniprogram/pages/future/future.wxss b/miniprogram/pages/future/future.wxss
index 1652694..a85d065 100644
--- a/miniprogram/pages/future/future.wxss
+++ b/miniprogram/pages/future/future.wxss
@@ -1,8 +1,8 @@
/* pages/homeContent/homeContent.wxss */
-.container-future{
+.container-future {
position: relative;
width: 100vw;
- height:100vh;
+ height: 100vh;
background: linear-gradient(to right, rgba(1, 41, 116, 0.1) 1px, transparent 1px), linear-gradient(to bottom, rgba(1, 41, 116, 0.1) 1px, transparent 1px);
background-repeat: repeat;
background-size: 10px 10px;
@@ -11,112 +11,156 @@
box-sizing: border-box;
}
-.loading{
+.loading {
position: absolute;
width: 100px;
height: 100px;
perspective: 780px;
position: relative;
- top:25%;
- left:50%;
- transform: translate(-50%,-25%);
+ top: 25%;
+ left: 50%;
+ transform: translate(-50%, -25%);
}
-.container-box{
+
+.container-box {
position: relative;
width: 100%;
height: 100vh;
overflow: auto;
}
-.header-container{
+
+.header-container {
position: absolute;
- height:30px;
+ height: 30px;
width: 100%;
}
-.content-container{
- margin-top:30px;
+
+.content-container {
+ margin-top: 30px;
position: absolute;
- height:100vh;
+ height: 100vh;
width: 100%;
overflow: auto;
}
-.flex-container{
+
+.flex-container {
display: flex;
justify-content: center;
align-items: center;
line-height: 30px;
}
-.header-container{
+
+.header-container {
width: 100vw;
}
-.header-btn{
- color:#262626;
- margin:0;
- padding:0;
+
+.header-btn {
+ color: #262626;
+ margin: 0;
+ padding: 0;
}
-.title{
- color:#ffffff;
- flex:1;
+
+.title {
+ color: #ffffff;
+ flex: 1;
font-size: 12px;
line-height: 30px;
text-align: center;
background: rgb(252, 37, 8);
}
-button{
+
+button {
border-radius: 0;
outline: none;
font-weight: normal;
}
-.btn-default{
- color:#262626;
- flex:1;
- width:300px;
+
+.btn-default {
+ color: #262626;
+ flex: 1;
+ width: 300px;
text-align: center;
background-color: #ffffff;
}
-.actived{
+
+.actived {
color: #ffffff;
- flex:1;
+ flex: 1;
text-align: center;
background-color: rgb(8, 183, 252);
}
-.form-container-api{
+.form-container-api {
display: block;
- height:auto;
+ height: auto;
width: 100%;
}
-.form-request{
+.form-request {
display: block;
width: 100%;
- color:#07c160;
+ color: #07c160;
background-color: rgb(37, 0, 97);
+ line-height: 50px;
+ padding: 5px;
}
-.form-response{
+
+.form-response {
position: relative;
width: 100%;
margin-top: 10px;
display: block;
margin-bottom: 10px;
- color:#07c160;
- background-color: rgb(0, 72, 94);
+ color: #07c160;
+ background-color: rgb(0, 72, 94);
}
-.form-class-submit{
+
+.form-class-submit {
margin-top: 10px;
display: block;
width: 100%;
background-color: rgb(248, 70, 0);
}
-.form-submit-btn{
+.form-container-introduce {
+ position: relative;
width: 100%;
- display: block;
+ height: calc(100vh - 60px);
}
-.chat-container{
- margin-top:20px;
+.container-box-article{
+ position: relative;
width: 100%;
- height: 336px;
+ height: calc(100vh - 100px);
overflow: auto;
+}
+
+.chat-container {
+ margin-top: 10px;
+ width: 100%;
+ height: calc(100vh - 100px);
+ overflow: auto;
+ position: relative;
+}
+
+.user-image-box {
+ width: 200px;
+ height: 140px;
+ text-align: center;
+ align-items: center;
+}
+
+.user-image {
+ position: relative;
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+}
+
+.ai-image {
+ position: relative;
+ width: 20px;
+ height: 20px;
+ border-radius: 50%;
}
\ No newline at end of file
diff --git a/miniprogram/pages/home/home.js b/miniprogram/pages/home/home.js
index 9824152..3fc4b42 100644
--- a/miniprogram/pages/home/home.js
+++ b/miniprogram/pages/home/home.js
@@ -8,7 +8,7 @@ Page({
*/
data: {
title: 'header',
- userInfo: '',
+ userInfo: {},
content: '我是父组件的content',
footContent: "bottomContent",
headBackground: [
@@ -40,6 +40,15 @@ Page({
console.log('监听', newVal, oldVal)
}
},
+ /**
+ * 用户信息配置
+ */
+ setCurrentUserInfo(userInfo){
+ console.log('事件触发userInfo',userInfo)
+ this.setData({
+ userInfo:userInfo
+ })
+ },
/**
* 获取文章
*/
diff --git a/miniprogram/pages/home/home.wxml b/miniprogram/pages/home/home.wxml
index ac5a25b..a14f469 100644
--- a/miniprogram/pages/home/home.wxml
+++ b/miniprogram/pages/home/home.wxml
@@ -6,9 +6,9 @@
diff --git a/miniprogram/pages/life/life.wxml b/miniprogram/pages/life/life.wxml
index dff6951..bc6f78d 100644
--- a/miniprogram/pages/life/life.wxml
+++ b/miniprogram/pages/life/life.wxml
@@ -8,26 +8,4 @@
-
-
-
diff --git a/miniprogram/pages/life/life.wxss b/miniprogram/pages/life/life.wxss
index 1e9abf2..464c9fc 100644
--- a/miniprogram/pages/life/life.wxss
+++ b/miniprogram/pages/life/life.wxss
@@ -2,18 +2,24 @@
.container-life{
position: relative;
width: 100vw;
- height:100vh;
+ height:calc(100vh - 60px);
color:#ff00aa;
background: #fff; /* fallback for old browsers */
overflow: hidden;
animation-name:backdiv;
animation-duration: 6s;
animation-iteration-count: infinite;
+ box-sizing: border-box;
}
.container-box{
position: relative;
width: 100vw;
- height:100vh;
+ height: calc(100vh - 60px);
+ overflow: auto;
+}
+.blog-container{
+ width: 100vw;
+ overflow: auto;
}
.loading{
--
GitLab