Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RB_StrongestBrain_250520
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
RB_StrongestBrain_250520
Commits
12b96e3b
Commit
12b96e3b
authored
May 21, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
a08015df
d529b6b6
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
551 additions
and
256 deletions
+551
-256
index.html
index.html
+25
-0
draw.ts
mock/draw.ts
+0
-0
index.ts
mock/index.ts
+6
-12
prize.ts
mock/prize.ts
+14
-0
task.ts
mock/task.ts
+2
-2
pnpm-lock.yaml
pnpm-lock.yaml
+8
-8
index.ts
src/api/index.ts
+73
-3
DrawPage.jsx
src/pages/DrawPage/DrawPage.jsx
+1
-13
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+6
-4
MyPrize.tsx
src/pages/MyPrize/MyPrize.tsx
+2
-2
drawpage.jsx
src/pages/drawpage/drawpage.jsx
+0
-189
FillAddress.jsx
src/panels/FillAddress/FillAddress.jsx
+3
-3
longImgPop.jsx
src/panels/longImgPop/longImgPop.jsx
+0
-0
selectmodal.jsx
src/panels/selectmodal/selectmodal.jsx
+0
-0
taskpop.jsx
src/panels/taskpop/taskpop.jsx
+4
-5
taskpop.less
src/panels/taskpop/taskpop.less
+2
-2
share.ts
src/store/share.ts
+314
-0
task.ts
src/store/task.ts
+3
-3
share.ts
src/utils/share.ts
+88
-10
No files found.
index.html
View file @
12b96e3b
...
...
@@ -50,8 +50,33 @@
}
// 免登中间页
CFG
.
loginMidUrl
=
"/customShare/share?id="
+
CFG
.
loginMidId
+
"&source=duiba&projectId="
+
CFG
.
projectId
+
"&redirectUrl="
;
CFG
.
domain
=
location
.
origin
;
//actPlatforms
CFG
.
actPlatforms
=
getUrlParam
(
"actPlatforms"
)
||
""
;
//actPlatforms
CFG
.
agentCode
=
getUrlParam
(
"agentCode"
)
||
""
;
//actPlatforms
CFG
.
actId
=
getUrlParam
(
"actId"
)
||
""
;
// 特殊的业务员code
CFG
.
spcCode
=
getUrlParam
(
"code"
)
||
""
;
// 业务员code
CFG
.
workerCode
=
getUrlParam
(
"ykCode"
)
||
CFG
.
spcCode
;
// 渠道 1-9
CFG
.
channel
=
getUrlParam
(
"channel"
)
||
"2"
;
// 默认渠道 除了友客渠道,其他统一按照2处理
// CFG.defaultChannel = CFG.channel == 5 ? 5 : CFG.channel == 3 ? 3 : 2;
CFG
.
defaultChannel
=
CFG
.
channel
||
"2"
;
// 助力参数
CFG
.
inviteCode
=
getUrlParam
(
"inviteCode"
);
// 微信授权链接
CFG
.
indexLogin
=
"/wechat/access?apk=4AoRyTuR6XNfjNa4w5exe1bPmqDS&dbredirect="
;
// 普通分享落地页
CFG
.
shareUrl
=
"/projectx/"
+
CFG
.
projectId
+
"/sharepage.html?appID="
+
getUrlParam
(
"appID"
);
// CFG.shareUrl = '/projectx/' + CFG.projectId + '/share.html?appKey=4AoRyTuR6XNfjNa4w5exe1bPmqDS&openBs=openbs&appID=' + CFG.appID;
// 普通分享落地页
CFG
.
fireShareUrl
=
"/projectx/"
+
CFG
.
projectId
+
"/firesharepage.html?appID="
+
getUrlParam
(
"appID"
);
if
(
!
getUrlParam
(
"appID"
))
{
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
...
...
mock/draw.
j
s
→
mock/draw.
t
s
View file @
12b96e3b
File moved
mock/index.ts
View file @
12b96e3b
...
...
@@ -25,18 +25,12 @@ export default [
"test_config_02"
:
"111"
,
// 规则长图
"ruleImg"
:
'//yun.duiba.com.cn/polaris/bg.18539c61e0103e01a339dd268558b2559ab178ba.png'
,
shareInfo
:
[
{
"title"
:
'normal'
,
"desc"
:
'2025年“3·15”金融消费者权益保护教育宣传活动'
,
"imgUrl"
:
'//yun.duiba.com.cn/polaris/image.42930d3760a71de0c9b80cb7481767718dca11d3.png'
},
{
"title"
:
'invite'
,
"desc"
:
'2025年“3·15”金融消费者权益保护教育宣传活动'
,
"imgUrl"
:
'//yun.duiba.com.cn/polaris/image%20(1).aba678324b060ee2050bbdaf83c05c8ddb3a3dd2.png'
}
],
shareInfo
:
JSON
.
stringify
({
"title"
:
"许愿迎新春"
,
"content"
:
"参与活动生成你的专属烟花吧~"
,
"thumbnail"
:
"https://yun.duiba.com.cn/polaris/%E6%9C%AA%E6%A0%87%E9%A2%98-1.501ac89a8b4c601209edf8b9c3b67fd5228f1ed8.jpg"
,
"imgUrl"
:
"https://yun.duiba.com.cn/polaris/%E6%9C%AA%E6%A0%87%E9%A2%98-1.501ac89a8b4c601209edf8b9c3b67fd5228f1ed8.jpg"
}),
shopUrl
:
'https://'
}
}
...
...
mock/prize.ts
View file @
12b96e3b
export
default
[
{
url
:
'/common/visit.do'
,
method
:
'get'
,
response
:
({
query
})
=>
{
return
{
success
:
true
,
code
:
""
,
message
:
""
,
data
:
{
code
:
'111'
},
}
}
},
{
url
:
'/game/queryBoundYk.do'
,
method
:
'get'
,
...
...
mock/task.ts
View file @
12b96e3b
...
...
@@ -106,7 +106,7 @@ export default [
item
:
[
{
buttonText
:
"去完成"
,
code
:
"
browser_zeng_yuan_1
"
,
code
:
"
common_invite
"
,
completedSize
:
1
,
desc
:
null
,
extra
:
'{"answerTimes":0,"drawTimes":0}'
,
...
...
@@ -138,7 +138,7 @@ export default [
ruleId
:
"spPrize@sp_draw_times@1"
,
sendPrize
:
true
,
subTitle
:
"抽奖次数+1抽奖次数+1抽奖次数+1"
,
taskStatus
:
2
,
taskStatus
:
0
,
title
:
"邀请任务"
,
},
{
...
...
pnpm-lock.yaml
View file @
12b96e3b
...
...
@@ -1681,7 +1681,7 @@ packages:
resolution
:
{
integrity
:
sha512-lKTdfDhS38NrgEJaNagk1zgVX69hH8ZAi9vdpD3+G20EI5S+4W7bB/L+G9BpwsltJpeKAhOxnK0d31DGgD2zRg==
}
'
@spark/circle-turntable@1.0.3'
:
resolution
:
{
integrity
:
sha512-oJBskZlBFmuNQRmg7/OfkZ+T903f9+XMosWklbhnRNKBEwckYXR+ml+c8m1YVhgGjixFwdxtGaIY8BHtYUxBbg==
,
tarball
:
http
:
//npm.dui88.com
:
80/@spark%2fcircle-turntable/-/circle-turntable-1.0.3.tgz
}
resolution
:
{
integrity
:
sha512-oJBskZlBFmuNQRmg7/OfkZ+T903f9+XMosWklbhnRNKBEwckYXR+ml+c8m1YVhgGjixFwdxtGaIY8BHtYUxBbg==
}
peerDependencies
:
react
:
^17.0.2
react-dom
:
17.0.2
...
...
@@ -2116,7 +2116,7 @@ packages:
engines
:
{
node
:
'
>=
0.4'
}
axios@1.2.3
:
resolution
:
{
integrity
:
sha512-pdDkMYJeuXLZ6Xj/Q5J3Phpe+jbGdsSzlQaFVkMQzRUL05+6+tetX8TV3p4HrU4kzuO9bt+io/yGQxuyxA/xcw==
,
tarball
:
http
:
//npm.dui88.com
:
80/axios/-/axios-1.2.3.tgz
}
resolution
:
{
integrity
:
sha512-pdDkMYJeuXLZ6Xj/Q5J3Phpe+jbGdsSzlQaFVkMQzRUL05+6+tetX8TV3p4HrU4kzuO9bt+io/yGQxuyxA/xcw==
}
axios@1.9.0
:
resolution
:
{
integrity
:
sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==
}
...
...
@@ -2140,7 +2140,7 @@ packages:
resolution
:
{
integrity
:
sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=
}
balloon-css@1.2.0
:
resolution
:
{
integrity
:
sha512-urXwkHgwp6GsXVF+it01485Z2Cj4pnW02ICnM0TemOlkKmCNnDLmyy+ZZiRXBpwldUXO+aRNr7Hdia4CBvXJ5A==
,
tarball
:
http
:
//npm.dui88.com
:
80/balloon-css/-/balloon-css-1.2.0.tgz
}
resolution
:
{
integrity
:
sha512-urXwkHgwp6GsXVF+it01485Z2Cj4pnW02ICnM0TemOlkKmCNnDLmyy+ZZiRXBpwldUXO+aRNr7Hdia4CBvXJ5A==
}
base64-arraybuffer@1.0.2
:
resolution
:
{
integrity
:
sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==
}
...
...
@@ -2447,7 +2447,7 @@ packages:
resolution
:
{
integrity
:
sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=
}
db-react-helper@1.0.5
:
resolution
:
{
integrity
:
sha512-J4+DXr/Ah7t+/j96m73WzJ26VUfHzE5MxWj7kS62SV7iKCb5LTTcngWvn4jmpQnF54WAkhOjBt8sY6B+RkDPPA==
,
tarball
:
http
:
//npm.dui88.com
:
80/db-react-helper/-/db-react-helper-1.0.5.tgz
}
resolution
:
{
integrity
:
sha512-J4+DXr/Ah7t+/j96m73WzJ26VUfHzE5MxWj7kS62SV7iKCb5LTTcngWvn4jmpQnF54WAkhOjBt8sY6B+RkDPPA==
}
debug@2.6.9
:
resolution
:
{
integrity
:
sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=
}
...
...
@@ -2558,7 +2558,7 @@ packages:
engines
:
{
node
:
'
>=12'
}
dplayer@1.27.1
:
resolution
:
{
integrity
:
sha512-2laBMXs5V1B9zPwJ7eAIw/OBo+Xjvy03i4GHTk3Cg+IWbrq8rKMFO0fFr6ClAYotYOCcFGOvaJDkOZcgKllsCA==
,
tarball
:
http
:
//npm.dui88.com
:
80/dplayer/-/dplayer-1.27.1.tgz
}
resolution
:
{
integrity
:
sha512-2laBMXs5V1B9zPwJ7eAIw/OBo+Xjvy03i4GHTk3Cg+IWbrq8rKMFO0fFr6ClAYotYOCcFGOvaJDkOZcgKllsCA==
}
duiba-utils@1.0.13
:
resolution
:
{
integrity
:
sha512-VEFzmfiujSZcl40jgRhkuv1lAsvLxhfArENFbI1NXxAz9iihdGOH1SdTektWaH5hrwsWvy/6kB088KzxJ+QvtA==
}
...
...
@@ -3276,7 +3276,7 @@ packages:
engines
:
{
node
:
'
>=8'
}
less-loader@11.1.4
:
resolution
:
{
integrity
:
sha512-6/GrYaB6QcW6Vj+/9ZPgKKs6G10YZai/l/eJ4SLwbzqNTBsAqt5hSLVF47TgsiBxV1P6eAU0GYRH3YRuQU9V3A==
,
tarball
:
http
:
//npm.dui88.com
:
80/less-loader/-/less-loader-11.1.4.tgz
}
resolution
:
{
integrity
:
sha512-6/GrYaB6QcW6Vj+/9ZPgKKs6G10YZai/l/eJ4SLwbzqNTBsAqt5hSLVF47TgsiBxV1P6eAU0GYRH3YRuQU9V3A==
}
engines
:
{
node
:
'
>=
14.15.0'
}
peerDependencies
:
less
:
^3.5.0 || ^4.0.0
...
...
@@ -4031,7 +4031,7 @@ packages:
engines
:
{
node
:
'
>=0.4.0'
}
promise-polyfill@8.3.0
:
resolution
:
{
integrity
:
sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==
,
tarball
:
http
:
//npm.dui88.com
:
80/promise-polyfill/-/promise-polyfill-8.3.0.tgz
}
resolution
:
{
integrity
:
sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==
}
protobufjs@7.5.0
:
resolution
:
{
integrity
:
sha512-Z2E/kOY1QjoMlCytmexzYfDm/w5fKAiRwpSzGtdnXW1zC88Z2yXazHHrOtwCzn+7wSxyE8PYM4rvVcMphF9sOA==
}
...
...
@@ -4697,7 +4697,7 @@ packages:
engines
:
{
node
:
'
>=8'
}
wrap-ansi@7.0.0
:
resolution
:
{
integrity
:
sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=
,
tarball
:
http
:
//npm.dui88.com
:
80/wrap-ansi/-/wrap-ansi-7.0.0.tgz
}
resolution
:
{
integrity
:
sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM=
}
engines
:
{
node
:
'
>=10'
}
wrap-ansi@8.1.0
:
...
...
src/api/index.ts
View file @
12b96e3b
...
...
@@ -87,9 +87,6 @@ const API = generateAPI({
receiveBubble
:
"main/receiveBubble.do"
,
startVideo
:
"main/startVideo.do"
,
/** 奖品页 */
prize
:
"/crecord/getrecordmn"
,
/** 获取任务列表 */
...
...
@@ -108,6 +105,79 @@ const API = generateAPI({
method
:
"post"
,
withToken
:
true
,
},
/**数据推送 */
visit
:
`common/visit.do`
,
// 推送使用
outside
:
{
uri
:
`inviteAssist_1/outside.do`
,
widthToken
:
true
,
},
// 推送使用
assistJoin
:
{
uri
:
`inviteAssist_1/join.do`
,
widthToken
:
true
,
},
bindPhone
:
{
uri
:
"/customActivity/piccLife/bindWithCode"
,
method
:
"post"
,
showMsg
:
false
,
},
/** 落地页 */
coop_getLoadingInfo
:
"customInvite1/outside.do"
,
/** 抽奖首页 */
drawIndex
:
"draw/index.do"
,
/** 抽奖 */
drawJoin
:
{
uri
:
"draw/doDraw.do"
,
withToken
:
true
,
},
/** 校验验证码并登录 */
coopCheckCode
:
{
uri
:
"examine/coop_checkCode.do"
,
method
:
"post"
,
},
getCode
:
{
uri
:
"/customActivity/piccLife/sendSmsCode"
,
// showMsg: false,
},
/** 发送验证码 */
coopSendCode
:
{
uri
:
"examine/coop_sendCode.do"
,
method
:
"post"
,
},
/** 校验是否绑定手机号 */
checkBind
:
"/customActivity/piccLife/check"
,
////////////////////////////////////////////////////////
/** 同意隐私协议接口*/
agreePrivacy
:
"main/agreePrivacy.do"
,
buriedPoint
:
{
uri
:
"home/buriedPoint.do"
,
showMsg
:
false
,
},
/** 绑定友客业务员信息接口 */
bindYk
:
{
uri
:
"agent/bindYk.do"
,
method
:
"post"
,
showMsg
:
false
,
},
/** 生成唤端二维码 */
getLongLinkQrcode
:
`/customActivity/qrcode/getQrcode`
,
queryInviteRecords
:
"inviteAssist_1/queryInviteRecords.do"
,
})
// console.log('======', API)
...
...
src/pages/DrawPage/DrawPage.jsx
View file @
12b96e3b
...
...
@@ -13,21 +13,9 @@ import { Button, Toast } from "@grace/ui";
import
{
PageCtrl
}
from
"@/core/ctrls/PageCtrl"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
<
<<<<<<
HEAD
=======
import
React
from
'
react
';
import
{
observer
}
from
'
mobx
-
react
';
import
'
.
/
DrawPage
.
less
';
import
{
_asyncThrottle
}
from
'
..
/
..
/
utils
/
utils
.
ts
';
import
store
from
'
..
/
..
/
store
/
store
.
ts
';
import
{
CHANNEL_PARAMS
}
from
'@/
utils
/
constants
';
import
{
CircleTurntable
}
from
'@
spark
/
circle
-
turntable
'
// import { Button } from '@src/components/Button';
// import { Marquee, Toast } from '@spark/ui';
// import { isWeChat } from '@src/utils/share';
>
>>>>>>
9220288db04479c19dd6c72d8df036f6453c36b0
// import { LOG_KEY, pageView, sensorLog } from '@src/utils/sensors';
@
observer
class
Drawpage
extends
React
.
Component
{
constructor
(
props
)
{
...
...
src/pages/HomePage/HomePage.tsx
View file @
12b96e3b
...
...
@@ -8,9 +8,9 @@ import { _asyncThrottle } from "../../utils/utils";
import
{
PageCtrl
}
from
"@/core/ctrls/PageCtrl"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
Rulepop
from
"../../components/rulepop/rulepop.jsx"
;
import
DrawPage
from
"../DrawPage/DrawPage.js"
;
import
DrawPage
from
"../DrawPage/DrawPage.js
x
"
;
import
store
from
'@/store/store'
;
import
Taskpop
from
'@/panels/taskpop/taskpop.js'
;
import
Taskpop
from
'@/panels/taskpop/taskpop.js
x
'
;
import
RankPage
from
'../RankPage/RankPage.js'
;
import
MyPrize
from
'../MyPrize/MyPrize.js'
;
...
...
@@ -26,6 +26,7 @@ class Homepage extends React.Component {
componentDidMount
()
{
store
.
updateIndex
()
}
handleButtonClick
=
_asyncThrottle
(
async
(
number
)
=>
{
// 活动时间判断
// 规则 奖品始终可以点击 我的排名结束可以点击 其余常规逻辑
...
...
@@ -39,12 +40,12 @@ class Homepage extends React.Component {
// 0 我的排名
case
0
:
// TODO 换成我的排名页面 记得引用
PageCtrl
.
changePage
(
RankPage
);
// PageCtrl.changePage();
break
;
// 1 抽奖
case
1
:
//
PageCtrl.changePage(DrawPage);
PageCtrl
.
changePage
(
DrawPage
);
break
;
// 2 做任务
...
...
@@ -52,6 +53,7 @@ class Homepage extends React.Component {
// TODO
ModalCtrl
.
showModal
(
Taskpop
);
break
;
// 3 答题
case
3
:
// TODO
...
...
src/pages/MyPrize/MyPrize.tsx
View file @
12b96e3b
...
...
@@ -9,8 +9,8 @@ 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'
;
import
{
Axios
}
from
'axios'
;
import
FillAddress
from
'@/panels/FillAddress/FillAddress
.jsx
'
;
const
apiAxios
=
new
Axios
({
timeout
:
10000
,
});
...
...
src/pages/drawpage/drawpage.jsx
deleted
100644 → 0
View file @
a08015df
"use strict"
;
import
React
from
"react"
;
import
{
observer
}
from
"mobx-react"
;
import
"./DrawPage.less"
;
import
{
_asyncThrottle
,
_throttle
}
from
"../../utils/utils.ts"
;
import
store
from
"../../store/store.ts"
;
import
{
CHANNEL_PARAMS
}
from
"../../utils/constants.ts"
;
import
{
CircleTurntable
}
from
"@spark/circle-turntable"
;
import
{
isWeiXin
}
from
"../../AppTools.ts"
;
import
API
from
"../../api/index.ts"
;
import
{
Button
,
Toast
}
from
"@grace/ui"
;
import
{
PageCtrl
}
from
"@/core/ctrls/PageCtrl"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
<
<<<<<<
HEAD
=======
import
React
from
'
react
';
import
{
observer
}
from
'
mobx
-
react
';
import
'
.
/
DrawPage
.
less
';
import
{
_asyncThrottle
}
from
'
..
/
..
/
utils
/
utils
.
ts
';
import
store
from
'
..
/
..
/
store
/
store
.
ts
';
import
{
CHANNEL_PARAMS
}
from
'@/
utils
/
constants
';
import
{
CircleTurntable
}
from
'@
spark
/
circle
-
turntable
'
// import { Button } from '@src/components/Button';
// import { Marquee, Toast } from '@spark/ui';
// import { isWeChat } from '@src/utils/share';
>
>>>>>>
9220288db04479c19dd6c72d8df036f6453c36b0
// import
{
LOG_KEY
,
pageView
,
sensorLog
}
from '@src/utils/sensors';
@observer
class Drawpage extends React.Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
drawInfo
:
{},
};
this
.
btnStarting
=
false
;
// 转盘是否启动
this
.
turntableRef
=
null
;
// 大转盘
this
.
drawResultInfo
=
{};
}
componentDidMount
()
{
this
.
getDrawInfo
();
// pageView("b12842",
{
// page_name: "抽奖大转盘",
//
});
// sensorLog(LOG_KEY.exposure, "b12842", "d12843",
{
// page_name: "抽奖大转盘",
// button_name: "立即抽奖按钮",
//
});
// sensorLog(LOG_KEY.exposure, "b12842", "d12844",
{
// page_name: "抽奖大转盘",
// button_name: "做任务,赚次数按钮",
//
});
// sensorLog(LOG_KEY.exposure, "b12842", "d12845",
{
// page_name: "抽奖大转盘",
// button_name: "返回按钮",
//
});
}
/** 获取转盘信息 */
getDrawInfo
=
async
()
=>
{
const
{
success
,
data
}
=
await
API
.
drawIndex
();
if
(
success
&&
data
)
{
this
.
setState
({
drawInfo
:
data
||
{},
});
}
};
// 开始抽奖
lottteryHandle
=
_asyncThrottle
(
async
()
=>
{
// sensorLog(LOG_KEY.click, "b12842", "d12843",
{
// page_name: "抽奖大转盘",
// button_name: "立即抽奖按钮",
//
});
// 微信端拦截
if
(
isWeiXin
())
{
// 友客小程序
if
(
CFG
.
channel
==
CHANNEL_PARAMS
.
YK_MINI
)
{
return
Toast
.
show
(
"请前往人保寿险管家app活动抽奖~"
);
}
// 其他微信端 提醒唤端弹窗
else
{
return
modalStore
.
pushPop
(
"CodePop"
);
}
}
const
{
prizeVOs
,
remainDrawTimes
}
=
this
.
state
.
drawInfo
;
// 抽奖次数为0
if
(
!
remainDrawTimes
)
{
return
Toast
(
"抽奖次数不足,快去做任务赚次数吧~"
);
}
if
(
this
.
btnStarting
)
return
false
;
this
.
btnStarting
=
true
;
const
{
success
,
data
}
=
await
API
.
drawJoin
();
if
(
success
&&
data
)
{
// 转盘转动开始抽奖
this
.
turntableRef
.
launch
();
this
.
drawResultInfo
=
data
||
{};
// 转盘停止转动,指针停在index
const
index
=
prizeVOs
?.
findIndex
(
(
item
)
=>
item
.
prizeId
===
(
this
.
drawResultInfo
.
prizeId
||
"thanks"
)
);
console
.
info
(
"index"
,
index
);
this
.
turntableRef
.
braking
(
index
);
}
else
{
this
.
btnStarting
=
false
;
this
.
getDrawInfo
();
}
});
// 转盘停止处理
stopOkHandle
=
()
=>
{
this
.
btnStarting
=
false
;
if
(
!
this
.
drawResultInfo
?.
prizeId
)
{
// modalStore.pushPop("NoPrizeCard",
{
data
:
this
.
drawResultInfo
})
}
else
{
// modalStore.pushPop("Pop_winprize",
{
data
:
this
.
drawResultInfo
})
}
this
.
getDrawInfo
();
};
/** 返回 */
backHome
=
_throttle
(()
=>
{
// sensorLog(LOG_KEY.click, "b12842", "d12845",
{
// page_name: "抽奖大转盘",
// button_name: "返回按钮",
//
});
if
(
this
.
btnStarting
)
return
false
;
// store.changePage(PAGE_MAP.HOME_PAGE)
});
goTask
=
_throttle
(()
=>
{
// sensorLog(LOG_KEY.click, "b12842", "d12844",
{
// page_name: "抽奖大转盘",
// button_name: "做任务,赚次数按钮",
//
});
if
(
this
.
btnStarting
)
return
false
;
// modalStore.pushPop("Taskpop",
{
onClose
:
()
=>
this
.
getDrawInfo
()
})
});
render
()
{
const
{
prizeVOs
,
remainDrawTimes
}
=
this
.
state
.
drawInfo
;
return
(
<
div
className=
"drawpage modal_center"
>
<
span
className=
"bg"
></
span
>
<
Button
className=
"back_btn md19"
onClick=
{
this
.
backHome
}
/>
<
Button
className=
"task_btn md21"
onClick=
{
this
.
goTask
}
/>
<
Button
className=
"draw_btn_box md20"
onClick=
{
this
.
lottteryHandle
}
>
<
span
className=
"draw_btn"
></
span
>
<
span
className=
"left_num"
>
剩余次数:
{
remainDrawTimes
||
0
}
</
span
>
</
Button
>
<
div
className=
"turantable"
>
<
CircleTurntable
className=
"turantable_box"
ref=
{
(
ref
)
=>
(
this
.
turntableRef
=
ref
)
}
options=
{
prizeVOs
||
[]
}
angleOffset=
{
30
}
// 角度偏移量
radian=
{
100
}
// 奖项半径
launchDuration=
{
1000
}
// 启动时间
// 大转盘背景
renderBackground=
{
<
div
className=
"turantable_bg"
></
div
>
}
// 大转盘指针
renderStartButton=
{
<></>
}
// 渲染奖品信息
renderOption=
{
(
option
)
=>
{
return
(
<
div
className=
"prize_item"
>
<
div
className=
"prize_name"
>
{
option
.
prizeName
}
</
div
>
<
img
className=
"prize_img"
src=
{
option
.
prizeImg
}
alt=
""
/>
</
div
>
);
}
}
didStop=
{
this
.
stopOkHandle
}
/>
<
span
className=
"pointer"
></
span
>
</
div
>
<
span
className=
"cover"
></
span
>
</
div
>
);
}
}
export default Drawpage;
src/panels/FillAddress/FillAddress.
t
sx
→
src/panels/FillAddress/FillAddress.
j
sx
View file @
12b96e3b
...
...
@@ -4,14 +4,14 @@ 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"
;
import
{
Axios
}
from
'axios'
;
import
Selectmodal
from
"../selectmodal/selectmodal
.jsx
"
;
const
apiAxios
=
new
Axios
({
timeout
:
10000
,
});
// wzjTODO 换皮
@
observer
class
FillAddress
extends
React
.
Component
<
any
,
any
>
{
class
FillAddress
extends
React
.
Component
{
fillMd
=
false
state
=
{
name
:
""
,
...
...
src/panels/longImgPop/longImgPop.
t
sx
→
src/panels/longImgPop/longImgPop.
j
sx
View file @
12b96e3b
File moved
src/panels/selectmodal/selectmodal.
t
sx
→
src/panels/selectmodal/selectmodal.
j
sx
View file @
12b96e3b
File moved
src/panels/taskpop/taskpop.
t
sx
→
src/panels/taskpop/taskpop.
j
sx
View file @
12b96e3b
...
...
@@ -5,12 +5,11 @@ 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 { RES_PATH } from '../../../sparkrc';
import
{
_throttle
}
from
'../../utils/utils
.ts
'
;
import
{
TASK_CODE
,
CHANNEL_PARAMS
}
from
'../../utils/constants.ts'
;
import
{
setCookies
}
from
'../../store/fetcher'
;
import
taskStore
from
'../../store/task'
;
import
store
from
'../../store'
;
import
{
setCookies
}
from
'../../store/fetcher.ts'
;
import
taskStore
from
'../../store/task.ts'
;
// import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog } from '../../utils/sensors';
import
{
ModalCtrl
}
from
'@/core/ctrls/ModalCtrl'
;
import
{
Button
}
from
'@grace/ui'
;
...
...
src/panels/taskpop/taskpop.less
View file @
12b96e3b
...
...
@@ -40,9 +40,9 @@
}
.list {
width: 730px;
height: 8
4
3px;
height: 8
7
3px;
left: 50px;
top:
21
0px;
top:
19
0px;
position: absolute;
overflow-y: scroll;
.item {
...
...
src/store/share.ts
0 → 100644
View file @
12b96e3b
This diff is collapsed.
Click to expand it.
src/store/task.ts
View file @
12b96e3b
...
...
@@ -3,14 +3,14 @@ import API from "../api/index";
import
store
from
"./store"
;
// import modalStore from "./modal";
import
{
saveCookies
,
setCookies
}
from
"./fetcher"
;
//
import shareStore from "./share";
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"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
LongImgPop
from
"@/panels/longImgPop/longImgPop"
;
import
LongImgPop
from
"@/panels/longImgPop/longImgPop
.jsx
"
;
const
taskStore
=
makeAutoObservable
({
/** 当前任务 */
...
...
@@ -47,7 +47,7 @@ const taskStore = makeAutoObservable({
//邀请
case
code
==
TASK_CODE
.
INVITE
:
console
.
info
(
"邀请任务"
);
//
const res = await shareStore.doInvite();
const
res
=
await
shareStore
.
doInvite
();
// modalStore.pushPop("Shareposter", { qrCode: res }, true);
break
;
//增员介绍 海报or视频
...
...
src/utils/share.ts
View file @
12b96e3b
/** 判断微信环境 */
export
function
isWeChat
()
{
if
(
typeof
window
===
'undefined'
)
return
false
import
{
start
,
updateShare
,
callShare
,
Weixin
,
}
from
"@spark/share"
/**
* @description: 小程序跳转
* @param {*}
* @return {*}
*/
export
const
miniGoUrl
=
(
url
)
=>
{
wx
.
miniProgram
.
navigateTo
({
url
:
url
});
}
/**
* 判断是否为ios系统
*/
export
function
isIos
()
{
return
navigator
.
userAgent
.
match
(
/iphone|ipod|ipad/gi
)
}
/** 判断微信环境 */
export
function
isWeChat
()
{
const
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
()
return
ua
.
includes
(
'micromessenger'
)
}
return
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
}
/**
* 初始化分享
*/
export
async
function
onInitShare
(
cb
)
{
await
start
([
Weixin
],
function
(
success
)
{
console
.
log
(
"share result:----"
,
success
)
cb
&&
cb
()
})
}
/**
* 更新分享
* @param {*} shareParams
* @param {*} justUpdate
*/
export
function
onUpdateShare
(
shareParams
)
{
console
.
info
(
"更新分享"
,
shareParams
)
updateShare
(
shareParams
)
}
/**
* 被动分享 - 北京银行
* @param {*} shareParams
*/
export
function
onCallShare
(
shareParams
)
{
console
.
info
(
"分享链接"
,
shareParams
)
callShare
(
shareParams
);
}
/**
* @description: 分享处理中心
* @param {Object} 分享信息
*/
export
const
requireShare
=
(
opts
)
=>
{
const
shareData
=
{
title
:
opts
.
shareTitle
,
content
:
opts
.
shareContent
,
url
:
opts
.
shareUrl
,
images
:
[{
image
:
opts
.
shareThumbnail
,
type
:
"url"
}],
};
console
.
log
(
'分享数据'
,
opts
);
const
shareStr
=
JSON
.
stringify
(
shareData
);
return
shareStr
;
};
/**
* @description: 小程序分享
* @param {*}
* @return {*}
*/
export
const
miniDoShare
=
(
opts
)
=>
{
console
.
log
(
opts
);
wx
.
miniProgram
.
postMessage
({
data
:
{
title
:
opts
.
title
,
// 标题
desc
:
opts
.
desc
,
// 描述
imgUrl
:
opts
.
imgUrl
,
// 图片
link
:
opts
.
link
// 链接
}
});
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment