项目历时一个月,现将分享如下:
开发环境:
此项目基于Android studio,数据库用了sqllite、以及mysql、服务器端用的Apache+php(可以用phpstuduy)
数据库代码:
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50553
Source Host : localhost:3306
Source Database : newsdb
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-05-26 09:26:02
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for news_four
-- ----------------------------
DROP TABLE IF EXISTS `news_four`;
CREATE TABLE `news_four` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
`keywords` varchar(50) NOT NULL,
`author` varchar(16) NOT NULL,
`addtime` datetime NOT NULL,
`content` text NOT NULL,
`url` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for news_one
-- ----------------------------
DROP TABLE IF EXISTS `news_one`;
CREATE TABLE `news_one` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
`keywords` varchar(50) NOT NULL,
`author` varchar(16) NOT NULL,
`addtime` datetime NOT NULL,
`content` text NOT NULL,
`url` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for news_three
-- ----------------------------
DROP TABLE IF EXISTS `news_three`;
CREATE TABLE `news_three` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
`keywords` varchar(50) NOT NULL,
`author` varchar(16) NOT NULL,
`addtime` datetime NOT NULL,
`content` text NOT NULL,
`url` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for news_two
-- ----------------------------
DROP TABLE IF EXISTS `news_two`;
CREATE TABLE `news_two` (
`id` int(9) NOT NULL AUTO_INCREMENT,
`title` varchar(50) NOT NULL,
`keywords` varchar(50) NOT NULL,
`author` varchar(16) NOT NULL,
`addtime` datetime NOT NULL,
`content` text NOT NULL,
`url` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
功能页:
调用图灵机器人api,实现在线机器人功能:
医疗卫生新闻查询功能:(ps:图片为自己手动更改json中image路径)
后端:新闻插入功能(php写的很简陋,用的phpstudy)
个人界面:包涵上传头像、重置密码、紧急呼救
源码连接:https://download.csdn.net/download/qq_35195390/11205281