diff --git a/packageA/pages/my_service/appment_main.js b/packageA/pages/my_service/appment_main.js index 2c7a305..8b911ac 100644 --- a/packageA/pages/my_service/appment_main.js +++ b/packageA/pages/my_service/appment_main.js @@ -113,7 +113,9 @@ Page({ "storageId": storageId, "storeId": storeId, "userId": userId, - "validay": validay + "validay": validay, + "isxz": 1 + } var data = JSON.stringify(json); wx.request({ @@ -135,42 +137,42 @@ Page({ var temp_url = "/api/wx/open/app/user/sendSubscribeMsg"; //模版接口 var userinfo = getApp().globalData.userInfo; var name = d.userInfo.nickname; - var json = { - // "formId": formid, - "keyWord": [{ - "keyword": res.data.data.ServiceName - }, - { - "keyword": time.substring(0, 16) - }, { - "keyword": res.data.data.BeauticianName - }, { - "keyword": res.data.data.StorageName - }, { - "keyword": res.data.data.Address - } - ], - "page": "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, - "storeId": a.stoid, - "typeId": "1011", - "userId": th.data.options.userid - }; - var data = JSON.stringify(json); - //调用发送预约成功模版接口 - wx.request({ - url: th.data.inurl + temp_url, - data: data, - method: 'post', - header: { - 'content-type': 'application/json' - }, // 设置请求的 header - success: function(data) {} - }) - setTimeout(function() { + // var json = { + // // "formId": formid, + // "keyWord": [{ + // "keyword": res.data.data.ServiceName + // }, + // { + // "keyword": time.substring(0, 16) + // }, { + // "keyword": res.data.data.BeauticianName + // }, { + // "keyword": res.data.data.StorageName + // }, { + // "keyword": res.data.data.Address + // } + // ], + // "page": "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, + // "storeId": a.stoid, + // "typeId": "1011", + // "userId": th.data.options.userid + // }; + // var data = JSON.stringify(json); + // //调用发送预约成功模版接口 + // wx.request({ + // url: th.data.inurl + temp_url, + // data: data, + // method: 'post', + // header: { + // 'content-type': 'application/json' + // }, // 设置请求的 header + // success: function(data) {} + // }) + wx.redirectTo({ url: "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid, }); - }, 1000); + } else { getApp().my_warnning(res.data.msg, 0, th); th.settime(); @@ -237,40 +239,42 @@ Page({ wx.showLoading({ title: '加载中', }) - if (th.ver(version, '7.0.4') >= 0) { - //获取模版id - getApp().request.promiseGet(temp_url, { - data: { - store_id: a.stoid, - typeid: "1011" - } - }).then(res => { - if (res.data.code == 0 && res.data.data.pageData.length > 0) { - template_id = res.data.data.pageData[0].template_id; - // //授权订阅 - wx.requestSubscribeMessage({ - tmplIds: [template_id], - success(res) { - th.success(); - }, - fail(res) { - th.success(); - } - }) - } else { - th.success(); - } - }) - } else { - // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示 - wx.showModal({ - title: '提示', - content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' - }) - th.setData({ - is_sub: 0 - }) - } + + th.success(); + // if (th.ver(version, '7.0.4') >= 0) { + // //获取模版id + // getApp().request.promiseGet(temp_url, { + // data: { + // store_id: a.stoid, + // typeid: "1011" + // } + // }).then(res => { + // if (res.data.code == 0 && res.data.data.pageData.length > 0) { + // template_id = res.data.data.pageData[0].template_id; + // // //授权订阅 + // wx.requestSubscribeMessage({ + // tmplIds: [template_id], + // success(res) { + // th.success(); + // }, + // fail(res) { + // th.success(); + // } + // }) + // } else { + // th.success(); + // } + // }) + // } else { + // // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示 + // wx.showModal({ + // title: '提示', + // content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' + // }) + // th.setData({ + // is_sub: 0 + // }) + // } } }, diff --git a/packageA/pages/my_service/beauty_deta.js b/packageA/pages/my_service/beauty_deta.js index 550ffdf..cc88932 100644 --- a/packageA/pages/my_service/beauty_deta.js +++ b/packageA/pages/my_service/beauty_deta.js @@ -369,6 +369,7 @@ Page({ "remark": "更改预约时间", "states": 0, "storeId": a.stoid, + "isxz": 1 }; var data = JSON.stringify(json); var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址 diff --git a/packageA/pages/my_service/tment_details.js b/packageA/pages/my_service/tment_details.js index 66cc691..7434cca 100644 --- a/packageA/pages/my_service/tment_details.js +++ b/packageA/pages/my_service/tment_details.js @@ -36,7 +36,8 @@ Page({ var json = { "number": number, "storeId": a.stoid, - "states": states + "states": states, + "isxz": 1 }; var data = JSON.stringify(json); var url = th.data.url + "/api/weshop/marketing/reservation/reservation/update"; //预约接口地址