From 012d5c9b911b28726ac3970514bb5a0295bd216e Mon Sep 17 00:00:00 2001 From: Sara <1622138424@qq.com> Date: Wed, 19 Jul 2023 17:21:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=97=85=E6=8B=8D?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=20=E6=96=B0=E5=A2=9E=EF=BC=9A=E7=9C=8B?= =?UTF-8?q?=E6=9D=BF=E5=A8=98=20=E4=BC=98=E5=8C=96=EF=BC=9A=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E5=AE=A4=E8=84=9A=E6=9C=AC=E8=BF=87=E6=BB=A4=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=AF=8F=E4=B8=AAIP=E5=92=8C?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E9=99=90=E5=88=B6=E6=AF=8F=E5=A4=A9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=9D=E5=AD=98=E6=AC=A1=E6=95=B0=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=9A=E4=B8=AA=E5=88=ABBug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 11 +- package.json | 4 +- src/components/admin/common/sidebar.vue | 77 ++++--- src/components/admin/resourcePathList.vue | 2 +- src/components/common/myFooter.vue | 2 +- src/components/home.vue | 16 +- src/components/myAside.vue | 62 +++--- src/components/travel.vue | 234 ++++++++++++++++++++++ src/main.js | 2 +- src/router/index.js | 4 + src/utils/bubble.js | 98 +++++++++ vue.config.js | 3 +- 12 files changed, 443 insertions(+), 72 deletions(-) create mode 100644 src/components/travel.vue create mode 100644 src/utils/bubble.js diff --git a/README.md b/README.md index d23512b..f337dd6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# poetry-ui(Vue2) +# Poetize(Vue2) ## 网站示例 [poetize.cn](https://poetize.cn) @@ -32,6 +32,13 @@ - 优化:前端美化 - 优化:资源整合 +### 2023年7月20日更新 +- 新增:旅拍模块 +- 新增:看板娘 +- 优化:聊天室脚本过滤 +- 优化:每个IP和账号限制每天接口保存次数 +- 优化:个别Bug修复 + ### 首页 ![首页](首页.jpg) @@ -94,7 +101,7 @@ npm run build 4. 漏洞反馈:欢迎提交BUG 5. 迭代升级:欢迎提好的创意 -群名片七天有效,如果需要请加作者好友,然后拉进交流群(请按需加群,退群后删除好友) +群名片七天有效,如果需要请加作者好友(请务必Star,并注明来源),然后拉进交流群(请按需加群,有问题先看文档再咨询网友,退群后删除好友) ![个人名片](Sara.jpg) diff --git a/package.json b/package.json index bd3aab5..20b1354 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", + "serve": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve", + "build": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { diff --git a/src/components/admin/common/sidebar.vue b/src/components/admin/common/sidebar.vue index 08510ff..13454ae 100644 --- a/src/components/admin/common/sidebar.vue +++ b/src/components/admin/common/sidebar.vue @@ -8,32 +8,34 @@ unique-opened router> diff --git a/src/components/home.vue b/src/components/home.vue index 9b8b1c3..721c68f 100644 --- a/src/components/home.vue +++ b/src/components/home.vue @@ -6,7 +6,7 @@
@@ -45,6 +45,13 @@
+ +
  • +
    + 🌏 旅拍 +
    +
  • +
  • @@ -185,6 +192,13 @@
  • + +
  • +
    + 🌏 旅拍 +
    +
  • +
  • diff --git a/src/components/myAside.vue b/src/components/myAside.vue index 2fad414..3d78ff0 100644 --- a/src/components/myAside.vue +++ b/src/components/myAside.vue @@ -19,6 +19,37 @@
    + +
    +
    + + 推荐文章 +
    +
    +
    +
    + +
    +
    + {{article.username}} +
    +
    +
    +
    +
    + {{ article.articleTitle }} +
    +
    + +
    +
    +
    @@ -78,37 +109,6 @@
  • - -
    -
    - - 推荐文章 -
    -
    -
    -
    - -
    -
    - {{article.username}} -
    -
    -
    -
    -
    - {{ article.articleTitle }} -
    -
    - -
    -
    - +
    +
    + +
    + + +
    + +
    +
    + 旅拍集 +
    +
    + 这里是我的旅拍哦 +
    +
    +
    +
    + 每一张照片都是一次美好的记忆。 +
    +
    + +
    + +
    +
    + + +
    +
    + +
    + {{photoPagination.classify}} +
    + + +
    + +
    + ~~到底啦~~ +
    +
    +
    +
    + + +
    + +
    +
    + + + + + diff --git a/src/main.js b/src/main.js index 713f89f..5133e46 100644 --- a/src/main.js +++ b/src/main.js @@ -8,7 +8,7 @@ import common from './utils/common' import constant from './utils/constant' import mavonEditor from 'mavon-editor' //引入js -//import './utils/live2d' +import './utils/live2d' import './utils/title' //引入css import './assets/css/animation.css' diff --git a/src/router/index.js b/src/router/index.js index 7f47c99..636a750 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -36,6 +36,10 @@ const routes = [ path: "/favorite", name: "favorite", component: () => import('../components/favorite') + }, { + path: "/travel", + name: "travel", + component: () => import('../components/travel') }, { path: "/message", name: "message", diff --git a/src/utils/bubble.js b/src/utils/bubble.js new file mode 100644 index 0000000..3f3c9d6 --- /dev/null +++ b/src/utils/bubble.js @@ -0,0 +1,98 @@ +if (document.querySelector(".author-content.author-content-item.single")) { + const canvas = document.createElement("canvas"); + canvas.id = "header_canvas"; + canvas.style.position = "absolute"; + canvas.style.bottom = "0"; + canvas.width = 844; + canvas.height = 346; + document.querySelector(".author-content.author-content-item.single").appendChild(canvas); + const parent = document.querySelector(".author-content.author-content-item.single").parentNode; + parent.className = "thumbnail_canvas"; + (function () { + var canvas, + ctx, + width, + height, + bubbles, + animateHeader = true; + initHeader(); + + function initHeader() { + canvas = document.getElementById("header_canvas"); + window_resize(); + if (canvas) { + ctx = canvas.getContext("2d"); + //建立泡泡 + bubbles = []; + var num = width * 0.04; //气泡数量 + for (var i = 0; i < num; i++) { + var c = new Bubble(); + bubbles.push(c); + } + animate(); + } + } + + function animate() { + if (animateHeader) { + ctx.clearRect(0, 0, width, height); + for (var i in bubbles) { + bubbles[i].draw(); + } + } + requestAnimationFrame(animate); + } + + function window_resize() { + //canvas铺满窗口 + //width = window.innerWidth; + //height = window.innerHeight; + + //如果需要铺满内容可以换下面这个 + const panel = document.querySelector(".thumbnail_canvas"); + if (panel) { + width = panel.offsetWidth; + height = panel.offsetHeight; + + canvas.width = width; + canvas.height = height; + } + } + + window.onresize = function () { + window_resize(); + }; + + function Bubble() { + var _this = this; + (function () { + _this.pos = {}; + init(); + })(); + + function init() { + _this.pos.x = Math.random() * width; + _this.pos.y = height + Math.random() * 100; + _this.alpha = 0.1 + Math.random() * 0.5; //气泡透明度 + _this.alpha_change = 0.0002 + Math.random() * 0.0005; //气泡透明度变化速度 + _this.scale = 0.2 + Math.random() * 0.8; //气泡大小 + _this.scale_change = Math.random() * 0.002; //气泡大小变化速度 + _this.speed = 0.1 + Math.random() * 0.4; //气泡上升速度 + } + + //气泡 + this.draw = function () { + if (_this.alpha <= 0) { + init(); + } + _this.pos.y -= _this.speed; + _this.alpha -= _this.alpha_change; + _this.scale += _this.scale_change; + ctx.beginPath(); + ctx.arc(_this.pos.x, _this.pos.y, _this.scale * 10, 0, 2 * Math.PI, false); + ctx.fillStyle = "rgba(255,255,255," + _this.alpha + ")"; + ctx.fill(); + }; + } + })(); +} diff --git a/vue.config.js b/vue.config.js index d099bd3..d59c663 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,6 @@ module.exports = { devServer: { port: 80 - } + }, + productionSourceMap: false }