File tree Expand file tree Collapse file tree 4 files changed +28
-7
lines changed
miniprogram/packageChatTool/pages Expand file tree Collapse file tree 4 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,18 @@ import { getChatToolInfo } from '../../util'
3
3
4
4
// const defaultShareImage = 'https://p9.itc.cn/q_70/images03/20211124/d7dce66b866c4ccd805190a4925ff707.png'
5
5
6
+ function checkTitle ( str ) {
7
+ const regex = / ^ [ \u4e00 - \u9fa5 a - z A - Z 0 - 9 ] + $ /
8
+ let actualLength = 0
9
+ for ( let i = 0 ; i < str . length ; i ++ ) {
10
+ actualLength += / [ \u4e00 - \u9fa5 ] / . test ( str [ i ] ) ? 2 : 1
11
+ }
12
+ if ( actualLength === 0 || actualLength > 20 ) {
13
+ return false
14
+ }
15
+ return regex . test ( str )
16
+ }
17
+
6
18
Page ( {
7
19
8
20
data : {
@@ -181,10 +193,18 @@ Page({
181
193
useAssigner,
182
194
} = this . data
183
195
196
+ if ( ! checkTitle ( title ) ) {
197
+ wx . showToast ( {
198
+ title : '标题只能为中英文数字,长度小于20' ,
199
+ icon : 'none'
200
+ } )
201
+ return
202
+ }
203
+
184
204
if ( ! title || ! dateTextStart || ! dateTextEnd || ! shareImage ) {
185
205
wx . showToast ( {
186
206
icon : 'none' ,
187
- title : '表单未填写 ' ,
207
+ title : '表单未填写完 ' ,
188
208
} )
189
209
return
190
210
}
Original file line number Diff line number Diff line change 7
7
"t-cell-group" : " ../../components/tdesign-miniprogram/cell-group/cell-group" ,
8
8
"t-button" : " ../../components/tdesign-miniprogram/button/button" ,
9
9
"t-image" : " ../../components/tdesign-miniprogram/image/image" ,
10
- "t-icon" : " ../../components/tdesign-miniprogram/icon/icon" ,
11
- "api-category" : " ../../components/apiCategory/index"
10
+ "t-icon" : " ../../components/tdesign-miniprogram/icon/icon"
12
11
},
13
12
"navigationStyle" : " custom"
14
13
}
Original file line number Diff line number Diff line change @@ -80,7 +80,10 @@ Page({
80
80
81
81
onGoHome ( ) {
82
82
wx . reLaunch ( {
83
- url : '/packageAPI/pages/chattool/open-chattool/open-chattool' ,
83
+ url : '/packageAPI/pages/chattool/activity_assist/activity_assist' ,
84
+ complete ( res ) {
85
+ console . info ( "relaunch" , res )
86
+ }
84
87
} )
85
88
} ,
86
89
@@ -170,7 +173,7 @@ Page({
170
173
title : activityInfo . title ,
171
174
type : 'participate' ,
172
175
members : notSignIn ,
173
- entrancePath : `chatTool-2 /activity_detail/index?activityId=${ activityId } ` ,
176
+ entrancePath : `packageChatTool/pages /activity_detail/index?activityId=${ activityId } ` ,
174
177
complete ( res ) {
175
178
console . info ( 'notifyGroupMembers: ' , res )
176
179
}
Original file line number Diff line number Diff line change 11
11
"t-tabs" : " ../../components/tdesign-miniprogram/tabs/tabs" ,
12
12
"t-tab-panel" : " ../../components/tdesign-miniprogram/tab-panel/tab-panel" ,
13
13
"t-progress" : " ../../components/tdesign-miniprogram/progress/progress" ,
14
- "t-loading" : " ../../components/tdesign-miniprogram/loading/loading" ,
15
- "api-category" : " ../../components/apiCategory/index"
14
+ "t-loading" : " ../../components/tdesign-miniprogram/loading/loading"
16
15
},
17
16
"navigationStyle" : " custom"
18
17
}
You can’t perform that action at this time.
0 commit comments