mockQrCheckin.js 4.32 KB
/*
 * @Date: 2026-05-19 14:40:21
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2026-05-19 17:57:08
 * @FilePath: /lls_program/src/utils/mockQrCheckin.js
 * @Description: 文件描述
 */
const mockScanCheckinPoints = [
  {
    id: 'point-01',
    code: 'W2D01',
    title: '泰康之家经营管理有限公司上海分公司',
    description: '在点位现场扫码,完成拍照打卡并推荐好物。',
    status: '未打卡',
    cover:
      'https://cdn.ipadbiz.cn/lls_prog/images/check_detail_img.png?imageMogr2/strip/quality/60',
    discountTitle: '打卡点专属优惠',
    discountContent:
      '<p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">朋友圈发圈即可获得申园种子纸,10个赞即送扇子,30个赞送冰箱贴。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">到店或线上购买产品可送优惠券(满100减20,满200减50)。</p>',
  },
  {
    id: 'point-02',
    code: 'W2D02',
    title: '泰康之家申园体验区',
    description: '完成现场扫码后可查看展区亮点,并领取到店权益。',
    status: '未打卡',
    cover:
      'https://cdn.ipadbiz.cn/lls_prog/images/check_detail_img.png?imageMogr2/strip/quality/60',
    discountTitle: '打卡点专属优惠',
    discountContent:
      '<p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">完成打卡后可领取体验区纪念贴纸 1 份。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">现场咨询指定产品可额外领取优惠券包。</p>',
  },
  {
    id: 'point-03',
    code: 'W2D03',
    title: '泰康之家乐龄生活馆',
    description: '扫码进入生活馆详情页,完成互动任务后即可点亮本点位。',
    status: '已打卡',
    cover:
      'https://cdn.ipadbiz.cn/lls_prog/images/check_detail_img.png?imageMogr2/strip/quality/60',
    discountTitle: '打卡点专属优惠',
    discountContent:
      '<p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">现场互动完成后可领取康养手册 1 份。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p><p style="margin: 0 0 20rpx; line-height: 1.8; color: #4b5563; font-size: 30rpx;">指定商品现场下单可享专属立减优惠。</p>',
  },
]

/**
 * 获取扫码打卡点列表 mock 数据
 * @param {string} activityId
 * @returns {Array}
 */
export const getMockScanCheckinPoints = activityId => {
  return mockScanCheckinPoints.map(item => ({
    ...item,
    activityId: activityId || '',
  }))
}

/**
 * 获取扫码打卡点详情 mock 数据
 * @param {string} detailId
 * @returns {Object|null}
 */
export const getMockScanCheckinDetail = detailId => {
  const detail = mockScanCheckinPoints.find(item => item.id === detailId)

  if (!detail) {
    return null
  }

  return {
    ...detail,
    guideText: detail.description,
  }
}