Commit ea48a030 authored by haiyoucuv's avatar haiyoucuv

init

parent 8c0fd573
......@@ -25,7 +25,7 @@ export default [
"test_config_02": "111",
// 规则长图
"ruleImg": '//yun.duiba.com.cn/polaris/bg.18539c61e0103e01a339dd268558b2559ab178ba.png',
shareInfo: [
{
"title": 'normal',
......@@ -59,7 +59,7 @@ export default [
},
},
{
url: '/common/records.do',
url: '/records.do',
response: ({ query }) => {
return {
"code": "code",
......
......@@ -26,7 +26,7 @@ const API = generateAPI({
},
// 奖品记录
records: "common/records.do",
records: "records.do",
// 红包补领
redpacket: "common/moneyReissue.do",
......
......@@ -163,9 +163,11 @@
font-size: 30px;
color: #262626;
position: absolute;
width: 350px;
left: 164px;
top: 39px;
font-weight: bold;
.lineClamp1();
}
.itemDate {
......
......@@ -7,6 +7,7 @@ import TurnTable from "@/pages/ResPage/TurnTable/TurnTable.tsx";
import resStore from "@/store/ResStore.ts";
import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import HomePage from "@/pages/HomePage/HomePage.tsx";
import { dateFormatter } from "@/utils/utils.ts";
@observer
class ResPage extends React.Component<any, any> {
......@@ -27,10 +28,14 @@ class ResPage extends React.Component<any, any> {
this.setState({ tab, });
}
clickItem = (item) => {
}
render() {
const { tab } = this.state;
const { titleImg, interval, cycle, profit, remainDrawTime, prizeInfo, amount } = resStore.info;
const { prizeList, info } = resStore;
const { titleImg, interval, cycle, profit, remainDrawTime, prizeInfo, amount } = info;
const tabCls = classNames(styles.tab, {
[styles.tab1]: tab === 1,
......@@ -64,17 +69,20 @@ class ResPage extends React.Component<any, any> {
</div>
<div style={{ display: tab == 2 ? "block" : "none" }}>
<div className={styles.listNone}></div>
<div className={styles.prizeList} style={{ display: tab == 2 ? "block" : "none" }}>
{new Array(100).fill(1).map((_, index) => {
return <div className={styles.prizeItem}>
<img className={styles.itemImg}/>
<div className={styles.itemName}>奖品名称</div>
<div className={styles.itemDate}>2024-09-22 00:02:56 获得</div>
<Button className={styles.itemBtn}/>
{
prizeList?.length
? <div className={styles.prizeList} style={{ display: tab == 2 ? "block" : "none" }}>
{prizeList?.map((item, index) => {
return <div className={styles.prizeItem}>
<img className={styles.itemImg} src={item.extra.icon}/>
<div className={styles.itemName}>{item.extra.name}</div>
<div className={styles.itemDate}>{dateFormatter(item.gmtCreate, "yyyy-MM-dd hh:mm:ss 获得")}</div>
<Button className={styles.itemBtn} onClick={() => this.clickItem(item)}/>
</div>
})}
</div>
})}
</div>
: <div className={styles.listNone}></div>
}
</div>
<Button className={styles.backBtn} onClick={this.clickBack}/>
......
......@@ -18,7 +18,16 @@ class ResStore {
prizeInfo: [],
};
prizeList = [];
async updatePrizeList() {
const { success, data } = await API.records();
if (!success) return;
this.prizeList = data;
}
async updateInfo() {
this.updatePrizeList();
const { success, data } = await API.drawIndex();
if (!success) return;
this.info = data;
......
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