index.js
1.3 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//index.js
//获取应用实例
const app = getApp()
Page({
data: {
imgUrls: ['http://winesbook.cn/static/images_mini/aicon_94x.png',
'http://winesbook.cn/static/images_mini/aicon_95x.png',
'http://winesbook.cn/static/images_mini/aicon_96x.png',
'http://winesbook.cn/static/images_mini/aicon_98x.png',
'/img/begin.png',
],
indicatorDots: false,
autoplay: false,
interval: 2000,
duration: 1000,
currentSwiper: 0,
},
//事件处理函数
bindViewTap: function() {
wx.navigateTo({
url: '../logs/logs'
})
},
onLoad: function () {
},
start(e) {
let that = this;
console.log(e)
wx.login({
success: (res) => {
console.log(res)
// let url = '/api/wxapp/public/login';
// let params = {
// openid: that.data.openid,
// session_key: that.data.session_key,
// encrypted_data: e.detail.encryptedData,
// iv: e.detail.iv
// }
// app.post(url, params).then((res) => {
// console.log(res)
// wx.setStorageSync('token', res.token)
// that.islahei()
// }).catch((errMsg) => {
// })
}
});
},
swiperChange: function (e) {
this.setData({
currentSwiper: e.detail.current
})
},
})