更新个性化相关

This commit is contained in:
539943419 committed 2023-11-20 15:54:46 +08:00
1 parent ac2e6bf800
commit a1f11d317f
3 files changed
+102 -56

No files matched your search

+7 -4
View File
@@ -714,25 +714,28 @@ page{
display: flex;
flex-wrap: wrap;
justify-content:center;
padding-top: 20rpx;
padding-bottom: 40rpx;
padding-top: 30rpx;
.choose_color{
box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
width: 300rpx;
height: 300rpx;
margin: 20rpx;
margin: 20rpx 25rpx;
border-radius: 30rpx;
display:flex;
flex-direction: row;
overflow: hidden;
.node{
width:34%;
width:33.4%;
height: 300rpx;
background-color: white;
}
// background-color: white;
// background: linear-gradient(to right,rgb(255, 255, 255) 33%,blue 66%,rgb(0, 0, 0)100%);
}
.empty{
width: 100%;
height: 100rpx;
}
}
}
+94 -51
View File
@@ -7,46 +7,57 @@ const serverAddr = "http://127.0.0.1:5000"
Page({
data: {
miao_style:`
--main-color:rgb(246, 255, 252);
--secondary-color:rgba(125, 235, 202, 0.205);
--tertiary-color:rgba(123, 245, 245, 0.5);
--main-color:rgb(234, 234, 234);
--secondary-color:rgb(247, 247, 247);
--tertiary-color:rgb(255, 255, 255);
--text-color:rgb(0, 0, 0);
`,
active_style:"warm",
active_style:"skyline",
// 也不会有人看到
style_lib:{
bios:{
name:"生命",
intro:"我好像成为你的鹿",
wechat:{
name:"Unknow Mother-Goose",
intro:"",
style:{
main:'rgb(179, 57, 47)',
secondary:'rgb(214, 212, 205)',
tertiary:'rgb(234, 255, 208)',
main:'rgb(234, 234, 234)',
secondary:'rgb(247, 247, 247)',
tertiary:'rgb(255, 255, 255)',
text:'rgb(0, 0, 0)',
}
},
warm:{
name:"被爱灌溉成长的人",
intro:"我好像成为你的鹿",
wechat_dark:{
name:"栖身之地",
intro:"",
style:{
main:'rgb(206, 90, 103)',
secondary:'rgb(252, 245, 237)',
tertiary:'rgb(244, 191, 150)',
main:'#4D4D4D',
secondary:'#F1F1F1',
tertiary:'#AAAAAA',
text:'rgb(0, 0, 0)',
}
},
bin:{
name:"冰岛",
intro:"我好像成为你的鹿",
skyline:{
name:"陪你的猫睡午觉",
intro:"",
style:{
main:'rgb(57, 62, 70)',
secondary:'rgb(238, 238, 238)',
tertiary:'rgb(66, 125, 157)',
main:'rgb(210, 233, 233)',
secondary:'rgb(248, 246, 244)',
tertiary:'rgb(227, 244, 244)',
text:'rgb(0, 0, 0)',
}
},
white:{
name:"他们说我是没有用的年轻人",
intro:"",
style:{
main:'rgb(205, 201, 195)',
secondary:'#EBE3D5',
tertiary:'rgb(251, 247, 240)',
text:'rgb(0, 0, 0)',
}
},
purple:{
name:"紫罗兰",
intro:"我好像成为你的鹿",
name:"或许我们都忘了最初说过的话",
intro:"",
style:{
main:'rgb(208, 162, 247)',
secondary:'rgb(241, 234, 255)',
@@ -54,29 +65,9 @@ Page({
text:'rgb(0, 0, 0)',
}
},
Ukraine:{
name:"乌克兰",
intro:"我好像成为你的鹿",
style:{
main:'rgb(12, 53, 106)',
secondary:'rgb(255, 196, 54)',
tertiary:'rgb(1, 116, 190)',
text:'rgb(0, 0, 0)',
}
},
watermelon:{
name:"西瓜",
intro:"我好像成为你的鹿",
style:{
main:'rgb(255, 170, 167)',
secondary:'rgb(213, 236, 194)',
tertiary:'rgb(255, 211, 180)',
text:'rgb(0, 0, 0)',
}
},
shine:{
name:"ta",
intro:"我好像成为你的鹿",
name:"至少我想感同你的身受",
intro:"",
style:{
main:'rgb(242, 190, 209)',
secondary:'rgb(248, 232, 238)',
@@ -84,9 +75,49 @@ Page({
text:'rgb(0, 0, 0)',
}
},
warm:{
name:"被爱灌溉成长的人",
intro:"",
style:{
main:'rgb(206, 90, 103)',
secondary:'rgb(252, 245, 237)',
tertiary:'rgb(244, 191, 150)',
text:'rgb(0, 0, 0)',
}
},
watermelon:{
name:"没有人在乎你在乎的事",
intro:"",
style:{
main:'rgb(255, 170, 167)',
secondary:'rgb(213, 236, 194)',
tertiary:'rgb(255, 211, 180)',
text:'rgb(0, 0, 0)',
}
},
bin:{
name:"在游荡的路上学会宽容",
intro:"",
style:{
main:'rgb(57, 62, 70)',
secondary:'rgb(238, 238, 238)',
tertiary:'rgb(66, 125, 157)',
text:'rgb(0, 0, 0)',
}
},
Ukraine:{
name:"我还年轻我还年轻",
intro:"",
style:{
main:'rgb(12, 53, 106)',
secondary:'rgb(255, 196, 54)',
tertiary:'rgb(1, 116, 190)',
text:'rgb(0, 0, 0)',
}
},
tree:{
name:"乌克兰",
intro:"我好像成为你的鹿",
name:"我好想成为你的鹿",
intro:"",
style:{
main:'rgb(60, 98, 85)',
secondary:'rgb(234, 231, 177)',
@@ -94,6 +125,16 @@ Page({
text:'rgb(0, 0, 0)',
}
},
cookie:{
name:"我爱你,却不能拯救你",
intro:"",
style:{
main:'rgb(92, 84, 112)',
secondary:'rgb(250, 240, 230)',
tertiary:'rgb(185, 180, 199)',
text:'rgb(0, 0, 0)',
}
},
},
// motto: 'Hello World',
text_startPage1: "知识库",
@@ -339,7 +380,7 @@ Page({
else{
name = e.currentTarget.dataset.index
}
console.log(name)
// console.log(name)
var style = this.data.style_lib[name].style
var str = `
--main-color:${style.main};
@@ -351,6 +392,7 @@ Page({
miao_style:str,
active_style:name
})
console.log("设置主题:"+this.data.style_lib[name].name)
this.save2storage()
},
@@ -696,6 +738,7 @@ Page({
if (n.id == id) {
this.data.resultId = id
this.show_result(n.res, "heart")
break;
}
}
}
@@ -1264,7 +1307,7 @@ Page({
for (var k of list) {
wx.setStorageSync(k,this.data[k])
console.log(k,this.data[k])
// console.log(k,this.data[k])
}
},
@@ -1275,7 +1318,7 @@ Page({
var m = {}
m[k] = wx.getStorageSync(k)
this.setData(m)
console.log(k,this.data[k])
// console.log(k,this.data[k])
// this.data[k]=wx.getStorageSync(k)
// console.log(wx.getStorageSync(k))
}
+1 -1
View File
@@ -116,7 +116,6 @@
<view class="history_content">
<view class="picture" wx:for="{{arr}}" wx:for-item="res" >
<!-- {{content}} -->
<!-- https://www.cnblogs.com/china-fanny/p/11213746.html#:~:text=%E5%A6%82%E4%BD%95%E6%98%BE%E7%A4%BA%20%EF%BC%9F%20%E4%BD%BF%E7%94%A8image%E6%A0%87%E7%AD%BE%EF%BC%8Csrc%E5%B1%9E%E6%80%A7%E6%B7%BB%E5%8A%A0,data%3Aimage%2Fpng%3Bbase64%2C%20%EF%BC%88%E6%B3%A8%E6%84%8F%EF%BC%9A%E8%8B%A5imgData%E8%BF%94%E5%9B%9E%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%90%AB%E6%9C%89data%3Aimage%2Fpng%3Bbase64%2C%E6%97%B6%EF%BC%8Csrc%E7%9B%B4%E6%8E%A5%E5%86%99src%3D%22%20%7B%20%7BimgData%7D%7D%22%E5%8D%B3%E5%8F%AF%EF%BC%89 -->
<image src="{{ res.imgUrl }}" mode="'aspectFit'" style="height: 150rpx;width: 150rpx;"bind:tap="show_result_wxml" data-index="{{ res }}" />
</view>
</view>
@@ -162,6 +161,7 @@
<view class="node" style="background-color: {{n.style.secondary}};"></view>
<!-- {{ n.style.main }} -->
</view>
<view class="empty"></view>
</view>
</view>