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
c70332dc
Commit
c70332dc
authored
May 21, 2025
by
cc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f016a81b
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
448 additions
and
38 deletions
+448
-38
index.html
index.html
+25
-0
index.ts
mock/index.ts
+6
-12
task.ts
mock/task.ts
+2
-2
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+1
-1
MyPrize.tsx
src/pages/MyPrize/MyPrize.tsx
+2
-2
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
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 @
c70332dc
...
@@ -50,8 +50,33 @@
...
@@ -50,8 +50,33 @@
}
}
// 免登中间页
// 免登中间页
CFG
.
loginMidUrl
=
"/customShare/share?id="
+
CFG
.
loginMidId
+
"&source=duiba&projectId="
+
CFG
.
projectId
+
"&redirectUrl="
;
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"
))
{
if
(
!
getUrlParam
(
"appID"
))
{
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
}
...
...
mock/index.ts
View file @
c70332dc
...
@@ -25,18 +25,12 @@ export default [
...
@@ -25,18 +25,12 @@ export default [
"test_config_02"
:
"111"
,
"test_config_02"
:
"111"
,
// 规则长图
// 规则长图
"ruleImg"
:
'//yun.duiba.com.cn/polaris/bg.18539c61e0103e01a339dd268558b2559ab178ba.png'
,
"ruleImg"
:
'//yun.duiba.com.cn/polaris/bg.18539c61e0103e01a339dd268558b2559ab178ba.png'
,
shareInfo
:
[
shareInfo
:
JSON
.
stringify
({
{
"title"
:
"许愿迎新春"
,
"title"
:
'normal'
,
"content"
:
"参与活动生成你的专属烟花吧~"
,
"desc"
:
'2025年“3·15”金融消费者权益保护教育宣传活动'
,
"thumbnail"
:
"https://yun.duiba.com.cn/polaris/%E6%9C%AA%E6%A0%87%E9%A2%98-1.501ac89a8b4c601209edf8b9c3b67fd5228f1ed8.jpg"
,
"imgUrl"
:
'//yun.duiba.com.cn/polaris/image.42930d3760a71de0c9b80cb7481767718dca11d3.png'
"imgUrl"
:
"https://yun.duiba.com.cn/polaris/%E6%9C%AA%E6%A0%87%E9%A2%98-1.501ac89a8b4c601209edf8b9c3b67fd5228f1ed8.jpg"
},
}),
{
"title"
:
'invite'
,
"desc"
:
'2025年“3·15”金融消费者权益保护教育宣传活动'
,
"imgUrl"
:
'//yun.duiba.com.cn/polaris/image%20(1).aba678324b060ee2050bbdaf83c05c8ddb3a3dd2.png'
}
],
shopUrl
:
'https://'
shopUrl
:
'https://'
}
}
}
}
...
...
mock/task.ts
View file @
c70332dc
...
@@ -106,7 +106,7 @@ export default [
...
@@ -106,7 +106,7 @@ export default [
item
:
[
item
:
[
{
{
buttonText
:
"去完成"
,
buttonText
:
"去完成"
,
code
:
"
browser_zeng_yuan_1
"
,
code
:
"
common_invite
"
,
completedSize
:
1
,
completedSize
:
1
,
desc
:
null
,
desc
:
null
,
extra
:
'{"answerTimes":0,"drawTimes":0}'
,
extra
:
'{"answerTimes":0,"drawTimes":0}'
,
...
@@ -138,7 +138,7 @@ export default [
...
@@ -138,7 +138,7 @@ export default [
ruleId
:
"spPrize@sp_draw_times@1"
,
ruleId
:
"spPrize@sp_draw_times@1"
,
sendPrize
:
true
,
sendPrize
:
true
,
subTitle
:
"抽奖次数+1抽奖次数+1抽奖次数+1"
,
subTitle
:
"抽奖次数+1抽奖次数+1抽奖次数+1"
,
taskStatus
:
2
,
taskStatus
:
0
,
title
:
"邀请任务"
,
title
:
"邀请任务"
,
},
},
{
{
...
...
src/pages/HomePage/HomePage.tsx
View file @
c70332dc
...
@@ -10,7 +10,7 @@ import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
...
@@ -10,7 +10,7 @@ import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import
Rulepop
from
"../../components/rulepop/rulepop.jsx"
;
import
Rulepop
from
"../../components/rulepop/rulepop.jsx"
;
import
DrawPage
from
"../DrawPage/DrawPage.jsx"
;
import
DrawPage
from
"../DrawPage/DrawPage.jsx"
;
import
store
from
'@/store/store'
;
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
RankPage
from
'../RankPage/RankPage.js'
;
import
MyPrize
from
'../MyPrize/MyPrize.js'
;
import
MyPrize
from
'../MyPrize/MyPrize.js'
;
...
...
src/pages/MyPrize/MyPrize.tsx
View file @
c70332dc
...
@@ -9,8 +9,8 @@ import { isWeChat } from '@/utils/share';
...
@@ -9,8 +9,8 @@ import { isWeChat } from '@/utils/share';
import
store
from
'@/store/store'
;
import
store
from
'@/store/store'
;
import
{
ModalCtrl
}
from
'@/core/ctrls/ModalCtrl'
;
import
{
ModalCtrl
}
from
'@/core/ctrls/ModalCtrl'
;
import
SignSucPanel
from
'@/panels/SignSucPanel/SignSucPanel'
;
import
SignSucPanel
from
'@/panels/SignSucPanel/SignSucPanel'
;
import
{
Axios
,
AxiosRequestConfig
}
from
'axios'
;
import
{
Axios
}
from
'axios'
;
import
FillAddress
from
'@/panels/FillAddress/FillAddress'
;
import
FillAddress
from
'@/panels/FillAddress/FillAddress
.jsx
'
;
const
apiAxios
=
new
Axios
({
const
apiAxios
=
new
Axios
({
timeout
:
10000
,
timeout
:
10000
,
});
});
...
...
src/panels/FillAddress/FillAddress.
t
sx
→
src/panels/FillAddress/FillAddress.
j
sx
View file @
c70332dc
...
@@ -4,14 +4,14 @@ import "./FillAddress.less";
...
@@ -4,14 +4,14 @@ import "./FillAddress.less";
import
{
REG_TEL
,
_throttle
}
from
"@/utils/utils.ts"
;
import
{
REG_TEL
,
_throttle
}
from
"@/utils/utils.ts"
;
import
{
Toast
}
from
"@grace/ui"
;
import
{
Toast
}
from
"@grace/ui"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
{
Axios
,
AxiosRequestConfig
}
from
'axios'
;
import
{
Axios
}
from
'axios'
;
import
Selectmodal
from
"../selectmodal/selectmodal"
;
import
Selectmodal
from
"../selectmodal/selectmodal
.jsx
"
;
const
apiAxios
=
new
Axios
({
const
apiAxios
=
new
Axios
({
timeout
:
10000
,
timeout
:
10000
,
});
});
// wzjTODO 换皮
// wzjTODO 换皮
@
observer
@
observer
class
FillAddress
extends
React
.
Component
<
any
,
any
>
{
class
FillAddress
extends
React
.
Component
{
fillMd
=
false
fillMd
=
false
state
=
{
state
=
{
name
:
""
,
name
:
""
,
...
...
src/panels/longImgPop/longImgPop.
t
sx
→
src/panels/longImgPop/longImgPop.
j
sx
View file @
c70332dc
File moved
src/panels/selectmodal/selectmodal.
t
sx
→
src/panels/selectmodal/selectmodal.
j
sx
View file @
c70332dc
File moved
src/panels/taskpop/taskpop.
t
sx
→
src/panels/taskpop/taskpop.
j
sx
View file @
c70332dc
...
@@ -5,12 +5,11 @@ import { observer } from 'mobx-react';
...
@@ -5,12 +5,11 @@ import { observer } from 'mobx-react';
import
'./taskpop.less'
;
import
'./taskpop.less'
;
import
{
unwatchPageVisibility
,
watchPageVisibility
}
from
'@/core/page-visibility-notify.ts'
;
import
{
unwatchPageVisibility
,
watchPageVisibility
}
from
'@/core/page-visibility-notify.ts'
;
// import { handleLogClick, handleLogExposure } from '../../../MD';
// import { handleLogClick, handleLogExposure } from '../../../MD';
import
{
RES_PATH
}
from
'../../../sparkrc'
;
//
import { RES_PATH } from '../../../sparkrc';
import
{
_throttle
}
from
'../../utils/utils'
;
import
{
_throttle
}
from
'../../utils/utils
.ts
'
;
import
{
TASK_CODE
,
CHANNEL_PARAMS
}
from
'../../utils/constants.ts'
;
import
{
TASK_CODE
,
CHANNEL_PARAMS
}
from
'../../utils/constants.ts'
;
import
{
setCookies
}
from
'../../store/fetcher'
;
import
{
setCookies
}
from
'../../store/fetcher.ts'
;
import
taskStore
from
'../../store/task'
;
import
taskStore
from
'../../store/task.ts'
;
import
store
from
'../../store'
;
// import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog } from '../../utils/sensors';
// import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog } from '../../utils/sensors';
import
{
ModalCtrl
}
from
'@/core/ctrls/ModalCtrl'
;
import
{
ModalCtrl
}
from
'@/core/ctrls/ModalCtrl'
;
import
{
Button
}
from
'@grace/ui'
;
import
{
Button
}
from
'@grace/ui'
;
...
...
src/store/share.ts
0 → 100644
View file @
c70332dc
This diff is collapsed.
Click to expand it.
src/store/task.ts
View file @
c70332dc
...
@@ -3,14 +3,14 @@ import API from "../api/index";
...
@@ -3,14 +3,14 @@ import API from "../api/index";
import
store
from
"./store"
;
import
store
from
"./store"
;
// import modalStore from "./modal";
// import modalStore from "./modal";
import
{
saveCookies
,
setCookies
}
from
"./fetcher"
;
import
{
saveCookies
,
setCookies
}
from
"./fetcher"
;
//
import shareStore from "./share";
import
shareStore
from
"./share"
;
// import { handleLogClick } from "../../MD";
// import { handleLogClick } from "../../MD";
import
{
isWeChat
}
from
"../utils/share"
;
import
{
isWeChat
}
from
"../utils/share"
;
import
{
appJump
,
getUrlParam
,
windowJumpUrl
}
from
"../utils/utils"
;
import
{
appJump
,
getUrlParam
,
windowJumpUrl
}
from
"../utils/utils"
;
import
{
CHANNEL_PARAMS
,
TASK_CODE
}
from
"../utils/constants"
;
import
{
CHANNEL_PARAMS
,
TASK_CODE
}
from
"../utils/constants"
;
import
{
Toast
}
from
"@grace/ui"
;
import
{
Toast
}
from
"@grace/ui"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
LongImgPop
from
"@/panels/longImgPop/longImgPop"
;
import
LongImgPop
from
"@/panels/longImgPop/longImgPop
.jsx
"
;
const
taskStore
=
makeAutoObservable
({
const
taskStore
=
makeAutoObservable
({
/** 当前任务 */
/** 当前任务 */
...
@@ -47,7 +47,7 @@ const taskStore = makeAutoObservable({
...
@@ -47,7 +47,7 @@ const taskStore = makeAutoObservable({
//邀请
//邀请
case
code
==
TASK_CODE
.
INVITE
:
case
code
==
TASK_CODE
.
INVITE
:
console
.
info
(
"邀请任务"
);
console
.
info
(
"邀请任务"
);
//
const res = await shareStore.doInvite();
const
res
=
await
shareStore
.
doInvite
();
// modalStore.pushPop("Shareposter", { qrCode: res }, true);
// modalStore.pushPop("Shareposter", { qrCode: res }, true);
break
;
break
;
//增员介绍 海报or视频
//增员介绍 海报or视频
...
...
src/utils/share.ts
View file @
c70332dc
/** 判断微信环境 */
import
{
export
function
isWeChat
()
{
start
,
if
(
typeof
window
===
'undefined'
)
return
false
updateShare
,
const
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
()
callShare
,
return
ua
.
includes
(
'micromessenger'
)
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
.
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
// 链接
}
});
}
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