feat: 添加引导内容,第一步引导
This commit is contained in:
@@ -13,6 +13,26 @@ Page({
|
||||
showColorPopup: false,
|
||||
currentKey: 0,
|
||||
currentColor: '',
|
||||
showIntroductionPopup: false,
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
const hasShowIntroduction =
|
||||
wx.getStorageSync('hasShowIntroduction') || false;
|
||||
|
||||
if (!hasShowIntroduction) {
|
||||
this.setData({
|
||||
cardList: [
|
||||
{ color: '#FF0000', word: '涂' },
|
||||
{ color: '#00FF00', word: '欢' },
|
||||
{ color: '#FF7F00', word: '鸦' },
|
||||
{ color: '#00FFFF', word: '迎' },
|
||||
{ color: '#FFFF00', word: '丫' },
|
||||
{ color: '#8A2BE2', word: '你' },
|
||||
],
|
||||
showIntroductionPopup: true,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onReady() {
|
||||
@@ -151,4 +171,9 @@ Page({
|
||||
cardList,
|
||||
});
|
||||
},
|
||||
|
||||
onCloseIntroductionPopup() {
|
||||
this.setData({ showIntroductionPopup: false });
|
||||
wx.setStorageSync('hasShowIntroduction', true);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user