RightBar.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  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. done()
  220. })
  221. })
  222. },
  223. afterEnter(el) {
  224. // console.log('钩子函数收尾')
  225. let ball = this.dropBalls.shift()
  226. if (ball) {
  227. ball.show = false
  228. el.style.display = 'none'
  229. let $el = document.getElementById('shopCar')
  230. $el.className = $el.className + ' tranScale'
  231. $el.addEventListener('animationend', () => {
  232. let newClass = $el.className.split(' ')
  233. let index = newClass.findIndex(function (value, index, arr) {
  234. return value === 'tranScale'
  235. })
  236. if (index !== -1) {
  237. newClass.splice(index, 1)
  238. $el.className = newClass.join(' ')
  239. }
  240. })
  241. }
  242. },
  243. listenPage: function (p) {
  244. this.page = p
  245. this.$store.dispatch('getMessageBoardInformation', {page: this.page, count: 3})
  246. },
  247. listenOpen: function (flag) {
  248. this.dialogVisible = flag
  249. },
  250. listMe: function (list) {
  251. return list.filter(function (item) {
  252. return item.isDelete === 1
  253. })
  254. },
  255. loadHistorys () {
  256. if (this.user.logged) {
  257. if (!this.history.length) {
  258. this.$store.dispatch('user/loadHistory')
  259. }
  260. }
  261. },
  262. loadCarCount () {
  263. if (this.user.logged) {
  264. if (!this.cartCount.count) {
  265. this.$store.dispatch('user/CarCount')
  266. }
  267. }
  268. },
  269. toTop () {
  270. scrollTo('body', 300)
  271. },
  272. toBottom () {
  273. scrollTo(window.scrollY + window.innerHeight, 300)
  274. },
  275. deleteHistory (item, id) {
  276. this.$store.dispatch('user/deleteHistory', {id: id})
  277. this.$store.dispatch('user/loadHistory')
  278. },
  279. goLogin: function () {
  280. this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
  281. if (response.data) {
  282. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  283. }
  284. })
  285. },
  286. goHistory: function () {
  287. if (!this.user.logged) {
  288. this.goLogin()
  289. } else {
  290. window.location.href = '/user#/browsingHistory'
  291. }
  292. },
  293. goCart: function () {
  294. if (!this.user.logged) {
  295. this.goLogin()
  296. } else {
  297. window.open('/user#/cart')
  298. }
  299. },
  300. goShop: function () {
  301. window.location.href = `/store/${this.storeStatus.uuid}`
  302. },
  303. goWebChat: function () {
  304. if (!this.user.logged) {
  305. this.goLogin()
  306. } else {
  307. // 获得窗口的垂直位置
  308. let iTop = (window.screen.availHeight - 30 - 780) / 2
  309. // 获得窗口的水平位置
  310. let iLeft = (window.screen.availWidth - 10 - 1030) / 2
  311. if (this.tab.close) {
  312. this.tab.close()
  313. }
  314. let newTab = window.open('', '即时对话框', 'height=750, width=1000, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
  315. newTab.close()
  316. newTab = window.open('', '即时对话框', 'height=750, width=1000, top=' + iTop + ', left=' + iLeft + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
  317. this.$store.dispatch('chat/setChatTab', {tab: newTab})
  318. this.$http.get('/basic/enterprise/' + this.enterprise.uu + '/info')
  319. .then(response => {
  320. let obj = {}
  321. obj.enUU = response.data.uu
  322. obj.enterprise = {enUU: response.data.uu, name: response.data.enName}
  323. obj.type = 'LIST'
  324. if (!(/^1\d{10}$/).test(this.user.data.userTel)) {
  325. this.$http.get('/basic/enterprise/' + obj.enUU + '/admin').then(response => {
  326. obj.userPhone = response.data.userTel
  327. this.openWebChat(newTab, obj)
  328. }, err => {
  329. console.log(err)
  330. this.$message.error('暂无卖家管理员手机号!')
  331. })
  332. } else {
  333. obj.userPhone = this.user.data.userTel
  334. this.openWebChat(newTab, obj)
  335. }
  336. }, err => {
  337. console.log(err)
  338. let obj = {}
  339. obj.type = 'LIST'
  340. if (!(/^1\d{10}$/).test(this.user.data.userTel)) {
  341. this.$http.get('/basic/enterprise/' + obj.enUU + '/admin').then(response => {
  342. obj.userPhone = response.data.userTel
  343. this.openWebChat(newTab, obj)
  344. }, err => {
  345. console.log(err)
  346. this.$message.error('暂无卖家管理员手机号!')
  347. })
  348. } else {
  349. obj.userPhone = this.user.data.userTel
  350. this.openWebChat(newTab, obj)
  351. }
  352. })
  353. }
  354. },
  355. openWebChat: function (newTab, obj) {
  356. this.$http.post('https://im.ubtob.com/api/chat/infos?condition=chat_info', obj)
  357. .then(response => {
  358. if (response.data.success) {
  359. newTab.location.href = 'https://im.ubtob.com/chat/visit?gid=' + response.data.content
  360. }
  361. })
  362. },
  363. getChatCount: function () {
  364. if (this.user.logged) {
  365. this.$http.get('https://im.ubtob.com/api/chat/message', {params: {enUU: this.enterprise.uu, operate: 'count_unread', phone: this.user.data.userTel}})
  366. .then(response => {
  367. this.chatCount = response.data.count
  368. })
  369. }
  370. }
  371. }
  372. }
  373. </script>
  374. <style lang="scss" scoped>
  375. @keyframes tranScale{
  376. 0% { transform: scale(1)}
  377. 20% { transform: scale(1.4) }
  378. 40% { transform: scale(1.8) }
  379. 60% { transform: scale(1.4) }
  380. 80% { transform: scale(0.9) }
  381. 100% {transform: scale(1)}
  382. }
  383. .tranScale {
  384. animation: tranScale 0.3s 1 forwards;
  385. }
  386. a[disabled] {
  387. cursor: not-allowed;
  388. }
  389. em,
  390. i {
  391. font-style: inherit;
  392. }
  393. .right-bar ul li {
  394. position: relative;
  395. }
  396. .right-bar ul li .sidebar-menu {
  397. position: absolute;
  398. display: block;
  399. right: -100%;
  400. top: 0px;
  401. bottom: 0;
  402. width: 100px;
  403. line-height: 38px;
  404. height: 38px;
  405. color: #ffffff;
  406. background: #555;
  407. -webkit-transform: translateX(100%);
  408. -moz-transform: translateX(100%);
  409. -ms-transform: translateX(100%);
  410. -o-transform: translateX(100%);
  411. transform: translateX(100%);
  412. -webkit-transition: transform 0.5s;
  413. -moz-transition: transform 0.5s;
  414. -ms-transition: transform 0.5s;
  415. -o-transition: transform 0.5s;
  416. transition: transform 0.5s;
  417. z-index: 19;
  418. }
  419. .right-bar ul li .sidebar-menu a {
  420. background-color: #555555;
  421. }
  422. .right-bar ul li:hover a {
  423. background-color: #555555;
  424. }
  425. .right-bar ul li:hover .sidebar-menu {
  426. display: block;
  427. -webkit-transform: translateX(-72px);
  428. -moz-transform: translateX(-72px);
  429. -ms-transform: translateX(-72px);
  430. -o-transform: translateX(-72px);
  431. transform: translateX(-72px);
  432. }
  433. /*浏览记录*/
  434. .right-bar ul li .foot-record {
  435. /* display: none; */
  436. width: 210px !important;
  437. max-height: 230px;
  438. line-height: 30px;
  439. /* right: 200px;*/
  440. top: inherit;
  441. bottom: -100%;
  442. height: inherit;
  443. /*padding-bottom: 10px;*/
  444. }
  445. .right-bar ul li .foot-record h3 {
  446. line-height: 39px;
  447. border-bottom: #767575 1px solid;
  448. text-align: left;
  449. padding-left: 10px;
  450. width: 96%;
  451. display: inline-block;
  452. margin: 0 auto;
  453. font-size: 12px;
  454. height: 39px;
  455. }
  456. .right-bar ul li .foot-record h3:hover a {
  457. color: #fbb029;
  458. }
  459. .right-bar ul li .foot-record h3 a {
  460. color: #fff;
  461. background-color: inherit;
  462. line-height: 39px;
  463. text-align: left;
  464. }
  465. .right-bar ul li .foot-record dl {
  466. padding-top: 5px;
  467. display: inline-block;
  468. background: #555;
  469. }
  470. .right-bar ul li .foot-record dl,
  471. .right-bar ul li .foot-record dl dd {
  472. width: 100%;
  473. margin: 0 auto;
  474. background: #555;
  475. }
  476. .right-bar ul li .foot-record dl dd {
  477. line-height: 22px;
  478. width: 100%;
  479. display: inline-block;
  480. float: left;
  481. height: 22px;
  482. position: relative;
  483. }
  484. .right-bar ul li .foot-record dl dd a {
  485. display: inline-block;
  486. height: 22px;
  487. padding: 0 10px;
  488. width: 91%;
  489. font-size: 12px;
  490. color: #fff;
  491. line-height: 22px;
  492. white-space: nowrap;
  493. overflow: hidden;
  494. text-overflow: ellipsis;
  495. background: none;
  496. text-align: left;
  497. padding-right: 44px;
  498. }
  499. .right-bar ul li a i {
  500. font-size: 20px;
  501. }
  502. .right-bar .remind-point {
  503. width: 8px;
  504. height: 8px;
  505. display: block;
  506. border-radius: 100%;
  507. background: red;
  508. position: relative;
  509. top: -31px;
  510. right: -21px;
  511. }
  512. .right-bar ul li li a:hover div.foot-record {
  513. display: inline-block !important;
  514. }
  515. .right-bar ul li .foot-record dl dd:hover {
  516. background: #fff;
  517. }
  518. .right-bar ul li .foot-record dl dd:hover a {
  519. color: #333;
  520. }
  521. .right-bar ul li .foot-record dl dd:hover div.hover-shows {
  522. display: inline-block;
  523. }
  524. .right-bar ul li .foot-record dl dd div.hover-shows {
  525. position: absolute;
  526. top: 0;
  527. right: 2px;
  528. max-width: 55px;
  529. line-height: 20px;
  530. padding-right: 0;
  531. z-index: 100;
  532. display: none;
  533. }
  534. .right-bar ul li .foot-record dl dd div.hover-shows span {
  535. display: inline-block;
  536. width: 30px;
  537. height: 20px;
  538. text-align: center;
  539. line-height: 20px;
  540. background: #e04b38;
  541. color: #fff;
  542. border-radius: 5px;
  543. opacity: 0;
  544. margin-top: 1px;
  545. }
  546. .right-bar ul li .foot-record dl dd:first-child {
  547. /* margin-top: 5px;*/
  548. }
  549. .right-bar ul li .foot-record dl dd:last-child {
  550. /* margin-bottom: 10px;*/
  551. }
  552. .right-bar ul li .foot-record dl dd div.hover-shows a {
  553. font-size: 23px;
  554. float: right;
  555. width: 20px;
  556. padding: 0;
  557. text-align: center;
  558. color: #999;
  559. top: -2px;
  560. }
  561. .right-bar ul li .foot-record dl dd div.hover-shows a:hover {
  562. color: #fbb029;
  563. }
  564. .right-bar ul li .foot-record dl dd div.hover-shows em {
  565. display: inline-block;
  566. position: absolute;
  567. width: 0;
  568. height: 0;
  569. border-top: 8px solid transparent;
  570. border-left: 7px solid #fbb029;
  571. border-bottom: 8px solid transparent;
  572. left: -158px;
  573. top: 4px;
  574. }
  575. .right-bar ul li .foot-record dl dd div.hover-shows em.off {
  576. border-left: 8px solid #b2b0b0;
  577. }
  578. .right-bar ul li .foot-record dl dd div.hover-shows span.off {
  579. opacity: 1;
  580. }
  581. /*浏览记录结束*/
  582. .right-bar ul li .contact-us {
  583. /*right: 200px;*/
  584. height: 180px;
  585. padding-top: 10px;
  586. width: 210px;
  587. top: -76px;
  588. }
  589. .right-bar ul li .contact-us p {
  590. line-height: 33px;
  591. text-align: left;
  592. padding-left: 10px;
  593. margin-bottom: 0;
  594. white-space: nowrap;
  595. font-size: 12px;
  596. }
  597. .right-bar ul li .contact-us .contact-btn {
  598. width: 62px;
  599. height: 18px;
  600. line-height: 18px;
  601. background: #ef7f03;
  602. display: inline-block;
  603. text-align: center;
  604. color: #fff;
  605. font-size: 12px;
  606. border-radius: 5px;
  607. padding: 0;
  608. }
  609. .right-bar-item {
  610. width: 36px;
  611. /* height: 38px;*/
  612. }
  613. .right-bar .right-bar-item a.title {
  614. display: inline-block;
  615. width: 36px;
  616. height: 38px;
  617. line-height: 38px;
  618. padding: 0;
  619. }
  620. .right-bar {
  621. position: fixed;
  622. z-index: 1000;
  623. right: 0;
  624. top: 0;
  625. width: 36px;
  626. height: 100%;
  627. .right-bar-center {
  628. position: absolute;
  629. top: 60%;
  630. transform: translateY(-50%);
  631. list-style: none;
  632. padding: 0;
  633. width: 100%;
  634. }
  635. .right-bar-bottom {
  636. position: absolute;
  637. right: 0;
  638. bottom: 0;
  639. width: 36px;
  640. }
  641. .right-bar-item {
  642. a {
  643. position: relative;
  644. display: block;
  645. width: 100%;
  646. color: #fff;
  647. background-color: #5078cb;
  648. text-align: center;
  649. -webkit-transition: background-color ease 0.5s;
  650. -moz-transition: background-color ease 0.5s;
  651. -ms-transition: background-color ease 0.5s;
  652. -o-transition: background-color ease 0.5s;
  653. transition: background-color ease 0.5s;
  654. z-index: 20;
  655. font-size: 12px;
  656. }
  657. }
  658. }
  659. .ball {
  660. position: fixed;
  661. right: 0;
  662. top: 56%;
  663. z-index: 200;
  664. transition: all 0.4s cubic-bezier(0.49,-0.29,0.75, 0.14)
  665. /*transition: all 0.4s cubic-bezier(0,.79,.66,1.42);*/
  666. }
  667. .ball .inner {
  668. width: 16px;
  669. height: 16px;
  670. border-radius: 50%;
  671. background: rgb(0, 160, 220);
  672. transition: all 0.4s linear
  673. }
  674. </style>