|
@@ -28,6 +28,7 @@ const { ObjectContent } = initRegister(101)
|
|
const { ObjectContent: ObjectContent2 } = initRegister(102)
|
|
const { ObjectContent: ObjectContent2 } = initRegister(102)
|
|
const { ObjectContent: ObjectContent3 } = initRegister(103)
|
|
const { ObjectContent: ObjectContent3 } = initRegister(103)
|
|
const { ObjectContent: ObjectContent4 } = initRegister(104)
|
|
const { ObjectContent: ObjectContent4 } = initRegister(104)
|
|
|
|
+const { ObjectContent: ObjectContent5 } = initRegister(105) // 发送简历
|
|
// 注册消息体
|
|
// 注册消息体
|
|
function initRegister (contentType) {
|
|
function initRegister (contentType) {
|
|
class ObjectContent extends MessageContent {
|
|
class ObjectContent extends MessageContent {
|
|
@@ -81,7 +82,7 @@ export function useDataSource () {
|
|
// 最近会话数据源
|
|
// 最近会话数据源
|
|
WKSDK.shared().config.provider.syncConversationsCallback = async () => {
|
|
WKSDK.shared().config.provider.syncConversationsCallback = async () => {
|
|
const query = {
|
|
const query = {
|
|
- msg_count: 100
|
|
|
|
|
|
+ msg_count: 1
|
|
}
|
|
}
|
|
if (loginType.loginType === 'enterprise') {
|
|
if (loginType.loginType === 'enterprise') {
|
|
Object.assign(query, { enterpriseId: userStore.baseInfo.enterpriseId })
|
|
Object.assign(query, { enterpriseId: userStore.baseInfo.enterpriseId })
|
|
@@ -353,32 +354,44 @@ export async function getMoreMessages (pageSize, channel) {
|
|
* @returns
|
|
* @returns
|
|
*/
|
|
*/
|
|
// 发送职位使用101
|
|
// 发送职位使用101
|
|
|
|
+const contentType = {
|
|
|
|
+ 101: ObjectContent,
|
|
|
|
+ 102: ObjectContent2,
|
|
|
|
+ 103: ObjectContent3,
|
|
|
|
+ 104: ObjectContent4,
|
|
|
|
+ 105: ObjectContent5, // 发送简历
|
|
|
|
+}
|
|
export function send (text, _channel, type) {
|
|
export function send (text, _channel, type) {
|
|
let _text
|
|
let _text
|
|
- if (type === 101) {
|
|
|
|
- _text = new ObjectContent(text)
|
|
|
|
- WKSDK.shared().chatManager.send(_text, _channel)
|
|
|
|
- // console.log(_text)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (type === 102) {
|
|
|
|
- _text = new ObjectContent2(text)
|
|
|
|
- WKSDK.shared().chatManager.send(_text, _channel)
|
|
|
|
- // console.log(_text)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- // 求职者拒绝面试邀请
|
|
|
|
- if (type === 103) {
|
|
|
|
- _text = new ObjectContent3(text)
|
|
|
|
- WKSDK.shared().chatManager.send(_text, _channel)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- // 求职者接受面试邀请
|
|
|
|
- if (type === 104) {
|
|
|
|
- _text = new ObjectContent4(text)
|
|
|
|
|
|
+ if (contentType[type]) {
|
|
|
|
+ _text = new contentType[type](text)
|
|
WKSDK.shared().chatManager.send(_text, _channel)
|
|
WKSDK.shared().chatManager.send(_text, _channel)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ // if (type === 101) {
|
|
|
|
+ // _text = new ObjectContent(text)
|
|
|
|
+ // WKSDK.shared().chatManager.send(_text, _channel)
|
|
|
|
+ // // console.log(_text)
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // if (type === 102) {
|
|
|
|
+ // _text = new ObjectContent2(text)
|
|
|
|
+ // WKSDK.shared().chatManager.send(_text, _channel)
|
|
|
|
+ // // console.log(_text)
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // // 求职者拒绝面试邀请
|
|
|
|
+ // if (type === 103) {
|
|
|
|
+ // _text = new ObjectContent3(text)
|
|
|
|
+ // WKSDK.shared().chatManager.send(_text, _channel)
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // // 求职者接受面试邀请
|
|
|
|
+ // if (type === 104) {
|
|
|
|
+ // _text = new ObjectContent4(text)
|
|
|
|
+ // WKSDK.shared().chatManager.send(_text, _channel)
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
_text = new MessageText(text)
|
|
_text = new MessageText(text)
|
|
// console.log(_text)
|
|
// console.log(_text)
|
|
WKSDK.shared().chatManager.send(_text, _channel)
|
|
WKSDK.shared().chatManager.send(_text, _channel)
|