App.vue 5.6 KB

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