Commit 11266a70 authored by Edwise's avatar Edwise 🍷

Merge remote-tracking branch 'refs/remotes/origin/tianmaoxiaoyuan' into tianmaoxiaoyuan

parents 456b278f d3720c72
......@@ -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"],
......@@ -67,8 +74,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({
......
......@@ -140,8 +140,8 @@ Page({
}
flag = true;
const { item:{strategyCode,code} } = e.target.dataset;
this.cloudTBIssue({strategyCode,code})
const { item:{strategyCode,code,channel} } = e.target.dataset;
this.cloudTBIssue({strategyCode,code,channel})
// const { activityId } = app;
// console.log(item, '领取权益')
// const { success, data, message } = await API.receiveEnamePrize({ activityId, _id: item._id }).catch(res => {
......
......@@ -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