MCPcopy Create free account
hub / github.com/6dylan6/jdpro / wxpusherNotifyByOne

Function wxpusherNotifyByOne

function/sendNotify.js:1761–1854  ·  view source on GitHub ↗
(text, desp, strsummary = "")

Source from the content-addressed store, hash-verified

1759 });
1760}
1761function wxpusherNotifyByOne(text, desp, strsummary = "") {
1762 return new Promise((resolve) => {
1763 if (WP_APP_TOKEN_ONE) {
1764 var WPURL = "";
1765 if (strsummary) {
1766 strsummary = text + "\n" + strsummary;
1767 } else {
1768 strsummary = text + "\n" + desp;
1769 }
1770
1771 if (strsummary.length > 96) {
1772 strsummary = strsummary.substring(0, 95) + "...";
1773 }
1774 let uids = [];
1775 for (let i of WP_UIDS_ONE.split(";")) {
1776 if (i.length != 0)
1777 uids.push(i);
1778 };
1779 let topicIds = [];
1780
1781 //desp = `<font size="3">${desp}</font>`;
1782 desp = desp.replace(/[\n\r]/g, '<br>'); // 默认为html, 不支持plaintext
1783 desp = `<section style="width: 24rem; max-width: 100%;border:none;border-style:none;margin:2.5rem auto;" id="shifu_imi_57"
1784 donone="shifuMouseDownPayStyle(&#39;shifu_imi_57&#39;)">
1785 <section
1786 style="margin: 0px auto;text-align: left;border: 2px solid #212122;padding: 10px 0px;box-sizing:border-box; width: 100%; display:inline-block;"
1787 class="ipaiban-bc">
1788 <section style="margin-top: 1rem; float: left; margin-left: 1rem; margin-left: 1rem; font-size: 1.3rem; font-weight: bold;">
1789 <p style="margin: 0; color: black">
1790 ${text}
1791 </p>
1792 </section>
1793 <section style="display: block;width: 0;height: 0;clear: both;"></section>
1794 <section
1795 style="margin-top:20px; display: inline-block; border-bottom: 1px solid #212122; padding: 4px 20px; box-sizing:border-box;"
1796 class="ipaiban-bbc">
1797 <section
1798 style="width:25px; height:25px; border-radius:50%; background-color:#212122;display:inline-block;line-height: 25px"
1799 class="ipaiban-bg">
1800 <p style="text-align:center;font-weight:1000;margin:0">
1801 <span style="color: #ffffff;font-size:20px;">📢</span>
1802 </p>
1803 </section>
1804 <section style="display:inline-block;padding-left:10px;vertical-align: top;box-sizing:border-box;">
1805 </section>
1806 </section>
1807 <section style="margin-top:0rem;padding: 0.8rem;box-sizing:border-box;">
1808 <p style=" line-height: 1.6rem; font-size: 1.1rem; ">
1809 ${desp}
1810 </p>
1811 </section>
1812 </section>
1813</section>`;
1814
1815 const body = {
1816 appToken: `${WP_APP_TOKEN_ONE}`,
1817 content: `${desp}`,
1818 summary: `${strsummary}`,

Callers 1

sendNotifybyWxPucherFunction · 0.70

Calls 3

postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected