()
| 115 | } |
| 116 | |
| 117 | async query() { |
| 118 | const member = await request({ |
| 119 | method: "GET", |
| 120 | url: "https://wx.17u.cn/wechatmypubapi/myInfo/memberInfo", |
| 121 | headers: this.headers(), |
| 122 | }); |
| 123 | const mileage = await request({ |
| 124 | method: "POST", |
| 125 | url: "https://tcmobileapi.17usoft.com/mallgatewayapi/userApi/mileages/remain", |
| 126 | headers: this.headers({ |
| 127 | "content-type": "application/json", |
| 128 | "TC-MALL-DEPT-CODE": "iH3PGf9ZucSMMEYi4keylA==", |
| 129 | "TC-MALL-CLIENT": "API_CLIENT", |
| 130 | "TC-MALL-OS-TYPE": "Android", |
| 131 | }), |
| 132 | data: { osType: 2 }, |
| 133 | }); |
| 134 | const remain = mileage.data?.data?.remainBalance ?? mileage.data?.data?.balance ?? mileage.data?.remainBalance; |
| 135 | const content = member.data?.content || member.data?.data?.content || {}; |
| 136 | return `会员=${short(content.memberBanner || content.memberRights || content, 100)} 里程=${remain ?? short(mileage.data, 100)}`; |
| 137 | } |
| 138 | |
| 139 | async sign() { |
| 140 | const days = getFiveDays(); |
no test coverage detected