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,23 +47,6 @@ Page({ | ||
| 47 | }, | 47 | }, |
| 48 | //控制备注输入 | 48 | //控制备注输入 |
| 49 | check_text: function() { | 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 | var th = this; | 50 | var th = this; |
| 68 | var is_textea = th.data.is_textea; | 51 | var is_textea = th.data.is_textea; |
| 69 | th.setData({ | 52 | th.setData({ |
| @@ -101,12 +84,9 @@ Page({ | @@ -101,12 +84,9 @@ Page({ | ||
| 101 | //提交成功及发送模版代码 | 84 | //提交成功及发送模版代码 |
| 102 | success: function() { | 85 | success: function() { |
| 103 | var th = this; | 86 | var th = this; |
| 104 | - th.setData({ | ||
| 105 | - is_textea: 0 | ||
| 106 | - }) | ||
| 107 | var store = th.data.store_name; //门店名称 | 87 | var store = th.data.store_name; //门店名称 |
| 108 | var bea_name = th.data.beautician_name; //美容师名称 | 88 | var bea_name = th.data.beautician_name; //美容师名称 |
| 109 | - var time = th.data.time; //预约时间 | 89 | + var time = th.data.time+":00"; //预约时间 |
| 110 | var is_sub = th.data.is_sub; //是否重复提交 | 90 | var is_sub = th.data.is_sub; //是否重复提交 |
| 111 | //提交预约前的判断 | 91 | //提交预约前的判断 |
| 112 | if (store == "") { | 92 | if (store == "") { |
| @@ -119,10 +99,6 @@ Page({ | @@ -119,10 +99,6 @@ Page({ | ||
| 119 | getApp().my_warnning("请选择预约时间", 0, th); | 99 | getApp().my_warnning("请选择预约时间", 0, th); |
| 120 | return false; | 100 | return false; |
| 121 | } else { | 101 | } else { |
| 122 | - if (is_sub == 0) { | ||
| 123 | - th.setData({ | ||
| 124 | - is_sub: 1 | ||
| 125 | - }) | ||
| 126 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径 | 102 | var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径 |
| 127 | var serviceId = th.data.itemId; //服务id | 103 | var serviceId = th.data.itemId; //服务id |
| 128 | var beauticianID = th.data.beauticianID; //美容师id | 104 | var beauticianID = th.data.beauticianID; //美容师id |
| @@ -160,6 +136,7 @@ Page({ | @@ -160,6 +136,7 @@ Page({ | ||
| 160 | th.setData({ | 136 | th.setData({ |
| 161 | is_sub: 0 | 137 | is_sub: 0 |
| 162 | }) | 138 | }) |
| 139 | + wx.hideLoading(); | ||
| 163 | if (res.data.code == 0) { | 140 | if (res.data.code == 0) { |
| 164 | getApp().my_warnning("预约成功", 1, th); | 141 | getApp().my_warnning("预约成功", 1, th); |
| 165 | var store_name = th.data.store_name; //预约门店 | 142 | var store_name = th.data.store_name; //预约门店 |
| @@ -212,13 +189,23 @@ Page({ | @@ -212,13 +189,23 @@ Page({ | ||
| 212 | } | 189 | } |
| 213 | }) | 190 | }) |
| 214 | } | 191 | } |
| 215 | - } | 192 | + |
| 216 | }, | 193 | }, |
| 217 | //提交预约 | 194 | //提交预约 |
| 218 | sub_success: function(e) { | 195 | sub_success: function(e) { |
| 219 | var th = this; | 196 | var th = this; |
| 220 | - var temp_url = "/api/wx/weappSendlist/page"; | 197 | + var temp_url = th.data.inurl+"/api/wx/weappSendlist/page"; |
| 221 | var template_id = ""; | 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 | //获取模版id | 209 | //获取模版id |
| 223 | getApp().request.promiseGet(temp_url, { | 210 | getApp().request.promiseGet(temp_url, { |
| 224 | data: { | 211 | data: { |
| @@ -238,7 +225,7 @@ Page({ | @@ -238,7 +225,7 @@ Page({ | ||
| 238 | th.success(); | 225 | th.success(); |
| 239 | } | 226 | } |
| 240 | }) | 227 | }) |
| 241 | - }else{ | 228 | + } else { |
| 242 | th.success(); | 229 | th.success(); |
| 243 | } | 230 | } |
| 244 | }) | 231 | }) |
| @@ -522,6 +509,9 @@ Page({ | @@ -522,6 +509,9 @@ Page({ | ||
| 522 | if (seekTime != "") { | 509 | if (seekTime != "") { |
| 523 | th.query_more(); | 510 | th.query_more(); |
| 524 | } | 511 | } |
| 512 | + th.setData({ | ||
| 513 | + time: th.data.time.substring(0, 16) | ||
| 514 | + }) | ||
| 525 | th.query_project(); | 515 | th.query_project(); |
| 526 | }, | 516 | }, |
| 527 | //获取单个服务项目信息 | 517 | //获取单个服务项目信息 |