RightBar.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. <template>
  2. <div>
  3. <div class="right-bar">
  4. <ul class="right-bar-center">
  5. <li class="right-bar-item" v-show="storeStatus && storeStatus.uuid">
  6. <a @click="goShop" class="title" target="_blank">
  7. <i class="iconfont icon-dianpu icon-xlg"></i>
  8. </a>
  9. <div class="sidebar-menu"><a @click="goShop" title="我的店铺" target="_blank">我的店铺</a></div>
  10. </li>
  11. <li class="right-bar-item" @mouseenter="loadCarCount()" id="shopCar">
  12. <a @click="goCart" class="title" target="_blank">
  13. <i class="iconfont icon-shopping-cart icon-xlg"></i>
  14. </a>
  15. <div class="sidebar-menu"><a @click="goCart" title="我的购物车" target="_blank">我的购物车<em><span>(<span v-text="cartCount.count || 0"></span>)</span></em></a></div>
  16. </li>
  17. <li class="right-bar-item">
  18. <a @click="dialogVisible = true" class="title">
  19. <i class="iconfont icon-liuyan icon-xlg"></i>
  20. <div class="sidebar-menu"><a title="留言板" target="_blank">留言板</a></div>
  21. </a>
  22. </li>
  23. <li class="right-bar-item contact-menu">
  24. <a href="http://wpa.qq.com/msgrd?v=3&uin=3432892085&site=www.ubtoc.com&menu=yes" target="_blank" class="title">
  25. <i class="iconfont icon-kefu icon-xlg"></i>
  26. </a>
  27. <div class="contact-us sidebar-menu">
  28. <p>在线客服:<img src="/images/all/songguo.png" /><a href="http://wpa.qq.com/msgrd?v=3&uin=3432892085&site=www.ubtoc.com&menu=yes" class="contact-btn" target="_blank">联系客服</a></p>
  29. <p>服务电话:400-830-1818</p>
  30. <p>服务邮箱:yrsc@usoftchina.com</p>
  31. <p>工作时间:</p>
  32. <p>周一至周五 9:00-18:00</p>
  33. </div>
  34. </li>
  35. <!-- <li class="right-bar-item contact-menu">
  36. <a href="javascript:void(0)" class="title" @click="goWebChat">
  37. <i class="fa fa-comments-o" aria-hidden="true" style="color: #FFFFFF;">
  38. </i>
  39. <i class="remind-point" v-if="user.logged && chatCount>0"></i>
  40. </a>
  41. <div class="sidebar-menu" title="优软互联"><a @click="goWebChat">优软互联<span v-if="user.logged">({{chatCount}})</span></a></div>
  42. </li>-->
  43. </ul>
  44. <ul class="right-bar-bottom">
  45. <li class="right-bar-item" @mouseenter="loadHistorys()">
  46. <a @click="goHistory" class="title" target="_blank">
  47. <i class="iconfont icon-zuji icon-xlg"></i>
  48. </a>
  49. <div class="sidebar-menu" v-if="!user.logged"><a @click="goHistory" title="浏览记录">浏览记录</a></div>
  50. <div class="sidebar-menu" v-if="user.logged && listMe(history).length == 0"><a href="/user#/browsingHistory" title="浏览记录">浏览记录</a></div>
  51. <div class="foot-record sidebar-menu" v-if="user.logged && listMe(history).length > 0">
  52. <h3><a href="/user#/browsingHistory">浏览历史</a></h3>
  53. <dl>
  54. <dd v-for="item in listMe(history)">
  55. <a :href="'/store/productDetail/' + item.batchCode" target="_blank" :title="item.code" v-text="item.code" v-if="item.status== 1"></a>
  56. <a :title="item.code" v-text="item.code" v-if="item.status== 0" disabled="disabled"></a>
  57. <div class="hover-shows">
  58. <em :class="{ 'off' : item.status== 0}"></em>
  59. <span :class="{ 'off' : item.status== 0}">失效</span>
  60. <a @click="deleteHistory(item,item.id)">&times;</a>
  61. </div>
  62. </dd>
  63. </dl>
  64. </div>
  65. </li>
  66. <li class="right-bar-item">
  67. <a @click="toTop()" class="title">
  68. <i class="iconfont icon-arrow-up icon-xlg"></i>
  69. </a>
  70. <div class="sidebar-menu"><a @click="toTop()" title="返回顶部" target="_blank">返回顶部</a></div>
  71. </li>
  72. </ul>
  73. </div>
  74. <el-dialog class="dialog"
  75. v-if="dialogVisible"
  76. :visible.sync="dialogVisible"
  77. size="tiny">
  78. <message-board @pageEvent="listenPage" @openBoardEvent="listenOpen"/>
  79. </el-dialog>
  80. <div class="ball-container">
  81. <div v-for="(ball, index) in balls">
  82. <transition name="drop" v-on:before-enter="beforeEnter" v-on:enter="enter" v-on:after-enter="afterEnter">
  83. <div class="ball" v-show="ball.show">
  84. <div class="inner inner-hook"></div>
  85. </div>
  86. </transition>
  87. </div>
  88. </div>
  89. </div>
  90. </template>
  91. <script>
  92. function handler() {}
  93. function whichTransitionEvent() {
  94. let t,
  95. el = document.createElement('surface'),
  96. transitions = {
  97. 'transition': 'transitionend',
  98. 'OTransition': 'oTransitionEnd',
  99. 'MozTransition': 'transitionend',
  100. 'WebkitTransition': 'webkitTransitionEnd'
  101. }
  102. for (t in transitions) {
  103. if (el.style[t] !== undefined) {
  104. return transitions[t]
  105. }
  106. }
  107. }
  108. import { scrollTo } from '~utils/scroll'
  109. import MessageBoard from '~components/default/MessageBoard.vue'
  110. export default {
  111. name: 'right-bar',
  112. data () {
  113. return {
  114. historyLength: [],
  115. dialogVisible: false,
  116. page: 1,
  117. count: 3,
  118. currentPage: 1,
  119. chatCount: 0,
  120. showMyshop: false,
  121. balls: [
  122. {
  123. show: false
  124. },
  125. {
  126. show: false
  127. },
  128. {
  129. show: false
  130. },
  131. {
  132. show: false
  133. },
  134. {
  135. show: false
  136. }
  137. ],
  138. dropBalls: []
  139. }
  140. },
  141. components: {
  142. MessageBoard
  143. },
  144. computed: {
  145. user () {
  146. // console.log(this.$store.state.option)
  147. return this.$store.state.option.user
  148. },
  149. cartCount () {
  150. return this.$store.state.user.history.cartCount.data
  151. },
  152. history () {
  153. let arr = this.$store.state.user.history.historyList.data.slice(0, 8)
  154. return arr
  155. },
  156. enterprise () {
  157. let ens = this.user.data.enterprises
  158. if (ens && ens.length) {
  159. return ens.find(item => item.current) || {enName: this.user.data.userName + '(个人账户)'}
  160. } else {
  161. return {enName: this.user.data.userName + '(个人账户)'}
  162. }
  163. },
  164. tab () {
  165. return this.$store.state.chat.tab.tab.data
  166. },
  167. storeStatus () {
  168. return this.$store.state.option.storeStatus.data
  169. }
  170. },
  171. methods: {
  172. drop(el) {
  173. for (let i = 0; i < this.balls.length; i++) {
  174. let ball = this.balls[i]
  175. if (!ball.show) {
  176. ball.show = true
  177. ball.el = el
  178. this.dropBalls.push(ball)
  179. return
  180. }
  181. }
  182. },
  183. beforeEnter(el) {
  184. let count = this.balls.length
  185. while (count--) {
  186. let ball = this.balls[count]
  187. if (ball.show) {
  188. // setTimeout(() => {
  189. let rect = ball.el.getBoundingClientRect()
  190. let x = -(rect.right - rect.left + 56)
  191. // window.innerHeight * 0.6 - rect.top - rect.height
  192. let y = -(window.innerHeight * 0.6 - rect.top)
  193. el.style.display = ''
  194. if (y > 0) {
  195. el.style.transition = 'all 0.4s cubic-bezier(0,.79,.66,1.42)'
  196. } else {
  197. el.style.transition = 'all 0.4s cubic-bezier(0.49,-0.29,0.75, 0.14)'
  198. }
  199. el.style.webkitTransform = `translate3d(0, ${y}px,0)`
  200. el.style.transform = `translate3d(0, ${y}px,0)`
  201. let inner = el.getElementsByClassName('inner-hook')[0]
  202. inner.style.webkitTransform = `translate3d(${x}px, 0, 0)`
  203. inner.style.transform = `translate3d(${x}px,0,0)`
  204. // }, 10)
  205. }
  206. }
  207. },
  208. enter(el, done) {
  209. let rf = el.offsetHeight // 触发浏览器重绘
  210. // 这个地方为什么要写这个句话,才能第一次执行transition的结束动画
  211. this.$nextTick(() => {
  212. el.style.webkitTransform = 'translate3d(0, 0, 0)'
  213. el.style.transform = 'translate3d(0, 0, 0)'
  214. let inner = el.getElementsByClassName('inner-hook')[0]
  215. inner.style.webkitTransform = 'translate3d(0, 0, 0)'
  216. inner.style.transform = 'translate3d(0, 0, 0)'
  217. let transitionEvent = whichTransitionEvent()
  218. transitionEvent && el.addEventListener(transitionEvent, function() {
  219. console.log('动画结束1')
  220. done()
  221. })
  222. })
  223. },
  224. afterEnter(el) {
  225. console.log(this.dropBalls)
  226. // console.log('钩子函数收尾')
  227. let ball = this.dropBalls.shift()
  228. if (ball) {
  229. ball.show = false
  230. el.style.display = 'none'
  231. let $el = document.getElementById('shopCar')
  232. $el.className = $el.className + ' tranScale'
  233. $el.addEventListener('animationend', () => {
  234. let newClass = $el.className.split(' ')
  235. let index = newClass.findIndex(function (value, index, arr) {
  236. return value === 'tranScale'
  237. })
  238. if (index !== -1) {
  239. newClass.splice(index, 1)
  240. $el.className = newClass.join(' ')
  241. }
  242. })
  243. }
  244. },
  245. listenPage: function (p) {
  246. this.page = p
  247. this.$store.dispatch('getMessageBoardInformation', {page: this.page, count: 3})
  248. },
  249. listenOpen: function (flag) {
  250. this.dialogVisible = flag
  251. },
  252. listMe: function (list) {
  253. return list.filter(function (item) {
  254. return item.isDelete === 1
  255. })
  256. },
  257. loadHistorys () {
  258. if (this.user.logged) {
  259. if (!this.history.length) {
  260. this.$store.dispatch('user/loadHistory')
  261. }
  262. }
  263. },
  264. loadCarCount () {
  265. if (this.user.logged) {
  266. if (!this.cartCount.count) {
  267. this.$store.dispatch('user/CarCount')
  268. }
  269. }
  270. },
  271. toTop () {
  272. scrollTo('body', 300)
  273. },
  274. toBottom () {
  275. scrollTo(window.scrollY + window.innerHeight, 300)
  276. },
  277. deleteHistory (item, id) {
  278. this.$store.dispatch('user/deleteHistory', {id: id})
  279. this.$store.dispatch('user/loadHistory')
  280. },
  281. goLogin: function () {
  282. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  283. if (response.data) {
  284. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  285. }
  286. })
  287. },
  288. goHistory: function () {
  289. if (!this.user.logged) {
  290. this.goLogin()
  291. } else {
  292. window.location.href = '/user#/browsingHistory'
  293. }
  294. },
  295. goCart: function () {
  296. if (!this.user.logged) {
  297. this.goLogin()
  298. } else {
  299. window.open('/user#/cart')
  300. }
  301. },
  302. goShop: function () {
  303. window.location.href = `/store/${this.storeStatus.uuid}`
  304. },
  305. goWebChat: function () {
  306. if (!this.user.logged) {
  307. this.goLogin()
  308. } else {
  309. // 获得窗口的垂直位置
  310. let iTop = (window.screen.availHeight - 30 - 780) / 2
  311. // 获得窗口的水平位置
  312. let iLeft = (window.screen.availWidth - 10 - 1030) / 2
  313. if (this.tab.close) {
  314. this.tab.close()
  315. }
  316. let newTab = window.open('', '即时对话框', 'height=750, width=1000, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
  317. newTab.close()
  318. newTab = window.open('', '即时对话框', 'height=750, width=1000, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
  319. this.$store.dispatch('chat/setChatTab', {tab: newTab})
  320. this.$http.get('/basic/enterprise/' + this.enterprise.uu + '/info')
  321. .then(response => {
  322. let obj = {}
  323. obj.enUU = response.data.uu
  324. obj.enterprise = {enUU: response.data.uu, name: response.data.enName}
  325. obj.type = 'LIST'
  326. if (!(/^1\d{10}$/).test(this.user.data.userTel)) {
  327. this.$http.get('/basic/enterprise/' + obj.enUU + '/admin').then(response => {
  328. obj.userPhone = response.data.userTel
  329. this.openWebChat(newTab, obj)
  330. }, err => {
  331. console.log(err)
  332. this.$message.error('暂无卖家管理员手机号!')
  333. })
  334. } else {
  335. obj.userPhone = this.user.data.userTel
  336. this.openWebChat(newTab, obj)
  337. }
  338. }, err => {
  339. console.log(err)
  340. let obj = {}
  341. obj.type = 'LIST'
  342. if (!(/^1\d{10}$/).test(this.user.data.userTel)) {
  343. this.$http.get('/basic/enterprise/' + obj.enUU + '/admin').then(response => {
  344. obj.userPhone = response.data.userTel
  345. this.openWebChat(newTab, obj)
  346. }, err => {
  347. console.log(err)
  348. this.$message.error('暂无卖家管理员手机号!')
  349. })
  350. } else {
  351. obj.userPhone = this.user.data.userTel
  352. this.openWebChat(newTab, obj)
  353. }
  354. })
  355. }
  356. },
  357. openWebChat: function (newTab, obj) {
  358. this.$http.post('https://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
  359. .then(response => {
  360. if (response.data.success) {
  361. newTab.location.href = 'https://im.ubtob.com/chat/visit?gid=' + response.data.content
  362. }
  363. })
  364. },
  365. getChatCount: function () {
  366. if (this.user.logged) {
  367. this.$http.get('https://im.ubtob.com/api/chat/message', {params: {enUU: this.enterprise.uu, operate: 'count_unread', phone: this.user.data.userTel}})
  368. .then(response => {
  369. this.chatCount = response.data.count
  370. })
  371. }
  372. }
  373. }
  374. }
  375. </script>
  376. <style lang="scss" scoped>
  377. @keyframes tranScale{
  378. 0% { transform: scale(1)}
  379. 20% { transform: scale(1.4) }
  380. 40% { transform: scale(1.8) }
  381. 60% { transform: scale(1.4) }
  382. 80% { transform: scale(0.9) }
  383. 100% {transform: scale(1)}
  384. }
  385. .tranScale {
  386. animation: tranScale 0.3s 1 forwards;
  387. }
  388. a[disabled] {
  389. cursor: not-allowed;
  390. }
  391. em,
  392. i {
  393. font-style: inherit;
  394. }
  395. .right-bar ul li {
  396. position: relative;
  397. }
  398. .right-bar ul li .sidebar-menu {
  399. position: absolute;
  400. display: block;
  401. right: -100%;
  402. top: 0px;
  403. bottom: 0;
  404. width: 100px;
  405. line-height: 38px;
  406. height: 38px;
  407. color: #ffffff;
  408. background: #555;
  409. -webkit-transform: translateX(100%);
  410. -moz-transform: translateX(100%);
  411. -ms-transform: translateX(100%);
  412. -o-transform: translateX(100%);
  413. transform: translateX(100%);
  414. -webkit-transition: transform 0.5s;
  415. -moz-transition: transform 0.5s;
  416. -ms-transition: transform 0.5s;
  417. -o-transition: transform 0.5s;
  418. transition: transform 0.5s;
  419. z-index: 19;
  420. }
  421. .right-bar ul li .sidebar-menu a {
  422. background-color: #555555;
  423. }
  424. .right-bar ul li:hover a {
  425. background-color: #555555;
  426. }
  427. .right-bar ul li:hover .sidebar-menu {
  428. display: block;
  429. -webkit-transform: translateX(-72px);
  430. -moz-transform: translateX(-72px);
  431. -ms-transform: translateX(-72px);
  432. -o-transform: translateX(-72px);
  433. transform: translateX(-72px);
  434. }
  435. /*浏览记录*/
  436. .right-bar ul li .foot-record {
  437. /* display: none; */
  438. width: 210px !important;
  439. max-height: 230px;
  440. line-height: 30px;
  441. /* right: 200px;*/
  442. top: inherit;
  443. bottom: -100%;
  444. height: inherit;
  445. /*padding-bottom: 10px;*/
  446. }
  447. .right-bar ul li .foot-record h3 {
  448. line-height: 39px;
  449. border-bottom: #767575 1px solid;
  450. text-align: left;
  451. padding-left: 10px;
  452. width: 96%;
  453. display: inline-block;
  454. margin: 0 auto;
  455. font-size: 12px;
  456. height: 39px;
  457. }
  458. .right-bar ul li .foot-record h3:hover a {
  459. color: #fbb029;
  460. }
  461. .right-bar ul li .foot-record h3 a {
  462. color: #fff;
  463. background-color: inherit;
  464. line-height: 39px;
  465. text-align: left;
  466. }
  467. .right-bar ul li .foot-record dl {
  468. padding-top: 5px;
  469. display: inline-block;
  470. background: #555;
  471. }
  472. .right-bar ul li .foot-record dl,
  473. .right-bar ul li .foot-record dl dd {
  474. width: 100%;
  475. margin: 0 auto;
  476. background: #555;
  477. }
  478. .right-bar ul li .foot-record dl dd {
  479. line-height: 22px;
  480. width: 100%;
  481. display: inline-block;
  482. float: left;
  483. height: 22px;
  484. position: relative;
  485. }
  486. .right-bar ul li .foot-record dl dd a {
  487. display: inline-block;
  488. height: 22px;
  489. padding: 0 10px;
  490. width: 91%;
  491. font-size: 12px;
  492. color: #fff;
  493. line-height: 22px;
  494. white-space: nowrap;
  495. overflow: hidden;
  496. text-overflow: ellipsis;
  497. background: none;
  498. text-align: left;
  499. padding-right: 44px;
  500. }
  501. .right-bar ul li a i {
  502. font-size: 20px;
  503. }
  504. .right-bar .remind-point {
  505. width: 8px;
  506. height: 8px;
  507. display: block;
  508. border-radius: 100%;
  509. background: red;
  510. position: relative;
  511. top: -31px;
  512. right: -21px;
  513. }
  514. .right-bar ul li li a:hover div.foot-record {
  515. display: inline-block !important;
  516. }
  517. .right-bar ul li .foot-record dl dd:hover {
  518. background: #fff;
  519. }
  520. .right-bar ul li .foot-record dl dd:hover a {
  521. color: #333;
  522. }
  523. .right-bar ul li .foot-record dl dd:hover div.hover-shows {
  524. display: inline-block;
  525. }
  526. .right-bar ul li .foot-record dl dd div.hover-shows {
  527. position: absolute;
  528. top: 0;
  529. right: 2px;
  530. max-width: 55px;
  531. line-height: 20px;
  532. padding-right: 0;
  533. z-index: 100;
  534. display: none;
  535. }
  536. .right-bar ul li .foot-record dl dd div.hover-shows span {
  537. display: inline-block;
  538. width: 30px;
  539. height: 20px;
  540. text-align: center;
  541. line-height: 20px;
  542. background: #e04b38;
  543. color: #fff;
  544. border-radius: 5px;
  545. opacity: 0;
  546. margin-top: 1px;
  547. }
  548. .right-bar ul li .foot-record dl dd:first-child {
  549. /* margin-top: 5px;*/
  550. }
  551. .right-bar ul li .foot-record dl dd:last-child {
  552. /* margin-bottom: 10px;*/
  553. }
  554. .right-bar ul li .foot-record dl dd div.hover-shows a {
  555. font-size: 23px;
  556. float: right;
  557. width: 20px;
  558. padding: 0;
  559. text-align: center;
  560. color: #999;
  561. top: -2px;
  562. }
  563. .right-bar ul li .foot-record dl dd div.hover-shows a:hover {
  564. color: #fbb029;
  565. }
  566. .right-bar ul li .foot-record dl dd div.hover-shows em {
  567. display: inline-block;
  568. position: absolute;
  569. width: 0;
  570. height: 0;
  571. border-top: 8px solid transparent;
  572. border-left: 7px solid #fbb029;
  573. border-bottom: 8px solid transparent;
  574. left: -158px;
  575. top: 4px;
  576. }
  577. .right-bar ul li .foot-record dl dd div.hover-shows em.off {
  578. border-left: 8px solid #b2b0b0;
  579. }
  580. .right-bar ul li .foot-record dl dd div.hover-shows span.off {
  581. opacity: 1;
  582. }
  583. /*浏览记录结束*/
  584. .right-bar ul li .contact-us {
  585. /*right: 200px;*/
  586. height: 180px;
  587. padding-top: 10px;
  588. width: 210px;
  589. top: -76px;
  590. }
  591. .right-bar ul li .contact-us p {
  592. line-height: 33px;
  593. text-align: left;
  594. padding-left: 10px;
  595. margin-bottom: 0;
  596. white-space: nowrap;
  597. font-size: 12px;
  598. }
  599. .right-bar ul li .contact-us .contact-btn {
  600. width: 62px;
  601. height: 18px;
  602. line-height: 18px;
  603. background: #ef7f03;
  604. display: inline-block;
  605. text-align: center;
  606. color: #fff;
  607. font-size: 12px;
  608. border-radius: 5px;
  609. padding: 0;
  610. }
  611. .right-bar-item {
  612. width: 36px;
  613. /* height: 38px;*/
  614. }
  615. .right-bar .right-bar-item a.title {
  616. display: inline-block;
  617. width: 36px;
  618. height: 38px;
  619. line-height: 38px;
  620. padding: 0;
  621. }
  622. .right-bar {
  623. position: fixed;
  624. z-index: 1000;
  625. right: 0;
  626. top: 0;
  627. width: 36px;
  628. height: 100%;
  629. .right-bar-center {
  630. position: absolute;
  631. top: 60%;
  632. transform: translateY(-50%);
  633. list-style: none;
  634. padding: 0;
  635. width: 100%;
  636. }
  637. .right-bar-bottom {
  638. position: absolute;
  639. right: 0;
  640. bottom: 0;
  641. width: 36px;
  642. }
  643. .right-bar-item {
  644. a {
  645. position: relative;
  646. display: block;
  647. width: 100%;
  648. color: #fff;
  649. background-color: #5078cb;
  650. text-align: center;
  651. -webkit-transition: background-color ease 0.5s;
  652. -moz-transition: background-color ease 0.5s;
  653. -ms-transition: background-color ease 0.5s;
  654. -o-transition: background-color ease 0.5s;
  655. transition: background-color ease 0.5s;
  656. z-index: 20;
  657. font-size: 12px;
  658. }
  659. }
  660. }
  661. .ball {
  662. position: fixed;
  663. right: 0;
  664. top: 56%;
  665. z-index: 200;
  666. transition: all 0.4s cubic-bezier(0.49,-0.29,0.75, 0.14)
  667. /*transition: all 0.4s cubic-bezier(0,.79,.66,1.42);*/
  668. }
  669. .ball .inner {
  670. width: 16px;
  671. height: 16px;
  672. border-radius: 50%;
  673. background: rgb(0, 160, 220);
  674. transition: all 0.4s linear
  675. }
  676. </style>