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'
33
44// const defaultShareImage = 'https://p9.itc.cn/q_70/images03/20211124/d7dce66b866c4ccd805190a4925ff707.png'
55
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+
618Page ( {
719
820 data : {
@@ -181,10 +193,18 @@ Page({
181193 useAssigner,
182194 } = this . data
183195
196+ if ( ! checkTitle ( title ) ) {
197+ wx . showToast ( {
198+ title : '标题只能为中英文数字,长度小于20' ,
199+ icon : 'none'
200+ } )
201+ return
202+ }
203+
184204 if ( ! title || ! dateTextStart || ! dateTextEnd || ! shareImage ) {
185205 wx . showToast ( {
186206 icon : 'none' ,
187- title : '表单未填写 ' ,
207+ title : '表单未填写完 ' ,
188208 } )
189209 return
190210 }
Original file line number Diff line number Diff line change 77 "t-cell-group" : " ../../components/tdesign-miniprogram/cell-group/cell-group" ,
88 "t-button" : " ../../components/tdesign-miniprogram/button/button" ,
99 "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"
1211 },
1312 "navigationStyle" : " custom"
1413}
Original file line number Diff line number Diff line change @@ -80,7 +80,10 @@ Page({
8080
8181 onGoHome ( ) {
8282 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+ }
8487 } )
8588 } ,
8689
@@ -170,7 +173,7 @@ Page({
170173 title : activityInfo . title ,
171174 type : 'participate' ,
172175 members : notSignIn ,
173- entrancePath : `chatTool-2 /activity_detail/index?activityId=${ activityId } ` ,
176+ entrancePath : `packageChatTool/pages /activity_detail/index?activityId=${ activityId } ` ,
174177 complete ( res ) {
175178 console . info ( 'notifyGroupMembers: ' , res )
176179 }
Original file line number Diff line number Diff line change 1111 "t-tabs" : " ../../components/tdesign-miniprogram/tabs/tabs" ,
1212 "t-tab-panel" : " ../../components/tdesign-miniprogram/tab-panel/tab-panel" ,
1313 "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"
1615 },
1716 "navigationStyle" : " custom"
1817}
You can’t perform that action at this time.
0 commit comments