| | |
| | | "description": "", |
| | | "setting": { |
| | | "urlCheck": false, |
| | | "es6": false, |
| | | "enhance": false, |
| | | "es6": true, |
| | | "enhance": true, |
| | | "postcss": false, |
| | | "preloadBackgroundData": false, |
| | | "minified": false, |
| | |
| | | import { LoginFormTabs } from '../constants'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | import { NODE_ENV } from '@/constants'; |
| | | import { subscribeMessageTemplateIds } from '@12333/constants'; |
| | | console.log('NODE_ENV: ', NODE_ENV); |
| | | |
| | | defineOptions({ |
| | |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleLoginSuccess() { |
| | | Message.success('授权登录成功', { |
| | | onClosed: () => { |
| | | jump(); |
| | | }, |
| | | }); |
| | | async function handleLoginSuccess() { |
| | | try { |
| | | console.log('Taro.requestSubscribeMessage: ', Taro.requestSubscribeMessage); |
| | | if (!Taro.requestSubscribeMessage) { |
| | | await Message.confirm({ message: '你的微信版本过低,不支持订阅消息,是否继续报名' }); |
| | | } |
| | | const res = await Taro.getSetting({ |
| | | withSubscriptions: true, |
| | | }); |
| | | let setting: boolean[] = []; |
| | | if (res.subscriptionsSetting && res.subscriptionsSetting.itemSettings) { |
| | | setting = subscribeMessageTemplateIds |
| | | .map((id) => res.subscriptionsSetting.itemSettings[id] !== 'accept') |
| | | .filter(Boolean); |
| | | } |
| | | if (setting.length > 0) { |
| | | Taro.requestSubscribeMessage({ |
| | | tmplIds: subscribeMessageTemplateIds, |
| | | success: function (res) { |
| | | console.log('res: ', res); |
| | | }, |
| | | }); |
| | | } |
| | | Message.success('授权登录成功', { |
| | | onClosed: () => { |
| | | jump(); |
| | | }, |
| | | }); |
| | | } catch (error) { |
| | | console.log('error: ', error); |
| | | } |
| | | } |
| | | |
| | | function goLoginByForm(tab = LoginFormTabs.VerificationCodeLogin) { |
| | |
| | | GetTaskInfoQueryResultHireButton, |
| | | GetTaskInfoQueryResultApplyButton, |
| | | EnumTaskCheckReceiveMethod, |
| | | subscribeMessageTemplateIds, |
| | | } from '@12333/constants'; |
| | | import { useAccessLogin } from '@/hooks'; |
| | | import { useTaskInfo } from '@12333/hooks'; |
| | |
| | | } |
| | | }); |
| | | |
| | | const tmplIds = ['T7Gta6H6TROZjcqeSWVTG2wWGGInWh0fGTOgCCgVBuk']; |
| | | |
| | | const handleApply = _.debounce( |
| | | useAccessReal( |
| | | async () => { |
| | | try { |
| | | // if (!Taro.requestSubscribeMessage) { |
| | | // await Message.confirm({ message: '你的微信版本过低,不支持订阅消息,是否继续报名' }); |
| | | // } |
| | | // const res = await Taro.getSetting({ |
| | | // withSubscriptions: true, |
| | | // }); |
| | | // let setting: boolean[] = []; |
| | | // if (res.subscriptionsSetting && res.subscriptionsSetting.itemSettings) { |
| | | // setting = tmplIds |
| | | // .map((id) => res.subscriptionsSetting.itemSettings[id] !== 'accept') |
| | | // .filter(Boolean); |
| | | // } |
| | | // console.log('setting: ', setting); |
| | | // if (setting.length > 0) { |
| | | // Taro.requestSubscribeMessage({ |
| | | // tmplIds: tmplIds, |
| | | // success: function (res) { |
| | | // console.log('res: ', res); |
| | | // }, |
| | | // }); |
| | | // } |
| | | let params: API.ApplyTaskCommand = { |
| | | ids: [id], |
| | | }; |
| | |
| | | export const WeekCN = ['日', '一', '二', '三', '四', '五', '六']; |
| | | |
| | | export const subscribeMessageTemplateIds = [ |
| | | 'SXKAepOeuiyYrm0uhIzG48Tcf1LKdcp6I3xPbaV-Sgs', //被录用后向C端人员通知 |
| | | 'CQn-c22Uo_v5pQhAjdw-PknXBVD-DLAELsqRQziikAE', //排班后向C端人员通知 |
| | | 'pw-WntZZJjADXfLsxcs5S8pKlpTrSc-HtJs0ZZvqliE', //结算完成后向C端人员通知 |
| | | 'xYWBg0FydQ64a-4cDqLCp8HV82QhRKmREa78GpLqMlQ', //签约提醒 |
| | | 'Ce0QCQIGXjChpmq_r3hr_lifwO7MSpxDUjqNkwJCA74', //被安排提醒 |
| | | 'ziC07K27Km9OAywf-KYwHiWgn195j9tmuFKxbDZ79tg', //录用/录用谢绝 |
| | | 'TwPHORIjXxeUVr8R4FzbRofmIYmU0vODetvXrPfFAbY', //验收结果 |
| | | 'Fm2ut8eeJxf18PrVusJEdufbCMr9wZ45LeFVK4eNhIc', //到账提醒 |
| | | ]; |
| | |
| | | const Options: LoggerRecordOptions = { |
| | | moduleName: getUtilsConfig().appName, |
| | | enableStorage: true, |
| | | level: 'error', |
| | | loggerStorageAdapter() { |
| | | return { |
| | | setItem(key: string, data: any) { |