var fId = e.detail.formId;        var fObj = e.detail.value;        var l = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=' + wx.getStorageSync('accesstoken');        var d = {          "touser": wx.getStorageSync('openid'),          "template_id": 'svmwxxkmA6wbSwK7plO4AjS2rFWFX2qkHvGUO0fDf9A',//这个是1、申请的模板消息id,          "page": '/pages/index/index',          "form_id": fId,          "data": {            "remark": {              "value": "预约成功通知",              "color": "#173177"            },            "keyword1": {              "value": fObj.user_name,              "color": "#4a4a4a"            },            "keyword2": {              "value": fObj.tel,              "color": "#9b9b9b"            },            "keyword3": {              "value": that.data.margin,              "color": "#9b9b9b"            },            "keyword4": {              "value": '预约',              "color": "#9b9b9b"            },            "keyword5": {              "value": fObj.date + '(' + fObj.time + ')',              "color": "#9b9b9b"            },            "remark": {              "value": "欢迎您的到来!",              "color": "#173177"            }          },        }     wx.request({                url: l,                data: d,                method: 'POST',                success: function (res) {                     console.log("push msg");                             console.log(res);                },                fail: function (err) {                        // fail                        console.log("push err")                        console.log(err);                }            });

 

小程序

TAG标签: 微信小程序微信收款提醒

http://www.xiaochengxub.com/read-105639.html