import https from './interface' /* handle 默认是false; true 为自己处理请求错误(401、404、405),不交给全局处理 */ import { encrypt } from './../jsencrypt' export default { // 登录 login (data) { return https({ url: `/sys/app/login`, method: 'post', data: { ...data, password: encrypt(data.password) } }) }, // 扫码核销 updateVerification (data) { return https({ url: `/api/userCollect/updateVerification`, method: 'put', data }) }, // 获取用户信息 getInfo (data) { return https({ url: `/sys/app/getInfo`, method: 'GET', data }) }, // 核销记录 verificationList (data) { return https({ url: `/api/userCollect/verificationList`, method: 'GET', data }) }, // 核销详情 verificationDetail (data) { return https({ url: `/api/userCollect/verificationDetail/${data.id}`, method: 'GET' }) }, // 扫码/手动核销详情 handVerificationDetail (data) { return https({ url: `/api/userCollect/handVerificationDetail`, method: 'GET', data }) }, // 获取待核销单详情 getVerificationDetail (data) { return https({ url: `/api/userCollect/getVerificationDetail`, method: 'GET', data }) }, // 小程序核销 toVerification (data) { data.verificationType = '4'; return https({ url: `/api/userCollect/toVerification`, method: 'put', data }) }, // 手持机核销 handheldVerification (data) { data.verificationType = '6'; return https({ // url: `/api/device/handheld/toVerification`, url: '/api/userCollect/toVerification', method: 'put', data }) }, // 游客画像 getTouristPortrait () { return https({ url: `/api/userCollect/getTouristPortrait`, method: 'GET' }) }, // 运营分析 getOperationalAnalysis () { return https({ url: `/api/userCollect/getOperationalAnalysis`, method: 'GET' }) }, // 实时监控 getRealTimeMonitoring () { return https({ url: `/api/userCollect/getRealTimeMonitoring`, method: 'GET' }) }, getHomeMsg(){ return https({ url: '/manageapi/shopHome', method: 'GET' }) } }