From 7253d400329e551ae29cbed98c114e9e91d890b2 Mon Sep 17 00:00:00 2001
From: aihe <961836564@qq.com>
Date: Tue, 24 Sep 2024 23:01:05 +0800
Subject: [PATCH] uu
---
common/api/common.js | 5 ++
common/api/url.js | 2 +
...loginHandle.js => componentEventHandle.js} | 6 +++
common/enum.js | 1 +
common/manageServer.js | 2 +-
.../buns-api/subscribe-message/index.vue | 46 +++++++++++++++++++
components/tpx-page/tpx-page.vue | 4 +-
pages/post/post.vue | 2 +
pages/tabBar/mine/mine.vue | 2 +-
store/modules/user.js | 2 +-
10 files changed, 68 insertions(+), 4 deletions(-)
rename common/{loginHandle.js => componentEventHandle.js} (67%)
create mode 100644 components/buns-api/subscribe-message/index.vue
diff --git a/common/api/common.js b/common/api/common.js
index ad89944..1de1544 100644
--- a/common/api/common.js
+++ b/common/api/common.js
@@ -91,3 +91,8 @@ export const addComplaints = (data = {})=> {
export const getComplainInfo = (data = {})=> {
return coreRequest(url.getComplainInfo, data, {}, 'get')
}
+
+// 小程序订阅消息模板列表
+export const querySappNotifyTplList = (data = {})=> {
+ return coreRequest(url.querySappNotifyTplList, data, {}, 'get')
+}
\ No newline at end of file
diff --git a/common/api/url.js b/common/api/url.js
index 349df9d..fc1fb18 100644
--- a/common/api/url.js
+++ b/common/api/url.js
@@ -62,5 +62,7 @@ export default {
getWarehouseInList: `/oms2c/emisWarehouseIn/listSimple`, // 进仓单列表
getWarehouseInInfo: `/oms2c/emisWarehouseIn/getWarehouseInDetail`, // 获取进仓单详情
cusConfirmWsIn: `/oms2c/emisWarehouseIn/cusConfirmWsIn`, // 确认进仓单
+ querySappNotifyTplList: `/oms2c/common/querySappNotifyTplList`, // 小程序订阅消息模板列表
+
}
diff --git a/common/loginHandle.js b/common/componentEventHandle.js
similarity index 67%
rename from common/loginHandle.js
rename to common/componentEventHandle.js
index 44ebdb3..af3ea40 100644
--- a/common/loginHandle.js
+++ b/common/componentEventHandle.js
@@ -3,6 +3,7 @@ import { goto } from "./untool"
import { getCurrentInstance } from "vue"
import { sysEventNames } from "@/common/enum"
+// 唤起登录
export const goLogin = ()=> {
// #ifdef MP
uni.$emit(sysEventNames.login, { })
@@ -11,4 +12,9 @@ export const goLogin = ()=> {
// #ifndef MP
goto("login/login", 2)
// #endif
+}
+
+// 唤起消息订阅
+export const triggerSubscribeMessage = ()=> {
+ uni.$emit(sysEventNames.subMessage, { })
}
\ No newline at end of file
diff --git a/common/enum.js b/common/enum.js
index 5b4e8ea..11bbe05 100644
--- a/common/enum.js
+++ b/common/enum.js
@@ -30,6 +30,7 @@ const pageEventNames = {
const sysEventNames = {
login: "login", // 触发登录
+ subMessage: "subMessage", // 触发订阅模板消息
}
const addressNameCodeMap = [
diff --git a/common/manageServer.js b/common/manageServer.js
index ac46012..97d72f9 100644
--- a/common/manageServer.js
+++ b/common/manageServer.js
@@ -2,7 +2,7 @@ import { goto, getImageTempFilePath } from "./untool";
import { showToast, showLoading, hideLoading, downloadFile } from "./untool"
import { setSessionXToken, getSessionXToken } from "@/session"
import { textEncoder, textDecoder } from "./util"
-import { goLogin } from "@/common/loginHandle"
+import { goLogin } from "@/common/componentEventHandle"
const getCommonReqData = ()=> {
const xToken = getSessionXToken()
diff --git a/components/buns-api/subscribe-message/index.vue b/components/buns-api/subscribe-message/index.vue
new file mode 100644
index 0000000..0c6198a
--- /dev/null
+++ b/components/buns-api/subscribe-message/index.vue
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
diff --git a/components/tpx-page/tpx-page.vue b/components/tpx-page/tpx-page.vue
index 5315017..d416a61 100644
--- a/components/tpx-page/tpx-page.vue
+++ b/components/tpx-page/tpx-page.vue
@@ -3,14 +3,16 @@
+