index.js
837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Page({
data: {
showBackBtn:false
},
onRoute(options) {
const index = options.index || 0
let title = 'wxchat_qf_title'
let list = []
switch (Number(index)) {
case 1:
title = 'wxchat_pyq_title'
list = ['wxchat_pyq_0','wxchat_pyq_1','wxchat_pyq_2']
break;
case 2:
title = 'wxchat_hy_title'
list = ['wxchat_hy_0','wxchat_hy_1','wxchat_hy_2']
break;
default:
title = 'wxchat_qf_title'
list = ['wxchat_qf_0','wxchat_qf_1','wxchat_qf_2','wxchat_qf_3','wxchat_qf_4']
break;
}
this.setData({
title,
list
},()=>{
setTimeout(() => {
this.setData({
showBackBtn:true
})
}, 1500);
})
},
toBack(){
wx.navigateBack({
delta: 1
});
},
})