Commit b1475247 authored by 俞嘉婷's avatar 俞嘉婷

feat: 任务弹窗

parent 6b1a631f
......@@ -6,7 +6,7 @@ module.exports = {
item: [
{
buttonText: "去完成",
code: "browse_zeng_yuan_1",
code: "zy_1_1",
completedSize: 1,
desc: null,
extra: '{"answerTimes":0,"drawTimes":0}',
......@@ -103,7 +103,7 @@ module.exports = {
},
{
buttonText: "去完成",
code: "common_sign",
code: "checkin",
completedSize: 0,
desc: null,
extra: '{"taskCode":"task_third_1_asset_growth_1","answerTimes":1,"drawTimes":0,"gear":1}',
......@@ -124,52 +124,6 @@ module.exports = {
taskStatus: 0,
title: "签到任务",
},
{
buttonText: "去完成",
code: "common_sign",
completedSize: 0,
desc: null,
extra: '{"taskCode":"task_third_1_asset_growth_1","answerTimes":1,"drawTimes":0,"gear":1}',
icon: "//yun.duiba.com.cn/polaris/Image2.b9419702802eff6ec5ba50ac072086df45409bfd.jpg",
id: "abwha4qz",
index: null,
indexes: null,
intervalLimitSize: 1,
intervalType: 3,
jumpUrl: "appjumpurl$$$ykjumpurl$$$otherjumpurl",
options: null,
playwayId: "customTask1",
prizePendingCode: null,
prizePendingCodeList: null,
ruleId: "spPrize@undefined@undefined",
sendPrize: null,
subTitle: "抽奖次数+1",
taskStatus: 1,
title: "签到任务",
},
{
buttonText: "去完成",
code: "common_sign",
completedSize: 0,
desc: null,
extra: '{"taskCode":"task_third_1_asset_growth_1","answerTimes":1,"drawTimes":0,"gear":1}',
icon: "//yun.duiba.com.cn/polaris/Image2.b9419702802eff6ec5ba50ac072086df45409bfd.jpg",
id: "abwha4qz",
index: null,
indexes: null,
intervalLimitSize: 1,
intervalType: 3,
jumpUrl: "appjumpurl$$$ykjumpurl$$$otherjumpurl",
options: null,
playwayId: "customTask1",
prizePendingCode: null,
prizePendingCodeList: null,
ruleId: "spPrize@undefined@undefined",
sendPrize: null,
subTitle: "抽奖次数+1",
taskStatus: 2,
title: "签到任务",
},
],
startTimestamp: 1713841378000,
timestamp: 1714284614182,
......
src/assets/TaskPop/bg.png

60 KB | W: | H:

src/assets/TaskPop/bg.png

129 KB | W: | H:

src/assets/TaskPop/bg.png
src/assets/TaskPop/bg.png
src/assets/TaskPop/bg.png
src/assets/TaskPop/bg.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/TaskPop/bg_item.png

3.76 KB | W: | H:

src/assets/TaskPop/bg_item.png

3.19 KB | W: | H:

src/assets/TaskPop/bg_item.png
src/assets/TaskPop/bg_item.png
src/assets/TaskPop/bg_item.png
src/assets/TaskPop/bg_item.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/TaskPop/close.png

1.27 KB | W: | H:

src/assets/TaskPop/close.png

1.34 KB | W: | H:

src/assets/TaskPop/close.png
src/assets/TaskPop/close.png
src/assets/TaskPop/close.png
src/assets/TaskPop/close.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/TaskPop/complete_btn.png

11.1 KB | W: | H:

src/assets/TaskPop/complete_btn.png

11 KB | W: | H:

src/assets/TaskPop/complete_btn.png
src/assets/TaskPop/complete_btn.png
src/assets/TaskPop/complete_btn.png
src/assets/TaskPop/complete_btn.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/TaskPop/receive_btn.png

3.17 KB | W: | H:

src/assets/TaskPop/receive_btn.png

12.8 KB | W: | H:

src/assets/TaskPop/receive_btn.png
src/assets/TaskPop/receive_btn.png
src/assets/TaskPop/receive_btn.png
src/assets/TaskPop/receive_btn.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -23,7 +23,6 @@
top: 65px;
position: fixed;
.sparkBg("PrizePage/back.png");
// .sparkBg("TaskPop/longBackBtn.png");
}
.countdown {
......
......@@ -145,11 +145,8 @@ class Taskpop extends React.Component {
const {taskList} = taskStore;
return (
<div className="taskpop topPop_move">
{/* <SvgaPlayer src={`${RES_PATH}svga/5输出弹窗氛围1.svga`} className="basic_svga" /> */}
{/* <span className="icon2"></span> */}
<span className="bg"></span>
<Button className="close md29" onClick={this.close}></Button>
<span className="bg_list"></span>
<div className="list">
{
taskList?.length > 0 &&
......
@import "../../res.less";
.taskpop {
width: 750px;
height: 1077px;
height: 983px;
left: 0px;
position: absolute;
bottom: 0px;
// animation: frombottom 600ms forwards;
.bg {
width: 750px;
height: 1059px;
height: 983px;
left: 0px;
bottom: 0;
position: absolute;
.sparkBg("TaskPop/bg.png");
}
.icon2 {
width: 573px;
height: 491px;
left: 94px;
top: -170px;
position: absolute;
.sparkBg("TaskPop/icon.png");
}
.close {
width: 62px;
height: 62px;
left: 656px;
top: -15px;
left: 659px;
top: 93px;
position: absolute;
.sparkBg("TaskPop/close.png");
}
.bg_list {
width: 687px;
height: 685px;
left: 31px;
top: 99px;
position: absolute;
// .sparkBg("TaskPop/bg_list.png");
}
.list {
width: 719px;
height: 843px;
left: 21px;
top: 191px;
width: 711px;
height: 690px;
left: 24px;
top: 292px;
position: absolute;
overflow-y: scroll;
.item {
margin-bottom: 3px;
width: 719px;
height: 162px;
width: 711px;
height: 155px;
left: 0px;
top: 0px;
position: relative;
margin-bottom: 13px;
.bg_item {
width: 710px;
height: 162px;
width: 711px;
height: 155px;
left: 0px;
top: 0px;
position: absolute;
......@@ -75,7 +60,7 @@
// height: 30px;
font-size: 34px;
// line-height: 30px;
color: #f99823;
color: rgb(47, 83, 28);
.lineClamp1();
font-weight: 700;
margin-bottom: 10px;
......@@ -83,8 +68,8 @@
.subtitle {
width: 100%;
// max-height: 50px;
font-size: 25px;
color: #c18c52;
font-size: 24px;
color: rgb(80, 157, 42);
// line-height: 25px;
// .lineClampN(2);
}
......@@ -93,7 +78,7 @@
width: 104px;
height: 105px;
left: 58px;
top: 23px;
top: 25px;
position: absolute;
border-radius: 50%;
}
......@@ -103,14 +88,14 @@
// justify-content: center;
width: 161px;
height: 63px;
left: 527px;
top: 43px;
left: 501px;
top: 45px;
position: absolute;
.receive_btn {
width: 132px;
height: 47px;
left: 15px;
top: 8px;
width: 161px;
height: 63px;
left: 0;
top: 0;
position: absolute;
.sparkBg("TaskPop/receive_btn.png");
}
......
......@@ -109,7 +109,7 @@ class Drawpage extends React.Component {
goTask = _throttle(() => {
if (this.btnStarting) return false
store.changePage("")
modalStore.pushPop("Taskpop")
})
render() {
......
......@@ -42,7 +42,7 @@ const taskStore = makeAutoObservable({
switch (true) {
//签到
case code == "common_sign":
case code == TASK_CODE.THIRD_SIGN:
console.info("签到任务");
await taskStore.complete(item);
break;
......@@ -54,8 +54,7 @@ const taskStore = makeAutoObservable({
// modalStore.pushPop("Shareposter", { qrCode: res }, true);
break;
//增员介绍 海报or视频
case code?.indexOf("browse_zeng_yuan") > -1:
// if(code == "browser_zeng_yuan_1"){
case code?.indexOf(TASK_CODE.ZY) > -1:
modalStore.closePop("Taskpop");
modalStore.pushPop("LongImgPop", {
imgUrl: jumpUrl,
......@@ -63,12 +62,11 @@ const taskStore = makeAutoObservable({
await this.complete(item);
},
noCount: false,
type: code == "browse_zeng_yuan_1" ? 1 : 2, //1海报 2视频
type: code == "zy_video" ? 2 : 1, //1海报 2视频
});
// }
break;
case code?.indexOf("browse_shui_yue") > -1:
case code?.indexOf(TASK_CODE.SY) > -1:
await taskStore.complete(item);
break;
// 七秒浏览 or 税优关爱百万任务
......@@ -137,7 +135,7 @@ const taskStore = makeAutoObservable({
await setCookies();
console.info("回调数据", res);
let resObj = res ? JSON.parse(res) : {};
if (curTask?.code?.indexOf("browse_shui_yue") > -1) {
if (curTask?.code?.indexOf(TASK_CODE.SY) > -1) {
//税悦不管时间
const res = await taskStore.complete(curTask);
if (res?.success) {
......@@ -171,11 +169,11 @@ const taskStore = makeAutoObservable({
const res = await API.doCompleted(params);
if(item?.jumpUrl && item?.jumpUrl !== '/' && code.indexOf("browse_shui_yue") > -1) {
if(item?.jumpUrl && item?.jumpUrl !== '/' && code.indexOf(TASK_CODE.SY) > -1) {
location.href = item?.jumpUrl;
}
if (code.indexOf("browse_") > -1 && isWeChat()) {
if (code.indexOf(TASK_CODE.BROWSE_COMMON) > -1 && isWeChat()) {
setTimeout(async () => {
await this.getTaskList();
// await store.getSalesManIndex();
......@@ -206,8 +204,7 @@ const taskStore = makeAutoObservable({
});
// await store.getSalesManIndex();
if (success && data) {
// Toast(`保豆+${data?.options?.[0]?.sendCount || 0}`);
Toast(`点赞次数+${data?.options?.[0]?.sendCount || 0}`);
Toast(`猜谜次数+${data?.options?.[0]?.sendCount || 0}`);
await taskStore.getTaskList();
// await store.getHomeInfo();
}
......
......@@ -66,7 +66,7 @@ export const REG_TEL = /^1[0-9]{10}$/;
*/
export const TASK_CODE = {
/** 签到任务 */
THIRD_SIGN: "sign",
THIRD_SIGN: "checkin",
/** 答题任务 */
ANSRWER: "common_answer",
/** 分享任务 */
......@@ -74,15 +74,19 @@ export const TASK_CODE = {
/** 留资任务 */
FILL: "common_fill",
/** 邀请任务 */
INVITE: "common_invite",
INVITE: "invite",
/** 正常展示的浏览任务:app内有秒限制,根据端内跳转回调算完成;友客端需要链接后拼code值 */
BROWSE_COMMON: "browse_",
BROWSE_COMMON: "browser_",
/** 友客端需要做销售限制特殊展示的浏览任务:app内有秒限制,根据端内跳转回调算完成;友客端不需要链接后拼code值 */
BROWSE_AREA: "btt2_",
/** 展示特殊处理浏览任务:app端不展示去完成按钮 */
BROWSE_SPECIAL_SHOW: "btt3_",
/** 浏览赠险任务(会在bttx_后面追加_zx进行区分):app内无秒限制,点击即完成;友客端需要链接后拼code值 */
BROWSE_INSURE: "_zx",
/** 税优任务 */
SY: "sy_",
/** 增员任务 */
ZY: "zy_"
};
/* 表情包 正则 **/
......
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