# ithome-lite ([WEB 版](https://github.com/F-loat/ithome-lite/tree/web-version))
> IT之家小程序版客户端
## 相关依赖
* [flyio](https://github.com/wendux/fly/blob/master/README-CH.md) - 同时支持浏览器、小程序、Node、Weex 及快应用的基于 Promise 的跨平台请求库
* [mpvue-entry](https://github.com/F-loat/mpvue-entry) - 集中式页面配置,不再需要重复编辑各页面的 main.js 文件
* [mpvue-router-patch](https://github.com/F-loat/mpvue-router-patch) - 在 mpvue 中使用 vue-router 兼容的路由写法
* [xmlstring2json](https://github.com/vilien/xmlstring2json) - xml字符串转换 json 格式,适用于微信小程序
## 项目模板
* [F-loat/mpvue-quickstart](https://github.com/F-loat/mpvue-quickstart) 使用 mpvue-entry 配置入口,支持新增页面热更新
``` bash
$ vue init F-loat/mpvue-quickstart my-project
```
## 截图展示
<p>
<img alt="新闻列表" src="./screenshots/news.jpg" width="33%" />
<img alt="新闻详情" src="./screenshots/detail.jpg" width="33%" />
<img alt="圈子列表" src="./screenshots/quanzi.jpg" width="33%" />
</p>
## Tips
* flyio 使用方法
具体内容参见 [微信小程序中使用flyio](https://wendux.github.io/dist/#/doc/flyio/wx),这里提示下小程序中需要引入的是 `flyio/dist/npm/wx.js` 这个文件,可以配置下 webpack 的 alias 方便调用
``` js
alias: {
'@': resolve('src'),
vue: 'mpvue',
flyio: 'flyio/dist/npm/wx',
wx: resolve('src/utils/wx')
}
```
* vuex 使用方法
建立 `src/store/index.js` 文件
``` js
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
},
mutations: {
},
actions: {
}
})
export default store
```
在 `src/main.js` 中引用
``` js
import Vue from 'vue'
import store from '@/store'
import App from '@/App'
const app = new Vue({
store,
...App
}).$mount()
```
最后在需要使用 vuex 的页面相对应的 `main.js` 文件中像 `src/main.js` 一样引用即可
## 部分 api 列表
* 新闻列表 https://api.ithome.com/json/newslist/news?r=0
* 文章详情 https://api.ithome.com/xml/newscontent/350/412.xml
* 相关文章 https://api.ithome.com/json/tags/0350/350362.json
* 最热评论 https://dyn.ithome.com/json/hotcommentlist/350/87a8e5b144d81938.json
* 评论列表 https://dyn.ithome.com/json/commentlist/350/87a8e5b144d81938.json
* 评论详情 https://dyn.ithome.com/json/commentcontent/d739ee8f2ceb0a27.json
* 轮播新闻 https://api.ithome.com/xml/slide/slide.xml
* 圈子列表 https://apiquan.ithome.com/api/post?categoryid=0&type=0&orderTime=&visistCount&pageLength
* 圈子详情 https://apiquan.ithome.com/api/post/236076
* 圈子评论 https://apiquan.ithome.com/api/reply?postid=236076&replyidlessthan=3241294
## 相关文章
* [Mpvue 小程序转 Web 实践总结](https://blog.csdn.net/lwzhang1101)
# 最后
源码获取:
关注微信公众号【码农园区】,回复【uniapp源码】
* 喜欢的记得关注,鼓励一下谢谢哈!!
* 微信号 bjawenfd
* qq 群号 582049938
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
UniApp开发前景分析:专业视角引领未来 随着移动互联网的迅猛发展,跨平台应用开发框架UniApp以其独特的优势,展现出广阔的开发前景。 UniApp基于Vue.js,采用一次编写、多端运行的设计理念,极大降低了开发成本和时间。它提供了丰富的原生组件和API封装,保证了应用的原生性能体验,为用户带来流畅的操作感受。 此外,UniApp拥有庞大的社区支持和插件生态系统,为开发者提供了丰富的资源和技术支持。从多级选择器到自定义导航栏,再到二维码生成器,UniApp的控件封装合集为开发者提供了极大的便利。 面向未来,UniApp将继续优化性能,拓展功能,满足更多开发者的需求。如果你正在寻找一个高效、便捷的跨平台开发框架,不妨深入了解UniApp,并查看其丰富的资源文件,开启你的跨平台开发之旅。
资源推荐
资源详情
资源评论
收起资源包目录
uniapp框架-uniapp框架-IT之家小程序版(使用 Mpvue 开发,兼容 Web)-uni-app项目源码-vue语法格式.zip (55个子文件)
uniapp框架-uniapp框架-IT之家小程序版(使用 Mpvue 开发,兼容 Web)-uni-app项目源码-vue语法格式
ithome-lite-master
.editorconfig 147B
screenshots
news.jpg 160KB
quanzi.jpg 113KB
detail.jpg 212KB
.eslintrc.js 742B
project.config.json 505B
src
pages
news
comment.vue 1021B
detail.vue 3KB
list.vue 2KB
quanzi
detail.vue 3KB
list.vue 763B
App.vue 246B
app.json 956B
store
index.js 2KB
styles
index.less 25B
main.js 241B
utils
request.js 502B
api.js 1KB
wx.js 39B
index.js 2KB
components
comment-item.vue 887B
topic-item.vue 2KB
news-item.vue 990B
router
routes.js 690B
LICENSE 1KB
.babelrc 312B
package.json 2KB
build
check-versions.js 1KB
dev-server.js 530B
utils.js 2KB
vue-loader.conf.js 299B
webpack.prod.conf.js 3KB
build.js 1KB
webpack.base.conf.js 2KB
webpack.dev.conf.js 2KB
package-lock.json 396KB
.postcssrc.js 130B
index.html 199B
.gitignore 145B
.eslintignore 23B
static
assets
news.png 2KB
quan_comment.png 894B
news-active.png 3KB
avatar_default.png 5KB
quanzi.png 3KB
quan_hit.png 1KB
quanzi-active.png 3KB
comment.png 5KB
qrcode_beta.jpg 59KB
.gitkeep 0B
qrcode.jpg 50KB
README.md 3KB
config
prod.env.js 48B
index.js 1KB
dev.env.js 139B
共 55 条
- 1
资源评论
DTcode7
- 粉丝: 1w+
- 资源: 4714
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功