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

Function wxpusherNotifyByOne

sendNotify.js:2503–2596  ·  view source on GitHub ↗
(text, desp, strsummary = "")

Source from the content-addressed store, hash-verified

2501 });
2502}
2503function wxpusherNotifyByOne(text, desp, strsummary = "") {
2504 return new Promise((resolve) => {
2505 if (WP_APP_TOKEN_ONE) {
2506 var WPURL = "";
2507 if (strsummary) {
2508 strsummary = text + "\n" + strsummary;
2509 } else {
2510 strsummary = text + "\n" + desp;
2511 }
2512
2513 if (strsummary.length > 96) {
2514 strsummary = strsummary.substring(0, 95) + "...";
2515 }
2516 let uids = [];
2517 for (let i of WP_UIDS_ONE.split(";")) {
2518 if (i.length != 0)
2519 uids.push(i);
2520 };
2521 let topicIds = [];
2522
2523 //desp = `<font size="3">${desp}</font>`;
2524 desp = desp.replace(/[\n\r]/g, '<br>'); // 默认为html, 不支持plaintext
2525 desp = `<section style="width: 24rem; max-width: 100%;border:none;border-style:none;margin:2.5rem auto;" id="shifu_imi_57"
2526 donone="shifuMouseDownPayStyle(&#39;shifu_imi_57&#39;)">
2527 <section
2528 style="margin: 0px auto;text-align: left;border: 2px solid #212122;padding: 10px 0px;box-sizing:border-box; width: 100%; display:inline-block;"
2529 class="ipaiban-bc">
2530 <section style="margin-top: 1rem; float: left; margin-left: 1rem; margin-left: 1rem; font-size: 1.3rem; font-weight: bold;">
2531 <p style="margin: 0; color: black">
2532 ${text}
2533 </p>
2534 </section>
2535 <section style="display: block;width: 0;height: 0;clear: both;"></section>
2536 <section
2537 style="margin-top:20px; display: inline-block; border-bottom: 1px solid #212122; padding: 4px 20px; box-sizing:border-box;"
2538 class="ipaiban-bbc">
2539 <section
2540 style="width:25px; height:25px; border-radius:50%; background-color:#212122;display:inline-block;line-height: 25px"
2541 class="ipaiban-bg">
2542 <p style="text-align:center;font-weight:1000;margin:0">
2543 <span style="color: #ffffff;font-size:20px;">📢</span>
2544 </p>
2545 </section>
2546 <section style="display:inline-block;padding-left:10px;vertical-align: top;box-sizing:border-box;">
2547 </section>
2548 </section>
2549 <section style="margin-top:0rem;padding: 0.8rem;box-sizing:border-box;">
2550 <p style=" line-height: 1.6rem; font-size: 1.1rem; ">
2551 ${desp}
2552 </p>
2553 </section>
2554 </section>
2555</section>`;
2556
2557 const body = {
2558 appToken: `${WP_APP_TOKEN_ONE}`,
2559 content: `${desp}`,
2560 summary: `${strsummary}`,

Callers 1

sendNotifybyWxPucherFunction · 0.70

Calls 3

postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected