ThinkPHP中switch的使用
2022-11-24 11:10:29
215
{{single.collect_count}}

在把php+mysql语句简单的复制到ThinkPHP框架中后,出现了各种语法错误,特在此记录

ThinkPHP中switch的使用

{switch name="$list.status"}{case value="1"}待发货{/case}{case value="2"}已发货{/case}{case value="3"}已收货{/case}{case value="4"}完成{/case}{case value="5"}关闭{/case}{default /} 其他{/switch}

html 的 js 的 function 中 switch 的使用

switch(type){case 'init':alert("init");console.log(e.data);break;default :alert("error");break;}

我觉得主要还是原来的里面有用到单引号,好像好多语法错误都在单引号附近发生

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}