更新个性化相关
This commit is contained in:
1 parent
ac2e6bf800
commit
a1f11d317f
3 files changed
+102
-56
No files matched your search
@@ -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))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user