From 28d5af1281099ee005e93fb3ca616e28a3a14055 Mon Sep 17 00:00:00 2001 From: jscyl13849007907 <13849007907@163.com> Date: Tue, 17 Jun 2025 15:00:44 +0800 Subject: [PATCH] no message --- App.vue | 1 + pages/message/index.vue | 326 +++++++++++++++++++++++++++++------------------- root/detail/job.vue | 46 +++++++ utils/wyyx.js | 1 + 4 files changed, 245 insertions(+), 129 deletions(-) diff --git a/App.vue b/App.vue index 1e6437c..2f8ee4c 100644 --- a/App.vue +++ b/App.vue @@ -108,6 +108,7 @@ export default { // "reconnectionAttempts": 5, debugLevel: "debug", apiVersion: "v2", + enableV2CloudConversation: true, }, { V2NIMLoginServiceConfig: { diff --git a/pages/message/index.vue b/pages/message/index.vue index 39ad1e4..19543fa 100644 --- a/pages/message/index.vue +++ b/pages/message/index.vue @@ -1,147 +1,212 @@ - diff --git a/root/detail/job.vue b/root/detail/job.vue index 4711b40..e619323 100644 --- a/root/detail/job.vue +++ b/root/detail/job.vue @@ -445,6 +445,14 @@
{{ isSc ? "已收藏" : "收藏" }}
+
+ +
@@ -1222,6 +1230,44 @@ export default { }, }); }, + goIm() { + let that = this; + that.F.wyyxPost( + that.api.wyyx_create, + { + senderUserId: uni.getStorageSync("apply-uid"), + receiverUserId: that.jobDetail.customServiceUserId, + }, + (res) => { + uni.$UIKitStore.uiStore.selectConversation(res.conversationId); + that.F.wyyxPost( + that.api.wyyx_sendCard, + { + conversationType: 1, + senderUserId: uni.getStorageSync("apply-uid"), // 发送者id 即当前登录用户id + receiverUserId: that.jobDetail.customServiceUserId, // 接收方用户id + type: 100000, + jobDetail: { + title: that.jobDetail.jobName, + info: (that.jobDetail.addss ? that.jobDetail.addss + "丨" : "") + that.jobDetail.genderRestrict + "丨" + that.jobDetail.age, + label: that.jobDetail.jobRequestLabelNames.length > 0 ? that.jobDetail.jobRequestLabelNames : "", + salaryClassifyValue: that.jobDetail.priceStr, + serviceFee: that.jobDetail.fuWuFei, + monthPay: that.jobDetail.monthPay, + jobId: that.uid, + }, + }, + () => { + uni.navigateTo({ + url: "/root/NEUIKit/pages/Chat/index", + }); + }, + () => {} + ); + }, + () => {} + ); + }, }, }; diff --git a/utils/wyyx.js b/utils/wyyx.js index a8789a5..20dd530 100644 --- a/utils/wyyx.js +++ b/utils/wyyx.js @@ -114,6 +114,7 @@ let data = { $parmas[k] = '' } } + $header['content-type'] = 'application/json'; console.log("公共参数,+++++", Object.assign($parmas, that.wyyxsetPublicParams())); uni.request({ url: ajaxUrl + $url,