101 lines
2.3 KiB
TypeScript
101 lines
2.3 KiB
TypeScript
// pages/guide/guide.ts
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
current: 1,
|
|
steps: [{
|
|
// url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/5b5b8cc9ff064204a361d05889ebb45a:附件_1661483704.png', height: '1175rpx',
|
|
url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/d116774ef2594033ae202c83e84ae108:附件_1665474737.png', height: '1175rpx',
|
|
},
|
|
{ url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/c1692ab7cfa74b0d9e1493a52dc2944d:附件_1665474769.png', height: '1175rpx', },
|
|
{ url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/eb569d76801546c78bf710681e4ca9ef:附件_1665474786.png', height: '1175rpx', },
|
|
{ url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/85fa02927ae343c2a77d23e98531e399:附件_1665474800.png', height: '1175rpx', },
|
|
{ url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/d4920d16a64b46eca164c4a459fb3406:附件_1667802318.png', height: '1175rpx', },
|
|
{ url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/26df74ccf9a8479e99dd3f7d029d0b5e:附件_1665474837.png', height: '1175rpx', },
|
|
{ url: 'https://chrivc.obs.cn-north-4.myhuaweicloud.com/85b02a8b4291478299e79677f166dfe7:附件_1665474852.png', height: '1175rpx', }
|
|
],
|
|
remember: false
|
|
},
|
|
stepChange(e: WechatMiniprogram.CustomEvent) {
|
|
// console.log(e.detail);
|
|
const { current } = e.detail
|
|
this.setData({
|
|
current: current + 1
|
|
})
|
|
},
|
|
handleExit() {
|
|
let { remember } = this.data
|
|
if (remember) {
|
|
wx.setStorageSync('showGuide', JSON.stringify(remember))
|
|
}
|
|
wx.navigateBack({
|
|
delta: 1
|
|
})
|
|
},
|
|
handleChecked() {
|
|
let { remember } = this.data
|
|
this.setData({
|
|
remember: !remember
|
|
})
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage() {
|
|
|
|
}
|
|
}) |