【新增】订阅消息:拼团结果通知消息订阅
							parent
							
								
									8b73d488ca
								
							
						
					
					
						commit
						bd07762a10
					
				|  | @ -165,9 +165,6 @@ | ||||||
| 
 | 
 | ||||||
|   // 提交表单 |   // 提交表单 | ||||||
|   async function submit() { |   async function submit() { | ||||||
|     // #ifdef MP |  | ||||||
|     sheep.$platform.useProvider('wechat').subscribeMessage(SubscribeTemplate.ORDER_AFTERSALE_CHANGE); |  | ||||||
|     // #endif |  | ||||||
|     let data = { |     let data = { | ||||||
|       orderItemId: state.itemId, |       orderItemId: state.itemId, | ||||||
|       refundPrice: state.item.payPrice, |       refundPrice: state.item.payPrice, | ||||||
|  |  | ||||||
|  | @ -82,7 +82,7 @@ | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     // #ifdef MP |     // #ifdef MP | ||||||
|     sheep.$platform.useProvider('wechat').subscribeMessage([SubscribeTemplate.WALLET_RECHARGER_PAID, SubscribeTemplate.WALLET_RECHARGE_REFUNDED]); |     sheep.$platform.useProvider('wechat').subscribeMessage(SubscribeTemplate.WALLET_RECHARGER_PAID); | ||||||
|     // #endif |     // #endif | ||||||
|     sheep.$router.go('/pages/pay/index', { |     sheep.$router.go('/pages/pay/index', { | ||||||
|       id: data.payOrderId, |       id: data.payOrderId, | ||||||
|  |  | ||||||
|  | @ -161,9 +161,7 @@ | ||||||
|   function subscribeMessage() { |   function subscribeMessage() { | ||||||
|     let event = [SubscribeTemplate.DELIVERY_ORDER]; |     let event = [SubscribeTemplate.DELIVERY_ORDER]; | ||||||
|     if (state.tradeOrder.type === 3) { |     if (state.tradeOrder.type === 3) { | ||||||
|       // TODO puhui999: 待完善 |       event.push(SubscribeTemplate.COMBINATION_RESULT); | ||||||
|       event.push('拼团成功'); |  | ||||||
|       event.push('拼团失败'); |  | ||||||
|     } |     } | ||||||
|     sheep.$platform.useProvider('wechat').subscribeMessage(event, () => { |     sheep.$platform.useProvider('wechat').subscribeMessage(event, () => { | ||||||
|       // 订阅后记录一下订阅状态 |       // 订阅后记录一下订阅状态 | ||||||
|  |  | ||||||
|  | @ -58,10 +58,9 @@ export const TimeStatusEnum = { | ||||||
| 
 | 
 | ||||||
| // TODO 订阅模版枚举
 | // TODO 订阅模版枚举
 | ||||||
| export const SubscribeTemplate = { | export const SubscribeTemplate = { | ||||||
|   ORDER_AFTERSALE_CHANGE: "售后进度通知", |  | ||||||
|   WALLET_RECHARGER_PAID: "充值成功通知", |   WALLET_RECHARGER_PAID: "充值成功通知", | ||||||
|   WALLET_RECHARGE_REFUNDED: "退款申请通知", |  | ||||||
|   DELIVERY_ORDER: "订单发货通知", |   DELIVERY_ORDER: "订单发货通知", | ||||||
|  |   COMBINATION_RESULT: "拼团结果通知" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 puhui999
						puhui999