GithubHelp home page GithubHelp logo

huangwei9527 / quark-h5 Goto Github PK

View Code? Open in Web Editor NEW
3.5K 83.0 1.0K 28.97 MB

基于vue2 + koa2的 H5制作工具。让不会写代码的人也能轻松快速上手制作H5页面。类似易企秀、百度H5等H5制作、建站工具

Home Page: http://139.199.172.193:4000/

License: MIT License

JavaScript 94.66% Vue 3.41% CSS 0.46% HTML 1.20% SCSS 0.21% EJS 0.05%

quark-h5's Issues

并发请求,返回值错乱!

截屏2022-06-21 上午9 15 38

截屏2022-06-21 上午9 21 22

注意到上面两个中间件,假设分别为中间件a和中间件b 注意到ctx是从app中获取,当同一时间有多个请求进入,app是个单例,this.ctx = ctx会被让app.ctx被覆盖掉,后面再使用app.ctx可能是上一个客户端的信息。 举例:

用户A -> 发请求 -> 进入中间件a(用户a) ->进入中间件b(用户a)

用户B -> 发请求 -> 进入中间件a(用户b) ->进入中间件b(用户b)

在同一时间的并发下最终的结果可能是:

用户A、用户B同时发请求->进入中间a(用户a)->进入中间a(用户b)(这里app.ctx被覆盖)->进入中间件b(用户a)(此时从app.ctx已经是用户b的请求信息,比如app.ctx.cookies已经变成b用户的cookie了,造出处理混乱,返回值错乱)->进入中间b(用户b)(b用户的返回值是正确的)

因为我在您的项目上面改动一些东西,出现了这个bug,可能您的项目暂时没有这个bug,但是这可能是一个风险点,我觉得可以注意一下。
联系方式:wx:gy668991

增加音乐组件属性

希望可以增加一些属性:
1、当前页面开始播放2、离开当前页面暂停播放

安装,启动的错误。

win电脑
安装install:
提示node-sass失败,原因是 python找不到,把我的python 3.X 版本改成python 2.X 还是不行。之后把node-sass改成7.0.0版本,算是安装成功。
运行 pnpm run dev-client出错:
提示cache-loader未安装,安装完css-loader,之后提示未安装babel-loader,安装好之后又提示,Syntax Error: TypeError: this.getOptions is not a function
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable / to ignore all warnings in a file.
找到这个this.getOptions所在的文件,给整个文件设置了/
eslint-disable */还是同样报错。给下一行 // eslint-disable-next-line 还是不行
之后再找this.getOptions,全局查找找不到了。
之后修改eslint配置,不对整个项目进行eslint检查,还是不行。
最后我放弃了这个项目。。。
如果有谁和我一样排bug的路线,然后解决了,可以提示我一下 哈哈哈
好累,整了7个消失。。哈哈哈

预览报错

页面预览的链接,如果使用pc浏览器打开会报错,无法展示。但是使用手机打开却可以正确查看、

Uncaught SyntaxError: Unexpected token < in JSON at position 0

请问对两端的页面渲染方式是不一样的吗?

如何部署到服务器?

前后端分别部署:
前端:

  1. npm run build-client 并将dist目录放到服务器指定目录下,如:**/quark-h5/client
    2.配置ningx

后端:

  1. 将server目录代码复制到服务器指定目录下,如:**/quark-h5/server
  2. 切换到**/quark-h5/server目录下,执行 npm install pm2 -g & npm run start

数据库:
安装MongoDB,创建quark数据库

@huangwei9527 目前部署线上是这个样子吗

npm install 安装失败

npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/swiper
npm ERR!   swiper@"^6.3.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer swiper@"^5.2.0" from [email protected]
npm ERR! node_modules/vue-awesome-swiper
npm ERR!   vue-awesome-swiper@"^4.1.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/cos800/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/cos800/.npm/_logs/2022-02-23T06_22_12_511Z-debug-0.log

预览页面加载页面引擎.js 404报错

按照提示:【如果没有生成过引擎模板js文件的,需要先编辑引擎模板,否则预览页面加载页面引擎.js 404报错】
但是 npm run dev-server后仍然报错哦,404.

本地部署无法正常启动

你好,我在尝试运行时遇到该问题
运行npm run start该命令时
状态显示stopped查看日志提示问题出在**\server\core\index.js****第五行**
查看找不到一个名为_koa的依赖库_
尝试安装这个库,命令提示出错问题是swiper 和 vue-awesome-swiper 之间存在不兼容的版本要求
由于我的版本已经是最新版,尝试将该模块_回滚至之前的版本_
命令行提示在安装 node-sass 依赖项时,Node.js 的构建工具无法找到 Python 环境,查找该版本之后提示需要python 2.X或3.X版本
由于我之前安装过Python3.11.6版本且用命令行查过该环境可以查询
所以选择_重新安装_node-sass,但是运行时命令行提示swiper 和 vue-awesome-swiper 之间存在不兼容的版本要求
所以这个问题要怎么解决?好像进入循环了
请教一下作者

很感兴趣

你做的和我们团队做的很相近,有没有兴趣来头条一起做?

vuex数据没有持久化

一刷新就没了,另外建议出一个常规单页模式,就是那种从上往下布局的普通页面(现在是只有全屏滚动的模式)。

支持!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.