add requestSubscribeMessage & templateId on ticket submit
parent
16cb2362e6
commit
7ae5d8758a
|
|
@ -3,6 +3,8 @@ export type FixStatus = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|||
export const defaultAvatar =
|
||||
'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png';
|
||||
|
||||
export const tmplIds = ['hbblqs928F2kd1s0IR_pDIAjYrNscUmz6tv6NZKsctM'];
|
||||
|
||||
export type Info = {
|
||||
phone: string;
|
||||
name: string;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import RepairPage from '@/pages/repair/repair';
|
|||
import Taro from '@tarojs/taro';
|
||||
import pt from '@/plain-text';
|
||||
import wechatUser, { UserInfo } from '@/wechat';
|
||||
import { defaultAvatar } from '@/common';
|
||||
import { defaultAvatar, tmplIds } from '@/common';
|
||||
import { getUrl } from '.';
|
||||
|
||||
const relaunchInterval = 1000;
|
||||
|
|
@ -63,11 +63,23 @@ export function submitTicket(that: RepairPage) {
|
|||
message: pt.get().button.submitText.success,
|
||||
type: 'success',
|
||||
});
|
||||
setTimeout(() => {
|
||||
Taro.reLaunch({
|
||||
url: '/pages/repair/repair',
|
||||
});
|
||||
}, relaunchInterval);
|
||||
Taro.requestSubscribeMessage({
|
||||
tmplIds: tmplIds,
|
||||
success: function (re) {
|
||||
console.log(re);
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log(err);
|
||||
},
|
||||
complete: function () {
|
||||
setTimeout(() => {
|
||||
Taro.reLaunch({
|
||||
url: '/pages/repair/repair',
|
||||
});
|
||||
}, relaunchInterval);
|
||||
},
|
||||
entityIds: tmplIds,
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
|
|
|||
Loading…
Reference in New Issue