MCPcopy Create free account
hub / github.com/Moli-X/Resources / doshare

Function doshare

Script/Elem/elemSign.js:203–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201}
202
203function doshare() {
204
205 return new Promise(resolve => {
206 setTimeout(() => {
207
208 try {
209 var endurl = '/sign_in/wechat'
210 let body = { "channel": "app" };
211 url = {
212 url: `https://h5.ele.me/restapi/member/v1/users/`,
213 headers: headerscommon,
214 body: JSON.stringify(body)
215 }
216 if (cookieVal == undefined || cookieVal == "0" || cookieVal == null) {
217 sy.msg(cookieName, "未获取Cookie", '');
218 return;
219 }
220 url.url += userid;
221 url.url += endurl;
222 sy.post(url, (error, response, data) => {
223 if (response.status == 200) {
224
225 sy.log("分享微信成功");
226 }
227 else {
228 sy.log("分享微信失败");
229 }
230
231
232 resolve('done');
233 })
234 }
235 catch (erre) {
236 resolve('done')
237 }
238 })
239 })
240}
241
242function dosignhis() {
243

Callers 1

signFunction · 0.85

Calls 4

stringifyMethod · 0.45
msgMethod · 0.45
postMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected