不用找了,比較全的signalR例子已經(jīng)為你準備好了.

      網(wǎng)友投稿 599 2025-03-31

      這幾天想著將一個winform的工具上線到web上,因為對時時性的要求比較高,找朋友咨詢了一下推薦了SignlarR 框架,比較強大.昨天才看到,今天研究了一下將里面的例子都拿出來共享.


      官方的參考:http://www.asp.net/signalr/overview/getting-started

      安裝SignalR:?NuGet命令:

      PM> Install-Package Microsoft.AspNet.SignalR

      <————1:與他人聊天:————>

      后臺代碼示例:

      小提示:注意其它的紅色字體部分

      前臺代碼示例:

      1 2 3 4 title> 5 <!--</span><span style="color: #008000;">Script references. </span><span style="color: #008000;">--> 6 <!--</span><span style="color: #008000;">Reference the jQuery library. </span><span style="color: #008000;">--> 7 <script src="Scripts/jquery-1.10.2.min.js">script> 8 <!--</span><span style="color: #008000;">Reference the SignalR library. </span><span style="color: #008000;">--> 9 <script src="Scripts/jquery.signalR-2.0.2.js">script> 10 <!--</span><span style="color: #008000;">Reference the autogenerated SignalR hub script. </span><span style="color: #008000;">--> 11 <script src='signalr/hubs'>script> 12 <!--</span><span style="color: #008000;">Add script to update the page and send messages.</span><span style="color: #008000;">--> 13 <script type='text/javascript'> 14 15 16 $(function () { 17 // Declare a proxy to reference the hub. 18 var chat = $.connection.ViewDataHub; 19 20 21 //init the client function 22 init(chat); 23 24 25 $("#btnclick").click(function () { 26 //Response the information 27 $.connection.hub.start().done(function () { 28 chat.server.hello().done(function (res) { 29 alert(res); 30 })//end of done function 31 })//the end of the $.connection 32 })//end of click function 33 34 35 36 $("#btntalk").click(function () { 37 $.connection.hub.start().done(function () { 38 chat.server.sendMessag($("#txttalk").val()); 39 $("#txttalk").val(""); 40 })//the end of the $.connection 41 42 });//btntalk end 43 44 }) 45 46 47 //init the client method 48 function init(chat) { 49 50 chat.client.talk = function (message) { 51 var talk =" + message + "</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>23</p><p>24</p><p>25</p><p>26</p><p>27</p><p>28</p><p>29</p><p>30</p><p>31</p><p>32</p><p>33</p><p>34</p><p>35</p><p>36</p><p>37</p><p>38</p><p>39</p><p>40</p><p>41</p><p>42</p><p>43</p><p>44</p><p>45</p><p>46</p><p>47</p><p>48</p><p>49</p><p>50</p><p>51</p><p>1 <!DOCTYPE html></p><p>2 <html xmlns="http://www.w3.org/1999/xhtml"></p><p>3 <head></p><p>4???? <title>title></p><p>5???? <!--</span><span style="color: #008000;">Script references. </span><span style="color: #008000;">--></p><p>6???? <!--</span><span style="color: #008000;">Reference the jQuery library. </span><span style="color: #008000;">--></p><p>7???? <script src="Scripts/jquery-1.10.2.min.js">script></p><p>8???? <!--</span><span style="color: #008000;">Reference the SignalR library. </span><span style="color: #008000;">--></p><p>9???? <script src="Scripts/jquery.signalR-2.0.2.js">script></p><p>10???? <!--</span><span style="color: #008000;">Reference the autogenerated SignalR hub script. </span><span style="color: #008000;">--></p><p>11???? <script src='signalr/hubs'>script></p><p>12???? <!--</span><span style="color: #008000;">Add script to update the page and send messages.</span><span style="color: #008000;">--></p><p>13???? <script type='text/javascript'></p><p>14</p><p>15</p><p>16???????? $(function () {</p><p>17???????????? // Declare a proxy to reference the hub.</p><p>18???????????? var chat = $.connection.ViewDataHub;</p><p>19</p><p>20</p><p>21???????????? //init the client function</p><p>22???????????? init(chat);</p><p>23</p><p>24</p><p>25???????????? $("#btnclick").click(function () {</p><p>26???????????????? //Response the information</p><p>27???????????????? $.connection.hub.start().done(function () {</p><p>28???????????????????? chat.server.hello().done(function (res) {</p><p>29???????????????????????? alert(res);</p><p>30???????????????????? })//end of done function</p><p>31???????????????? })//the end of the $.connection</p><p>32???????????? })//end of click function</p><p>33</p><p>34</p><p>35</p><p>36???????????? $("#btntalk").click(function () {</p><p>37???????????????? $.connection.hub.start().done(function () {</p><p>38???????????????????? chat.server.sendMessag($("#txttalk").val());</p><p>39???????????????????? $("#txttalk").val("");</p><p>40???????????????? })//the end of the $.connection</p><p>41</p><p>42???????????? });//btntalk end</p><p>43</p><p>44???????? })</p><p>45</p><p>46</p><p>47???????? //init the client method</p><p>48???????? function init(chat) {</p><p>49</p><p>50???????????? chat.client.talk = function (message) {</p><p>51???????????????? var talk =" + message + "</p><p>1</p><p>View Code</p><p>出現(xiàn)的效果:</p><p>兩個窗口之間的聊天</p><p>我知道你心中肯定有疑問,我也是這樣,當我剛接觸的時候完全搞不懂這是為什么會這樣,我們來回顧一次正常的聊天過程:</p><p>那我們重新拆分以上的方法來證明我們的猜想是否正確</p><p>1 $("#btntalk").click(function () { 2 $.connection.hub.start().done(function () { 3 chat.server.sendMessag($("#txttalk").val()); 4 $("#txttalk").val(""); 5 })//the end of the $.connection 6 7 });//btntalk end</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>1??????????$("#btntalk").click(function () {</p><p>2???????????????? $.connection.hub.start().done(function () {</p><p>3???????????????????? chat.server.sendMessag($("#txttalk").val());</p><p>4???????????????????? $("#txttalk").val("");</p><p>5???????????????? })//the end of the $.connection</p><p>6</p><p>7???????????? });//btntalk end</p><p>chat.server.sendMessage(message) 從客戶端調(diào)用了服務器的方法(服務器扮演的是中轉(zhuǎn)站的角色).</p><p>此時的message 從客戶端A發(fā)送給了服務端</p><p>那服務器就應該有這樣的一個方法與之相對應</p><p>后臺代碼:</p><p>1 //this fucntion will be called by client and the inside function 2 //Clients.Others.talk(message); 3 //will be called by clinet javascript function . 4 public void SendMessag(string message) 5 { 6 Clients.Others.talk(message); 7 }</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>1????//this fucntion will be called by client and the inside function</p><p>2???????? //Clients.Others.talk(message);</p><p>3???????? //will be called by clinet javascript function .</p><p>4???????? public void SendMessag(string message)</p><p>5???????? {</p><p>6???????????? Clients.Others.talk(message);</p><p>7???????? }</p><p>服務端接收到A發(fā)送來的message.</p><p>這個時候服務端將消息推送給客戶端B</p><p>Clients.Others.talk(message);</p><p>這個時候客戶端B應該有一個talk的方法來將消息顯示出來</p><p>1 //init the client method 2 function init(chat) { 3 4 chat.client.talk = function (message) { 5 var talk = "<h1>" + message + "h1>"; 6 7 $("#dvtalk").append(talk); 8 9 } //end regist the client function 10 11 } //end of the initfunction</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>1?? //init the client method</p><p>2???????? function init(chat) {</p><p>3</p><p>4???????????? chat.client.talk = function (message) {</p><p>5???????????????? var talk = "<h1>" + message + "h1>";</p><p>6</p><p>7???????????????? $("#dvtalk").append(talk);</p><p>8</p><p>9???????????? } //end regist the client function</p><p>10</p><p>11???????? } //end of the initfunction</p><p>這個時候客戶端B接收到消息,用Js的方法顯示出來消息. 一次通話就完成了.</p><p><————二,客戶端傳遞參數(shù)給服務端并從服務端得到返回值:————></p><p>前端代碼:</p><p>1 <!DOCTYPE html> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>title> 5 <!--</span><span style="color: #008000;">Script references. </span><span style="color: #008000;">--> 6 <!--</span><span style="color: #008000;">Reference the jQuery library. </span><span style="color: #008000;">--> 7 <script src="Scripts/jquery-1.10.2.min.js">script> 8 <!--</span><span style="color: #008000;">Reference the SignalR library. </span><span style="color: #008000;">--> 9 <script src="Scripts/jquery.signalR-2.0.2.js">script> 10 <!--</span><span style="color: #008000;">Reference the autogenerated SignalR hub script. </span><span style="color: #008000;">--> 11 <script src='signalr/hubs'>script> 12 <!--</span><span style="color: #008000;">Add script to update the page and send messages.</span><span style="color: #008000;">--> 13 <script type='text/javascript'> 14 15 16 $(function () { 17 // Declare a proxy to reference the hub. 18 var chat = $.connection.ViewDataHub; 19 20 21 //init the client function 22 init(chat); 23 24 25 $("#btnclick").click(function () { 26 //Response the information 27 $.connection.hub.start().done(function () { 28 chat.server.hello($("#txttalk").val()).done(function (res) { 29 var talk = "</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>23</p><p>24</p><p>25</p><p>26</p><p>27</p><p>28</p><p>29</p><p>1 <!DOCTYPE html></p><p>2 <html xmlns="http://www.w3.org/1999/xhtml"></p><p>3 <head></p><p>4???? <title>title></p><p>5???? <!--</span><span style="color: #008000;">Script references. </span><span style="color: #008000;">--></p><p>6???? <!--</span><span style="color: #008000;">Reference the jQuery library. </span><span style="color: #008000;">--></p><p>7???? <script src="Scripts/jquery-1.10.2.min.js">script></p><p>8???? <!--</span><span style="color: #008000;">Reference the SignalR library. </span><span style="color: #008000;">--></p><p>9???? <script src="Scripts/jquery.signalR-2.0.2.js">script></p><p>10???? <!--</span><span style="color: #008000;">Reference the autogenerated SignalR hub script. </span><span style="color: #008000;">--></p><p>11???? <script src='signalr/hubs'>script></p><p>12???? <!--</span><span style="color: #008000;">Add script to update the page and send messages.</span><span style="color: #008000;">--></p><p>13???? <script type='text/javascript'></p><p>14</p><p>15</p><p>16???????? $(function () {</p><p>17???????????? // Declare a proxy to reference the hub.</p><p>18???????????? var chat = $.connection.ViewDataHub;</p><p>19</p><p>20</p><p>21???????????? //init the client function</p><p>22???????????? init(chat);</p><p>23</p><p>24</p><p>25???????????? $("#btnclick").click(function () {</p><p>26???????????????? //Response the information</p><p>27???????????????? $.connection.hub.start().done(function () {</p><p>28???????????????????? chat.server.hello($("#txttalk").val()).done(function (res) {</p><p>29???????????????????????? var talk = "</p><p>" + res + "</p><p>1</p><p>" + res + "</p><p>"; 30 31 $("#dvtalk").append(talk); 32 })//end of done function 33 })//the end of the $.connection 34 })//end of click function 35 36 37 38 $("#btntalk").click(function () { 39 $.connection.hub.start().done(function () { 40 chat.server.sendMessag($("#txttalk").val()); 41 $("#txttalk").val(""); 42 })//the end of the $.connection 43 44 });//btntalk end 45 46 }) 47 48 49 //init the client method 50 function init(chat) { 51 52 chat.client.talk = function (message) { 53 var talk = "</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p style="text-align:center"><img src="http://m.bai1xia.com/news/zb_users/cache/ly_autoimg/m/MTg1MjI.jpg" alt="不用找了,比較全的signalR例子已經(jīng)為你準備好了." title="不用找了,比較全的signalR例子已經(jīng)為你準備好了." /></p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>23</p><p>24</p><p>25</p><p>";</p><p>30</p><p>31???????????????????????? $("#dvtalk").append(talk);</p><p>32???????????????????? })//end of done function</p><p>33???????????????? })//the end of the $.connection</p><p>34???????????? })//end of click function</p><p>35</p><p>36</p><p>37</p><p>38???????????? $("#btntalk").click(function () {</p><p>39???????????????? $.connection.hub.start().done(function () {</p><p>40???????????????????? chat.server.sendMessag($("#txttalk").val());</p><p>41???????????????????? $("#txttalk").val("");</p><p>42???????????????? })//the end of the $.connection</p><p>43</p><p>44???????????? });//btntalk end</p><p>45</p><p>46???????? })</p><p>47</p><p>48</p><p>49???????? //init the client method</p><p>50???????? function init(chat) {</p><p>51</p><p>52???????????? chat.client.talk = function (message) {</p><p>53???????????????? var talk = "</p><p>" + message + "</p><p>1</p><p>" + message + "</p><p>"; 54 55 $("#dvtalk").append(talk); 56 57 } //end regist the client function 58 59 } //end of the initfunction 60 61 script> 62 head> 63 <body> 64 <div> 65 <table id="tbtoday">table> 66 <input type="text" id="txttalk" width="150"/> 67 <input type="button" id="btnclick" value="clickme" /> 68 <input type="button" id="btntalk" value="talkwithme" /> 69 <div class="qaocgmk" id="dvtalk"> 70 71 div> 72 div> 73 body> 74 html></p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>";</p><p>54</p><p>55???????????????? $("#dvtalk").append(talk);</p><p>56</p><p>57???????????? } //end regist the client function</p><p>58</p><p>59???????? } //end of the initfunction</p><p>60</p><p>61???? script></p><p>62 head></p><p>63 <body></p><p>64???? <div></p><p>65???????? <table id="tbtoday">table></p><p>66???????? <input type="text" id="txttalk" width="150"/></p><p>67???????? <input type="button" id="btnclick" value="clickme" /></p><p>68???????? <input type="button" id="btntalk" value="talkwithme" /></p><p>69???????? <div class="euuemo2" id="dvtalk"></p><p>70</p><p>71???????? div></p><p>72???? div></p><p>73 body></p><p>74 html></p><p>View Code</p><p>后端代碼:</p><p>1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using Microsoft.AspNet.SignalR; 6 using Microsoft.AspNet.SignalR.Hubs; 7 8 namespace SignalRChat.Hubs.Data 9 { 10 [HubName("ViewDataHub")] 11 public class ViewDataHub : Hub 12 { 13 //this is just called by client and return the value for it . 14 public string Hello(string msg) 15 { 16 17 string res = "sorry ,i don't know"; 18 if (msg.Contains("hello")) 19 { 20 res = "hello ,guy"; 21 } 22 if (msg.Contains("how")) 23 { 24 res = "how are you ~"; 25 } 26 if (msg.Contains("love")) 27 { 28 res = "don't fall in love with me ~"; 29 } 30 return res; 31 } 32 33 34 35 //this fucntion will be called by client and the inside function 36 //Clients.Others.talk(message); 37 //will be called by clinet javascript function . 38 public void SendMessag(string message) 39 { 40 Clients.Others.talk(message); 41 } 42 43 } 44 }</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>23</p><p>24</p><p>25</p><p>26</p><p>27</p><p>28</p><p>29</p><p>30</p><p>31</p><p>32</p><p>33</p><p>34</p><p>35</p><p>36</p><p>37</p><p>38</p><p>39</p><p>40</p><p>41</p><p>42</p><p>43</p><p>44</p><p>1 using System;</p><p>2 using System.Collections.Generic;</p><p>3 using System.Linq;</p><p>4 using System.Web;</p><p>5 using Microsoft.AspNet.SignalR;</p><p>6 using Microsoft.AspNet.SignalR.Hubs;</p><p>7</p><p>8 namespace SignalRChat.Hubs.Data</p><p>9 {</p><p>10???? [HubName("ViewDataHub")]</p><p>11???? public class ViewDataHub : Hub</p><p>12???? {</p><p>13???????? //this is just called by client and return the value for it .</p><p>14???????? public string Hello(string msg)</p><p>15???????? {</p><p>16</p><p>17???????????? string res = "sorry ,i don't know";</p><p>18???????????? if (msg.Contains("hello"))</p><p>19???????????? {</p><p>20???????????????? res = "hello ,guy";</p><p>21???????????? }</p><p>22???????????? if (msg.Contains("how"))</p><p>23???????????? {</p><p>24???????????????? res = "how are you ~";</p><p>25???????????? }</p><p>26???????????? if (msg.Contains("love"))</p><p>27???????????? {</p><p>28???????????????? res = "don't fall in love with me ~";</p><p>29???????????? }</p><p>30???????????? return res;</p><p>31???????? }</p><p>32</p><p>33</p><p>34</p><p>35???????? //this fucntion will be called by client and the inside function</p><p>36???????? //Clients.Others.talk(message);</p><p>37???????? //will be called by clinet javascript function .</p><p>38???????? public void SendMessag(string message)</p><p>39???????? {</p><p>40???????????? Clients.Others.talk(message);</p><p>41???????? }</p><p>42</p><p>43???? }</p><p>44 }</p><p>View Code</p><p>效果圖:</p><p><————三,客戶端刷時時的刷新數(shù)據(jù)————></p><p>前端:</p><p>1 <!DOCTYPE html> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <title>title> 6 <script src="http://m.bai1xia.com/news/zb_users/upload/2022/05/20220530210801_75510.done(function () { 20 21 $("#btnloop").click(function () { 22 chat.server.refresh().done(function (data) { 23 AppendTable(data); 24 })//done end 25 }) //btnloop end 26 27 28 $("#btnclient").click(function () { 29 chat.server.RefreshClients(); 30 }); 31 32 33 $("#btnclick").click(function () { 34 Start(); 35 }); 36 37 38 $("#btnstop").click(function () { 39 Stop(); 40 }); 41 42 }) 43 }) //$function 44 45 46 function Start() { 47 if (loopdo == null) { 48 loopdo = setInterval('$("#btnloop").click()', 1000); 49 } 50 51 } 52 53 function Stop() { 54 if (loopdo != null) { 55 clearInterval(loopdo); 56 } 57 } 58 59 function AppendTable(data) { 60 arr.length = 0; 61 arr.push(" OpendoorPriceOpentiem</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>23</p><p>24</p><p>25</p><p>26</p><p>27</p><p>28</p><p>29</p><p>30</p><p>31</p><p>32</p><p>33</p><p>34</p><p>35</p><p>36</p><p>37</p><p>38</p><p>39</p><p>40</p><p>41</p><p>42</p><p>43</p><p>44</p><p>45</p><p>46</p><p>47</p><p>48</p><p>49</p><p>50</p><p>51</p><p>52</p><p>53</p><p>54</p><p>55</p><p>56</p><p>57</p><p>58</p><p>59</p><p>60</p><p>61</p><p>62</p><p>1 <!DOCTYPE html></p><p>2 <html xmlns="http://www.w3.org/1999/xhtml"></p><p>3 <head></p><p>4???? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></p><p>5???? <title>title></p><p>6???? <script src="http://m.bai1xia.com/news/zb_users/upload/2022/05/20220530210801_70782.").click(function () {</p><p>22???????????????????? chat.server.refresh().done(function (data) {</p><p>23???????????????????????? AppendTable(data);</p><p>24???????????????????? })//done end</p><p>25???????????????? }) //btnloop??end</p><p>26</p><p>27</p><p>28???????????????? $("#btnclient").click(function () {</p><p>29???????????????????? chat.server.RefreshClients();</p><p>30???????????????? });</p><p>31</p><p>32</p><p>33???????????????? $("#btnclick").click(function () {</p><p>34???????????????????? Start();</p><p>35???????????????? });</p><p>36</p><p>37</p><p>38???????????????? $("#btnstop").click(function () {</p><p>39???????????????????? Stop();</p><p>40???????????????? });</p><p>41</p><p>42???????????? })</p><p>43???????? }) //$function</p><p>44</p><p>45</p><p>46???????? function Start() {</p><p>47???????????? if (loopdo == null) {</p><p>48???????????????? loopdo = setInterval('$("#btnloop").click()', 1000);</p><p>49???????????? }</p><p>50</p><p>51???????? }</p><p>52</p><p>53???????? function Stop() {</p><p>54???????????? if (loopdo != null) {</p><p>55???????????????? clearInterval(loopdo);</p><p>56???????????? }</p><p>57???????? }</p><p>58</p><p>59???????? function AppendTable(data) {</p><p>60???????????? arr.length = 0;</p><p>61???????????? arr.push("</p><p>OpendoorPriceOpentiem</p><p>"); 62 $.each(data, function (i) { 63 arr.push(" "); 64 arr.push("?" + data[i].Opendoor + "</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>");</p><p>62???????????? $.each(data, function (i) {</p><p>63???????????????? arr.push("</p><p>");</p><p>64???????????????? arr.push("?" + data[i].Opendoor + "</p><p>"); 65 arr.push("?" + data[i].Price + "</p><p>1</p><p>2</p><p>");</p><p>65???????????????? arr.push("?" + data[i].Price + "</p><p>"); 66 arr.push("?" + data[i].Opentiem + "</p><p>1</p><p>2</p><p>");</p><p>66???????????????? arr.push("?" + data[i].Opentiem + "</p><p>"); 67 arr.push("</p><p>1</p><p>2</p><p>");</p><p>67???????????????? arr.push("</p><p>"); 68 }); 69 $("#tblist").html(arr.join("")); 70 } 71 72 function Init(chat) { 73 chat.client.myrefresh = function (data) { 74 AppendTable(data); 75 } 76 77 } 78 79 script> 80 head> 81 <body> 82 <input type="button" id="btnclick" value="Start" /> 83 84 <input type="button" id="btnloop" value="View" style="display: none" /> 85 86 <input type="button" id="btnstop" value="Stop" /> 87 88 <input type="button" id="btnclient" value="ClientAll" /> 89 <table id="tblist"> 90 table> 91 body> 92 93 94 95 html></p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>23</p><p>24</p><p>25</p><p>26</p><p>27</p><p>28</p><p>29</p><p>");</p><p>68???????????? });</p><p>69???????????? $("#tblist").html(arr.join(""));</p><p>70???????? }</p><p>71</p><p>72???????? function Init(chat) {</p><p>73???????????? chat.client.myrefresh = function (data) {</p><p>74???????????????? AppendTable(data);</p><p>75???????????? }</p><p>76</p><p>77???????? }</p><p>78</p><p>79???? script></p><p>80 head></p><p>81 <body></p><p>82???? <input type="button" id="btnclick" value="Start" /></p><p>83</p><p>84???? <input type="button" id="btnloop" value="View" style="display: none" /></p><p>85</p><p>86???? <input type="button" id="btnstop" value="Stop" /></p><p>87</p><p>88???? <input type="button" id="btnclient" value="ClientAll" /></p><p>89???? <table id="tblist"></p><p>90???? table></p><p>91 body></p><p>92</p><p>93</p><p>94</p><p>95 html></p><p>View Code</p><p>后端:</p><p>1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using Microsoft.AspNet.SignalR; 6 using Microsoft.AspNet.SignalR.Hubs; 7 namespace MyReresh.ViewData 8 { 9 [HubName("viewDataHub")] 10 public class ViewDataHub : Hub 11 { 12 [HubMethodName("refresh")] 13 public List Refresh() 14 { 15 return Stock.GetAll(); 16 } 17 18 [HubMethodName("RefreshClients")] 19 public void RefreshClients() 20 { 21 Clients.All.myrefresh(Stock.GetAll()); 22 } 23 24 25 } 26 27 public class Stock 28 { 29 private string opendoor; 30 31 public string Opendoor 32 { 33 get { return opendoor; } 34 set { opendoor = value; } 35 } 36 37 private double price; 38 39 public double Price 40 { 41 get { return price; } 42 set { price = value; } 43 } 44 45 private DateTime opentiem = System.DateTime.Now; 46 47 public DateTime Opentiem 48 { 49 get { return opentiem; } 50 set { opentiem = value; } 51 } 52 53 54 public static List GetAll() 55 { 56 Random rand = new Random(); 57 List list = new List() 58 { 59 new Stock{Opendoor="Door1",Price=rand.NextDouble()*100}, 60 new Stock{Opendoor="Door2",Price=rand.NextDouble()*100}, 61 new Stock{Opendoor="Door3",Price=rand.NextDouble()*100} 62 }; 63 return list; 64 } 65 66 } 67 }</p><p>1</p><p>2</p><p>3</p><p>4</p><p>5</p><p>6</p><p>7</p><p>8</p><p>9</p><p>10</p><p>11</p><p>12</p><p>13</p><p>14</p><p>15</p><p>16</p><p>17</p><p>18</p><p>19</p><p>20</p><p>21</p><p>22</p><p>23</p><p>24</p><p>25</p><p>26</p><p>27</p><p>28</p><p>29</p><p>30</p><p>31</p><p>32</p><p>33</p><p>34</p><p>35</p><p>36</p><p>37</p><p>38</p><p>39</p><p>40</p><p>41</p><p>42</p><p>43</p><p>44</p><p>45</p><p>46</p><p>47</p><p>48</p><p>49</p><p>50</p><p>51</p><p>52</p><p>53</p><p>54</p><p>55</p><p>56</p><p>57</p><p>58</p><p>59</p><p>60</p><p>61</p><p>62</p><p>63</p><p>64</p><p>65</p><p>66</p><p>67</p><p>1 using System;</p><p>2 using System.Collections.Generic;</p><p>3 using System.Linq;</p><p>4 using System.Web;</p><p>5 using Microsoft.AspNet.SignalR;</p><p>6 using Microsoft.AspNet.SignalR.Hubs;</p><p>7 namespace MyReresh.ViewData</p><p>8 {</p><p>9???? [HubName("viewDataHub")]</p><p>10???? public class ViewDataHub : Hub</p><p>11???? {</p><p>12???????? [HubMethodName("refresh")]</p><p>13???????? public List Refresh()</p><p>14???????? {</p><p>15???????????? return Stock.GetAll();</p><p>16???????? }</p><p>17</p><p>18???????? [HubMethodName("RefreshClients")]</p><p>19???????? public void RefreshClients()</p><p>20???????? {</p><p>21???????????? Clients.All.myrefresh(Stock.GetAll());</p><p>22???????? }</p><p>23</p><p>24</p><p>25???? }</p><p>26</p><p>27???? public class Stock</p><p>28???? {</p><p>29???????? private string opendoor;</p><p>30</p><p>31???????? public string Opendoor</p><p>32???????? {</p><p>33???????????? get { return opendoor; }</p><p>34???????????? set { opendoor = value; }</p><p>35???????? }</p><p>36</p><p>37???????? private double price;</p><p>38</p><p>39???????? public double Price</p><p>40???????? {</p><p>41???????????? get { return price; }</p><p>42???????????? set { price = value; }</p><p>43???????? }</p><p>44</p><p>45???????? private DateTime opentiem = System.DateTime.Now;</p><p>46</p><p>47???????? public DateTime Opentiem</p><p>48???????? {</p><p>49???????????? get { return opentiem; }</p><p>50???????????? set { opentiem = value; }</p><p>51???????? }</p><p>52</p><p>53</p><p>54???????? public static List GetAll()</p><p>55???????? {</p><p>56???????????? Random rand = new Random();</p><p>57???????????? List list = new List()</p><p>58???????????? {</p><p>59???????????????? new Stock{Opendoor="Door1",Price=rand.NextDouble()*100},</p><p>60???????????????? new Stock{Opendoor="Door2",Price=rand.NextDouble()*100},</p><p>61???????????????? new Stock{Opendoor="Door3",Price=rand.NextDouble()*100}</p><p>62???????????? };</p><p>63???????????? return list;</p><p>64???????? }</p><p>65</p><p>66???? }</p><p>67 }</p><p>View Code</p><p>注:本次實現(xiàn)的所謂的時時刷新數(shù)據(jù)和官方提供的Demo有很大的差異,并不是后臺代碼的角度來刷新,而是從前端的角度來實現(xiàn)的。</p><p>====>點我下載DEMO<====</p><p>web前端</p><p> <strong>版權(quán)聲明:本文內(nèi)容由網(wǎng)絡用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔相應法律責任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實后本網(wǎng)站將在24小時內(nèi)刪除侵權(quán)內(nèi)容。</strong> </p><p> <strong>版權(quán)聲明:本文內(nèi)容由網(wǎng)絡用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔相應法律責任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實后本網(wǎng)站將在24小時內(nèi)刪除侵權(quán)內(nèi)容。</strong> </p></div> <div id="auwkoa2" class="article_footer clear"> <div id="g2aqmku" class="fr tag">標簽:<a href="http://m.bai1xia.com/news/tags-7951.html">不用</a> <a href="http://m.bai1xia.com/news/tags-897.html">比較</a> </div> <div id="2uaecq0" class="bdsharebuttonbox fl share"> <div id="0m0ssa0" class="share-widget fl"> <div id="ksgecu2" class="social-share" data-sites="wechat,weibo, qq, qzone"></div> </div> </div> </div> <!-- 廣告位ad4 --> <div id="weeq200" class="post-navigation clear"> <div id="2myymuq" class="post-previous fl"> <span>上一篇:</span><a href="http://m.bai1xia.com/news/post/70708.html">手動刪除<a target="_blank" href="http://m.bai1xia.com/news/tags-1432.html"style="font-weight:bold;">Office</a> 2013或Office 365即點即用安裝的步驟(手動刪除office2016)</a> </div> <div id="aggem2k" class="post-next fr"> <span>下一篇:</span><a href="http://m.bai1xia.com/news/post/11738.html">寧波東海集團入駐華為云市場,助力業(yè)務上云</a> </div> </div> </div> <div id="cqkamqc" class="related_article"> <div id="000esku" class="box_title clear"> <span><i class="icon fa fa-paper-plane"></i>相關文章</span> </div> <div id="ckmqkgc" class="related_list clear"> <article class="fl"> <div id="acgumea" class="related_img"><a href="http://m.bai1xia.com/news/post/75374.html"><img src="http://m.bai1xia.com/news/zb_users/cache/ly_autoimg/n/NzUzNzQ.jpg"></a></div> <div id="sesay2m" class="related_detail"> <h3><a href="http://m.bai1xia.com/news/post/75374.html" title="論文<a target="_blank" href="http://m.bai1xia.com/news/tags-10252.html"style="font-weight:bold;">查重</a>(論文查重怎么改才能降低重復率)">論文<a target="_blank" href="http://m.bai1xia.com/news/tags-10252.html"style="font-weight:bold;">查重</a>(論文查重怎么改才能降低重復率)</a></h3> <div id="aq0mi0e" class="meta"> <span><i class="fa fa-eye"></i>599</span> <span><i class="fa fa-clock-o"></i>2025-03-31</span> </div> </div> </article> <article class="fl"> <div id="cyyeucu" class="related_img"><a href="http://m.bai1xia.com/news/post/67762.html"><img src="http://m.bai1xia.com/news/zb_users/upload/2022/07/20220723174500_95247.png"></a></div> <div id="gwiaeyg" class="related_detail"> <h3><a href="http://m.bai1xia.com/news/post/67762.html" title="全文對照在哪里">全文對照在哪里</a></h3> <div id="020u0qg" class="meta"> <span><i class="fa fa-eye"></i>599</span> <span><i class="fa fa-clock-o"></i>2025-03-31</span> </div> </div> </article> <article class="fl"> <div id="2ew0oya" class="related_img"><a href="http://m.bai1xia.com/news/post/72450.html"><img src="http://m.bai1xia.com/news/zb_users/upload/2023/08/wenzhangerweima.jpg"></a></div> <div id="2imw0aq" class="related_detail"> <h3><a href="http://m.bai1xia.com/news/post/72450.html" title="怎樣核對<a target="_blank" href="http://m.bai1xia.com/news/tags-2286.html"style="font-weight:bold;">兩個</a>表的數(shù)據(jù)(怎么核對兩個表格中的數(shù)據(jù))">怎樣核對<a target="_blank" href="http://m.bai1xia.com/news/tags-2286.html"style="font-weight:bold;">兩個</a>表的數(shù)據(jù)(怎么核對兩個表格中的數(shù)據(jù))</a></h3> <div id="qk20q0q" class="meta"> <span><i class="fa fa-eye"></i>599</span> <span><i class="fa fa-clock-o"></i>2025-03-31</span> </div> </div> </article> </div> </div> <!--<p class="comment-disable sb br mb"><i class="iconfont icon-cry"></i>抱歉,評論功能暫時關閉!</p>--> </div> </div> <div id="o00a00i" class="sidebar"> <div class="e20gkmo" id="推薦文章" class="part clear 推薦文章"> <div id="2mmoi0y" class="top"> <h3 class="title">推薦文章</h3> </div> <div id="gemig20" class="side 推薦文章"><ul><ul class="hot_posts"> <li><h4><a href="http://m.bai1xia.com/news/post/132763.html" title="企業(yè)生產(chǎn)管理是什么,企業(yè)生產(chǎn)管理軟件">企業(yè)生產(chǎn)管理是什么,企業(yè)生產(chǎn)管理軟件</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/136160.html" title="盤點進銷存軟件排行榜前十名">進盤點進銷存軟件排行榜前十名</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/132779.html" title="進銷存系統(tǒng)哪個簡單好用?進銷存系統(tǒng)優(yōu)點">進銷存系統(tǒng)哪個簡單好用?進銷存系統(tǒng)優(yōu)點</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/133648.html" title="工廠生產(chǎn)管理(工廠生產(chǎn)管理流程及制度)">工廠生產(chǎn)管理(工廠生產(chǎn)管理流程及制度)</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/132780.html" title="生產(chǎn)管理軟件,機械制造業(yè)生產(chǎn)管理,制造業(yè)生產(chǎn)過程管理軟件">生產(chǎn)管理軟件,機械制造業(yè)生產(chǎn)管理,制造業(yè)生產(chǎn)過程管理軟件</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/132776.html" title="進銷存軟件和ERP有什么區(qū)別?進銷存與erp軟件理解">進銷存軟件和ERP有什么區(qū)別?進銷存與erp軟件理解</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/132974.html" title="進銷存如何進行庫存管理">進銷存如何進行庫存管理</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/132269.html" title="excel銷售訂單管理系統(tǒng)(銷售訂單錄入系統(tǒng))">如何利用excel制作銷售訂單管理系統(tǒng)?</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/136946.html" title="數(shù)據(jù)庫訂單管理系統(tǒng)有哪些功能?數(shù)據(jù)庫訂單管理系統(tǒng)怎么設計?">數(shù)據(jù)庫訂單管理系統(tǒng)有哪些功能?數(shù)據(jù)庫訂單管理系統(tǒng)怎么設計?</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/132312.html" title="數(shù)據(jù)庫訂單管理系統(tǒng)(訂單系統(tǒng)數(shù)據(jù)流圖)">什么是數(shù)據(jù)庫管理系統(tǒng)?</a></h4></li></ul></ul></div> </div> <div class="k0wgme0" id="divPrevious" class="part clear previous"> <div id="2umcy2i" class="top"> <h3 class="title">最近發(fā)表</h3> </div> <div id="00qa0m0" class="side divPrevious"><ul><li><a title="寵物集市-寵物集市華東、華南、華北排行榜一覽表" href="http://m.bai1xia.com/news/post/157796.html">寵物集市-寵物集市華東、華南、華北排行榜一覽表</a></li> <li><a title="京寵展-2025年時間表" href="http://m.bai1xia.com/news/post/157795.html">京寵展-2025年時間表</a></li> <li><a title="寵物集市在深圳哪里有?時間地址最新消息" href="http://m.bai1xia.com/news/post/157794.html">寵物集市在深圳哪里有?時間地址最新消息</a></li> <li><a title="亞洲寵物展2025年展會介紹" href="http://m.bai1xia.com/news/post/157793.html">亞洲寵物展2025年展會介紹</a></li> <li><a title="京寵展信息指南" href="http://m.bai1xia.com/news/post/157792.html">京寵展信息指南</a></li> <li><a title="寵物展會2025年時間表" href="http://m.bai1xia.com/news/post/157791.html">寵物展會2025年時間表</a></li> <li><a title="亞寵展、全球?qū)櫸锂a(chǎn)業(yè)風向標——亞洲寵物展覽會深度解析" href="http://m.bai1xia.com/news/post/157790.html">亞寵展、全球?qū)櫸锂a(chǎn)業(yè)風向標——亞洲寵物展覽會深度解析</a></li> <li><a title="2025年亞洲寵物展覽會、京寵展有哪些亮點" href="http://m.bai1xia.com/news/post/157789.html">2025年亞洲寵物展覽會、京寵展有哪些亮點</a></li> <li><a title="<a target="_blank" href="http://m.bai1xia.com/news/tags-10262.html"style="font-weight:bold;">wps</a>演示添加自定義按鈕<a target="_blank" href="http://m.bai1xia.com/news/tags-823.html"style="font-weight:bold;">設置</a>動作改變按順序播放" href="http://m.bai1xia.com/news/post/118206.html"><a target="_blank" href="http://m.bai1xia.com/news/tags-10262.html"style="font-weight:bold;">wps</a>演示添加自定義按鈕<a target="_blank" href="http://m.bai1xia.com/news/tags-823.html"style="font-weight:bold;">設置</a>動作改變按順序播放</a></li> <li><a title="如何將<a target="_blank" href="http://m.bai1xia.com/news/tags-13007.html"style="font-weight:bold;">WPS</a>行中的文本調(diào)整到行中" href="http://m.bai1xia.com/news/post/119027.html">如何將<a target="_blank" href="http://m.bai1xia.com/news/tags-13007.html"style="font-weight:bold;">WPS</a>行中的文本調(diào)整到行中</a></li> </ul></div> </div> <div class="ey2aqyg" id="sidebar_ad" class="part clear sidebar_ad"> <div id="osse00u" class="part sidebar_ad"></div> </div> <div class="uayagqw" id="hot_posts" class="part clear hot_posts"> <div id="soy0q02" class="top"> <h3 class="title">熱評文章</h3> </div> <ul class="hot_posts"><li><h4><a href="http://m.bai1xia.com/news/post/104011.html" title="<a target="_blank" href="http://m.bai1xia.com/news/tags-10179.html"style="font-weight:bold;">零代碼</a>開發(fā)是什么?2022<a target="_blank" href="http://m.bai1xia.com/news/tags-1.html"style="font-weight:bold;">低代碼</a>平臺排行榜">零代碼開發(fā)是什么?2022低代碼平臺排行榜</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/131019.html" title="智能<a target="_blank" href="http://m.bai1xia.com/news/tags-14329.html"style="font-weight:bold;">進銷存庫存管理</a><a target="_blank" href="http://m.bai1xia.com/news/tags-56.html"style="font-weight:bold;">系統(tǒng)</a>(智慧進銷存)">智能進銷存庫存管理系統(tǒng)(智慧進銷存)</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/73907.html" title="<a target="_blank" href="http://m.bai1xia.com/news/tags-14095.html"style="font-weight:bold;">在線文檔</a>哪家強?8款在線文檔編輯軟件推薦">在線文檔哪家強?8款在線文檔編輯軟件推薦</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/102663.html" title="WPS2016怎么繪制簡單的價格表?">WPS2016怎么繪制簡單的價格表?</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/143685.html" title="定制家居數(shù)字化管理模式:提升品質(zhì)、智能化和個性化的未來">定制家居數(shù)字化管理模式:提升品質(zhì)、智能化和個性化的未</a></h4></li><li><h4><a href="http://m.bai1xia.com/news/post/144333.html" title="智能定制家居管理系統(tǒng):重新定義家庭生活方式">智能定制家居管理系統(tǒng):重新定義家庭生活方式</a></h4></li></ul> </div> <div class="iqqe2mw" id="divLinkage" class="part clear link"> <div id="usgqc0a" class="top"> <h3 class="title">友情鏈接</h3> </div> <div id="we2gqya" class="side divLinkage"><ul><li id="qg2qwim" class="link-item"><a href="http://m.bai1xia.com/" target="_blank" title="伙伴云">伙伴云</a></li><li id="4suuwsa" class="link-item"><a href="http://m.bai1xia.com/news/category-19.html" title="進銷存管理">進銷存管理</a></li><li id="auiigmu" class="link-item"><a href="http://m.bai1xia.com/news/category-3.html" title="低代碼">低代碼</a></li><li id="2ii0000" class="link-item"><a href="http://m.bai1xia.com/news/tags-12.html" target="_blank" title="Excel表格">Excel表格</a></li><li id="ig0y20m" class="link-item"><a title="誠鼎網(wǎng)">誠鼎網(wǎng)</a></li><li id="kwcqsam" class="link-item"><a title="FinClip">FinClip</a></li><li id="2kwu0oy" class="link-item"><a title="海特貝利常識網(wǎng)">海特貝利常識網(wǎng)</a></li></ul></div> </div> </div> </div> </section> </div> <footer class="p-footer"> <div id="2wye0gc" class="contant_box"> <div id="wwuigk0" class="discover_tmt"> <h5 class="" style="font-size: 1px; color: white;">伙伴云</h5> <div id="gkoseco" class="text_box"> <a title="toB數(shù)字化營銷SEO" style="font-size: 1px; color: white;">加搜toBSEO</a> <a title="小程序工具" style="font-size: 1px; color: white;">前端框架</a> <a title="小紅書營銷攻略" style="font-size: 1px; color: white;">小紅書營銷攻略</a> <a title="衍因科技" style="font-size: 1px; color: white;">衍因科技</a> <a title="FinClip 技術(shù)文檔" style="font-size: 1px; color: white;">小程序容器幫助中心</a> <a title="小程序開發(fā)行業(yè)洞察" style="font-size: 1px; color: white;">小程序開發(fā)行業(yè)洞察</a> <a title="全面預算管理資訊" style="font-size: 1px; color: white;">全面預算管理資訊</a> <a title="企微SCRM客戶管理干貨" style="font-size: 1px; color: white;">企微SCRM客戶管理干貨</a> <a title="3D視覺相機資訊" style="font-size: 1px; color: white;">3D視覺相機資訊</a> <a title="創(chuàng)冷科技無電制冷" style="font-size: 1px; color: #22292D;">創(chuàng)冷科技無電制冷</a> <a title="協(xié)作機器人資訊" style="font-size: 1px; color: #22292D;">協(xié)作機器人資訊</a> </div> </div> <div id="iu2i0w2" class="collaboration_box"> </div> <div id="y0qgc20" class="we_img_box clear"> <div id="m0aacso" class="img_box"> <img src="http://m.bai1xia.com/news/zb_users/theme/zblog5_news/image/ewm.png" alt="" class="hover_tmt"> </div> </div> </div> <p class="info"> <a target="_blank" rel="nofollow">京ICP備12038259號</a> <span> <a href="#"></a></span> </p> </footer> <div class="iys2ceq" id="backtop" class="backtop"> <div id="y2ai0sm" class="bt-box top"> <i class="fa fa-angle-up fa-2x"></i> </div> </div> <script charset="UTF-8" src="http://m.bai1xia.com/assets/js/sensorsdata.1.22.2.min.js"></script> <script charset="UTF-8"> var sensors = window['sensorsDataAnalytic201505']; sensors.init({ server_url: 'https://saapi.huoban.com/sa?project=production', heatmap:{scroll_notice_map:'not_collect'}, use_client_time:true, send_type:'beacon' }); sensors.quick('autoTrack'); </script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?6444c045836d6bf27124085a4f62c2a8"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script> (()=>{const e="https://analyze.jiasou.cc/api/v1/page_view/report/",n="9fe06d4884e0461caaa1de5651164d43";let t=null;const o=new Proxy({},{get:(e,n)=>localStorage.getItem(window.btoa(n)),set:(e,n,t)=>!!t&&(localStorage.setItem(window.btoa(n),t),!0)});new Promise((t=>{if(o.fingerprint)t();else{const a=function(){var e={};if(e.userAgent=navigator.userAgent||"",e.plugins=[],navigator.plugins&&navigator.plugins.length>0)for(var n=0;n<navigator.plugins.length;n++){var t={name:navigator.plugins[n].name||"",filename:navigator.plugins[n].filename||"",description:navigator.plugins[n].description||""};e.plugins.push(t)}e.languages=navigator.languages||[navigator.language||""],e.timezone=(new Date).getTimezoneOffset(),e.screenResolution={width:window.screen.width||0,height:window.screen.height||0,pixelDepth:window.screen.pixelDepth||0,colorDepth:window.screen.colorDepth||0};var o=document.createElement("canvas").getContext("2d"),a=[],i=["monospace","sans-serif","serif"];for(n=0;n<i.length;n++){var r=i[n];o.font="12px "+r,o.measureText("abcdefghijklmnopqrstuvwxyz0123456789").width>0&&a.push(r)}return e.fonts=a,e.cookieEnabled=navigator.cookieEnabled||!1,e.localStorage=void 0!==window.localStorage,e.sessionStorage=void 0!==window.sessionStorage,e.doNotTrack="1"===navigator.doNotTrack||"1"===window.doNotTrack||"1"===navigator.msDoNotTrack||"yes"===navigator.doNotTrack,e}();fetch(`${e}u/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:n,f:window.btoa(JSON.stringify(a))})}).then((e=>{console.debug("browser fingerprint sent"),200===e.status&&e.json().then((e=>{console.debug("browser fingerprint received",e),o.fingerprint=e.fp,t()}))}))}})).then((()=>{e&&o.fingerprint&&fetch(e+`?${new URLSearchParams({token:n}).toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({c:window.btoa(JSON.stringify({u:o.fingerprint,l:window.location.href,r:document.referrer}))})}).then((e=>{200==e.status&&e.json().then((e=>{e.track_id&&(t=e.track_id)}))}))})),window.addEventListener("beforeunload",(async n=>{t&&fetch(e+`?${new URLSearchParams({track_id:t}).toString()}`,{method:"GET",headers:{"Content-Type":"text/plain"},keepalive:!0}),n.returnValue=""}))})(); </script><script language="javascript" src="http://m.bai1xia.com/news/zb_users/plugin/ZF_ad/js/index.js?id=360"></script> <script language="javascript" src="http://m.bai1xia.com/news/zb_users/plugin/ZF_ad/js/ZF_ad__cookie.js"></script> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.bai1xia.com/" title="日本亚洲中午字幕乱码">日本亚洲中午字幕乱码</a> <div class="friend-links"> </div> </div> </footer> <a href="http://" target="_blank">亚洲国产精品张柏芝在线观看</a>| <a href="http://" target="_blank">亚洲人成无码网站</a>| <a href="http://" target="_blank">国产亚洲一区二区三区在线不卡 </a>| <a href="http://" target="_blank">亚洲成?v人片天堂网无码</a>| <a href="http://" target="_blank">国产精品亚洲精品青青青</a>| <a href="http://" target="_blank">亚洲中文字幕人成乱码</a>| <a href="http://" target="_blank">亚洲无线一二三四区</a>| <a href="http://" target="_blank">亚洲熟妇av一区</a>| <a href="http://" target="_blank">亚洲性无码av在线</a>| <a href="http://" target="_blank">亚洲国产品综合人成综合网站</a>| <a href="http://" target="_blank">亚洲视频在线观看地址</a>| <a href="http://" target="_blank">久久精品国产亚洲av高清漫画 </a>| <a href="http://" target="_blank">亚洲一日韩欧美中文字幕在线</a>| <a href="http://" target="_blank">亚洲一级毛片中文字幕</a>| <a href="http://" target="_blank">中中文字幕亚洲无线码</a>| <a href="http://" target="_blank">亚洲国产日韩视频观看</a>| <a href="http://" target="_blank">亚洲字幕AV一区二区三区四区</a>| <a href="http://" target="_blank">中文日韩亚洲欧美制服</a>| <a href="http://" target="_blank">亚洲国产日韩a在线播放</a>| <a href="http://" target="_blank">亚洲av乱码中文一区二区三区</a>| <a href="http://" target="_blank">亚洲日韩AV一区二区三区中文 </a>| <a href="http://" target="_blank">亚洲精品无码高潮喷水A片软</a>| <a href="http://" target="_blank">亚洲第一第二第三第四第五第六 </a>| <a href="http://" target="_blank">婷婷亚洲综合五月天小说 </a>| <a href="http://" target="_blank">国产精品亚洲精品久久精品</a>| <a href="http://" target="_blank">小说专区亚洲春色校园</a>| <a href="http://" target="_blank">亚洲高清无码在线观看</a>| <a href="http://" target="_blank">久久精品国产亚洲5555</a>| <a href="http://" target="_blank">亚洲国产美女精品久久久久∴</a>| <a href="http://" target="_blank">精品亚洲综合久久中文字幕</a>| <a href="http://" target="_blank">亚洲爆乳无码专区</a>| <a href="http://" target="_blank">麻豆亚洲av熟女国产一区二</a>| <a href="http://" target="_blank">亚洲国产精品专区</a>| <a href="http://" target="_blank">亚洲欧美aⅴ在线资源</a>| <a href="http://" target="_blank">色偷偷亚洲男人天堂</a>| <a href="http://" target="_blank">亚洲午夜精品第一区二区8050</a>| <a href="http://" target="_blank">亚洲午夜未满十八勿入网站2</a>| <a href="http://" target="_blank">久久久久亚洲精品成人网小说 </a>| <a href="http://" target="_blank">亚洲美女aⅴ久久久91</a>| <a href="http://" target="_blank">亚洲av永久无码精品天堂久久</a>| <a href="http://" target="_blank">亚洲人成无码网站在线观看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body><div id="ouysm" class="pl_css_ganrao" style="display: none;"><dl id="ouysm"></dl><ul id="ouysm"></ul><xmp id="ouysm"></xmp><input id="ouysm"><tbody id="ouysm"><pre id="ouysm"></pre></tbody></input><tr id="ouysm"><rt id="ouysm"><code id="ouysm"></code></rt></tr><abbr id="ouysm"><kbd id="ouysm"><center id="ouysm"></center></kbd></abbr><ul id="ouysm"><pre id="ouysm"><wbr id="ouysm"></wbr></pre></ul><abbr id="ouysm"></abbr><pre id="ouysm"><wbr id="ouysm"><th id="ouysm"></th></wbr></pre><option id="ouysm"></option><nav id="ouysm"></nav><bdo id="ouysm"></bdo><center id="ouysm"></center><tbody id="ouysm"><source id="ouysm"><strong id="ouysm"></strong></source></tbody><small id="ouysm"></small><delect id="ouysm"><tr id="ouysm"><rt id="ouysm"></rt></tr></delect><source id="ouysm"></source><em id="ouysm"><del id="ouysm"><dfn id="ouysm"></dfn></del></em><tfoot id="ouysm"><input id="ouysm"><tbody id="ouysm"></tbody></input></tfoot><rt id="ouysm"></rt><tr id="ouysm"></tr><li id="ouysm"><center id="ouysm"><wbr id="ouysm"></wbr></center></li><pre id="ouysm"></pre><kbd id="ouysm"></kbd><dl id="ouysm"></dl><pre id="ouysm"></pre><kbd id="ouysm"></kbd><ul id="ouysm"><pre id="ouysm"><wbr id="ouysm"></wbr></pre></ul><menu id="ouysm"><noscript id="ouysm"><option id="ouysm"></option></noscript></menu><small id="ouysm"></small><abbr id="ouysm"></abbr><wbr id="ouysm"></wbr><small id="ouysm"></small><nav id="ouysm"></nav><nav id="ouysm"></nav><dd id="ouysm"><strike id="ouysm"><menu id="ouysm"></menu></strike></dd><option id="ouysm"></option><tbody id="ouysm"><object id="ouysm"><strong id="ouysm"></strong></object></tbody><dd id="ouysm"><cite id="ouysm"><nav id="ouysm"></nav></cite></dd><noframes id="ouysm"><samp id="ouysm"><pre id="ouysm"></pre></samp></noframes><abbr id="ouysm"><pre id="ouysm"><blockquote id="ouysm"></blockquote></pre></abbr><small id="ouysm"></small><pre id="ouysm"></pre><center id="ouysm"></center><dl id="ouysm"></dl><optgroup id="ouysm"></optgroup><option id="ouysm"></option><fieldset id="ouysm"><table id="ouysm"><del id="ouysm"></del></table></fieldset><dd id="ouysm"><strike id="ouysm"><menu id="ouysm"></menu></strike></dd><wbr id="ouysm"><cite id="ouysm"><nav id="ouysm"></nav></cite></wbr><button id="ouysm"><ul id="ouysm"><tbody id="ouysm"></tbody></ul></button><tbody id="ouysm"></tbody><pre id="ouysm"></pre><delect id="ouysm"><strike id="ouysm"><s id="ouysm"></s></strike></delect><kbd id="ouysm"></kbd><dl id="ouysm"></dl><tr id="ouysm"></tr><blockquote id="ouysm"></blockquote><xmp id="ouysm"></xmp><em id="ouysm"><del id="ouysm"><dfn id="ouysm"></dfn></del></em><optgroup id="ouysm"></optgroup><strong id="ouysm"><abbr id="ouysm"><kbd id="ouysm"></kbd></abbr></strong><option id="ouysm"></option><nav id="ouysm"></nav><dl id="ouysm"></dl><strong id="ouysm"></strong><ul id="ouysm"><pre id="ouysm"><wbr id="ouysm"></wbr></pre></ul><kbd id="ouysm"></kbd><dl id="ouysm"></dl><tbody id="ouysm"></tbody><dd id="ouysm"></dd><ul id="ouysm"></ul><noscript id="ouysm"></noscript><em id="ouysm"><delect id="ouysm"><tr id="ouysm"></tr></delect></em><strike id="ouysm"></strike><delect id="ouysm"><tr id="ouysm"><rt id="ouysm"></rt></tr></delect><pre id="ouysm"><center id="ouysm"><dl id="ouysm"></dl></center></pre><blockquote id="ouysm"></blockquote><abbr id="ouysm"></abbr><kbd id="ouysm"></kbd><bdo id="ouysm"></bdo><source id="ouysm"></source><td id="ouysm"><fieldset id="ouysm"><optgroup id="ouysm"></optgroup></fieldset></td><bdo id="ouysm"></bdo><acronym id="ouysm"></acronym><del id="ouysm"></del><dl id="ouysm"></dl><object id="ouysm"></object><code id="ouysm"><optgroup id="ouysm"><tr id="ouysm"></tr></optgroup></code><kbd id="ouysm"></kbd><cite id="ouysm"><menu id="ouysm"><li id="ouysm"></li></menu></cite><fieldset id="ouysm"></fieldset><table id="ouysm"></table><center id="ouysm"></center><cite id="ouysm"></cite><abbr id="ouysm"><pre id="ouysm"><blockquote id="ouysm"></blockquote></pre></abbr><em id="ouysm"><del id="ouysm"><dfn id="ouysm"></dfn></del></em><source id="ouysm"></source><samp id="ouysm"><tbody id="ouysm"><source id="ouysm"></source></tbody></samp><acronym id="ouysm"></acronym><center id="ouysm"><wbr id="ouysm"><cite id="ouysm"></cite></wbr></center><small id="ouysm"></small><pre id="ouysm"></pre><del id="ouysm"></del><td id="ouysm"></td><option id="ouysm"></option><dfn id="ouysm"></dfn><sup id="ouysm"><blockquote id="ouysm"><dl id="ouysm"></dl></blockquote></sup><tbody id="ouysm"></tbody><optgroup id="ouysm"></optgroup><kbd id="ouysm"></kbd><code id="ouysm"></code><center id="ouysm"></center><em id="ouysm"><del id="ouysm"><tr id="ouysm"></tr></del></em><ul id="ouysm"></ul><tr id="ouysm"></tr><dl id="ouysm"></dl><em id="ouysm"><tr id="ouysm"><dfn id="ouysm"></dfn></tr></em><dl id="ouysm"></dl><source id="ouysm"></source><ul id="ouysm"></ul><kbd id="ouysm"></kbd><delect id="ouysm"><strike id="ouysm"><s id="ouysm"></s></strike></delect><xmp id="ouysm"></xmp><button id="ouysm"></button><option id="ouysm"></option><noscript id="ouysm"></noscript><pre id="ouysm"></pre><object id="ouysm"><small id="ouysm"><noframes id="ouysm"></noframes></small></object><th id="ouysm"></th><object id="ouysm"><small id="ouysm"><noframes id="ouysm"></noframes></small></object><source id="ouysm"></source><small id="ouysm"></small><object id="ouysm"><strong id="ouysm"><noframes id="ouysm"></noframes></strong></object><tbody id="ouysm"><object id="ouysm"><small id="ouysm"></small></object></tbody><bdo id="ouysm"></bdo><wbr id="ouysm"><th id="ouysm"><nav id="ouysm"></nav></th></wbr><delect id="ouysm"><dfn id="ouysm"><td id="ouysm"></td></dfn></delect><pre id="ouysm"></pre><cite id="ouysm"></cite><object id="ouysm"><tbody id="ouysm"><button id="ouysm"></button></tbody></object><small id="ouysm"></small><abbr id="ouysm"><sup id="ouysm"><td id="ouysm"></td></sup></abbr><table id="ouysm"><tr id="ouysm"><sup id="ouysm"></sup></tr></table><option id="ouysm"></option><center id="ouysm"></center><dfn id="ouysm"></dfn><small id="ouysm"></small><del id="ouysm"></del><strong id="ouysm"><nav id="ouysm"><kbd id="ouysm"></kbd></nav></strong></div> </html> <!--78.76 ms , 17 queries , 3719kb memory , 0 error-->