下载资源前端资源详情
lottery-master.zip
大小:2.4MB
价格:26积分
下载量:0
评分:
5.0
上传者:nidayenagebi
更新日期:2025-09-22

基于 Express + Three.js的 3D 球体抽奖程序

资源文件列表(大概)

文件名
大小
lottery-master/
-
__MACOSX/._lottery-master
212B
lottery-master/LICENSE
1.04KB
__MACOSX/lottery-master/._LICENSE
212B
lottery-master/Dockerfile
946B
__MACOSX/lottery-master/._Dockerfile
212B
lottery-master/dev.sh
146B
__MACOSX/lottery-master/._dev.sh
212B
lottery-master/server/
-
__MACOSX/lottery-master/._server
212B
lottery-master/product/
-
__MACOSX/lottery-master/._product
212B
lottery-master/README.MD
7.17KB
__MACOSX/lottery-master/._README.MD
212B
lottery-master/build.sh
125B
__MACOSX/lottery-master/._build.sh
212B
lottery-master/.gitignore
45B
__MACOSX/lottery-master/._.gitignore
212B
lottery-master/README-ZH_CN.MD
6.38KB
__MACOSX/lottery-master/._README-ZH_CN.MD
212B
lottery-master/tagpush.sh
96B
__MACOSX/lottery-master/._tagpush.sh
212B
lottery-master/docker-compose.yml
247B
__MACOSX/lottery-master/._docker-compose.yml
212B
lottery-master/server/test.js
729B
__MACOSX/lottery-master/server/._test.js
212B
lottery-master/server/server.js
6.09KB
__MACOSX/lottery-master/server/._server.js
212B
lottery-master/server/index.js
84B
__MACOSX/lottery-master/server/._index.js
212B
lottery-master/server/config.js
1.28KB
__MACOSX/lottery-master/server/._config.js
212B
lottery-master/server/help.js
2.6KB
__MACOSX/lottery-master/server/._help.js
212B
lottery-master/server/package-lock.json
85.76KB
__MACOSX/lottery-master/server/._package-lock.json
212B
lottery-master/server/package.json
688B
__MACOSX/lottery-master/server/._package.json
212B
lottery-master/server/.vscode/
-
__MACOSX/lottery-master/server/._.vscode
212B
lottery-master/server/data/
-
__MACOSX/lottery-master/server/._data
212B
lottery-master/product/webpack.config.js
1.56KB
__MACOSX/lottery-master/product/._webpack.config.js
212B
lottery-master/product/webpack.dev.js
399B
__MACOSX/lottery-master/product/._webpack.dev.js
212B
lottery-master/product/package-lock.json
354.77KB
__MACOSX/lottery-master/product/._package-lock.json
212B
lottery-master/product/package.json
1.01KB
__MACOSX/lottery-master/product/._package.json
212B
lottery-master/product/postcss.config.js
73B
__MACOSX/lottery-master/product/._postcss.config.js
212B
lottery-master/product/src/
-
__MACOSX/lottery-master/product/._src
212B
lottery-master/server/.vscode/launch.json
561B
__MACOSX/lottery-master/server/.vscode/._launch.json
212B
lottery-master/server/data/users.xlsx
13.56KB
__MACOSX/lottery-master/server/data/._users.xlsx
212B
lottery-master/product/src/index.html
1.36KB
__MACOSX/lottery-master/product/src/._index.html
212B
lottery-master/product/src/css/
-
__MACOSX/lottery-master/product/src/._css
212B
lottery-master/product/src/img/
-
__MACOSX/lottery-master/product/src/._img
212B
lottery-master/product/src/lib/
-
__MACOSX/lottery-master/product/src/._lib
212B
lottery-master/product/src/data/
-
__MACOSX/lottery-master/product/src/._data
212B
lottery-master/product/src/lottery/
-
__MACOSX/lottery-master/product/src/._lottery
212B
lottery-master/product/src/css/animate.min.css
16.55KB
__MACOSX/lottery-master/product/src/css/._animate.min.css
212B
lottery-master/product/src/img/edifier.jpg
23.12KB
__MACOSX/lottery-master/product/src/img/._edifier.jpg
212B
lottery-master/product/src/img/spark.jpg
36.82KB
__MACOSX/lottery-master/product/src/img/._spark.jpg
212B
lottery-master/product/src/img/huawei.png
49.4KB
__MACOSX/lottery-master/product/src/img/._huawei.png
212B
lottery-master/product/src/img/mbp.jpg
6.89KB
__MACOSX/lottery-master/product/src/img/._mbp.jpg
212B
lottery-master/product/src/img/secrit.jpg
11.8KB
__MACOSX/lottery-master/product/src/img/._secrit.jpg
212B
lottery-master/product/src/img/kindle.jpg
42.37KB
__MACOSX/lottery-master/product/src/img/._kindle.jpg
212B
lottery-master/product/src/img/ipad.jpg
43.53KB
__MACOSX/lottery-master/product/src/img/._ipad.jpg
212B
lottery-master/product/src/lib/three.min.js
539.21KB
__MACOSX/lottery-master/product/src/lib/._three.min.js
212B
lottery-master/product/src/lib/tween.min.js
4.85KB
__MACOSX/lottery-master/product/src/lib/._tween.min.js
212B
lottery-master/product/src/lib/ajax.js
1.05KB
__MACOSX/lottery-master/product/src/lib/._ajax.js
212B
lottery-master/product/src/lib/CSS3DRenderer.js
7.16KB
__MACOSX/lottery-master/product/src/lib/._CSS3DRenderer.js
212B
lottery-master/product/src/lib/TrackballControls.js
15.77KB
__MACOSX/lottery-master/product/src/lib/._TrackballControls.js
212B
lottery-master/product/src/data/music.mp3
1.96MB
__MACOSX/lottery-master/product/src/data/._music.mp3
212B
lottery-master/product/src/lottery/index.js
19.8KB
__MACOSX/lottery-master/product/src/lottery/._index.js
212B
lottery-master/product/src/lottery/index.css
8.99KB
__MACOSX/lottery-master/product/src/lottery/._index.css
212B
lottery-master/product/src/lottery/config.js
1.47KB
__MACOSX/lottery-master/product/src/lottery/._config.js
212B
lottery-master/product/src/lottery/prizeList.js
8.6KB
__MACOSX/lottery-master/product/src/lottery/._prizeList.js
212B
lottery-master/product/src/lottery/canvas.js
2.53KB
__MACOSX/lottery-master/product/src/lottery/._canvas.js
212B

资源内容介绍

年会抽奖程序,基于 Express + Three.js的 3D 球体抽奖程序,奖品,文字,图片,抽奖规则均可配置,抽奖人员信息Excel一键导入,抽奖结果Excel导出,给你的抽奖活动带来全新酷炫体验可将抽奖结果进行保存实时下载到 excel 中已抽取人员不在参与抽取,抽中的人员不在现场可以重新抽取刷新或者关掉服务器,会保存当前已抽取的数据,不会进行数据重置,只有点击界面上的重置按钮,才能重置抽奖数据每次抽取的奖品数目可配置抽取完所有奖品后还可以继续抽取特别奖(例如:现在抽取红包,追加的奖品等),此时默认一次抽取一个安装cd lottery# 服务端插件安装cd servernpm install# 前端插件安装cd ../productnpm install# 打包npm run build# 运行npm run serve# 开发调试npm run dev
# Lottery programAnnual dinner lottery program, 3D sphere raffle, support for configuration of prize information, import participants information by `Excel`, and export lottery results by `Excel`If programm is helpful for you😎😎😎, it will be greatful to comment us with⭐**star**⭐ 😘😘😘😍🥰🎉🎈🎃[点击跳转至中文使用文档](https://github.com/moshang-xc/lottery/blob/master/README-ZH_CN.MD)> Try it now: [https://moshang-xc.github.io/lottery/](https://moshang-xc.github.io/lottery/)## Technology StackTechnology stack: Node + Express + Three.jsServer: Express + NodeWeb Page: Three.js, References to the official 3D example of `Three.js`## Function Description:1. The result can ben save and downloaded to excel synchronously🎉2. The winner will not participate in the drawing, and the drawing person can be drawn again if he/she not on site🎁3. Refresh or trun off the server will save the winner data and will not resrt the lottery data, only by click the reset button on the page can the lottery data be reset🧧4. The number of prizes is able to configure🎈5. After all the prizes have been drawn, you can continue to draw special prizes(For example:Red pockets, additional prizes, etc). By default, one is extracted at once🧨## Preview> Try it now: [https://moshang-xc.github.io/lottery/](https://moshang-xc.github.io/lottery/)![lottery.gif](https://raw.githubusercontent.com/moshang-xc/blog/master/share/lottery.gif)![index.jpg](https://raw.githubusercontent.com/moshang-xc/blog/master/share/index.jpg)![start.jpg](https://raw.githubusercontent.com/moshang-xc/blog/master/share/start.jpg)![end.jpg](https://raw.githubusercontent.com/moshang-xc/blog/master/share/end.jpg)## Install```git clone https://github.com/moshang-xc/lottery.gitcd lottery# Server plugin installationcd servernpm install# Front-end plugin installationcd ../productnpm install# Packagenpm run build# Runningnpm run serve# Developing & debuggingnpm run dev```## Directory Structure```Lottery├── product│ ├── src│ │ ├── lottery│ │ │ └── index.js│ │ ├── lib│ │ ├── img│ │ ├── css│ │ └── data│ ├── package.json│ └── webpack.config.js├── server│ ├── config.js│ ├── server.js│ └── package.js```> 1. product is Front-end page directory> 4. server is Server directory> 5. config is Profile for prize information## Configuration Information### Lottery personnel list information configurationThe lottery list information is in the **`server/data/user.xlsx`** file, information could only fill in base on the format, file name and title are not able to revise### Prize information configurationPrize information is filled in the **server/config.js** file, and the file name cannot be modified.**The configuration of the prizes is described as follows:**| Parameter | Value Type | Description || --------- | ---------- | ------------------------------------------------------------ || type | Number | Type of prize, unique identifier, 0 is the placeholder for the default special prize, other prizes cannot be used || count | Number | Prizes amount || text | String | Prizes name || title | String | Prizes description || img | String | Image URL of the prize, image is under**img** catalog |```js// Prize information, the first item is reserved and cannot be modified. Other items can be modified as required// Prize inlet prizes = [{ type: 0, count: 1000, title: "", text: "Special Price" }, { type: 1, count: 2, text: "Special Price" title: "Mystery jackpot" img: "../img/secrit.jpg" }, { type: 2, count: 5, text: "First prize" title: "Mac Pro", img: "../img/mbp.jpg" } ...];```### The configuration of the number of prizes drawn each time**EACH_COUNT**It is used to configure the number of lottery draws each time, which corresponds to the prizes one by one. For example, the number of lottery draws corresponding to the above prize configuration is as follows:```jsconst EACH_COUNT = [1, 1, 5];```Configuration above means the order of the number of prizes to be drawn at one time is:one special prize per time, one grand prize per time and 5 first prize per time.### Enterprise Identity ConfigurationThis identification is used to display on the lottery card. ```jsconst COMPANY = "MoShang";```## Docker Deployment plan### SummaryThis project is support to deploy by Docker. Docker is a platform with lightweight containerization, allows you to quickly deploy, test and run the applications. This text will introduce how to deploy the project by Docker.### System RequirementBefore you use the Docker to deploy the project, you need to ensure you have download below software:- Docker (Please refer Docker official file to get the installation instructions)- Docker Compose### Installation1. Download and unzip the source code for the project2. Access the project directory after unzipped the file3. Execute the following command to build the Docker mirror image: ``` ./build.sh [TAG] ``` It will use Dockerfile to set up the Docker mirror image named `lottery:[TAG]`. If no tag is specified, the 'latest' tag is used by default 4. Execute the following command to run the local container: ``` ./dev.sh [TAG] ``` This will start the container and deploy the application in the Docker container. You can test loacally to ensure all running fulently. Please be pay attention that all applicaiton in the container will monitor port 8888 and port 443.5. Execute the following command to tag the Docker mirror image and push it to the remote Docker repository ``` ./tagpush.sh [TAG] ``` It will tag the Docker mirror image and push it to the remote Docker repository, please build up your repo at https://hub.docker.com/ if you want to us Docker official hub.6. Ensure it has a file named `docker-compose.yml` and add below information: ``` version: '3.8' volumes: lottery_log: services: lottery: container_name: lottery expose: - 8888 ports: - "28458:8888" - "443:443" volumes: - "lottery_log:/var/log" image: "panda1024/lottery:[TAG]" restart: always ``` Kindly take note that `[TAG]` should be replaced with the name of the mirror image you pushed to the Docker repository7. Run the following command in the project directory on the server to deploy the application using Docker Compose:```docker-compose up -d```This will start a Docker Compose stack and deploy the project into it. Note that port 8888 and port 443 of the container are mapped to port 8888 and port 443 on the server. If you wish to use a different port, please change the `docker-compose.yml` file accordingly.## LicenseMIT

用户评论 (0)

发表评论

captcha