Commit 37da8d49 authored by 天马流星拳's avatar 天马流星拳

解决冲突

parents eea00ded a1213a0b
......@@ -20,6 +20,7 @@ export default [
"message": "报错了~",
"code": null,
"data": {
virtualProjectId: 'p9ec985d9',
shareInfo: JSON.stringify({
"title": "万亿体验金狂欢节",
"content": "快来助我一臂之力,一起领百万理财体验金~",
......@@ -45,8 +46,8 @@ export default [
},
},
{
url: '/draw/myRucksack.do',
response: ({ query }) => {
url: '/real/prizeRecords.do',
response: () => {
return {
"code": "code",
"success": true,
......
This diff is collapsed.
......@@ -5,6 +5,23 @@ const API = generateAPI({
getRule: 'projectRule.query',
/** 获取前端配置项 */
getFrontVariable: 'coop_frontVariable.query',
// 首页
index: "real/index.do",
// 报名
signIn: "real/signIn.do",
// 领取新手礼包
receiveNewGift: "real/receiveNewGift.do",
// 奖品记录
records: "real/prizeRecords.do",
// 查询签到数据
querySign: "checkIn_1/querySign.do",
// =============
// getShareInfo: '/wechatShare/getShareInfo/v2',
getShareInfo: '/wechatMiniApp/ticket/info',
......@@ -19,9 +36,6 @@ const API = generateAPI({
uri: "userLogin.check",
showMsg: false,
},
// 奖品记录
records: "draw/myRucksack.do",
// 红包补领
redpacket: "common/moneyReissue.do",
......@@ -48,8 +62,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
src/assets/homePage/tab1_bg.png

12.8 KB | W: | H:

src/assets/homePage/tab1_bg.png

13.1 KB | W: | H:

src/assets/homePage/tab1_bg.png
src/assets/homePage/tab1_bg.png
src/assets/homePage/tab1_bg.png
src/assets/homePage/tab1_bg.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/homePage/tab2_bg.png

13 KB | W: | H:

src/assets/homePage/tab2_bg.png

11.9 KB | W: | H:

src/assets/homePage/tab2_bg.png
src/assets/homePage/tab2_bg.png
src/assets/homePage/tab2_bg.png
src/assets/homePage/tab2_bg.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/rulePop/bg.png

16.6 KB | W: | H:

src/assets/rulePop/bg.png

122 KB | W: | H:

src/assets/rulePop/bg.png
src/assets/rulePop/bg.png
src/assets/rulePop/bg.png
src/assets/rulePop/bg.png
  • 2-up
  • Swipe
  • Onion skin
export const weekList = ['一', '二', '三', '四', '五', '六', '日' ]
\ No newline at end of file
......@@ -152,7 +152,7 @@ class DetailPage extends React.Component<any, any> {
// 新增:输入校验,只允许数字和最多两位小数
handleInputChange = (e: React.ChangeEvent<HTMLInputElement>, key: 'buyInput' | 'sellInput') => {
let value = e.target.value;
const value = e.target.value;
// 只允许输入数字和最多两位小数
if (value === '' || /^\d*(\.\d{0,2})?$/.test(value)) {
this.setState({
......
......@@ -151,7 +151,7 @@
.other_assets1 {
width: 195px;
height: 70px;
left: 0px;
left: 0;
top: 0px;
position: absolute;
}
......@@ -693,9 +693,9 @@
}
.other_assets {
width: 666px;
width: 656px;
height: 70px;
left: 23px;
left: 33px;
top: 296px;
position: absolute;
......@@ -799,47 +799,27 @@
}
}
// .prize_banner {
// width: 713px;
// height: 322px;
// left: 19px;
// // top: 1060px;
// position: relative;
// .sparkBg("homePage/prize_banner.png");
// .prize_btn {
// width: 270px;
// height: 98px;
// left: 218px;
// top: 210px;
// position: absolute;
// .sparkBg("homePage/prize_btn.png");
// }
// }
.recommend_products {
width: 750px;
height: 354px;
height: 198px;
left: 0px;
// top: 1878px;
position: relative;
margin-top: 28px;
margin-top: 4px;
margin-bottom: 22px;
.recommend_products_bg {
display: inline-block;
left: 18px;
width: 714px;
height: 1327px;
height: 198px;
position: absolute;
.sparkBg("homePage/products_tuijian_bg.png");
.r_products_list {
width: 694px;
height: 257px;
height: 198px;
left: 10px;
top: 115px;
top: 0;
position: absolute;
// padding-left: 18px;
box-sizing: border-box;
display: flex;
overflow-x: auto;
......@@ -850,146 +830,49 @@
.r_products_item {
flex-shrink: 0;
width: 569px;
height: 238px;
width: 450px;
height: 198px;
position: relative;
margin-right: 10px;
.r_product_bg {
width: 569px;
height: 238px;
width: 450px;
height: 198px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("homePage/r_product_bg.png");
}
.r_product_name {
width: 520px;
height: 32px;
left: 32px;
top: 26px;
position: absolute;
font-size: 28px;
line-height: 32px;
color: rgba(1, 1, 1, 1);
font-weight: bold;
.lineClamp1();
}
.r_product_risk {
width: 360px;
height: 32px;
left: 31px;
top: 77px;
position: absolute;
font-size: 32px;
line-height: 32px;
color: rgba(211, 26, 25, 1);
font-weight: bold;
.lineClamp1();
}
.r_product_rate {
width: 520px;
height: 22px;
left: 30px;
top: 128px;
position: absolute;
opacity: 0.6;
font-size: 20px;
line-height: 22px;
color: rgba(1, 1, 1, 1);
.lineClamp1();
}
.detail_btn {
width: 140px;
height: 48px;
left: 398px;
top: 70px;
position: absolute;
.sparkBg("homePage/detail_btn.png");
}
.r_product_like {
width: 507px;
height: 46px;
left: 31px;
top: 167px;
position: absolute;
.sparkBg("homePage/r_product_like_bg.png");
.r_product_like_text {
width: 450px;
height: 20px;
left: 49px;
top: 13px;
position: absolute;
opacity: 0.6;
font-size: 20px;
line-height: 20px;
color: rgba(1, 1, 1, 1);
.lineClamp1();
}
border-radius: 30px;
}
}
}
}
// .r_products_title {
// width: 141px;
// height: 34px;
// left: 17px;
// top: 0px;
// position: absolute;
// .sparkBg("homePage/r_products_title.png");
// }
}
.bottom_products {
width: 714px;
width: 701px;
height: auto;
min-height: 990px;
background-color: #fce398;
left: 18px;
// top: 2192px;
min-height: 1017px;
background-color: #ffffff;
left: 28px;
position: relative;
margin-top: 20px;
padding-top: 152px;
padding-bottom: 19px;
box-sizing: border-box;
border-left: 3px solid #fff;
border-right: 3px solid #fff;
border-bottom: 3px solid #fff;
border-radius: 0 0 38px 38px;
&::before {
content: "";
position: absolute;
top: 800px;
left: 15px;
width: 685px;
height: calc(100% - 800px - 19px);
background-color: #fff;
border-radius: 0 0 20px 20px;
}
border-radius: 24px;
.tab1_bg {
width: 685px;
height: 957px;
left: 15px;
width: 701px;
height: 1017px;
left: 0;
top: 0px;
position: absolute;
.sparkBg("homePage/tab1_bg.png");
}
.tab2_bg {
width: 685px;
height: 957px;
left: 15px;
width: 701px;
height: 1017px;
left: 0;
top: 0px;
position: absolute;
.sparkBg("homePage/tab2_bg.png");
......@@ -1001,7 +884,6 @@
position: absolute;
left: 0;
top: 0;
// background-color: rgba(0, 0, 0, 0.6);
}
.tab2_btn {
......@@ -1010,7 +892,6 @@
position: absolute;
right: 0;
top: 0;
// background-color: rgba(0, 0, 0, 0.6);
}
.empty {
......@@ -1024,9 +905,7 @@
.products_list {
width: 653px;
// height: 696px;
left: 30px;
// top: 152px;
position: relative;
.b_product_item {
......@@ -1175,13 +1054,4 @@
position: absolute;
.sparkBg("homePage/financeAchievement.png");
}
.newUser_btn {
width: 102px;
height: 98px;
right: 10px;
top: 59px;
position: absolute;
.sparkBg("homePage/newUserIcon.png");
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -20,8 +20,8 @@
width: 100%;
height: 1624px;
.webpBg("PrizePage/我的奖品.jpg");
background-size: 750px 1746px;
.webpBg("PrizePage/我的奖品.png");
background-size: 750px 1624px;
background-position: left top;
}
......@@ -81,18 +81,18 @@
position: absolute;
left: 530px;
top: 37px;
width: 157px;
height: 64px;
.webpBg("ResPage/去查看.png");
width: 126px;
height: 49px;
.webpBg("PrizePage/item_btn_bg.png");
}
.itemBtnEd {
position: absolute;
left: 530px;
top: 37px;
width: 157px;
height: 64px;
.webpBg("ResPage/已使用.png");
width: 126px;
height: 49px;
.webpBg("PrizePage/item_btn_bg2.png");
}
}
......
......@@ -11,7 +11,7 @@ import { dateFormatter, getUrlParam } from "@/utils/utils.ts";
@observer
class PrizePage extends React.Component<any, any> {
async componentDidMount() {
resStore.updateInfo();
resStore.updatePrizeList();
}
clickBack = () => {
......
......@@ -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");
}
}
@import "../../res.less";
.newbieModal {
width: 750px;
height: 1624px;
position: absolute;
.bg1, .bg2 {
position: absolute;
left: 82px;
top: 315px;
width: 585px;
height: 874px;
.sparkBg("newbieModal/bg.png");
}
.bg2 {
.sparkBg("newbieModal/bg2.png");
}
.TurnTable1 {
.tt_box {
width: 614px;
height: 614px;
left: 68px;
top: 448px;
position: absolute;
transform: scale(0.75);
.turntable_bg {
width: 614px;
height: 614px;
left: 0;
top: 0;
position: absolute;
.sparkBg("ResPage/转盘背景.png");
}
.prize_item {
width: 70px;
height: 70px;
text-align: center;
color: #6a2913;
font-size: 22px;
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: #e3a754;
.lineClamp1();
font-weight: bold;
}
.prize_img {
width: 80px;
height: 80px;
object-fit: contain;
}
}
}
.ttBtn {
position: absolute;
left: 278px;
top: 895px;
width: 193px;
height: 204px;
.webpBg("ResPage/点击抽奖.png");
}
.drawBtn {
position: absolute;
left: 167px;
top: 1361px;
width: 416px;
height: 142px;
&.enable {
.webpBg("ResPage/可抽奖.png");
}
&.disable {
.webpBg("ResPage/不可抽奖.png");
}
}
}
.feelBtn, .drawBtn {
position: absolute;
left: 120px;
top: 1014px;
width: 510px;
height: 138px;
.sparkBg("newbieModal/feelBtn.png");
}
.drawBtn {
.sparkBg("newbieModal/drawBtn.png");
}
.close {
position: absolute;
left: 346px;
top: 1240px;
width: 58px;
height: 58px;
.webpBg("common/close.png");
}
}
\ No newline at end of file
import { Component } from "react";
import "./newbieModal.less";
import { Button, Toast } from "@grace/ui";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl.tsx";
import { CircleTurntable } from "@spark/circle-turntable";
import { NoPrizePanel } from "../NoPrizePanel/NoPrizePanel";
import { PrizePanel } from "../PrizePanel/PrizePanel";
import { _asyncThrottle } from "@/utils/utils";
import store from "@/store/store";
import API from "@/api";
export class NewbieModal extends Component<any, any> {
componentDidMount() {
}
clickClose = () => {
ModalCtrl.closeModal();
}
turntableRef = null; // 大转盘
btnStarting = false; // 转盘是否启动
drawResultInfo: any = {};
onStop = () => {
this.btnStarting = false;
// resStore.updateInfo();
ModalCtrl.closeModal();
if (this.drawResultInfo?.prizeId == "thanks" || !this.drawResultInfo?.prizeId) {
ModalCtrl.showModal(NoPrizePanel, {type: 'new_turntable', ...this.drawResultInfo});
} else {
ModalCtrl.showModal(PrizePanel, {type: 'new_turntable', optionImg: this.drawResultInfo?.prizeImg, optionName: this.drawResultInfo?.prizeName});
}
}
// 开始抽奖
drawHandle = _asyncThrottle(async () => {
const {actPrizeVO, type} = this.props || {};
if(type == 1) {
this.clickClose();
// @ts-ignore
store.homeRoot.scrollTop = 1800 * window.remScale;
return;
}
if (this.btnStarting) return false;
// if (store.indexData.currentTime >= resStore.info.drawEndTime) {
// return Toast.show("活动已结束");
// }
// if (resStore.info.remainDrawTime <= 0) {
// return Toast.show("已抽过奖哦");
// }
this.btnStarting = true;
const { success, data } = await API.newbieDraw();
await store.updateIndex();
if (!success) {
this.btnStarting = false;
return;
}
this.drawResultInfo = data;
this.turntableRef.launch();
const index = actPrizeVO?.findIndex((item) => item.prizeId === this.drawResultInfo.prizeId);
if(index == -1) return;
this.turntableRef.braking(index);
});
render() {
const { type, actPrizeVO } = this.props || {};
return <div className="newbieModal modal_center">
<div className={`bg${type}`}/>
{actPrizeVO?.length > 0 && <div className="TurnTable1">
<CircleTurntable
className="tt_box"
// @ts-ignore
ref={(ref) => (this.turntableRef = ref)}
options={actPrizeVO}
angleOffset={180 / 6 + 10} // 角度偏移量
radian={100} // 奖项半径
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>}
{type == 1 && <Button className="feelBtn md12" onClick={this.drawHandle}/>}
{type == 2 && <Button className="drawBtn md13" onClick={this.drawHandle}/>}
<Button className="close" onClick={this.clickClose}/>
</div>
}
}
......@@ -13,7 +13,11 @@ class Rulepop extends React.Component {
constructor(props) {
super(props);
}
componentDidMount() {
if (!store.ruleInfo) {
store.initRule()
}
}
handleClose = _asyncThrottle(() => {
ModalCtrl.closeModal()
......@@ -23,7 +27,7 @@ class Rulepop extends React.Component {
return (
<div className="rulepop modal_center">
<span className="bg"></span>
<div className="text" dangerouslySetInnerHTML={{ __html: store.indexData.ruleText }}></div>
<div className="text" dangerouslySetInnerHTML={{ __html: store.ruleInfo }}></div>
<Button className="close" onClick={this.handleClose} />
</div>
);
......
......@@ -8,19 +8,19 @@
position: absolute;
.bg {
left: 82px;
top: 406px;
width: 585px;
height: 711px;
left: 99px;
top: 206px;
width: 650px;
height: 941px;
position: absolute;
.sparkBg("rulePop/bg.png");
}
.text {
width: 510px;
height: 540px;
left: 120px;
top: 530px;
width: 455px;
height: 600px;
left: 144px;
top: 500px;
position: absolute;
font-size: 24px;
line-height: 30px;
......
'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");
}
}
......@@ -9,6 +9,7 @@ import { _asyncThrottle, formatThousand } from '@/utils/utils';
import store from '@/store/store';
import API from '@/api';
import TaskPanel from '@/panels/taskPanel/index.jsx';
import { weekList } from "@/contants"
@observer
class SignCom extends React.Component {
constructor(props) {
......@@ -53,37 +54,19 @@ class SignCom extends React.Component {
render() {
const { checkIn, taskWealth } = store.indexData
return (
<div className="sign_section">
<span className="sign_section_bg"></span>
<span className="sign_tips">最高可得{((checkIn?.totalExperienceNum || 0) / 10000).toFixed(0)}万理财体验金</span>
{checkIn?.todayCheckIn
? <Button className="signed_btn md9" onClick={this.signedHandle}></Button>
: <Button className="sign_btn md9" onClick={this.signHandle}></Button>
}
<span className="sign_total_tips">{`已累计签到${checkIn?.totalCheckIn}天`}</span>
<span className="sign_big_btn md10" onClick={() => {
if (!store.judgeActTime()) return;
ModalCtrl.showModal(TaskPanel)
}}>{Math.floor(taskWealth / 10000) > 0 ? `再领${Math.floor(taskWealth / 10000)}万理财体验金` : '查看更多任务'}</span>
<div className="sign_progress">
<span className="progress_bg"></span>
<div className="progress_bar_box">
<div className="progress_bar" style={{ width: `${store.percent}%` }}></div>
<div className="no-center-qes">
<div className="sign-module">
<div className="week-list-box">
{
weekList.map((item, index) => (
<Button className="week-item" key={index}>
<div className="week-item-text">{item}</div>
<div className="task-title"></div>
</Button>
))
}
</div>
{checkIn?.checkInConfig?.map((item, index) => {
return (
<div
className={`step_item step_item${index + 1} ${item.days > checkIn?.totalCheckIn ? 'locked' : item.status ? 'received' : 'signed'}`}
key={`sign_${index}`}
onClick={() => this.signPrizeHandle(item)}
>
<span className="prize_bg"></span>
<div className="prize_amount">{((item.experienceNum || 0) / 10000).toFixed(0)}<span className="unit"></span></div>
<span className="prize_day">累计{item.days}</span>
</div>
)
})}
<Button className="sign_btn"></Button>
</div>
</div>
);
......
@import "../../res.less";
.sign_section {
width: 713px;
height: 433px;
left: 19px;
// top: 1521px;
position: relative;
margin-top: 21px;
.sign_section_bg {
width: 712px;
height: 433px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("homePage/sign_section_bg.png");
}
.sign_tips {
width: 434px;
height: 24px;
left: 180px;
top: 50px;
position: absolute;
font-size: 24px;
line-height: 24px;
color: rgb(145, 99, 38);
}
.sign_btn {
width: 204px;
height: 73px;
left: 490px;
top: 20px;
position: absolute;
.sparkBg("homePage/sign_btn_bg.png");
font-size: 26px;
line-height: 25px;
color: rgba(220, 80, 63, 1);
font-weight: bold;
.flex_center();
// .breathAnimation();
}
.signed_btn {
width: 211px;
height: 75px;
left: 490px;
top: 20px;
position: absolute;
.sparkBg("homePage/signed_btn_bg.png");
font-size: 26px;
line-height: 25px;
color: rgba(108, 108, 108, 1);
font-weight: bold;
.flex_center();
}
.sign_total_tips {
display: inline-block;
width: 172px;
height: 30px;
left: 27px;
top: 110px;
position: absolute;
font-size: 20px;
color: rgb(145, 99, 38);
line-height: 30px;
text-align: center;
// background-color: #ff3333;
}
.sign_big_btn {
width: 425px;
text-align: center;
height: 98px;
line-height: 98px;
color: #ffffff;
font-weight: bold;
left: 143px;
bottom: 20px;
position: absolute;
font-size: 32px;
.sparkBg("homePage/signBigBtn.png");
}
.sign_progress {
width: 591px;
height: 109px;
left: 60px;
top: 158px;
position: absolute;
.progress_bg {
width: 576px;
height: 20px;
left: 0px;
top: 35px;
.no-center-qes {
padding-left: 18px;
.sign-module {
position: relative;
width: 732px;
height: 407px;
.webpBg("homePage/sign_bg.png");
margin: 0 auto 6px;
.week-list-box {
width: 654px;
height: 165px;
position: absolute;
background-color: #f8cec6;
border-radius: 10px;
}
.progress_bar_box {
width: 576px;
height: 20px;
left: 0px;
top: 35px;
position: absolute;
.progress_bar {
width: 0%;
height: 20px;
left: 0px;
top: 0px;
position: absolute;
background-image: linear-gradient(90deg, rgb(253, 118, 95) 8%, #ff3333 100%);
border-radius: 10px 10px 10px 10px;
}
}
.step_item {
width: 71px;
height: 109px;
left: 72px;
top: 0px;
position: absolute;
&.step_item2 {
left: 216px;
}
&.step_item3 {
left: 359px;
}
&.step_item4 {
left: 510px;
}
&.locked .prize_bg {
.sparkBg("homePage/prize_locked.png");
}
&.signed .prize_bg {
.sparkBg("homePage/prize_to_receive.png");
}
&.received .prize_bg {
.sparkBg("homePage/prize_received.png");
}
&.locked,
&.received {
.prize_amount {
opacity: 0.7;
}
}
.prize_bg {
width: 71px;
height: 77px;
left: 0px;
top: 0px;
position: absolute;
}
.prize_amount {
left: 36px;
top: 120px;
display: flex;
justify-content: space-around;
align-items: center;
.week-item {
position: relative;
width: 82px;
height: 107px;
.webpBg("homePage/sign_task.png");
}
.week-item-text {
width: 100%;
height: 21px;
left: 0px;
top: 12px;
height: 30px;
text-align: center;
color: #a34b09;
line-height: 30px;
font-size: 22px;
position: absolute;
font-size: 28px;
color: rgba(238, 78, 50, 1);
font-weight: bold;
.flex_center();
.unit {
height: 30px;
font-size: 18px;
line-height: 34px;
}
left: 0;
bottom: 0;
}
.prize_day {
width: 91px;
height: 19px;
left: -10px;
top: 90px;
.task-title {
width: 84px;
height: 28px;
position: absolute;
opacity: 0.6;
font-size: 20px;
line-height: 19px;
color: rgba(0, 0, 0, 1);
text-align: center;
top: -26px;
left: -1px;
.webpBg("homePage/sign_task_title.png");
}
}
.sign_btn {
width: 500px;
height: 81px;
position: absolute;
left: 149px;
top: 280px;
.webpBg("homePage/sign_btn.png");
}
}
}
\ No newline at end of file
......@@ -13,9 +13,10 @@ import FirstPop from '@/panels/firstPop/firstPop';
import Tipspop from '@/panels/tipspop/tipspop';
import { IS_OTHER_APP, isWeiXin, queryAppFundDetail } from '@/AppTools';
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 +28,13 @@ class Store {
/** 前端开发配置 */
frontVariable: {
// 虚拟盘项目id
virtualProjectId: string,
homeTip: any;
shareInfo: any,
ruleImg?: string,
} = {
virtualProjectId: '',
shareInfo: {
title: "",
desc: "",
......@@ -62,65 +66,23 @@ class Store {
}
indexData: {
redRainConfig?: any,
actStartTime?: number,
actEndTime?: number,
currentTime?: number, // 前端自定义
// 终点倒计时时间戳
endPoint?: number,
ruleText?: string,
uid?: string,
giftPop?: {
type?: string,
actPrizeVO?: Array<{
prizeName?: string,
prizeImg?: string,
prizeId?: string,
}>
}
// 大明星配置
bigStartConfig?: Array<{
prizeImg?: string,
titleImg?: string,
min?: number,
max?: number,
unlockedPrizeImg?: string,
}>,
// 首次体验金弹窗
firstMoneyPop?: {
notifyText?: string,
experienceNum?: number,
},
actStartTime: number,
actEndTime: number,
// 模拟资产
virtualAssets?: {
preDayIncome?: string,
availableFunds?: string,
totalMoney?: string,
realBuyJumpUrl?: string,
totalIncome?: number,
virtualAssets: {
preDayIncome: number,
availableFunds: number,
totalMoney: number,
totalIncome: number,
profit: string
},
// 签到模块
checkIn?: {
totalCheckIn?: number,
todayCheckIn?: boolean, // 今日是否签到(true签到)
totalExperienceNum?: number, // 累计可获得最高体验金数量
checkInConfig?: Array<{
id?: number,
days?: number,
experienceNum?: number,
status?: boolean, // true已领奖
}>,
},
// 推荐产品配置
// 产品配置
recommendProductConfig?: Array<{
name?: string,
shenShuGuiZei?: string,
touZiQiXianText?: string,
qigouText?: string,
baiFenBiText?: string,
fengXian?: string,
code?: string,
status?: string, // 0推荐,1不推荐
realBuyJumpUrl?: string,
mineProduct?: boolean, // 我的产品(true是)
rate?: number, // 利率(需要除100展示)
......@@ -128,14 +90,31 @@ class Store {
totalProfit?: number, // 累计收益,mineProduct为true时有值,单位:分
positionMoney?: number, // 持仓金额,mineProduct为true时有值,单位:分
}>,
// 待存储产品code
codeList?: Array<{
code?: string,
type?: number, // 产品类型(0-非现金,1-现金)
}>,
endPop?: boolean,
productEnd?: boolean, // 理财到达终点,true-是
} = {};
productEnd: boolean,
endPoint: number,
giftPop: {
actPrizeVO?: Array<{
prizeName?: string,
prizeImg?: string,
prizeId?: string,
}>
pop: boolean,
show: boolean
},
lastMonthRankPop: boolean,
overallRankPop: {
prizeId: string,
prizeImg: string,
prizeName: string,
},
bannerInfo: {
bannerImg: string,
bannerLink: string,
}[],
currentTime: number,
isBlack: boolean,
signInStatus: boolean,
} = {} as any;
percent = 0;
async judgeIsWhiteUser() {
......@@ -163,10 +142,7 @@ class Store {
}
homeRoot = null;
/*
leftOpenTime = 0;
leftOpenId = null;
*/
async updateIndex() {
const { success, data, timeStamp } = await API.index();
if (!success) {
......@@ -176,38 +152,44 @@ 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 (redRainConfig?.canJoin) {
// // 在时间段内,显示红包雨弹窗
// ModalCtrl.showModal(RedPackRainModal, { redRainId: redRainConfig?.redRainId });
// }
// if (firstMoneyPop) {
// ModalCtrl.showModal(FirstPop, firstMoneyPop);
// }
}
/*
......
......@@ -483,4 +483,25 @@ export function generateUUID() {
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
});
return uuid;
}
/**
* 将“分”转换为“元”
* @param {number | string} cents - 金额(单位:分),可以是数字或字符串
* @returns {string} 格式化后的元(保留两位小数,如 "12.34")
*/
export function centsToYuan(cents) {
// 处理 null、undefined 或非数字输入
if (cents == null || (typeof cents === 'string' && cents.trim() === '')) {
return '0.00';
}
// 转换为数字
const num = Number(cents);
// 使用整数除法避免浮点误差:先转为字符串再处理更安全
// 方法:除以 100 并保留两位小数
const yuan = (num / 100).toFixed(2);
return yuan;
}
\ No newline at end of file
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