12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- // pages/index/index.ts
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad() {
- },
- clickItem: function (event: any) {
- console.log(event.target.id)
- switch (Number(event.target.id)) {
- case 0:
- console.log("click teacher")
- break;
- case 1:
- console.log("click installer")
- break;
- case 2:
- console.log("click repairman")
- break;
- case 3:
- console.log("click it")
- break;
- }
- this.toNextPage(Number(event.target.id))
- },
- toNextPage: function (type: any) {
- wx.navigateTo({
- url: '../login/login?id=' + type,
- })
- }
- })
|