...
|
...
|
@@ -714,7 +714,8 @@ class AdminModel extends global.yoho.BaseModel { |
|
|
* @param id
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
async sendWechatMessage(id) {
|
|
|
async sendWechatMessage(id, channel = 0) {
|
|
|
|
|
|
let info = await Promise.all([
|
|
|
mysqlCli.query(`select name from ${TABLE_ACT_PRIZE_PRODUCT}
|
|
|
where id = :id limit 1`, {id}),
|
...
|
...
|
@@ -722,6 +723,7 @@ class AdminModel extends global.yoho.BaseModel { |
|
|
where act_prize_id = :id`, {id})
|
|
|
]);
|
|
|
|
|
|
|
|
|
let productInfo = _.get(info, '[0][0]');
|
|
|
let userList = [];
|
|
|
|
...
|
...
|
@@ -735,10 +737,11 @@ class AdminModel extends global.yoho.BaseModel { |
|
|
let msgData = {
|
|
|
method: 'wechat.message.send',
|
|
|
sendScene: 'MINI_WINNING_NOTICE',
|
|
|
miniAppType: (channel === 1 ? 63 : 29),
|
|
|
params: JSON.stringify({
|
|
|
activityTitle: productInfo.name,
|
|
|
activityTime: moment().format('YYYY-MM-DD HH:mm') + ':00',
|
|
|
pageUrl: 'page/subPackage/pages/zeroSell/detail?actPrizeId=' + id
|
|
|
pageUrl: 'pages/zeroSell/detail?actPrizeId=' + id
|
|
|
})
|
|
|
};
|
|
|
|
...
|
...
|
|