|
|
@@ -71,14 +71,14 @@ Page({
|
|
71
|
71
|
that.setData({
|
|
72
|
72
|
inputName: e.detail.value,
|
|
73
|
73
|
});
|
|
74
|
|
- that.onCheck(e.detail.value,1);
|
|
|
74
|
+ that.onCheck(e.detail.value, 1);
|
|
75
|
75
|
},
|
|
76
|
76
|
bindKeyInputContent: function (e) {
|
|
77
|
77
|
var that = this;
|
|
78
|
78
|
that.setData({
|
|
79
|
79
|
inputContent: e.detail.value,
|
|
80
|
80
|
});
|
|
81
|
|
- that.onCheck(e.detail.value,2);
|
|
|
81
|
+ that.onCheck(e.detail.value, 2);
|
|
82
|
82
|
},
|
|
83
|
83
|
clickCheckbox: function () {
|
|
84
|
84
|
var that = this;
|
|
|
@@ -86,32 +86,34 @@ Page({
|
|
86
|
86
|
IsOpen: !that.data.IsOpen,
|
|
87
|
87
|
});
|
|
88
|
88
|
},
|
|
89
|
|
- onCheck: function (content,num) {
|
|
90
|
|
- if (num==1)
|
|
91
|
|
- isViolate1 = false;
|
|
92
|
|
- else if (num==2)
|
|
93
|
|
- isViolate2 = false;
|
|
94
|
|
- main.postData("MsgSecCheck2", {
|
|
95
|
|
- Content: content,
|
|
96
|
|
- UserID: app.globalData.userInfo.UserID,
|
|
97
|
|
- },
|
|
98
|
|
- function (data) {
|
|
99
|
|
- if (data && data.errcode == 0) {
|
|
100
|
|
-
|
|
101
|
|
- } else {
|
|
102
|
|
- if (data.errmsg) {
|
|
103
|
|
- wx.showToast({
|
|
104
|
|
- title: data.errmsg,
|
|
105
|
|
- duration: 2000,
|
|
106
|
|
- image: "../images/universalpic_wrong_white_120x120.png",
|
|
107
|
|
- });
|
|
108
|
|
- if (num==1)
|
|
109
|
|
- isViolate1 = true;
|
|
110
|
|
- else if (num==2)
|
|
111
|
|
- isViolate2 = true;
|
|
|
89
|
+ onCheck: function (content, num) {
|
|
|
90
|
+ if (content) {
|
|
|
91
|
+ if (num == 1)
|
|
|
92
|
+ isViolate1 = false;
|
|
|
93
|
+ else if (num == 2)
|
|
|
94
|
+ isViolate2 = false;
|
|
|
95
|
+ main.postData("MsgSecCheck2", {
|
|
|
96
|
+ Content: content,
|
|
|
97
|
+ UserID: app.globalData.userInfo.UserID,
|
|
|
98
|
+ },
|
|
|
99
|
+ function (data) {
|
|
|
100
|
+ if (data && data.errcode == 0) {
|
|
|
101
|
+
|
|
|
102
|
+ } else {
|
|
|
103
|
+ if (data.errmsg) {
|
|
|
104
|
+ wx.showToast({
|
|
|
105
|
+ title: data.errmsg,
|
|
|
106
|
+ duration: 2000,
|
|
|
107
|
+ image: "../images/universalpic_wrong_white_120x120.png",
|
|
|
108
|
+ });
|
|
|
109
|
+ if (num == 1)
|
|
|
110
|
+ isViolate1 = true;
|
|
|
111
|
+ else if (num == 2)
|
|
|
112
|
+ isViolate2 = true;
|
|
|
113
|
+ }
|
|
112
|
114
|
}
|
|
113
|
|
- }
|
|
114
|
|
- });
|
|
|
115
|
+ });
|
|
|
116
|
+ }
|
|
115
|
117
|
},
|
|
116
|
118
|
onSubmit: function () {
|
|
117
|
119
|
var that = this;
|
|
|
@@ -122,16 +124,14 @@ Page({
|
|
122
|
124
|
showCancel: false,
|
|
123
|
125
|
confirmText: '返回',
|
|
124
|
126
|
});
|
|
125
|
|
- }
|
|
126
|
|
- else if (isViolate2) {
|
|
|
127
|
+ } else if (isViolate2) {
|
|
127
|
128
|
wx.showModal({
|
|
128
|
129
|
title: '生成失败',
|
|
129
|
130
|
content: '抱歉,您填写的祝福语未能通过微信敏感词检查故无法生成福帖。敏感词由微信官方功能判定,建议您调整内容多尝试几次。',
|
|
130
|
131
|
showCancel: false,
|
|
131
|
132
|
confirmText: '返回',
|
|
132
|
133
|
});
|
|
133
|
|
- }
|
|
134
|
|
- else {
|
|
|
134
|
+ } else {
|
|
135
|
135
|
|
|
136
|
136
|
if (app.globalData.userInfo.NickName == "陌生用户") {
|
|
137
|
137
|
wx.navigateTo({
|