喜欢看球,那就手撸一个看球小程序系统

Posted 程序员springmeng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了喜欢看球,那就手撸一个看球小程序系统相关的知识,希望对你有一定的参考价值。

大家好,我是小孟!

我是一个大龄程序员,90后。今年35了。

每当看到招聘不招35岁以上的程序员,就慌的一b。

码代码占据了我大部分的时间,除了代码养家,

篮球给我带来了很多的快乐,比女友还快乐!

“穿上球衣,穿上球鞋,叫上兄弟们!

一起出来打球,打完篮球,坐在夕阳下,喝着一块一瓶的水,聊着自己喜欢的女孩”

练球虽累,但他不苦。姑娘虽美,但我不配。故事很长,也不难讲。打完这场球,再谈理想。

篮球虐我千百遍,我待篮球如初恋!

作为一名码农,这几天因疫情在家隔离,闲的没事,手撸了一个篮球小程序系统。

目录

一,系统展示







二,小程序端代码

在这里插<!--pages/articleDetail/articleDetail.wxml-->
欢迎围观小孟朋友圈,我的V:jishulearn
<view class="container">
    <view class="articleBox" >
        <view class="article_header">
            <text class="article_title">article.articleTitle</text>
            <text class="article_date">article.articleDate</text>
        </view>
        <view class="article_pic">
            <!-- <video src="article.videoUrl" 
            poster="article.imgUrl" 
            objectFit="cover" 
            controls="true"/> -->
            <image src="sUrl+article.imgUrl"/>
        </view>
        <view class="article_content">
            <p>article.articleContent</p>
        </view>
    </view>
    <view class="comments">
            <view class="com_hd">
                <view>评论</view>
                <view class="commententy"  bindtap="showModal" data-target="bottomModal"><image class="toComment" src="../../images/pinglun.png"/>article.commentList.length</view>
                
            </view>
            <view class="comBox" wx:for="article.commentList" wx:for-item="comment">
                <view class="comBox_hd">
                    <view class="userInfo">
                        <image class="userThumb" src="comment.userThumb"/>
                        <text class="userName">comment.userName</text>
                    </view>
                    <text class="comTime">comment.comTime</text>
                </view>
                <view class="comBox_bd">
                    <p>comment.commentStr</p>
                </view>
            </view>
        </view>


        <view class="cu-modal bottom-modal modalName=='bottomModal'?'show':''">
            <view class="cu-dialog">
                <view class="flexcc">
                    <image class="userThumba" src="userInfo.avatarUrl"/>
                    <view>
                    <input bindfocus="InputFocus" value="commentInputValue" bindinput="commentInput" bindblur="InputBlur" adjust-position="true" focus="ifocus" maxlength="150" cursor-spacing="10"></input>
                    </view>
                    <button class="bt" bindtap="submitc">发送</button>
                </view>
            </view>
        </view>
</view>
入代码片
<!--pages/order/order.wxml-->
<view class="container">
    <view wx:if="hasOrder" class="gameOrder">
        <view class="gameOrder" wx:for="orderList" wx:key="orderList.id">
            <text class="gameDate">item.gameDate</text>
            <view class="weui-cells">
                <navigator url="/pages/order/order" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
                    <view class="weui-cell__hd">
                        <text>item.gameTime</text>
                        <text>item.gameName</text>
                    </view>
                    <view class="weui-cell__bd">
                        <view class="team_1">
                            <image src="item.team_1_pic"></image><span>item.team_1</span>
                        </view>
                        <view class="team_2">
                            <image src="item.team_2_pic"></image><span>item.team_2</span>
                        </view>
                    </view>
                    <view class="weui-cell__ft">
                        <view class="ft_left">
                            <view wx:if="item.isStart">
                                <text class="gameScore scoreM">item.team_1_score</text>
                                <text class="gameScore">item.team_2_score</text>
                            </view>
                            <view wx:else>
                                <text class="gameScore scoreM">-</text>
                                <text class="gameScore">-</text>
                            </view>
                        </view>
                        <view class="ft_right">
                            <view wx:if="item.gameLive" class="gameLive">
                                <view wx:if="v_live">
                                    <image class="livePic" src="vLive_pic"/>
                                    <span>vLive_text</span>
                                </view>
                                <view wx:else>
                                    <image class="livePic" src="pLive_pic"/>
                                    <span>pLive_text</span>
                                </view>
                            </view>
                            <view wx:else class="gameLive">
                                <span>未开始</span>
                            </view>
                        </view>
                        
                    </view>
                </navigator>
            </view>
        </view>
    </view>
    <view wx:else class="noOrders">
        <text>没有预约比赛</text>
    </view>
</view>

三,后端代码

/**
 * articleController
 * @author 小孟V:jishulearn
 * @version 2022-02-13
 */
@Controller
@RequestMapping(value = "$adminPath/article/article")
public class ArticleController extends BaseController 

	@Autowired
	private ArticleService articleService;
	
	/**
	 * 获取数据
	 */
	@ModelAttribute
	public Article get(String id, boolean isNewRecord) 
		return articleService.get(id, isNewRecord);
	
	
	/**
	 * 查询列表
	 */
	@RequiresPermissions("article:article:view")
	@RequestMapping(value = "list", "")
	public String list(Article article, Model model) 
		model.addAttribute("article", article);
		return "modules/article/articleList";
	
	
	/**
	 * 查询列表数据
	 */
	@RequiresPermissions("article:article:view")
	@RequestMapping(value = "listData")
	@ResponseBody
	public Page<Article> listData(Article article, HttpServletRequest request, HttpServletResponse response) 
		article.setPage(new Page<>(request, response));
		Page<Article> page = articleService.findPage(article);
		List<Article> articleList = new ArrayList<>();
		for (Article article1 : page.getList()) 
			List<FileUpload> fileUploadList = FileUploadUtils.findFileUpload(article1.getId(),"article_image");
			if (fileUploadList.size() > 0)
				article1.setImgUrl(FileUploadUtils.findFileUpload(article1.getId(),"article_image").get(0).getFileUrl());
			
			articleList.add(article1);
		
		page.setList(articleList);
		return page;
	

	/**
	 * 查看编辑表单
	 */
	@RequiresPermissions("article:article:view")
	@RequestMapping(value = "form")
	public String form(Article article, Model model) 
		model.addAttribute("article", article);
		return "modules/article/articleForm";
	

	/**
	 * 保存i_article
	 */
	@RequiresPermissions("article:article:edit")
	@PostMapping(value = "save")
	@ResponseBody
	public String save(@Validated Article article) 
		if(StringUtils.isEmpty(article.getId())) 
			article.setArticleDate(new Date());
		
		articleService.save(article);
		return renderResult(Global.TRUE, text("保存i_article成功!"));
	
	
	/**
	 * 删除i_article
	 */
	@RequiresPermissions("article:article:edit")
	@RequestMapping(value = "delete")
	@ResponseBody
	public String delete(Article article) 
		articleService.delete(article);
		return renderResult(Global.TRUE, text("删除i_article成功!"));
	
	

/**
 * 赛事管理Controller
 * @author 小孟V:jishulearn
 * @version 2022-02-11
 */
@Controller
@RequestMapping(value = "$adminPath/match/match")
public class MatchController extends BaseController 

	@Autowired
	private MatchService matchService;

	@Autowired
	private GameTypeService gameTypeService;

	@Autowired
	private TeamService teamService;
	
	/**
	 * 获取数据
	 */
	@ModelAttribute
	public Match get(String id, boolean isNewRecord) 
		return matchService.get(id, isNewRecord);
	
	
	/**
	 * 查询列表
	 */
	@RequiresPermissions("match:match:view")
	@RequestMapping(value = "list", "")
	public String list(Match match, Model model) 
		model.addAttribute("match", match);
		return "modules/match/matchList";
	
	
	/**
	 * 查询列表数据
	 */
	@RequiresPermissions("match:match:view")
	@RequestMapping(value = "listData")
	@ResponseBody
	public Page<Match> listData(Match match, HttpServletRequest request, HttpServletResponse response) 
		match.setPage(new Page<>(request, response));
		Page<Match> page = matchService.findPage(match);
		List<GameType> gameTypeList = gameTypeService.findList(new GameType());
		List<Team> teamList = teamService.findList(new Team());
		List<Match> matcheList = new ArrayList<>();
		for (Match match1 : page.getList()) 
			for (GameType gameType : gameTypeList) 
				if (gameType.getId().equals(match1.getGameType())) 
					match1.setGameType(gameType.getName());
				
			
			matcheList.add(match1);
		
		List<Match> matcheList1 = new ArrayList<>();
		for (Match match1 : matcheList) 
			for (Team team : teamList) 
				if (team.getId().equals(match1.getHomeField())) 
					 match1.setHomeField(team.getName());
				
				if (team.getId().equals(match1.getGuestField())) 
					match1.setGuestField(team.getName());
				
			
			matcheList1.add(match1);
		
		page.setList(matcheList1);
		return page;
	

	/**
	 * 查看编辑表单
	 */
	@RequiresPermissions("match:match:view")
	@RequestMapping(value = 以上是关于喜欢看球,那就手撸一个看球小程序系统的主要内容,如果未能解决你的问题,请参考以下文章

技术分享| 复盘一起看球场景

[洛谷P2113] 看球泡妹子

与用户共创“一键看球”上线 高合HiPhi X邀您车里看球

看球的巴士 ballbus

看球的巴士dp

看球的巴士