You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xzs-mysql/docs/guide/develop.html

92 lines
27 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="VuePress 2.0.0-beta.25">
<link rel="icon" href="https://www.mindskip.net/style/images/favicon.png"><title>5. 项目开发 | 学之思教程</title><meta name="description" content="学之思开发部署教程">
<link rel="preload" href="/xzs-mysql/assets/js/runtime~app.f14c4573.js" as="script"><link rel="preload" href="/xzs-mysql/assets/css/styles.da5c9ac6.css" as="style"><link rel="preload" href="/xzs-mysql/assets/js/812.fc3c1ea3.js" as="script"><link rel="preload" href="/xzs-mysql/assets/js/app.2f385571.js" as="script">
<link rel="stylesheet" href="/xzs-mysql/assets/css/styles.da5c9ac6.css">
</head>
<body>
<div id="app"><!--[--><div class="theme-container"><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/xzs-mysql/" class=""><img class="logo" src="/xzs-mysql/images/logo/logo.png" alt="学之思教程"><span class="site-name can-hide">学之思教程</span></a></span><div class="navbar-links-wrapper" style=""><!--[--><!--]--><nav class="navbar-links can-hide"><!--[--><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net" rel="noopener noreferrer" target="_blank" aria-label="官网"><!--[--><!--]--> 官网 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net/sdd.html" rel="noopener noreferrer" target="_blank" aria-label="思多多"><!--[--><!--]--> 思多多 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net/wdd.html" rel="noopener noreferrer" target="_blank" aria-label="维多多"><!--[--><!--]--> 维多多 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net/xzs.html" rel="noopener noreferrer" target="_blank" aria-label="学之思"><!--[--><!--]--> 学之思 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net/buy.html" rel="noopener noreferrer" target="_blank" aria-label="商业购买"><!--[--><!--]--> 商业购买 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-dark-button" title="toggle dark mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><div class="sidebar-mask"></div><aside class="sidebar"><nav class="navbar-links"><!--[--><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net" rel="noopener noreferrer" target="_blank" aria-label="官网"><!--[--><!--]--> 官网 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net/sdd.html" rel="noopener noreferrer" target="_blank" aria-label="思多多"><!--[--><!--]--> 思多多 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net/wdd.html" rel="noopener noreferrer" target="_blank" aria-label="维多多"><!--[--><!--]--> 维多多 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net/xzs.html" rel="noopener noreferrer" target="_blank" aria-label="学之思"><!--[--><!--]--> 学之思 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><div class="navbar-links-item"><a class="nav-link external" href="https://www.mindskip.net/buy.html" rel="noopener noreferrer" target="_blank" aria-label="商业购买"><!--[--><!--]--> 商业购买 <span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-links"><!--[--><!--[--><a href="/xzs-mysql/guide/feature.html" class="nav-link sidebar-heading sidebar-item" aria-label="1. 功能列表"><!--[--><!--]--> 1. 功能列表 <!--[--><!--]--></a><!----><!--]--><!--[--><a href="/xzs-mysql/guide/skill.html" class="nav-link sidebar-heading sidebar-item" aria-label="2. 技术栈"><!--[--><!--]--> 2. 技术栈 <!--[--><!--]--></a><!----><!--]--><!--[--><a href="/xzs-mysql/guide/database.html" class="nav-link sidebar-heading sidebar-item" aria-label="3. 数据库设计"><!--[--><!--]--> 3. 数据库设计 <!--[--><!--]--></a><!----><!--]--><!--[--><p class="sidebar-heading sidebar-item">4. 接口文档</p><ul class=""><li><!--[--><a href="/xzs-mysql/guide/student.html" class="nav-link sidebar-item" aria-label="4.1 学生端"><!--[--><!--]--> 4.1 学生端 <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/xzs-mysql/guide/wx.html" class="nav-link sidebar-item" aria-label="4.2 小程序"><!--[--><!--]--> 4.2 小程序 <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a href="/xzs-mysql/guide/admin.html" class="nav-link sidebar-item" aria-label="4.3 管理端"><!--[--><!--]--> 4.3 管理端 <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--[--><a aria-current="page" href="/xzs-mysql/guide/develop.html" class="router-link-active router-link-exact-active nav-link router-link-active sidebar-heading sidebar-item active" aria-label="5. 项目开发"><!--[--><!--]--> 5. 项目开发 <!--[--><!--]--></a><ul class=""><li><!--[--><a aria-current="page" href="/xzs-mysql/guide/develop.html#_5-1-开发环境" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="5.1 开发环境"><!--[--><!--]--> 5.1 开发环境 <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/xzs-mysql/guide/develop.html#_5-2-开发说明" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="5.2 开发说明"><!--[--><!--]--> 5.2 开发说明 <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/xzs-mysql/guide/develop.html#_5-3-后端开发" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="5.3 后端开发"><!--[--><!--]--> 5.3 后端开发 <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/xzs-mysql/guide/develop.html#_5-4-前端开发" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="5.4 前端开发"><!--[--><!--]--> 5.4 前端开发 <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/xzs-mysql/guide/develop.html#_5-5-小程序开发" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="5.5 小程序开发"><!--[--><!--]--> 5.5 小程序开发 <!--[--><!--]--></a><!----><!--]--></li><li><!--[--><a aria-current="page" href="/xzs-mysql/guide/develop.html#_5-6-代码结构简介" class="router-link-active router-link-exact-active nav-link sidebar-item" aria-label="5.6 代码结构简介"><!--[--><!--]--> 5.6 代码结构简介 <!--[--><!--]--></a><!----><!--]--></li></ul><!--]--><!--[--><a href="/xzs-mysql/guide/deploy.html" class="nav-link sidebar-heading sidebar-item" aria-label="6. 项目部署"><!--[--><!--]--> 6. 项目部署 <!--[--><!--]--></a><!----><!--]--><!--[--><a href="/xzs-mysql/guide/video.html" class="nav-link sidebar-heading sidebar-item" aria-label="7. 视频教程"><!--[--><!--]--> 7. 视频教程 <!--[--><!--]--></a><!----><!--]--><!--]--></ul><!--[--><!--]--></aside><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><h1 id="_5-项目开发" tabindex="-1"><a class="header-anchor" href="#_5-项目开发" aria-hidden="true">#</a> 5. 项目开发</h1><h3 id="_5-1-开发环境" tabindex="-1"><a class="header-anchor" href="#_5-1-开发环境" aria-hidden="true">#</a> 5.1 开发环境</h3><table><thead><tr><th>环境</th><th>版本</th><th>下载地址</th></tr></thead><tbody><tr><td>NodeJs</td><td>16</td><td><a href="https://nodejs.org/download/release/latest-v16.x/" target="_blank" rel="noopener noreferrer">https://nodejs.org/download/release/latest-v16.x/<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a></td></tr><tr><td>Jdk</td><td>1.8</td><td><a href="https://www.oracle.com/java/technologies/downloads/#java8-windows" target="_blank" rel="noopener noreferrer">https://www.oracle.com/java/technologies/downloads/#java8-windows<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a></td></tr><tr><td>Mysql</td><td>8.0</td><td><a href="https://dev.mysql.com/downloads/windows/installer/8.0.html" target="_blank" rel="noopener noreferrer">https://dev.mysql.com/downloads/windows/installer/8.0.html<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a></td></tr></tbody></table><h3 id="_5-2-开发说明" tabindex="-1"><a class="header-anchor" href="#_5-2-开发说明" aria-hidden="true">#</a> 5.2 开发说明</h3><ul><li>进群获取到数据库脚本创建表初始化数据数据库名称为xzs</li><li>代码下载 mysql版本配合相应的数据库使用</li><li>安装mysql 导入xzs-mysql.sql脚本</li><li>学生端默认账号student / 123456</li><li>管理端默认账号admin / 123456</li></ul><h3 id="_5-3-后端开发" tabindex="-1"><a class="header-anchor" href="#_5-3-后端开发" aria-hidden="true">#</a> 5.3 后端开发</h3><ul><li>/uexam/source/xzs为后台代码建议使用IntelliJ IDEA打开</li><li>打开application-dev.yml文件中配置好mysql的服务地址</li><li>去七牛云官网申请好对象存储账号修改application.yml中的qn相关的配置七牛云主要用于文件存储</li><li>启动后台程序,默认端口为8000</li><li>学生系统地址:<a href="http://ip:8000/student" target="_blank" rel="noopener noreferrer">http://ip:8000/student<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a></li><li>管理端地址:<a href="http://ip:8000/admin" target="_blank" rel="noopener noreferrer">http://ip:8000/admin<span><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" ariahidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><!--[--><span class="sr-only">open in new window</span><!--]--></span></a></li></ul><h3 id="_5-4-前端开发" tabindex="-1"><a class="header-anchor" href="#_5-4-前端开发" aria-hidden="true">#</a> 5.4 前端开发</h3><ul><li>前端使用webstorm或者vscode分别打开文件夹打开源代码\source\vue\xzs-student和source\vue\xzs-admin</li><li>执行下面2个命令安装node_module</li></ul><div class="language-npm ext-npm line-numbers-mode"><pre class="language-npm"><code>npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
npm install --registry https://registry.npm.taobao.org
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><ul><li>执行下面命令,启动前端代码</li></ul><div class="language-npm ext-npm line-numbers-mode"><pre class="language-npm"><code>npm run serve
</code></pre><div class="line-numbers"><span class="line-number">1</span><br></div></div><ul><li>打包命名</li></ul><div class="language-npm ext-npm line-numbers-mode"><pre class="language-npm"><code>npm run build
</code></pre><div class="line-numbers"><span class="line-number">1</span><br></div></div><h3 id="_5-5-小程序开发" tabindex="-1"><a class="header-anchor" href="#_5-5-小程序开发" aria-hidden="true">#</a> 5.5 小程序开发</h3><ul><li>去腾讯小程序官网注册账号拿到appid和secret信息</li><li>下载好微信小程序开发工具</li><li>打开工具,导入代码 \source\wx\xzs-student</li><li>修改application.yml文件里的wx配置下面的appid和secret</li><li>启动微信小程序开发工具</li></ul><h3 id="_5-6-代码结构简介" tabindex="-1"><a class="header-anchor" href="#_5-6-代码结构简介" aria-hidden="true">#</a> 5.6 代码结构简介</h3><h4 id="_5-6-1-后端系统" tabindex="-1"><a class="header-anchor" href="#_5-6-1-后端系统" aria-hidden="true">#</a> 5.6.1 后端系统</h4><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>- source 代码文件夹
- xzs 后端代码
- src
- main
- java
- xzs
- base 项目基础类
- configuration springboot的基础配置
- context 项目上下文
- controller
- admin 管理端控制器
- student 学生端控制器
- wechat 小程序控制器
- domain 领域对象
- event 事件驱动模型,配合监听器一起使用
- exception 业务异常
- listener 监听器配合event使用
- repository 数据仓储mybaties的映射Mapper
- service 服务
- impl 服务实现
- utility 工具类
- viewmodel 视图、接口类
- admin 管理端视图类
- student 学生端视图类
- wx 微信端视图类
- resources
- mapper 数据仓库的sql文件
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br></div></div><h4 id="_5-6-2-学生端" tabindex="-1"><a class="header-anchor" href="#_5-6-2-学生端" aria-hidden="true">#</a> 5.6.2 学生端</h4><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>- source 代码文件夹
- vue 后端代码
- xzs-student 学生端代码
- public 公共文件、主页
- src 前端代码
- api 接口地址
- assets 图片资源
- components 公共组件
- BackToTop 返回顶部组件
- Pagination 分页组件
- SvgIcon 图标组件
- Ueditor 编辑器组件
- icons 图标库
- layout 母版页
- store 状态管理
- styles 主题样式
- utils 公共方法
- views 视图、系统页面
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br></div></div><h4 id="_5-6-3-微信端" tabindex="-1"><a class="header-anchor" href="#_5-6-3-微信端" aria-hidden="true">#</a> 5.6.3 微信端</h4><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>- source 代码文件夹
- wx 微信端代码
- xzs-student 学生端代码
- assets 图片资源文件
- component 组件库
- iView 主题
- pages 小程序页面
- utils 公共方法
- wxs 页面公共方法
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><h4 id="_5-6-4-管理端" tabindex="-1"><a class="header-anchor" href="#_5-6-4-管理端" aria-hidden="true">#</a> 5.6.4 管理端</h4><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>- source 代码文件夹
- vue 后端代码
- xzs-student 学生端代码
- public 公共文件、主页
- src 前端代码
- api 接口地址
- assets 图片资源
- components 公共组件
- BackToTop 返回顶部组件
- Pagination 分页组件
- SvgIcon 图标组件
- Ueditor 编辑器组件
- icons 图标库
- layout 母版页
- store 状态管理
- styles 主题样式
- utils 公共方法
- views 视图、系统页面
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br></div></div><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">上次更新: </span><span class="meta-item-info">2022/6/14 08:57:53</span></div><!----></footer><nav class="page-nav"><p class="inner"><!----><span class="next"><a href="/xzs-mysql/guide/deploy.html" class="nav-link" aria-label="6. 项目部署"><!--[--><!--]--> 6. 项目部署 <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
<script src="/xzs-mysql/assets/js/runtime~app.f14c4573.js" defer></script><script src="/xzs-mysql/assets/js/812.fc3c1ea3.js" defer></script><script src="/xzs-mysql/assets/js/app.2f385571.js" defer></script>
</body>
</html>