Commit 7000fd7e authored by cc's avatar cc

update

parent bc3cd9d3
...@@ -7,92 +7,28 @@ export default [ ...@@ -7,92 +7,28 @@ export default [
"code": "0000000000", "code": "0000000000",
"desc": "OK", "desc": "OK",
"timestamp": 1736580360076, "timestamp": 1736580360076,
"data": [{ "data": [
"name": "东华门街道",
"adCode": "110101001",
"level": 4
},
{ {
"name": "景山街道", "name": "浙江省",
"adCode": "110101002", "adCode": "fugiat ut",
"level": 4 "level": 66790536.01298919
}, },
{ {
"name": "交道口街道", "name": "杭州市",
"adCode": "110101003", "adCode": "aliqua in Excepteur qui",
"level": 4 "level": 57555835.61859158
}, },
{ {
"name": "安定门街道", "name": "西湖区",
"adCode": "110101004", "adCode": "occaecat",
"level": 4 "level": 93591030.11458206
}, },
{ {
"name": "北新桥街道", "name": "哈哈哈哈哈哈哈哈哈哈哈",
"adCode": "110101005", "adCode": "sint eu esse",
"level": 4 "level": 27233221.127899915
},
{
"name": "东四街道",
"adCode": "110101006",
"level": 4
},
{
"name": "朝阳门街道",
"adCode": "110101007",
"level": 4
},
{
"name": "建国门街道",
"adCode": "110101008",
"level": 4
},
{
"name": "东直门街道",
"adCode": "110101009",
"level": 4
},
{
"name": "和平里街道",
"adCode": "110101010",
"level": 4
},
{
"name": "前门街道",
"adCode": "110101011",
"level": 4
},
{
"name": "崇文门外街道",
"adCode": "110101012",
"level": 4
},
{
"name": "东花市街道",
"adCode": "110101013",
"level": 4
},
{
"name": "龙潭街道",
"adCode": "110101014",
"level": 4
},
{
"name": "体育馆路街道",
"adCode": "110101015",
"level": 4
},
{
"name": "天坛街道",
"adCode": "110101016",
"level": 4
},
{
"name": "永定门外街道",
"adCode": "110101017",
"level": 4
} }
] ],
} }
}, },
......
export default [
{
url:'/game/queryBoundYk.do',
method: 'get',
response: ({ query }) => {
return {
"code": null,
"data": {
"boundYkCode": '111'
},
"message": null,
"success": true,
"timeStamp": 1747813922159
}
}
},
{
url:'/home/savePrizeAddress.do',
method: 'get',
response: ({ query }) => {
return {
"code": null,
"data": {
"boundYkCode": '111'
},
"message": null,
"success": true,
"timeStamp": 1747813922159
}
}
},
{
url: '/crecord/getrecordmn',
method: 'get',
response: ({ query }) => {
return {
"records": [
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "sp_bean",
"bonus": true,
"title": "保豆-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": true,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": true, // true expire
"projectId": "p8a32cdec",
"extraJson": "{\"expireTime\":\"2023-09-01 00:00:00\"}",
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "a11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"drawStatus":'2',
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"recordInfo":false,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p506fcd4e"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"drawStatus":'2',
"title": "b11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p506fcd4e"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
{
"img": "//yun.dui88.com/images/202203/unet6gpw1c.jpeg",
"itemType": "object",
"bonus": false,
"title": "11奖品名称超级长的实物奖品-漫漫测试-不可删除-不可删除-奖品名称超级长",
"type": 1,
"orderTypeTitle": "星速台活动获得",
"recordId": 500727400,
"new": false,
"quantity": 1,
"gmtCreate": "2024-06-18 00:10:38",
"url": "/aaw/projectx/takePrize?projectOrderNo=500727400",
"statusText": "<span>已中奖</span>",
"invalid": false,
"projectId": "p8a32cdec"
},
],
"success": true,
"nextPage": false,
"projectTabList": [
{
"index": 28,
"prizeExpire": "2025-06-30 23:59:59",
"projectId": "p506fcd4e",
"projectName": "非遗大冒险",
"queryBindAgentCodeUrl": "game/queryBoundYk.do",
"rbClaim": true,
"saveAddressUrl": "home/savePrizeAddress.do",
"showProd": true
},
{
"index": 26,
"prizeExpire": "2025-05-31 23:59:59",
"projectId": "pb03cc208",
"projectName": "春游记",
"queryBindAgentCodeUrl": "https://96094-2-activity.m.dexfu.cn/projectx/pb03cc208/agent/queryBoundYk.do",
"rbClaim": true,
"saveAddressUrl": "https://96094-2-activity.m.dexfu.cn/projectx/pd956d33c/home/savePrizeAddress.do",
"showProd": true
},
{
"index": 24,
"prizeExpire": "2025-04-30 23:59:59",
"projectId": "p7925c40f",
"projectName": "闪亮瞬间",
"queryBindAgentCodeUrl": "https://96094-2-activity.m.dexfu.cn/projectx/p7925c40f/agent/queryBoundYk.do",
"rbClaim": true,
"saveAddressUrl": "https://96094-2-activity.m.dexfu.cn/projectx/pd956d33c/home/savePrizeAddress.do",
"showProd": true
},
{
"index": 21,
"prizeExpire": "2025-03-31 23:59:59",
"projectId": "p2b0b8ec0",
"projectName": "你猜谜我送福",
"queryBindAgentCodeUrl": "https://96094-2-activity.m.dexfu.cn/projectx/p2b0b8ec0/game/queryBoundYk.do",
"rbClaim": true,
"saveAddressUrl": "https://96094-2-activity.m.dexfu.cn/projectx/pd956d33c/home/savePrizeAddress.do",
"showProd": true
},
{
"index": 20,
"prizeExpire": "2025-02-28 23:59:59",
"projectId": "pafc25ff1",
"projectName": "许愿迎新新",
"queryBindAgentCodeUrl": "https://96094.activity-19.m.duiba.com.cn/projectx/pafc25ff1/agent/queryBoundYk.do",
"rbClaim": true,
"saveAddressUrl": "https://96094.activity-19.m.duiba.com.cn/projectx/pd956d33c/home/savePrizeAddress.do",
"showProd": true
},
{
"index": 18,
"prizeExpire": "2025-01-31 23:59:59",
"projectId": "p10f61c06",
"projectName": "欢乐套福运",
"queryBindAgentCodeUrl": "https://96094.activity-19.m.duiba.com.cn/projectx/p10f61c06/agent/queryBoundYk.do",
"rbClaim": true,
"saveAddressUrl": "https://96094.activity-19.m.duiba.com.cn/projectx/pd956d33c/home/savePrizeAddress.do",
"showProd": true
},
{
"index": 16,
"prizeExpire": "2024-12-31 23:59:59",
"projectId": "p0116c1e2",
"projectName": "心愿奇缘",
"queryBindAgentCodeUrl": "https://96094.activity-19.m.duiba.com.cn/projectx/p0116c1e2/agent/queryBoundYk.do",
"rbClaim": true,
"saveAddressUrl": "https://96094.activity-19.m.duiba.com.cn/projectx/pd956d33c/home/savePrizeAddress.do",
"showProd": true
},
{
"index": 14,
"prizeExpire": "2024-11-30 23:59:59",
"projectId": "pb2998113",
"projectName": "寻宝大富翁",
"queryBindAgentCodeUrl": "https://96094.activity-19.m.duiba.com.cn/projectx/pb2998113/game/queryBoundYk.do",
"rbClaim": true,
"saveAddressUrl": "https://96094.activity-19.m.duiba.com.cn/projectx/pd956d33c/home/savePrizeAddress.do",
"showProd": true
},
{
"index": 12,
"prizeExpire": "2024-10-31 23:59:59",
"projectId": "pdf1213f6",
"projectName": "金秋豪礼,拾起来!",
"rbClaim": false,
"showProd": true
},
{
"index": 10,
"prizeExpire": "2024-09-30 23:59:59",
"projectId": "pe0fc8b24",
"projectName": "激情畅游燃起来!",
"rbClaim": false,
"showProd": true
},
{
"index": 7,
"prizeExpire": "2024-09-01 00:00:00",
"projectId": "pea5f7eec",
"projectName": "环球迪士尼,嗨起来!",
"rbClaim": false,
"showProd": true
},
{
"index": 6,
"prizeExpire": "2024-09-01 00:00:00",
"projectId": "pb15ee031",
"projectName": "童心绘聚",
"rbClaim": false,
"showProd": true
},
{
"index": 5,
"prizeExpire": "2024-09-01 00:00:00",
"projectId": "pe5280101",
"projectName": "共享繁花 ",
"rbClaim": false,
"showProd": true
},
{
"index": 4,
"prizeExpire": "2024-09-01 00:00:00",
"projectId": "pcf38eb0d",
"projectName": "多巴胺运动馆",
"rbClaim": false,
"showProd": true
},
{
"index": 3,
"prizeExpire": "2024-09-01 00:00:00",
"projectId": "pbe6841be",
"projectName": "女神驾到",
"rbClaim": false,
"showProd": true
},
{
"index": 2,
"prizeExpire": "2024-09-01 00:00:00",
"projectId": "p0d91ed62",
"projectName": "龙运当头",
"rbClaim": false,
"showProd": true
},
{
"index": 1,
"prizeExpire": "2024-09-01 00:00:00",
"projectId": "paccb5389",
"projectName": "新年新愿",
"rbClaim": false,
"showProd": true
}
],
"invalidPage": false
}
},
},
]
\ No newline at end of file
export default [
{
url: '/task_1/doCompleted.do',
method: 'post',
response: ({ query }) => {
return {
"code": null,
"data": {
"timestamp": -35003075.452821575,
"sendPrize": true,
"icon": "qui nisi amet magna",
"desc": "dolore voluptate",
"code": "browser_insurance_C",
"id": "nulla elit exercitation ea", // 任务id
"buttonText": "voluptate tempor",
"extra": "elit sit sunt laboris",
"options": [
{
"url": "in non",
"optionId": "dolore",
"sendCount": "id anim",
"index": 57723729.46539241,
"ruleId": "dolore",
"prizeId": "dolore laborum",
"optionName": "elit sed culpa adipisicing",
"optionImg": "quis",
"prizeType": -87661811
}
]
},
"message": null,
"success": true,
"timeStamp": 1747813922159
}
}
},
{
url: '/task_1/sendPrize.do',
method: 'post',
response: ({ query }) => {
return {
"code": null,
data: {
extra: "1",
options: [
{
optionId: "officia",
optionImg: "id ipsum",
optionName: "nulla cupidatat",
position: 63597682.59836808,
prizeId: "incididunt",
prizeType: -3079265.394056648,
ruleId: "reprehenderit aute deserunt",
url: "sunt",
sendCount: 3,
},
{
optionId: "esse ut laboris dolor reprehenderit",
optionImg: "anim ut",
optionName: "occaecat tempor aliquip amet",
position: -93793131.65854914,
prizeId: "in enim Ut anim",
prizeType: -83505282.2731905,
ruleId: "incididunt et",
url: "ipsum eu laborum nostrud",
sendCount: 3,
},
{
optionId: "dolor do in et consectetur",
optionImg: "laborum Excepteur sit",
optionName: "irure officia eiusmod",
position: 62914584.39450729,
prizeId: "nostrud nisi et ipsum",
prizeType: -87226701.41384046,
ruleId: "in labore reprehenderit Duis est",
url: "pariatur sit",
sendCount: 3,
},
{
optionId: "irure in reprehenderit sed",
optionImg: "reprehenderit",
optionName: "fugiat",
position: 86398415.66680664,
prizeId: "dolor elit adipisicing",
prizeType: -51881234.24195088,
ruleId: "minim occaecat",
url: "enim eiusmod",
sendCount: 3,
},
],
},
"message": null,
"success": true,
"timeStamp": 1747813922159
}
}
},
{
url: '/task_1/queryTasks.do',
method: 'get',
response: ({ query }) => {
return {
"code": null,
data: {
endTimestamp: 1780196578000,
item: [
{
buttonText: "去完成",
code: "browser_zeng_yuan_1",
completedSize: 1,
desc: null,
extra: '{"answerTimes":0,"drawTimes":0}',
icon: "//yun.duiba.com.cn/polaris/Image2.b9419702802eff6ec5ba50ac072086df45409bfd.jpg",
id: "0l0cha7n",
index: null,
indexes: null,
intervalLimitSize: 1,
intervalType: 4,
jumpUrl: "//yun.duiba.com.cn/aurora/assets/27f733e7771780689de2169ed291cad18feeab42.png",
options: [
{
degree: null,
icon: null,
icon2: null,
id: "sp_draw_times",
index: null,
name: "完成任务发放答题次数占位道具",
prizeId: "sp_draw_times",
prizeType: null,
refId: null,
refType: null,
sendCount: 1,
},
],
playwayId: "customTask1",
prizePendingCode: "",
prizePendingCodeList: [{ code: "", index: 1 }],
ruleId: "spPrize@sp_draw_times@1",
sendPrize: true,
subTitle: "抽奖次数+1抽奖次数+1抽奖次数+1",
taskStatus: 2,
title: "邀请任务",
},
{
buttonText: "去完成",
code: "browse_zeng_yuan_2",
completedSize: 1,
desc: null,
extra: '{"answerTimes":0,"drawTimes":0}',
icon: "//yun.duiba.com.cn/polaris/Image2.b9419702802eff6ec5ba50ac072086df45409bfd.jpg",
id: "sc2o1emu",
index: null,
indexes: null,
intervalLimitSize: 1,
intervalType: 4,
jumpUrl: "https://doublerecording-prd-new.obs.cn-south-1.myhuaweicloud.com/bigCorse/%E6%B6%88%E4%BF%9D%E6%B4%BB%E5%8A%A8/VIP%E6%9C%8D%E5%8A%A1%E5%AE%A3%E4%BC%A0/2024%E5%B9%B4VIP%E6%9C%8D%E5%8A%A1%E5%AE%A3%E4%BC%A0%E8%A7%86%E9%A2%91%EF%BC%88%E5%B0%8F%E6%A0%BC%E5%BC%8F%EF%BC%89.mp4",
options: [
{
degree: null,
icon: null,
icon2: null,
id: "sp_draw_times",
index: null,
name: "完成任务发放答题次数占位道具",
prizeId: "sp_draw_times",
prizeType: null,
refId: null,
refType: null,
sendCount: 1,
},
],
playwayId: "customTask1",
prizePendingCode: "",
prizePendingCodeList: [{ code: "", index: 1 }],
ruleId: "spPrize@sp_draw_times@1",
sendPrize: true,
subTitle: "抽奖次数+1",
taskStatus: 0,
title: "看视频15s",
},
{
buttonText: "去完成",
code: "common_answer",
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: 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: 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: 0,
title: "签到任务",
},
],
startTimestamp: 1713841378000,
timestamp: 1714284614182,
},
"message": null,
"success": true,
"timeStamp": 1747813922159
}
}
},
]
\ No newline at end of file
...@@ -29,7 +29,7 @@ class App extends Component { ...@@ -29,7 +29,7 @@ class App extends Component {
const defaultPage = { const defaultPage = {
myPrize: MyPrize, // TODO 举例子 新宿台奖品页 myPrize: MyPrize, // TODO 举例子 新宿台奖品页
index: LoadingDemo, index: LoadingDemo,
}[skinId] || GamePage; }[skinId] || HomePage;
PageCtrl.changePage(defaultPage); PageCtrl.changePage(defaultPage);
} }
......
...@@ -85,6 +85,26 @@ const API = generateAPI({ ...@@ -85,6 +85,26 @@ const API = generateAPI({
startVideo: "main/startVideo.do", startVideo: "main/startVideo.do",
/** 奖品页 */
prize: "/crecord/getrecordmn",
/** 获取任务列表 */
getTaskInfo: {
uri: "task_1/queryTasks.do",
},
/** 完成任务 */
doCompleted: {
uri: "task_1/doCompleted.do",
method: "post",
withToken: true,
},
/** 领取奖励 */
sendPrize: {
uri: "task_1/sendPrize.do",
method: "post",
withToken: true,
},
}) })
// console.log('======', API) // console.log('======', API)
......
...@@ -5,6 +5,9 @@ import { observer } from 'mobx-react'; ...@@ -5,6 +5,9 @@ import { observer } from 'mobx-react';
import './homepage.less'; import './homepage.less';
import { PageCtrl } from '@/core/ctrls/PageCtrl'; import { PageCtrl } from '@/core/ctrls/PageCtrl';
import RankPage from '../RankPage/RankPage'; import RankPage from '../RankPage/RankPage';
import MyPrize from '../MyPrize/MyPrize';
import Taskpop from '@/panels/taskpop/taskpop';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
@observer @observer
class Homepage extends React.Component { class Homepage extends React.Component {
...@@ -12,11 +15,14 @@ class Homepage extends React.Component { ...@@ -12,11 +15,14 @@ class Homepage extends React.Component {
super(props); super(props);
} }
componentDidMount(): void { componentDidMount(): void {
ModalCtrl.showModal(Taskpop);
} }
showRank = () => { showRank = () => {
PageCtrl.changePage(RankPage); PageCtrl.changePage(RankPage);
} }
showPrize = () =>{
PageCtrl.changePage(MyPrize);
}
render() { render() {
return ( return (
<div className="homepage modal_center"> <div className="homepage modal_center">
...@@ -41,7 +47,7 @@ class Homepage extends React.Component { ...@@ -41,7 +47,7 @@ class Homepage extends React.Component {
<span className="myrank"></span> <span className="myrank"></span>
<span className="number">000</span> <span className="number">000</span>
</div> </div>
<span className="prize"></span> <span className="prize" onClick={this.showPrize}></span>
<span className="rule"></span> <span className="rule"></span>
<span className="visit"></span> <span className="visit"></span>
<span className="share"></span> <span className="share"></span>
......
@import "../../res.less"; @import "../../res.less";
.MyPrize { .prizepage_wrap {
width: 100%; width: 750px;
height: 100%; height: 1624px;
left: 0px;
top: 0px;
position: absolute; position: absolute;
left: 0; background-color: #fff5d3;
top: 0;
overflow: hidden;
.MyPrizeBg { .prizepage {
position: absolute;
left: 0;
top: 0;
width: 750px; width: 750px;
height: 1624px; height: 1624px;
.webpBg("MyPrize/bg.png"); left: 0px;
} // top: -200px;
.MyPrizeTitle {
position: absolute;
left: 231px;
top: 98px;
width: 289px;
height: 70px;
.webpBg("MyPrize/我的奖品.png");
}
.MyPrizeBack {
position: absolute; position: absolute;
left: 20px; background-color: #fff5d3;
top: 110px;
width: 28px;
height: 43px;
.webpBg("MyPrize/返回.png");
transform-origin: center left !important;
}
.ditu {
width: 684px;
height: 150px;
left: 33px;
// top: 1450px;
bottom: 30px;
position: fixed;
.sparkBg("choice_challenge/ditu.png");
}
.prizeList { // transform: translateY(-50%);
position: fixed;
left: 38px;
top: 260px;
width: 675px;
// height: 1180px;
bottom: 200px;
overflow-y: auto;
overflow-x: hidden;
.prizeItem {
position: relative;
width: 675px;
height: 149px;
margin-top: 20px;
.webpBg("MyPrize/itemBg.png");
.use {
position: absolute;
width: 141px;
height: 44px;
left: 520px;
top: 53px;
.webpBg("MyPrize/use.png");
}
.yifafang { .bg {
position: absolute; width: 750px;
width: 178px; height: 1624px;
height: 44px; left: 0px;
left: 490px; top: 0px;
top: 53px; position: absolute;
text-align: center; .sparkBg("prizepage/bg.jpg");
line-height: 44px; }
.webpBg("MyPrize/已发放.png");
}
.bufa { .all_tab {
position: absolute; width: 665px;
width: 141px; height: 80px;
height: 44px; position: absolute;
left: 520px; left: 40px;
top: 53px; top: 280px;
overflow-x: auto;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
.hideScrollbar();
.tab_item {
width: 122px;
height: 80px;
text-align: center; text-align: center;
line-height: 44px; left: 0;
.webpBg("MyPrize/补发红包.png"); top: 0;
} position: relative;
margin-right: 40px;
flex-shrink: 0;
font-size: 30px;
color: #fff;
font-weight: 700;
line-height: 80px;
.lineClamp1();
.fafangzhong { .stick {
position: absolute; position: absolute;
width: 141px; left: 0px;
height: 44px; top: 70px;
left: 520px; width: 121px;
top: 53px; height: 4px;
text-align: center; .sparkBg("prizepage/stick.png");
line-height: 44px; }
.webpBg("MyPrize/发放中.png");
}
.shibai {
position: absolute;
width: 178px;
height: 44px;
left: 490px;
top: 53px;
text-align: center;
line-height: 44px;
.webpBg("MyPrize/发放失败.png");
} }
.prizeImg { .opacity {
position: absolute; background-image:none !important;
left: 30px; opacity: 0.6;
top: 20px;
width: 110px;
height: 110px;
border-width: 1px;
border-color: rgb(105, 40, 11);
border-style: solid;
border-radius: 11px;
background-color: rgb(255, 255, 255);
} }
}
.prizeName { .list {
font-size: 28px; width: 702px;
color: rgb(105, 40, 11); height: calc(100vh - 440px);
text-align: left; left: 34px;
position: absolute; top: 406px;
left: 168px; position: absolute;
top: 40px; overflow-y: scroll;
width: 330px;
// font-weight: bold; .item {
.lineClamp1(); width: 702px;
height: 150px;
left: 0px;
top: 0px;
position: relative;
margin-bottom: 30px;
.bg_item {
width: 677px;
height: 166px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("prizepage/itembg.png");
}
.img {
width: 110px;
height: 110px;
left: 26px;
top: 24px;
position: absolute;
// border: 1px solid #e5c362;
border-radius: 15px;
}
.name {
width: 350px;
// height: 28px;
left: 160px;
top: 24px;
position: absolute;
font-size: 30px;
// line-height: 28px;
color: #262626;
.lineClamp1();
font-weight: bold;
}
.prize_time {
width: 450px;
height: 28px;
left: 160px;
top: 75px;
position: absolute;
font-size: 18px;
// line-height: 28px;
color: #afafaf;
.lineClamp1();
}
.expire_time {
width: 450px;
height: 28px;
left: 160px;
top: 105px;
position: absolute;
font-size: 18px;
// line-height: 28px;
color: #afafaf;
.lineClamp1();
}
.gobtn {
width: 152px;
height: 57px;
left: 510px;
top: 60px;
position: absolute;
.sparkBg("prizepage/qulingqu.png");
}
.gray_btn {
width: 152px;
height: 57px;
left: 510px;
top: 60px;
position: absolute;
.sparkBg("prizepage/yiguoqi.png");
}
} }
.getTime { .empty {
font-size: 24.414px; width: 100%;
color: rgb(105, 40, 11); height: 30px;
text-align: left; line-height: 30px;
top: 300px;
position: absolute; position: absolute;
left: 168px; left: 0;
top: 82px; text-align: center;
color: rgb(158, 158, 158); font-size: 30px;
color: #fff5d3;
} }
} }
}
.nothing { .back {
position: absolute; left: 29px;
left: 220px; top: 161px;
top: 200px; width: 58px;
width: 194px; height: 58px;
height: 326px; transform-origin: left center;
.sparkBg("MyPrize/nothing.png") position: absolute;
.sparkBg("prizepage/back.png");
}
} }
} }
\ No newline at end of file
...@@ -2,127 +2,262 @@ import React from 'react'; ...@@ -2,127 +2,262 @@ import React from 'react';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import './MyPrize.less'; import './MyPrize.less';
import { Button, Toast } from "@grace/ui"; import { Button, Toast } from "@grace/ui";
import { dateFormatter, miniGoUrl } from "@/utils/utils.ts"; import { _throttle, dateFormatter, isMiniprogram, miniGoUrl } from "@/utils/utils.ts";
import API from "@/api"; import API from "@/api";
import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx"; import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import { isWeChat } from '@/utils/share';
import store from '@/store/store';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import SignSucPanel from '@/panels/SignSucPanel/SignSucPanel';
import {Axios, AxiosRequestConfig} from 'axios';
import FillAddress from '@/panels/FillAddress/FillAddress';
const apiAxios = new Axios({
timeout: 10000,
});
@observer @observer
class MyPrize extends React.Component<any, any> { class MyPrize extends React.Component<any, any> {
constructor(props) {
state = { super(props);
list: [], this.state = {
list: [],
records: [],
tabActive: 0,
prizeInfo: {},
projectTabList: [],
};
this.projectId = null;
} }
componentDidMount() { componentDidMount() {
this.initList(); this.getPrize();
} }
async initList() { getPrize = async (projectId: String) => {
const { success, data } = await API.records({ let params = {};
ignoreSp: true, console.log("!!!!", store?.homeInfo?.prod)
}); if (projectId) {
if (!success) return; params = {
this.setState({ projectId: projectId,
list: data, page: 1,
}); prod: store?.homeInfo?.prod !== undefined ? (store?.homeInfo?.prod || false) : true
} };
} else {
params = {
page: 1,
prod: store.homeInfo?.prod !== undefined ? (store.homeInfo?.prod || false) : true,
};
}
const res = await API.prize(params);
if (res?.success) {
let tabList = [];
let PrizeList = [];
if (res?.projectTabList?.length > 0) {
tabList = [{ projectName: "全部" }, ...res?.projectTabList];
} else {
tabList = [{ projectName: "全部" }];
}
if (res?.records?.length > 0) {
res.records.map((item) => {
if (item.itemType.indexOf("sp_") == -1) {
PrizeList.push(item);
} else {
if (item.itemType.startsWith("sp_bean")) {
PrizeList.push(item);
}
}
});
}
clickBack = () => { this.setState({
PageCtrl.backPage(); prizeInfo: res,
} records: PrizeList,
projectTabList: tabList,
});
clickItem = async (item) => { PrizeList.forEach((item) => {
const { id, url } = item if (!item?.invalid) {
if (url) { // sensorLog(LOG_KEY.exposure, "b11618", "d11619", {
location.href = url // button_name: "去领取",
} else { // page_name: "我的奖品页",
if (item.extra.refType === 'virtual') { // entrance: extranceName[CFG.channel],
// operation_name: "去领取",
// });
}
});
}
};
/** 奖品跳转 app渠道可正常跳转领奖;微信公众号用户中奖后在我的奖品页点击【进入详情】按钮需换端app领奖 */
// sp_bean 保豆跳转特殊处理
goPrizeDetail = _throttle(async (item) => {
if (item?.invalid) {
Toast.show("奖品已过期");
return;
}
// sensorLog(LOG_KEY.click, "b11618", "d11619", {
// button_name: "去领取",
// page_name: "我的奖品页",
// operation_name: "去领取",
// });
// 商家自冲奖品类型配置 {"prizeId":"奖品ID","type":"类型(1-专项特惠2-积分商城奖品3-积分奖品)"} // stopSound('bg_music')
// 注意:旧的奖品没有type字段 需兼容 const { recordId, url, itemType, recordInfo, projectId, drawStatus } = item;
if (item?.extra.type == 1) { const { projectTabList } = this.state;
return miniGoUrl(CFG.isNewMiniVersion ? "/packages/user/exclusiveOffer?source=duiba" : "/pagesNews/user/userRed") console.log('itemType',itemType)
} else if (item?.extra.type == 3) { if (isMiniprogram()) {
return miniGoUrl('/packages/user/points?source=duiba') //小程序渠道toast
Toast.show("请前往人保寿险管家app领奖~");
return;
} else if (isWeChat()) {
// 微信渠道唤端
shareStore.goAppPrize();
} else {
// app直接跳
if (itemType?.startsWith("sp_bean")) {
// 保豆app端跳转
console.info("保豆");
const thirdBrowseParams = {
url: "picclifeapp://MyPolicyBeansActivity",
// is_back: "true",
// functionType: "1",
};
setTimeout(async () => {
window.PICCLifeJsBrage.callNative({
module: "Router",
method: "",
params: JSON.stringify(thirdBrowseParams),
callback: "jscallback",
});
}, 300);
} else {
console.info("其他奖品");
const { tabActive, projectTabList } = this.state;
//是否走人保定制流程(走流程+绑定业务员+未填写地址+未领取)
let codeUrl = "";
let rbClaim = "";
let saveAddresUrl = "";
for (let i = 0; i < projectTabList?.length; i++) {
if (projectTabList[i]?.projectId == projectId) {
codeUrl = projectTabList[i]?.queryBindAgentCodeUrl;
rbClaim = projectTabList[i]?.rbClaim;
saveAddresUrl = projectTabList[i]?.saveAddressUrl;
console.info(codeUrl, rbClaim, saveAddresUrl);
}
} }
const res = await API.queryOrder({ if (rbClaim && itemType.indexOf("object") != -1 && drawStatus == "2") {
recordId: item.id, const resInfo = await apiAxios.request({
projectId: CFG.projectId method: 'get',
}); url: codeUrl,
if (res?.orderNo) {
// 线上正式用这个
wx.miniProgram.reLaunch({
url:
(CFG.isNewMiniVersion ? "/pages/index?source=duiba&orderNo=" : "/pages/index/index?orderNo=")
+ id
+ "&activityId=" + (res?.activityId) + "&uid=" + (res?.uid) + "&activityUrl=" + encodeURIComponent(location.origin + "/projectx/" + CFG.projectId + '/index.html?jumpFlag=1') + '&uid=' + res?.uid
}) })
const res = JSON.parse(resInfo.data)
console.log('res',res)
if (!res?.success) {
return;
}
if (!recordInfo && !!res.data.boundYkCode) {
//未填写地址切绑定业务员
ModalCtrl.showModal(FillAddress,{
projectId: this.projectId,
saveAddresUrl: saveAddresUrl,
getPrize: this.getPrize,
recordId,
agentCode: res?.boundYkCode,
prizeProjectId: projectId,
})
// modalStore.pushPop("FillAddress", {
// projectId: this.projectId,
// saveAddresUrl: saveAddresUrl,
// getPrize: this.getPrize,
// recordId,
// agentCode: res?.boundYkCode,
// prizeProjectId: projectId,
// });
} else {
//已填写地址或未绑定业务员
if (recordInfo?.status == "0") {
Toast.show("已领取,请耐心等待发货~");
} else {
location.href = `/aaw/projectx/takePrize?projectOrderNo=${recordId}`;
}
}
} else { } else {
Toast.show('请稍后再试~') setTimeout(() => {
if (url) {
location.href = url;
} else {
location.href = `/aaw/projectx/takePrize?projectOrderNo=${recordId}`;
}
}, 300);
} }
} else {
location.href = `/aaw/projectx/takePrize?projectOrderNo=${id}`
} }
} }
} });
handleyifafang = (item) => { switchTab = _throttle(async (val, key) => {
Toast.show("已发放") if (val?.projectId) {
} await this.getPrize(val?.projectId);
this.projectId = val?.projectId;
handlebufa = async (item) => { } else {
const { success } = await API.redpacket({ // 全部
prizeRecordId: item.id, await this.getPrize();
}); this.projectId = null;
if (success) {
this.initList();
} }
this.setState({
tabActive: key,
});
});
clickBack = () => {
PageCtrl.backPage();
} }
handleshibai = (item) => {
Toast.show("发放失败")
}
handlefafangzhong = (item) => {
Toast.show("正在发放中,请耐心等待")
}
render() { render() {
const { list } = this.state; const { records, tabActive, projectTabList } = this.state;
return (
return <div className="MyPrize"> <div className="prizepage_wrap">
<div className="MyPrizeBg" /> <div className="prizepage">
<div className="MyPrizeTitle" /> <span className="bg"></span>
<div className="prizeList"> <div className="all_tab">
{ {projectTabList?.length > 0 &&
list.length > 0 ? list.map((item, index) => { projectTabList.map((val, key) => {
return ( return (
<div className="prizeItem" key={index}> <Button
<img className="prizeImg" src={item.extra.icon} /> className={key == tabActive ? "tab_item" : "tab_item opacity"}
<div className="prizeName">{item.extra.name}</div> key={key}
<div className="getTime">{dateFormatter(item.gmtCreate, "yyyy.MM.dd")}</div> onClick={() => this.switchTab(val, key)}>
{item.type == 4 ? ( {val?.projectName}
<> <span className={key == tabActive ? "stick" : "opacity"}></span>
{item.moneyStatus === 1 && <Button className="yifafang" onClick={() => this.handleyifafang(item)} />} </Button>
{item.moneyStatus === 2 && <Button className="shibai" onClick={() => this.handleshibai(item)} />} );
{item.moneyStatus === 10 && <Button className="bufa" onClick={() => this.handlebufa(item)} />} })}
{item.moneyStatus === 11 && <Button className="fafangzhong" onClick={() => this.handlefafangzhong(item)} />} </div>
</> <div className="list">
) : ( {records?.length > 0 ? (
<Button className="use" onClick={() => this.clickItem(item)} /> records.map((item, index) => {
)} return (
</div> <div className="item" key={index} onClick={() => this.goPrizeDetail(item)}>
) <span className="bg_item"></span>
// }) : <div className="nothing"/> <img src={item?.img} className="img" />
}) : null <span className="name">{item?.title}</span>
} <span className="prize_time">中奖时间:{dateFormatter(item?.gmtCreate, "yyyy-MM-dd hh:mm:ss")}</span>
<span className="expire_time">
领奖截止日期:{dateFormatter(item?.expireTime, "yyyy-MM-dd hh:mm:ss")}
</span>
{item?.invalid ? <Button className="gray_btn grey"></Button> : <Button className="gobtn md42"></Button>}
</div>
);
})
) : (
<span className="empty">暂无数据</span>
)}
</div>
<Button className="back md41" onClick={this.clickBack}></Button>
</div>
</div> </div>
);
<Button className="MyPrizeBack" onClick={this.clickBack} />
<div className="ditu"></div>
</div>;
} }
} }
......
@import "../../res.less";
.FillAddress {
width:750px;
.bg {
position: absolute;
left: 0px;
top: 0px;
width: 750px;
height: 1624px;
.sparkBg("FillAddress/填写收货地址.png");
}
.button-return {
position: absolute;
left: 51px;
top: 183px;
width: 23px;
height: 32px;
// transform-origin: left center;
.sparkBg("FillAddress/返回按钮.png");
}
.submitNoAct {
// opacity: 0.502;
position: absolute;
left: 154px;
top: 850px;
width: 442px;
height: 104px;
.sparkBg("FillAddress/提交信息按钮-不可点击.png");
}
.submitAct {
position: absolute;
left: 154px;
top: 850px;
width: 442px;
height: 104px;
.sparkBg("FillAddress/提交信息按钮-可点击.png");
}
.infoList {
position: absolute;
top: 300px;
width: 750px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.inputG {
position: relative;
margin-bottom: 51px;
width: 634px;
height: 80px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
display: flex;
align-items: center;
font-size: 30px;
color: #656565;
.igLabel {
margin-left: 8px;
margin-right: auto;
}
.igInput {
font-size: 30px;
width: 70%;
height: 100%;
border: none;
}
.igInputGray {
color: #7f7f7f;
}
.igDiv {
font-size: 30px;
width: 70%;
height: 100%;
border: none;
display: flex;
align-items: center;
justify-content: flex-start;
}
}
.button-select {
width: 15px;
height: 26px;
.sparkBg("FillAddress/选择按钮.png");
position: absolute;
right: 0;
}
}
}
import React, { useState } from "react";
import { observer } from "mobx-react";
import "./FillAddress.less";
import { REG_TEL, _throttle } from "@/utils/utils.ts";
import { Toast } from "@grace/ui";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import {Axios, AxiosRequestConfig} from 'axios';
import Selectmodal from "../selectmodal/selectmodal";
const apiAxios = new Axios({
timeout: 10000,
});
// wzjTODO 换皮
@observer
class FillAddress extends React.Component<any, any> {
fillMd=false
state = {
name: "",
mobile: "",
area: "",
province: "",
city: "",
street: "",
detail: "",
addrCode: "",
isShowArea:false,
}
componentDidMount() {
// this.initSensor();
const { projectId, saveAddresUrl, getPrize, recordId, agentCode, prizeProjectId} = this.props;
console.log('projectId',projectId)
}
initSensor(){
}
ClickClose = () => {
ModalCtrl.closeModal();
}
onNameInput = (e) => {
let value = e.target.value
this.setState({
name: value,
});
};
onMobileInput = (e) => {
this.setState({
mobile: e.target.value.replace(/[^\d]/g, ''),
});
};
onDetailInput = (e) => {
let value = e.target.value;
this.setState({
detail: value,
});
};
clickArea = () => {
// ModalCtrl.showModal(Selectmodal,{
// doSelect: this.doSelect,
// })
this.setState({
isShowArea:true
})
}
doSelect = ({province, city, area, street, addrCode,}) => {
this.setState({
province,
city,
area,
street,
addrCode,
},()=>{
this.closeSelect()
});
}
closeSelect = () =>{
this.setState({
isShowArea:false
})
}
clickSubmit = _throttle(async () => {
// sensorLog(LOG_KEY.click, "b7391", "d7393", {
// page_name: "地址填写页",
// button_name: "提交信息按钮",
// });
const {
name, mobile,
area, province, city, street, addrCode,
detail
} = this.state;
if (!REG_TEL.test(mobile)) {
return Toast.show('请输入正确的手机号~');
}
const { projectId, saveAddresUrl, getPrize, recordId, agentCode, prizeProjectId} = this.props;
const params= {
province,
city,
area,
detail,
name,
mobile,
recordId,
agentCode,
street,
projectId:prizeProjectId,
addrCode,
from: CFG.channel || "2",
actPlatforms: CFG.actPlatforms,
actId: CFG.actId,
}
const resInfo = await apiAxios.request({
method: 'get',
url: saveAddresUrl,
params,
})
const res = JSON.parse(resInfo.data)
console.log('res',res)
if (!res?.success) {
return;
}
getPrize(projectId);
ModalCtrl.closeModal();
});
clickSubmitNoAct = () => {
Toast.show("请先填写完整信息", 1800, {hideOthers: true});
}
render() {
const {name, mobile, area, province, city, street, detail, isShowArea} = this.state;
const isFill = Boolean(name && mobile && area && province && city && detail);
if(this.fillMd != isFill){
console.log("曝光埋点")
this.fillMd = isFill;
}
return <div className="FillAddress">
<div className="bg" />
<div className="button-return" onClick={this.ClickClose} />
<div className="infoList">
<div className="inputG inputName">
<div className="igLabel">收货人</div>
<input
className="igInput inputStyle"
placeholder="收货人姓名"
value={name}
maxLength={10}
onChange={this.onNameInput}
/>
</div>
<div className="inputG inputMobile">
<div className="igLabel">手机号码</div>
<input
className="igInput inputStyle"
placeholder="收货人手机号码"
value={mobile}
maxLength="11"
onChange={this.onMobileInput}
/>
</div>
<div className="inputG inputArea">
<div className="igLabel">所在地区</div>
<div
className={`igDiv ${province ? "" : "igInputGray"}`}
placeholder="选择省/市/区"
onClick={this.clickArea}
>
{province ? `${province}/${city}/${area}${!!street ? `/${street}` : ""}` : "选择省/市/区/街道"}
</div>
<div className="button-select" onClick={this.clickArea} />
</div>
<div className="inputG inputAddress">
<div className="igLabel">详细地址</div>
<input
className="igInput inputStyle"
placeholder="请填写详细地址"
value={detail}
onChange={this.onDetailInput}
maxLength={100}
/>
</div>
</div>
{
isFill
? <div className="submitAct" onClick={this.clickSubmit} />
: <div className="submitNoAct" onClick={this.clickSubmitNoAct} />
}
{
isShowArea && <Selectmodal doSelect={this.doSelect} closeSelect={this.closeSelect}></Selectmodal>
}
</div>;
}
}
export default FillAddress;
@import "../../res.less";
.selectCont{
width:750px;
height: 100vh;
position: fixed;
top:0;
left:0;
background-color: rgba(0,0,0,0.8);
.selectmodal {
width: 750px;
height: 550px;
left: 0;
bottom: 0;
position: absolute;
animation: frombottom 300ms forwards;
.bg2 {
width: 750px;
height: 550px;
left: 0;
top: 0;
position: absolute;
background-color: white;
}
.cancelbtn {
width: 217px;
height: 82px;
left: 69px;
top: 435px;
position: absolute;
border-radius: 42px;
border: 2px solid #333333;
display: flex;
align-items: center;
justify-content: center;
font-size: 42px;
box-sizing: border-box;
}
.confirmbtn {
width: 355px;
height: 82px;
left: 330px;
top: 435px;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
font-size: 42px;
background-color: #ffce85;
border-radius: 42px;
}
.dateCont {
width: 685px;
display: flex;
position: absolute;
top: 30px;
left: calc(50% - 685px / 2);
text-align: center;
flex-direction: row;
&::after {
content: '';
width: 722px;
height: 71px;
left: -20px;
top: calc(50% - 60px / 2);
position: absolute;
background-color: #ffce85;
}
.dates {
width: calc(100% / 4);
flex: 1;
z-index: 1;
}
.hours {
width: calc(100% / 4);
flex: 1;
z-index: 1;
}
.minutes {
width: calc(100% / 4);
flex: 1;
z-index: 1;
}
.street {
width: calc(100% / 4);
flex: 1;
z-index: 1;
}
._date {
width: 100%;
height: 380px;
.dateItem {
width: 100%;
height: 79px;
line-height: 79px;
color: rgb(116, 116, 116);
font-size: 36px;
text-align: center;
div {
width: 100%;
display: inline-block;
.lineClamp1();
}
&.swiper-slide-active {
font-size: 42px;
color: black;
font-weight: 700;
}
}
}
}
@keyframes frombottom {
0% {
bottom: -614px;
}
100% {
bottom: 0;
}
}
}
}
import React from "react";
import { observer } from "mobx-react";
import "./selectmodal.less";
import { Swiper, SwiperSlide } from "swiper/react";
// import 'style-loader!css-loader!swiper/swiper-bundle.css';
import "../../../src/swiper-bundle.css";
import API from "../../api";
import { _throttle } from "../../utils/utils";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
// 地址选择器 什么都别改直接复制
@observer
class Selectmodal extends React.Component {
constructor(props) {
super(props);
this.state = {
provinceList: [],
cityList: [],
areaList: [],
streetList: [],
provinceCode: 0,
cityCode: 0,
areaCode: 0,
streetCode: 0,
};
}
swiperRef;
swiperRef2;
swiperRef3;
// getParentCode
async componentDidMount() {
//获取省
await this.getCodeList(null, "provinceList");
//获取市
const { provinceList, provinceCode } = this.state;
await this.getCodeList(provinceList[provinceCode]?.adCode, "cityList");
//获取区
const { cityList, cityCode } = this.state;
await this.getCodeList(cityList[cityCode]?.adCode, "areaList");
//获取街道
const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[areaCode]?.adCode, "streetList");
}
/**获取省市区接口 */
async getCodeList(parentCode, type) {
const params = {};
if (parentCode) {
params.parentCode = parentCode;
}
const { success, data } = await API.getParentCode(params);
if (success) {
this.setState({
[type]: data,
});
}
}
/**
* 省选择
* @param {*} swiper
*/
onProvinceSwiper = (swiper) => {
if (swiper) {
swiper.on("slideChange", (swiper) => {
console.error("Slide changed!", swiper.activeIndex);
this.setState(
{
provinceCode: swiper.activeIndex,
},
async () => {
//获取市
const { provinceList } = this.state;
await this.getCodeList(provinceList[swiper.activeIndex]?.adCode, "cityList");
//获取区
const { cityList, cityCode } = this.state;
await this.getCodeList(cityList[cityCode]?.adCode, "areaList");
//获取街道
const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[areaCode]?.adCode, "streetList");
}
);
this.swiperRef?.slideTo(0);
this.swiperRef2?.slideTo(0);
this.swiperRef3?.slideTo(0);
});
}
};
/**
* 市选择
*/
onCitySwiper = (swiper) => {
console.error("Slide changed!", swiper.activeIndex);
this.setState(
{
cityCode: swiper.activeIndex,
},
async () => {
//获取区
const { cityList } = this.state;
await this.getCodeList(cityList[swiper.activeIndex]?.adCode, "areaList");
//获取街道
const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[areaCode]?.adCode, "streetList");
}
);
this.swiperRef2?.slideTo(0);
this.swiperRef3?.slideTo(0);
};
/**
* 区选择
* @param {*} swiper
*/
onAreaSwiper = (swiper) => {
console.error("Slide changed!", swiper.activeIndex);
this.setState(
{
areaCode: swiper.activeIndex,
},
async () => {
//获取街道
const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[areaCode]?.adCode, "streetList");
}
);
this.swiperRef3?.slideTo(0);
};
/**
* 街道选择
* @param {*} swiper
*/
onStreetSwiper = (swiper) => {
console.error("Slide changed!", swiper.activeIndex);
this.setState({
streetCode: swiper.activeIndex,
});
};
/**
* 确认选择
*/
doSelect = _throttle(() => {
const { provinceList, cityList, areaList, streetList, provinceCode, cityCode, areaCode, streetCode } = this.state;
const province = provinceList[provinceCode]?.name;
const city = cityList[cityCode]?.name;
const area = areaList[areaCode]?.name;
const street = streetList[streetCode]?.name;
const addrCode = streetList[streetCode]?.adCode || areaList[areaCode]?.adCode;
console.log(province + "" + city + "" + area + "" + street);
//确定展示到页面
const { doSelect } = this.props;
doSelect && doSelect({ province, city, area, street, addrCode });
});
/** 取消 */
doCancel = () => {
const { closeSelect } = this.props;
closeSelect && closeSelect()
};
onClose() {
const { closeSelect } = this.props;
closeSelect && closeSelect()
}
render() {
const { provinceList, cityList, areaList, streetList } = this.state;
return (
<div className="selectCont">
<div className="selectmodal">
<span className="bg2" />
<div className="cancelbtn" onClick={this.doCancel}>
取消
</div>
<div className="confirmbtn" onClick={this.doSelect}>
确认
</div>
<div className="dateCont">
<div className="dates">
<Swiper
slidesPerView={5}
initialSlide={0}
centeredSlides={true}
direction="vertical"
className="_date"
onSwiper={this.onProvinceSwiper}>
{provinceList?.map((item, index) => (
<SwiperSlide className="dateItem" key={index}>
<div>{item?.name}</div>
</SwiperSlide>
))}
</Swiper>
</div>
<div className="hours">
<Swiper
slidesPerView={5}
initialSlide={0}
centeredSlides={true}
direction="vertical"
className="_date"
onSwiper={(swiper) => (this.swiperRef = swiper)}
onSlideChange={(swiper) => this.onCitySwiper(swiper)}>
{cityList?.map((item, index) => (
<SwiperSlide className="dateItem" key={index}>
<div>{item?.name}</div>
</SwiperSlide>
))}
</Swiper>
</div>
<div className="minutes">
<Swiper
slidesPerView={5}
initialSlide={0}
centeredSlides={true}
direction="vertical"
className="_date"
onSwiper={(swiper) => (this.swiperRef2 = swiper)}
onSlideChange={(swiper) => this.onAreaSwiper(swiper)}>
{areaList?.map((item, index) => (
<SwiperSlide className="dateItem" key={index}>
<div>{item?.name}</div>
</SwiperSlide>
))}
</Swiper>
</div>
<div className="street">
<Swiper
slidesPerView={5}
initialSlide={0}
centeredSlides={true}
direction="vertical"
className="_date"
onSwiper={(swiper) => (this.swiperRef3 = swiper)}
onSlideChange={(swiper) => this.onStreetSwiper(swiper)}>
{streetList?.map((item, index) => (
<SwiperSlide className="dateItem" key={index}>
<div>{item?.name}</div>
</SwiperSlide>
))}
</Swiper>
</div>
</div>
</div>
</div>
);
}
}
export default Selectmodal;
@import "../../res.less";
.taskpop {
width: 750px;
height: 1071px;
left: 0px;
position: absolute;
bottom: 0px;
// animation: frombottom 600ms forwards;
.bg {
width: 750px;
height: 1071px;
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: 668px;
top: -70px;
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: 730px;
height: 843px;
left: 50px;
top: 210px;
position: absolute;
overflow-y: scroll;
.item {
width: 636px;
height: 141px;
left: 0px;
top: 0px;
position: relative;
margin-bottom: 20px;
.bg_item {
width: 636px;
height: 141px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("TaskPop/itembg.png");
}
.center_info {
width: 340px;
height: 120px;
left: 145px;
top: 20px;
position: absolute;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
.title {
width: 90%;
// height: 30px;
font-size: 32px;
// line-height: 30px;
color: #fff;
.lineClamp1();
font-weight: 700;
margin-bottom: 10px;
letter-spacing: 2px;
// -webkit-text-stroke: 1px #df852d; /* width | color */
text-shadow:
-2px -2px 0 #df852d, /* 左上角 */
2px -2px 0 #df852d, /* 右上角 */
-2px 2px 0 #df852d, /* 左下角 */
2px 2px 0 #df852d; /* 右下角 */
}
.subtitle {
width: 100%;
// max-height: 50px;
font-size: 22px;
color: #94590d;
// line-height: 25px;
// .lineClampN(2);
}
}
.icon {
width: 94px;
height: 94px;
left: 27px;
top: 28px;
position: absolute;
border-radius: 50%;
}
.btns {
width: 219px;
height: 112px;
left: 456px;
top: 26px;
position: absolute;
.receive_btn {
width: 131px;
height: 46px;
left: 32px;
top: 18px;
position: absolute;
.sparkBg("TaskPop/receive_btn.png");
}
.complete_btn {
width: 145px;
height: 57px;
left: 22px;
top: 18px;
position: absolute;
.sparkBg("TaskPop/complete_btn.png");
}
.already_btn {
width: 145px;
height: 57px;
left: 22px;
top: 18px;
position: absolute;
.sparkBg("TaskPop/already_btn.png");
}
.share_btn {
width: 157px;
height: 77px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("TaskPop/toShare_btn.png");
}
}
}
}
@keyframes frombottom {
0% {
bottom: -1708px;
}
100% {
bottom: 0px;
}
}
}
'use strict';
import React from 'react';
import { observer } from 'mobx-react';
import './taskpop.less';
import { unwatchPageVisibility, watchPageVisibility } from '@/core/page-visibility-notify.ts';
// import { handleLogClick, handleLogExposure } from '../../../MD';
import { RES_PATH } from '../../../sparkrc';
import { _throttle } from '../../utils/utils';
import { TASK_CODE,CHANNEL_PARAMS } from '../../utils/constants.ts';
import { setCookies } from '../../store/fetcher';
import taskStore from '../../store/task';
import store from '../../store';
// import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog } from '../../utils/sensors';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import { Button } from '@grace/ui';
@observer
class Taskpop extends React.Component {
constructor(props) {
super(props);
}
async componentDidMount() {
window.infoCallBack = taskStore.getInfoCallback;
window.browseCallBack = taskStore.getBrowseCallback;
await taskStore.getTaskList();
watchPageVisibility(this.onPageVisibilityChange);
this.initSensor();
}
initSensor() {
// pageView("b10875", {
// page_name: "赚次数任务页",
// });
// sensorLog(LOG_KEY.exposure,"b7870","d8729");
// sensorLog(LOG_KEY.exposure, "b10875", "d10877", {
// page_name: "赚次数任务页",
// button_name: "领取奖励按钮",
// });
// sensorLog(LOG_KEY.exposure, "b10875", "d10876", {
// page_name: "赚次数任务页",
// button_name: "去完成按钮",
// });
}
componentWillUnmount() {
unwatchPageVisibility(this.onPageVisibilityChange);
}
onPageVisibilityChange = async (visible) => {
if (visible) {
await setCookies();
await taskStore.getTaskList();
}
};
/** 去完成 */
taskDoHandle = _throttle(async (item) => {
const {taskStatus, code} = item || {};
// if(code == TASK_CODE.INVITE){
// MatterShareOpt(LOG_KEY.click,"b7870","d8729")
// }
// sensorLog(LOG_KEY.click, "b10875", "d10876", {
// page_name: "赚次数任务页",
// button_name: "去完成按钮",
// });
await taskStore.doTask(item);
})
/** 领奖 */
taskPrizeHandle = _throttle(async (item) => {
const { code, taskStatus } = item || {};
// sensorLog(LOG_KEY.click, "b10875", "d10877", {
// page_name: "赚次数任务页",
// button_name: "领取奖励按钮",
// });
await taskStore.getTaskPrize(item);
})
close = () => {
// sensorLog(LOG_KEY.click, "b7394", "d7398", {
// page_name: "做任务赚骰子页",
// button_name: "关闭按钮",
// });
ModalCtrl.closeModal()
// store.getHomeInfo()
}
render() {
const {taskList} = taskStore;
return (
<div className="taskpop topPop_move">
<span className="bg"></span>
<Button className="close md36" onClick={this.close}></Button>
<span className="bg_list"></span>
<div className="list">
{
taskList?.length > 0 &&
taskList.map((val, key) => {
// val?.taskStatus == 0 && handleLogExposure(37, 1)
// val?.taskStatus == 1 && handleLogExposure(37, 2)
return (
<div className="item" key={key}>
<span className="bg_item"></span>
<div className="center_info">
<span className="title">{`${val?.title}(${val?.completedSize}/${val?.intervalLimitSize})`}</span>
{/* 「浏览企业人人保」、「浏览畅行保产品计划A赠险」、「浏览畅行保产品计划B赠险」 app端任务描述取描述 后端直接接口处理了 */}
<span className="subtitle textover">{val?.subTitle}</span>
</div>
<img src={val?.icon} className="icon" />
<div className="btns">
{/* 去完成 */}
{
val?.taskStatus == 0 &&
(
CFG.channel != CHANNEL_PARAMS.RB_APP ||
(CFG.channel == CHANNEL_PARAMS.RB_APP && val?.code?.indexOf(TASK_CODE.BROWSE_SPECIAL_SHOW) < 0)
) &&
<Button className="complete_btn" onClick={() => this.taskDoHandle(val)}></Button>
}
{/* 待领取 */}
{val?.taskStatus == 1 &&
<Button className="receive_btn" onClick={() => this.taskPrizeHandle(val)}></Button>}
{/* 已完成 */}
{val?.taskStatus == 2 && <Button className="already_btn"></Button>}
</div>
</div>
)
})
}
</div>
</div>
);
}
}
export default Taskpop;
import { Toast } from "@grace/ui";
// import { callApi } from "@spark/api-base";
// import { getDomain } from "@spark/dbdomain";
/** 处理cookie */
export const saveCookies = async () => {
// const domain = await getDomain();
// const data = await callApi(`${domain}/autoLogin/tempSaveCookie`);
// console.info(`%c cookieId: ${data}`, "font-size: 20px; color: orange");
// if (!!data) {
// localStorage.setItem("cookieId", data);
// }
};
/** 设置cookies */
export const setCookies = async () => {
// const cookieId = localStorage.getItem("cookieId");
// const domain = await getDomain();
// if (!!cookieId) {
// await callApi(`${domain}/autoLogin/resetCookie?duibaTempCookieId=${cookieId}`);
// localStorage.removeItem("cookieId");
// }
};
import { makeAutoObservable } from "mobx";
import API from "../api/index";
import store from "./store";
// import modalStore from "./modal";
import { saveCookies, setCookies } from "./fetcher";
// import shareStore from "./share";
// import { handleLogClick } from "../../MD";
import { isWeChat } from "../utils/share";
import { appJump, getUrlParam, windowJumpUrl } from "../utils/utils";
import { CHANNEL_PARAMS, TASK_CODE } from "../utils/constants";
import { Toast } from "@grace/ui";
const taskStore = makeAutoObservable({
/** 当前任务 */
curTask: {},
setCurTask(data) {
this.curTask = data;
},
/** 任务列表 */
taskList: [],
/** 获取任务 */
async getTaskList() {
const { success, data } = await API.getTaskInfo({
// 展示对应任务数据逻辑: 优先取分享人code 其次取url参数code 最终取绑定的业务员code(这个后端会自己取)
code: getUrlParam("ykCode") || getUrlParam("code") || "",
from: CFG.channel,
});
if ((success, data)) {
this.taskList = data?.item || [];
}
},
/** 去完成 */
async doTask(item) {
// jumpUrl 后端已经根据渠道返回对应的链接
const { code, jumpUrl } = item || {};
switch (true) {
//签到
case code == "common_sign":
console.info("签到任务");
await taskStore.complete(item);
break;
//邀请
case code == TASK_CODE.INVITE:
console.info("邀请任务");
// const res = await shareStore.doInvite();
// modalStore.pushPop("Shareposter", { qrCode: res }, true);
break;
//增员介绍 海报or视频
case code?.indexOf("browse_zeng_yuan") > -1:
// if(code == "browser_zeng_yuan_1"){
// modalStore.closePop("Taskpop");
// modalStore.pushPop("LongImgPop", {
// imgUrl: jumpUrl,
// taskSucCb: async () => {
// await this.complete(item);
// },
// noCount: false,
// type: code == "browse_zeng_yuan_1" ? 1 : 2, //1海报 2视频
// });
// }
break;
// 七秒浏览 or 税优关爱百万任务
default:
console.info("七秒浏览任务", CFG.spcCode, CFG.workerCode);
if (isWeChat()) {
// 微信端
await taskStore.complete(item);
setTimeout(() => {
if (CFG.channel == CHANNEL_PARAMS.YK_PUBLIC || CFG.channel == CHANNEL_PARAMS.YK_MINI) {
// 友客渠道 需要单独拼参数 参数key直接配置在链接上 value取code
// btt2_开头的任务 不需要前端拼code
// let _url =
// code.indexOf(TASK_CODE.BROWSE_AREA) >= 0 ? jumpUrl : `${jumpUrl}${CFG.spcCode || CFG.workerCode || ""}`;
// alert(CFG.spcCode || CFG.workerCode || "")
let _url = `${jumpUrl}${CFG.spcCode || CFG.workerCode || ""}`;
console.info("_url", _url);
// alert(_url)
windowJumpUrl(_url);
} else {
windowJumpUrl(jumpUrl);
}
}, 500);
} else {
// app
taskStore.setCurTask(item);
saveCookies();
const thirdBrowseParams = {
hyper_link: jumpUrl,
is_back: "true",
functionType: "1",
};
setTimeout(() => {
appJump("queryUserBindCustomerManger", "", thirdBrowseParams, "infoCallBack");
}, 300);
}
break;
}
},
/** app获取绑定信息回调 */
getInfoCallback(res) {
console.info("info", res, res?.agentCode);
const resObj = res ? JSON.parse(res) : {};
const { curTask } = taskStore;
console.info("curTask", curTask);
if (JSON.stringify(curTask) == "{}") return;
const agentCode = curTask.jumpUrl?.match(/agent_code=(\d+)/)?.[1];
const _jumpUrl = !!agentCode
? curTask.jumpUrl?.replace(agentCode, resObj?.agentCode)
: `${curTask.jumpUrl}&agent_code=${resObj?.agentCode}`;
const thirdBrowseParams = {
hyper_link: _jumpUrl,
is_back: "true",
function_type: "5",
};
console.info(`%c jumpUrl: ${_jumpUrl}`, "font-size: 20px; color: pink");
appJump("Router", "duibaMethod", thirdBrowseParams, "browseCallBack");
},
/** app7s浏览跳转回调 */
async getBrowseCallback(res) {
const { curTask } = taskStore;
console.info("curTask", curTask);
if (JSON.stringify(curTask) == "{}") return;
await setCookies();
console.info("回调数据", res);
let resObj = res ? JSON.parse(res) : {};
if (curTask?.code?.indexOf("browse_shui_yue") > -1) {
//税悦不管时间
const res = await taskStore.complete(curTask);
if (res?.success) {
await taskStore.getTaskList();
}
return;
}
if (resObj.isSuccess == 1 && Number(resObj.time) >= 7) {
const res = await taskStore.complete(curTask, resObj.time);
if (res?.success) {
await taskStore.getTaskList();
}
}
},
/** 完成任务 */
async complete(item, time) {
const { id, code } = item || {};
let params = {
taskCode: code,
};
const res = await API.doCompleted(params);
// await store.getHomeInfo();
if (code.indexOf("browse_") > -1 && isWeChat()) {
setTimeout(() => {
this.getTaskList();
}, 1500);
} else {
this.getTaskList();
}
return res;
},
/** 领奖 */
async getTaskPrize(item) {
const { id, code, prizePendingCode } = item || {};
const { success, data } = await API.sendPrize({
taskId: id,
taskCode: code,
prizePendingCode: prizePendingCode,
});
// await store.getHomeInfo();
if (success && data) {
Toast.show(`抽奖次数+${data?.options?.[0]?.sendCount || 0}`);
await taskStore.getTaskList();
// await store.getHomeInfo();
}
},
});
export default taskStore;
/**
* Swiper 8.4.5
* Most modern mobile touch slider and framework with hardware accelerated transitions
* https://swiperjs.com
*
* Copyright 2014-2022 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: November 21, 2022
*/
@font-face {
font-family: 'swiper-icons';
src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');
font-weight: 400;
font-style: normal;
}
:root {
--swiper-theme-color: #007aff;
}
.swiper {
margin-left: auto;
margin-right: auto;
position: relative;
overflow: hidden;
list-style: none;
padding: 0;
/* Fix of Webkit flickering */
z-index: 1;
}
.swiper-vertical > .swiper-wrapper {
flex-direction: column;
}
.swiper-wrapper {
position: relative;
width: 100%;
height: 100%;
z-index: 1;
display: flex;
transition-property: transform;
box-sizing: content-box;
}
.swiper-android .swiper-slide,
.swiper-wrapper {
transform: translate3d(0px, 0, 0);
}
.swiper-pointer-events {
touch-action: pan-y;
}
.swiper-pointer-events.swiper-vertical {
touch-action: pan-x;
}
.swiper-slide {
flex-shrink: 0;
width: 100%;
height: 100%;
position: relative;
transition-property: transform;
}
.swiper-slide-invisible-blank {
visibility: hidden;
}
/* Auto Height */
.swiper-autoheight,
.swiper-autoheight .swiper-slide {
height: auto;
}
.swiper-autoheight .swiper-wrapper {
align-items: flex-start;
transition-property: transform, height;
}
.swiper-backface-hidden .swiper-slide {
transform: translateZ(0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
/* 3D Effects */
.swiper-3d,
.swiper-3d.swiper-css-mode .swiper-wrapper {
perspective: 1200px;
}
.swiper-3d .swiper-wrapper,
.swiper-3d .swiper-slide,
.swiper-3d .swiper-slide-shadow,
.swiper-3d .swiper-slide-shadow-left,
.swiper-3d .swiper-slide-shadow-right,
.swiper-3d .swiper-slide-shadow-top,
.swiper-3d .swiper-slide-shadow-bottom,
.swiper-3d .swiper-cube-shadow {
transform-style: preserve-3d;
}
.swiper-3d .swiper-slide-shadow,
.swiper-3d .swiper-slide-shadow-left,
.swiper-3d .swiper-slide-shadow-right,
.swiper-3d .swiper-slide-shadow-top,
.swiper-3d .swiper-slide-shadow-bottom {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 10;
}
.swiper-3d .swiper-slide-shadow {
background: rgba(0, 0, 0, 0.15);
}
.swiper-3d .swiper-slide-shadow-left {
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.swiper-3d .swiper-slide-shadow-right {
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.swiper-3d .swiper-slide-shadow-top {
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.swiper-3d .swiper-slide-shadow-bottom {
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
/* CSS Mode */
.swiper-css-mode > .swiper-wrapper {
overflow: auto;
scrollbar-width: none;
/* For Firefox */
-ms-overflow-style: none;
/* For Internet Explorer and Edge */
}
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
display: none;
}
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
scroll-snap-align: start start;
}
.swiper-horizontal.swiper-css-mode > .swiper-wrapper {
scroll-snap-type: x mandatory;
}
.swiper-vertical.swiper-css-mode > .swiper-wrapper {
scroll-snap-type: y mandatory;
}
.swiper-centered > .swiper-wrapper::before {
content: '';
flex-shrink: 0;
order: 9999;
}
.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
margin-inline-start: var(--swiper-centered-offset-before);
}
.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
height: 100%;
min-height: 1px;
width: var(--swiper-centered-offset-after);
}
.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
margin-block-start: var(--swiper-centered-offset-before);
}
.swiper-centered.swiper-vertical > .swiper-wrapper::before {
width: 100%;
min-width: 1px;
height: var(--swiper-centered-offset-after);
}
.swiper-centered > .swiper-wrapper > .swiper-slide {
scroll-snap-align: center center;
}
.swiper-virtual .swiper-slide {
-webkit-backface-visibility: hidden;
transform: translateZ(0);
}
.swiper-virtual.swiper-css-mode .swiper-wrapper::after {
content: '';
position: absolute;
left: 0;
top: 0;
pointer-events: none;
}
.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after {
height: 1px;
width: var(--swiper-virtual-size);
}
.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after {
width: 1px;
height: var(--swiper-virtual-size);
}
:root {
--swiper-navigation-size: 44px;
/*
--swiper-navigation-color: var(--swiper-theme-color);
*/
}
.swiper-button-prev,
.swiper-button-next {
position: absolute;
top: 50%;
width: calc(var(--swiper-navigation-size) / 44 * 27);
height: var(--swiper-navigation-size);
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
z-index: 10;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--swiper-navigation-color, var(--swiper-theme-color));
}
.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
opacity: 0.35;
cursor: auto;
pointer-events: none;
}
.swiper-button-prev.swiper-button-hidden,
.swiper-button-next.swiper-button-hidden {
opacity: 0;
cursor: auto;
pointer-events: none;
}
.swiper-navigation-disabled .swiper-button-prev,
.swiper-navigation-disabled .swiper-button-next {
display: none !important;
}
.swiper-button-prev:after,
.swiper-button-next:after {
font-family: swiper-icons;
font-size: var(--swiper-navigation-size);
text-transform: none !important;
letter-spacing: 0;
font-variant: initial;
line-height: 1;
}
.swiper-button-prev,
.swiper-rtl .swiper-button-next {
left: 10px;
right: auto;
}
.swiper-button-prev:after,
.swiper-rtl .swiper-button-next:after {
content: 'prev';
}
.swiper-button-next,
.swiper-rtl .swiper-button-prev {
right: 10px;
left: auto;
}
.swiper-button-next:after,
.swiper-rtl .swiper-button-prev:after {
content: 'next';
}
.swiper-button-lock {
display: none;
}
:root {
/*
--swiper-pagination-color: var(--swiper-theme-color);
--swiper-pagination-bullet-size: 8px;
--swiper-pagination-bullet-width: 8px;
--swiper-pagination-bullet-height: 8px;
--swiper-pagination-bullet-inactive-color: #000;
--swiper-pagination-bullet-inactive-opacity: 0.2;
--swiper-pagination-bullet-opacity: 1;
--swiper-pagination-bullet-horizontal-gap: 4px;
--swiper-pagination-bullet-vertical-gap: 6px;
*/
}
.swiper-pagination {
position: absolute;
text-align: center;
transition: 300ms opacity;
transform: translate3d(0, 0, 0);
z-index: 10;
}
.swiper-pagination.swiper-pagination-hidden {
opacity: 0;
}
.swiper-pagination-disabled > .swiper-pagination,
.swiper-pagination.swiper-pagination-disabled {
display: none !important;
}
/* Common Styles */
.swiper-pagination-fraction,
.swiper-pagination-custom,
.swiper-horizontal > .swiper-pagination-bullets,
.swiper-pagination-bullets.swiper-pagination-horizontal {
bottom: 10px;
left: 0;
width: 100%;
}
/* Bullets */
.swiper-pagination-bullets-dynamic {
overflow: hidden;
font-size: 0;
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transform: scale(0.33);
position: relative;
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
transform: scale(1);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
transform: scale(1);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
transform: scale(0.66);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
transform: scale(0.33);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
transform: scale(0.66);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
transform: scale(0.33);
}
.swiper-pagination-bullet {
width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
display: inline-block;
border-radius: 50%;
background: var(--swiper-pagination-bullet-inactive-color, #000);
opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);
}
button.swiper-pagination-bullet {
border: none;
margin: 0;
padding: 0;
box-shadow: none;
-webkit-appearance: none;
appearance: none;
}
.swiper-pagination-clickable .swiper-pagination-bullet {
cursor: pointer;
}
.swiper-pagination-bullet:only-child {
display: none !important;
}
.swiper-pagination-bullet-active {
opacity: var(--swiper-pagination-bullet-opacity, 1);
background: var(--swiper-pagination-color, var(--swiper-theme-color));
}
.swiper-vertical > .swiper-pagination-bullets,
.swiper-pagination-vertical.swiper-pagination-bullets {
right: 10px;
top: 50%;
transform: translate3d(0px, -50%, 0);
}
.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,
.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet {
margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;
display: block;
}
.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,
.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
top: 50%;
transform: translateY(-50%);
width: 8px;
}
.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,
.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
display: inline-block;
transition: 200ms transform, 200ms top;
}
.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);
}
.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,
.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
}
.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,
.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transition: 200ms transform, 200ms left;
}
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transition: 200ms transform, 200ms right;
}
/* Progress */
.swiper-pagination-progressbar {
background: rgba(0, 0, 0, 0.25);
position: absolute;
}
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
background: var(--swiper-pagination-color, var(--swiper-theme-color));
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
transform: scale(0);
transform-origin: left top;
}
.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
transform-origin: right top;
}
.swiper-horizontal > .swiper-pagination-progressbar,
.swiper-pagination-progressbar.swiper-pagination-horizontal,
.swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,
.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {
width: 100%;
height: 4px;
left: 0;
top: 0;
}
.swiper-vertical > .swiper-pagination-progressbar,
.swiper-pagination-progressbar.swiper-pagination-vertical,
.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,
.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {
width: 4px;
height: 100%;
left: 0;
top: 0;
}
.swiper-pagination-lock {
display: none;
}
/* Scrollbar */
.swiper-scrollbar {
border-radius: 10px;
position: relative;
-ms-touch-action: none;
background: rgba(0, 0, 0, 0.1);
}
.swiper-scrollbar-disabled > .swiper-scrollbar,
.swiper-scrollbar.swiper-scrollbar-disabled {
display: none !important;
}
.swiper-horizontal > .swiper-scrollbar,
.swiper-scrollbar.swiper-scrollbar-horizontal {
position: absolute;
left: 1%;
bottom: 3px;
z-index: 50;
height: 5px;
width: 98%;
}
.swiper-vertical > .swiper-scrollbar,
.swiper-scrollbar.swiper-scrollbar-vertical {
position: absolute;
right: 3px;
top: 1%;
z-index: 50;
width: 5px;
height: 98%;
}
.swiper-scrollbar-drag {
height: 100%;
width: 100%;
position: relative;
background: rgba(0, 0, 0, 0.5);
border-radius: 10px;
left: 0;
top: 0;
}
.swiper-scrollbar-cursor-drag {
cursor: move;
}
.swiper-scrollbar-lock {
display: none;
}
.swiper-zoom-container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.swiper-zoom-container > img,
.swiper-zoom-container > svg,
.swiper-zoom-container > canvas {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.swiper-slide-zoomed {
cursor: move;
}
/* Preloader */
:root {
/*
--swiper-preloader-color: var(--swiper-theme-color);
*/
}
.swiper-lazy-preloader {
width: 42px;
height: 42px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -21px;
margin-top: -21px;
z-index: 10;
transform-origin: 50%;
box-sizing: border-box;
border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
border-radius: 50%;
border-top-color: transparent;
}
.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {
animation: swiper-preloader-spin 1s infinite linear;
}
.swiper-lazy-preloader-white {
--swiper-preloader-color: #fff;
}
.swiper-lazy-preloader-black {
--swiper-preloader-color: #000;
}
@keyframes swiper-preloader-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* a11y */
.swiper .swiper-notification {
position: absolute;
left: 0;
top: 0;
pointer-events: none;
opacity: 0;
z-index: -1000;
}
.swiper-free-mode > .swiper-wrapper {
transition-timing-function: ease-out;
margin: 0 auto;
}
.swiper-grid > .swiper-wrapper {
flex-wrap: wrap;
}
.swiper-grid-column > .swiper-wrapper {
flex-wrap: wrap;
flex-direction: column;
}
.swiper-fade.swiper-free-mode .swiper-slide {
transition-timing-function: ease-out;
}
.swiper-fade .swiper-slide {
pointer-events: none;
transition-property: opacity;
}
.swiper-fade .swiper-slide .swiper-slide {
pointer-events: none;
}
.swiper-fade .swiper-slide-active,
.swiper-fade .swiper-slide-active .swiper-slide-active {
pointer-events: auto;
}
.swiper-cube {
overflow: visible;
}
.swiper-cube .swiper-slide {
pointer-events: none;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
z-index: 1;
visibility: hidden;
transform-origin: 0 0;
width: 100%;
height: 100%;
}
.swiper-cube .swiper-slide .swiper-slide {
pointer-events: none;
}
.swiper-cube.swiper-rtl .swiper-slide {
transform-origin: 100% 0;
}
.swiper-cube .swiper-slide-active,
.swiper-cube .swiper-slide-active .swiper-slide-active {
pointer-events: auto;
}
.swiper-cube .swiper-slide-active,
.swiper-cube .swiper-slide-next,
.swiper-cube .swiper-slide-prev,
.swiper-cube .swiper-slide-next + .swiper-slide {
pointer-events: auto;
visibility: visible;
}
.swiper-cube .swiper-slide-shadow-top,
.swiper-cube .swiper-slide-shadow-bottom,
.swiper-cube .swiper-slide-shadow-left,
.swiper-cube .swiper-slide-shadow-right {
z-index: 0;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.swiper-cube .swiper-cube-shadow {
position: absolute;
left: 0;
bottom: 0px;
width: 100%;
height: 100%;
opacity: 0.6;
z-index: 0;
}
.swiper-cube .swiper-cube-shadow:before {
content: '';
background: #000;
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
filter: blur(50px);
}
.swiper-flip {
overflow: visible;
}
.swiper-flip .swiper-slide {
pointer-events: none;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
z-index: 1;
}
.swiper-flip .swiper-slide .swiper-slide {
pointer-events: none;
}
.swiper-flip .swiper-slide-active,
.swiper-flip .swiper-slide-active .swiper-slide-active {
pointer-events: auto;
}
.swiper-flip .swiper-slide-shadow-top,
.swiper-flip .swiper-slide-shadow-bottom,
.swiper-flip .swiper-slide-shadow-left,
.swiper-flip .swiper-slide-shadow-right {
z-index: 0;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.swiper-creative .swiper-slide {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
overflow: hidden;
transition-property: transform, opacity, height;
}
.swiper-cards {
overflow: visible;
}
.swiper-cards .swiper-slide {
transform-origin: center bottom;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
overflow: hidden;
}
/*
* @Author: super
* @Date: 2021-01-20 14:08:27
* @LastEditTime: 2021-01-20 14:53:39
* @LastEditors: super
* @Description:
*/
import { isMiniprogram, isIos } from "./utils";
/** 渠道参数 */
export const CHANNEL_PARAMS = {
/** 人保寿险管家app */
RB_APP: 1,
/** 人保寿险企业家助手微信公众号 */
RB_WX_PUBLIC: 2,
/** 友客微信公众号 */
YK_PUBLIC: 3,
/** 人保寿险E服务公众号h5 */
E_MINI: 4,
/** 友客小程序 */
YK_MINI: 5,
/** e通app */
ET_APP: 6,
/** 微通(企业微信) */
WT_YK_PUBLIC: 7,
/** 友客获客公众号 */
YKHK_PUBLIC: 8,
};
/* 电话号码验证规则 **/
export const REG_TEL = /^1[0-9]{10}$/;
/**
* 任务code
* 3. 保豆签到任务,code为:sign;
* 4. 展示渠道不做过滤展示,可直接在展示渠道完成的浏览任务,如:浏览美满赢家、浏览康宁嘉倍、浏览运动意外伤害保险 等,code以:btt1_ 开头,示例:btt1_1、btt1_2、btt1_zx1
* 5. 友客端需要做特殊展示限制的浏览任务,如:浏览关爱百万医疗、浏览关爱百万2019医疗保险组合、乐业福 等,code以:btt2_ 开头,示例:btt2_1、btt2_2、btt2_3;产品组合编码配置在任务描述里面,示例:1111、2222;
* 6. app端展示,但不可完成的浏览任务,如:浏览企业人人保、浏览畅行保产品计划A赠险、浏览畅行保产品计划B赠险 等,code以:btt3_ 开头,示例:btt3_1、btt3_zx2、btt3_zx3;
* 7. 赠险浏览任务,不需要浏览7s,code包含zx;
*/
export const TASK_CODE = {
/** 签到任务 */
THIRD_SIGN: "common_sign",
/** 答题任务 */
ANSRWER: "common_answer",
/** 分享任务 */
SHARE: "share",
/** 留资任务 */
FILL: "common_fill",
/** 邀请任务 */
INVITE: "common_invite",
/** 正常展示的浏览任务:app内有秒限制,根据端内跳转回调算完成;友客端需要链接后拼code值 */
BROWSE_COMMON: "browse_",
/** 友客端需要做销售限制特殊展示的浏览任务:app内有秒限制,根据端内跳转回调算完成;友客端不需要链接后拼code值 */
BROWSE_AREA: "btt2_",
/** 展示特殊处理浏览任务:app端不展示去完成按钮 */
BROWSE_SPECIAL_SHOW: "btt3_",
/** 浏览赠险任务(会在bttx_后面追加_zx进行区分):app内无秒限制,点击即完成;友客端需要链接后拼code值 */
BROWSE_INSURE: "_zx",
};
/* 表情包 正则 **/
export const emojiReg = /(\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f\ude80-\udeff])|[\u2600-\u2B55]/g;
/* 特殊字符 正则 **/
export const specialStrReg =
/[`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、「」]/g;
export const platFormName = {
/** 人保寿险管家app */
1: "人保寿险管家app",
/** 人保寿险企业家助手微信公众号 */
2: "人保寿险E服务",
/** 友客微信公众号 */
3: "友客微信公众号",
/** 人保寿险E服务公众号h5 */
4: "e服务公众号",
/** 友客小程序 */
5: "人保友客",
/** e通app */
6: "人保e通-寿险板块",
/** 微通(企业微信) */
7: "微通(企业微信)",
/** 友客获客公众号 */
8: isMiniprogram() ? "人保友客" : "友客微信公众号",
};
export const platformType = {
/** 人保寿险管家app */
1: isIos() ? "iOS" : "Android",
/** 人保寿险企业家助手微信公众号 */
2: "微信公众号",
/** 友客微信公众号 */
3: "微信公众号",
/** 人保寿险E服务公众号h5 */
4: "微信公众号",
/** 友客小程序 */
5: "微信小程序",
/** e通app */
6: isIos() ? "iOS" : "Android",
/** 微通(企业微信) */
7: "微信公众号",
/** 友客获客公众号 */
8: isMiniprogram() ? "微信小程序" : "微信公众号",
};
export const extranceName = {
1: "人保寿险管家app",
2: "人保寿险企业家助手微信公众号",
3: "友客微信公众号",
4: "e服务公众号",
5: "人保友客",
6: "人保e通-寿险板块",
7: "微通(企业微信)",
8: "人保友客",
};
/** 判断微信环境 */
export function isWeChat() {
if (typeof window === 'undefined') return false
const ua = window.navigator.userAgent.toLowerCase()
return ua.includes('micromessenger')
}
......
...@@ -439,4 +439,41 @@ export function prefixInteger(num: number, length: number) { ...@@ -439,4 +439,41 @@ export function prefixInteger(num: number, length: number) {
export const miniGoUrl = (url) => { export const miniGoUrl = (url) => {
// @ts-ignore // @ts-ignore
wx.miniProgram.navigateTo({ url: url }); wx.miniProgram.navigateTo({ url: url });
} }
\ No newline at end of file
/** 判断小程序 */
export const isMiniprogram = () => {
const ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("miniprogram") > -1) return true
return false
}
/**
* 判断是否为ios系统
*/
export function isIos() {
return navigator.userAgent.match(/iphone|ipod|ipad/gi)
}
/* 电话号码验证规则 **/
export const REG_TEL = /^1[0-9]{10}$/;
/** 端内跳转 */
export const appJump = (module, method, params, callback) => {
window.PICCLifeJsBrage.callNative({
module: module,
method: method,
params: JSON.stringify(params),
callback: callback,
});
}
/** 跳转 */
export const windowJumpUrl = (url) => {
url && (location.href = url);
};
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