项目作者: windiest

项目描述 :
:panda_face:基于angular.js,weui和node.js重写的新闻客户端 Based on angular.js, weui and node.js rewrite news client
高级语言: JavaScript
项目地址: git://github.com/windiest/Angular-news.git
创建时间: 2015-09-08T03:15:50Z
项目社区:https://github.com/windiest/Angular-news

开源协议:

下载





Angular News




Use Weui and Angular prepared by the news client,
Live Demo




Made with ❤︎ by
Winds and
Wscats




NPM version
MIT License
Linux Build
Window Build



Installation(Git)

克隆项目地址并下载(需要已安装Git),点击预览(移动端效果更佳)新增Vue2版本

  1. git clone https://github.com/Wscats/news.git

启动服务(http://localhost:12345/news/index.html)

  1. npm run dev

Building

通过npm安装本地服务第三方依赖模块(需要已安装Node.js),当然也可以先不安装依赖暂时省略这步,运行node http直接查看项目效果

  1. npm install

然后执行gulp构建项目文件和打开服务器等

  1. npm run test

Installation(NPM)

npm安装名为20的模块

  1. npm install 20

找到模块下载后的位置,在node_modules的20文件夹下

  1. cd /node_modules/20

通过npm安装本地服务第三方依赖模块(需要已安装Node.js),当然也可以先不安装依赖暂时省略这步,运行node http直接查看项目效果

  1. npm install

执行node指令运行http.js

  1. node http

用浏览器打开链接

  1. http://localhost:12345/news/index.html

License

MIT
Copyright (c) 2016 Winds❤︎Wscats

Back-end(PHP)

后端源码地址
登录界面:
url根据服务器域名对应更改(例如本机url就是localhost)

  1. url/news/php/index.php/login
  2. main = url/news/php/index.php

登录接口

Port URL Method
登录接口 main/login_api/login POST
Params Other
username,password 账号:yaojialong,12345678

频道接口

Port URL Method
频道接口 main/news_api/get_channel GET
Params Other

自动登录接口

Port URL Method
自动登录接口 main/login_api/auto_login POST
Params Other
username,token

根据频道显示对应新闻

Port URL Method
根据频道显示对应新闻 main/news_api/show_detail_by_channel_id GET
Params Other
page,channel_id 例如:channel_id:4 军事 6 推荐 7 热点 8 娱乐

新闻根据id显示详细内容的接口

Port URL Method
新闻根据id显示详细内容的接口 main/news_api/show_detail GET
Params Other
id

注册用户的接口

Port URL Method
注册用户的接口 main/login_api/register POST
Params Other
params{username,password}

插入新闻的接口

Port URL Method
插入新闻的接口 main/news_api/insert_news GET
Params Other
title,text

删除新闻的接口

Port URL Method
删除新闻的接口 main/news_api/delete_news GET
Params Other
id