File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
packages/zhiyicx-plus-pc/resources/assets/web/js Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -964,16 +964,21 @@ var comment = {
964
964
break ;
965
965
}
966
966
_this . lockStatus = 1 ;
967
- axios . delete ( url )
968
- . then ( function ( response ) {
969
- $ ( '#comment' + id ) . fadeOut ( ) ;
970
- $ ( '.cs' + source_id ) . text ( parseInt ( $ ( '.cs' + source_id ) . text ( ) ) - 1 ) ;
971
- _this . lockStatus = 0 ;
972
- } )
973
- . catch ( function ( error ) {
974
- showError ( error . response . data ) ;
975
- _this . lockStatus = 0 ;
976
- } ) ;
967
+ layer . confirm ( confirmTxt + '确定删除这条评论?' , { } , function ( ) {
968
+ axios . delete ( url )
969
+ . then ( function ( response ) {
970
+ $ ( '#comment' + id ) . fadeOut ( ) ;
971
+ $ ( '.cs' + source_id ) . text ( parseInt ( $ ( '.cs' + source_id ) . text ( ) ) - 1 ) ;
972
+ _this . lockStatus = 0 ;
973
+ layer . closeAll ( ) ;
974
+ noticebox ( '删除成功' )
975
+ } )
976
+ . catch ( function ( error ) {
977
+ showError ( error . response . data ) ;
978
+ _this . lockStatus = 0 ;
979
+ } ) ;
980
+ } ) ;
981
+
977
982
} ,
978
983
pinneds : function ( type , source_id , id ) {
979
984
var url = '' ;
You can’t perform that action at this time.
0 commit comments