| | |
| | | } |
| | | |
| | | export const getFakeSign = async (param, callback) => { |
| | | await request.get('/fake/sign').then((res) => { |
| | | await request.get('/fake/sign/get').then((res) => { |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | if (callback) { |
| | |
| | | console.error(error.message); |
| | | }) |
| | | } |
| | | |
| | | export const setFakeSign = async (param, callback) => { |
| | | await request.post('/fake/sign/set', { |
| | | sign: param, |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | | }).then((res) => { |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | if (data) { |
| | | notify.success(msg); |
| | | } |
| | | if (callback) { |
| | | callback(data) |
| | | } |
| | | } else { |
| | | notify.error(msg); |
| | | } |
| | | }).catch((error) => { |
| | | notify.error(error.message); |
| | | console.error(error.message); |
| | | }) |
| | | } |