Giter VIP home page Giter VIP logo

algondon / chat_with_robot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yuzai/chat_with_robot

0.0 1.0 0.0 162 KB

利用聚合数据的问答机器人完成对话,建立中间服务器实现ajax的跨域通信,界面模仿微信。有移动端适配(dev分支)和响应式布局(master分支)两个版本

Home Page: http://blog.xiaoboma.com/chat_with_robot/

CSS 37.30% HTML 21.69% JavaScript 41.01%

chat_with_robot's Introduction

chat_with_robot

a robot talker

简介

这个项目主要是练习ajax通信,界面是模仿微信的聊天界面,机器人的回复数据来自于聚合数据,demo is here

分支说明

master里面是响应式布局,dev中是对移动端的适配

技术栈

master:采用jQuery,bootstrap做响应式布局,nodejs+heroku部署作为中间服务器进行跨域通信 dev:采用阿里手淘flexible做移动端rem适配,zepto作为方便dom操作的工具,尽量采用flex布局。针对移动端进行优化。

技术难题

跨域问题,聚合数据的访问属于跨域,刚开始是通过jQuery的jsonp方法解决,但是后来聚合数据的服务器端不支持callback,所以我采用了架设中间服务器的方法来完成跨域的访问,中间服务器和本页面的跨域问题采用cors的方法解决,从而完成跨域通信,中间服务器架设在Herku,服务器的页面在这里,服务器的源码在这里

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.