()
| 206 | } |
| 207 | |
| 208 | async queryAssets() { |
| 209 | const { data } = await axios.post( |
| 210 | `${this.app.apiBase}/mini/user-asset`, |
| 211 | {}, |
| 212 | { |
| 213 | headers: this.authHeaders(), |
| 214 | timeout: 30000, |
| 215 | } |
| 216 | ); |
| 217 | if (data?.code !== 200) throw new Error(`查询失败: ${data?.msg || JSON.stringify(data)}`); |
| 218 | const info = data.data?.member_info || {}; |
| 219 | const phone = info.leag_tel || data.data?.mobile || this.mobile; |
| 220 | const card = info.card_no || info.leag_no || "未知会员"; |
| 221 | const coin = assetValue(info, ["coin_bal"], ["代币"]); |
| 222 | const point = assetValue(info, ["score"], ["积分", "娃娃积分"]); |
| 223 | const ticket = assetValue(info, ["tick_bal", "new_ticket"], ["奖票", "特殊奖票"]); |
| 224 | const gateTicket = assetValue(info, ["ticket_amount"], ["门票"]); |
| 225 | this.summary.member = `${card} ${maskPhone(phone)}`; |
| 226 | this.summary.assets = `代币=${coin} 积分=${point} 彩票=${ticket} 门票=${gateTicket}`; |
| 227 | this.log(`会员: ${this.summary.member} ${this.summary.assets}`); |
| 228 | } |
| 229 | |
| 230 | async sign() { |
| 231 | const actId = await this.detectSignActId(); |
no test coverage detected