Commit 0882f1c3 authored by 王勇霞's avatar 王勇霞

feat: 黑名单&新人礼包

parent 66be11b1
......@@ -20,6 +20,7 @@ export default [
"message": "报错了~",
"code": null,
"data": {
virtualProjectId: 'p9ec985d9',
shareInfo: JSON.stringify({
"title": "万亿体验金狂欢节",
"content": "快来助我一臂之力,一起领百万理财体验金~",
......
......@@ -41,191 +41,304 @@ export default [
},
},
{
url: '/home/index.do',
response: ({ query }) => {
url: '/real/index.do',
response: () => {
return {
success: true,
code: "",
message: "",
timeStamp: Date.now(),
// data: {
// "redRainConfig": {
// canJoin: false, // 是否可参与,true-可参与
// haveNext: true, // 是否有下一场,true-是
// nextRainBeginTime: Date.now() + 1 * 24 * 60 * 60 * 1000, // 下一场红包雨开始时间戳,haveNext返回true时才有值
// redRainCountDownTime: 10, // 红包雨倒计时长(单位:秒)
// redRainId: '1', // 红包雨id
// },
// actStartTime: Date.now() - 1 * 24 * 60 * 60 * 1000,
// actEndTime: Date.now() + 3 * 24 * 60 * 60 * 1000,
// endPoint: Date.now() + 0.0001 * 24 * 60 * 60 * 1000,
// endPop: false,
// uid: '234234',
// productEnd: false,
// taskWealth: 3004044,
// ruleText: 'rulerulerulerulerulerulerule',
// "bigStartConfig": new Array(6).fill(1).map((_, index) => {
// if (index === 0) {
// return {
// "prizeImg": "//yun.duiba.com.cn/polaris/lockRedPack.68411f51f08d38845af18645a2578ae44e01458a.png",
// "unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
// "min": 200,
// "max": 400,
// }
// }
// if (index === 1) {
// return {
// "prizeImg": "//yun.duiba.com.cn/polaris/555.09d6e959a2f4ec8ce8cc139ab6584e344e1185e0.png",
// "unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
// "min": 400,
// "max": 600,
// }
// }
// if (index === 2) {
// return {
// "prizeImg": "//yun.duiba.com.cn/polaris/666.68411f51f08d38845af18645a2578ae44e01458a.png",
// "unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
// "min": 400,
// "max": 600,
// }
// }
// if (index === 3) {
// return {
// "prizeImg": "//yun.duiba.com.cn/polaris/777.ac08cb5cc712ce33235ba4760b7b7b73ffd32477.png",
// "unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
// "min": 400,
// "max": 600,
// }
// }
// if (index === 4) {
// return {
// "prizeImg": "//yun.duiba.com.cn/polaris/888.a7e0237398c9829c8351d5c158e76d9f5b3d7842.png",
// "unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
// "min": 400,
// "max": 600,
// }
// }
// if (index === 5) {
// return {
// "prizeImg": "//yun.duiba.com.cn/polaris/999.66135d0aae8bf3d444567f5b566b3eedea9d41c8.png",
// "unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
// "min": 400,
// "max": 600,
// }
// }
// return {
// "prizeImg": "//yun.duiba.com.cn/polaris/lockRedPack.68411f51f08d38845af18645a2578ae44e01458a.png",
// "unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
// "min": 400,
// "max": 900,
// }
// }),
// "firstMoneyPop1": {
// "notifyText": "<p>1.本次活动发放理财体验金及所获模拟投资收益均为虚拟资产,仅能在有效期内用于活动中的模拟交易,不能提现。</p><p>2.本次活动中模拟理财交易(申购、赎回等)为模拟规则,交易确认时间等与实际交易规则不同,真实理财交易规则请以各理财产品的产品说明书中约定为准。</p><p>3.为简化客户体验流程,本活动模拟交易不涉及客户风险承受等级与理财产品风险评级匹配的校验,真实理财产品交易请以我行理财产品交易规则为准。</p>",
// "experienceNum": 59442359
// },
// "giftPop1": {
// "todayPopFlag": true,
// "type": "2",
// "actPrizeVO": [
// {
// "prizeId": "1",
// "prizeName": "奖品名称1",
// "prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
// },
// {
// "prizeId": "2",
// "prizeName": "奖品名称2",
// "prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
// },
// {
// "prizeId": "3",
// "prizeName": "奖品名称3",
// "prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
// },
// {
// "prizeId": "4",
// "prizeName": "奖品名称4",
// "prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
// },
// {
// "prizeId": "5",
// "prizeName": "奖品名称5",
// "prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
// },
// {
// "prizeId": "thanks",
// "prizeName": "thanks",
// "prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
// },
// ]
// },
// "virtualAssets": {
// "preDayIncome": "656",
// "availableFunds": "76",
// "totalMoney": "359.334",
// // "realBuyJumpUrl": "anim consectetur dolor",
// "totalIncome": 359
// },
// "checkIn": {
// "totalCheckIn": 6,
// "todayCheckIn": false,
// "totalExperienceNum": 1420000,
// "checkInConfig": [
// {
// "id": 1,
// "days": 3,
// "experienceNum": 10000,
// "status": true
// },
// {
// "id": 2,
// "days": 5,
// "experienceNum": 30000,
// "status": false
// },
// {
// "id": 3,
// "days": 10,
// "experienceNum": 60000,
// "status": false
// },
// {
// "id": 4,
// "days": 20,
// "experienceNum": 90000,
// "status": false
// },
// ]
// },
// "recommendProductConfig": new Array(7).fill(1).map((_, index) => {
// return {
// "name": `固收纯债最短持有7天A款Z${index + 1}`,
// "shenShuGuiZei": "交易日申赎",
// "touZiQiXianText": "2023/03/26",
// "qigouText": "1元起购",
// "baiFenBiText": "90%活动用户选购本产品t",
// "fengXian": "中低风险",
// "code": index === 0 ? "23112008P" : "consectetur",
// "status": (index + 1) % 2 === 0 ? '1' : '0',
// "mineProduct": (index + 1) % 3 === 0,
// "realBuyJumpUrl": `https://www.baidu.com?t=${(index + 1)}`,
// "rate": 502, // 利率(需要除100展示)
// "type": index === 0 ? '0' : '1', // 产品类型(0-非现金,1-现金)
// "totalProfit": Math.random() * 1000000 >> 0, // 累计收益,mineProduct为true时有值,单位:分
// "positionMoney": Math.random() * 1000000 >> 0, // 持仓金额,mineProduct为true时有值,单位:分
// }
// }),
// "codeList": [
// { code: "23112008P", type: 0 },
// { code: "consectetur", type: 1 },
// { code: "non", type: 1 },
// { code: "tempor", type: 1 },
// ],
// }
data: {
"redRainConfig": {
canJoin: false, // 是否可参与,true-可参与
haveNext: true, // 是否有下一场,true-是
nextRainBeginTime: Date.now() + 1 * 24 * 60 * 60 * 1000, // 下一场红包雨开始时间戳,haveNext返回true时才有值
redRainCountDownTime: 10, // 红包雨倒计时长(单位:秒)
redRainId: '1', // 红包雨id
"actStartTime": 74366282.61295098,
"actEndTime": -32671264.075789705,
"virtualAssets": {
"preDayIncome": 9023184.612998575,
"availableFunds": 16685796.575012594,
"totalMoney": -12405194.455570176,
"totalIncome": 48385246.90498039,
"profit": "proident eu fugiat reprehenderit dolore"
},
actStartTime: Date.now() - 1 * 24 * 60 * 60 * 1000,
actEndTime: Date.now() + 3 * 24 * 60 * 60 * 1000,
endPoint: Date.now() + 0.0001 * 24 * 60 * 60 * 1000,
endPop: false,
uid: '234234',
productEnd: false,
taskWealth: 3004044,
ruleText: 'rulerulerulerulerulerulerule',
"bigStartConfig": new Array(6).fill(1).map((_, index) => {
if (index === 0) {
return {
"prizeImg": "//yun.duiba.com.cn/polaris/lockRedPack.68411f51f08d38845af18645a2578ae44e01458a.png",
"unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
"min": 200,
"max": 400,
}
}
if (index === 1) {
return {
"prizeImg": "//yun.duiba.com.cn/polaris/555.09d6e959a2f4ec8ce8cc139ab6584e344e1185e0.png",
"unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
"min": 400,
"max": 600,
}
}
if (index === 2) {
return {
"prizeImg": "//yun.duiba.com.cn/polaris/666.68411f51f08d38845af18645a2578ae44e01458a.png",
"unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
"min": 400,
"max": 600,
}
}
if (index === 3) {
return {
"prizeImg": "//yun.duiba.com.cn/polaris/777.ac08cb5cc712ce33235ba4760b7b7b73ffd32477.png",
"unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
"min": 400,
"max": 600,
}
}
if (index === 4) {
return {
"prizeImg": "//yun.duiba.com.cn/polaris/888.a7e0237398c9829c8351d5c158e76d9f5b3d7842.png",
"unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
"min": 400,
"max": 600,
}
"recommendProductConfig": [
{
"name": "et occaecat voluptate eiusmod ad",
"shenShuGuiZei": "Ut nisi reprehenderit",
"qigouText": "do id amet Duis",
"fengXian": "nulla consequat",
"code": "magna",
"realBuyJumpUrl": "irure deserunt",
"mineProduct": false,
"type": "do nisi et consequat",
"rate": "amet id consectetur",
"positionMoney": 6400367.220617026,
"totalProfit": 94309713.29315749
},
{
"name": "labore magna dolor in",
"shenShuGuiZei": "cillum in sit deserunt aliquip",
"qigouText": "aliquip ut ullamco cillum",
"fengXian": "ea dolore proident dolor",
"code": "amet adipisicing irure pariatur",
"realBuyJumpUrl": "labore",
"mineProduct": true,
"type": "labore non Duis laboris",
"rate": "cupidatat",
"positionMoney": -7273601.801372692,
"totalProfit": 19105355.66929403
},
{
"name": "ad esse",
"shenShuGuiZei": "dolor amet",
"qigouText": "amet laboris",
"fengXian": "velit labore cillum",
"code": "magna",
"realBuyJumpUrl": "laboris",
"mineProduct": false,
"type": "Excepteur Duis Lorem",
"rate": "adipisicing sint aute",
"positionMoney": 68712295.39073393,
"totalProfit": -37123432.38883107
}
if (index === 5) {
],
"productEnd": true,
"endPoint": 85475240.69343245,
"giftPop": {
"actPrizeVO": new Array(6).fill(1).map((_, i) => {
return {
"prizeImg": "//yun.duiba.com.cn/polaris/999.66135d0aae8bf3d444567f5b566b3eedea9d41c8.png",
"unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
"min": 400,
"max": 600,
"prizeId": `prizeId${i}`,
"prizeName": `prizeName${i}`,
"prizeImg": `prizeImg${i}`,
}
}
return {
"prizeImg": "//yun.duiba.com.cn/polaris/lockRedPack.68411f51f08d38845af18645a2578ae44e01458a.png",
"unlockedPrizeImg": "//yun.duiba.com.cn/polaris/unLockRedPack.b2aa4a1073caeb7efe55024de7437663ea129c23.png",
"min": 400,
"max": 900,
}
}),
"firstMoneyPop1": {
"notifyText": "<p>1.本次活动发放理财体验金及所获模拟投资收益均为虚拟资产,仅能在有效期内用于活动中的模拟交易,不能提现。</p><p>2.本次活动中模拟理财交易(申购、赎回等)为模拟规则,交易确认时间等与实际交易规则不同,真实理财交易规则请以各理财产品的产品说明书中约定为准。</p><p>3.为简化客户体验流程,本活动模拟交易不涉及客户风险承受等级与理财产品风险评级匹配的校验,真实理财产品交易请以我行理财产品交易规则为准。</p>",
"experienceNum": 59442359
}),
"pop": true,
"show": true
},
"giftPop1": {
"todayPopFlag": true,
"type": "2",
"actPrizeVO": [
{
"prizeId": "1",
"prizeName": "奖品名称1",
"prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
},
{
"prizeId": "2",
"prizeName": "奖品名称2",
"prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
},
{
"prizeId": "3",
"prizeName": "奖品名称3",
"prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
},
{
"prizeId": "4",
"prizeName": "奖品名称4",
"prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
},
{
"prizeId": "5",
"prizeName": "奖品名称5",
"prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
},
{
"prizeId": "thanks",
"prizeName": "thanks",
"prizeImg": "//yun.duiba.com.cn/polaris/045CCBB8-F6C7-43DB-9F81-45F52430A878.441c8f13daf61c48b85fe383e764d9089f1d4a66.png"
},
]
},
"virtualAssets": {
"preDayIncome": "656",
"availableFunds": "76",
"totalMoney": "359.334",
// "realBuyJumpUrl": "anim consectetur dolor",
"totalIncome": 359
"lastMonthRankPop": true,
"overallRankPop": {
"prizeId": "anim",
"prizeImg": "officia velit dolor ex",
"prizeName": "culpa non dolore"
},
"checkIn": {
"totalCheckIn": 6,
"todayCheckIn": false,
"totalExperienceNum": 1420000,
"checkInConfig": [
{
"id": 1,
"days": 3,
"experienceNum": 10000,
"status": true
},
{
"id": 2,
"days": 5,
"experienceNum": 30000,
"status": false
},
{
"id": 3,
"days": 10,
"experienceNum": 60000,
"status": false
},
{
"id": 4,
"days": 20,
"experienceNum": 90000,
"status": false
},
]
},
"recommendProductConfig": new Array(7).fill(1).map((_, index) => {
return {
"name": `固收纯债最短持有7天A款Z${index + 1}`,
"shenShuGuiZei": "交易日申赎",
"touZiQiXianText": "2023/03/26",
"qigouText": "1元起购",
"baiFenBiText": "90%活动用户选购本产品t",
"fengXian": "中低风险",
"code": index === 0 ? "23112008P" : "consectetur",
"status": (index + 1) % 2 === 0 ? '1' : '0',
"mineProduct": (index + 1) % 3 === 0,
"realBuyJumpUrl": `https://www.baidu.com?t=${(index + 1)}`,
"rate": 502, // 利率(需要除100展示)
"type": index === 0 ? '0' : '1', // 产品类型(0-非现金,1-现金)
"totalProfit": Math.random() * 1000000 >> 0, // 累计收益,mineProduct为true时有值,单位:分
"positionMoney": Math.random() * 1000000 >> 0, // 持仓金额,mineProduct为true时有值,单位:分
"bannerInfo": [
{
"bannerImg": "amet ad do",
"bannerLink": "ipsum sint ad tempor"
}
}),
"codeList": [
{ code: "23112008P", type: 0 },
{ code: "consectetur", type: 1 },
{ code: "non", type: 1 },
{ code: "tempor", type: 1 },
],
"currentTime": 39452811.65979925,
"isBlack": false,
"signInStatus": true
}
}
},
},
{
url: '/real/receiveNewGift.do',
response: () => {
return {
success: true,
code: "",
message: "",
data: {
"ruleId": "proident Lorem occaecat eiusmod",
"url": "enim",
"userRecordId": -64633769.59404985,
"prizeType": -81808785,
"prizeId": "prizeId3",
"optionImg": "quis nisi adipisicing",
"optionName": "cupidatat",
"optionId": "commodo nulla ut minim",
"sendCount": -72243885.95094098,
"position": 44009232,
"extra": "deserunt Lorem exercitation voluptate"
},
}
},
},
{
url: 'real/signIn.do',
response: () => {
return {
success: true,
code: "",
message: "",
}
},
},
{
url: '/home/coop_sendCode.do',
method: 'post',
......
......@@ -5,6 +5,19 @@ const API = generateAPI({
getRule: 'projectRule.query',
/** 获取前端配置项 */
getFrontVariable: 'coop_frontVariable.query',
// 首页
index: "real/index.do",
// 报名
signIn: "real/signIn.do",
// 领取新手礼包
receiveNewGift: "real/receiveNewGift.do",
// =============
// getShareInfo: '/wechatShare/getShareInfo/v2',
getShareInfo: '/wechatMiniApp/ticket/info',
......@@ -48,8 +61,7 @@ const API = generateAPI({
},
},
// 首页
index: "home/index.do",
// 首页-产品参数更新
coop_codeUpdate: {
uri: "home/coop_codeUpdate.do",
......
src/assets/PrizePanel/bg.png

25.1 KB | W: | H:

src/assets/PrizePanel/bg.png

274 KB | W: | H:

src/assets/PrizePanel/bg.png
src/assets/PrizePanel/bg.png
src/assets/PrizePanel/bg.png
src/assets/PrizePanel/bg.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/PrizePanel/btn.png

9.52 KB | W: | H:

src/assets/PrizePanel/btn.png

21.4 KB | W: | H:

src/assets/PrizePanel/btn.png
src/assets/PrizePanel/btn.png
src/assets/PrizePanel/btn.png
src/assets/PrizePanel/btn.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -9,28 +9,19 @@
.bg {
position: absolute;
left: 82px;
top: 348px;
width: 585px;
height: 671px;
left: 101px;
top: 402px;
width: 539px;
height: 720px;
.webpBg("PrizePanel/bg.png");
}
.bg2 {
position: absolute;
left: 82px;
top: 348px;
width: 585px;
height: 671px;
.webpBg("PrizePanel/bg2.png");
}
.btn {
position: absolute;
left: 120px;
top: 811px;
width: 510px;
height: 138px;
left: 157px;
top: 985px;
width: 426px;
height: 86px;
.webpBg("PrizePanel/btn.png");
}
......@@ -39,31 +30,31 @@
background-color: white;
position: absolute;
left: 265px;
top: 494px;
top: 689px;
width: 220px;
height: 220px;
}
.prizeName {
font-size: 28px;
color: rgb(1, 1, 1);
font-size: 25px;
color: #7d7d7d;
text-align: center;
position: absolute;
left: 100px;
width: 550px;
top: 740px;
top: 928px;
.lineClamp1();
}
.tips {
width: 100%;
font-size: 24px;
color: rgba(1, 1, 1, 0.6);
line-height: 4.284;
font-size: 17px;
color: #91794d;
line-height: 17px;
text-align: center;
position: absolute;
left: 0;
top: 920px;
top: 1089px;
text-align: center;
}
......
......@@ -23,10 +23,10 @@ export class PrizePanel extends Component<any, any> {
}
clickBtn = _throttle(() => {
const {type} = this.props;
const { type } = this.props;
if(type == 'red') {
PageCtrl.changePage(NewRecordPage, {tab: 2})
if (type == 'red') {
PageCtrl.changePage(NewRecordPage, { tab: 2 })
}
ModalCtrl.closeModal();
......@@ -34,15 +34,15 @@ export class PrizePanel extends Component<any, any> {
render() {
const {optionImg, optionName, type} = this.props;
const { optionImg, optionName, type } = this.props;
return <div className="PrizePanel modal_center">
<div className="bg2"/>
<img className="img" src={optionImg}/>
<div className="bg" />
<img className="img" src={optionImg} />
<div className="prizeName">{optionName}</div>
<Button className={`btn md${this.BTN_MD[type]}`} onClick={this.clickBtn}/>
<Button className={`btn`} onClick={this.clickBtn} />
{type != 'red' && <div className="tips">奖品可在【首页】-【我的奖品】中查看</div>}
<Button className="close" onClick={this.clickClose}/>
<Button className="close" onClick={this.clickClose} />
</div>
}
......
'use strict';
import React from 'react';
import { observer } from 'mobx-react';
import './index.less';
import store from '../../store/store';
import { Button } from '@grace/ui';
import { _asyncThrottle } from "../../utils/utils";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { Toast } from '@grace/ui';
@observer
class BlackPop extends React.Component {
constructor(props) {
super(props);
}
async componentDidMount() {
}
handleClose = _asyncThrottle(() => {
window.location.href = `${CFG.domain}/projectx/${store.frontVariable.virtualProjectId}/index.html?appID=${CFG.appID}&channel=${CFG.channel}`
})
render() {
return (
<div className="blackPop modal_center">
<span className="bg"></span>
<Button className="know_btn" onClick={this.handleClose} />
{/* <Button className="close" onClick={this.handleClose} /> */}
</div>
);
}
}
export default BlackPop;
@import "../../res.less";
.blackPop {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
.bg {
left: 100px;
top: 588px;
width: 539px;
height: 310px;
position: absolute;
.sparkBg("blackPop/bg.png");
}
.know_btn {
position: absolute;
left: 159px;
top: 768px;
width: 426px;
height: 86px;
.sparkBg("blackPop/know_btn.png");
}
.close {
left: 346px;
top: 986px;
width: 58px;
height: 58px;
position: absolute;
.sparkBg("common/close.png");
}
}
'use strict';
import React from 'react';
import { observer } from 'mobx-react';
import './index.less';
import { Button } from '@grace/ui';
import { _asyncThrottle } from "../../utils/utils";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { Toast } from '@grace/ui';
import SetupSuccessPop from "../setupSuccessPop";
import API from '@/api';
@observer
class SetupPop extends React.Component {
constructor(props) {
super(props);
}
async componentDidMount() {
}
handleSetup = _asyncThrottle(async () => {
try {
await API.signIn()
Toast.show('报名成功');
ModalCtrl.closeModal();
ModalCtrl.showModal(SetupSuccessPop, {});
} catch (error) {
Toast.show(error.message || '报名失败');
}
})
// handleClose = _asyncThrottle(() => {
// ModalCtrl.closeModal();
// })
render() {
return (
<div className="setupPop modal_center">
<span className="bg"></span>
<Button className="know_btn" onClick={this.handleSetup} />
{/* <Button className="close" onClick={this.handleClose} /> */}
</div>
);
}
}
export default SetupPop;
@import "../../res.less";
.setupPop {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
.bg {
left: 100px;
top: 588px;
width: 539px;
height: 310px;
position: absolute;
.sparkBg("setupPop/bg.png");
}
.know_btn {
position: absolute;
left: 159px;
top: 768px;
width: 426px;
height: 86px;
.sparkBg("setupPop/know_btn.png");
}
.close {
left: 346px;
top: 986px;
width: 58px;
height: 58px;
position: absolute;
.sparkBg("common/close.png");
}
}
'use strict';
import React from 'react';
import { observer } from 'mobx-react';
import { CircleTurntable } from "@spark/circle-turntable";
import './index.less';
import { Button } from '@grace/ui';
import { _asyncThrottle } from "../../utils/utils";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import store from "@/store/store";
import API from "@/api";
import { NoPrizePanel } from "@/panels/NoPrizePanel/NoPrizePanel.tsx";
import { PrizePanel } from "@/panels/PrizePanel/PrizePanel.tsx";
import { waitTime } from "@/utils/utils";
@observer
class SetupSuccessPop extends React.Component {
turntableRef = null; // 大转盘
btnStarting = false; // 转盘是否启动
drawResultInfo = {};
constructor(props) {
super(props);
}
async componentDidMount() {
}
onStop = async() => {
this.btnStarting = false;
store.updateIndex();
if (this.drawResultInfo.prizeId == "thanks") {
ModalCtrl.showModal(NoPrizePanel, {type: 'final_turntable', ...this.drawResultInfo});
} else {
ModalCtrl.showModal(PrizePanel, {type: 'final_turntable', ...this.drawResultInfo});
}
ModalCtrl.closeModal(SetupSuccessPop);
}
// 开始抽奖
drawHandle = _asyncThrottle(async () => {
if (this.btnStarting) return false;
this.btnStarting = true;
const { success, data } = await API.receiveNewGift();
if (!success) {
this.btnStarting = false;
return;
}
this.drawResultInfo = data;
this.turntableRef.launch();
const index = store.indexData?.giftPop?.actPrizeVO?.findIndex((item) => item.prizeId === this.drawResultInfo.prizeId);
this.turntableRef.braking(index);
});
handleClose = _asyncThrottle(() => {
ModalCtrl.closeModal();
})
render() {
const { giftPop } = store.indexData || {};
return (
<div className="setupSuccessPop modal_center">
<span className="bg"></span>
<div className='turnTable_box'>
<CircleTurntable
className="tt_box"
// @ts-ignore
ref={(ref) => (this.turntableRef = ref)}
options={giftPop?.actPrizeVO || []}
angleOffset={180 / 6 + 10} // 角度偏移量
radian={78} // 奖项半径
launchDuration={1000} // 启动时间
// 大转盘背景
renderBackground={<div className="turntable_bg"></div>}
// 大转盘指针
renderStartButton={<div className="ttBtn"/>}
// 渲染奖品信息
renderOption={(option) => {
return <div className="prize_item">
<div className="prize_name">{option.prizeName}</div>
<img className="prize_img" src={option.prizeImg} alt=""/>
</div>;
}}
didStop={this.onStop}
/>
</div>
<Button className="know_btn" onClick={this.drawHandle}/>
<Button className="close" onClick={this.handleClose} />
</div>
);
}
}
export default SetupSuccessPop;
@import "../../res.less";
.setupSuccessPop {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
.bg {
left: 66px;
top: 360px;
width: 619px;
height: 903px;
position: absolute;
.sparkBg("setupSuccessPop/bg.png");
}
.turnTable_box {
width: 540px;
height: 540px;
position: absolute;
left: 110px;
top: 552px;
.tt_box {
width: 540px;
height: 540px;
left: 0;
top: 0;
position: absolute;
}
.turntable_bg {
width: 540px;
height: 540px;
left: 0;
top: 0;
position: absolute;
.sparkBg("ResPage/转盘背景.png");
}
.prize_item {
width: 70px;
height: 70px;
text-align: center;
color: #6a2913;
font-size: 20px;
margin-bottom: 15px;
margin-left: -65px;
transform: rotateZ(-8deg);
.prize_name {
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -40px;
width: 300%;
font-size: 25.75px;
color: #e2a24c;
.lineClamp1();
font-weight: bold;
}
.prize_img {
width: 70px;
height: 70px;
object-fit: contain;
}
}
.ttBtn {
position: absolute;
left: 278px;
top: 895px;
width: 169px;
height: 178px;
.webpBg("ResPage/点击抽奖.png");
}
}
.know_btn {
position: absolute;
left: 133px;
top: 1125px;
width: 488px;
height: 99px;
.sparkBg("setupSuccessPop/draw_btn.png");
}
.close {
left: 346px;
top: 1301px;
width: 58px;
height: 58px;
position: absolute;
.sparkBg("common/close.png");
}
}
......@@ -16,6 +16,8 @@ import { CHANNEL } from '@/AppTools';
import { NewbieModal } from '@/panels/newbieModal/newbieModal';
import RedPackRainModal from '@/panels/redPackRainModal/redPackRainModal';
import { errMessageMap } from '@/utils/errorHandler';
import BlackPop from '@/panels/blackPop/index';
import SetupPop from '@/panels/setupPop/index';
class Store {
......@@ -27,10 +29,13 @@ class Store {
/** 前端开发配置 */
frontVariable: {
// 虚拟盘项目id
virtualProjectId: string,
homeTip: any;
shareInfo: any,
ruleImg?: string,
} = {
virtualProjectId: '',
shareInfo: {
title: "",
desc: "",
......@@ -163,10 +168,7 @@ class Store {
}
homeRoot = null;
/*
leftOpenTime = 0;
leftOpenId = null;
*/
async updateIndex() {
const { success, data, timeStamp } = await API.index();
if (!success) {
......@@ -176,38 +178,48 @@ class Store {
resData.currentTime = timeStamp;
this.indexData = resData;
const { firstMoneyPop, endPop, checkIn, codeList, giftPop, redRainConfig } = resData
const { isBlack, giftPop } = resData
// 计算进度条百分比
if (checkIn?.checkInConfig && checkIn?.totalCheckIn !== undefined) {
this.percent = this.calculateProgressPercent(checkIn.checkInConfig, checkIn.totalCheckIn);
console.log(`当前签到${checkIn.totalCheckIn}天,进度条百分比: ${this.percent.toFixed(1)}%`);
} else {
this.percent = 0;
// 非白名单名单拦截弹窗
if (isBlack) {
ModalCtrl.showModal(BlackPop);
}
// 防止奖品被刷 禁止微信端访问了 这个弹窗不会出了 配置项控制
if (endPop) {
ModalCtrl.showModal(Tipspop);
// 立即报名弹窗
if (giftPop?.pop) {
ModalCtrl.showModal(SetupPop);
}
// 更新产品信息
if (codeList?.length && CFG.channel == CHANNEL.HXLC) {
this.updateFundInfo(codeList)
}
// 计算进度条百分比
// if (checkIn?.checkInConfig && checkIn?.totalCheckIn !== undefined) {
// this.percent = this.calculateProgressPercent(checkIn.checkInConfig, checkIn.totalCheckIn);
// console.log(`当前签到${checkIn.totalCheckIn}天,进度条百分比: ${this.percent.toFixed(1)}%`);
// } else {
// this.percent = 0;
// }
if (giftPop && giftPop?.todayPopFlag) {
ModalCtrl.showModal(NewbieModal, { type: giftPop?.type, actPrizeVO: giftPop?.actPrizeVO })
}
// // 防止奖品被刷 禁止微信端访问了 这个弹窗不会出了 配置项控制
// if (endPop) {
// ModalCtrl.showModal(Tipspop);
// }
if (redRainConfig?.canJoin) {
// 在时间段内,显示红包雨弹窗
ModalCtrl.showModal(RedPackRainModal, { redRainId: redRainConfig?.redRainId });
}
// // 更新产品信息
// if (codeList?.length && CFG.channel == CHANNEL.HXLC) {
// this.updateFundInfo(codeList)
// }
if (firstMoneyPop) {
ModalCtrl.showModal(FirstPop, firstMoneyPop);
}
// if (giftPop && giftPop?.todayPopFlag) {
// ModalCtrl.showModal(NewbieModal, { type: giftPop?.type, actPrizeVO: giftPop?.actPrizeVO })
// }
// if (redRainConfig?.canJoin) {
// // 在时间段内,显示红包雨弹窗
// ModalCtrl.showModal(RedPackRainModal, { redRainId: redRainConfig?.redRainId });
// }
// if (firstMoneyPop) {
// ModalCtrl.showModal(FirstPop, firstMoneyPop);
// }
}
/*
......
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