Commit d3720c72 authored by wildfirecode13's avatar wildfirecode13

1

parent 624fa527
......@@ -4,6 +4,7 @@
"pages/pageshop/pageshop",
"pages/index/index",
"pages/pageshop/pageshop",
"pages/tbccDemo/tbccDemo",
"pages/myprize/myprize"
],
"window": {
......
......@@ -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({
......
......@@ -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') {
......
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