diff --git a/README.en.md b/README.en.md deleted file mode 100644 index b136d60a38d4e8b4ea9431d0ac74f90ccfa5a443..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# 21届7班vue作业 - -#### Description -学生作业 - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 85aceae28aeb56d3c5563e2d3da327738ded9d78..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# 21届7班vue作业 - -#### 介绍 -学生作业 - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git "a/\346\210\264\344\275\263\350\276\211/20230323-Vue\346\241\206\346\236\266/demo.html" "b/\346\210\264\344\275\263\350\276\211/20230323-Vue\346\241\206\346\236\266/demo.html" new file mode 100644 index 0000000000000000000000000000000000000000..6bcb495d160e2501761a5ea5dad79d1aa86833d3 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230323-Vue\346\241\206\346\236\266/demo.html" @@ -0,0 +1,92 @@ + + + + + + +
+

商品列表

+
+
+

名称:{{ good.name }}

+ +

描述:{{ good.describe }}

+

价格:¥{{good.price }}

+
+
+
+ + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230325-Vue\345\210\227\350\241\250\345\244\204\347\220\206/demo.html" "b/\346\210\264\344\275\263\350\276\211/20230325-Vue\345\210\227\350\241\250\345\244\204\347\220\206/demo.html" new file mode 100644 index 0000000000000000000000000000000000000000..7ed2d234c556fad968de6c940a100ebac69d5bfe --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230325-Vue\345\210\227\350\241\250\345\244\204\347\220\206/demo.html" @@ -0,0 +1,107 @@ + + + + + + + 商品列表 + + + + + + +
+

商品列表

+
+
+
+

名称:{{ good.name }}

+ +

描述:{{ good.describe }}

+

价格:¥{{good.price }}

+ +

剩余数量:{{100-good.number}}

+
+
+

{{ good.name }}库存为0

+
+
+
+
+ + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230327-Vue\345\242\236\345\210\240/demo.html" "b/\346\210\264\344\275\263\350\276\211/20230327-Vue\345\242\236\345\210\240/demo.html" new file mode 100644 index 0000000000000000000000000000000000000000..122066dd126e0c9f25be3f3ac98c145eddd1f303 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230327-Vue\345\242\236\345\210\240/demo.html" @@ -0,0 +1,141 @@ + + + + + + + + 商品列表 + + + + + + + + +
+

商品列表

+
+
+
+

名称:{{ good.name }}

+ + +

描述:{{ good.describe }}

+

价格:¥{{good.price }}

+

剩余数量:{{good.number}}

+ +
+ + + +
+
+
+
` + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230330-Vue\347\233\221\345\220\254/demo.html" "b/\346\210\264\344\275\263\350\276\211/20230330-Vue\347\233\221\345\220\254/demo.html" new file mode 100644 index 0000000000000000000000000000000000000000..7944c64cdd503184901e49da835a4cddedba8843 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230330-Vue\347\233\221\345\220\254/demo.html" @@ -0,0 +1,172 @@ + + + + + + + 商品列表 + + + + + + + + + +
+

商品列表

+
+
+
+

名称:{{ good.name }}

+ +

描述:{{ good.describe }}

+

价格:¥{{good.price }}

+

剩余数量:{{good.number}}

+ +
+ + + +
+
+
+ +
` + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/app.js" "b/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/app.js" new file mode 100644 index 0000000000000000000000000000000000000000..d35805c4347a4c5bc56b5edfc25ac0ccf1f53faa --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/app.js" @@ -0,0 +1,49 @@ +let express = require('express'); + +const app = express(); + +app.use(express.static('public')); + +let Md = (req,res,next)=>{ + res.writeHeader(200,{"Content-type":"text/html;charset=utf8"}) + next(); +} + +app.use(Md); + +const goods = require('./goods.js'); + +app.get('/info',async (req,res)=>{ + let show =await goods.findAll(); + res.end(JSON.stringify(show)) +}); + +app.get('/add',async (req,res)=>{ + let name = req.query.name; + let describe = req.query.describe; + let price = req.query.price; + let number = req.query.number; + let buyNum =req.query.buyNum; + let img = req.query.img; + let add = await goods.create({ + name:name, + describe:describe, + price:price, + number:number, + buyNum:buyNum, + img:img, + }) + res.end(JSON.stringify(add)) +}) + +app.get('/del',async (req,res)=>{ + let id = req.query.id; + let del = await goods.destroy({ + where:{ + id:id + } + }) + res.end(JSON.stringify(del)) +}) + +app.listen('3000') \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/goods.js" "b/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/goods.js" new file mode 100644 index 0000000000000000000000000000000000000000..8c7bfa5a6601b2e6322db537ebe0680f39e23616 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/goods.js" @@ -0,0 +1,46 @@ +const{Sequelize , Model, DataTypes} = require('sequelize') + +let sequelize = new Sequelize('class7','root','root',{ + host:'127.0.0.1', + dialect:'mysql', + define:{ + underscored:true + } +}) + +class goods extends Model{}; + +goods.init({ + id:{ + type:DataTypes.INTEGER, + primaryKey:true, + autoIncrement:true, + allowNull:false + }, + name:{ + type:DataTypes.STRING + }, + describe:{ + type:DataTypes.STRING + }, + price:{ + type:DataTypes.INTEGER + }, + number:{ + type:DataTypes.INTEGER + }, + buyNum:{ + type:DataTypes.INTEGER + }, + img:{ + type:DataTypes.STRING + } +},{ + sequelize, + tableName:'goods', + modelName:'goods' +}); + +goods.sync(); + +module.exports=goods; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/goods.sql" "b/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/goods.sql" new file mode 100644 index 0000000000000000000000000000000000000000..0f2bcb209ef994ba61f8478203a1995b62a9dc92 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/goods.sql" @@ -0,0 +1,44 @@ +/* + Navicat Premium Data Transfer + + Source Server : cc + Source Server Type : MySQL + Source Server Version : 50737 + Source Host : localhost:3306 + Source Schema : class7 + + Target Server Type : MySQL + Target Server Version : 50737 + File Encoding : 65001 + + Date: 01/04/2023 11:41:33 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for goods +-- ---------------------------- +DROP TABLE IF EXISTS `goods`; +CREATE TABLE `goods` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `describe` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `price` int(11) NULL DEFAULT NULL, + `number` int(11) NULL DEFAULT NULL, + `buy_num` int(11) NULL DEFAULT NULL, + `img` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of goods +-- ---------------------------- +INSERT INTO `goods` VALUES (1, '柴犬', '像狗', 888, 100, 1, 'https://img0.baidu.com/it/u=4168664554,3249760368&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '2023-04-01 11:13:57', '2023-04-01 11:13:59'); +INSERT INTO `goods` VALUES (2, '萨摩耶', '长得很像狗', 999, 100, 1, 'https://img0.baidu.com/it/u=3438843980,916394742&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=762', '2023-04-01 11:15:14', '2023-04-01 11:15:16'); +INSERT INTO `goods` VALUES (3, '威尔士柯基犬', '很狗', 898, 100, 1, 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg1.doubanio.com%2Fview%2Fgroup_topic%2Fl%2Fpublic%2Fp437468049.jpg&refer=http%3A%2F%2Fimg1.doubanio.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1682154473&t=9f89afe9a3c36348f61ad7a45f577dbc', '2023-04-01 11:15:48', '2023-04-01 11:15:50'); + +SET FOREIGN_KEY_CHECKS = 1; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/public/index.html" "b/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/public/index.html" new file mode 100644 index 0000000000000000000000000000000000000000..9b1c4d8381574201dd448067a856bcdc66d4b2b4 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230401-VueAndAjax/public/index.html" @@ -0,0 +1,164 @@ + + + + + + + 商品列表 + + + + + + + + + + +
+

商品列表

+
+
+
+

名称:{{ good.name }}

+ +

描述:{{ good.describe }}

+

价格:¥{{good.price }}

+

剩余数量:{{good.number}}

+ +
+ + + +
+
+
+
+ + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230403-Vue\350\207\252\345\256\232\344\271\211\346\214\207\344\273\244\350\241\250\345\215\225\351\252\214\350\257\201/demo.html" "b/\346\210\264\344\275\263\350\276\211/20230403-Vue\350\207\252\345\256\232\344\271\211\346\214\207\344\273\244\350\241\250\345\215\225\351\252\214\350\257\201/demo.html" new file mode 100644 index 0000000000000000000000000000000000000000..d00fa3896933f74a3516710b7c75ac2994da9e12 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230403-Vue\350\207\252\345\256\232\344\271\211\346\214\207\344\273\244\350\241\250\345\215\225\351\252\214\350\257\201/demo.html" @@ -0,0 +1,85 @@ + + + + + + + 表单验证 + + + + +
+
+
账号:账户不存在,请重新输入!
+
密码:密码错误,请重新输入!
+
+
+
+ + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/App.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/App.vue" new file mode 100644 index 0000000000000000000000000000000000000000..4980697c24049b253ad58ad1debb128b4e2c8031 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/App.vue" @@ -0,0 +1,56 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/HelloWorld.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/HelloWorld.vue" new file mode 100644 index 0000000000000000000000000000000000000000..0a0988bcb91e4e3d0a442215f11ca79579d6b63e --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/HelloWorld.vue" @@ -0,0 +1,43 @@ + + + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/TheWelcome.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/TheWelcome.vue" new file mode 100644 index 0000000000000000000000000000000000000000..5e6462538ecda2ce6758b16fcbbf6e2e40f5d683 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/TheWelcome.vue" @@ -0,0 +1,86 @@ + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/WelcomeItem.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/WelcomeItem.vue" new file mode 100644 index 0000000000000000000000000000000000000000..ba0def33c0e523d8c82426d76d76c39b482b21e0 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/WelcomeItem.vue" @@ -0,0 +1,86 @@ + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/center.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/center.vue" new file mode 100644 index 0000000000000000000000000000000000000000..e3d15d752ba71a45ede0a2a8ea76a5ecc41a4365 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/center.vue" @@ -0,0 +1,126 @@ + + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/top.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/top.vue" new file mode 100644 index 0000000000000000000000000000000000000000..fb8e7bb92ab0c2d3125238903f1a657f29ffcfd6 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/top.vue" @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/\346\224\266\346\254\276\347\240\201.jpg" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/\346\224\266\346\254\276\347\240\201.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..42c2a141b65fed979a8bfe9b02e41b617124be59 Binary files /dev/null and "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/goods/\346\224\266\346\254\276\347\240\201.jpg" differ diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconCommunity.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconCommunity.vue" new file mode 100644 index 0000000000000000000000000000000000000000..2dc8b055253af30fb797037e2fe260505f0cf711 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconCommunity.vue" @@ -0,0 +1,7 @@ + diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconDocumentation.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconDocumentation.vue" new file mode 100644 index 0000000000000000000000000000000000000000..6d4791cfbcf2782b3e5ffbabd042d4c47b2fbbed --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconDocumentation.vue" @@ -0,0 +1,7 @@ + diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconEcosystem.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconEcosystem.vue" new file mode 100644 index 0000000000000000000000000000000000000000..c3a4f078c0bd340a33c61ea9ecd8a755d03571ed --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconEcosystem.vue" @@ -0,0 +1,7 @@ + diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconSupport.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconSupport.vue" new file mode 100644 index 0000000000000000000000000000000000000000..7452834d3ef961ce24c3a072ddba2620b6158bae --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconSupport.vue" @@ -0,0 +1,7 @@ + diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconTooling.vue" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconTooling.vue" new file mode 100644 index 0000000000000000000000000000000000000000..660598d7c76644ffe126a1a1feb1606650bfb937 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/components/icons/IconTooling.vue" @@ -0,0 +1,19 @@ + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/main.js" "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/main.js" new file mode 100644 index 0000000000000000000000000000000000000000..db6a890e00ffdc7744da0086e22d366e7c483d36 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230408-Vue\347\273\204\344\273\266\345\225\206\345\223\201/main.js" @@ -0,0 +1,6 @@ +import { createApp } from 'vue' +import App from './App.vue' + +// import './assets/main.css' + +createApp(App).mount('#app')