Files
hhrs/common/http.api.js
T
jacobxu666 745f4bf5f1 fix: 修复登录失败被当成功、列表假分页与首页裁切等隐患
1. 登录/验证码改判业务码 data.code(外层 errcode 恒为0),失败不再写入 phone 造成假登录态,并透出后端真实原因;倒计时改为发送成功后才启动;token 按 accessToken 兜底读取,不再写入 undefined

2. 权益包三 Tab 由 pageSize=1000 的假分页改为真实分页 + 页面级触底加载,各 Tab 独立游标与请求序号,合并去重兜底;中奖名单页码改为按期维护,修复切期后重复追加

3. 首页去掉整页 overflow:hidden,小屏不再裁切活动指南卡片;接口表去重并清理 7 个废弃端点;基址/客服电话集中到 common/config.js;删除权益详情不可达的假成功分支
2026-09-14 23:38:13 +08:00

76 lines
2.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// xuchao: 怀化人社 H5 接口清单,与 docs/hhrs-api-doc.md 一一对应
// 基址由 common/http.interceptor.js 统一注入(common/config.js.baseUrl)
// 登录 / 云闪付入口
const LoginUrl = 'open-api/pingXiang/login'
const SendVerifyCodeUrl = 'open-api/pingXiang/sendLoginVerifyCode'
const TokenDecodeUrl = 'open-api/hhService/tokenDecode'
// 门店(文旅场馆 typeId=1 / 商户折扣 typeId=2)
const StoreListUrl = 'mp-api/hhrsStore/list'
const StoreDetailUrl = 'mp-api/hhrsStore/detail'
// 权益包
const RightsListUrl = 'mp-api/hhrsRights/list'
const RightsDetailUrl = 'mp-api/hhrsRights/detail'
const EligibilityUrl = 'mp-api/hhrsRights/eligibility'
const AppointmentListUrl = 'mp-api/hhrsRights/appointment/list'
const CheckListUrl = 'mp-api/hhrsRights/check/list'
// 实名人脸认证(阿里云)
const InitFaceVerifyUrl = 'open-api/aliyun/face/initFaceVerify'
const DescribeFaceVerifyUrl = 'open-api/aliyun/face/describeFaceVerify'
// 中奖公示
const WinnerDatesUrl = 'mp-api/hhrsWinner/dates'
const WinnerListUrl = 'mp-api/hhrsWinner/list'
// 预约下单(智慧游卡包)
const AppointUrl = 'zhy-api/cardBag/appoint'
// 此处第二个参数vm,就是我们在页面使用的this
const install = (Vue, vm) => {
// 登录与凭证
const checkerLogin = (params = {}) => vm.$u.post(LoginUrl, params)
const sendLoginVerifyCode = (params = {}) => vm.$u.post(SendVerifyCodeUrl, params)
// xuchao: 云闪付入口 token 解码
const tokenDecode = (params = {}) => vm.$u.post(TokenDecodeUrl, params)
// 门店列表/详情
const getStoreList = (params = {}) => vm.$u.post(StoreListUrl, params)
const getStoreDetail = (params = {}) => vm.$u.post(StoreDetailUrl, params)
// 权益包
const getRightsList = (params = {}) => vm.$u.post(RightsListUrl, params)
const getRightsDetail = (params = {}) => vm.$u.post(RightsDetailUrl, params)
// xuchao: 注意 identityNo 会触发后端“被动认证”回写,仅在认证流程中传
const getEligibility = (params = {}) => vm.$u.post(EligibilityUrl, params)
const getAppointmentList = (params = {}) => vm.$u.post(AppointmentListUrl, params)
const getCheckList = (params = {}) => vm.$u.post(CheckListUrl, params)
const doAppoint = (params = {}) => vm.$u.post(AppointUrl, params)
// 人脸核身
const initFaceVerify = (params = {}) => vm.$u.post(InitFaceVerifyUrl, params)
const describeFaceVerify = (params = {}) => vm.$u.post(DescribeFaceVerifyUrl, params)
// 中奖名单
const getWinnerDates = (params = {}) => vm.$u.get(WinnerDatesUrl, params)
const getWinnerList = (params = {}) => vm.$u.post(WinnerListUrl, params)
vm.$u.api = {
checkerLogin,
sendLoginVerifyCode,
tokenDecode,
getStoreList,
getStoreDetail,
getRightsList,
getRightsDetail,
getEligibility,
getAppointmentList,
getCheckList,
doAppoint,
initFaceVerify,
describeFaceVerify,
getWinnerDates,
getWinnerList
}
}
export default {
install
}