分享好友 站长动态首页 网站导航

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

2022-03-31 09:41 · 头闻号编程技术

目录

,系统展示

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

,小程序端代码

在这里插<!--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>

,后端代码

@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";	}		@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成功"));	}			@RequiresPermissions("article:article:edit")	@RequestMapping(value = "delete")	@ResponseBody	public String delete(Article article) {		articleService.delete(article);		return renderResult(Global.TRUE, text("删除i_article成功"));	}	}
@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 = "form")	public String form(Match match, Model model) {		List<GameType> gameTypeList = gameTypeService.findList(new GameType());		List<Team> teamList = teamService.findList(new Team());		model.addAttribute("match", match);		model.addAttribute("gameTypeList", gameTypeList);		model.addAttribute("teamList", teamList);		return "modules/match/matchForm";	}		@RequiresPermissions("match:match:edit")	@PostMapping(value = "save")	@ResponseBody	public String save(@Validated Match match) {		matchService.save(match);		return renderResult(Global.TRUE, text("保存赛事管理成功"));	}			@RequiresPermissions("match:match:edit")	@RequestMapping(value = "delete")	@ResponseBody	public String delete(Match match) {		matchService.delete(match);		return renderResult(Global.TRUE, text("删除赛事管理成功"));	}	

,数据库

SET NAMES utf8mb4;SET FOREIGN_KEY_CHECKS = 0;-- ------------------------------ Table structure for i_article-- ----------------------------DROP TABLE IF EXISTS `i_article`;CREATE TABLE `i_article`  (  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,  `article_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `article_date` datetime(0) NULL DEFAULT NULL,  `img_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,  `videoUrl` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,  `article_content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `match_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of i_article-- ------------------------------ Table structure for i_comment-- ----------------------------DROP TABLE IF EXISTS `i_comment`;CREATE TABLE `i_comment`  (  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,  `open_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `comment_str` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `com_time` datetime(0) NULL DEFAULT NULL,  `article_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of i_comment-- ----------------------------INSERT INTO `i_comment` VALUES ('1229650608296800256', 'oR9X80PNiduNcTgo7_AiwaGUO9G4', '123', '2020-02-18 14:15:25', '1227912896076685312');-- ------------------------------ Table structure for i_game_type-- ----------------------------DROP TABLE IF EXISTS `i_game_type`;CREATE TABLE `i_game_type`  (  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;-- ------------------------------ ------------------------------ Table structure for i_match-- ----------------------------DROP TABLE IF EXISTS `i_match`;CREATE TABLE `i_match`  (  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,  `home_field` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '主场',  `guest_field` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客场',  `home_score` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '比分',  `guest_score` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `start_time` datetime(0) NULL DEFAULT NULL,  `game_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属赛事',  `game_type_a` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '赛事小分类',  `is_start` int(0) NULL DEFAULT NULL,  `highlight_name1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `highlight_name2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `highlight_name3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `highlight_name4` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `highlight_u1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,  `highlight_u2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,  `highlight_u3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,  `highlight_u4` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,  PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of i_match-- ------------------------------ Table structure for i_player-- ----------------------------DROP TABLE IF EXISTS `i_player`;CREATE TABLE `i_player`  (  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,  `player_thumb` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `player_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `team` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `score` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `assist` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `backboard` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `steal` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `block` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of i_player-- ----------------------------INSERT INTO `i_player` VALUES ('1228343814021251072', 'https://nba.sports.qq.com/media/img/players/head/260x190/203507.png', '托尼斯-阿德托昆博', '1228247876190314496', '30.0', '5.5', '13.5', '1.1', '1.1');INSERT INTO `i_player` VALUES ('1228344572263333888', 'https://nba.sports.qq.com/media/img/players/head/260x190/202695.png', '莱昂纳德', '1227162154749386772', '27.2', '5.3', '7.4', '1.8', '0.7');-- ------------------------------ Table structure for i_team-- ----------------------------DROP TABLE IF EXISTS `i_team`;CREATE TABLE `i_team`  (  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `icon` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  `win_num` int(0) NULL DEFAULT NULL,  `lost_num` int(0) NULL DEFAULT NULL,  `location` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,  PRIMARY KEY (`id`) USING BTREE) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;-- ----------------------------

,手把手教你学习

前面分享了很多的项目、教程、面试题。

大家可以跟着学习。都是免费的。

给个三连(点赞+关注)和关注,一起变强,你点赞关注我,就算支持了小孟,当然我也会回报更多的给你。人和人之间都是相互的,嘿嘿……

项目给大家提供了。所有资料获取,点击下面的,关注弹出来的图片

点击👇🏻👇🏻👇🏻 然后回复:项目大全

免责声明:本平台仅供信息发布交流之途,请谨慎判断信息真伪。如遇虚假诈骗信息,请立即举报

举报
反对 0
打赏 0
更多相关文章

评论

0

收藏

点赞