Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
d3720c72
Commit
d3720c72
authored
Sep 28, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
624fa527
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
app.json
taobao_mini/client/app.json
+1
-0
comcatname.js
taobao_mini/client/components/comcatname/comcatname.js
+17
-1
tb.js
taobao_mini/client/tbcc-sdk/lib/tb.js
+1
-0
No files found.
taobao_mini/client/app.json
View file @
d3720c72
...
...
@@ -4,6 +4,7 @@
"pages/pageshop/pageshop"
,
"pages/index/index"
,
"pages/pageshop/pageshop"
,
"pages/tbccDemo/tbccDemo"
,
"pages/myprize/myprize"
],
"window"
:
{
...
...
taobao_mini/client/components/comcatname/comcatname.js
View file @
d3720c72
...
...
@@ -2,6 +2,13 @@
import
API
from
'../../api'
;
import
resList
from
'../../resconfig/resList'
;
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
textRiskIdentification
}
=
tbcc
.
tb
;
Component
({
props
:
{
catImgArr
:
[
"90b114e6-83cb-46f1-b607-f88c50077b05"
,
"4e471df6-01ab-421d-ba0b-084b2110dc6d"
,
"003e9904-aee4-4b8d-8d5d-fb4b1188bec1"
,
"90283bd3-4b18-4535-97a8-90318f068781"
],
...
...
@@ -65,8 +72,17 @@ Component({
content
:
"名字过长哦"
,
});
}
else
{
my
.
showLoading
();
/**检查敏感词 */
console
.
log
(
'检查敏感词'
,
name
)
const
success
=
await
textRiskIdentification
(
name
).
catch
(
err
=>
{
console
.
log
(
'textRiskIdentification error'
,
err
);
});
console
.
log
(
'敏感词校验结果'
,
success
)
if
(
success
!==
true
)
{
console
.
log
(
'敏感词校验失败.'
)
}
my
.
showLoading
();
/**调用领养接口 */
const
adoptCat
=
await
API
.
adoptCat
({
...
...
taobao_mini/client/tbcc-sdk/lib/tb.js
View file @
d3720c72
...
...
@@ -507,6 +507,7 @@ export const textRiskIdentification = async (text) => {
text
},
success
:
res
=>
{
console
.
log
(
'textRiskIdentification callback res'
,
res
)
if
(
res
.
data
&&
res
.
data
.
result
)
{
const
{
suggestion
}
=
res
.
data
.
result
;
if
(
suggestion
===
'pass'
)
{
...
...
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