Coder Social home page Coder Social logo

f-loat / ithome-lite Goto Github PK

View Code? Open in Web Editor NEW
527.0 17.0 114.0 2.11 MB

🥛 IT之家第三方小程序版客户端(使用 mpvue 开发,兼容 web)

License: MIT License

JavaScript 40.75% HTML 1.02% Vue 58.14% CSS 0.09%
ithome mpvue miniapp wxapp wxmp mpvue-entry mpvue-web demo

ithome-lite's Introduction

github-stats langs-stats

ithome-lite's People

Contributors

dependabot[bot] avatar f-loat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ithome-lite's Issues

h5模式下运行会报错(mpvue-packager和ithome-lite都是同一个错误)

(node:3652) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property compile of 'undefined' or 'null'.
at addHooks (/Users/yuchen/Documents/demo/ithome-lite/node_modules/webpack-dev-server/lib/Server.js:131:49)
at new Server (/Users/yuchen/Documents/demo/ithome-lite/node_modules/webpack-dev-server/lib/Server.js:144:5)
at module.exports.require.then.webpackConfig (/Users/yuchen/Documents/demo/ithome-lite/node_modules/mpvue-packager-h5-plugin/dev.js:18:18)
at
at process._tickCallback (internal/process/next_tick.js:160:7)
at Function.Module.runMain (module.js:703:11)
at startup (bootstrap_node.js:190:16)
at bootstrap_node.js:662:3
(node:3652) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3652) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

clone master 的代码没有办法运行

ERROR Failed to compile with 5 errors #6 @F-loat 10:17:56

error in ./node_modules/_mpvue-entry@0.3.7@mpvue-entry/dist/NewsList.js

Module parse failed: Unexpected token (11:2)
You may need an appropriate loader to handle this file type.
| const app = new Vue({
| store,
| ...App
| })
| app.$mount()

关于导入weui

把weui.css放到static/weui 目录下
在main.js 里面使用
image
编译的时候报错
image

关于v-router在mpvue中的使用相关疑问

阁下在这个项目中使用v-router作为路由管理,编译成web端的实现是可行的,但是编译为小程序版本的代码后有想过什么解决方案吗,毕竟小程序不支持window对象蛤。还有就是mpvue-router-patch作为小程序版的v-router可以作为生产工具吗?还是说我们需要再v-router的基础上重新封装一个mpvue版本的router?

体验者账号申请

这个小程序属于 文娱-资讯 类,所以个人账号无法通过审核,想要体验的人可以留下你的微信 ID,然后我把你加入体验者列表,这样就可以使用体验版小程序了
qrcode_beta

mpvue-router-patch 引用的 query-string ios10版本兼容问题

wechatimg1
因为使用了mpvue-router-patch包,但是并没有经过babel处理,导致打包后的vendor.js包含const,经测试,在ios 10版本及以下会出现如图错误。

 {
        test: /\.js$/,
        loader: 'babel-loader?cacheDirectory=true',
        include: [
          /node_modules\/.*mpvue-router-patch.*/,
          // /node_modules\/.*query-string.*/,
        ],
      },
}

我的解决办法是使用babel-loader处理,但是mpvue-router-patch引用的query-string这个包也是使用了const,没有经过babel处理。我将query-string也同样处理后,但是query-string并不是使用es6写法,不知道怎么处理了。

import queryString from 'query-string';
const queryStr = queryString.stringify(query, { encode: false })

改为
import queryString from 'querystring';
const queryStr = queryString.stringify(query)

我将query-string替换为querystring解决了兼容问题。请问怎样配置能解决这个问题的。

部分接口参数问题

新闻相关的接口有几个参数不太清楚是哪儿来的,有能力的人可以帮忙测下😋

building for production...

增加路由后,再npm run build 或者 dev ,会一直死在building for production...这条命令行中,不动。

上啦多出一块

自己写了一个h5 。滚到最下面多出了一块。怎么弄掉它。
image

项目无法启动

Module parse failed: C:\Users\xxbmm\Desktop\ithome-lite\node_modules_mpvue-entr y@0.3.2@mpvue-entry\QuanziList.js Unexpected token (11:2)
You may need an appropriate loader to handle this file type.
| const app = new Vue({
| store,
| ...App
| })
| app.$mount()

.postcssrc.js 判断问题

.postcssrc.js

判断当前运行模式,
process.env.MODE === 'h5'
process.env.MODE 这个参数,在哪里设置,demo中找不到

导致,一直执行 rem 转 rpx

安装后报错

ERROR in ./node_modules/_mpvue-entry@0.4.1@mpvue-entry/dist/QuanziDetail.js
Module parse failed: Unexpected token (11:2)
You may need an appropriate loader to handle this file type.
| const app = new Vue({
| store,
| ...App
| })
| app.$mount()

Build failed with errors.

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.