App.vue 5.7 KB

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