Commit 3ef1dfed authored by 王炽's avatar 王炽

Merge branch 'jifenquanyi_gaiban_20250813'

parents 7b9a6505 0e6ede50
No preview for this file type
......@@ -8,4 +8,22 @@ const {
* @returns
*/
export const fetchIntegralJSON = () => api.get('/c/front/content',{type:'integral'});
\ No newline at end of file
export const fetchIntegralJSON = () => api.get('/c/front/content',{type:'integral'});
/**
* 获取生日礼接口
* @returns
*/
export const fetchBirthdayGiftJSON = () => api.get('/c/equity/birthdayGift/index');
/**
* 领取生日礼
* @returns
*/
export const fetchBatchReceiveJSON = () => api.post('/c/equity/birthdayGift/batchReceive');
/**
* 获取活动状态--溯源游
* @returns
*/
export const fetchActivityStateJSON = () => api.get('/c/third/activity/state');
\ No newline at end of file
import requestModule from './request.js';
const {
api
} = requestModule;
/**
* 获取月礼包首页数据
* @param {Object} params
* @param {string} params.level - 用户等级 (diamond, starshine, starlight, gold, platinum)
* @returns {Promise<Object>}
data:{
batchCoupon:[
{
equityCouponInfoId:1,//权益优惠券信息ID
couponId:1,//优惠券ID
couponName:1,//优惠券名称
equityIcon:1,//权益图片
gradeAllow:true,//等级是否允许 true允许
startTime:1,//起始时间 2024-10-23 00:00:00
endTime:1,//结束时间 2024-10-23 00:00:00
stockUsage:1,//已使用库存数量
stockLimit:1,//可使用库存总数量
received:true,//是否已领取
stockBatchList:[
{
stockBatchId:1,//批次ID
startTime:1,//生效时间 例如:2024-10-28 23:00:00
status:1,//状态 0-待开始 1-抢券中 2-已结束
}
]
}
],
equityCouponList:[
{
equityCouponInfoId:1,//权益优惠券信息ID
couponId:1,//优惠券ID
couponName:1,//优惠券名称
couponSystem:1,//优惠券系统 : BMP: 业务中台系统, SF : 顺丰 , CRM : CRM系统
equityIcon:1,//权益图片
receiveStatus:1,//优惠券状态 0-未领取 1-已领取
receiveTime:1,//领取时间
}
],
next2810Countdown:0,//2810活动倒计时
}
*/
export const monthlyGiftIndex = () => api.get('/c/equity/monthlyGift/index')
/**
* 月月礼-领取精选好券
* @param {Object} data
* @param {string} data.stockBatchId - 批次ID
* @param {string} data.equityCouponInfoId - 权益优惠券信息ID
* @returns {Promise<Object>}
* {
* "success": true,
* "message": "领取成功",
* "data": {
* "couponId": "123",
* "couponName": "精选好券",
* "resourceId": "resource_123"
* “receiveResult”:0,//领取结果 0-失败 1-成功 F
* }
* }
*/
export const monthlyGiftDrawOne = (data) => api.post('/c/equity/monthlyGift/drawOne', {
stockBatchId: data.stockBatchId,
equityCouponInfoId: data.equityCouponInfoId
})
/**
* 月月礼-领取限时1分购
* @returns {Promise<Object>}
* {
* "success": true,
* "message": "领取成功",
* "data": {
* "status": 1,
* "receivedNormalCouponList": [
* {
* "couponId": "123",
* "equityCouponInfoId": "456",
* "couponName": "限时1分购券",
* "equityIcon": "icon_url",
* "resourceId": "resource_789"
* }
* ]
* }
* }
*/
export const monthlyGiftDrawAll = (data) => api.post('/c/equity/monthlyGift/drawAll', {
})
......@@ -15,11 +15,11 @@ const {
// request.js
// 通常可以吧 baseUrl 单独放在一个 js 文件了
// const baseUrl = "http://172.16.224.178:7777/pmall";
// const baseUrl = "http://172.16.230.108:7777/pmall";
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
let baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// let baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
const request = (options = {}) => {
// 在这里可以对请求头进行一些设置
......@@ -44,10 +44,10 @@ const request = (options = {}) => {
})
.then((data) => {
if (data.statusCode !== HTTP_STATUS.SUCCESS) {
uni.showToast({
title: data.errMsg,
icon: 'none'
});
// uni.showToast({
// title: data.errMsg,
// icon: 'none'
// });
// 返回完整的响应数据,包括状态码和错误信息
reject({
statusCode: data.statusCode,
......@@ -58,10 +58,10 @@ const request = (options = {}) => {
globalStore.setIsShowLoading(false);
}
else if (!data.data?.ok) {
uni.showToast({
title: data.data?.message,
icon: 'none'
});
// uni.showToast({
// title: data.data?.message,
// icon: 'none'
// });
// 返回业务逻辑错误的数据
reject({
...data.data,
......
# MonthGift 月礼包权益组件
## 组件概述
`MonthGift` 是一个 Vue 3 组件,用于展示不同用户等级的月礼包权益,包括精选好券和限时1分购功能。组件根据传入的用户等级参数动态显示对应的权益页面。
## 功能特性
### 1. 精选好券 (Selected Good Coupons)
- **领取条件**: 每月可领取1次,黄金及以上等级都可领取
- **更新时间**: 每月28日10点更新
- **按钮状态**:
- 初始状态: "立即领取"
- 领取成功后: "去使用" (跳转到星妈优选优惠券页面)
- 下月更新后: 重新变为 "立即领取"
- **等级切换**: 若用户在高等级已领取权益,切换其他等级时均变为 "去使用"
### 2. 限时1分购 (Limited-time 1-cent Purchase)
- **活动时间**: 每月28号限量发放
- **等级要求**: 需钻石以上等级
- **时间规则**:
- 28号10点之前: 按钮显示 "待开启",点击提示 "活动暂未开启"
- 28号10点-24点:
- 钻石以下等级: 锁住状态,按钮显示 "去升级",点击跳转升级攻略页面
- 钻石以上等级: 按钮显示 "立即领取",一键完成领取
- **会员中心对接**: 和会员中心对接券发放相关
### 3. 时间段切换功能 ⭐
- **4个时间段**: 10:00、12:00、14:00、16:00
- **动态背景**: 切换时间段时,对应的背景图片 (SEL1-SEL4) 会同步切换
- **状态显示**: 每个时间段显示对应的状态文本和状态图片
- **交互反馈**: 点击时间段可切换,选中的时间段会高亮显示
- **全等级支持**: 所有等级(diamond、starshine、starlight、gold、platinum)都支持时间段切换
- **背景同步**: 只有当前选中的时间段背景图片会显示,其他时间段背景图片会隐藏
- **数据统一**: 时间段状态与 `stockBatchList` 参数完全统一,包含:
- `stockBatchId`: 库存批次ID
- `startTime`: 开始时间
- `endTime`: 结束时间
- `stockUsage`: 已使用库存
- `stockLimit`: 库存限制
- `received`: 是否已领取
- `status`: 状态(locked/unlocked/partial/purchased)
## API 接口
组件使用 `monthGift.js` 中定义的接口函数,通过 `request.js` 模块进行 HTTP 请求。
### 1. monthlyGiftIndex - 获取月礼包首页数据
```javascript
// 引入
import { monthlyGiftIndex } from '../../api/monthGift.js'
// 调用
const result = await monthlyGiftIndex({ level: 'diamond' })
// 响应
{
"success": true,
"data": {
"batchCoupon": [
{
"equityCouponInfoId": 1, // 权益优惠券信息ID
"couponId": 1, // 优惠券ID
"couponName": "限时1分购券", // 优惠券名称
"equityIcon": "icon_url", // 权益图片
"gradeAllow": true, // 等级是否允许 true允许
"startTime": "2024-10-23 00:00:00", // 起始时间
"endTime": "2024-10-23 23:59:59", // 结束时间
"stockUsage": 50, // 已使用库存数量
"stockLimit": 100, // 可使用库存总数量
"received": false, // 是否已领取
"stockBatchList": [
{
"stockBatchId": 1, // 批次ID
"startTime": "2024-10-28 10:00:00", // 生效时间
"status": 1 // 状态 0-待开始 1-抢券中 2-已结束
}
]
}
],
"equityCouponList": [
{
"equityCouponInfoId": 1, // 权益优惠券信息ID
"couponId": 1, // 优惠券ID
"couponName": "精选好券", // 优惠券名称
"couponSystem": "BMP", // 优惠券系统
"equityIcon": "icon_url", // 权益图片
"receiveStatus": 0, // 优惠券状态 0-未领取 1-已领取
"receiveTime": null // 领取时间
}
]
}
}
```
### 2. monthlyGiftDrawOne - 领取精选好券
```javascript
// 引入
import { monthlyGiftDrawOne } from '../../api/monthGift.js'
// 调用
const result = await monthlyGiftDrawOne({
stockBatchId: 'batch_123',
equityCouponInfoId: 'coupon_123'
})
// 响应
{
"success": true,
"message": "领取成功",
"data": {
"couponId": "123",
"couponName": "精选好券",
"resourceId": "resource_123",
"receiveResult": 1 // 领取结果 0-失败 1-成功
}
}
```
### 3. monthlyGiftDrawAll - 领取限时1分购
```javascript
// 引入
import { monthlyGiftDrawAll } from '../../api/monthGift.js'
// 调用
const result = await monthlyGiftDrawAll()
// 响应
{
"success": true,
"message": "领取成功",
"data": {
"status": 1,
"receivedNormalCouponList": [
{
"couponId": "123",
"equityCouponInfoId": "456",
"couponName": "限时1分购券",
"equityIcon": "icon_url",
"resourceId": "resource_789"
}
]
}
}
```
### 4. 数据结构说明
时间段状态与 `stockBatchList` 完全统一,根据新的接口返回结构:
```javascript
// 组件状态结构
state: {
// 精选好券状态 - 根据 equityCouponList 动态生成
couponStatus: {
diamond: 'unlocked', // 'locked', 'unlocked', 'used'
starshine: 'unlocked',
starlight: 'unlocked',
gold: 'unlocked',
platinum: 'unlocked'
},
// 限时1分购状态 - 根据 batchCoupon 动态生成
buyStatus: {
diamond: 'locked', // 'locked', 'unlocked', 'purchased'
starshine: 'locked',
starlight: 'locked',
gold: 'locked',
platinum: 'locked'
},
// 时间段状态 - 根据 batchCoupon.stockBatchList 动态生成
timeSlots: [
{
time: '10:00', // 时间段显示
status: 'unlocked', // 状态:locked/unlocked/ended/purchased
stockBatchId: 'batch_1', // 库存批次ID
startTime: '2024-10-28 10:00:00', // 生效时间
endTime: '2024-10-28 11:59:59', // 结束时间
stockUsage: 50, // 已使用库存
stockLimit: 100, // 库存限制
received: false // 是否已领取
}
// ... 其他3个时间段
],
// 原始数据
batchCoupon: null, // batchCoupon 数据
equityCouponList: [] // equityCouponList 数据
}
// 状态映射关系
// stockBatchList.status -> 时间段status
// 0 (待开始) -> 'locked' // 锁定状态
// 1 (抢券中) -> 'unlocked' // 可领取
// 2 (已结束) -> 'ended' // 结束状态
```
## 使用方法
### 基础使用
```vue
<template>
<MonthGift current-level="diamond" />
</template>
<script setup>
import MonthGift from '@/components/pointRightsCom/monthGift.vue'
</script>
```
### 动态切换等级
```vue
<template>
<MonthGift :current-level="currentUserLevel" />
</template>
<script setup>
import { ref } from 'vue'
import MonthGift from '@/components/pointRightsCom/monthGift.vue'
const currentUserLevel = ref('diamond')
const setUserLevel = (level) => {
currentUserLevel.value = level
}
</script>
```
### 接口引入
组件内部已经引入了所需的接口函数:
```javascript
import { monthlyGiftIndex, monthlyGiftDrawOne, monthlyGiftDrawAll } from '../../api/monthGift.js'
```
这些接口函数通过 `request.js` 模块进行 HTTP 请求,确保网络请求的一致性和可维护性。
## 组件状态
### 精选好券状态
- `locked`: 锁定状态(等级不够)
- `unlocked`: 可领取状态
- `used`: 已使用状态
### 限时1分购状态
- `locked`: 锁定状态
- `unlocked`: 可领取状态
- `purchased`: 已领取状态
### 时间段状态
- `locked`: 锁定状态
- `unlocked`: 解锁状态
- `active`: 进行中状态
## 样式类名
### 精选好券按钮
- `coupon-btn-unlocked`: 可领取状态
- `coupon-btn-used`: 已使用状态
- `coupon-btn-locked`: 锁定状态
### 限时1分购按钮
- `buy-btn-unlocked`: 可领取状态
- `buy-btn-purchased`: 已领取状态
- `buy-btn-disabled`: 禁用状态
- `buy-btn-upgrade`: 升级状态
### 时间段
- `time-slot-active`: 当前选中时间段
- `time-slot-inactive`: 未选中时间段
## 业务逻辑
### 时间判断逻辑
```javascript
// 每月28号10点-24点
const isActivityTime = computed(() => {
const now = new Date()
const currentDate = now.getDate()
const currentHour = now.getHours()
return currentDate === 28 && currentHour >= 10 && currentHour < 24
})
// 每月28号10点之前
const isBeforeActivityTime = computed(() => {
const now = new Date()
const currentDate = now.getDate()
const currentHour = now.getHours()
return currentDate === 28 && currentHour < 10
})
```
### 等级权限判断
```javascript
// 钻石以上等级可以访问限时1分购
const canAccessBuy = computed(() => {
const levelOrder = ['platinum', 'gold', 'starlight', 'starshine', 'diamond']
const userLevelIndex = levelOrder.indexOf(props.currentLevel)
const diamondIndex = levelOrder.indexOf('diamond')
return userLevelIndex <= diamondIndex
})
```
## 注意事项
1. **图片资源**: 组件依赖 `monthGiftImages.js` 文件中的图片路径配置
2. **API 接口**: 需要后端提供对应的接口支持
3. **用户数据**: 用户等级和权益状态需要从后端获取
4. **时间同步**: 活动时间判断基于客户端时间,建议与服务器时间同步
5. **状态持久化**: 组件状态在页面刷新后会重置,需要与后端数据同步
## 测试功能
`testPage` 中提供了完整的测试功能:
- 用户等级切换
- 测试时间设置
- 状态重置
- 实时预览组件效果
## 更新日志
### v1.0.0
- 实现基础组件结构
- 添加精选好券功能
- 添加限时1分购功能
- 实现时间段切换功能
- 集成 API 接口调用
- 添加完整的业务逻辑
- 实现响应式状态管理
This diff is collapsed.
const version = 'v1'
// babyClass 组件图片资源常量
export const BABY_CLASS_IMAGES = {
// Diamond 等级相关图片
DIAMOND: {
BG: `pointRights/babyClass/${version}/DiamondBg.png`,
TITLE: `pointRights/babyClass/${version}/DiamondTitle.png`,
IPS1: `pointRights/babyClass/${version}/DiamondIps1.png`,
IPS2: `pointRights/babyClass/${version}/DiamondIps2.png`,
IPS3: `pointRights/babyClass/${version}/DiamondIps3.png`,
IPS4: `pointRights/babyClass/${version}/DiamondIps4.png`,
BTN: `pointRights/babyClass/${version}/DiamondBtn.png`,
DESC: `pointRights/babyClass/${version}/DiamondDesc.png`
},
// Starshine 等级相关图片
STARSHINE: {
BG: `pointRights/babyClass/${version}/StarshineBg.png`,
TITLE: `pointRights/babyClass/${version}/StarshineTitle.png`,
IPS1: `pointRights/babyClass/${version}/StarshineIps1.png`,
IPS2: `pointRights/babyClass/${version}/StarshineIps2.png`,
IPS3: `pointRights/babyClass/${version}/StarshineIps3.png`,
IPS4: `pointRights/babyClass/${version}/StarshineIps4.png`,
BTN: `pointRights/babyClass/${version}/StarshineBtn3.png`,
DESC: `pointRights/babyClass/${version}/StarshineDesc.png`
},
// Starlight 等级相关图片
STARLIGHT: {
BG: `pointRights/babyClass/${version}/StarlightBg.png`,
TITLE: `pointRights/babyClass/${version}/StarlightTitle.png`,
IPS1: `pointRights/babyClass/${version}/StarlightIps1.png`,
IPS2: `pointRights/babyClass/${version}/StarlightIps2.png`,
IPS3: `pointRights/babyClass/${version}/StarlightIps3.png`,
IPS4: `pointRights/babyClass/${version}/StarlightIps4.png`,
BTN: `pointRights/babyClass/${version}/StarlightBtn.png`,
DESC: `pointRights/babyClass/${version}/StarlightDesc.png`
},
// Gold 等级相关图片
GOLD: {
BG: `pointRights/babyClass/${version}/GoldIpsBg.png`,
TITLE: `pointRights/babyClass/${version}/GoldIpsTitle.png`,
IPS1: `pointRights/babyClass/${version}/GoldIps1.png`,
IPS2: `pointRights/babyClass/${version}/GoldIps2.png`,
IPS3: `pointRights/babyClass/${version}/GoldIps3.png`,
IPS4: `pointRights/babyClass/${version}/GoldIps4.png`,
BTN: `pointRights/babyClass/${version}/GoldBtn.png`,
DESC: `pointRights/babyClass/${version}/GoldDesc.png`
},
// Platinum 等级相关图片
PLATINUM: {
BG: `pointRights/babyClass/${version}/PlatinumBg.png`,
TITLE: `pointRights/babyClass/${version}/PlatinumTitle.png`,
IPS1: `pointRights/babyClass/${version}/PlatinumIps1.png`,
IPS2: `pointRights/babyClass/${version}/PlatinumIps2.png`,
IPS3: `pointRights/babyClass/${version}/PlatinumIps3.png`,
IPS4: `pointRights/babyClass/${version}/PlatinumIps4.png`,
BTN: `pointRights/babyClass/${version}/PlatinumBtn.png`,
DESC: `pointRights/babyClass/${version}/PlatinumDesc2.png`
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
const version = 'v1'
// yearGift 组件图片资源常量
export const YEAR_GIFT_IMAGES = {
// Diamond 等级相关图片
DIAMOND: {
BG3: `pointRights/YearGift/${version}/diamondBg3.png`,
BG2: `pointRights/YearGift/${version}/diamondBg2.png`,
BG1: `pointRights/YearGift/${version}/diamondBg1.png`,
ONE: {
BG: `pointRights/YearGift/${version}/diamondOneBg.png`,
AWARD: `pointRights/YearGift/${version}/diamondOneAward.png`,
ADD: `pointRights/YearGift/${version}/diamondOneAdd.png`,
DESC: `pointRights/YearGift/${version}/diamondOneDesc.png`
},
THREE: {
BG: `pointRights/YearGift/${version}/diamondThreeBg.png`,
AWARD: `pointRights/YearGift/${version}/diamondThreeAward2.png`,
BTN: `pointRights/YearGift/${version}/diamondThreeBtn.png`
}
},
// Starshine 等级相关图片
STARSHINE: {
BG3: `pointRights/YearGift/${version}/starshineBg3.png`,
BG2: `pointRights/YearGift/${version}/starshineBg2.png`,
BG1: `pointRights/YearGift/${version}/starshineBg1.png`,
ONE: {
BG: `pointRights/YearGift/${version}/starshineOneBg.png`,
AWARD: `pointRights/YearGift/${version}/starshineOneAward.png`,
ADD: `pointRights/YearGift/${version}/starshineOneAdd.png`,
DESC: `pointRights/YearGift/${version}/starshineOneDesc.png`
},
THREE: {
BG: `pointRights/YearGift/${version}/starshineThreeBg.png`,
AWARD: `pointRights/YearGift/${version}/starshineThreeAward2.png`,
BTN: `pointRights/YearGift/${version}/starshineThreeBtn.png`
}
},
// Starlight 等级相关图片
STARLIGHT: {
BG3: `pointRights/YearGift/${version}/starlightBg3.png`,
BG2: `pointRights/YearGift/${version}/starlightBg2.png`,
BG1: `pointRights/YearGift/${version}/starlightBg1.png`,
ONE: {
BG: `pointRights/YearGift/${version}/starlightOneBg.png`,
AWARD: `pointRights/YearGift/${version}/starlightOneAward.png`,
ADD: `pointRights/YearGift/${version}/starlightOneAdd.png`,
DESC: `pointRights/YearGift/${version}/starlightOneDesc.png`
},
THREE: {
BG: `pointRights/YearGift/${version}/starlightThreeBg.png`,
AWARD: `pointRights/YearGift/${version}/starlightThreeAward2.png`,
BTN: `pointRights/YearGift/${version}/starlightThreeBtn.png`
}
},
// Gold 等级相关图片
GOLD: {
BG3: `pointRights/YearGift/${version}/goldBg3.png`,
BG2: `pointRights/YearGift/${version}/goldBg2.png`,
BG1: `pointRights/YearGift/${version}/goldBg1.png`,
ONE: {
BG: `pointRights/YearGift/${version}/goldOneBg.png`,
AWARD: `pointRights/YearGift/${version}/goldOneAward.png`,
ADD: `pointRights/YearGift/${version}/goldOneAdd.png`,
DESC: `pointRights/YearGift/${version}/goldOneDesc.png`
},
THREE: {
BG: `pointRights/YearGift/${version}/goldThreeBg.png`,
AWARD: `pointRights/YearGift/${version}/goldThreeAward3.png`,
BTN: `pointRights/YearGift/${version}/goldThreeBtn.png`
},
LOCKTIP: `pointRights/YearGift/${version}/goldLockTip.png`
},
// Platinum 等级相关图片
PLATINUM: {
BG3: `pointRights/YearGift/${version}/platinumBg3.png`,
BG2: `pointRights/YearGift/${version}/platinumBg2.png`,
BG1: `pointRights/YearGift/${version}/platinumBg1.png`,
LOCKTIP: `pointRights/YearGift/${version}/platinumLockTip.png`,
ONE: {
BG: `pointRights/YearGift/${version}/platinumOneBg.png`,
AWARD: `pointRights/YearGift/${version}/platinumOneAward.png`,
ADD: `pointRights/YearGift/${version}/platinumOneAdd.png`,
DESC: `pointRights/YearGift/${version}/platinumOneDesc.png`
},
THREE: {
BG: `pointRights/YearGift/${version}/platinumThreeBg.png`,
AWARD: `pointRights/YearGift/${version}/platinumThreeAward2.png`,
BTN: `pointRights/YearGift/${version}/platinumThreeBtn.png`
}
}
}
<template>
<view class="popup-tip">
<view class="popup-tip-content">
<view class="content-title">
精选好券领取成功
</view>
<!-- <view :class="`content-box sty-${type}`"> -->
<view class="content-box" :style="{ backgroundImage: `url('${bgImageUrl}')` }">
<view v-if="isUnlock" class="box-1">
<!-- :src="$baseUrl + `integral/${tupianBanben}/shengriPopup/${type}-1.png`" -->
<!-- :src="`/static/jingxuan/${type}-1.png`" -->
<image :src="$baseUrl + `integral/${tupianBanben}/jingxuan/${type}-1.png`" ></image>
</view>
<view class="box-2">
<image :src="$baseUrl + `integral/${tupianBanben}/jingxuan/${type}-2.png`" ></image>
</view>
<view class="box-3" @click="goUse">
<image :src="$baseUrl + `integral/${tupianBanben}/jingxuan/${type}-3.png`" ></image>
</view>
</view>
<view class="content-2" @click="closeBtn" :style="{backgroundImage: `url(${$baseUrl + `integral/${tupianBanben}/shengriPopup/close.png`})`}">
</view>
</view>
</view>
</template>
<script setup>
import {
ref,
onMounted,
computed,
defineEmits,
onUnmounted,
getCurrentInstance
} from 'vue'
import { useUserStore } from "@/stores/user";
import { jump, JumpType } from '@/utils/index.js'
import md from '../../md';
const { proxy } = getCurrentInstance();
const $baseUrl = proxy.$baseUrl;
// 接受父组件参数
const props = defineProps({
type: {
type: String,
default: '5', // 1 黄金、2 铂金、3 钻石、4 星光、5 星耀
},
isUnlock: {
type: Boolean,
default: true, // 是否解锁 商品兑换券
}
})
const tupianBanben = ref('1016')
const bgImageUrl = computed(() => {
// 添加$baseUrl存在性检查
const base = $baseUrl || '';
return `${base}integral/${tupianBanben.value}/jingxuan/bg-${props.type}-${props.type}.png`
})
// 用户信息
const userStore = useUserStore();
// 回调函数
const emit = defineEmits(['statusChange', 'close'])
// 跳转小程序配置
const configuration ={
// url: "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot",
url: "subPackages/shopMainProcess/coupons/couponList",
type: 2,
extra: {
appId: "wx4205ec55b793245e",
envVersion: "release"
}
}
// 前往使用按钮
const goUse = () => {
console.log("🚀 ~ goUse:")
// md.sensorLogTake({
// xcxClick: "积分服务页-首屏页面点击",
// pageName: "积分服务页-首屏",
// buttonName: `${item.name}`,
// });
const {url, type, extra} = configuration
jump({
type: type,
url: url,
extra:extra
})
emit('close')
}
// 关闭按钮
const closeBtn = () => {
emit('close')
}
onMounted(() => {
console.log('onMounted')
wx.setPageStyle({
style: {
overflow: 'hidden'
}
})
})
onUnmounted(() => {
// 弹窗关闭时恢复背景滚动
wx.setPageStyle({
style: {
overflow: 'auto'
}
})
})
</script>
<style lang="scss" scoped>
.popup-tip {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 999;
background: rgba(0, 0, 0, 0.5);
&-content {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
overflow: hidden;
.content-title{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 50rpx;
font-weight: 700;
color: #fff8e8;
}
.content-box {
margin-top: 20rpx;
width: 640rpx;
padding: 55rpx 22rpx 40rpx 25rpx;
overflow: hidden;
background-size: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 24rpx;
overflow: hidden;
.box-1{
width: 592rpx;
height: 206rpx;
margin-bottom: 30rpx;
image{
width: 100%;
height: 100%;
}
}
.box-2{
width: 591rpx;
height: 332rpx;
image{
width: 100%;
height: 100%;
}
}
.box-3{
margin-top: 50rpx;
width: 442rpx;
height: 85rpx;
image{
width: 100%;
height: 100%;
}
}
}
// // 黄金
// .sty-1 {
// background-image: url('@/static/jingxuan/bg-1.png');
// }
// // 铂金
// .sty-2 {
// background-image: url('@/static/jingxuan/bg-2.png');
// }
// // 钻石
// .sty-3 {
// background-image: url('@/static/jingxuan/bg-3.png');
// }
// // 星光
// .sty-4 {
// background-image: url('@/static/jingxuan/bg-4.png');
// }
// // 星耀
// .sty-5 {
// background-image: url('@/static/jingxuan/bg-5.png');
// }
.content-2 {
margin-top: 65rpx;
width: 50rpx;
height: 50rpx;
// background-image: url('@/static/shengriPopup/close.png');
background-size: 100%;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="popup-tip">
<view class="popup-tip-content">
<view class="content-title">
基础生日礼领取成功
</view>
<view class="content-box" :style="{ backgroundImage: `url('${bgImageUrl}')` }">
<view class="box-2">
<image :src="$baseUrl + `integral/${tupianBanben}/shengriPopup/${type}-1.png`" ></image>
<image :src="$baseUrl + `integral/${tupianBanben}/shengriPopup/${type}-2.png`" ></image>
</view>
<view class="box-3" @click="goUse">
<image :src="$baseUrl + `integral/${tupianBanben}/jingxuan/${type}-3.png`" ></image>
</view>
</view>
<view class="content-2" @click="closeBtn" :style="{backgroundImage: `url(${$baseUrl + `integral/${tupianBanben}/shengriPopup/close.png`})`}">
</view>
</view>
</view>
</template>
<script setup>
import {
ref,
onMounted,
computed,
defineEmits,
onUnmounted,
getCurrentInstance
} from 'vue'
import { useUserStore } from "@/stores/user";
import { jump, JumpType } from '@/utils/index.js'
import md from '../../md';
const { proxy } = getCurrentInstance();
const $baseUrl = proxy.$baseUrl;
// 接受父组件参数
const props = defineProps({
type: {
type: String,
default: '3', // 3 钻石、4 星光、5 星耀
}
})
// 用户信息
const userStore = useUserStore();
const tupianBanben = ref('1016')
// 回调函数
const emit = defineEmits(['statusChange', 'close'])
const bgImageUrl = computed(() => {
// 添加$baseUrl存在性检查
const base = $baseUrl || '';
return `${base}integral/${tupianBanben.value}/jingxuan/bg-${props.type}.png`
})
// 跳转小程序配置
const configuration ={
// subPackages/shopMainProcess/coupons/couponList
// url: "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot",
url: "subPackages/shopMainProcess/coupons/couponList",
type: 2,
extra: {
appId: "wx4205ec55b793245e",
envVersion: "release"
}
}
// 前往使用按钮
const goUse = () => {
console.log("🚀 ~ goUse:")
// md.sensorLogTake({
// xcxClick: "积分服务页-首屏页面点击",
// pageName: "积分服务页-首屏",
// buttonName: `${item.name}`,
// });
const {url, type, extra} = configuration
jump({
type: type,
url: url,
extra:extra
})
emit('close')
}
// 关闭按钮
const closeBtn = () => {
emit('close')
console.log('closeBtn')
}
onMounted(() => {
console.log('onMounted')
wx.setPageStyle({
style: {
overflow: 'hidden'
}
})
})
onUnmounted(() => {
// 弹窗关闭时恢复背景滚动
wx.setPageStyle({
style: {
overflow: 'auto'
}
})
})
</script>
<style lang="scss" scoped>
.popup-tip {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 999;
background: rgba(0, 0, 0, 0.5);
&-content {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
overflow: hidden;
.content-title{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 50rpx;
font-weight: 700;
color: #fff8e8;
}
.content-box {
margin-top: 20rpx;
width: 640rpx;
padding: 55rpx 22rpx 40rpx 25rpx;
overflow: hidden;
background-size: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 24rpx;
overflow: hidden;
.box-2{
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
image{
width: 270rpx;
height: 160rpx;
}
}
.box-3{
margin-top: 50rpx;
width: 442rpx;
height: 85rpx;
image{
width: 100%;
height: 100%;
}
}
}
// 钻石
// .sty-3 {
// background-image: url('@/static/jingxuan/bg-3.png');
// }
// // 星光
// .sty-4 {
// background-image: url('@/static/jingxuan/bg-4.png');
// }
// // 星耀
// .sty-5 {
// background-image: url('@/static/jingxuan/bg-5.png');
// }
.content-2 {
margin-top: 65rpx;
width: 50rpx;
height: 50rpx;
// background-image: url('@/static/shengriPopup/close.png');
background-size: 100%;
}
}
}
</style>
\ No newline at end of file
......@@ -56,7 +56,6 @@ import {
defineEmits
} from 'vue'
import { useUserStore } from "@/stores/user";
import { console } from 'inspector';
// 接受父组件参数
const props = defineProps({
type: {
......
<template>
<view class="popup-tip">
<view class="popup-tip-content">
<view class="content-title">
新人礼券领取成功
</view>
<!-- <view :class="`content-box sty-${type}`"> -->
<view class="content-box" :style="{ backgroundImage: `url('${bgImageUrl}')` }">
<view class="box-2">
<!-- <image :src="`/static/xinren/${type}-2.png`" ></image> -->
<image :src="$baseUrl + `integral/${tupianBanben}/xinren/${type}-2.png`" ></image>
</view>
<view class="box-3" @click="goUse">
<!-- <image :src="`/static/jingxuan/${type}-3.png`" ></image> -->
<image :src="$baseUrl + `integral/${tupianBanben}/jingxuan/${type}-3.png`" ></image>
</view>
</view>
<view class="content-2" @click="closeBtn" :style="{backgroundImage: `url(${$baseUrl + `integral/${tupianBanben}/shengriPopup/close.png`})`}">
</view>
</view>
</view>
</template>
<script setup>
import {
ref,
onMounted,
computed,
defineEmits,
onUnmounted,
getCurrentInstance
} from 'vue'
import { useUserStore } from "@/stores/user";
import { jump, JumpType } from '@/utils/index.js'
import md from '../../md';
const { proxy } = getCurrentInstance();
const $baseUrl = proxy.$baseUrl;
// 接受父组件参数
const props = defineProps({
type: {
type: String,
default: '1', // 1 黄金、2 铂金、3 钻石、4 星光、5 星耀
}
})
// 用户信息
const userStore = useUserStore();
const tupianBanben = ref('1016')
const bgImageUrl = computed(() => {
// 添加$baseUrl存在性检查
const base = $baseUrl || '';
return `${base}integral/${tupianBanben.value}/jingxuan/bg-${props.type}.png`
})
// 回调函数
const emit = defineEmits(['statusChange', 'close'])
// 跳转小程序配置
const configuration ={
// url: "subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot",
url: "subPackages/shopMainProcess/coupons/couponList",
type: 2,
extra: {
appId: "wx4205ec55b793245e",
envVersion: "release"
}
}
// 前往使用按钮
const goUse = () => {
console.log("🚀 ~ goUse:")
// md.sensorLogTake({
// xcxClick: "积分服务页-首屏页面点击",
// pageName: "积分服务页-首屏",
// buttonName: `${item.name}`,
// });
const {url, type, extra} = configuration
jump({
type: type,
url: url,
extra:extra
})
emit('close')
}
// 关闭按钮
const closeBtn = () => {
emit('close')
}
onMounted(() => {
console.log('onMounted')
wx.setPageStyle({
style: {
overflow: 'hidden'
}
})
})
onUnmounted(() => {
// 弹窗关闭时恢复背景滚动
wx.setPageStyle({
style: {
overflow: 'auto'
}
})
})
</script>
<style lang="scss" scoped>
.popup-tip {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 999;
background: rgba(0, 0, 0, 0.5);
&-content {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
overflow: hidden;
.content-title{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 50rpx;
font-weight: 700;
color: #fff8e8;
}
.content-box {
margin-top: 20rpx;
width: 640rpx;
padding: 55rpx 22rpx 40rpx 25rpx;
overflow: hidden;
background-size: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 24rpx;
overflow: hidden;
.box-2{
width: 591rpx;
height: 332rpx;
image{
width: 100%;
height: 100%;
}
}
.box-3{
margin-top: 50rpx;
width: 442rpx;
height: 85rpx;
image{
width: 100%;
height: 100%;
}
}
}
// 黄金
// .sty-1 {
// background-image: url('@/static/jingxuan/bg-1.png');
// }
// // 铂金
// .sty-2 {
// background-image: url('@/static/jingxuan/bg-2.png');
// }
// // 钻石
// .sty-3 {
// background-image: url('@/static/jingxuan/bg-3.png');
// }
// // 星光
// .sty-4 {
// background-image: url('@/static/jingxuan/bg-4.png');
// }
// // 星耀
// .sty-5 {
// background-image: url('@/static/jingxuan/bg-5.png');
// }
.content-2 {
margin-top: 65rpx;
width: 50rpx;
height: 50rpx;
// background-image: url('@/static/shengriPopup/close.png');
background-size: 100%;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="aiben-component" :style="{
background: `url(${$baseUrl}integral/1021/aibenxinrenliBg${getBgName()}.png) no-repeat center/contain`,
height: `${getHeight()}`
}">
<view class="tipLock-section" v-if="props.index == 0">
<image class="tipLock" :src="$baseUrl + `integral/1021/tipsLock1.png`" mode="aspectFit" />
</view>
<!-- 标题区域 -->
<view class="title-section">
<text class="main-title" :style="{ color: getColor()[props.index].titleColor }">爱本新人礼</text>
</view>
<text class="points-text" :style="{ marginTop: props.isshowLock ? '153rpx' : '153rpx' }">200积分</text>
<!-- 底部按钮 -->
<!-- <image
v-if="props.isshowLock && props.index == 0"
class="bottom-button"
:src="$baseUrl + `integral/1021/aibenxinrenliQushengjiBtn${props.index}.png`"
mode="aspectFit"
@click="handleUpgrade"
/> -->
<view
class="bottom-button"
v-if="props.isshowLock"
:style="{
background: `url(${$baseUrl}integral/1021/aibenxinrenliBtnBg${props.index}.png) no-repeat center/contain`
}"
mode="aspectFit"
@click="handleUpgrade"
>
<text class="bottom-button-text" :style="{ color: props.index == 4 ? '#ffffff' : '#ffe3c3' }">去升级</text>
</view>
<!-- 说明文字 -->
<view class="description" :style="{ marginTop: getTop() }">
<text class="desc-text" :style="{ color: getColor()[props.index].titleDetail }">
有过婴配粉扫码积分记录的会员,⾸次完成爱本成⼈奶粉的扫码积分时
</text>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits, onMounted } from 'vue'
// 定义组件名称
defineOptions({
name: 'aiben-xinrenli'
})
// 定义组件属性
const props = defineProps({
index: {
type: Number,
default: 0
},
isshowLock:{
type: Boolean,
default: false
}
})
const getBgName = () => {
if(props.isshowLock){
return props.index + ""
}else{
return props.index + "0"
}
}
const getTop = () => {
if(!props.isshowLock){
return "80rpx"
}else{
return "35rpx"
}
return "80rpx"
}
const getHeight = () => {
if(props.isshowLock){
return "569rpx"
}else{
return "495rpx"
}
}
const isShowBtn = () => {
let show = false;
if(!props.isshowLock && Number(props.index) == 0){
show = false;
}else{
show = true;
}
console.log('show===', show)
return show;
}
onMounted(() => {
console.log('props.isshowLocksdfsdfsdfsdsf===', props.isshowLock)
})
// 定义组件事件
const emit = defineEmits(['upgrade'])
// 去升级按钮点击
const handleUpgrade = () => {
emit('upgrade', {
index: props.index
})
}
// 颜色配置
const getColor = () => {
const colors = [
{
"titleColor": "#503404",
"privilegeColor": "#9a8b74",
"pointsColor": "#503404",
"titleDetail":"#503404"
},
{
"titleColor": "#284a6c",
"privilegeColor": "#7b8b9a",
"pointsColor": "#284a6c",
"titleDetail":"#284a6c"
},
{
"titleColor": "#322d6f",
"privilegeColor": "#9c8aba",
"pointsColor": "#322d6f",
"titleDetail":"#322d6f"
},
{
"titleColor": "#503404",
"privilegeColor": "#9d8d6c",
"pointsColor": "#503404",
"titleDetail":"#6d5d4f"
},
{
"titleColor": "#fff0df",
"privilegeColor": "#c2a98d",
"pointsColor": "#fff0df",
"titleDetail":"#fff0df"
}
]
return colors;
}
</script>
<style lang="less" scoped>
.aiben-component {
position: relative;
width: 686rpx;
height: 569rpx;
display: flex;
flex-direction: column;
// align-items: center;
.tipLock-section{
position: relative;
width: 100%;
.tipLock{
position: absolute;
right: 0;
top: 0;
width: 320rpx;
height: 41rpx;
}
}
.title-section {
// text-align: center;
margin-top: 50rpx;
margin-left: 30rpx;
.main-title {
display: block;
font-size: 32rpx;
font-weight: bold;
letter-spacing: 2rpx;
}
}
.points-text {
font-size: 22rpx;
text-align: center;
font-weight: bold;
color: #211d1a;
// margin-top: 145rpx;
}
.bottom-button {
width: 442rpx;
height: 86rpx;
margin: 0 auto;
margin-top: 50rpx;
display: flex;
justify-content: center;
align-items: center;
.bottom-button-text {
font-size: 26rpx;
font-weight: bold;
}
}
.description {
margin-top: 35rpx;
margin-left: 35rpx;
margin-right: 30rpx;
.desc-text {
font-size: 22rpx;
line-height: 1.5;
letter-spacing: 0.5rpx;
text-align: center;
}
}
}
</style>
<template>
<view class="jinjili-component" :style="{
background: `url(${$baseUrl}integral/1021/jinjiliBg${getBgName()}.png) no-repeat center/contain`,
height: `${getHeight()}`
}">
<view class="tipLock-section" v-if="props.index < 2">
<image class="tipLock" :src="$baseUrl + `integral/1021/tipsLock2${Number(props.index)}.png`" mode="aspectFit" />
</view>
<!-- 标题区域 -->
<view class="title-section">
<text class="main-title" :style="{ color: getColor()[props.index].titleColor }">晋级礼</text>
</view>
<text class="points-text" :style="{ marginTop: Number(props.index) === 0 || Number(props.index) === 1 ? '153rpx' : '153rpx' }">200积分</text>
<!-- 底部按钮 -->
<!-- <image
v-if="props.isshowLock"
class="bottom-button"
:src="$baseUrl + `integral/1021/jinjiQushengjiBtn${props.index}.png`"
mode="aspectFit"
@click="handleUpgrade"
/> -->
<view
class="bottom-button"
v-if="props.isshowLock"
:style="{
background: `url(${$baseUrl}integral/1021/shengriliBtnBg${props.index}.png) no-repeat center/contain`
}"
mode="aspectFit"
@click="handleUpgrade"
>
<text class="bottom-button-text" :style="{ color: props.index == 4 ? '#ffffff' : '#ffe3c3' }">去升级</text>
</view>
<!-- 说明文字 -->
<view class="description" :style="{ marginTop: getTop() }">
<text class="desc-text" :style="{ color: getColor()[props.index].titleDetail }">
⾸次晋级⾄钻⽯,星光,星耀等级
</text>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
// 定义组件名称
defineOptions({
name: 'jinjili'
})
const getBgName = () => {
if(props.isshowLock){
return props.index + ""
}else{
return props.index + "0"
}
}
const getTop = () => {
if(!props.isshowLock){
return "80rpx"
}else{
return "35rpx"
}
return "80rpx"
}
const getHeight = () => {
if(props.isshowLock){
return "569rpx"
}else{
return "495rpx"
}
}
// 定义组件属性
const props = defineProps({
index: {
type: Number,
default: 0
},
isshowLock:{
type: Boolean,
default: false
}
})
// 定义组件事件
const emit = defineEmits(['upgrade'])
// 去升级按钮点击
const handleUpgrade = () => {
emit('upgrade', {
index: props.index
})
}
// 颜色配置
const getColor = () => {
const colors = [
{
"titleColor": "#503404",
"privilegeColor": "#9a8b74",
"pointsColor": "#503404",
"titleDetail":"#503404"
},
{
"titleColor": "#284a6c",
"privilegeColor": "#7b8b9a",
"pointsColor": "#284a6c",
"titleDetail":"#284a6c"
},
{
"titleColor": "#322d6f",
"privilegeColor": "#9c8aba",
"pointsColor": "#322d6f",
"titleDetail":"#322d6f"
},
{
"titleColor": "#503404",
"privilegeColor": "#9d8d6c",
"pointsColor": "#503404",
"titleDetail":"#6d5d4f"
},
{
"titleColor": "#fff0df",
"privilegeColor": "#c2a98d",
"pointsColor": "#fff0df",
"titleDetail":"#fff0df"
}
]
return colors;
}
</script>
<style lang="less" scoped>
.jinjili-component {
position: relative;
width: 686rpx;
height: 569rpx;
display: flex;
flex-direction: column;
// align-items: center;
.tipLock-section{
position: relative;
width: 100%;
.tipLock{
position: absolute;
right: 0;
top: 0;
width: 257rpx;
height: 41rpx;
}
}
.title-section {
// text-align: center;
margin-top: 50rpx;
margin-left: 30rpx;
.main-title {
display: block;
font-size: 32rpx;
font-weight: bold;
letter-spacing: 2rpx;
}
}
.points-text {
font-size: 22rpx;
text-align: center;
font-weight: bold;
color: #211d1a;
// margin-top: 145rpx;
}
.bottom-button {
width: 442rpx;
height: 86rpx;
margin: 0 auto;
margin-top: 50rpx;
display: flex;
justify-content: center;
align-items: center;
.bottom-button-text {
font-size: 26rpx;
font-weight: bold;
}
}
.description {
margin-top: 35rpx;
margin-left: 35rpx;
margin-right: 30rpx;
.desc-text {
font-size: 22rpx;
line-height: 1.5;
letter-spacing: 0.5rpx;
text-align: center;
}
}
}
</style>
<template>
<view class="mianfei-component" :style="{
background: `url(${$baseUrl}integral/1021/mianfeiwenzhenBg${props.index}.png) no-repeat center/contain`,
}">
<!-- 标题区域 -->
<view class="title-section">
<text class="main-title" :style="{ color: getColor()[props.index].titleColor }">免费问诊</text>
</view>
<!-- 底部按钮 -->
<image
class="bottom-button"
:src="$baseUrl + `integral/1021/mianfeiwenzhenQushiyongBtn${props.index}.png`"
mode="aspectFit"
@click="handleUseNow"
/>
<!-- 说明文字 -->
<view class="description">
<text class="desc-text" :style="{ color: getColor()[props.index].titleDetail }">
{{Number(props.index) == 0 ? '三甲医⽣免费在线问诊服务(5次/年)' : '三甲医生免费在线问诊服务 (不限次数)'}}
</text>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
// 定义组件名称
defineOptions({
name: 'mianfei-wenzhen'
})
// 定义组件属性
const props = defineProps({
index: {
type: Number,
default: 0
}
})
// 定义组件事件
const emit = defineEmits(['doctor-click', 'use-now'])
// 医生网格点击事件
const handleDoctorGridClick = () => {
emit('doctor-click', {
index: props.index
})
}
// 立即使用按钮点击
const handleUseNow = () => {
emit('use-now', {
index: props.index
})
}
// 颜色配置
const getColor = () => {
const colors = [
{
"titleColor": "#503404",
"titleDetail":"#503404"
},
{
"titleColor": "#284a6c",
"titleDetail":"#284a6c"
},
{
"titleColor": "#322d6f",
"titleDetail":"#322d6f"
},
{
"titleColor": "#503404",
"titleDetail":"#6d5d4f"
},
{
"titleColor": "#fff0df",
"titleDetail":"#fff0df"
}
]
return colors;
}
</script>
<style lang="less" scoped>
.mianfei-component {
position: relative;
width: 686rpx;
height: 834rpx;
display: flex;
flex-direction: column;
// align-items: center;
.title-section {
// text-align: center;
margin-bottom: 40rpx;
margin-top: 40rpx;
margin-left: 28rpx;
.main-title {
display: block;
font-size: 36rpx;
font-weight: bold;
color: #1d1e25;
margin-bottom: 8rpx;
letter-spacing: 2rpx;
}
}
.bottom-button {
width: 442rpx;
height: 86rpx;
margin: 0 auto;
margin-top: 470rpx;
}
.description {
margin-top: 50rpx;
.desc-text {
position: absolute;
width: 636rpx;
left:50%;
transform: translateX(-50%);
font-size: 24rpx;
line-height: 1.5;
letter-spacing: 0.5rpx;
text-align: center;
}
}
}
</style>
<template>
<view class="shengri-component" :style="{
background: `url(${$baseUrl}integral/1021/shengriliBg${props.index}.png) no-repeat center/contain`,
}">
<view class="tipLock-section" v-if="props.index < 2">
<image class="tipLock" :src="$baseUrl + `integral/1021/tipsLock2${Number(props.index)}.png`" mode="aspectFit" />
</view>
<!-- 标题区域 -->
<view class="title-section">
<text class="main-title" :style="{ color: getColor()[props.index].titleColor }">基础生日礼</text>
</view>
<!-- 奖励卡片区域 -->
<view class="rewards-section">
<!-- 积分奖励卡片 -->
<view class="reward-card" :style="{ background: `url(${$baseUrl}integral/1021/shengriliJifenIcon${props.index}.png) no-repeat center/contain` }" @click="handlePointsClick">
<!-- <image
class="reward-icon"
:src="`${$baseUrl}integral/1021/shengriliJifenIcon${props.index}.png`"
mode="aspectFit"
/> -->
<text class="reward-text">888积分</text>
</view>
<!-- 优惠券奖励卡片 -->
<view class="reward-card1" @click="handleCouponClick">
<image
class="reward-icon1"
:src="`${$baseUrl}integral/1021/shengriliQuanIcon${props.index}.png`"
mode="aspectFit"
/>
</view>
</view>
<!-- 底部按钮 -->
<view
class="bottom-button"
v-if="(!hasBaby && islogin) ? true : !(status1 === 4000 && !props.isshowLock)"
:style="{
background: `url(${$baseUrl}integral/1021/shengriliBtnBg${props.index}.png) no-repeat center/contain`
}"
mode="aspectFit"
@click="handleUpgrade"
>
<text class="bottom-button-text" :style="{ color: props.index == 4 ? '#ffffff' : '#ffe3c3' }">{{ getBtnName() }}</text>
</view>
<image
class="bottom-button"
v-if="(!hasBaby && islogin) ? false : status1 === 4000 && !props.isshowLock"
:src="`${$baseUrl}integral/1021/daikaiqiDisBtn${props.index}.png`"
mode="aspectFit"
@click="handleUpgrade_daikaiqi"
/>
</view>
</template>
<script setup>
import { defineProps, defineEmits, onMounted, ref } from 'vue'
import { showLoading, hideLoading } from '../../utils'
import { fetchBirthdayGiftJSON } from '../../api/integral'
import { useUserStore } from "../../stores/user";
const isShowShengjiBtn = () => {
let show = false;
if(props.isshowLock){
show = true;
}else{
if(status1.value == 4000 && Number(props.index) < 2){
show = true;
}else{
show = false;
}
}
return show;
}
// 定义组件名称
defineOptions({
name: 'shengri-li'
})
// 定义组件属性
const props = defineProps({
index: {
type: Number,
default: 0,
isshowLock:{
type: Boolean,
default: false
}
}
})
// 定义组件事件
const emit = defineEmits(['points-click', 'coupon-click', 'upgrade'])
const getBtnName = () => {
if(!hasBaby.value){
if(props.index < 2){
return '去升级';
}else{
return '去添加';
}
}
const btnName = '';
switch(status1.value){
case 4000:
return '去升级';
case 3000:
return '一键领取';
case 2000:
return '去升级';
case 1000:
return '去使用';
default:
return '去升级';
}
}
// 积分卡片点击事件
const handlePointsClick = () => {
emit('points-click', {
index: props.index
})
}
// 优惠券卡片点击事件
const handleCouponClick = () => {
emit('coupon-click', {
index: props.index
})
}
// 去升级按钮点击
const handleUpgrade = async () => {
emit('upgrade', {
index: status1.value,
userStore:useUserStore()
})
}
// 待开启按钮点击
const handleUpgrade_daikaiqi = () => {
uni.showToast({
title: '奖励还未开启哦',
icon: 'none'
});
}
// 颜色配置
const getColor = () => {
const colors = [
{
"titleColor": "#503404"
},
{
"titleColor": "#284a6c"
},
{
"titleColor": "#322d6f"
},
{
"titleColor": "#503404"
},
{
"titleColor": "#fff0df"
}
]
return colors;
}
const status1 = ref(0);
const hasBaby = ref(false);
const islogin = ref(true);
onMounted(async () => {
const userStore = useUserStore();
const memberInfo = userStore.memberInfo;
if(memberInfo.memberId == "not_login"){
islogin.value = false;
}else{
islogin.value = true
}
if(userStore.babyInfo?.allBabyBaseInfo && userStore.babyInfo?.allBabyBaseInfo.length > 0){
if (userStore.babyInfo?.allBabyBaseInfo?.some(baby => baby.babyStage == 2)) {
hasBaby.value = true;
}else{
hasBaby.value = false;
return;
}
}else{
hasBaby.value = false;
return;
}
// hasBaby.value = false;
// return;
showLoading();
const data = await fetchBirthdayGiftJSON();
if(data.success){
status1.value = data.data.status;
// status1.value = 3000;
}
console.log('data', data);
hideLoading();
})
</script>
<style lang="less" scoped>
.shengri-component {
position: relative;
width: 686rpx;
height: 460rpx;
display: flex;
flex-direction: column;
.tipLock-section{
position: relative;
width: 100%;
.tipLock{
position: absolute;
right: 0;
top: 0;
width: 257rpx;
height: 41rpx;
}
}
.title-section {
margin-top: 50rpx;
margin-left: 30rpx;
.main-title {
display: block;
font-size: 32rpx;
font-weight: bold;
color: #1d1e25;
letter-spacing: 2rpx;
}
}
.rewards-section {
display: flex;
justify-content: center;
align-items: center;
margin-top: 50rpx;
gap: 20rpx;
.reward-card {
display: flex;
flex-direction: column;
align-items: center;
width: 272rpx;
height: 161rpx;
// .reward-icon {
// width: 272rpx;
// height: 161rpx;
// margin-bottom: 20rpx;
// }
.reward-text {
font-size: 28rpx;
font-weight: bold;
color: #211d1a;
margin-top: 110rpx;
}
}
.reward-card1 {
display: flex;
flex-direction: column;
align-items: center;
.reward-icon1 {
width: 272rpx;
height: 159rpx;
}
}
}
.bottom-button {
width: 442rpx;
height: 86rpx;
margin: 0 auto;
margin-top: 32rpx;
display: flex;
justify-content: center;
align-items: center;
.bottom-button-text {
font-size: 26rpx;
font-weight: bold;
}
}
}
</style>
<template>
<view class="popup-tip" >
<view class="tip-panel-modal"
:style="{
background: `url(${$baseUrl}integral/1022/addTipsPanalBg${bgIndex}.png) no-repeat center/contain`
}"
@click.stop>
<!-- 弹窗背景 -->
<!-- <image
class="modal-bg"
:src="`${$baseUrl}integral/1022/addTipsPanalBg${bgIndex}.png`"
mode="aspectFit"
/> -->
<!-- 弹窗内容 -->
<view class="modal-content">
<!-- 添加按钮 -->
<view
class="add-button"
:style="{
background: `url(${$baseUrl}integral/1022/shengriliBtnBg${bgIndex}.png) no-repeat center/contain`
}"
@click="handleAddClick"
>
<text class="button-text">去添加</text>
</view>
</view>
<image
class="close-button"
:src="`${$baseUrl}integral/1022/closeBtn.png`"
mode="aspectFit"
@click="handleOverlayClick"
/>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
// 定义组件名称
defineOptions({
name: 'shengrili-tip-panel'
})
// 定义组件属性
const props = defineProps({
visible: {
type: Boolean,
default: false
},
bgIndex: {
type: Number,
default: 2,
validator: (value) => [2, 3, 4].includes(value)
}
})
// 定义组件事件
const emit = defineEmits(['close', 'add'])
// 处理遮罩层点击
const handleOverlayClick = () => {
console.log('handleOverlayClick')
emit('close')
}
// 处理添加按钮点击
const handleAddClick = () => {
emit('add')
emit('close')
}
</script>
<style lang="scss" scoped>
.popup-tip {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 999;
background: rgba(0, 0, 0, 0.7);
display: flex;
justify-content: center;
align-items: center;
.tip-panel-modal {
position: relative;
width: 640rpx;
height: 368rpx;
display: flex;
justify-content: center;
align-items: center;
// background-color: #ebe7f1;
// border-radius: 25rpx;
// .modal-bg {
// position: absolute;
// top: 0;
// left: 0;
// width: 100%;
// height: 100%;
// z-index: 1;
// }
.modal-content {
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
.add-button {
width: 442rpx;
height: 85rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 200rpx;
.button-text {
font-size: 28rpx;
color: #ffffff;
font-weight: bold;
text-align: center;
}
}
}
.close-button {
z-index: 3;
position: absolute;
width: 50rpx;
height: 50rpx;
margin-top: 480rpx;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="suyuanyou-component" :style="{
background: `url(${$baseUrl}integral/1021/suyuanliBg${props.index}.png) no-repeat center/contain`,
}">
<view class="tipLock-section" v-if="props.index < 3">
<image class="tipLock" :src="$baseUrl + `integral/1021/tipsLock3${Number(props.index)}.png`" mode="aspectFit" />
</view>
<!-- 标题区域 -->
<view class="title-section">
<text class="main-title" :style="{ color: getColor()[props.index].titleColor }">溯源游</text>
</view>
<!-- 去升级按钮 -->
<view
class="bottom-button"
v-if="getshowShengji()"
:style="{
background: `url(${$baseUrl}integral/1021/shengriliBtnBg${props.index}.png) no-repeat center/contain`
}"
mode="aspectFit"
@click="handleUpgrade"
>
<text class="bottom-button-text">{{ props.isshowLock ? '去升级' : '立即报名' }}</text>
</view>
<!-- 待开启按钮 -->
<image v-else
class="bottom-button"
:src="`${$baseUrl}integral/1021/daikaiqiDisBtn${props.index}.png`"
mode="aspectFit"
@click="handleUpgrade_daikaiqi"
/>
<!-- 底部说明文字 -->
<view class="description">
<text class="desc-text" :style="{ color: getColor()[props.index].titleDetail }">
报名填写信息抽取溯源游资格,中签者可享受飞鹤牧场溯源游2日游(含跟团游玩+住宿,路费报销1000元)
</text>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits, ref, onMounted } from 'vue'
import { showLoading, hideLoading } from '../../utils';
import { fetchActivityStateJSON } from '../../api/integral';
const handleUpgrade_daikaiqi = () => {
uni.showToast({
title: '活动暂未开启',
icon: 'none'
})
}
// 定义组件名称
defineOptions({
name: 'suyuanyou'
})
const getshowShengji = () => {
if(isStart.value){
return true;
}else{
if(props.isshowLock){
return true;
}else{
return false;
}
}
}
// 定义组件属性
const props = defineProps({
index: {
type: Number,
default: 0
},
// startDate: {
// type: String,
// default: ''
// },
isshowLock:{
type: Boolean,
default: false
}
})
// const isStart = () => {
// const startDate = new Date(props.startDate);
// const now = new Date();
// console.log(startDate <= now);
// return startDate <= now;
// }
// 定义组件事件
const emit = defineEmits(['upgrade'])
// 去升级按钮点击
const handleUpgrade = () => {
emit('upgrade', {
index: props.index
})
}
// 颜色配置
const getColor = () => {
const colors = [
{
"titleColor": "#503404",
"privilegeColor": "#9a8b74",
"qualificationColor": "#503404",
"titleDetail": "#503404"
},
{
"titleColor": "#284a6c",
"privilegeColor": "#7b8b9a",
"qualificationColor": "#284a6c",
"titleDetail": "#284a6c"
},
{
"titleColor": "#322d6f",
"privilegeColor": "#9c8aba",
"qualificationColor": "#322d6f",
"titleDetail": "#322d6f"
},
{
"titleColor": "#503404",
"privilegeColor": "#9d8d6c",
"qualificationColor": "#503404",
"titleDetail": "#6d5d4f"
},
{
"titleColor": "#fff0df",
"privilegeColor": "#c2a98d",
"qualificationColor": "#fff0df",
"titleDetail": "#fff0df"
}
]
return colors;
}
const isStart = ref(false);
onMounted(async () => {
showLoading();
const res = await fetchActivityStateJSON();
if(res?.success){
isStart.value = res?.data;
}
hideLoading();
})
</script>
<style lang="less" scoped>
.suyuanyou-component {
position: relative;
width: 686rpx;
height: 569rpx;
display: flex;
flex-direction: column;
.tipLock-section{
position: relative;
width: 100%;
.tipLock{
position: absolute;
right: 0;
top: 0;
width: 208rpx;
height: 41rpx;
}
}
.title-section {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 50rpx;
margin-left: 30rpx;
margin-right: 30rpx;
.main-title {
display: block;
font-size: 32rpx;
font-weight: bold;
letter-spacing: 2rpx;
}
}
.bottom-button {
width: 442rpx;
height: 86rpx;
margin: 0 auto;
margin-top: 233rpx;
display: flex;
justify-content: center;
align-items: center;
.bottom-button-text {
font-size: 26rpx;
color: #ffe3c3;
font-weight: bold;
}
}
.description {
margin-top: 35rpx;
margin-left: 35rpx;
margin-right: 30rpx;
.desc-text {
font-size: 22rpx;
line-height: 1;
letter-spacing: 0.5rpx;
text-align: left;
}
}
}
</style>
<template>
<view class="xinrenli-component" :style="{
background: `url(${$baseUrl}integral/1021/xinrenliBg${props.index}.png) no-repeat center/contain`,
}">
<!-- 标题区域 -->
<view class="title-section">
<text class="main-title" :style="{ color: getColor()[props.index].titleColor }">新人礼</text>
<text class="sub-title" :style="{ color: getColor()[props.index].titleDes }">200元优惠券包</text>
</view>
<!-- 优惠券网格 -->
<view class="coupon-grid"
>
<!-- 第一行优惠券 -->
<view class="coupon-row">
<view class="coupon-item" @click="handleCouponClick(0)">
<image
class="coupon-img"
:src="$baseUrl + `integral/1021/xirenliQuan${props.index}0.png`"
mode="aspectFit"
/>
</view>
<view class="coupon-item" @click="handleCouponClick(1)">
<image
class="coupon-img"
:src="$baseUrl + `integral/1021/xirenliQuan${props.index}1.png`"
mode="aspectFit"
/>
</view>
<view class="coupon-item" @click="handleCouponClick(2)">
<image
class="coupon-img"
:src="$baseUrl + `integral/1021/xirenliQuan${props.index}2.png`"
mode="aspectFit"
/>
</view>
</view>
<!-- 第二行优惠券 -->
<view class="coupon-row">
<view class="coupon-item" @click="handleCouponClick(3)">
<image
class="coupon-img"
:src="$baseUrl + `integral/1021/xirenliQuan${props.index}3.png`"
mode="aspectFit"
/>
</view>
<view class="coupon-item" @click="handleCouponClick(4)">
<image
class="coupon-img"
:src="$baseUrl + `integral/1021/xirenliQuan${props.index}4.png`"
mode="aspectFit"
/>
</view>
</view>
</view>
<!-- 底部按钮 -->
<image
class="bottom-button"
:src="$baseUrl + `integral/1021/xinrenliQuxingmaBtn${props.index}.png`"
mode="aspectFit"
@click="handleGoToShop"
/>
<!-- 说明文字 -->
<view class="description">
<text class="desc-text" :style="{ color: getColor()[props.index].titleDetail }">
首次访问星妈优选的用户可以领取200元优惠券包,包含(满49-20coupon新客周卡,优选自营49-20,北纬99-40,六水香99-40,功能营养188-80)
</text>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
// 定义组件名称
defineOptions({
name: 'xinrenli-popup'
})
const getColor = () => {
const colors = [
{
"titleColor": "#503404",
"titleDes":"#9a8b74",
"titleDetail":"#503404"
},
{
"titleColor": "#284a6c",
"titleDes":"#6585a0",
"titleDetail":"#284a6c"
},
{
"titleColor": "#322d6f",
"titleDes":"#9c8bb9",
"titleDetail":"#322d6f"
},
{
"titleColor": "#503404",
"titleDes":"#9d8d6c",
"titleDetail":"#6d5d4f"
},
{
"titleColor": "#fff0df",
"titleDes":"#fff0df",
"titleDetail":"#fff0df"
},
]
return colors;
}
// 定义组件属性
const props = defineProps({
index: {
type: Number,
default: 0
}
})
// 定义组件事件
const emit = defineEmits(['coupon-click', 'go-to-shop'])
// 优惠券点击事件
const handleCouponClick = (couponIndex) => {
emit('coupon-click', {
index: props.index,
couponIndex: couponIndex
})
}
// 去星妈优选按钮点击
const handleGoToShop = () => {
emit('go-to-shop', {
index: props.index
})
}
</script>
<style lang="less" scoped>
.xinrenli-component {
position: relative;
width: 686rpx;
height: 807rpx;
display: flex;
flex-direction: column;
// align-items: center;
.title-section {
// text-align: center;
margin-bottom: 40rpx;
margin-top: 40rpx;
margin-left: 28rpx;
.main-title {
display: block;
font-size: 36rpx;
font-weight: bold;
color: #1d1e25;
margin-bottom: 8rpx;
letter-spacing: 2rpx;
}
.sub-title {
display: block;
font-size: 28rpx;
color: #1d1e25;
letter-spacing: 1rpx;
}
}
.coupon-grid {
margin-bottom: 30rpx;
.coupon-row {
display: flex;
align-items: center;
margin-bottom: 20rpx;
justify-content: center;
gap: 20rpx;
// &:first-child {
// justify-content: space-between;
// }
// &:last-child {
// margin-bottom: 0;
// justify-content: center;
// gap: 20rpx;
// }
.coupon-item {
width: 190rpx;
height: 159rpx;
border-radius: 16rpx;
overflow: hidden;
position: relative;
.coupon-img {
width: 100%;
height: 100%;
border-radius: 16rpx;
}
}
}
}
.bottom-button {
position: relative;
width: 442rpx;
height: 86rpx;
margin: 0 auto;
margin-bottom: 30rpx;
}
.description {
.desc-text {
position: absolute;
width: 636rpx;
left:50%;
transform: translateX(-50%);
font-size: 24rpx;
line-height: 1.5;
letter-spacing: 0.5rpx;
}
}
}
</style>
<template>
<view class="zhuanduanli-component" :style="{
background: `url(${$baseUrl}integral/1021/zhuanduanliBg${getBgName()}.png) no-repeat center/contain`,
height: `${getHeight()}`
}">
<view class="tipLock-section" v-if="props.index == 0">
<image class="tipLock" :src="$baseUrl + `integral/1021/tipsLock1.png`" mode="aspectFit" />
</view>
<!-- 标题区域 -->
<view class="title-section">
<text class="main-title" :style="{ color: getColor()[props.index].titleColor }">转段礼</text>
</view>
<text class="points-text" :style="{ marginTop: Number(props.index) === 0 ? '153rpx' : '153rpx' }">200积分</text>
<!-- 底部按钮 -->
<!-- <image
v-if="props.isshowLock && props.index == 0"
class="bottom-button"
:src="$baseUrl + `integral/1021/zhuanduanliQushengjiBtn${props.index}.png`"
mode="aspectFit"
@click="handleUpgrade"
/> -->
<view
class="bottom-button"
v-if="props.isshowLock"
:style="{
background: `url(${$baseUrl}integral/1021/zhuanduanliBtnBg${props.index}.png) no-repeat center/contain`
}"
mode="aspectFit"
@click="handleUpgrade"
>
<text class="bottom-button-text" :style="{ color: props.index == 4 ? '#ffffff' : '#ffe3c3' }">去升级</text>
</view>
<!-- 说明文字 -->
<view class="description" :style="{ marginTop: getTop() }">
<text class="desc-text" :style="{ color: getColor()[props.index].titleDetail }">
有过N段扫码积分记录,⾸次对N+1段扫码积分,包含0-1,1-2,2-3,3-4
</text>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
// 定义组件名称
defineOptions({
name: 'zhuanduanli'
})
// 定义组件属性
const props = defineProps({
index: {
type: Number,
default: 0
},
isshowLock:{
type: Boolean,
default: false
}
})
const getBgName = () => {
if(props.isshowLock){
return props.index + ""
}else{
return props.index + "0"
}
}
const getTop = () => {
if(!props.isshowLock){
return "80rpx"
}else{
return "35rpx"
}
return "80rpx"
}
const getHeight = () => {
if(props.isshowLock){
return "569rpx"
}else{
return "495rpx"
}
}
// 定义组件事件
const emit = defineEmits(['upgrade'])
// 去升级按钮点击
const handleUpgrade = () => {
emit('upgrade', {
index: props.index
})
}
// 颜色配置
const getColor = () => {
const colors = [
{
"titleColor": "#503404",
"privilegeColor": "#9a8b74",
"pointsColor": "#503404",
"titleDetail":"#503404"
},
{
"titleColor": "#284a6c",
"privilegeColor": "#7b8b9a",
"pointsColor": "#284a6c",
"titleDetail":"#284a6c"
},
{
"titleColor": "#322d6f",
"privilegeColor": "#9c8aba",
"pointsColor": "#322d6f",
"titleDetail":"#322d6f"
},
{
"titleColor": "#503404",
"privilegeColor": "#9d8d6c",
"pointsColor": "#503404",
"titleDetail":"#6d5d4f"
},
{
"titleColor": "#fff0df",
"privilegeColor": "#c2a98d",
"pointsColor": "#fff0df",
"titleDetail":"#fff0df"
}
]
return colors;
}
</script>
<style lang="less" scoped>
.zhuanduanli-component {
position: relative;
width: 686rpx;
display: flex;
flex-direction: column;
// align-items: center;
.tipLock-section{
position: relative;
width: 100%;
.tipLock{
position: absolute;
right: 0;
top: 0;
width: 320rpx;
height: 41rpx;
}
}
.title-section {
// text-align: center;
margin-top: 50rpx;
margin-left: 30rpx;
.main-title {
display: block;
font-size: 32rpx;
font-weight: bold;
letter-spacing: 2rpx;
}
}
.points-text {
font-size: 22rpx;
text-align: center;
font-weight: bold;
color: #211d1a;
// margin-top: 145rpx;
}
.bottom-button {
width: 442rpx;
height: 86rpx;
margin: 0 auto;
margin-top: 50rpx;
display: flex;
justify-content: center;
align-items: center;
.bottom-button-text {
font-size: 26rpx;
font-weight: bold;
}
}
.description {
margin-top: 35rpx;
margin-left: 35rpx;
margin-right: 30rpx;
.desc-text {
font-size: 22rpx;
line-height: 1.5;
letter-spacing: 0.5rpx;
text-align: center;
}
}
}
</style>
<template>
<view class="tip-panel-overlay" v-if="visible" @click="handleOverlayClick">
<view class="tip-panel-modal" @click.stop>
<!-- 弹窗背景 -->
<image
class="modal-bg"
:src="`${$baseUrl}integral/1021/addTipsPanalBg${bgIndex}.png`"
mode="aspectFit"
/>
<!-- 弹窗内容 -->
<view class="modal-content">
<!-- 提示文字 -->
<text class="tip-text">当前没有宝宝信息,无法领取生日礼哦</text>
<!-- 添加按钮 -->
<view
class="add-button"
:style="{
background: `url(${$baseUrl}integral/1021/shengriliBtnBg${bgIndex}.png) no-repeat center/contain`
}"
@click="handleAddClick"
>
<text class="button-text">去添加</text>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue'
// 定义组件名称
defineOptions({
name: 'shengrili-tip-panel'
})
// 定义组件属性
const props = defineProps({
visible: {
type: Boolean,
default: false
},
bgIndex: {
type: Number,
default: 2,
validator: (value) => [2, 3, 4].includes(value)
}
})
// 定义组件事件
const emit = defineEmits(['close', 'add'])
// 处理遮罩层点击
const handleOverlayClick = () => {
emit('close')
}
// 处理添加按钮点击
const handleAddClick = () => {
emit('add')
}
</script>
<style lang="less" scoped>
.tip-panel-overlay {
position: fixed;
width: 100%;
height: 100%;
// top: 0;
// left: 0;
// right: 0;
// bottom: 0;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.tip-panel-modal {
position: relative;
width: 600rpx;
height: 400rpx;
display: flex;
justify-content: center;
align-items: center;
}
.modal-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.modal-content {
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
padding: 60rpx 40rpx;
box-sizing: border-box;
}
.tip-text {
font-size: 32rpx;
color: #503404;
text-align: center;
line-height: 1.5;
margin-bottom: 60rpx;
font-weight: 500;
}
.add-button {
width: 300rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 40rpx;
cursor: pointer;
transition: transform 0.2s ease;
}
.add-button:active {
transform: scale(0.95);
}
.button-text {
font-size: 28rpx;
color: #ffffff;
font-weight: bold;
text-align: center;
}
</style>
No preview for this file type
......@@ -163,9 +163,17 @@
}
},
{
"path": "pages/thirdJumpMiddlePage/thirdJumpMiddlePage",
"style": {
"navigationBarTitleText": ""
"path" : "pages/testPage/testPage",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/thirdJumpMiddlePage/thirdJumpMiddlePage",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
......
......@@ -775,6 +775,7 @@ onMounted(() => {
onLoad((options) => {
console.log("🚀 ~ options-新增和修改:", options)
// debugger;
pageType.value = options.type || "add";
babyId.value = options.id || "";
if (pageType.value === "edit") {
......
This diff is collapsed.
......@@ -270,7 +270,7 @@
</view>
</view>
<view>
<!-- 普通弹窗 -->
<!-- 普通弹窗 企微等二维码-->
<uni-popup :is-mask-click="false" :safe-area="false" ref="popup" background-color="#fff"
border-radius="48rpx">
<view v-if="qrObj !== null" class="popup-content">
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment