正在显示
36 个修改的文件
包含
1153 行增加
和
736 行删除
@@ -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> | ||
24 | - <view class="order_btn">去预约</view> | 23 | + </view> |
24 | + <view class="order_btn" bindtap='goAppointment'>去预约</view> | ||
25 | </view> | 25 | </view> |
26 | </view> | 26 | </view> |
@@ -5,131 +5,135 @@ const months = [] | @@ -5,131 +5,135 @@ const months = [] | ||
5 | const days = [] | 5 | const days = [] |
6 | 6 | ||
7 | for (let i = 1990; i <= date.getFullYear(); i++) { | 7 | 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++) { | ||
12 | - months.push(i) | 11 | +for (let i = 1; i <= 12; i++) { |
12 | + months.push(i) | ||
13 | } | 13 | } |
14 | 14 | ||
15 | -for (let i = 1 ; i <= 31; i++) { | ||
16 | - days.push(i) | 15 | +for (let i = 1; i <= 31; i++) { |
16 | + days.push(i) | ||
17 | } | 17 | } |
18 | 18 | ||
19 | Page({ | 19 | Page({ |
20 | 20 | ||
21 | - /** | ||
22 | - * 页面的初始数据 | ||
23 | - */ | ||
24 | - data: { | ||
25 | - name: '', | ||
26 | - sex: ['男','女'], | ||
27 | - city: ['北京市','天津市','河北省'], | ||
28 | - years: years, | ||
29 | - year: date.getFullYear(), | ||
30 | - months: months, | ||
31 | - month: 2, | ||
32 | - days: days, | ||
33 | - day: 2, | ||
34 | - value: [9999, 1, 1], | ||
35 | - }, | ||
36 | - inputName(e) { | ||
37 | - this.setData({name: e.detail.value}); | ||
38 | - }, | ||
39 | - //选择性别 | ||
40 | - sexPickerChange: function(e) { | ||
41 | - console.log('picker发送选择改变,携带值为', e.detail.value) | ||
42 | - this.setData({ | ||
43 | - sex_index: e.detail.value, | ||
44 | - is_sex_change: true, | ||
45 | - }) | ||
46 | - }, | ||
47 | - //选择生日 | ||
48 | - birthPickerChange: function(e) { | ||
49 | - console.log('picker发送选择改变,携带值为', e.detail.value) | ||
50 | - this.setData({ | ||
51 | - birth_date: e.detail.value, | ||
52 | - is_birth_change: true, | ||
53 | - }) | ||
54 | - // const val = e.detail.value; | ||
55 | - // this.setData({ | ||
56 | - // year: this.data.years[val[0]], | ||
57 | - // month: this.data.months[val[1]], | ||
58 | - // day: this.data.days[val[2]] | ||
59 | - // }) | ||
60 | - }, | ||
61 | - //选择城市 | ||
62 | - cityPickerChange: function(e) { | ||
63 | - console.log('picker发送选择改变,携带值为', e.detail.value) | ||
64 | - this.setData({ | ||
65 | - city_index: e.detail.value, | ||
66 | - is_city_change: true, | ||
67 | - }) | ||
68 | - }, | ||
69 | - //保存 | ||
70 | - clickSave() { | ||
71 | - if(this.data.name === '') { | ||
72 | - wx.showToast({ | ||
73 | - title: '请填写学员姓名', | ||
74 | - icon: 'none' | ||
75 | - }) | ||
76 | - }else { | ||
77 | - wx.navigateBack({delta: 1}) | ||
78 | - } | ||
79 | - }, | ||
80 | - /** | ||
81 | - * 生命周期函数--监听页面加载 | ||
82 | - */ | ||
83 | - onLoad: function (options) { | ||
84 | - | ||
85 | - }, | ||
86 | - | ||
87 | - /** | ||
88 | - * 生命周期函数--监听页面初次渲染完成 | ||
89 | - */ | ||
90 | - onReady: function () { | ||
91 | - | ||
92 | - }, | ||
93 | - | ||
94 | - /** | ||
95 | - * 生命周期函数--监听页面显示 | ||
96 | - */ | ||
97 | - onShow: function () { | ||
98 | - | ||
99 | - }, | ||
100 | - | ||
101 | - /** | ||
102 | - * 生命周期函数--监听页面隐藏 | ||
103 | - */ | ||
104 | - onHide: function () { | ||
105 | - | ||
106 | - }, | ||
107 | - | ||
108 | - /** | ||
109 | - * 生命周期函数--监听页面卸载 | ||
110 | - */ | ||
111 | - onUnload: function () { | ||
112 | - | ||
113 | - }, | ||
114 | - | ||
115 | - /** | ||
116 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
117 | - */ | ||
118 | - onPullDownRefresh: function () { | ||
119 | - | ||
120 | - }, | ||
121 | - | ||
122 | - /** | ||
123 | - * 页面上拉触底事件的处理函数 | ||
124 | - */ | ||
125 | - onReachBottom: function () { | ||
126 | - | ||
127 | - }, | ||
128 | - | ||
129 | - /** | ||
130 | - * 用户点击右上角分享 | ||
131 | - */ | ||
132 | - onShareAppMessage: function () { | ||
133 | - | 21 | + /** |
22 | + * 页面的初始数据 | ||
23 | + */ | ||
24 | + data: { | ||
25 | + name: '', | ||
26 | + sex: ['男', '女'], | ||
27 | + city: ['北京市', '天津市', '河北省'], | ||
28 | + years: years, | ||
29 | + year: date.getFullYear(), | ||
30 | + months: months, | ||
31 | + month: 2, | ||
32 | + days: days, | ||
33 | + day: 2, | ||
34 | + value: [9999, 1, 1], | ||
35 | + }, | ||
36 | + inputName(e) { | ||
37 | + this.setData({ | ||
38 | + name: e.detail.value | ||
39 | + }); | ||
40 | + }, | ||
41 | + //选择性别 | ||
42 | + sexPickerChange: function(e) { | ||
43 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
44 | + this.setData({ | ||
45 | + sex_index: e.detail.value, | ||
46 | + is_sex_change: true, | ||
47 | + }) | ||
48 | + }, | ||
49 | + //选择生日 | ||
50 | + birthPickerChange: function(e) { | ||
51 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
52 | + this.setData({ | ||
53 | + birth_date: e.detail.value, | ||
54 | + is_birth_change: true, | ||
55 | + }) | ||
56 | + // const val = e.detail.value; | ||
57 | + // this.setData({ | ||
58 | + // year: this.data.years[val[0]], | ||
59 | + // month: this.data.months[val[1]], | ||
60 | + // day: this.data.days[val[2]] | ||
61 | + // }) | ||
62 | + }, | ||
63 | + //选择城市 | ||
64 | + cityPickerChange: function(e) { | ||
65 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
66 | + this.setData({ | ||
67 | + city_index: e.detail.value, | ||
68 | + is_city_change: true, | ||
69 | + }) | ||
70 | + }, | ||
71 | + //保存 | ||
72 | + clickSave() { | ||
73 | + if (this.data.name === '') { | ||
74 | + wx.showToast({ | ||
75 | + title: '请填写学员姓名', | ||
76 | + icon: 'none' | ||
77 | + }) | ||
78 | + } else { | ||
79 | + wx.navigateTo({ | ||
80 | + url: '../../../my/myProfile/myProfile', | ||
81 | + }) | ||
134 | } | 82 | } |
83 | + }, | ||
84 | + /** | ||
85 | + * 生命周期函数--监听页面加载 | ||
86 | + */ | ||
87 | + onLoad: function(options) { | ||
88 | + | ||
89 | + }, | ||
90 | + | ||
91 | + /** | ||
92 | + * 生命周期函数--监听页面初次渲染完成 | ||
93 | + */ | ||
94 | + onReady: function() { | ||
95 | + | ||
96 | + }, | ||
97 | + | ||
98 | + /** | ||
99 | + * 生命周期函数--监听页面显示 | ||
100 | + */ | ||
101 | + onShow: function() { | ||
102 | + | ||
103 | + }, | ||
104 | + | ||
105 | + /** | ||
106 | + * 生命周期函数--监听页面隐藏 | ||
107 | + */ | ||
108 | + onHide: function() { | ||
109 | + | ||
110 | + }, | ||
111 | + | ||
112 | + /** | ||
113 | + * 生命周期函数--监听页面卸载 | ||
114 | + */ | ||
115 | + onUnload: function() { | ||
116 | + | ||
117 | + }, | ||
118 | + | ||
119 | + /** | ||
120 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
121 | + */ | ||
122 | + onPullDownRefresh: function() { | ||
123 | + | ||
124 | + }, | ||
125 | + | ||
126 | + /** | ||
127 | + * 页面上拉触底事件的处理函数 | ||
128 | + */ | ||
129 | + onReachBottom: function() { | ||
130 | + | ||
131 | + }, | ||
132 | + | ||
133 | + /** | ||
134 | + * 用户点击右上角分享 | ||
135 | + */ | ||
136 | + onShareAppMessage: function() { | ||
137 | + | ||
138 | + } | ||
135 | }) | 139 | }) |
1 | // pages/index/confirm-appointment-info/confirm-appointment-info.js | 1 | // pages/index/confirm-appointment-info/confirm-appointment-info.js |
2 | Page({ | 2 | Page({ |
3 | 3 | ||
4 | - /** | ||
5 | - * 页面的初始数据 | ||
6 | - */ | ||
7 | - data: { | ||
8 | - show: false, | 4 | + /** |
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + show: false, | ||
9 | + is_showModal: false, | ||
10 | + is_showSuccessModal: 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 | + ], | ||
25 | + is_choose: false, | ||
26 | + }, | ||
27 | + chooseChildren(e) { | ||
28 | + const current = e.currentTarget.dataset.index; | ||
29 | + this.setData({ | ||
30 | + currentChild: current, | ||
31 | + [`children[${current}].is_choose`]: !this.data.children[current].is_choose | ||
32 | + }) | ||
33 | + }, | ||
34 | + refreshModal() { | ||
35 | + this.setData({ | ||
36 | + pay_success: true | ||
37 | + }); | ||
38 | + }, | ||
39 | + submit() { | ||
40 | + if(this.data.pay_success) { | ||
41 | + this.setData({ | ||
9 | is_showModal: false, | 42 | is_showModal: false, |
10 | - is_showSuccessModal: false, | ||
11 | - children: [{name:'张三',is_choose: true}, | ||
12 | - {name:'李思思', is_choose: false}, | ||
13 | - {name:'迪丽热巴-迪力木拉提',is_choose: false}], | ||
14 | - is_choose: false, | ||
15 | - }, | ||
16 | - chooseChildren(e) { | ||
17 | - const current = e.currentTarget.dataset.index; | ||
18 | - this.setData({ | ||
19 | - currentChild: current, | ||
20 | - [`children[${current}].is_choose`]: !this.data.children[current].is_choose | ||
21 | - }) | ||
22 | - }, | ||
23 | - submit() { | ||
24 | - this.setData({is_showModal: true}) | ||
25 | - }, | ||
26 | - chooseNo(e) { | ||
27 | - this.setData({currentBtn: e.currentTarget.dataset.index,is_showModal: false}) | ||
28 | - wx.switchTab({url: '/pages/index/index'}) | ||
29 | - }, | ||
30 | - chooseYes(e) { | ||
31 | - this.setData({ | ||
32 | - currentBtn: e.currentTarget.dataset.index, | ||
33 | - is_showModal: false, | ||
34 | - is_showSuccessModal: true | ||
35 | - }) | ||
36 | - }, | ||
37 | - modalConfirm() { | ||
38 | - this.setData({is_showSuccessModal: false}) | ||
39 | - }, | ||
40 | - disableScroll() {}, | ||
41 | - addStudent() { | ||
42 | - wx.navigateTo({url: './add-student/add-student'}) | ||
43 | - }, | ||
44 | - /** | ||
45 | - * 生命周期函数--监听页面加载 | ||
46 | - */ | ||
47 | - onLoad: function (options) { | ||
48 | - | ||
49 | - }, | ||
50 | - | ||
51 | - /** | ||
52 | - * 生命周期函数--监听页面初次渲染完成 | ||
53 | - */ | ||
54 | - onReady: function () { | ||
55 | - | ||
56 | - }, | ||
57 | - | ||
58 | - /** | ||
59 | - * 生命周期函数--监听页面显示 | ||
60 | - */ | ||
61 | - onShow: function () { | ||
62 | - const self = this; | ||
63 | - setTimeout(function () { | ||
64 | - self.setData({show: true}) | ||
65 | - },500) | ||
66 | - }, | ||
67 | - | ||
68 | - /** | ||
69 | - * 生命周期函数--监听页面隐藏 | ||
70 | - */ | ||
71 | - onHide: function () { | ||
72 | - | ||
73 | - }, | ||
74 | - | ||
75 | - /** | ||
76 | - * 生命周期函数--监听页面卸载 | ||
77 | - */ | ||
78 | - onUnload: function () { | ||
79 | - | ||
80 | - }, | ||
81 | - | ||
82 | - /** | ||
83 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
84 | - */ | ||
85 | - onPullDownRefresh: function () { | ||
86 | - | ||
87 | - }, | ||
88 | - | ||
89 | - /** | ||
90 | - * 页面上拉触底事件的处理函数 | ||
91 | - */ | ||
92 | - onReachBottom: function () { | ||
93 | - | ||
94 | - }, | ||
95 | - | ||
96 | - /** | ||
97 | - * 用户点击右上角分享 | ||
98 | - */ | ||
99 | - onShareAppMessage: function () { | ||
100 | - | 43 | + is_showSuccessModal: true, |
44 | + }); | ||
45 | + }else { | ||
46 | + this.setData({ | ||
47 | + is_showModal: true | ||
48 | + }); | ||
101 | } | 49 | } |
50 | + }, | ||
51 | + chooseNo(e) { | ||
52 | + this.setData({ | ||
53 | + currentBtn: e.currentTarget.dataset.index, | ||
54 | + is_showModal: false | ||
55 | + }) | ||
56 | + wx.navigateBack({ | ||
57 | + delta: 1 | ||
58 | + }) | ||
59 | + }, | ||
60 | + //弹窗确认事件 | ||
61 | + chooseYes(e) { | ||
62 | + this.setData({ | ||
63 | + currentBtn: e.currentTarget.dataset.index, | ||
64 | + is_showModal: false, | ||
65 | + // is_showSuccessModal: true | ||
66 | + }) | ||
67 | + | ||
68 | + wx.navigateTo({ | ||
69 | + url: '../../my/buyCard/buyCard', | ||
70 | + }) | ||
71 | + }, | ||
72 | + | ||
73 | + modalConfirm() { | ||
74 | + this.setData({ | ||
75 | + is_showSuccessModal: false | ||
76 | + }) | ||
77 | + wx.redirectTo({ | ||
78 | + url: '../../my/all-appointment/all-appointment?currentTab=' + 2, | ||
79 | + }) | ||
80 | + }, | ||
81 | + | ||
82 | + disableScroll() {}, | ||
83 | + addStudent() { | ||
84 | + wx.navigateTo({ | ||
85 | + url: './add-student/add-student' | ||
86 | + }) | ||
87 | + }, | ||
88 | + /** | ||
89 | + * 生命周期函数--监听页面加载 | ||
90 | + */ | ||
91 | + onLoad: function(options) { | ||
92 | + | ||
93 | + }, | ||
94 | + | ||
95 | + /** | ||
96 | + * 生命周期函数--监听页面初次渲染完成 | ||
97 | + */ | ||
98 | + onReady: function() { | ||
99 | + | ||
100 | + }, | ||
101 | + | ||
102 | + /** | ||
103 | + * 生命周期函数--监听页面显示 | ||
104 | + */ | ||
105 | + onShow: function() { | ||
106 | + const self = this; | ||
107 | + setTimeout(function() { | ||
108 | + self.setData({ | ||
109 | + show: true | ||
110 | + }) | ||
111 | + }, 500) | ||
112 | + }, | ||
113 | + | ||
114 | + /** | ||
115 | + * 生命周期函数--监听页面隐藏 | ||
116 | + */ | ||
117 | + onHide: function() { | ||
118 | + | ||
119 | + }, | ||
120 | + | ||
121 | + /** | ||
122 | + * 生命周期函数--监听页面卸载 | ||
123 | + */ | ||
124 | + onUnload: function() { | ||
125 | + | ||
126 | + }, | ||
127 | + | ||
128 | + /** | ||
129 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
130 | + */ | ||
131 | + onPullDownRefresh: function() { | ||
132 | + | ||
133 | + }, | ||
134 | + | ||
135 | + /** | ||
136 | + * 页面上拉触底事件的处理函数 | ||
137 | + */ | ||
138 | + onReachBottom: function() { | ||
139 | + | ||
140 | + }, | ||
141 | + | ||
142 | + /** | ||
143 | + * 用户点击右上角分享 | ||
144 | + */ | ||
145 | + onShareAppMessage: function() { | ||
146 | + | ||
147 | + } | ||
102 | }) | 148 | }) |
1 | <!--pages/index/confirm-appointment-info/confirm-appointment-info.wxml--> | 1 | <!--pages/index/confirm-appointment-info/confirm-appointment-info.wxml--> |
2 | <view class="content"> | 2 | <view class="content"> |
3 | - <view class="tips {{show?'active':''}}"> | ||
4 | - <!--<view>--> | ||
5 | - <view class="iconfont icon-jinggao"></view> | ||
6 | - <text>请在15分钟内确认预约,超时系统将自动取消!</text> | ||
7 | - <!--</view>--> | ||
8 | - </view> | ||
9 | - <view class="time"> | ||
10 | - <view class="line"></view> | ||
11 | - <text>预约时间 : </text> | ||
12 | - <text class="date-time">2018年10月10号 10:00-11:30</text> | ||
13 | - </view> | 3 | + <view class="tips {{show?'active':''}}"> |
4 | + <!--<view>--> | ||
5 | + <view class="iconfont icon-jinggao"></view> | ||
6 | + <text>请在15分钟内确认预约,超时系统将自动取消!</text> | ||
7 | + <!--</view>--> | ||
8 | + </view> | ||
9 | + <view class="time"> | ||
10 | + <view class="line"></view> | ||
11 | + <text>预约时间 : </text> | ||
12 | + <text class="date-time">2018年10月10号 10:00-11:30</text> | ||
13 | + </view> | ||
14 | 14 | ||
15 | - <view class="address"> | ||
16 | - <view class="time"> | ||
17 | - <view class="line"></view> | ||
18 | - <text>预约地址 :</text> | ||
19 | - </view> | ||
20 | - <view class="address-detail"> | ||
21 | - <!--<text>--> | ||
22 | - 朝阳区万寿路5号楼马兰大厦B座301念读书馆内朝阳区读书馆内朝阳区万寿路5号楼马兰大厦B座301念读书万寿路5号楼马兰大厦B座301念读书 | ||
23 | - <!--</text>--> | ||
24 | - </view> | 15 | + <view class="address"> |
16 | + <view class="time"> | ||
17 | + <view class="line"></view> | ||
18 | + <text>预约地址 :</text> | ||
25 | </view> | 19 | </view> |
26 | - <view class="phone-num"> | ||
27 | - <view class="line"></view> | ||
28 | - <text>预约电话 :</text> | ||
29 | - <text class="phone">188****8888</text> | 20 | + <view class="address-detail"> |
21 | + <!--<text>--> | ||
22 | + 朝阳区万寿路5号楼马兰大厦B座301念读书馆内朝阳区读书馆内朝阳区万寿路5号楼马兰大厦B座301念读书万寿路5号楼马兰大厦B座301念读书 | ||
23 | + <!--</text>--> | ||
30 | </view> | 24 | </view> |
31 | - <view class="children-name"> | ||
32 | - <view class="left-name"> | ||
33 | - <view class="line"></view> | ||
34 | - <text>学员姓名</text> | ||
35 | - </view> | ||
36 | - <image src="../../../images/add_btn.png" bindtap="addStudent"></image> | 25 | + </view> |
26 | + <view class="phone-num"> | ||
27 | + <view class="line"></view> | ||
28 | + <text>预约电话 :</text> | ||
29 | + <text class="phone">188****8888</text> | ||
30 | + </view> | ||
31 | + <view class="children-name"> | ||
32 | + <view class="left-name"> | ||
33 | + <view class="line"></view> | ||
34 | + <text>学员姓名</text> | ||
37 | </view> | 35 | </view> |
38 | - <view class="name-box"> | ||
39 | - <view class="check-box" wx:for="{{children}}" wx:key="index" bindtap="chooseChildren" | ||
40 | - data-index="{{index}}"> | ||
41 | - <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> | ||
43 | - </view> | 36 | + <image src="../../../images/add_btn.png" bindtap="addStudent"></image> |
37 | + </view> | ||
38 | + <view class="name-box"> | ||
39 | + <view class="check-box" wx:for="{{children}}" wx:key="index" bindtap="chooseChildren" data-index="{{index}}"> | ||
40 | + <view class="name {{item.is_choose?'change-color':''}}">{{item.name}}</view> | ||
41 | + <image src="../../../images/choose_icon.png" wx:if="{{item.is_choose}}" class="check-icon"></image> | ||
44 | </view> | 42 | </view> |
43 | + </view> | ||
45 | 44 | ||
46 | - <view class="footer"> | ||
47 | - <view class="confirm_btn" bindtap="submit"> | ||
48 | - <text>确认预约</text> | ||
49 | - </view> | 45 | + <view class="footer"> |
46 | + <view class="confirm_btn" bindtap="submit"> | ||
47 | + <text>确认预约</text> | ||
50 | </view> | 48 | </view> |
51 | - <!--是否购买畅玩卡弹窗--> | ||
52 | - <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"> | ||
57 | - </view> | ||
58 | - <view class="modalBackground Augly-bouncein"> | ||
59 | - <view class="modal"> | ||
60 | - <view class="tips-word">当前学员还没有购买/兑换畅玩卡,暂不能预约实验活动,是否马上购买/兑换?</view> | ||
61 | - <view class="yes-no-btn"> | ||
62 | - <text bindtap="chooseNo" class="{{currentBtn == 0?'change-color':''}}" data-index="{{0}}">否</text> | ||
63 | - <text bindtap="chooseYes" class="{{currentBtn == 1?'change-color':''}}" data-index="{{1}}">是</text> | ||
64 | - </view> | ||
65 | - </view> | ||
66 | - </view> | 49 | + </view> |
50 | + <!--是否购买畅玩卡弹窗--> | ||
51 | + <view class="modal_box" wx:if="{{is_showModal}}" catchtouchmove="disableScroll"> | ||
52 | + <view class="background" bindtap="handleBackground" wx:if="{{is_showModal}}" catchtouchmove="disableScroll"> | ||
67 | </view> | 53 | </view> |
68 | - <!--预约成功弹窗--> | ||
69 | - <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"> | ||
74 | - </view> | ||
75 | - <view class="modalBackground Augly-bouncein"> | ||
76 | - <view class="success-modal"> | ||
77 | - <image src="../../../images/success.jpg"></image> | ||
78 | - <view class="congratulations">恭喜您</view> | ||
79 | - <view class="appointment-success">您已经预约成功!</view> | ||
80 | - <view class="confirm-btn" bindtap="modalConfirm">确定</view> | ||
81 | - </view> | 54 | + <view class="modalBackground Augly-bouncein"> |
55 | + <view class="modal"> | ||
56 | + <view class="tips-word">当前学员还没有购买/兑换畅玩卡,暂不能预约实验活动,是否马上购买/兑换?</view> | ||
57 | + <view class="yes-no-btn"> | ||
58 | + <text bindtap="chooseNo" class="{{currentBtn == 0?'change-color':''}}" data-index="{{0}}">否</text> | ||
59 | + <text bindtap="chooseYes" class="{{currentBtn == 1?'change-color':''}}" data-index="{{1}}">是</text> | ||
82 | </view> | 60 | </view> |
61 | + </view> | ||
62 | + </view> | ||
63 | + </view> | ||
64 | + <!--预约成功弹窗--> | ||
65 | + <view class="modal_box" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll"> | ||
66 | + <view class="background" bindtap="handleBackground" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll"> | ||
67 | + </view> | ||
68 | + <view class="modalBackground Augly-bouncein"> | ||
69 | + <view class="success-modal"> | ||
70 | + <image src="../../../images/success.jpg"></image> | ||
71 | + <view class="congratulations">恭喜您</view> | ||
72 | + <view class="appointment-success">您已经预约成功!</view> | ||
73 | + <view class="confirm-btn" bindtap="modalConfirm">确定</view> | ||
74 | + </view> | ||
83 | </view> | 75 | </view> |
76 | + </view> | ||
84 | </view> | 77 | </view> |
@@ -5,122 +5,209 @@ Page({ | @@ -5,122 +5,209 @@ Page({ | ||
5 | * 页面的初始数据 | 5 | * 页面的初始数据 |
6 | */ | 6 | */ |
7 | data: { | 7 | data: { |
8 | - array: ['北京市', '天津市', '上海市', '河北省'], | ||
9 | - currentCity: '北京市', | ||
10 | - is_change: 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:'南锣鼓巷实验室'}]}, | ||
17 | - ], | ||
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}, | ||
23 | - // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
24 | - // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
25 | - // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
26 | - // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
27 | - // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
28 | - // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
29 | - // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
30 | - // {week:'周六',date: '10月20日',time:'10:00 — 11:30',rest: 6} | ||
31 | - ]}, | ||
32 | - }, | ||
33 | - //选择城市 | ||
34 | - bindPickerChange: function(e) { | ||
35 | - console.log('picker发送选择改变,携带值为', e.detail.value) | ||
36 | - this.setData({ | ||
37 | - index: e.detail.value, | ||
38 | - is_change: true, | ||
39 | - }) | ||
40 | - }, | ||
41 | - //选择实验室 | ||
42 | - chooseTest(e) { | ||
43 | - console.log(e.currentTarget.dataset.index); | ||
44 | - const current = e.currentTarget.dataset.index; | ||
45 | - const current_id = e.currentTarget.dataset.id; | ||
46 | - this.setData({currentTest: current,currentId: current_id}) | ||
47 | - }, | ||
48 | - //选择时段 | ||
49 | - chooseTime(e) { | ||
50 | - console.log(e.currentTarget.dataset.index); | ||
51 | - const current = e.currentTarget.dataset.index; | ||
52 | - this.setData({currentTime: current}) | ||
53 | - }, | ||
54 | - //点击单人预约 | ||
55 | - singleAppointment() { | ||
56 | - this.setData({show_submit_btn: true}) | ||
57 | - }, | ||
58 | - //点击双人预约 | ||
59 | - doubleAppointment() { | ||
60 | - this.setData({show_submit_btn: true}) | ||
61 | - }, | ||
62 | - submit() { | ||
63 | - wx.navigateTo({url: '/pages/index/confirm-appointment-info/confirm-appointment-info'}) | 8 | + array: ['北京市', '天津市', '上海市', '河北省'], |
9 | + currentCity: '北京市', | ||
10 | + is_change: false, | ||
11 | + show_submit_btn: false, | ||
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 | + }, | ||
64 | + ], | ||
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 | + }, | ||
91 | + // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
92 | + // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
93 | + // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
94 | + // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
95 | + // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
96 | + // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
97 | + // {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6}, | ||
98 | + // {week:'周六',date: '10月20日',time:'10:00 — 11:30',rest: 6} | ||
99 | + ] | ||
64 | }, | 100 | }, |
101 | + }, | ||
102 | + | ||
103 | + //选择城市 | ||
104 | + bindPickerChange: function(e) { | ||
105 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
106 | + this.setData({ | ||
107 | + index: e.detail.value, | ||
108 | + is_change: true, | ||
109 | + }) | ||
110 | + }, | ||
111 | + | ||
112 | + //选择实验室 | ||
113 | + chooseTest(e) { | ||
114 | + console.log(e.currentTarget.dataset.index); | ||
115 | + const current = e.currentTarget.dataset.index; | ||
116 | + const current_id = e.currentTarget.dataset.id; | ||
117 | + this.setData({ | ||
118 | + currentTest: current, | ||
119 | + currentId: current_id | ||
120 | + }) | ||
121 | + }, | ||
122 | + | ||
123 | + //选择时段 | ||
124 | + chooseTime(e) { | ||
125 | + console.log(e.currentTarget.dataset.index); | ||
126 | + const current = e.currentTarget.dataset.index; | ||
127 | + this.setData({ | ||
128 | + currentTime: current | ||
129 | + }) | ||
130 | + }, | ||
131 | + | ||
132 | + //点击单人预约 | ||
133 | + singleAppointment() { | ||
134 | + this.setData({ | ||
135 | + show_submit_btn: true | ||
136 | + }) | ||
137 | + }, | ||
138 | + | ||
139 | + //点击双人预约 | ||
140 | + doubleAppointment() { | ||
141 | + this.setData({ | ||
142 | + show_submit_btn: true | ||
143 | + }) | ||
144 | + }, | ||
145 | + | ||
146 | + submit() { | ||
147 | + wx.navigateTo({ | ||
148 | + url: '/pages/index/confirm-appointment-info/confirm-appointment-info' | ||
149 | + }) | ||
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])//取到了值 | ||
73 | - }) | 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]) //取到了值 | ||
74 | }) | 160 | }) |
75 | - // console.log(this.data.areaTest); | 161 | + }) |
162 | + // console.log(this.data.areaTest); | ||
76 | }, | 163 | }, |
77 | 164 | ||
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 | }) |
@@ -4,66 +4,107 @@ const app = getApp() | @@ -4,66 +4,107 @@ const app = getApp() | ||
4 | 4 | ||
5 | Page({ | 5 | Page({ |
6 | data: { | 6 | data: { |
7 | - hasPhone: true, | ||
8 | - imgUrls:[ | ||
9 | - {'url': '../../images/banner.jpg'}, | ||
10 | - {'url': '../../images/banner.jpg'}, | ||
11 | - {'url': '../../images/banner.jpg'},], | ||
12 | - autoplay: true, //是否自动轮播 | ||
13 | - interval: 2000, //间隔时间 | ||
14 | - duration: 500, //滑动时间 | ||
15 | - 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'}, | ||
19 | - ], | ||
20 | - is_this_week: true, | ||
21 | - ordered: false, | ||
22 | - is_past: false, | 7 | + hasPhone: true, |
8 | + imgUrls: [{ | ||
9 | + 'url': '../../images/banner.jpg' | ||
23 | }, | 10 | }, |
24 | - 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'}, | ||
29 | - ], | ||
30 | - is_this_week: false, | ||
31 | - ordered: false, | ||
32 | - is_past: true, | 11 | + { |
12 | + 'url': '../../images/banner.jpg' | ||
33 | }, | 13 | }, |
14 | + { | ||
15 | + 'url': '../../images/banner.jpg' | ||
16 | + }, | ||
17 | + ], | ||
18 | + autoplay: true, //是否自动轮播 | ||
19 | + interval: 2000, //间隔时间 | ||
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 | + ], | ||
30 | + this_week_test_info: { | ||
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 | + }, | ||
39 | + ], | ||
40 | + is_this_week: true, | ||
41 | + ordered: false, | ||
42 | + is_past: false, | ||
43 | + }, | ||
44 | + past_test_info: { | ||
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 | + }, | ||
57 | + ], | ||
58 | + is_this_week: false, | ||
59 | + ordered: false, | ||
60 | + is_past: true, | ||
61 | + }, | ||
34 | }, | 62 | }, |
35 | - swiperChange: function (e) { //切换轮播图 | ||
36 | - this.setData({ | ||
37 | - currentSwiper: e.detail.current | ||
38 | - }) | 63 | + swiperChange: function(e) { //切换轮播图 |
64 | + this.setData({ | ||
65 | + currentSwiper: e.detail.current | ||
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); | ||
50 | - const current = e.currentTarget.dataset.index; | ||
51 | - wx.navigateTo({url: './activity-detail/activity-detail'}) | 82 | + console.log(e) |
83 | + const current = e.currentTarget.dataset.index; | ||
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) { | ||
55 | - const current = e.currentTarget.dataset.index; | ||
56 | - wx.navigateTo({url: './go-appointment/go-appointment'}) | 90 | + goAppointment(e) { |
91 | + const current = e.currentTarget.dataset.index; | ||
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, |
@@ -91,4 +132,4 @@ Page({ | @@ -91,4 +132,4 @@ Page({ | ||
91 | hasUserInfo: true | 132 | hasUserInfo: true |
92 | }) | 133 | }) |
93 | } | 134 | } |
94 | -}) | 135 | +}) |
1 | <!--index.wxml--> | 1 | <!--index.wxml--> |
2 | <view class="container"> | 2 | <view class="container"> |
3 | <!--蒙层--> | 3 | <!--蒙层--> |
4 | - <view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view> | 4 | + <view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view> |
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> |
@@ -24,17 +23,54 @@ | @@ -24,17 +23,54 @@ | ||
24 | </view> | 23 | </view> |
25 | </view> | 24 | </view> |
26 | 25 | ||
27 | - <!--购买--> | 26 | + <!--购买--> |
28 | <view class="btn-box" bindtap="goBuyCard"> | 27 | <view class="btn-box" bindtap="goBuyCard"> |
29 | <view class="buy-btn"> | 28 | <view class="buy-btn"> |
30 | <text>点击图片可跳转到购买页</text> | 29 | <text>点击图片可跳转到购买页</text> |
31 | </view> | 30 | </view> |
32 | </view> | 31 | </view> |
33 | 32 | ||
34 | - <!--实验列表--> | ||
35 | - <import src="/templates/templates.wxml" /> | ||
36 | - <view class="past_template"> | ||
37 | - <template is="experiment" data="{{...this_week_test_info}}"></template> | ||
38 | - <template is="experiment" data="{{...past_test_info}}"></template> | 33 | + <!--实验列表--> |
34 | + <!-- <import src="/templates/templates.wxml" /> --> | ||
35 | + <view class="past_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> | ||
39 | </view> | 55 | </view> |
40 | -</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> | ||
75 | + </view> | ||
76 | +</view> |
@@ -6,88 +6,94 @@ Page({ | @@ -6,88 +6,94 @@ Page({ | ||
6 | * 页面的初始数据 | 6 | * 页面的初始数据 |
7 | */ | 7 | */ |
8 | data: { | 8 | data: { |
9 | - fun_id: 2, | ||
10 | - time: '获取验证码', //倒计时 | ||
11 | - currentTime: 61 | 9 | + fun_id: 2, |
10 | + time: '获取验证码', //倒计时 | ||
11 | + currentTime: 61 | ||
12 | }, | 12 | }, |
13 | - getCode: function (options) { | ||
14 | - var that = this; | ||
15 | - var currentTime = that.data.currentTime; | ||
16 | - interval = setInterval(function () { | ||
17 | - currentTime--; | ||
18 | - that.setData({ | ||
19 | - time: currentTime + '秒' | ||
20 | - }) | ||
21 | - if (currentTime <= 0) { | ||
22 | - clearInterval(interval); | ||
23 | - that.setData({ | ||
24 | - time: '重新发送', | ||
25 | - currentTime: 61, | ||
26 | - disabled: false | ||
27 | - }) | ||
28 | - } | ||
29 | - }, 1000) | ||
30 | - }, | ||
31 | - getVerificationCode() { | ||
32 | - this.getCode(); | ||
33 | - var that = this; | 13 | + getCode: function(options) { |
14 | + var that = this; | ||
15 | + var currentTime = that.data.currentTime; | ||
16 | + interval = setInterval(function() { | ||
17 | + currentTime--; | ||
34 | that.setData({ | 18 | that.setData({ |
35 | - disabled: true | 19 | + time: currentTime + '秒' |
36 | }) | 20 | }) |
21 | + if (currentTime <= 0) { | ||
22 | + clearInterval(interval); | ||
23 | + that.setData({ | ||
24 | + time: '重新发送', | ||
25 | + currentTime: 61, | ||
26 | + disabled: false | ||
27 | + }) | ||
28 | + } | ||
29 | + }, 1000) | ||
30 | + }, | ||
31 | + getVerificationCode() { | ||
32 | + this.getCode(); | ||
33 | + var that = this; | ||
34 | + that.setData({ | ||
35 | + disabled: true | ||
36 | + }) | ||
37 | + }, | ||
38 | + //确认 | ||
39 | + confirm() { | ||
40 | + wx.switchTab({ | ||
41 | + url: '../../index/index' | ||
42 | + }) | ||
37 | }, | 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 | /** |
1 | <!--pages/my/all-appointment/all-appointment.wxml--> | 1 | <!--pages/my/all-appointment/all-appointment.wxml--> |
2 | <view class="content"> | 2 | <view class="content"> |
3 | - <!--tab--> | ||
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> | ||
7 | - </view> | ||
8 | - | ||
9 | - <!--预约列表--> | ||
10 | - <view class="list-box"> | ||
11 | - <view class="order-box"> | ||
12 | - | ||
13 | - <view class="head"> | ||
14 | - <text class="number">预约单号:000120180208</text> | ||
15 | - <text class="appointment-state" wx:if="{{currentTab === 1}}" style="color: #FC5B63;">待确认</text> | ||
16 | - <text class="appointment-state" wx:if="{{currentTab === 2}}">已预约</text> | ||
17 | - <text class="appointment-state" wx:if="{{currentTab === 3}}" style="color: #464646;">已取消</text> | ||
18 | - <text class="appointment-state" wx:if="{{currentTab === 4}}" style="color: #C3C3C3;">已结束</text> | ||
19 | - </view> | ||
20 | - | ||
21 | - <view class="section"> | ||
22 | - <image src="../../../images/red_line.png" wx:if="{{currentTab === 1}}" class="blue-line"></image> | ||
23 | - <image src="../../../images/blue_line.png" wx:if="{{currentTab === 2}}" class="blue-line"></image> | ||
24 | - <image src="../../../images/deep_grey_line.png" wx:if="{{currentTab === 3}}" class="blue-line"></image> | ||
25 | - <image src="../../../images/grey_line.png" wx:if="{{currentTab === 4}}" class="blue-line"></image> | ||
26 | - | ||
27 | - <view class="right-box"> | ||
28 | - <view class="right-top-box"> | ||
29 | - <view class="iconfont icon-dingwei"></view> | ||
30 | - <view class="address">北京市朝阳区万寿路马兰大厦B座北京市朝阳区万寿路马兰大厦B座</view> | ||
31 | - </view> | ||
32 | - | ||
33 | - <view class="right-bottom-box"> | ||
34 | - <view class="iconfont icon-shangwutubiao"></view> | ||
35 | - <view class="date-box"> | ||
36 | - <view class="date">预约日期:2018.09.02 10:00-11:30</view> | ||
37 | - | ||
38 | - <view class="not_confirm" wx:if="{{currentTab === 1}}"> | ||
39 | - <view class="go-cancel">取消</view> | ||
40 | - <view class="go-confirm">去确认</view> | ||
41 | - </view> | ||
42 | - <view class="cancel" wx:if="{{currentTab === 2}}">取消</view> | ||
43 | - <view class="iconfont icon-quxiao" wx:if="{{currentTab === 3}}"></view> | ||
44 | - <view class="iconfont icon-jieshu" wx:if="{{currentTab === 4}}"></view> | ||
45 | - </view> | ||
46 | - </view> | ||
47 | - </view> | 3 | + <!--tab--> |
4 | + <view class="tab-box"> | ||
5 | + <view wx:for="{{tab}}" wx:key="index" bindtap="changeTab" data-index="{{index}}" class="{{currentTab == index?'change-color':''}}">{{item}}</view> | ||
6 | + </view> | ||
7 | + | ||
8 | + <!--预约列表--> | ||
9 | + <view class="list-box"> | ||
10 | + <view class="order-box"> | ||
11 | + | ||
12 | + <view class="head"> | ||
13 | + <text class="number">预约单号:000120180208</text> | ||
14 | + <text class="appointment-state" wx:if="{{currentTab === 1}}" style="color: #FC5B63;">待确认</text> | ||
15 | + <text class="appointment-state" wx:if="{{currentTab === 2}}">已预约</text> | ||
16 | + <text class="appointment-state" wx:if="{{currentTab === 3}}" style="color: #464646;">已取消</text> | ||
17 | + <text class="appointment-state" wx:if="{{currentTab === 4}}" style="color: #C3C3C3;">已结束</text> | ||
18 | + </view> | ||
19 | + | ||
20 | + <view class="section"> | ||
21 | + <image src="../../../images/red_line.png" wx:if="{{currentTab === 1}}" class="blue-line"></image> | ||
22 | + <image src="../../../images/blue_line.png" wx:if="{{currentTab === 2}}" class="blue-line"></image> | ||
23 | + <image src="../../../images/deep_grey_line.png" wx:if="{{currentTab === 3}}" class="blue-line"></image> | ||
24 | + <image src="../../../images/grey_line.png" wx:if="{{currentTab === 4}}" class="blue-line"></image> | ||
25 | + | ||
26 | + <view class="right-box"> | ||
27 | + <view class="right-top-box"> | ||
28 | + <view class="iconfont icon-dingwei"></view> | ||
29 | + <view class="address">北京市朝阳区万寿路马兰大厦B座北京市朝阳区万寿路马兰大厦B座</view> | ||
30 | + </view> | ||
31 | + | ||
32 | + <view class="right-bottom-box"> | ||
33 | + <view class="iconfont icon-shangwutubiao"></view> | ||
34 | + <view class="date-box"> | ||
35 | + <view class="date">预约日期:2018.09.02 10:00-11:30</view> | ||
36 | + | ||
37 | + <view class="not_confirm" wx:if="{{currentTab === 1}}"> | ||
38 | + <view class="go-cancel">取消</view> | ||
39 | + <view class="go-confirm">去确认</view> | ||
40 | + </view> | ||
41 | + <view class="cancel" wx:if="{{currentTab === 2}}">取消</view> | ||
42 | + <view class="iconfont icon-quxiao" wx:if="{{currentTab === 3}}"></view> | ||
43 | + <view class="iconfont icon-jieshu" wx:if="{{currentTab === 4}}"></view> | ||
48 | </view> | 44 | </view> |
45 | + </view> | ||
46 | + </view> | ||
47 | + </view> | ||
49 | 48 | ||
50 | 49 | ||
51 | - </view> | ||
52 | </view> | 50 | </view> |
51 | + </view> | ||
53 | </view> | 52 | </view> |
@@ -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({ | ||
3 | - | ||
4 | - /** | ||
5 | - * 页面的初始数据 | ||
6 | - */ | ||
7 | - data: { | ||
8 | - | ||
9 | - }, | ||
10 | - //跳转我的预约 | ||
11 | - myAppointment() { | ||
12 | - | ||
13 | - }, | ||
14 | - //我的唱完卡 | ||
15 | - myCard() { | ||
16 | - wx.navigateTo({ | ||
17 | - url: 'myCard/myCard', | ||
18 | - }) | ||
19 | - }, | ||
20 | - //联系客服 | ||
21 | - contact() { | ||
22 | - wx.navigateTo({ | ||
23 | - url: 'serviceWeChat/serviceWeChat', | ||
24 | - }) | ||
25 | - }, | ||
26 | - /** | ||
27 | - * 生命周期函数--监听页面加载 | ||
28 | - */ | ||
29 | - onLoad: function(options) { | ||
30 | - | ||
31 | - }, | ||
32 | - | ||
33 | - /** | ||
34 | - * 生命周期函数--监听页面初次渲染完成 | ||
35 | - */ | ||
36 | - onReady: function() { | ||
37 | - | ||
38 | - }, | ||
39 | - | ||
40 | - /** | ||
41 | - * 生命周期函数--监听页面显示 | ||
42 | - */ | ||
43 | - onShow: function() { | ||
44 | - | ||
45 | - }, | ||
46 | - | ||
47 | - /** | ||
48 | - * 生命周期函数--监听页面隐藏 | ||
49 | - */ | ||
50 | - onHide: function() { | ||
51 | - | ||
52 | - }, | ||
53 | - | ||
54 | - /** | ||
55 | - * 生命周期函数--监听页面卸载 | ||
56 | - */ | ||
57 | - onUnload: function() { | ||
58 | - | ||
59 | - }, | ||
60 | - | ||
61 | - /** | ||
62 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
63 | - */ | ||
64 | - onPullDownRefresh: function() { | ||
65 | - | ||
66 | - }, | ||
67 | - | ||
68 | - /** | ||
69 | - * 页面上拉触底事件的处理函数 | ||
70 | - */ | ||
71 | - onReachBottom: function() { | ||
72 | - | ||
73 | - }, | ||
74 | - | ||
75 | - /** | ||
76 | - * 用户点击右上角分享 | ||
77 | - */ | ||
78 | - onShareAppMessage: function() { | ||
79 | - | ||
80 | - } | ||
81 | -}) | ||
1 | + // pages/my/my.js | ||
2 | + Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
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 | + }, | ||
22 | + //跳转我的预约 | ||
23 | + myAppointment() { | ||
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 | + }) | ||
47 | + }, | ||
48 | + //我的唱完卡 | ||
49 | + myCard() { | ||
50 | + wx.navigateTo({ | ||
51 | + url: 'myCard/myCard', | ||
52 | + }) | ||
53 | + }, | ||
54 | + //联系客服 | ||
55 | + contact() { | ||
56 | + wx.navigateTo({ | ||
57 | + url: 'serviceWeChat/serviceWeChat', | ||
58 | + }) | ||
59 | + }, | ||
60 | + /** | ||
61 | + * 生命周期函数--监听页面加载 | ||
62 | + */ | ||
63 | + onLoad: function(options) { | ||
64 | + | ||
65 | + }, | ||
66 | + | ||
67 | + /** | ||
68 | + * 生命周期函数--监听页面初次渲染完成 | ||
69 | + */ | ||
70 | + onReady: function() { | ||
71 | + | ||
72 | + }, | ||
73 | + | ||
74 | + /** | ||
75 | + * 生命周期函数--监听页面显示 | ||
76 | + */ | ||
77 | + onShow: function() { | ||
78 | + | ||
79 | + }, | ||
80 | + | ||
81 | + /** | ||
82 | + * 生命周期函数--监听页面隐藏 | ||
83 | + */ | ||
84 | + onHide: function() { | ||
85 | + | ||
86 | + }, | ||
87 | + | ||
88 | + /** | ||
89 | + * 生命周期函数--监听页面卸载 | ||
90 | + */ | ||
91 | + onUnload: function() { | ||
92 | + | ||
93 | + }, | ||
94 | + | ||
95 | + /** | ||
96 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
97 | + */ | ||
98 | + onPullDownRefresh: function() { | ||
99 | + | ||
100 | + }, | ||
101 | + | ||
102 | + /** | ||
103 | + * 页面上拉触底事件的处理函数 | ||
104 | + */ | ||
105 | + onReachBottom: function() { | ||
106 | + | ||
107 | + }, | ||
108 | + | ||
109 | + /** | ||
110 | + * 用户点击右上角分享 | ||
111 | + */ | ||
112 | + onShareAppMessage: function() { | ||
113 | + | ||
114 | + } | ||
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({ | ||
3 | - | ||
4 | - /** | ||
5 | - * 页面的初始数据 | ||
6 | - */ | ||
7 | - data: { | ||
8 | - | ||
9 | - }, | ||
10 | - | ||
11 | - /** | ||
12 | - * 生命周期函数--监听页面加载 | ||
13 | - */ | ||
14 | - onLoad: function (options) { | ||
15 | - | ||
16 | - }, | ||
17 | - | ||
18 | - /** | ||
19 | - * 生命周期函数--监听页面初次渲染完成 | ||
20 | - */ | ||
21 | - onReady: function () { | ||
22 | - | ||
23 | - }, | ||
24 | - | ||
25 | - /** | ||
26 | - * 生命周期函数--监听页面显示 | ||
27 | - */ | ||
28 | - onShow: function () { | ||
29 | - | ||
30 | - }, | ||
31 | - | ||
32 | - /** | ||
33 | - * 生命周期函数--监听页面隐藏 | ||
34 | - */ | ||
35 | - onHide: function () { | ||
36 | - | ||
37 | - }, | ||
38 | - | ||
39 | - /** | ||
40 | - * 生命周期函数--监听页面卸载 | ||
41 | - */ | ||
42 | - onUnload: function () { | ||
43 | - | ||
44 | - }, | ||
45 | - | ||
46 | - /** | ||
47 | - * 页面相关事件处理函数--监听用户下拉动作 | ||
48 | - */ | ||
49 | - onPullDownRefresh: function () { | ||
50 | - | ||
51 | - }, | ||
52 | - | ||
53 | - /** | ||
54 | - * 页面上拉触底事件的处理函数 | ||
55 | - */ | ||
56 | - onReachBottom: function () { | ||
57 | - | ||
58 | - }, | ||
59 | - | ||
60 | - /** | ||
61 | - * 用户点击右上角分享 | ||
62 | - */ | ||
63 | - onShareAppMessage: function () { | ||
64 | - | ||
65 | - } | ||
66 | -}) | ||
1 | + // pages/MyProfile/MyProfile.js | ||
2 | + Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
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 | + | ||
44 | + /** | ||
45 | + * 生命周期函数--监听页面加载 | ||
46 | + */ | ||
47 | + onLoad: function(options) { | ||
48 | + | ||
49 | + }, | ||
50 | + | ||
51 | + /** | ||
52 | + * 生命周期函数--监听页面初次渲染完成 | ||
53 | + */ | ||
54 | + onReady: function() { | ||
55 | + | ||
56 | + }, | ||
57 | + | ||
58 | + /** | ||
59 | + * 生命周期函数--监听页面显示 | ||
60 | + */ | ||
61 | + onShow: function() { | ||
62 | + | ||
63 | + }, | ||
64 | + | ||
65 | + /** | ||
66 | + * 生命周期函数--监听页面隐藏 | ||
67 | + */ | ||
68 | + onHide: function() { | ||
69 | + | ||
70 | + }, | ||
71 | + | ||
72 | + /** | ||
73 | + * 生命周期函数--监听页面卸载 | ||
74 | + */ | ||
75 | + onUnload: function() { | ||
76 | + | ||
77 | + }, | ||
78 | + | ||
79 | + /** | ||
80 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
81 | + */ | ||
82 | + onPullDownRefresh: function() { | ||
83 | + | ||
84 | + }, | ||
85 | + | ||
86 | + /** | ||
87 | + * 页面上拉触底事件的处理函数 | ||
88 | + */ | ||
89 | + onReachBottom: function() { | ||
90 | + | ||
91 | + }, | ||
92 | + | ||
93 | + /** | ||
94 | + * 用户点击右上角分享 | ||
95 | + */ | ||
96 | + onShareAppMessage: function() { | ||
97 | + | ||
98 | + } | ||
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,11 +119,12 @@ page { | @@ -110,11 +119,12 @@ 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){ | ||
117 | - border-bottom: 0rpx; | 125 | + |
126 | +.list_info:nth-child(2) { | ||
127 | + border-bottom: 0rpx; | ||
118 | } | 128 | } |
119 | 129 | ||
120 | .list_info text { | 130 | .list_info text { |
@@ -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; |
@@ -159,4 +175,4 @@ page { | @@ -159,4 +175,4 @@ page { | ||
159 | position: absolute; | 175 | position: absolute; |
160 | bottom: 0; | 176 | bottom: 0; |
161 | left: 0; | 177 | left: 0; |
162 | -} | ||
178 | +} |
@@ -3,21 +3,21 @@ | @@ -3,21 +3,21 @@ | ||
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"> | ||
10 | - <view class="test_box"> | ||
11 | - <view class="time">{{item.time}}</view> | ||
12 | - <view class="img_box"> | ||
13 | - <image src="{{item.url}}"></image> | ||
14 | - </view> | ||
15 | - </view> | 9 | + <view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail"> |
10 | + <view class="test_box"> | ||
11 | + <view class="time">{{item.time}}</view> | ||
12 | + <view class="img_box"> | ||
13 | + <image src="{{item.url}}"></image> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | 16 | ||
17 | - <view class="order_box"> | ||
18 | - <text wx:if="{{!ordered && !is_past}}" catchtap="goAppointment" data-index="{{index}}">前往预约</text> | ||
19 | - <text wx:if="{{is_past}}">查看</text> | ||
20 | - </view> | 17 | + <view class="order_box"> |
18 | + <text wx:if="{{!ordered && !is_past}}" catchtap="goAppointment" data-index="{{index}}">前往预约</text> | ||
19 | + <text wx:if="{{is_past}}">查看</text> | ||
21 | </view> | 20 | </view> |
21 | + </view> | ||
22 | </view> | 22 | </view> |
23 | </template> | 23 | </template> |
-
请 注册 或 登录 后发表评论