RightBar.vue 21 KB

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