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
7fed68ac
Commit
7fed68ac
authored
May 23, 2025
by
cc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d78090e9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
87 deletions
+18
-87
index.html
index.html
+1
-0
MyPrize.tsx
src/pages/MyPrize/MyPrize.tsx
+5
-2
share.ts
src/store/share.ts
+0
-80
task.ts
src/store/task.ts
+11
-4
share.ts
src/utils/share.ts
+1
-1
No files found.
index.html
View file @
7fed68ac
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
</script>
</script>
<script
src=
"//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"
></script>
<script
src=
"https://res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<script
src=
"https://res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<script
src=
"https://m.picclife.cn/Life-H5/html/clause/PICCLifeJsBrage.js"
></script>
<script
src=
"//res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<script
src=
"//res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script>
<script>
<script>
var
CFG
=
CFG
||
{};
var
CFG
=
CFG
||
{};
...
...
src/pages/MyPrize/MyPrize.tsx
View file @
7fed68ac
...
@@ -11,11 +11,14 @@ import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
...
@@ -11,11 +11,14 @@ import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import
{
Axios
}
from
'axios'
;
import
{
Axios
}
from
'axios'
;
import
FillAddress
from
'@/panels/FillAddress/FillAddress.jsx'
;
import
FillAddress
from
'@/panels/FillAddress/FillAddress.jsx'
;
import
{
LOG_KEY
,
MatterShareOpt
,
MatterViewOpt
,
pageView
,
sensorLog
,
MatterViewDuration
}
from
'../../utils/sensors.js'
;
import
{
LOG_KEY
,
MatterShareOpt
,
MatterViewOpt
,
pageView
,
sensorLog
,
MatterViewDuration
}
from
'../../utils/sensors.js'
;
import
shareStore
from
'@/store/share.js'
;
const
apiAxios
=
new
Axios
({
const
apiAxios
=
new
Axios
({
timeout
:
10000
,
timeout
:
10000
,
});
});
@
observer
@
observer
class
MyPrize
extends
React
.
Component
<
any
,
any
>
{
class
MyPrize
extends
React
.
Component
<
any
,
any
>
{
projectId
:
string
|
null
;
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
...
@@ -56,7 +59,7 @@ class MyPrize extends React.Component<any, any> {
...
@@ -56,7 +59,7 @@ class MyPrize extends React.Component<any, any> {
prod
:
CFG
.
env
==
"prod"
prod
:
CFG
.
env
==
"prod"
};
};
}
}
const
res
=
await
API
.
prize
(
params
);
const
res
:
any
=
await
API
.
prize
(
params
);
if
(
res
?.
success
)
{
if
(
res
?.
success
)
{
let
tabList
=
[];
let
tabList
=
[];
let
PrizeList
=
[];
let
PrizeList
=
[];
...
@@ -197,7 +200,7 @@ class MyPrize extends React.Component<any, any> {
...
@@ -197,7 +200,7 @@ class MyPrize extends React.Component<any, any> {
this
.
projectId
=
val
?.
projectId
;
this
.
projectId
=
val
?.
projectId
;
}
else
{
}
else
{
// 全部
// 全部
await
this
.
getPrize
();
await
this
.
getPrize
(
''
);
this
.
projectId
=
null
;
this
.
projectId
=
null
;
}
}
this
.
setState
({
this
.
setState
({
...
...
src/store/share.ts
View file @
7fed68ac
...
@@ -254,85 +254,5 @@ const shareStore = makeAutoObservable({
...
@@ -254,85 +254,5 @@ const shareStore = makeAutoObservable({
"&isBindManager=1&isNeedAuth=1&operate_type=3"
"&isBindManager=1&isNeedAuth=1&operate_type=3"
);
);
},
},
/** 烟花分享 */
async doFireShare(fireType, fireLab, withGuide = true) {
const shareInfo = JSON.parse(store.frontVariable.fireShareInfo);
if (isWeChat()) {
// 微信环境分享
const _url = `
$
{
CFG
.
domain
}
$
{
CFG
.
indexLogin
}
$
{
encodeURIComponent
(
`
${
CFG
.
domain
}${
CFG
.
fireShareUrl
}${
`&ykCode=
${
CFG
.
workerCode
||
CFG
.
agentCode
||
""
}
`
}${
`&channel=
${
CFG
.
defaultChannel
}
`
}
&agentCode=
${
CFG
.
agentCode
}
&actPlatforms=
${
CFG
.
actPlatforms
}
&actId=
${
CFG
.
actId
}
&fireType=
${
fireType
}
&fireLab=
${
encodeURIComponent
(
encodeURIComponent
(
fireLab
))}
`
)}
`;
console.info("分享链接", _url);
if (isMiniprogram()) {
const query = JSON.stringify({
imgUrl: shareInfo?.imgUrl,
isYKShare: "1",
link: _url,
title: shareInfo?.title,
});
// 小程序
wx.miniProgram.navigateTo({
url: `
/
subpackages
/
h5
/
miniProgramWebShare
/
index
?
YKMiniprogramShare
=
$
{
encodeURIComponent
(
query
)}
`,
});
} else if (isEnterpriseWeChat()) {
//微通 (企业微信)
location.href = `
https
:
//m.picclife.cn/refactor-web/index.html?v=${Date.now()}#/duibaSharePage?link=${encodeURIComponent(
_url
)}
&
title
=
$
{
shareInfo
?.
title
}
&
desc
=
$
{
shareInfo
?.
content
}
&
imgUrl
=
$
{
shareInfo
?.
imgUrl
}
`;
} else {
if(withGuide){
showShareGuide();
}
//H5
onUpdateShare({
...shareInfo,
url: _url, // 带授权链接的活动链接
});
}
} else {
// app分享
// app参数
const _url = `
$
{
CFG
.
domain
}
$
{
CFG
.
indexLogin
}
$
{
encodeURIComponent
(
`
${
CFG
.
domain
}${
CFG
.
fireShareUrl
}${
`&ykCode=
${
CFG
.
workerCode
||
CFG
.
agentCode
||
""
}
`
}${
`&channel=
${
CFG
.
defaultChannel
}
`
}
&agentCode=
${
CFG
.
agentCode
}
&actPlatforms=
${
CFG
.
actPlatforms
}
&actId=
${
CFG
.
actId
}
&fireType=
${
fireType
}
&fireLab=
${
encodeURIComponent
(
fireLab
)}
`
)}
`;
console.info("分享链接", _url);
if (CFG.channel == "1") {
//管家
const params = {
title: shareInfo.title,
description: shareInfo.content || "",
shareUrl: _url,
thumbUrl: shareInfo.thumbnail,
shareType: "0", // 1分享网页 2分享图片 3分享视频4分享音乐 5分享文本
};
window.PICCLifeJsBrage.callNative({
module: "Share",
method: "options",
params: JSON.stringify(params),
callback: "",
});
}
if (CFG.channel == "6") {
//e通
const params = {
title: shareInfo.title,
description: shareInfo.content || "",
url: _url,
thumbImage: shareInfo.thumbnail,
};
window.inAppShare({
type: "shareLink",
activity: "richMan",
params: JSON.stringify(params),
});
}
}
},
});
});
export default shareStore;
export default shareStore;
src/store/task.ts
View file @
7fed68ac
...
@@ -12,10 +12,17 @@ import { Toast } from "@grace/ui";
...
@@ -12,10 +12,17 @@ import { Toast } from "@grace/ui";
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl"
;
import
LongImgPop
from
"@/panels/longImgPop/longImgPop.jsx"
;
import
LongImgPop
from
"@/panels/longImgPop/longImgPop.jsx"
;
interface
TaskItem
{
jumpUrl
?:
string
;
code
?:
string
;
id
?:
string
;
prizePendingCode
?:
string
;
}
const
taskStore
=
makeAutoObservable
({
const
taskStore
=
makeAutoObservable
({
/** 当前任务 */
/** 当前任务 */
curTask
:
{},
curTask
:
{}
as
TaskItem
,
setCurTask
(
data
)
{
setCurTask
(
data
:
TaskItem
)
{
this
.
curTask
=
data
;
this
.
curTask
=
data
;
},
},
...
@@ -28,7 +35,7 @@ const taskStore = makeAutoObservable({
...
@@ -28,7 +35,7 @@ const taskStore = makeAutoObservable({
code
:
getUrlParam
(
"ykCode"
)
||
getUrlParam
(
"code"
)
||
""
,
code
:
getUrlParam
(
"ykCode"
)
||
getUrlParam
(
"code"
)
||
""
,
from
:
CFG
.
channel
,
from
:
CFG
.
channel
,
});
});
if
((
success
,
data
))
{
if
((
success
&&
data
))
{
this
.
taskList
=
data
?.
item
||
[];
this
.
taskList
=
data
?.
item
||
[];
}
}
},
},
...
@@ -146,7 +153,7 @@ const taskStore = makeAutoObservable({
...
@@ -146,7 +153,7 @@ const taskStore = makeAutoObservable({
},
},
/** 完成任务 */
/** 完成任务 */
async
complete
(
item
,
time
)
{
async
complete
(
item
,
time
=
0
)
{
const
{
id
,
code
}
=
item
||
{};
const
{
id
,
code
}
=
item
||
{};
let
params
=
{
let
params
=
{
taskCode
:
code
,
taskCode
:
code
,
...
...
src/utils/share.ts
View file @
7fed68ac
...
@@ -24,7 +24,7 @@ import {
...
@@ -24,7 +24,7 @@ import {
/** 判断微信环境 */
/** 判断微信环境 */
export
function
isWeChat
()
{
export
function
isWeChat
()
{
const
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
()
const
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
()
return
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
return
ua
.
match
(
/MicroMessenger/i
)
!==
null
}
}
/**
/**
* 初始化分享
* 初始化分享
...
...
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