var uagent = req.get('user-agent');
if (uagent.indexOf('MicroMessenger') < 0) {
return res.json({code: 1, msg: '请使用微信打开~~ www.sunchn.com'});
}
WechatService.init_js(req, res, function (api) {
var str = 'http://' + sails.config.system.AppDomain + '/public/wx/sales/xiren/hongbao?salesid=' + salesid + '&logid=' + logid + '&wxid=' + wxid;
if (my) {
str = str + '&my=' + my;
}
var param = {
debug: false,
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'],
url: str
};
api.setOpts({timeout: 35000});
api.getJsConfig(param, function (e1, result) {
data.jsconfig = result;
Wx_user.findOne({openid: user.openid, wxid: user.wxid, subscribe: 1}).exec(function (e7, o7) {
data.guanzhu = o7;
Wx_sales_info.findOne(user.infoid).exec(function (e6, info) {
data.huayu = info;
return res.view('public/wx/sales/xiren/hongbao', data);
});
});
});
});
添加回复
该帖子已被锁定,不能回复.