Commit 0985e8c66e322d77f69377eb2dc582ea82c09bd2
1 parent
3d37eaf3
提交和tex显示bug修复
Showing
1 changed file
with
18 additions
and
28 deletions
pages/user/my_service/appment_main.js
... | ... | @@ -47,23 +47,6 @@ Page({ |
47 | 47 | }, |
48 | 48 | //控制备注输入 |
49 | 49 | check_text: function() { |
50 | - wx.requestSubscribeMessage({ | |
51 | - tmplIds: ['Jg7Tj-wPlDfsairz_EHBQdoQnzLLF4nVhT1weCBEmTE'], | |
52 | - success(res) { | |
53 | - console.log("222222222222222222222222222222"); | |
54 | - }, | |
55 | - | |
56 | - fail(res) { | |
57 | - | |
58 | - console.log('fail 失败') | |
59 | - | |
60 | - console.log(res) | |
61 | - | |
62 | - logger.warn('订阅消息fail', res) | |
63 | - | |
64 | - } | |
65 | - }) | |
66 | - | |
67 | 50 | var th = this; |
68 | 51 | var is_textea = th.data.is_textea; |
69 | 52 | th.setData({ |
... | ... | @@ -101,12 +84,9 @@ Page({ |
101 | 84 | //提交成功及发送模版代码 |
102 | 85 | success: function() { |
103 | 86 | var th = this; |
104 | - th.setData({ | |
105 | - is_textea: 0 | |
106 | - }) | |
107 | 87 | var store = th.data.store_name; //门店名称 |
108 | 88 | var bea_name = th.data.beautician_name; //美容师名称 |
109 | - var time = th.data.time; //预约时间 | |
89 | + var time = th.data.time+":00"; //预约时间 | |
110 | 90 | var is_sub = th.data.is_sub; //是否重复提交 |
111 | 91 | //提交预约前的判断 |
112 | 92 | if (store == "") { |
... | ... | @@ -119,10 +99,6 @@ Page({ |
119 | 99 | getApp().my_warnning("请选择预约时间", 0, th); |
120 | 100 | return false; |
121 | 101 | } else { |
122 | - if (is_sub == 0) { | |
123 | - th.setData({ | |
124 | - is_sub: 1 | |
125 | - }) | |
126 | 102 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径 |
127 | 103 | var serviceId = th.data.itemId; //服务id |
128 | 104 | var beauticianID = th.data.beauticianID; //美容师id |
... | ... | @@ -160,6 +136,7 @@ Page({ |
160 | 136 | th.setData({ |
161 | 137 | is_sub: 0 |
162 | 138 | }) |
139 | + wx.hideLoading(); | |
163 | 140 | if (res.data.code == 0) { |
164 | 141 | getApp().my_warnning("预约成功", 1, th); |
165 | 142 | var store_name = th.data.store_name; //预约门店 |
... | ... | @@ -212,13 +189,23 @@ Page({ |
212 | 189 | } |
213 | 190 | }) |
214 | 191 | } |
215 | - } | |
192 | + | |
216 | 193 | }, |
217 | 194 | //提交预约 |
218 | 195 | sub_success: function(e) { |
219 | 196 | var th = this; |
220 | - var temp_url = "/api/wx/weappSendlist/page"; | |
197 | + var temp_url = th.data.inurl+"/api/wx/weappSendlist/page"; | |
221 | 198 | var template_id = ""; |
199 | + if (th.data.is_sub == 1) { | |
200 | + return false; | |
201 | + } | |
202 | + th.setData({ | |
203 | + is_textea: 0, | |
204 | + is_sub: 1 | |
205 | + }) | |
206 | + wx.showLoading({ | |
207 | + title: '加载中', | |
208 | + }) | |
222 | 209 | //获取模版id |
223 | 210 | getApp().request.promiseGet(temp_url, { |
224 | 211 | data: { |
... | ... | @@ -238,7 +225,7 @@ Page({ |
238 | 225 | th.success(); |
239 | 226 | } |
240 | 227 | }) |
241 | - }else{ | |
228 | + } else { | |
242 | 229 | th.success(); |
243 | 230 | } |
244 | 231 | }) |
... | ... | @@ -522,6 +509,9 @@ Page({ |
522 | 509 | if (seekTime != "") { |
523 | 510 | th.query_more(); |
524 | 511 | } |
512 | + th.setData({ | |
513 | + time: th.data.time.substring(0, 16) | |
514 | + }) | |
525 | 515 | th.query_project(); |
526 | 516 | }, |
527 | 517 | //获取单个服务项目信息 | ... | ... |