App.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <script>
  2. var wsUrl="ws://42.194.245.189:8008/app/webSocket/w-";
  3. var pingpangTimes=null;
  4. var isSocketOpen=false;
  5. var socket=null;
  6. export default {
  7. globalData: {
  8. wsDanmuUrl: 'wss://userapp.gjh2024.com/apis', // 小程序wss,h5用ws
  9. },
  10. data() {
  11. return {
  12. };
  13. },
  14. onLaunch: function() {
  15. // uni.hideTabBar();
  16. },
  17. onLoad() {
  18. // #ifndef MP-WEIXIN
  19. uni.hideNavigationBar(); // H5 隐藏导航栏
  20. // #endif
  21. },
  22. onShow: function() {
  23. console.log('App Show')
  24. },
  25. onHide: function() {
  26. console.log('App Hide')
  27. },
  28. onUnload() {
  29. },
  30. methods:{
  31. }
  32. }
  33. </script>
  34. <style lang="scss">
  35. /*每个页面公共css */
  36. @import "@/uni_modules/uview-ui/index.scss";
  37. @import '@/assets/css/theme.scss';
  38. @import '@/assets/css/common.scss';
  39. view{
  40. box-sizing: border-box;
  41. }
  42. .ellipsis{
  43. overflow: hidden;
  44. text-overflow: ellipsis;
  45. white-space: nowrap;
  46. }
  47. .single-line-ellipsis {
  48. width: 480rpx; /* 设置固定宽度 */
  49. white-space: nowrap; /* 文本不换行 */
  50. overflow: hidden; /* 隐藏超出部分 */
  51. text-overflow: ellipsis; /* 超出部分用省略号表示 */
  52. }
  53. .single-ellipsis {
  54. width: 260rpx; /* 设置固定宽度 */
  55. white-space: nowrap; /* 文本不换行 */
  56. overflow: hidden; /* 隐藏超出部分 */
  57. text-overflow: ellipsis; /* 超出部分用省略号表示 */
  58. }
  59. .ellipsis2{
  60. overflow:hidden;
  61. text-overflow:ellipsis;
  62. display:-webkit-box;
  63. -webkit-box-orient:vertical;
  64. -webkit-line-clamp:2;
  65. }
  66. .no-data-box{
  67. height:100%;
  68. width: 100%;
  69. display: flex;
  70. justify-content: center;
  71. align-items: center;
  72. flex-direction: column;
  73. image{
  74. width: 264upx;
  75. height: 212upx;
  76. }
  77. .empty-title{
  78. margin-top: 20rpx;
  79. font-size: 28rpx;
  80. color: gray;
  81. }
  82. }
  83. .w-calc-30 {
  84. padding: 0 30rpx;
  85. width: calc(100% - 60rpx);
  86. }
  87. .hb {
  88. height: 100%;
  89. box-sizing: border-box;
  90. }
  91. .hidden {
  92. overflow: hidden;
  93. }
  94. .base-color {
  95. color: $--base-color;
  96. }
  97. .base-color-2 {
  98. color: $--base-color2;
  99. }
  100. .base-color-3 {
  101. color: $--base-color3;
  102. }
  103. .base-color-9 {
  104. color: $--base-color-9;
  105. }
  106. .base-color-8 {
  107. color: $--base-color-f8;
  108. }
  109. .base-color-6 {
  110. color: $--base-color-6;
  111. }
  112. .base-color-gray {
  113. color: $--base-color-gray;
  114. }
  115. .base-color-red{
  116. color:#ee0a25;
  117. }
  118. .base-color-dark {
  119. color: $--base-color-dark;
  120. }
  121. .base-color-dark2 {
  122. color: $--base-color-dark2;
  123. }
  124. .base-price {
  125. color: $--base-color-price;
  126. }
  127. .base-success {
  128. color: $--base-color-success;
  129. }
  130. .base-bg {
  131. background: $--base-bg;
  132. }
  133. .base-bg-2 {
  134. background: $--base-bg2;
  135. }
  136. .base-bg-red{
  137. background: #ee0a25;
  138. }
  139. .base-bg-f{
  140. background-color:#fff;
  141. }
  142. .base-bg-f8{
  143. background-color: $--base-color-f8;
  144. }
  145. .base-bg-f5{
  146. background-color: $--base-color-f5;
  147. }
  148. .base-bg-9{
  149. background-color: $--base-color-9;
  150. }
  151. .base-bg-blue{
  152. background:$--base-bg-blue;
  153. }
  154. .base-bg-sure{
  155. background:$--base-sure-bg;
  156. }
  157. .base-bg-orange{
  158. background:$--base-bg-orange;
  159. }
  160. .base-bg-false{
  161. background:$--base-false-bg;
  162. }
  163. .bor-blue{
  164. border: 2rpx solid $--base-bor-blue;
  165. }
  166. .bor-red{
  167. border: 2rpx solid $--base-bor-red;
  168. }
  169. .colorf {
  170. color: #fff;
  171. }
  172. .bgf {
  173. background: #fff;
  174. }
  175. .fixed {
  176. position: fixed;
  177. }
  178. .absolute {
  179. position: absolute;
  180. }
  181. .relative {
  182. position: relative;
  183. }
  184. .w100 {
  185. width: 100%;
  186. }
  187. .h100 {
  188. height: 100%;
  189. }
  190. .card {
  191. background: #fff;
  192. border-radius: 15rpx;
  193. }
  194. .cover-height {
  195. height: 100%;
  196. display: flex;
  197. flex-direction: column;
  198. box-sizing: border-box;
  199. }
  200. .row {
  201. display: flex;
  202. flex-direction: row;
  203. }
  204. .column {
  205. display: flex;
  206. flex-direction: column;
  207. }
  208. .justify-start {
  209. display: flex;
  210. justify-content: flex-start;
  211. }
  212. .justify-center {
  213. display: flex;
  214. justify-content: center;
  215. }
  216. .justify-end {
  217. display: flex;
  218. justify-content: flex-end;
  219. }
  220. .justify-around {
  221. display: flex;
  222. justify-content: space-around;
  223. }
  224. .justify-evenly {
  225. display: flex;
  226. justify-content: space-evenly;
  227. }
  228. .justify-between {
  229. display: flex;
  230. justify-content: space-between;
  231. }
  232. .align-start {
  233. display: flex;
  234. align-items: flex-start;
  235. }
  236. .align-center {
  237. display: flex;
  238. align-items: center;
  239. }
  240. .align-end {
  241. display: flex;
  242. align-items: flex-end;
  243. }
  244. .center {
  245. display: flex;
  246. justify-content: center;
  247. align-items: center;
  248. }
  249. .centerV {
  250. display: flex;
  251. justify-content: center;
  252. align-items: center;
  253. flex-direction: column;
  254. }
  255. .wrap {
  256. flex-wrap: wrap;
  257. }
  258. .flex-1 {
  259. flex: 1;
  260. }
  261. .ellipsis {
  262. overflow: hidden;
  263. text-overflow: ellipsis;
  264. display: -webkit-box;
  265. -webkit-box-orient: vertical;
  266. box-sizing: border-box;
  267. width: 100%;
  268. -webkit-line-clamp: 1;
  269. }
  270. .lines-2 {
  271. -webkit-line-clamp: 2 !important;
  272. }
  273. .lines-3 {
  274. -webkit-line-clamp: 3 !important;
  275. }
  276. .bold {
  277. font-weight: bold;
  278. }
  279. .line-through {
  280. text-decoration: line-through;
  281. }
  282. .nowrap {
  283. white-space: nowrap;
  284. }
  285. .scrollx {
  286. overflow-x: scroll;
  287. }
  288. .scrolly {
  289. overflow-y: scroll;
  290. }
  291. .cvauto {
  292. content-visibility: auto;
  293. }
  294. </style>
  295. <style lang="less">
  296. /*每个页面公共css */
  297. @import './assets/iconfont/iconfont.css';
  298. @import './assets/css/common.less';
  299. </style>