webSocket客服在线交谈
一》用户端
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户端</title>
<link rel="stylesheet" type="text/css" href="${BasePath }/css/web/chatClt.css" />
<script type="text/javascript" src="${BasePath }/js/jquery-3.2.0.min.js"></script>
<script type="text/javascript" src="${BasePath }/js/web/chatClt.js"></script>
</head>
<body class="keBody">
<div class="kePublic">
<!--效果html开始-->
<div class="content">
<div class="chatBox">
<div class="chatLeft">
<div class="chat01">
<div class="chat01_title">
<ul class="talkTo">
<li><a href="javascript:;">游客</a></li></ul>
</div>
<div class="chat01_content">
<div class="message_box mes3" style="display: block;">
<!-- 聊天记录开始 -->
<c:forEach items="${chat}" var="ch">
<!--主动发信人 客户 -->
<c:if test="${ch.send_type==1}">
<div class='message clearfix' >
<div class='user-logo'>
<img width='45px' src="${BasePath}/images/ico1.jpg"/>
</div>
<div class='wrap-text'>
<h5 class='clearfix'>游客</h5>
<div>${ch.chat_content}</div>
</div>
<div class='wrap-ri'>
<div clsss='clearfix'><span>
<fmt:parseDate value="${ch.send_time}" var="time"></fmt:parseDate>
<fmt:formatDate value="${time}" pattern="yyyy-MM-dd HH:mm:ss"/>
</span></div>
</div>
<div style='clear:both;'></div></div><div style='clear:both;'></div>
</c:if>
<!--主动发信人 客服 -->
<c:if test="${ch.send_type==2}">
<div class='messages clearfix' >
<div class='user-logo'>
<img width='45px' src='${BasePath}/images/svr.gif'/>
</div>
<div class='wrap-text'>
<h5 class='clearfix'>客服</h5>
<div>${ch.chat_content}</div>
</div>
<div class='wrap-ri'>
<div clsss='clearfix'>
<span>
<fmt:parseDate value="${ch.send_time}" var="time"></fmt:parseDate>
<fmt:formatDate value="${time}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
</div>
</div>
<div style='clear:both;'></div></div><div style='clear:both;'></div>
</c:if>
</c:forEach>
<!-- 聊天记录结束 -->
</div>
</div>
</div>
<div class="chat02">
<div class="chat02_title">
<a class="chat02_title_btn ctb01" href="javascript:;"></a>
<div style="float: right;position:relative;top:5px;">
<a class="" href="${BasePath}/web/delCltrecord.do" onclick="return confirm('确定要删除吗')">
<span style="color:#3A5FCD">删除聊天记录</span></a></div>
<div class="wl_faces_box">
<div class="wl_faces_content">
<div class="title">
<ul>
<li class="title_name">常用表情</li>
<li class="wl_faces_close"><span> </span></li>
</ul>
</div>
<div class="wl_faces_main">
<jsp:include page="/include/webSocket/img.jsp"></jsp:include>
</div>
</div>
<div class="wlf_icon">
</div>
</div>
</div>
<div class="chat02_content">
<textarea id="textarea" ></textarea>
</div>
<div class="chat02_bar">
<ul>
<li style="left: 20px; top: 10px; padding-left: 30px;">来源:
<a href="http://www.internetke.com/" target="_blank" id="haha">宜家</a>
</li>
<li style="right: 5px; top: 5px;">
<img src="${BasePath }/images/img/send_btn.jpg">
</li>
</ul>
</div>
</div>
</div>
<!-- 获取后台自己的uuid -->
<input type="hidden" id="uuid" value="${uuid }">
<c:forEach items="${webSet}" var ="w">
<input type="hidden" id="svrUuid" value="${w.uuid}">
</c:forEach>
<div style="clear:both;"> </div>
</div>
</div>
<!--效果html结束-->
</div>
<script type="text/javascript">
var websocket = null;
//判断当前浏览器是否支持WebSocket
if ('WebSocket' in window) {
var uuid="${uuid}";
websocket = new WebSocket("ws://192.168.6.26:8080/family/websocket?clt"+uuid );
} else {
alert('当前浏览器 Not support websocket')
}
//连接发生错误的回调方法
websocket.onerror = function() {
setMessageInnerHTML("WebSocket连接发生错误");
};
//连接成功建立的回调方法
websocket.onopen = function() {
setMessageInnerHTML("WebSocket连接成功");
}
//接收到消息的回调方法
websocket.onmessage = function(event) {
//setMessageInnerHTML(event.data);
var e=new Date,f="";
f+=e.getFullYear()+"-",
f+=e.getMonth()+1+"-",
f+=e.getDate()+" ",
f+=e.getHours()+":",
f+=e.getMinutes()+":",
f+=e.getSeconds();
//接收到的信息
var mess=event.data;
//信息要发送的uuid
var uuids=mess.substring(mess.length-36,mess.length);
//接收到的信息 真正要发送的内容
var sendmsg=mess.substring(36,mess.length-36);
var sssss="<div class='messages clearfix' ><div class='user-logo'><img width='45px' src='/family/images/svr.gif'/></div><div class='wrap-text'><h5 class='clearfix'>客服</h5><div>"+sendmsg+"</div></div><div class='wrap-ri'><div clsss='clearfix'><span>"+f+"</span></div></div><div style='clear:both;'></div></div><div style='clear:both;'></div>";
$(".mes3").append(sssss);
}
////连接关闭的回调方法
websocket.onclose = function() {
setMessageInnerHTML("WebSocket连接关闭");
}
//监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
window.onbeforeunload = function() {
closeWebSocket();
}
//将消息显示在网页上
function setMessageInnerHTML(innerHTML) {
document.getElementById('haha').innerHTML +=innerHTML + '<br/>';
}
// 关闭WebSocket连接
function closeWebSocket() {
websocket.close();
}
//发送消息
function send() {
var message = document.getElementById('textarea').value;
websocket.send("clt"+message);
}
//刷新上线人信息
function showLst(){
var url="${BasePath}/web/cltAjax.do";
$.post(url,function(str){
var strs=eval(str);
var lili="";
$("#ulul").html("");
for (var i= 0; i <strs.length; i++) {
lili+="<li><label ><input type='radio' name='xuanzhong' value='"+strs[i].uuid+"'> "+strs[i].uuid+"</label>";
}
$("#ulul").html(lili);
});
}
//setInterval("showLst()",10000);
</script>
</body>
</html>
二》客服端
<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>服务端</title>
<script type="text/javascript" src="${BasePath }/js/jquery-3.2.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="${BasePath }/css/web/chatsvr.css" />
<script type="text/javascript" src="${BasePath }/js/web/chatsvr.js"></script>
</head>
<body class="keBody frameBody">
<div class="kePublic">
<!--效果html开始-->
<!-- 获取后台传来的自己的uuid -->
<input type="hidden" id="uuid" value="${uuid }">
<div class="content">
<div class="chatBox">
<div class="chatLeft">
<div class="chat01">
<div class="chat01_title">
<ul class="talkTo">
<li><a href="javascript:;">王旭</a></li></ul>
<a class="close_btn" href="javascript:;"></a>
</div>
<div class="chat01_content">
<div class="message_box mes3" style="display: block;"> </div>
</div>
</div>
<div class="chat02">
<div class="chat02_title">
<a class="chat02_title_btn ctb01" href="javascript:;"></a>
<div class="wl_faces_box">
<div class="wl_faces_content">
<div class="title">
<ul>
<li class="title_name">常用表情</li><li class="wl_faces_close"><span> </span></li></ul>
</div>
<div class="wl_faces_main">
<jsp:include page="/include/webSocket/img.jsp"></jsp:include>
</div>
</div>
<div class="wlf_icon">
</div>
</div>
</div>
<div class="chat02_content">
<textarea id="textarea"></textarea>
</div>
<div class="chat02_bar">
<ul>
<li style="left: 20px; top:10px; padding-left: 30px;">来源:
<a href="http://www.internetke.com/" target="_blank" id="haha">宜家</a></li>
<li style="right: 5px; top: 5px;">
<img src="${BasePath }/images/img/send_btn.jpg"></li>
</ul>
</div>
</div>
</div>
<div class="chatRight">
<div class="chat03">
<div class="chat03_title">
<label class="chat03_title_t"> 成员列表</label>
</div>
<div class="chat03_content">
<ul id="ulul">
<c:forEach items="${webSet}" var="w">
<li>
<label ><input type="radio" name="xuanzhong" value="${w.uuid}">${w.uuid}</label>
</li>
</c:forEach>
</ul>
</div>
</div>
</div>
<div style="clear:both;"> </div>
</div>
</div>
<!--效果html结束-->
</div>
</body>
<<script type="text/javascript">
var websocket = null;
//判断当前浏览器是否支持WebSocket
if ('WebSocket' in window) {
var uuid="${uuid}";
var url="ws://192.168.6.26:8080/family/websocket?svr"+uuid;
websocket = new WebSocket(url);
} else {
alert('当前浏览器 Not support websocket')
}
//连接发生错误的回调方法
websocket.onerror = function() {
setMessageInnerHTML("WebSocket连接发生错误");
};
//连接成功建立的回调方法
websocket.onopen = function() {
setMessageInnerHTML("WebSocket连接成功");
}
//接收到消息的回调方法
websocket.onmessage = function(event) {
//setMessageInnerHTML(event.data);
var e=new Date,f="";
f+=e.getFullYear()+"-",
f+=e.getMonth()+1+"-",
f+=e.getDate()+" ",
f+=e.getHours()+":",
f+=e.getMinutes()+":",
f+=e.getSeconds();
var mess=event.data;
var uuids=mess.substring(mess.length-36,mess.length);
var sendmsg=mess.substring(0,mess.length-36);
var sssss="<div class='messages clearfix' ><div class='user-logo'><img width='45px' src='/family/images/ico1.jpg'/></div><div class='wrap-text'><h5 class='clearfix'>游客</h5><div>"+event.data+"</div></div><div class='wrap-ri'><div clsss='clearfix'><span>"+f+"</span></div></div><div style='clear:both;'></div></div><div style='clear:both;'></div>";
$(".mes3").append(sssss);
}
////连接关闭的回调方法
websocket.onclose = function() {
setMessageInnerHTML("WebSocket连接关闭");
}
//监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
window.onbeforeunload = function() {
closeWebSocket();
}
//将消息显示在网页上
function setMessageInnerHTML(innerHTML) {
document.getElementById('haha').innerHTML +=innerHTML + '<br/>';
}
// 关闭WebSocket连接
function closeWebSocket() {
websocket.close();
}
//发送消息
function send() {
var message = document.getElementById('textarea').value;
websocket.send("svr"+message);
}
/**
* 刷新在线人数
*/
function showLst(){
var url="${BasePath}/web/svrAjax.do";
$.post(url,function(str){
var strs=eval(str);
var lili="";
$("#ulul").html("");
for (var i= 0; i <strs.length; i++) {
lili+="<li><label ><input type='radio' name='xuanzhong' value='"+strs[i].uuid+"'> "+strs[i].uuid+"</label></li>";
}
$("#ulul").html(lili);
});
}
//setInterval("showLst()",10000);
</script>
</html>
三》服务器端
package com.wskj.app.web;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CopyOnWriteArraySet;
import javax.websocket.*;
import javax.websocket.server.ServerEndpoint;
/**
* @ServerEndpoint 注解是一个类层次的注解,它的功能主要是将目前的类定义成一个websocket服务器端,
* 注解的值将被用于监听用户连接的终端访问URL地址,客户端可以通过这个URL来连接到WebSocket服务器端
*/
@ServerEndpoint("/websocket")
public class WebSocketTest {
//静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。
private static int onlineCount = 0;
//concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。若要实现服务端与单一客户端通信的话,可以使用Map来存放,其中Key可以为用户标识
private static List<WebSocketTest> cltSet = new ArrayList<WebSocketTest>();
private static List<WebSocketTest> svrSet = new ArrayList<WebSocketTest>();
//与某个客户端的连接会话,需要通过它来给客户端发送数据
private Session session;
//客户还是服务人员
private String type;
//昵称
private String nickName;
private String uuid;
/**
* 连接建立成功调用的方法
* @param session 可选的参数。session为与某个客户端的连接会话,需要通过它来给客户端发送数据
*/
@OnOpen
public void onOpen(Session session){
///获取前台的url
String url=session.getRequestURI().toString();
//获取url字符串最后三位
String types=url.substring(url.length()-39, url.length()-36);
this.uuid=url.substring(url.length()-36, url.length());
this.type=types;
this.session = session;
//如果前台传来的是客户 存入 cltSet
//服务端 存入 svr
if(types.equals("svr")){
svrSet.add(this); //加入set中
}else if(types.equals("clt")){
cltSet.add(this); //加入set中
}
addOnlineCount(); //在线数加1
System.out.println("有新连接加入!当前在线人数为" + getOnlineCount()+"\n"+getUuid());
}
/**
* 连接关闭调用的方法
*/
@OnClose
public void onClose(){
cltSet.remove(this); //从set中删除
svrSet.remove(this); //从set中删除
subOnlineCount(); //在线数减1
System.out.println("有一连接关闭!当前在线人数为" + getOnlineCount());
}
/**
* 收到客户端消息后调用的方法
* @param message 客户端发送过来的消息
* @param session 可选的参数
*/
@OnMessage
public void onMessage (String message, Session session) {
System.out.println("来自客户端的消息:" + message);
//群发消息
String types=message.substring(36,39);
//发信人的uuid
String uuids=message.substring(0,36);
//接信人的uuid
String beiUuids=message.substring(message.length()-36,message.length());
if(types.equals("clt")){
for(WebSocketTest itemSvr: svrSet){
if(itemSvr!=null && itemSvr.uuid.equals(beiUuids)){
try {
itemSvr.sendMessage(message.substring(3,message.length()-36)+uuids);
System.out.println(message.substring(3,message.length()-36)+uuids);
} catch (IOException e) {
e.printStackTrace();
continue;
}
}
}
}
//如果传过来的是服务人员 根据选择的uuid 发送消息
if(types.equals("svr")){
for(WebSocketTest itemClt: cltSet){
if(itemClt!=null && itemClt.uuid.equals(beiUuids)){
try {
itemClt.sendMessage(message.substring(3,message.length()-36)+uuids);
System.out.println(message.substring(3,message.length()-36)+uuids);
} catch (IOException e) {
e.printStackTrace();
continue;
}
}
}
}
}
/**
* 发生错误时调用
* @param session
* @param error
*/
@OnError
public void onError(Session session, Throwable error){
System.out.println("发生错误");
error.printStackTrace();
}
/**
* 这个方法与上面几个方法不一样。没有用注解,是根据自己需要添加的方法。
* @param message
* @throws IOException
*/
public void sendMessage(String message) throws IOException{
this.session.getBasicRemote().sendText(message);
//this.session.getAsyncRemote().sendText(message);
}
public static synchronized int getOnlineCount() {
return onlineCount;
}
public static synchronized void addOnlineCount() {
WebSocketTest.onlineCount++;
}
public static synchronized void subOnlineCount() {
WebSocketTest.onlineCount--;
}
public Session getSession() {
return session;
}
public void setSession(Session session) {
this.session = session;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public static void setOnlineCount(int onlineCount) {
WebSocketTest.onlineCount = onlineCount;
}
public static List<WebSocketTest> getCltSet() {
return cltSet;
}
public static void setCltSet(List<WebSocketTest> cltSet) {
WebSocketTest.cltSet = cltSet;
}
public static List<WebSocketTest> getSvrSet() {
return svrSet;
}
public static void setSvrSet(List<WebSocketTest> svrSet) {
WebSocketTest.svrSet = svrSet;
}
}
四》pojo 文件
package com.wskj.app.pojo;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import javax.websocket.OnClose;
import javax.websocket.OnError;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;
@ServerEndpoint("/svr1")
public class WebSocket {
// 静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。
private static int onlineCount = 0;
private static Set<WebSocket> socket = new HashSet<WebSocket>();
private Session session;
private String name;
/**
* 连接建立成功调用的方法
*
* @param session
* 可选的参数。session为与某个客户端的连接会话,需要通过它来给客户端发送数据
*/
@OnOpen
public void onOpen(Session session) {
this.session = session;
socket.add(this); // 加入set中
onlineCount++; // 在线数加1
System.out.println("有新连接加入!当前在线人数为" + onlineCount);
}
/**
* 连接关闭调用的方法
*/
@OnClose
public void onClose() {
socket.remove(this); // 从set中删除
onlineCount--; // 在线数减1
System.out.println("有一连接关闭!当前在线人数为" + onlineCount);
}
/**
* 收到客户端消息后调用的方法
*
* @param message
* 客户端发送过来的消息
* @param session
* 可选的参数
*/
@OnMessage
public void onMessage(String message, Session session) {
System.out.println("来自客户端的消息:" + message);
// 群发消息
for (WebSocket item : socket) {
try {
item.sendMessage(message);
} catch (IOException e) {
e.printStackTrace();
continue;
}
}
}
/**
* 发生错误时调用
* @param session
* @param error
*/
@OnError
public void onError(Session session,Throwable error){
System.out.println("发生错误");
error.printStackTrace();
}
public void sendMessage(String message) throws IOException{
this.session.getBasicRemote().sendText(message);
//this.session.getAsyncRemote().sendText(message);
}
/*
* @OnMessage public void onMessage(String message, Session session) throws
* IOException, InterruptedException {
*
* // 打印出来客户端发来的消息 System.out.println("Received: " + message);
*
* // Send the first message to the client
* session.getAsyncRemote().sendText("这是第一条服务器端的消息");
*
*
* // Send 3 messages to the client every 5 seconds int sentMessages = 0;
* while(sentMessages < 3){ Thread.sleep(5000);
* session.getAsyncRemote().sendText("这是第二条服务器端的消息 "+sentMessages);
* sentMessages++; }
*
* // Send a final message to the client
* session.getAsyncRemote().sendText("这是最后一条服务器端的消息"); }
*/
}
webSocket客服在线交谈的更多相关文章
- js生成qq客服在线代码
说到QQ客服在线代码,随便那么百度谷歌一下就会出来,一般都是 <a target="blank" href="http://wpa.qq.com/msgrd?V=1 ...
- 使用 WPF+ ASP.NET MVC 开发 在线客服系统 (一)
近段时间利用业余时间开发了一套在线客服系统,期间遇到过大大小小不少问题,好在都一一解决,最终效果也还可以,打算写一个系列的文章把开发过程详细的记录下来. 希望能够和更多的开发人员互相交流学习,也希望有 ...
- .net core 和 WPF 开发升讯威在线客服与营销系统:背景和产品介绍
本系列文章详细介绍使用 .net core 和 WPF 开发 升讯威在线客服与营销系统 的过程.本产品已经成熟稳定并投入商用. 在线演示环境:https://kf-m.shengxunwei.com ...
- .net core 和 WPF 开发升讯威在线客服与营销系统:系统总体架构
本系列文章详细介绍使用 .net core 和 WPF 开发 升讯威在线客服与营销系统 的过程.本产品已经成熟稳定并投入商用. 在线演示环境:https://kf.shengxunwei.com 注意 ...
- 纯js客服插件集qq、旺旺、skype、百度hi、msn
原文 纯js客服插件集qq.旺旺.skype.百度hi.msn 客服插件,集qq.旺旺.skype.百度hi.msn 等 即时通讯工具,并可自己添加支持的通讯工具,极简主义,用法自己琢磨.我的博客 h ...
- [入门到吐槽系列] 微信小程序 敏感违规图片检测 mediaCheckAsync,客服接口 消息推送 的各种坑分享!
前言: 最近需要做个用户上传图片,服务端校验图片问题的需求.需要使用小程序消息推送,异步接受腾讯的图片验证回调.实在太多坑了. 相信10分钟看完本文的朋友,可以非常顺利避坑. 前期准备: 首先需要一个 ...
- .net core 和 WPF 开发升讯威在线客服与营销系统:使用 WebSocket 实现访客端通信
本系列文章详细介绍使用 .net core 和 WPF 开发 升讯威在线客服与营销系统 的过程.本产品已经成熟稳定并投入商用. 在线演示环境:https://kf.shengxunwei.com 注意 ...
- QQ,MSN,Skype在线客服代码
QQ,MSN,Skype在线客服代码 在网站建设时,为了更好的实施网站的营销型,会用到QQ,MSN等在线交流,以便客户能够快捷方便的联系我们.在这里,提供QQ,MSN的在线客服代码给大家分享: 1.Q ...
- .net core 和 WPF 开发升讯威在线客服与营销系统:实现对 IE8 的完全完美支持 【干货】
本系列文章详细介绍使用 .net core 和 WPF 开发 升讯威在线客服与营销系统 的过程.本产品已经成熟稳定并投入商用. 在线演示环境:https://kf.shengxunwei.com 注意 ...
随机推荐
- hdu poj KMP简单题目总结
hdu 3336 题意:输入一个字符串求每个前缀在串中出现的次数和 sol:只要稍微理解下next 数组的含义就知道只要把每个有意义的next值得个数加起来即可 PS:网上有dp解法orz,dp[i] ...
- VScode输出中文乱码的解决方法------测试过可以用
用python写个爬虫,配置个VScode环境,发现输出都是乱码,翻阅网站后发现一个简单有效的方法,在此谢过网络上的大牛们的无私分享,我也在此记录一下,以备后用: 文件---->首选项----& ...
- 洛谷——P1255 数楼梯
题目描述 楼梯有N阶,上楼可以一步上一阶,也可以一步上二阶. 编一个程序,计算共有多少种不同的走法. 输入输出格式 输入格式: 一个数字,楼梯数. 输出格式: 走的方式几种. 输入输出样例 输入样例# ...
- BAT经典面试题,深入理解Java内存模型JMM
Java 内存模型 Java 内存模型(JMM)是一种抽象的概念,并不真实存在,它描述了一组规则或规范,通过这组规范定义了程序中各个变量(包括实例字段.静态字段和构成数组对象的元素)的访问方式.试图屏 ...
- - > 动规讲解基础讲解七——最长单增子序列
(LIS Longest Increasing Subsequence)给定一个数列,从中删掉任意若干项剩余的序列叫做它的一个子序列,求它的最长的子序列,满足子序列中的元素是单调递增的. 例如给定序列 ...
- yum 源本地化 (one)
First of all, you need to prepare the rpm packages, we can download them with yum command, in that w ...
- POJ 1386 Play on Words(有向欧拉通路 连通图)
题意 见下方中文翻译 每一个单词能够看成首尾两个字母相连的一条边 然后就是输入m条边 推断是否能构成有向欧拉通路了 有向图存在欧拉通路的充要条件: 1. 有向图的基图连通: 2. 全部点的出度和 ...
- ubuntu 建立加密分區及其安全刪除
加密分區1: sudo apt-get install cryptsetup2: 用“磁盤實用工具“,建立新的分區 或者 格式化現有分區,且勾選“加密底層設備“,按提示設定密碼3:同時選擇加密條件:i ...
- Xsolla带你走进印度移动游戏市场
作为世界上人口第二大国的印度.随着移动时代的到来,越来越多的开发人员将目光瞄准了这个国家.今天Xsolla就带领大家一起来了解这样一个新兴的移动游戏市场. 印度移动市场潜力巨大 作为世界四大宗教和数字 ...
- AngularJS入门学习
初识: {{}} 这种双层花括号的语法称之为:插值语法:也可以说是 标识符:AngularJS 主要就是使用这种方法进行数据绑定 ng-module="name" 在ng的 ...