# toutiao -weex
> 基于WEEX +Vue2.0仿照今日頭條的app項(xiàng)目(android/ios)
源碼地址:[toutiao_weex](https://github.com/weexext/weex-toutiao)
Apk地址:[android-demo](https://github.com/weexext/weex-toutiao/blob/master/app-debug.apk?raw=true)
## 前言
之前打算做個(gè)東西熟悉vue的使用啥么,由于自己蠻喜歡刷手機(jī)看看新聞的,借鑒了其他同學(xué)的項(xiàng)目(鏈接在下面)剑梳,自己也做了一個(gè)骤素。項(xiàng)目中還有許多可以完善的地方饱亮,不足之處希望小伙伴們可以issue,我會(huì)在這里更新攻询。目前還沒有全面地測(cè)試該項(xiàng)目盯串,有問題提問,大家一起學(xué)習(xí)齐遵。
## 技術(shù)棧
1. 主要用到:vue、weex android ios
## 功能
- 各類新聞的查看
- 本地收藏新聞
- 新聞的搜索
- 待...
## 效果
![圖片描述][1]
![entry](https://github.com/weexext/weex-toutiao/blob/master/capture/v_02.gif?raw=true)
![collect](https://github.com/weexext/weex-toutiao/blob/master/capture/home.png)
![detail](https://github.com/weexext/weex-toutiao/blob/master/capture/detail.png)
## 目錄
```
|- src
|- assets
|- image? ? ? ? ? ? ? ? ? // 項(xiàng)目圖片
|- font? ? ? ? ? ? ? ? ? ? // iconfont字體庫
|- include? ? ? ? ? ? ? ? ? ? // 組件
|- navbar.vue? ? ? ? ? ? ? // 導(dǎo)航
|- tabbar.vue? ? ? ? ? ? ? // 底部導(dǎo)航
|- views? ? ? ? ? ? ? ? ? ? ? // 主體頁面
|- index.vue? ? ? ? ? ? ? // 主體頁面
|- Detail.vue? ? ? ? ? ? ? // 詳情頁
|- Care.vue? ? ? ? ? ? ? ? // 關(guān)注頁
|- Home.vue? ? ? ? ? ? ? ? // 主頁
|- My.vue? ? ? ? ? ? ? ? ? // 段子頁
|- manifast.json? ? ? ? ? ? ? // 清單文件
|- tools
|- android? ? ? ? ? ? ? ? ? ? // android copy
|- iso? ? ? ? ? ? ? ? ? ? ? ? // ios copy
|- packzip.js? ? ? ? ? ? ? ? // 打包
```
更多細(xì)節(jié)在源碼中會(huì)有一些注釋
## API
1. 獲取新聞:`https://m.toutiao.com/list/?tag=新聞?lì)愋?amp;ac=wap&count=20&format=json_raw&as=A125A8CEDCF8987&cp=58EC18F948F79E1&min_behot_time=時(shí)間`
2. 獲取文章:`https://m.toutiao.com/i新聞ID/info/'`
3. 獲取段子:`https://www.toutiao.com/api/article/feed/?category=essay_joke&utm_source=toutiao&widen=1&max_behot_time=1500114422&max_behot_time_tmp=1500114422&tadrequire=true&as=A1F52966E9EEF00&cp=59692E6FD0E09E1`
4. 搜索: `https://www.toutiao.com/search_content/?offset=相對(duì)位置&format=json&keyword=關(guān)鍵詞&autoload=true&count=20&cur_tab=1`
還可以參考[今日頭條Api分析](https://github.com/iMeiji/Toutiao/wiki/%E4%BB%8A%E6%97%A5%E5%A4%B4%E6%9D%A1Api%E5%88%86%E6%9E%90)
Ps:多star多動(dòng)力[捂臉]
## 參考
[u-weex開源地址](https://github.com/weexext)
[u-weex開源地址wiki](https://github.com/weexext/weex-ext-wiki/wiki)
[toutiao_Vue2.0的項(xiàng)目](https://github.com/Huahua-Chen/toutiao_Vue2.0)
## Build Setup
#### android
``` bash
npm install
npm run build
npm run packzip
npm run copy:android
cd platforms/android
gradle iD
```
![圖片描述][2]
[1]: /img/bVUcu3
[2]: /img/bVUcvx