正在显示
36 个修改的文件
包含
633 行增加
和
216 行删除
@@ -5,68 +5,94 @@ Page({ | @@ -5,68 +5,94 @@ Page({ | ||
5 | * 页面的初始数据 | 5 | * 页面的初始数据 |
6 | */ | 6 | */ |
7 | data: { | 7 | data: { |
8 | - | 8 | + punchState: true, |
9 | + address: '' | ||
9 | }, | 10 | }, |
10 | //打卡申诉 | 11 | //打卡申诉 |
11 | - punchApply(){ | 12 | + punchApply() { |
12 | wx.navigateTo({ | 13 | wx.navigateTo({ |
13 | url: 'punchAppeal/punchAppeal', | 14 | url: 'punchAppeal/punchAppeal', |
14 | }) | 15 | }) |
15 | }, | 16 | }, |
16 | - | 17 | + //打卡 |
18 | + punch() { | ||
19 | + var that = this | ||
20 | + wx.getLocation({ | ||
21 | + type: 'wgs84', | ||
22 | + success: function(res) { | ||
23 | + console.log(res) | ||
24 | + var latitude = res.latitude | ||
25 | + var longitude = res.longitude | ||
26 | + var speed = res.speed | ||
27 | + var accuracy = res.accuracy | ||
28 | + }, | ||
29 | + }) | ||
30 | + wx.chooseLocation({ | ||
31 | + success: function(res) { | ||
32 | + console.log(res) | ||
33 | + var latitude = res.latitude | ||
34 | + var longitude = res.longitude | ||
35 | + var address = res.address | ||
36 | + that.setData({ | ||
37 | + address: address, | ||
38 | + punchState:false | ||
39 | + }) | ||
40 | + }, | ||
41 | + }) | ||
42 | + }, | ||
17 | /** | 43 | /** |
18 | * 生命周期函数--监听页面加载 | 44 | * 生命周期函数--监听页面加载 |
19 | */ | 45 | */ |
20 | - onLoad: function (options) { | 46 | + onLoad: function(options) { |
21 | 47 | ||
22 | }, | 48 | }, |
23 | 49 | ||
24 | /** | 50 | /** |
25 | * 生命周期函数--监听页面初次渲染完成 | 51 | * 生命周期函数--监听页面初次渲染完成 |
26 | */ | 52 | */ |
27 | - onReady: function () { | 53 | + onReady: function() { |
28 | 54 | ||
29 | }, | 55 | }, |
30 | 56 | ||
31 | /** | 57 | /** |
32 | * 生命周期函数--监听页面显示 | 58 | * 生命周期函数--监听页面显示 |
33 | */ | 59 | */ |
34 | - onShow: function () { | 60 | + onShow: function() { |
35 | 61 | ||
36 | }, | 62 | }, |
37 | 63 | ||
38 | /** | 64 | /** |
39 | * 生命周期函数--监听页面隐藏 | 65 | * 生命周期函数--监听页面隐藏 |
40 | */ | 66 | */ |
41 | - onHide: function () { | 67 | + onHide: function() { |
42 | 68 | ||
43 | }, | 69 | }, |
44 | 70 | ||
45 | /** | 71 | /** |
46 | * 生命周期函数--监听页面卸载 | 72 | * 生命周期函数--监听页面卸载 |
47 | */ | 73 | */ |
48 | - onUnload: function () { | 74 | + onUnload: function() { |
49 | 75 | ||
50 | }, | 76 | }, |
51 | 77 | ||
52 | /** | 78 | /** |
53 | * 页面相关事件处理函数--监听用户下拉动作 | 79 | * 页面相关事件处理函数--监听用户下拉动作 |
54 | */ | 80 | */ |
55 | - onPullDownRefresh: function () { | 81 | + onPullDownRefresh: function() { |
56 | 82 | ||
57 | }, | 83 | }, |
58 | 84 | ||
59 | /** | 85 | /** |
60 | * 页面上拉触底事件的处理函数 | 86 | * 页面上拉触底事件的处理函数 |
61 | */ | 87 | */ |
62 | - onReachBottom: function () { | 88 | + onReachBottom: function() { |
63 | 89 | ||
64 | }, | 90 | }, |
65 | 91 | ||
66 | /** | 92 | /** |
67 | * 用户点击右上角分享 | 93 | * 用户点击右上角分享 |
68 | */ | 94 | */ |
69 | - onShareAppMessage: function () { | 95 | + onShareAppMessage: function() { |
70 | 96 | ||
71 | } | 97 | } |
72 | }) | 98 | }) |
@@ -3,11 +3,12 @@ | @@ -3,11 +3,12 @@ | ||
3 | <view class='circle_large'> | 3 | <view class='circle_large'> |
4 | <view class='circle_middle'> | 4 | <view class='circle_middle'> |
5 | <view class='circle_small'> | 5 | <view class='circle_small'> |
6 | - <text wx:if='{{}}'>一键打卡</text> | ||
7 | - <text class='iconfont icon-dui'></text> | 6 | + <text wx:if='{{punchState}}' bindtap='punch'>一键打卡</text> |
7 | + <text class='iconfont icon-dui' wx:else></text> | ||
8 | </view> | 8 | </view> |
9 | </view> | 9 | </view> |
10 | </view> | 10 | </view> |
11 | - <view class='punch_info'>当前:未获取</view> | 11 | + <view class='punch_info' wx:if="{{address==''}}">当前:未获取</view> |
12 | + <view class='punch_info' wx:else>当前:{{address}}</view> | ||
12 | <view class='punch_btn' bindtap='punchApply'>打卡申诉</view> | 13 | <view class='punch_btn' bindtap='punchApply'>打卡申诉</view> |
13 | </view> | 14 | </view> |
@@ -42,9 +42,11 @@ | @@ -42,9 +42,11 @@ | ||
42 | font-size: 90rpx; | 42 | font-size: 90rpx; |
43 | } | 43 | } |
44 | .punch_info{ | 44 | .punch_info{ |
45 | + width: 600rpx; | ||
45 | font-size: 32rpx; | 46 | font-size: 32rpx; |
46 | color: #FFFFFF; | 47 | color: #FFFFFF; |
47 | margin-top: 60rpx; | 48 | margin-top: 60rpx; |
49 | + text-align: center; | ||
48 | } | 50 | } |
49 | .punch_btn { | 51 | .punch_btn { |
50 | width: 200rpx; | 52 | width: 200rpx; |
@@ -54,10 +54,10 @@ Page({ | @@ -54,10 +54,10 @@ Page({ | ||
54 | }, | 54 | }, |
55 | }) | 55 | }) |
56 | }, | 56 | }, |
57 | -//跳转申诉详情页 | ||
58 | - listDetail(){ | 57 | + //跳转申诉详情页 |
58 | + listDetail() { | ||
59 | wx.navigateTo({ | 59 | wx.navigateTo({ |
60 | - url:'../punchAppealDetail/punchAppealDetail', | 60 | + url: '../punchAppealDetail/punchAppealDetail', |
61 | }) | 61 | }) |
62 | }, | 62 | }, |
63 | /** | 63 | /** |
@@ -13,6 +13,20 @@ Page({ | @@ -13,6 +13,20 @@ Page({ | ||
13 | url: '../punchAppealDetail2/punchAppealDetail2', | 13 | url: '../punchAppealDetail2/punchAppealDetail2', |
14 | }) | 14 | }) |
15 | }, | 15 | }, |
16 | + //上传图片 | ||
17 | + uploadImg() { | ||
18 | + wx.chooseImage({ | ||
19 | + success: function (res) { | ||
20 | + console.log(res) | ||
21 | + const tempFilePaths = res.tempFilePaths | ||
22 | + wx.uploadFile({ | ||
23 | + url: '', | ||
24 | + filePath: 'tempFilePaths[0]', | ||
25 | + name: 'file', | ||
26 | + }) | ||
27 | + }, | ||
28 | + }) | ||
29 | + }, | ||
16 | /** | 30 | /** |
17 | * 生命周期函数--监听页面加载 | 31 | * 生命周期函数--监听页面加载 |
18 | */ | 32 | */ |
@@ -7,60 +7,74 @@ Page({ | @@ -7,60 +7,74 @@ Page({ | ||
7 | data: { | 7 | data: { |
8 | 8 | ||
9 | }, | 9 | }, |
10 | + //上传图片 | ||
11 | + uploadImg() { | ||
12 | + wx.chooseImage({ | ||
13 | + success: function(res) { | ||
14 | + console.log(res) | ||
15 | + const tempFilePaths = res.tempFilePaths | ||
16 | + wx.uploadFile({ | ||
17 | + url: '', | ||
18 | + filePath: 'tempFilePaths[0]', | ||
19 | + name: 'file', | ||
20 | + }) | ||
21 | + }, | ||
22 | + }) | ||
23 | + }, | ||
10 | 24 | ||
11 | /** | 25 | /** |
12 | * 生命周期函数--监听页面加载 | 26 | * 生命周期函数--监听页面加载 |
13 | */ | 27 | */ |
14 | - onLoad: function (options) { | 28 | + onLoad: function(options) { |
15 | 29 | ||
16 | }, | 30 | }, |
17 | 31 | ||
18 | /** | 32 | /** |
19 | * 生命周期函数--监听页面初次渲染完成 | 33 | * 生命周期函数--监听页面初次渲染完成 |
20 | */ | 34 | */ |
21 | - onReady: function () { | 35 | + onReady: function() { |
22 | 36 | ||
23 | }, | 37 | }, |
24 | 38 | ||
25 | /** | 39 | /** |
26 | * 生命周期函数--监听页面显示 | 40 | * 生命周期函数--监听页面显示 |
27 | */ | 41 | */ |
28 | - onShow: function () { | 42 | + onShow: function() { |
29 | 43 | ||
30 | }, | 44 | }, |
31 | 45 | ||
32 | /** | 46 | /** |
33 | * 生命周期函数--监听页面隐藏 | 47 | * 生命周期函数--监听页面隐藏 |
34 | */ | 48 | */ |
35 | - onHide: function () { | 49 | + onHide: function() { |
36 | 50 | ||
37 | }, | 51 | }, |
38 | 52 | ||
39 | /** | 53 | /** |
40 | * 生命周期函数--监听页面卸载 | 54 | * 生命周期函数--监听页面卸载 |
41 | */ | 55 | */ |
42 | - onUnload: function () { | 56 | + onUnload: function() { |
43 | 57 | ||
44 | }, | 58 | }, |
45 | 59 | ||
46 | /** | 60 | /** |
47 | * 页面相关事件处理函数--监听用户下拉动作 | 61 | * 页面相关事件处理函数--监听用户下拉动作 |
48 | */ | 62 | */ |
49 | - onPullDownRefresh: function () { | 63 | + onPullDownRefresh: function() { |
50 | 64 | ||
51 | }, | 65 | }, |
52 | 66 | ||
53 | /** | 67 | /** |
54 | * 页面上拉触底事件的处理函数 | 68 | * 页面上拉触底事件的处理函数 |
55 | */ | 69 | */ |
56 | - onReachBottom: function () { | 70 | + onReachBottom: function() { |
57 | 71 | ||
58 | }, | 72 | }, |
59 | 73 | ||
60 | /** | 74 | /** |
61 | * 用户点击右上角分享 | 75 | * 用户点击右上角分享 |
62 | */ | 76 | */ |
63 | - onShareAppMessage: function () { | 77 | + onShareAppMessage: function() { |
64 | 78 | ||
65 | } | 79 | } |
66 | }) | 80 | }) |
@@ -6,16 +6,25 @@ Page({ | @@ -6,16 +6,25 @@ Page({ | ||
6 | */ | 6 | */ |
7 | data: { | 7 | data: { |
8 | is_agree: true, | 8 | is_agree: true, |
9 | + is_the_week: true, | ||
9 | }, | 10 | }, |
10 | clickAgreeBtn() { | 11 | clickAgreeBtn() { |
11 | this.setData({is_agree: !this.data.is_agree}); | 12 | this.setData({is_agree: !this.data.is_agree}); |
12 | console.log(this.data.is_agree); | 13 | console.log(this.data.is_agree); |
13 | }, | 14 | }, |
15 | + //去预约 | ||
16 | + goAppointment(){ | ||
17 | + wx.navigateTo({ | ||
18 | + url: '/pages/index/go-appointment/go-appointment', | ||
19 | + }) | ||
20 | + }, | ||
14 | /** | 21 | /** |
15 | * 生命周期函数--监听页面加载 | 22 | * 生命周期函数--监听页面加载 |
16 | */ | 23 | */ |
17 | onLoad: function (options) { | 24 | onLoad: function (options) { |
18 | - | 25 | + this.setData({ |
26 | + is_the_week: JSON.parse(options.is_the_week) | ||
27 | + }) | ||
19 | }, | 28 | }, |
20 | 29 | ||
21 | /** | 30 | /** |
@@ -14,13 +14,13 @@ | @@ -14,13 +14,13 @@ | ||
14 | </view> | 14 | </view> |
15 | 15 | ||
16 | <view class="jiexi">解析长图</view> | 16 | <view class="jiexi">解析长图</view> |
17 | - <view class="footer"> | 17 | + <view class="footer" wx:if="{{is_the_week}}"> |
18 | <view class="service" bindtap="clickAgreeBtn"> | 18 | <view class="service" bindtap="clickAgreeBtn"> |
19 | <view class="agree_box"> | 19 | <view class="agree_box"> |
20 | <view class="agree_btn" wx:if="{{is_agree}}"></view> | 20 | <view class="agree_btn" wx:if="{{is_agree}}"></view> |
21 | </view> | 21 | </view> |
22 | <text>服务协议</text> | 22 | <text>服务协议</text> |
23 | </view> | 23 | </view> |
24 | - <view class="order_btn">去预约</view> | 24 | + <view class="order_btn" bindtap='goAppointment'>去预约</view> |
25 | </view> | 25 | </view> |
26 | </view> | 26 | </view> |
@@ -8,11 +8,11 @@ for (let i = 1990; i <= date.getFullYear(); i++) { | @@ -8,11 +8,11 @@ for (let i = 1990; i <= date.getFullYear(); i++) { | ||
8 | years.push(i) | 8 | years.push(i) |
9 | } | 9 | } |
10 | 10 | ||
11 | -for (let i = 1 ; i <= 12; i++) { | 11 | +for (let i = 1; i <= 12; i++) { |
12 | months.push(i) | 12 | months.push(i) |
13 | } | 13 | } |
14 | 14 | ||
15 | -for (let i = 1 ; i <= 31; i++) { | 15 | +for (let i = 1; i <= 31; i++) { |
16 | days.push(i) | 16 | days.push(i) |
17 | } | 17 | } |
18 | 18 | ||
@@ -23,8 +23,8 @@ Page({ | @@ -23,8 +23,8 @@ Page({ | ||
23 | */ | 23 | */ |
24 | data: { | 24 | data: { |
25 | name: '', | 25 | name: '', |
26 | - sex: ['男','女'], | ||
27 | - city: ['北京市','天津市','河北省'], | 26 | + sex: ['男', '女'], |
27 | + city: ['北京市', '天津市', '河北省'], | ||
28 | years: years, | 28 | years: years, |
29 | year: date.getFullYear(), | 29 | year: date.getFullYear(), |
30 | months: months, | 30 | months: months, |
@@ -34,7 +34,9 @@ Page({ | @@ -34,7 +34,9 @@ Page({ | ||
34 | value: [9999, 1, 1], | 34 | value: [9999, 1, 1], |
35 | }, | 35 | }, |
36 | inputName(e) { | 36 | inputName(e) { |
37 | - this.setData({name: e.detail.value}); | 37 | + this.setData({ |
38 | + name: e.detail.value | ||
39 | + }); | ||
38 | }, | 40 | }, |
39 | //选择性别 | 41 | //选择性别 |
40 | sexPickerChange: function(e) { | 42 | sexPickerChange: function(e) { |
@@ -68,68 +70,70 @@ Page({ | @@ -68,68 +70,70 @@ Page({ | ||
68 | }, | 70 | }, |
69 | //保存 | 71 | //保存 |
70 | clickSave() { | 72 | clickSave() { |
71 | - if(this.data.name === '') { | 73 | + if (this.data.name === '') { |
72 | wx.showToast({ | 74 | wx.showToast({ |
73 | title: '请填写学员姓名', | 75 | title: '请填写学员姓名', |
74 | icon: 'none' | 76 | icon: 'none' |
75 | }) | 77 | }) |
76 | - }else { | ||
77 | - wx.navigateBack({delta: 1}) | 78 | + } else { |
79 | + wx.navigateTo({ | ||
80 | + url: '../../../my/myProfile/myProfile', | ||
81 | + }) | ||
78 | } | 82 | } |
79 | }, | 83 | }, |
80 | /** | 84 | /** |
81 | * 生命周期函数--监听页面加载 | 85 | * 生命周期函数--监听页面加载 |
82 | */ | 86 | */ |
83 | - onLoad: function (options) { | 87 | + onLoad: function(options) { |
84 | 88 | ||
85 | }, | 89 | }, |
86 | 90 | ||
87 | /** | 91 | /** |
88 | * 生命周期函数--监听页面初次渲染完成 | 92 | * 生命周期函数--监听页面初次渲染完成 |
89 | */ | 93 | */ |
90 | - onReady: function () { | 94 | + onReady: function() { |
91 | 95 | ||
92 | }, | 96 | }, |
93 | 97 | ||
94 | /** | 98 | /** |
95 | * 生命周期函数--监听页面显示 | 99 | * 生命周期函数--监听页面显示 |
96 | */ | 100 | */ |
97 | - onShow: function () { | 101 | + onShow: function() { |
98 | 102 | ||
99 | }, | 103 | }, |
100 | 104 | ||
101 | /** | 105 | /** |
102 | * 生命周期函数--监听页面隐藏 | 106 | * 生命周期函数--监听页面隐藏 |
103 | */ | 107 | */ |
104 | - onHide: function () { | 108 | + onHide: function() { |
105 | 109 | ||
106 | }, | 110 | }, |
107 | 111 | ||
108 | /** | 112 | /** |
109 | * 生命周期函数--监听页面卸载 | 113 | * 生命周期函数--监听页面卸载 |
110 | */ | 114 | */ |
111 | - onUnload: function () { | 115 | + onUnload: function() { |
112 | 116 | ||
113 | }, | 117 | }, |
114 | 118 | ||
115 | /** | 119 | /** |
116 | * 页面相关事件处理函数--监听用户下拉动作 | 120 | * 页面相关事件处理函数--监听用户下拉动作 |
117 | */ | 121 | */ |
118 | - onPullDownRefresh: function () { | 122 | + onPullDownRefresh: function() { |
119 | 123 | ||
120 | }, | 124 | }, |
121 | 125 | ||
122 | /** | 126 | /** |
123 | * 页面上拉触底事件的处理函数 | 127 | * 页面上拉触底事件的处理函数 |
124 | */ | 128 | */ |
125 | - onReachBottom: function () { | 129 | + onReachBottom: function() { |
126 | 130 | ||
127 | }, | 131 | }, |
128 | 132 | ||
129 | /** | 133 | /** |
130 | * 用户点击右上角分享 | 134 | * 用户点击右上角分享 |
131 | */ | 135 | */ |
132 | - onShareAppMessage: function () { | 136 | + onShareAppMessage: function() { |
133 | 137 | ||
134 | } | 138 | } |
135 | }) | 139 | }) |
@@ -8,9 +8,20 @@ Page({ | @@ -8,9 +8,20 @@ Page({ | ||
8 | show: false, | 8 | show: false, |
9 | is_showModal: false, | 9 | is_showModal: false, |
10 | is_showSuccessModal: false, | 10 | is_showSuccessModal: false, |
11 | - children: [{name:'张三',is_choose: true}, | ||
12 | - {name:'李思思', is_choose: false}, | ||
13 | - {name:'迪丽热巴-迪力木拉提',is_choose: false}], | 11 | + pay_success: false, |
12 | + children: [{ | ||
13 | + name: '张三', | ||
14 | + is_choose: true | ||
15 | + }, | ||
16 | + { | ||
17 | + name: '李思思', | ||
18 | + is_choose: false | ||
19 | + }, | ||
20 | + { | ||
21 | + name: '迪丽热巴-迪力木拉提', | ||
22 | + is_choose: false | ||
23 | + } | ||
24 | + ], | ||
14 | is_choose: false, | 25 | is_choose: false, |
15 | }, | 26 | }, |
16 | chooseChildren(e) { | 27 | chooseChildren(e) { |
@@ -20,83 +31,118 @@ Page({ | @@ -20,83 +31,118 @@ Page({ | ||
20 | [`children[${current}].is_choose`]: !this.data.children[current].is_choose | 31 | [`children[${current}].is_choose`]: !this.data.children[current].is_choose |
21 | }) | 32 | }) |
22 | }, | 33 | }, |
34 | + refreshModal() { | ||
35 | + this.setData({ | ||
36 | + pay_success: true | ||
37 | + }); | ||
38 | + }, | ||
23 | submit() { | 39 | submit() { |
24 | - this.setData({is_showModal: true}) | 40 | + if(this.data.pay_success) { |
41 | + this.setData({ | ||
42 | + is_showModal: false, | ||
43 | + is_showSuccessModal: true, | ||
44 | + }); | ||
45 | + }else { | ||
46 | + this.setData({ | ||
47 | + is_showModal: true | ||
48 | + }); | ||
49 | + } | ||
25 | }, | 50 | }, |
26 | chooseNo(e) { | 51 | chooseNo(e) { |
27 | - this.setData({currentBtn: e.currentTarget.dataset.index,is_showModal: false}) | ||
28 | - wx.switchTab({url: '/pages/index/index'}) | 52 | + this.setData({ |
53 | + currentBtn: e.currentTarget.dataset.index, | ||
54 | + is_showModal: false | ||
55 | + }) | ||
56 | + wx.navigateBack({ | ||
57 | + delta: 1 | ||
58 | + }) | ||
29 | }, | 59 | }, |
60 | + //弹窗确认事件 | ||
30 | chooseYes(e) { | 61 | chooseYes(e) { |
31 | this.setData({ | 62 | this.setData({ |
32 | currentBtn: e.currentTarget.dataset.index, | 63 | currentBtn: e.currentTarget.dataset.index, |
33 | is_showModal: false, | 64 | is_showModal: false, |
34 | - is_showSuccessModal: true | 65 | + // is_showSuccessModal: true |
66 | + }) | ||
67 | + | ||
68 | + wx.navigateTo({ | ||
69 | + url: '../../my/buyCard/buyCard', | ||
35 | }) | 70 | }) |
36 | }, | 71 | }, |
72 | + | ||
37 | modalConfirm() { | 73 | modalConfirm() { |
38 | - this.setData({is_showSuccessModal: false}) | 74 | + this.setData({ |
75 | + is_showSuccessModal: false | ||
76 | + }) | ||
77 | + wx.redirectTo({ | ||
78 | + url: '../../my/all-appointment/all-appointment?currentTab=' + 2, | ||
79 | + }) | ||
39 | }, | 80 | }, |
81 | + | ||
40 | disableScroll() {}, | 82 | disableScroll() {}, |
41 | addStudent() { | 83 | addStudent() { |
42 | - wx.navigateTo({url: './add-student/add-student'}) | 84 | + wx.navigateTo({ |
85 | + url: './add-student/add-student' | ||
86 | + }) | ||
43 | }, | 87 | }, |
44 | /** | 88 | /** |
45 | * 生命周期函数--监听页面加载 | 89 | * 生命周期函数--监听页面加载 |
46 | */ | 90 | */ |
47 | - onLoad: function (options) { | 91 | + onLoad: function(options) { |
48 | 92 | ||
49 | }, | 93 | }, |
50 | 94 | ||
51 | /** | 95 | /** |
52 | * 生命周期函数--监听页面初次渲染完成 | 96 | * 生命周期函数--监听页面初次渲染完成 |
53 | */ | 97 | */ |
54 | - onReady: function () { | 98 | + onReady: function() { |
55 | 99 | ||
56 | }, | 100 | }, |
57 | 101 | ||
58 | /** | 102 | /** |
59 | * 生命周期函数--监听页面显示 | 103 | * 生命周期函数--监听页面显示 |
60 | */ | 104 | */ |
61 | - onShow: function () { | 105 | + onShow: function() { |
62 | const self = this; | 106 | const self = this; |
63 | - setTimeout(function () { | ||
64 | - self.setData({show: true}) | ||
65 | - },500) | 107 | + setTimeout(function() { |
108 | + self.setData({ | ||
109 | + show: true | ||
110 | + }) | ||
111 | + }, 500) | ||
66 | }, | 112 | }, |
67 | 113 | ||
68 | /** | 114 | /** |
69 | * 生命周期函数--监听页面隐藏 | 115 | * 生命周期函数--监听页面隐藏 |
70 | */ | 116 | */ |
71 | - onHide: function () { | 117 | + onHide: function() { |
72 | 118 | ||
73 | }, | 119 | }, |
74 | 120 | ||
75 | /** | 121 | /** |
76 | * 生命周期函数--监听页面卸载 | 122 | * 生命周期函数--监听页面卸载 |
77 | */ | 123 | */ |
78 | - onUnload: function () { | 124 | + onUnload: function() { |
79 | 125 | ||
80 | }, | 126 | }, |
81 | 127 | ||
82 | /** | 128 | /** |
83 | * 页面相关事件处理函数--监听用户下拉动作 | 129 | * 页面相关事件处理函数--监听用户下拉动作 |
84 | */ | 130 | */ |
85 | - onPullDownRefresh: function () { | 131 | + onPullDownRefresh: function() { |
86 | 132 | ||
87 | }, | 133 | }, |
88 | 134 | ||
89 | /** | 135 | /** |
90 | * 页面上拉触底事件的处理函数 | 136 | * 页面上拉触底事件的处理函数 |
91 | */ | 137 | */ |
92 | - onReachBottom: function () { | 138 | + onReachBottom: function() { |
93 | 139 | ||
94 | }, | 140 | }, |
95 | 141 | ||
96 | /** | 142 | /** |
97 | * 用户点击右上角分享 | 143 | * 用户点击右上角分享 |
98 | */ | 144 | */ |
99 | - onShareAppMessage: function () { | 145 | + onShareAppMessage: function() { |
100 | 146 | ||
101 | } | 147 | } |
102 | }) | 148 | }) |
@@ -36,8 +36,7 @@ | @@ -36,8 +36,7 @@ | ||
36 | <image src="../../../images/add_btn.png" bindtap="addStudent"></image> | 36 | <image src="../../../images/add_btn.png" bindtap="addStudent"></image> |
37 | </view> | 37 | </view> |
38 | <view class="name-box"> | 38 | <view class="name-box"> |
39 | - <view class="check-box" wx:for="{{children}}" wx:key="index" bindtap="chooseChildren" | ||
40 | - data-index="{{index}}"> | 39 | + <view class="check-box" wx:for="{{children}}" wx:key="index" bindtap="chooseChildren" data-index="{{index}}"> |
41 | <view class="name {{item.is_choose?'change-color':''}}">{{item.name}}</view> | 40 | <view class="name {{item.is_choose?'change-color':''}}">{{item.name}}</view> |
42 | <image src="../../../images/choose_icon.png" wx:if="{{item.is_choose}}" class="check-icon"></image> | 41 | <image src="../../../images/choose_icon.png" wx:if="{{item.is_choose}}" class="check-icon"></image> |
43 | </view> | 42 | </view> |
@@ -50,10 +49,7 @@ | @@ -50,10 +49,7 @@ | ||
50 | </view> | 49 | </view> |
51 | <!--是否购买畅玩卡弹窗--> | 50 | <!--是否购买畅玩卡弹窗--> |
52 | <view class="modal_box" wx:if="{{is_showModal}}" catchtouchmove="disableScroll"> | 51 | <view class="modal_box" wx:if="{{is_showModal}}" catchtouchmove="disableScroll"> |
53 | - <view class="background" | ||
54 | - bindtap="handleBackground" | ||
55 | - wx:if="{{is_showModal}}" | ||
56 | - catchtouchmove="disableScroll"> | 52 | + <view class="background" bindtap="handleBackground" wx:if="{{is_showModal}}" catchtouchmove="disableScroll"> |
57 | </view> | 53 | </view> |
58 | <view class="modalBackground Augly-bouncein"> | 54 | <view class="modalBackground Augly-bouncein"> |
59 | <view class="modal"> | 55 | <view class="modal"> |
@@ -67,10 +63,7 @@ | @@ -67,10 +63,7 @@ | ||
67 | </view> | 63 | </view> |
68 | <!--预约成功弹窗--> | 64 | <!--预约成功弹窗--> |
69 | <view class="modal_box" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll"> | 65 | <view class="modal_box" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll"> |
70 | - <view class="background" | ||
71 | - bindtap="handleBackground" | ||
72 | - wx:if="{{is_showSuccessModal}}" | ||
73 | - catchtouchmove="disableScroll"> | 66 | + <view class="background" bindtap="handleBackground" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll"> |
74 | </view> | 67 | </view> |
75 | <view class="modalBackground Augly-bouncein"> | 68 | <view class="modalBackground Augly-bouncein"> |
76 | <view class="success-modal"> | 69 | <view class="success-modal"> |
@@ -9,17 +9,85 @@ Page({ | @@ -9,17 +9,85 @@ Page({ | ||
9 | currentCity: '北京市', | 9 | currentCity: '北京市', |
10 | is_change: false, | 10 | is_change: false, |
11 | show_submit_btn: false, | 11 | show_submit_btn: false, |
12 | - areaTest: [ | ||
13 | - {area: '朝阳区', list: [{id: 1,name: '798实验室'},{id: 2,name:'木鱼湖实验室'},{id: 3,name:'南锣鼓巷实验室'}]}, | ||
14 | - {area: '东城区', list: [{id: 4,name: '798实验室'},{id: 5,name:'木鱼湖实验室'},{id: 6,name:'南锣鼓巷实验室'}]}, | ||
15 | - {area: '西城区', list: [{id: 7,name: '798实验室'},{id: 11,name:'木鱼湖实验室'},{id: 8,name:'南锣鼓巷实验室'}]}, | ||
16 | - {area: '昌平区', list: [{id: 9,name: '798实验室'},{id: 12,name:'木鱼湖实验室'},{id: 10,name:'南锣鼓巷实验室'}]}, | 12 | + areaTest: [{ |
13 | + area: '朝阳区', | ||
14 | + list: [{ | ||
15 | + id: 1, | ||
16 | + name: '798实验室' | ||
17 | + }, { | ||
18 | + id: 2, | ||
19 | + name: '木鱼湖实验室' | ||
20 | + }, { | ||
21 | + id: 3, | ||
22 | + name: '南锣鼓巷实验室' | ||
23 | + }] | ||
24 | + }, | ||
25 | + { | ||
26 | + area: '东城区', | ||
27 | + list: [{ | ||
28 | + id: 4, | ||
29 | + name: '798实验室' | ||
30 | + }, { | ||
31 | + id: 5, | ||
32 | + name: '木鱼湖实验室' | ||
33 | + }, { | ||
34 | + id: 6, | ||
35 | + name: '南锣鼓巷实验室' | ||
36 | + }] | ||
37 | + }, | ||
38 | + { | ||
39 | + area: '西城区', | ||
40 | + list: [{ | ||
41 | + id: 7, | ||
42 | + name: '798实验室' | ||
43 | + }, { | ||
44 | + id: 11, | ||
45 | + name: '木鱼湖实验室' | ||
46 | + }, { | ||
47 | + id: 8, | ||
48 | + name: '南锣鼓巷实验室' | ||
49 | + }] | ||
50 | + }, | ||
51 | + { | ||
52 | + area: '昌平区', | ||
53 | + list: [{ | ||
54 | + id: 9, | ||
55 | + name: '798实验室' | ||
56 | + }, { | ||
57 | + id: 12, | ||
58 | + name: '木鱼湖实验室' | ||
59 | + }, { | ||
60 | + id: 10, | ||
61 | + name: '南锣鼓巷实验室' | ||
62 | + }] | ||
63 | + }, | ||
17 | ], | 64 | ], |
18 | - test: {title: '798实验室,本实验室分为三个阶段,第一阶段由家长和孩子共同完成,第二阶段由孩子独立完成。家长在旁边指导,第三阶段巴拉巴拉', | ||
19 | - list:[{week:'周六',date: '10月20日',time:'10:00 — 11:30',rest: 6}, | ||
20 | - {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 0}, | ||
21 | - {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
22 | - {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 0}, | 65 | + test: { |
66 | + title: '798实验室,本实验室分为三个阶段,第一阶段由家长和孩子共同完成,第二阶段由孩子独立完成。家长在旁边指导,第三阶段巴拉巴拉', | ||
67 | + list: [{ | ||
68 | + week: '周六', | ||
69 | + date: '10月20日', | ||
70 | + time: '10:00 — 11:30', | ||
71 | + rest: 6 | ||
72 | + }, | ||
73 | + { | ||
74 | + week: '周日', | ||
75 | + date: '10月21日', | ||
76 | + time: '15:00 — 16:30', | ||
77 | + rest: 0 | ||
78 | + }, | ||
79 | + { | ||
80 | + week: '周日', | ||
81 | + date: '10月21日', | ||
82 | + time: '15:00 — 16:30', | ||
83 | + rest: 6 | ||
84 | + }, | ||
85 | + { | ||
86 | + week: '周日', | ||
87 | + date: '10月21日', | ||
88 | + time: '15:00 — 16:30', | ||
89 | + rest: 0 | ||
90 | + }, | ||
23 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | 91 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, |
24 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | 92 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, |
25 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | 93 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, |
@@ -28,8 +96,10 @@ Page({ | @@ -28,8 +96,10 @@ Page({ | ||
28 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | 96 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, |
29 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | 97 | // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, |
30 | // {week:'周六',date: '10月20日',time:'10:00 — 11:30',rest: 6} | 98 | // {week:'周六',date: '10月20日',time:'10:00 — 11:30',rest: 6} |
31 | - ]}, | 99 | + ] |
100 | + }, | ||
32 | }, | 101 | }, |
102 | + | ||
33 | //选择城市 | 103 | //选择城市 |
34 | bindPickerChange: function(e) { | 104 | bindPickerChange: function(e) { |
35 | console.log('picker发送选择改变,携带值为', e.detail.value) | 105 | console.log('picker发送选择改变,携带值为', e.detail.value) |
@@ -38,38 +108,55 @@ Page({ | @@ -38,38 +108,55 @@ Page({ | ||
38 | is_change: true, | 108 | is_change: true, |
39 | }) | 109 | }) |
40 | }, | 110 | }, |
111 | + | ||
41 | //选择实验室 | 112 | //选择实验室 |
42 | chooseTest(e) { | 113 | chooseTest(e) { |
43 | console.log(e.currentTarget.dataset.index); | 114 | console.log(e.currentTarget.dataset.index); |
44 | const current = e.currentTarget.dataset.index; | 115 | const current = e.currentTarget.dataset.index; |
45 | const current_id = e.currentTarget.dataset.id; | 116 | const current_id = e.currentTarget.dataset.id; |
46 | - this.setData({currentTest: current,currentId: current_id}) | 117 | + this.setData({ |
118 | + currentTest: current, | ||
119 | + currentId: current_id | ||
120 | + }) | ||
47 | }, | 121 | }, |
122 | + | ||
48 | //选择时段 | 123 | //选择时段 |
49 | chooseTime(e) { | 124 | chooseTime(e) { |
50 | console.log(e.currentTarget.dataset.index); | 125 | console.log(e.currentTarget.dataset.index); |
51 | const current = e.currentTarget.dataset.index; | 126 | const current = e.currentTarget.dataset.index; |
52 | - this.setData({currentTime: current}) | 127 | + this.setData({ |
128 | + currentTime: current | ||
129 | + }) | ||
53 | }, | 130 | }, |
131 | + | ||
54 | //点击单人预约 | 132 | //点击单人预约 |
55 | singleAppointment() { | 133 | singleAppointment() { |
56 | - this.setData({show_submit_btn: true}) | 134 | + this.setData({ |
135 | + show_submit_btn: true | ||
136 | + }) | ||
57 | }, | 137 | }, |
138 | + | ||
58 | //点击双人预约 | 139 | //点击双人预约 |
59 | doubleAppointment() { | 140 | doubleAppointment() { |
60 | - this.setData({show_submit_btn: true}) | 141 | + this.setData({ |
142 | + show_submit_btn: true | ||
143 | + }) | ||
61 | }, | 144 | }, |
145 | + | ||
62 | submit() { | 146 | submit() { |
63 | - wx.navigateTo({url: '/pages/index/confirm-appointment-info/confirm-appointment-info'}) | 147 | + wx.navigateTo({ |
148 | + url: '/pages/index/confirm-appointment-info/confirm-appointment-info' | ||
149 | + }) | ||
64 | }, | 150 | }, |
151 | + | ||
65 | /** | 152 | /** |
66 | * 生命周期函数--监听页面加载 | 153 | * 生命周期函数--监听页面加载 |
67 | */ | 154 | */ |
68 | - onLoad: function (options) { | ||
69 | - this.data.areaTest.forEach((v,i)=>{ | ||
70 | - Object.keys(v).forEach(v=>{ | ||
71 | - console.log(v)//取到了key | ||
72 | - console.log(this.data.areaTest[i][v])//取到了值 | 155 | + onLoad: function(options) { |
156 | + this.data.areaTest.forEach((v, i) => { | ||
157 | + Object.keys(v).forEach(v => { | ||
158 | + console.log(v) //取到了key | ||
159 | + console.log(this.data.areaTest[i][v]) //取到了值 | ||
73 | }) | 160 | }) |
74 | }) | 161 | }) |
75 | // console.log(this.data.areaTest); | 162 | // console.log(this.data.areaTest); |
@@ -78,49 +165,49 @@ Page({ | @@ -78,49 +165,49 @@ Page({ | ||
78 | /** | 165 | /** |
79 | * 生命周期函数--监听页面初次渲染完成 | 166 | * 生命周期函数--监听页面初次渲染完成 |
80 | */ | 167 | */ |
81 | - onReady: function () { | 168 | + onReady: function() { |
82 | 169 | ||
83 | }, | 170 | }, |
84 | 171 | ||
85 | /** | 172 | /** |
86 | * 生命周期函数--监听页面显示 | 173 | * 生命周期函数--监听页面显示 |
87 | */ | 174 | */ |
88 | - onShow: function () { | 175 | + onShow: function() { |
89 | 176 | ||
90 | }, | 177 | }, |
91 | 178 | ||
92 | /** | 179 | /** |
93 | * 生命周期函数--监听页面隐藏 | 180 | * 生命周期函数--监听页面隐藏 |
94 | */ | 181 | */ |
95 | - onHide: function () { | 182 | + onHide: function() { |
96 | 183 | ||
97 | }, | 184 | }, |
98 | 185 | ||
99 | /** | 186 | /** |
100 | * 生命周期函数--监听页面卸载 | 187 | * 生命周期函数--监听页面卸载 |
101 | */ | 188 | */ |
102 | - onUnload: function () { | 189 | + onUnload: function() { |
103 | 190 | ||
104 | }, | 191 | }, |
105 | 192 | ||
106 | /** | 193 | /** |
107 | * 页面相关事件处理函数--监听用户下拉动作 | 194 | * 页面相关事件处理函数--监听用户下拉动作 |
108 | */ | 195 | */ |
109 | - onPullDownRefresh: function () { | 196 | + onPullDownRefresh: function() { |
110 | 197 | ||
111 | }, | 198 | }, |
112 | 199 | ||
113 | /** | 200 | /** |
114 | * 页面上拉触底事件的处理函数 | 201 | * 页面上拉触底事件的处理函数 |
115 | */ | 202 | */ |
116 | - onReachBottom: function () { | 203 | + onReachBottom: function() { |
117 | 204 | ||
118 | }, | 205 | }, |
119 | 206 | ||
120 | /** | 207 | /** |
121 | * 用户点击右上角分享 | 208 | * 用户点击右上角分享 |
122 | */ | 209 | */ |
123 | - onShareAppMessage: function () { | 210 | + onShareAppMessage: function() { |
124 | 211 | ||
125 | } | 212 | } |
126 | }) | 213 | }) |
@@ -5,65 +5,106 @@ const app = getApp() | @@ -5,65 +5,106 @@ const app = getApp() | ||
5 | Page({ | 5 | Page({ |
6 | data: { | 6 | data: { |
7 | hasPhone: true, | 7 | hasPhone: true, |
8 | - imgUrls:[ | ||
9 | - {'url': '../../images/banner.jpg'}, | ||
10 | - {'url': '../../images/banner.jpg'}, | ||
11 | - {'url': '../../images/banner.jpg'},], | 8 | + imgUrls: [{ |
9 | + 'url': '../../images/banner.jpg' | ||
10 | + }, | ||
11 | + { | ||
12 | + 'url': '../../images/banner.jpg' | ||
13 | + }, | ||
14 | + { | ||
15 | + 'url': '../../images/banner.jpg' | ||
16 | + }, | ||
17 | + ], | ||
12 | autoplay: true, //是否自动轮播 | 18 | autoplay: true, //是否自动轮播 |
13 | interval: 2000, //间隔时间 | 19 | interval: 2000, //间隔时间 |
14 | duration: 500, //滑动时间 | 20 | duration: 500, //滑动时间 |
21 | + info: [{ | ||
22 | + time: '11月01号-11月07号', | ||
23 | + url: '../../images/test_img.jpg', | ||
24 | + }, | ||
25 | + { | ||
26 | + time: '11月08号-11月14号', | ||
27 | + url: '../../images/test_img.jpg' | ||
28 | + }, | ||
29 | + ], | ||
15 | this_week_test_info: { | 30 | this_week_test_info: { |
16 | - info: [ | ||
17 | - {time: '11月01号-11月07号',url: '../../images/test_img.jpg',}, | ||
18 | - {time: '11月08号-11月14号',url: '../../images/test_img.jpg'}, | 31 | + info: [{ |
32 | + time: '11月01号-11月07号', | ||
33 | + url: '../../images/test_img.jpg', | ||
34 | + }, | ||
35 | + { | ||
36 | + time: '11月08号-11月14号', | ||
37 | + url: '../../images/test_img.jpg' | ||
38 | + }, | ||
19 | ], | 39 | ], |
20 | is_this_week: true, | 40 | is_this_week: true, |
21 | ordered: false, | 41 | ordered: false, |
22 | is_past: false, | 42 | is_past: false, |
23 | }, | 43 | }, |
24 | past_test_info: { | 44 | past_test_info: { |
25 | - info: [ | ||
26 | - {time: '10月01号-10月07号',url: '../../images/test_img.jpg',}, | ||
27 | - {time: '10月08号-10月14号',url: '../../images/test_img.jpg'}, | ||
28 | - {time: '10月15号-10月21号',url: '../../images/test_img.jpg'}, | 45 | + info: [{ |
46 | + time: '10月01号-10月07号', | ||
47 | + url: '../../images/test_img.jpg', | ||
48 | + }, | ||
49 | + { | ||
50 | + time: '10月08号-10月14号', | ||
51 | + url: '../../images/test_img.jpg' | ||
52 | + }, | ||
53 | + { | ||
54 | + time: '10月15号-10月21号', | ||
55 | + url: '../../images/test_img.jpg' | ||
56 | + }, | ||
29 | ], | 57 | ], |
30 | is_this_week: false, | 58 | is_this_week: false, |
31 | ordered: false, | 59 | ordered: false, |
32 | is_past: true, | 60 | is_past: true, |
33 | }, | 61 | }, |
34 | }, | 62 | }, |
35 | - swiperChange: function (e) { //切换轮播图 | 63 | + swiperChange: function(e) { //切换轮播图 |
36 | this.setData({ | 64 | this.setData({ |
37 | currentSwiper: e.detail.current | 65 | currentSwiper: e.detail.current |
38 | }) | 66 | }) |
39 | }, | 67 | }, |
68 | + //首次登录小程序,跳转到认证手机页面 | ||
40 | goPhoneCode() { | 69 | goPhoneCode() { |
41 | - wx.navigateTo({url: '/pages/index/phone-code/phone-code'}) | 70 | + wx.redirectTo({ |
71 | + url: '/pages/index/phone-code/phone-code' | ||
72 | + }) | ||
42 | }, | 73 | }, |
43 | //点击购买畅玩卡 | 74 | //点击购买畅玩卡 |
44 | goBuyCard() { | 75 | goBuyCard() { |
45 | - wx.navigateTo({url: './activity-detail/activity-detail'}) | 76 | + wx.navigateTo({ |
77 | + url: '../my/myCard/myCard' | ||
78 | + }) | ||
46 | }, | 79 | }, |
47 | //点击进入活动详情 | 80 | //点击进入活动详情 |
48 | goTestDetail(e) { | 81 | goTestDetail(e) { |
49 | - // console.log(e); | 82 | + console.log(e) |
50 | const current = e.currentTarget.dataset.index; | 83 | const current = e.currentTarget.dataset.index; |
51 | - wx.navigateTo({url: './activity-detail/activity-detail'}) | 84 | + var is_the_week = e.currentTarget.dataset.is_the_week |
85 | + wx.navigateTo({ | ||
86 | + url: './activity-detail/activity-detail?is_the_week=' + is_the_week | ||
87 | + }) | ||
52 | }, | 88 | }, |
53 | //前往预约 | 89 | //前往预约 |
54 | - goAppointment (e) { | 90 | + goAppointment(e) { |
55 | const current = e.currentTarget.dataset.index; | 91 | const current = e.currentTarget.dataset.index; |
56 | - wx.navigateTo({url: './go-appointment/go-appointment'}) | 92 | + wx.navigateTo({ |
93 | + url: './go-appointment/go-appointment' | ||
94 | + }) | ||
57 | }, | 95 | }, |
58 | - onLoad: function () { | 96 | + onLoad: function() { |
97 | + if (this.data.hasPhone == false) { | ||
98 | + wx.hideTabBar({ | ||
99 | + | ||
100 | + }) | ||
101 | + } | ||
59 | if (app.globalData.userInfo) { | 102 | if (app.globalData.userInfo) { |
60 | this.setData({ | 103 | this.setData({ |
61 | userInfo: app.globalData.userInfo, | 104 | userInfo: app.globalData.userInfo, |
62 | hasUserInfo: true | 105 | hasUserInfo: true |
63 | }) | 106 | }) |
64 | - } else if (this.data.canIUse){ | ||
65 | - // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 | ||
66 | - // 所以此处加入 callback 以防止这种情况 | 107 | + } else if (this.data.canIUse) { |
67 | app.userInfoReadyCallback = res => { | 108 | app.userInfoReadyCallback = res => { |
68 | this.setData({ | 109 | this.setData({ |
69 | userInfo: res.userInfo, | 110 | userInfo: res.userInfo, |
@@ -5,13 +5,12 @@ | @@ -5,13 +5,12 @@ | ||
5 | 5 | ||
6 | <!--轮播图--> | 6 | <!--轮播图--> |
7 | <view class="wrap"> | 7 | <view class="wrap"> |
8 | - <swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true" | ||
9 | - bindchange="swiperChange"> | 8 | + <swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true" bindchange="swiperChange"> |
10 | <block wx:for="{{imgUrls}}" wx:key="index"> | 9 | <block wx:for="{{imgUrls}}" wx:key="index"> |
11 | <swiper-item> | 10 | <swiper-item> |
12 | <navigator url="{{item.url}}" hover-class="navigator-hover"> | 11 | <navigator url="{{item.url}}" hover-class="navigator-hover"> |
13 | <view class="index_top"> | 12 | <view class="index_top"> |
14 | - <image src="{{item.url}}" class="slide-image" mode="aspectFill"/> | 13 | + <image src="{{item.url}}" class="slide-image" mode="aspectFill" /> |
15 | </view> | 14 | </view> |
16 | </navigator> | 15 | </navigator> |
17 | </swiper-item> | 16 | </swiper-item> |
@@ -32,9 +31,46 @@ | @@ -32,9 +31,46 @@ | ||
32 | </view> | 31 | </view> |
33 | 32 | ||
34 | <!--实验列表--> | 33 | <!--实验列表--> |
35 | - <import src="/templates/templates.wxml" /> | 34 | + <!-- <import src="/templates/templates.wxml" /> --> |
36 | <view class="past_template"> | 35 | <view class="past_template"> |
37 | - <template is="experiment" data="{{...this_week_test_info}}"></template> | ||
38 | - <template is="experiment" data="{{...past_test_info}}"></template> | 36 | + <!-- <template is="experiment" data="{{...this_week_test_info}}"></template> |
37 | + <template is="experiment" data="{{...past_test_info}}"></template> --> | ||
38 | + <view class='experiment_box'> | ||
39 | + <view class="title_box"> | ||
40 | + <view class="line"></view> | ||
41 | + <text>本周实验</text> | ||
42 | + <!-- <text>往期实验</text> --> | ||
43 | + </view> | ||
44 | + <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail" data-is_the_week='{{true}}'> | ||
45 | + <view class="test_box"> | ||
46 | + <view class="time">{{item.time}}</view> | ||
47 | + <view class="img_box"> | ||
48 | + <image src="{{item.url}}"></image> | ||
49 | + </view> | ||
50 | + </view> | ||
51 | + <view class="order_box"> | ||
52 | + <text catchtap="goAppointment" data-index="{{index}}">前往预约</text> | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + </view> | ||
56 | + | ||
57 | + | ||
58 | + <view class='experiment_box'> | ||
59 | + <view class="title_box" bindtap="goTestDetail" data-is_the_week='{{false}}'> | ||
60 | + <view class="line"></view> | ||
61 | + <text>往期实验</text> | ||
62 | + </view> | ||
63 | + <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail" data-is_the_week='{{false}}'> | ||
64 | + <view class="test_box"> | ||
65 | + <view class="time">{{item.time}}</view> | ||
66 | + <view class="img_box"> | ||
67 | + <image src="{{item.url}}"></image> | ||
68 | + </view> | ||
69 | + </view> | ||
70 | + <view class="order_box"> | ||
71 | + <text>查看</text> | ||
72 | + </view> | ||
73 | + </view> | ||
74 | + </view> | ||
39 | </view> | 75 | </view> |
40 | </view> | 76 | </view> |
@@ -10,10 +10,10 @@ Page({ | @@ -10,10 +10,10 @@ Page({ | ||
10 | time: '获取验证码', //倒计时 | 10 | time: '获取验证码', //倒计时 |
11 | currentTime: 61 | 11 | currentTime: 61 |
12 | }, | 12 | }, |
13 | - getCode: function (options) { | 13 | + getCode: function(options) { |
14 | var that = this; | 14 | var that = this; |
15 | var currentTime = that.data.currentTime; | 15 | var currentTime = that.data.currentTime; |
16 | - interval = setInterval(function () { | 16 | + interval = setInterval(function() { |
17 | currentTime--; | 17 | currentTime--; |
18 | that.setData({ | 18 | that.setData({ |
19 | time: currentTime + '秒' | 19 | time: currentTime + '秒' |
@@ -35,59 +35,65 @@ Page({ | @@ -35,59 +35,65 @@ Page({ | ||
35 | disabled: true | 35 | disabled: true |
36 | }) | 36 | }) |
37 | }, | 37 | }, |
38 | + //确认 | ||
39 | + confirm() { | ||
40 | + wx.switchTab({ | ||
41 | + url: '../../index/index' | ||
42 | + }) | ||
43 | + }, | ||
38 | /** | 44 | /** |
39 | * 生命周期函数--监听页面加载 | 45 | * 生命周期函数--监听页面加载 |
40 | */ | 46 | */ |
41 | - onLoad: function (options) { | 47 | + onLoad: function(options) { |
42 | 48 | ||
43 | }, | 49 | }, |
44 | 50 | ||
45 | /** | 51 | /** |
46 | * 生命周期函数--监听页面初次渲染完成 | 52 | * 生命周期函数--监听页面初次渲染完成 |
47 | */ | 53 | */ |
48 | - onReady: function () { | 54 | + onReady: function() { |
49 | 55 | ||
50 | }, | 56 | }, |
51 | 57 | ||
52 | /** | 58 | /** |
53 | * 生命周期函数--监听页面显示 | 59 | * 生命周期函数--监听页面显示 |
54 | */ | 60 | */ |
55 | - onShow: function () { | 61 | + onShow: function() { |
56 | 62 | ||
57 | }, | 63 | }, |
58 | 64 | ||
59 | /** | 65 | /** |
60 | * 生命周期函数--监听页面隐藏 | 66 | * 生命周期函数--监听页面隐藏 |
61 | */ | 67 | */ |
62 | - onHide: function () { | 68 | + onHide: function() { |
63 | 69 | ||
64 | }, | 70 | }, |
65 | 71 | ||
66 | /** | 72 | /** |
67 | * 生命周期函数--监听页面卸载 | 73 | * 生命周期函数--监听页面卸载 |
68 | */ | 74 | */ |
69 | - onUnload: function () { | 75 | + onUnload: function() { |
70 | 76 | ||
71 | }, | 77 | }, |
72 | 78 | ||
73 | /** | 79 | /** |
74 | * 页面相关事件处理函数--监听用户下拉动作 | 80 | * 页面相关事件处理函数--监听用户下拉动作 |
75 | */ | 81 | */ |
76 | - onPullDownRefresh: function () { | 82 | + onPullDownRefresh: function() { |
77 | 83 | ||
78 | }, | 84 | }, |
79 | 85 | ||
80 | /** | 86 | /** |
81 | * 页面上拉触底事件的处理函数 | 87 | * 页面上拉触底事件的处理函数 |
82 | */ | 88 | */ |
83 | - onReachBottom: function () { | 89 | + onReachBottom: function() { |
84 | 90 | ||
85 | }, | 91 | }, |
86 | 92 | ||
87 | /** | 93 | /** |
88 | * 用户点击右上角分享 | 94 | * 用户点击右上角分享 |
89 | */ | 95 | */ |
90 | - onShareAppMessage: function () { | 96 | + onShareAppMessage: function() { |
91 | 97 | ||
92 | } | 98 | } |
93 | }) | 99 | }) |
@@ -19,7 +19,7 @@ Page({ | @@ -19,7 +19,7 @@ Page({ | ||
19 | * 生命周期函数--监听页面加载 | 19 | * 生命周期函数--监听页面加载 |
20 | */ | 20 | */ |
21 | onLoad: function (options) { | 21 | onLoad: function (options) { |
22 | - | 22 | + this.setData({currentTab: +options.currentTab}) |
23 | }, | 23 | }, |
24 | 24 | ||
25 | /** | 25 | /** |
@@ -33,7 +33,7 @@ Page({ | @@ -33,7 +33,7 @@ Page({ | ||
33 | * 生命周期函数--监听页面显示 | 33 | * 生命周期函数--监听页面显示 |
34 | */ | 34 | */ |
35 | onShow: function () { | 35 | onShow: function () { |
36 | - | 36 | + console.log('show',this.data.currentTab) |
37 | }, | 37 | }, |
38 | 38 | ||
39 | /** | 39 | /** |
@@ -2,8 +2,7 @@ | @@ -2,8 +2,7 @@ | ||
2 | <view class="content"> | 2 | <view class="content"> |
3 | <!--tab--> | 3 | <!--tab--> |
4 | <view class="tab-box"> | 4 | <view class="tab-box"> |
5 | - <view wx:for="{{tab}}" wx:key="index" bindtap="changeTab" data-index="{{index}}" | ||
6 | - class="{{currentTab == index?'change-color':''}}">{{item}}</view> | 5 | + <view wx:for="{{tab}}" wx:key="index" bindtap="changeTab" data-index="{{index}}" class="{{currentTab == index?'change-color':''}}">{{item}}</view> |
7 | </view> | 6 | </view> |
8 | 7 | ||
9 | <!--预约列表--> | 8 | <!--预约列表--> |
@@ -15,11 +15,11 @@ page { | @@ -15,11 +15,11 @@ page { | ||
15 | -moz-box-sizing: border-box; | 15 | -moz-box-sizing: border-box; |
16 | box-sizing: border-box; | 16 | box-sizing: border-box; |
17 | background-color: #fff; | 17 | background-color: #fff; |
18 | - /*border-bottom: 4rpx solid #3FA9F5;*/ | 18 | + /* border-bottom: 1rpx solid #ebebeb; */ |
19 | } | 19 | } |
20 | .tab-box view { | 20 | .tab-box view { |
21 | line-height: 80rpx; | 21 | line-height: 80rpx; |
22 | - /*position: relative;*/ | 22 | + position: relative; |
23 | } | 23 | } |
24 | .change-color { | 24 | .change-color { |
25 | color: #3FA9F5; | 25 | color: #3FA9F5; |
@@ -7,67 +7,97 @@ Page({ | @@ -7,67 +7,97 @@ Page({ | ||
7 | data: { | 7 | data: { |
8 | userlist: ['张三', '里斯'], | 8 | userlist: ['张三', '里斯'], |
9 | index: -1, | 9 | index: -1, |
10 | + pay_success: false, | ||
10 | }, | 11 | }, |
11 | //选择成员 | 12 | //选择成员 |
12 | userList(e) { | 13 | userList(e) { |
13 | this.setData({ | 14 | this.setData({ |
14 | index: e.detail.value | 15 | index: e.detail.value |
15 | }) | 16 | }) |
16 | - | 17 | + }, |
18 | + //添加学员 | ||
19 | + addUser() { | ||
20 | + wx.navigateTo({ | ||
21 | + url: '../../index/confirm-appointment-info/add-student/add-student', | ||
22 | + }) | ||
23 | + }, | ||
24 | + //服务协议 | ||
25 | + serviceProtocol() { | ||
26 | + wx.navigateTo({ | ||
27 | + url: '../protocol/protocol', | ||
28 | + }) | ||
29 | + }, | ||
30 | + //确认支付 | ||
31 | + confirmPay() { | ||
32 | + this.setData({pay_success: true}); | ||
33 | + this.changeState(); | ||
34 | + wx.navigateBack({ | ||
35 | + delta: 1 | ||
36 | + }) | ||
37 | + }, | ||
38 | + //更新上一页面的购买状态 | ||
39 | + changeState() { | ||
40 | + var pages = getCurrentPages(); | ||
41 | + if(pages.length > 1) { | ||
42 | + var beforePage = pages[pages.length - 2]//获取上一页面实例 | ||
43 | + if(this.data.pay_success) { | ||
44 | + beforePage.refreshModal() | ||
45 | + } | ||
46 | + } | ||
17 | }, | 47 | }, |
18 | /** | 48 | /** |
19 | * 生命周期函数--监听页面加载 | 49 | * 生命周期函数--监听页面加载 |
20 | */ | 50 | */ |
21 | - onLoad: function (options) { | 51 | + onLoad: function(options) { |
22 | 52 | ||
23 | }, | 53 | }, |
24 | 54 | ||
25 | /** | 55 | /** |
26 | * 生命周期函数--监听页面初次渲染完成 | 56 | * 生命周期函数--监听页面初次渲染完成 |
27 | */ | 57 | */ |
28 | - onReady: function () { | 58 | + onReady: function() { |
29 | 59 | ||
30 | }, | 60 | }, |
31 | 61 | ||
32 | /** | 62 | /** |
33 | * 生命周期函数--监听页面显示 | 63 | * 生命周期函数--监听页面显示 |
34 | */ | 64 | */ |
35 | - onShow: function () { | 65 | + onShow: function() { |
36 | 66 | ||
37 | }, | 67 | }, |
38 | 68 | ||
39 | /** | 69 | /** |
40 | * 生命周期函数--监听页面隐藏 | 70 | * 生命周期函数--监听页面隐藏 |
41 | */ | 71 | */ |
42 | - onHide: function () { | 72 | + onHide: function() { |
43 | 73 | ||
44 | }, | 74 | }, |
45 | 75 | ||
46 | /** | 76 | /** |
47 | * 生命周期函数--监听页面卸载 | 77 | * 生命周期函数--监听页面卸载 |
48 | */ | 78 | */ |
49 | - onUnload: function () { | 79 | + onUnload: function() { |
50 | 80 | ||
51 | }, | 81 | }, |
52 | 82 | ||
53 | /** | 83 | /** |
54 | * 页面相关事件处理函数--监听用户下拉动作 | 84 | * 页面相关事件处理函数--监听用户下拉动作 |
55 | */ | 85 | */ |
56 | - onPullDownRefresh: function () { | 86 | + onPullDownRefresh: function() { |
57 | 87 | ||
58 | }, | 88 | }, |
59 | 89 | ||
60 | /** | 90 | /** |
61 | * 页面上拉触底事件的处理函数 | 91 | * 页面上拉触底事件的处理函数 |
62 | */ | 92 | */ |
63 | - onReachBottom: function () { | 93 | + onReachBottom: function() { |
64 | 94 | ||
65 | }, | 95 | }, |
66 | 96 | ||
67 | /** | 97 | /** |
68 | * 用户点击右上角分享 | 98 | * 用户点击右上角分享 |
69 | */ | 99 | */ |
70 | - onShareAppMessage: function () { | 100 | + onShareAppMessage: function() { |
71 | 101 | ||
72 | } | 102 | } |
73 | }) | 103 | }) |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | </picker> | 14 | </picker> |
15 | <view class='iconfont icon-daosanjiao'></view> | 15 | <view class='iconfont icon-daosanjiao'></view> |
16 | </view> | 16 | </view> |
17 | - <view class='add_box'> | 17 | + <view class='add_box' bindtap='addUser'> |
18 | <text class='iconfont icon-jia'></text> | 18 | <text class='iconfont icon-jia'></text> |
19 | <text>添加学员</text> | 19 | <text>添加学员</text> |
20 | </view> | 20 | </view> |
@@ -22,10 +22,10 @@ | @@ -22,10 +22,10 @@ | ||
22 | <view class='service_info_box'> | 22 | <view class='service_info_box'> |
23 | <text class='iconfont icon-xuanzhong'></text> | 23 | <text class='iconfont icon-xuanzhong'></text> |
24 | <text>我已阅读并同意畅玩卡</text> | 24 | <text>我已阅读并同意畅玩卡</text> |
25 | - <text class='service_info'>服务协议</text> | 25 | + <text class='service_info' bindtap='serviceProtocol'>服务协议</text> |
26 | </view> | 26 | </view> |
27 | <view class='service_btn_box'> | 27 | <view class='service_btn_box'> |
28 | <view>需支付:¥288.00</view> | 28 | <view>需支付:¥288.00</view> |
29 | - <view class='pay_btn'>确定</view> | 29 | + <view class='pay_btn' bindtap='confirmPay'>确定</view> |
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
1 | /* pages/buyCard/buyCard.wxss */ | 1 | /* pages/buyCard/buyCard.wxss */ |
2 | @import '../groupBuy/groupBuy.wxss'; | 2 | @import '../groupBuy/groupBuy.wxss'; |
3 | @import '../charge/charge.wxss'; | 3 | @import '../charge/charge.wxss'; |
4 | +.long_img{ | ||
5 | + width: 100%; | ||
6 | + min-height: 1500rpx; | ||
7 | +} | ||
4 | .add_person_box { | 8 | .add_person_box { |
5 | display: flex; | 9 | display: flex; |
6 | align-items: center; | 10 | align-items: center; |
@@ -2,14 +2,14 @@ | @@ -2,14 +2,14 @@ | ||
2 | 2 | ||
3 | .content_box { | 3 | .content_box { |
4 | width: 100%; | 4 | width: 100%; |
5 | - height: 100%; | 5 | + min-height: 2000rpx; |
6 | background: #e0e0e0; | 6 | background: #e0e0e0; |
7 | font-size: 32rpx; | 7 | font-size: 32rpx; |
8 | color: #000; | 8 | color: #000; |
9 | padding: 30rpx; | 9 | padding: 30rpx; |
10 | - position: fixed; | 10 | + /* position: fixed; |
11 | top: 0; | 11 | top: 0; |
12 | - left: 0; | 12 | + left: 0; */ |
13 | text-align: center; | 13 | text-align: center; |
14 | /* display: flex; | 14 | /* display: flex; |
15 | align-items: center; | 15 | align-items: center; |
@@ -49,7 +49,9 @@ page { | @@ -49,7 +49,9 @@ page { | ||
49 | } | 49 | } |
50 | 50 | ||
51 | .icon-jia { | 51 | .icon-jia { |
52 | - display: inline-block; | 52 | + display: flex; |
53 | + align-items: center; | ||
54 | + justify-content: center; | ||
53 | width: 34rpx; | 55 | width: 34rpx; |
54 | height: 34rpx; | 56 | height: 34rpx; |
55 | background: #3fa9f5; | 57 | background: #3fa9f5; |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <view class='content_box'> | 2 | <view class='content_box'> |
3 | <view class='banner_box'> | 3 | <view class='banner_box'> |
4 | <view class='head_img'> | 4 | <view class='head_img'> |
5 | - <image src='../../images/head.png'></image> | 5 | + <image src='../../../images/head.png'></image> |
6 | </view> | 6 | </view> |
7 | <view>微信昵称</view> | 7 | <view>微信昵称</view> |
8 | </view> | 8 | </view> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <view class='list_info_box'> | 20 | <view class='list_info_box'> |
21 | <view class='info_item'> | 21 | <view class='info_item'> |
22 | <view class='info_box'> | 22 | <view class='info_box'> |
23 | - <image src='../../../images/start-logo.png'></image> | 23 | + <image src='../../../images/logo.png'></image> |
24 | <view class='info_label'>发起人</view> | 24 | <view class='info_label'>发起人</view> |
25 | </view> | 25 | </view> |
26 | <view class='info_time'> | 26 | <view class='info_time'> |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | </view> | 30 | </view> |
31 | <view class='info_item'> | 31 | <view class='info_item'> |
32 | <view class='info_box'> | 32 | <view class='info_box'> |
33 | - <image src='../../../images/start-logo.png'></image> | 33 | + <image src='../../../images/logo.png'></image> |
34 | <view class='info_label'>发起人</view> | 34 | <view class='info_label'>发起人</view> |
35 | </view> | 35 | </view> |
36 | <view class='info_time'> | 36 | <view class='info_time'> |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | <view class='user_info_box'> | 62 | <view class='user_info_box'> |
63 | <view class='user_info'> | 63 | <view class='user_info'> |
64 | <view class='info_box'> | 64 | <view class='info_box'> |
65 | - <image src='../../../images/start-logo.png'></image> | 65 | + <image src='../../../images/logo.png'></image> |
66 | <view class='info_label'>发起人</view> | 66 | <view class='info_label'>发起人</view> |
67 | </view> | 67 | </view> |
68 | <view>发起人姓名</view> | 68 | <view>发起人姓名</view> |
@@ -120,7 +120,7 @@ | @@ -120,7 +120,7 @@ | ||
120 | <view class='service_info_box'> | 120 | <view class='service_info_box'> |
121 | <text class='iconfont icon-xuanzhong'></text> | 121 | <text class='iconfont icon-xuanzhong'></text> |
122 | <text>我已阅读并同意畅玩卡</text> | 122 | <text>我已阅读并同意畅玩卡</text> |
123 | - <text class='service_info'>服务协议</text> | 123 | + <text class='service_info' bindtap='serviceProtocol'>服务协议</text> |
124 | </view> | 124 | </view> |
125 | <view class='service_btn_box'> | 125 | <view class='service_btn_box'> |
126 | <view>单价:¥188.00</view> | 126 | <view>单价:¥188.00</view> |
1 | -// pages/my/my.js | ||
2 | -Page({ | 1 | + // pages/my/my.js |
2 | + Page({ | ||
3 | 3 | ||
4 | /** | 4 | /** |
5 | * 页面的初始数据 | 5 | * 页面的初始数据 |
@@ -7,9 +7,43 @@ Page({ | @@ -7,9 +7,43 @@ Page({ | ||
7 | data: { | 7 | data: { |
8 | 8 | ||
9 | }, | 9 | }, |
10 | + //兑换 | ||
11 | + charge() { | ||
12 | + wx.navigateTo({ | ||
13 | + url: '../my/charge/charge', | ||
14 | + }) | ||
15 | + }, | ||
16 | + //我的资料 | ||
17 | + myProfile(){ | ||
18 | + wx.navigateTo({ | ||
19 | + url: '../my/myProfile/myProfile', | ||
20 | + }) | ||
21 | + }, | ||
10 | //跳转我的预约 | 22 | //跳转我的预约 |
11 | myAppointment() { | 23 | myAppointment() { |
12 | - | 24 | + wx.navigateTo({ |
25 | + url: './all-appointment/all-appointment?currentTab=' + 0, | ||
26 | + }) | ||
27 | + }, | ||
28 | + goNotConfirm() { | ||
29 | + wx.navigateTo({ | ||
30 | + url: './all-appointment/all-appointment?currentTab=' + 1, | ||
31 | + }) | ||
32 | + }, | ||
33 | + goAppointed() { | ||
34 | + wx.navigateTo({ | ||
35 | + url: './all-appointment/all-appointment?currentTab=' + 2, | ||
36 | + }) | ||
37 | + }, | ||
38 | + goCanceled() { | ||
39 | + wx.navigateTo({ | ||
40 | + url: './all-appointment/all-appointment?currentTab=' + 3, | ||
41 | + }) | ||
42 | + }, | ||
43 | + goEnded() { | ||
44 | + wx.navigateTo({ | ||
45 | + url: './all-appointment/all-appointment?currentTab=' + 4, | ||
46 | + }) | ||
13 | }, | 47 | }, |
14 | //我的唱完卡 | 48 | //我的唱完卡 |
15 | myCard() { | 49 | myCard() { |
@@ -78,4 +112,4 @@ Page({ | @@ -78,4 +112,4 @@ Page({ | ||
78 | onShareAppMessage: function() { | 112 | onShareAppMessage: function() { |
79 | 113 | ||
80 | } | 114 | } |
81 | -}) | ||
115 | + }) |
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | <view class='phone_num'>139****0939</view> | 10 | <view class='phone_num'>139****0939</view> |
11 | </view> | 11 | </view> |
12 | </view> | 12 | </view> |
13 | - <view class='my_info_box'> | 13 | + <view class='my_info_box' bindtap='myProfile'> |
14 | <view class='iconfont icon-bianji2'></view> | 14 | <view class='iconfont icon-bianji2'></view> |
15 | <view>我的资料</view> | 15 | <view>我的资料</view> |
16 | </view> | 16 | </view> |
@@ -26,25 +26,25 @@ | @@ -26,25 +26,25 @@ | ||
26 | </view> | 26 | </view> |
27 | </view> | 27 | </view> |
28 | <view class='list_tab_box'> | 28 | <view class='list_tab_box'> |
29 | - <view class='tab_item'> | 29 | + <view class='tab_item' bindtap="goNotConfirm"> |
30 | <view class='list_img'> | 30 | <view class='list_img'> |
31 | <image src='../../images/my1.png'></image> | 31 | <image src='../../images/my1.png'></image> |
32 | </view> | 32 | </view> |
33 | <view>待确认</view> | 33 | <view>待确认</view> |
34 | </view> | 34 | </view> |
35 | - <view class='tab_item'> | 35 | + <view class='tab_item' bindtap="goAppointed"> |
36 | <view class='list_img'> | 36 | <view class='list_img'> |
37 | <image src='../../images/my1.png'></image> | 37 | <image src='../../images/my1.png'></image> |
38 | </view> | 38 | </view> |
39 | <view>已预约</view> | 39 | <view>已预约</view> |
40 | </view> | 40 | </view> |
41 | - <view class='tab_item'> | 41 | + <view class='tab_item' bindtap="goCanceled"> |
42 | <view class='list_img'> | 42 | <view class='list_img'> |
43 | <image src='../../images/my1.png'></image> | 43 | <image src='../../images/my1.png'></image> |
44 | </view> | 44 | </view> |
45 | <view>已取消</view> | 45 | <view>已取消</view> |
46 | </view> | 46 | </view> |
47 | - <view class='tab_item'> | 47 | + <view class='tab_item' bindtap="goEnded"> |
48 | <view class='list_img'> | 48 | <view class='list_img'> |
49 | <image src='../../images/my1.png'></image> | 49 | <image src='../../images/my1.png'></image> |
50 | </view> | 50 | </view> |
@@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
57 | <view class='list_title'>我的畅玩卡</view> | 57 | <view class='list_title'>我的畅玩卡</view> |
58 | <view class='iconfont icon-fanhui'></view> | 58 | <view class='iconfont icon-fanhui'></view> |
59 | </view> | 59 | </view> |
60 | - <view class='info_box'> | 60 | + <view class='info_box' bindtap='charge'> |
61 | <view class='list_title'>兑换</view> | 61 | <view class='list_title'>兑换</view> |
62 | </view> | 62 | </view> |
63 | <view class='info_box' bindtap='contact'> | 63 | <view class='info_box' bindtap='contact'> |
1 | -// pages/MyProfile/MyProfile.js | ||
2 | -Page({ | 1 | + // pages/MyProfile/MyProfile.js |
2 | + Page({ | ||
3 | 3 | ||
4 | /** | 4 | /** |
5 | * 页面的初始数据 | 5 | * 页面的初始数据 |
@@ -8,59 +8,92 @@ Page({ | @@ -8,59 +8,92 @@ Page({ | ||
8 | 8 | ||
9 | }, | 9 | }, |
10 | 10 | ||
11 | + //跟换手机号 | ||
12 | + chargePhoneNum() { | ||
13 | + wx.navigateTo({ | ||
14 | + url: '../chargePhoneNum/chargePhoneNum', | ||
15 | + }) | ||
16 | + }, | ||
17 | + //添加学员 | ||
18 | + addUser() { | ||
19 | + wx.navigateTo({ | ||
20 | + url: '../../index/confirm-appointment-info/add-student/add-student', | ||
21 | + }) | ||
22 | + }, | ||
23 | + //编辑学员信息 | ||
24 | + editInfo() { | ||
25 | + wx.navigateTo({ | ||
26 | + url: '../../index/confirm-appointment-info/add-student/add-student', | ||
27 | + }) | ||
28 | + }, | ||
29 | + | ||
30 | + //续卡 | ||
31 | + renewalInfo() { | ||
32 | + wx.navigateTo({ | ||
33 | + url: '../myCard/myCard', | ||
34 | + }) | ||
35 | + }, | ||
36 | + | ||
37 | + //购卡 | ||
38 | + buyCard() { | ||
39 | + wx.navigateTo({ | ||
40 | + url: '../myCard/myCard', | ||
41 | + }) | ||
42 | + }, | ||
43 | + | ||
11 | /** | 44 | /** |
12 | * 生命周期函数--监听页面加载 | 45 | * 生命周期函数--监听页面加载 |
13 | */ | 46 | */ |
14 | - onLoad: function (options) { | 47 | + onLoad: function(options) { |
15 | 48 | ||
16 | }, | 49 | }, |
17 | 50 | ||
18 | /** | 51 | /** |
19 | * 生命周期函数--监听页面初次渲染完成 | 52 | * 生命周期函数--监听页面初次渲染完成 |
20 | */ | 53 | */ |
21 | - onReady: function () { | 54 | + onReady: function() { |
22 | 55 | ||
23 | }, | 56 | }, |
24 | 57 | ||
25 | /** | 58 | /** |
26 | * 生命周期函数--监听页面显示 | 59 | * 生命周期函数--监听页面显示 |
27 | */ | 60 | */ |
28 | - onShow: function () { | 61 | + onShow: function() { |
29 | 62 | ||
30 | }, | 63 | }, |
31 | 64 | ||
32 | /** | 65 | /** |
33 | * 生命周期函数--监听页面隐藏 | 66 | * 生命周期函数--监听页面隐藏 |
34 | */ | 67 | */ |
35 | - onHide: function () { | 68 | + onHide: function() { |
36 | 69 | ||
37 | }, | 70 | }, |
38 | 71 | ||
39 | /** | 72 | /** |
40 | * 生命周期函数--监听页面卸载 | 73 | * 生命周期函数--监听页面卸载 |
41 | */ | 74 | */ |
42 | - onUnload: function () { | 75 | + onUnload: function() { |
43 | 76 | ||
44 | }, | 77 | }, |
45 | 78 | ||
46 | /** | 79 | /** |
47 | * 页面相关事件处理函数--监听用户下拉动作 | 80 | * 页面相关事件处理函数--监听用户下拉动作 |
48 | */ | 81 | */ |
49 | - onPullDownRefresh: function () { | 82 | + onPullDownRefresh: function() { |
50 | 83 | ||
51 | }, | 84 | }, |
52 | 85 | ||
53 | /** | 86 | /** |
54 | * 页面上拉触底事件的处理函数 | 87 | * 页面上拉触底事件的处理函数 |
55 | */ | 88 | */ |
56 | - onReachBottom: function () { | 89 | + onReachBottom: function() { |
57 | 90 | ||
58 | }, | 91 | }, |
59 | 92 | ||
60 | /** | 93 | /** |
61 | * 用户点击右上角分享 | 94 | * 用户点击右上角分享 |
62 | */ | 95 | */ |
63 | - onShareAppMessage: function () { | 96 | + onShareAppMessage: function() { |
64 | 97 | ||
65 | } | 98 | } |
66 | -}) | ||
99 | + }) |
@@ -9,17 +9,18 @@ | @@ -9,17 +9,18 @@ | ||
9 | </view> | 9 | </view> |
10 | <view class='info_box'> | 10 | <view class='info_box'> |
11 | <view>手机号:188*****888</view> | 11 | <view>手机号:188*****888</view> |
12 | - <view>更换手机号</view> | 12 | + <view class='info_content' bindtap='chargePhoneNum'>更换手机号</view> |
13 | </view> | 13 | </view> |
14 | <view class='title_box'> | 14 | <view class='title_box'> |
15 | <view class='list_title'>我的学员</view> | 15 | <view class='list_title'>我的学员</view> |
16 | - <view class='add_box'> | 16 | + <view class='add_box' bindtap='addUser'> |
17 | <text class='iconfont icon-jia'></text> | 17 | <text class='iconfont icon-jia'></text> |
18 | <text>添加学员</text> | 18 | <text>添加学员</text> |
19 | </view> | 19 | </view> |
20 | </view> | 20 | </view> |
21 | +<!-- 未绑定年卡,就需要显示为“购卡”;已有年卡就显示为“续卡” --> | ||
21 | <view class='box'> | 22 | <view class='box'> |
22 | - <view class='list_item' wx:for='{{[1,1]}}' wx:key=''> | 23 | + <view class='list_item'> |
23 | <view class='list_info'> | 24 | <view class='list_info'> |
24 | <text>姓名:男</text> | 25 | <text>姓名:男</text> |
25 | <text>性 别:男</text> | 26 | <text>性 别:男</text> |
@@ -29,11 +30,26 @@ | @@ -29,11 +30,26 @@ | ||
29 | <text>所在城市:北京</text> | 30 | <text>所在城市:北京</text> |
30 | </view> | 31 | </view> |
31 | <view class='list_label_box'> | 32 | <view class='list_label_box'> |
32 | - <view class='label_item edit_btn'>编辑学员信息</view> | ||
33 | - <view class='label_item renewal_btn'>续卡</view> | ||
34 | - <view class='label_item'>删除学员</view> | 33 | + <view class='label_item edit_btn' bindtap='editInfo'>编辑学员信息</view> |
34 | + <view class='label_item renewal_btn' bindtap='renewalInfo'>续卡</view> | ||
35 | + <view class='label_item' bindtap='delUser'>删除学员</view> | ||
35 | </view> | 36 | </view> |
36 | <view class='hint_info'>畅玩卡周期:2018.10.01-2019.10.01</view> | 37 | <view class='hint_info'>畅玩卡周期:2018.10.01-2019.10.01</view> |
37 | </view> | 38 | </view> |
38 | - | 39 | + <view class='list_item'> |
40 | + <view class='list_info'> | ||
41 | + <text>姓名:男</text> | ||
42 | + <text>性 别:男</text> | ||
43 | + </view> | ||
44 | + <view class='list_info'> | ||
45 | + <text>生日:2000.01.01</text> | ||
46 | + <text>所在城市:北京</text> | ||
47 | + </view> | ||
48 | + <view class='list_label_box'> | ||
49 | + <view class='label_item edit_btn' bindtap='editInfo'>编辑学员信息</view> | ||
50 | + <view class='label_item renewal_btn' bindtap='buyCard'>购卡</view> | ||
51 | + <view class='label_item' bindtap='delUser'>删除学员</view> | ||
52 | + </view> | ||
53 | + <view class='hint_info'>无绑定畅玩卡</view> | ||
54 | + </view> | ||
39 | </view> | 55 | </view> |
@@ -46,6 +46,13 @@ page { | @@ -46,6 +46,13 @@ page { | ||
46 | background: #fff; | 46 | background: #fff; |
47 | padding: 34rpx 40rpx; | 47 | padding: 34rpx 40rpx; |
48 | margin-top: 20rpx; | 48 | margin-top: 20rpx; |
49 | + font-size: 32rpx; | ||
50 | + color: #464646; | ||
51 | +} | ||
52 | + | ||
53 | +.info_content { | ||
54 | + font-size: 24rpx; | ||
55 | + color: #3fa9f5; | ||
49 | } | 56 | } |
50 | 57 | ||
51 | .title_box { | 58 | .title_box { |
@@ -56,7 +63,9 @@ page { | @@ -56,7 +63,9 @@ page { | ||
56 | } | 63 | } |
57 | 64 | ||
58 | .icon-jia { | 65 | .icon-jia { |
59 | - display: inline-block; | 66 | + display: flex; |
67 | + align-items: center; | ||
68 | + justify-content: center; | ||
60 | width: 34rpx; | 69 | width: 34rpx; |
61 | height: 34rpx; | 70 | height: 34rpx; |
62 | background: #3fa9f5; | 71 | background: #3fa9f5; |
@@ -97,8 +106,8 @@ page { | @@ -97,8 +106,8 @@ page { | ||
97 | .list_item { | 106 | .list_item { |
98 | width: 100%; | 107 | width: 100%; |
99 | background: #fff; | 108 | background: #fff; |
100 | - padding:0 20rpx; | ||
101 | - min-height: 210rpx; | 109 | + padding: 0 20rpx; |
110 | + min-height: 230rpx; | ||
102 | box-sizing: border-box; | 111 | box-sizing: border-box; |
103 | position: relative; | 112 | position: relative; |
104 | overflow: hidden; | 113 | overflow: hidden; |
@@ -110,10 +119,11 @@ page { | @@ -110,10 +119,11 @@ page { | ||
110 | display: flex; | 119 | display: flex; |
111 | align-items: center; | 120 | align-items: center; |
112 | justify-content: space-between; | 121 | justify-content: space-between; |
113 | - padding:10rpx 20rpx; | ||
114 | - border-bottom: 1rpx solid #DEDEDE; | 122 | + padding: 10rpx 20rpx; |
123 | + border-bottom: 1rpx solid #dedede; | ||
115 | } | 124 | } |
116 | - .list_info:nth-child(2){ | 125 | + |
126 | +.list_info:nth-child(2) { | ||
117 | border-bottom: 0rpx; | 127 | border-bottom: 0rpx; |
118 | } | 128 | } |
119 | 129 | ||
@@ -123,35 +133,41 @@ page { | @@ -123,35 +133,41 @@ page { | ||
123 | font-size: 28rpx; | 133 | font-size: 28rpx; |
124 | color: #6e6e6e; | 134 | color: #6e6e6e; |
125 | } | 135 | } |
126 | -.list_label_box{ | 136 | + |
137 | +.list_label_box { | ||
127 | display: flex; | 138 | display: flex; |
128 | align-items: center; | 139 | align-items: center; |
129 | justify-content: flex-end; | 140 | justify-content: flex-end; |
141 | + margin: 10rpx 0; | ||
130 | } | 142 | } |
131 | -.label_item{ | 143 | + |
144 | +.label_item { | ||
132 | width: 130rpx; | 145 | width: 130rpx; |
133 | height: 40rpx; | 146 | height: 40rpx; |
134 | - border: 1rpx solid #3FA9F5; | 147 | + border: 1rpx solid #3fa9f5; |
135 | border-radius: 10rpx; | 148 | border-radius: 10rpx; |
136 | font-size: 18rpx; | 149 | font-size: 18rpx; |
137 | - color: #3FA9F5; | 150 | + color: #3fa9f5; |
138 | display: flex; | 151 | display: flex; |
139 | align-items: center; | 152 | align-items: center; |
140 | justify-content: center; | 153 | justify-content: center; |
141 | margin-left: 30rpx; | 154 | margin-left: 30rpx; |
142 | } | 155 | } |
143 | -.edit_btn,.renewal_btn{ | ||
144 | - background: #3FA9F5; | 156 | + |
157 | +.edit_btn, .renewal_btn { | ||
158 | + background: #3fa9f5; | ||
145 | color: #fff; | 159 | color: #fff; |
146 | border: 0; | 160 | border: 0; |
147 | } | 161 | } |
148 | -.renewal_btn{ | ||
149 | - background: #FC5B63; | 162 | + |
163 | +.renewal_btn { | ||
164 | + background: #fc5b63; | ||
150 | } | 165 | } |
151 | -.hint_info{ | 166 | + |
167 | +.hint_info { | ||
152 | width: 100%; | 168 | width: 100%; |
153 | height: 40rpx; | 169 | height: 40rpx; |
154 | - background: #3FA9F5; | 170 | + background: #3fa9f5; |
155 | color: #fff; | 171 | color: #fff; |
156 | font-size: 18rpx; | 172 | font-size: 18rpx; |
157 | line-height: 40rpx; | 173 | line-height: 40rpx; |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <view class="title_box"> | 3 | <view class="title_box"> |
4 | <view class="line"></view> | 4 | <view class="line"></view> |
5 | <text wx:if="{{is_this_week}}">本周实验</text> | 5 | <text wx:if="{{is_this_week}}">本周实验</text> |
6 | - <text wx:if="{{!is_this_week}}">往期实验</text> | 6 | + <text wx:if="{{!is_this_week}}" bindtap="goTestDetail">往期实验</text> |
7 | </view> | 7 | </view> |
8 | 8 | ||
9 | <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail"> | 9 | <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail"> |
-
请 注册 或 登录 后发表评论