# 答题填报小程序 **Repository Path**: james_f/Answer-form ## Basic Information - **Project Name**: 答题填报小程序 - **Description**: 这个一个答题填报小程序,里面有多种题型 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-27 - **Last Updated**: 2024-09-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 微信小程序 基础模版 [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) 微信小程序基础模版。 [公司Gitlab Repo 地址](http://10.1.160.66/nd-base/nd-wechat) ## Table of Contents [TOC] ## Background 积累已有代码模块和通用能力,减少搭建工程需要的时间。 打开工程需要加入本工程的微信开发者,登录[微信后台](https://mp.weixin.qq.com/)增加开发者。 ## Install 需要安装 Node.js 以及 Yarn 工具。 This project uses [node](http://nodejs.org) and [Yarn](https://classic.yarnpkg.com/en/docs/install#mac-stable). Go check them out if you don't have them locally installed. 1. 安装依赖包 ```sh $ yarn ``` 或者 ```sh $ npm i ``` 2. [微信小程序开发者工具](https://developers.weixin.qq.com/miniprogram/dev/devtools/stable.html) 导入项目 3. 微信小程序开发者工具菜单,点击 `工具`->`构建 npm` 4. 点击微信小程序开发者工具右上角的`详情`->`本地设置`->`启用自定义处理命令`,开启这个选项 5. 启动监视编译 ```sh $ yarn watch ``` 或者 ```sh $ npm run watch ``` ## 开发注意 1. TabBar页面需要添加代码 ```js import { setTabBar } from '../../utils/util'; onShow() { setTabBar(this); } ``` 2. 工程根目录下的`.prettierrc.js`文件需要设置为**Prettier的配置,便于统一代码格式化风格** 3. 设置`env.ts`文件中的服务器地址,同时去[微信小程序后台](https://mp.weixin.qq.com/)把服务器地址添加到允许访问列表中 4. `project.config.json`文件中设置`appid` ## 工程文件说明 ``` . |-- README.md |-- miniprogram | |-- app.json -> window.navigationBarTitleText 标记了默认的标题文本 | |-- app.scss | |-- app.ts | |-- behaviors | |-- components | | `-- apply-card | |-- custom-tab-bar -> 默认的Tabbar | | |-- index.json | | |-- index.ts | | |-- index.wxml | | `-- index.wxss | |-- env.ts -> 系统环境配置文件 | |-- pages | | |-- index -> 首页 | | |-- login -> 手机号验证码登录页面 | | |-- myCenter -> 个人中心页面 | | |-- myResult -> 提示信息页面 | | |-- requestPhone -> 获取手机号页面 | | |-- systemNotification -> 系统消息页面 | |-- sitemap.json | |-- style | | |-- common.wxss -> 重置系统样式 | | |-- customCssVariable.wxss -> 全局自定义CSS变量 | | |-- myIconFont.wxss -> 自定义图标 | | |-- myVant.wxss -> 覆盖Vant默认的CSS变量 | | `-- reset.wxss -> 重置系统样式 | `-- utils | |-- common.wxs -> wxs函数 | |-- debounce.ts -> 防抖函数 | |-- fly.ts -> 请求封装库 | |-- logManager.ts -> 微信后台日志 | `-- util.ts -> 工具函数 |-- package.json |-- project.config.json -> 可修改projectname、appid |-- project.private.config.json |-- tsconfig.json -> TypeScript 配置文件 |-- .prettierrc.js -> prettier 配置文件 ``` ## TODO - [ ] 待完成功能 ## Maintainers [@zhangzixuan_nj](http://10.1.160.67/zhangzixuan_nj) [@liangjunpeng_nj](http://10.1.160.67/liangjunpeng_nj) ## License [MIT](LICENSE)