App.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <script>
  2. import $req from "@/service/serviceConfig";
  3. export default {
  4. onLaunch: function () {
  5. // // 隐藏tabbar
  6. // uni.hideTabBar({
  7. // animation: true, // 是否需要动画效果
  8. // });
  9. this.login();
  10. console.log("App Launch");
  11. },
  12. onShow: function () {
  13. console.log("App Show");
  14. },
  15. onHide: function () {
  16. console.log("App Hide");
  17. },
  18. methods: {
  19. // 根据钱包地址获取token登录
  20. login() {
  21. let query = {
  22. address: "111", //钱包链接
  23. };
  24. $req.request({ alias: "login-token", query }).then((res) => {
  25. if (res.code == 0) {
  26. uni.setStorageSync("token", res.data);
  27. }
  28. });
  29. },
  30. },
  31. };
  32. </script>
  33. <style>
  34. /*每个页面公共css */
  35. /* #ifndef APP-NVUE */
  36. html,
  37. body {
  38. background-color: #eef4fc;
  39. }
  40. /* #endif */
  41. html,
  42. body {
  43. font-size: 16px;
  44. width: 100%;
  45. height: 100%;
  46. overflow: hidden;
  47. }
  48. body {
  49. margin: 0;
  50. font-family: PingFang SC, PingFang SC;
  51. -webkit-font-smoothing: antialiased;
  52. -moz-osx-font-smoothing: grayscale;
  53. background: linear-gradient(180deg, #e9fed5 0%, #ffffff 30%);
  54. }
  55. /* 隐藏滚动条 */
  56. .hideScrollbar ::-webkit-scrollbar {
  57. display: none;
  58. width: 0 !important;
  59. height: 0 !important;
  60. -webkit-appearance: none;
  61. background: transparent;
  62. }
  63. .nT {
  64. box-shadow: 2px 1px 1px 1px #deeaf7;
  65. }
  66. .mPd {
  67. padding: 0 15rpx;
  68. }
  69. .line_1 {
  70. text-overflow: ellipsis;
  71. overflow: hidden;
  72. white-space: nowrap;
  73. }
  74. .line_2 {
  75. display: -webkit-box;
  76. overflow: hidden;
  77. text-overflow: ellipsis;
  78. -webkit-line-clamp: 2;
  79. -webkit-box-orient: vertical;
  80. }
  81. .line_3 {
  82. display: -webkit-box;
  83. overflow: hidden;
  84. text-overflow: ellipsis;
  85. -webkit-line-clamp: 3;
  86. -webkit-box-orient: vertical;
  87. }
  88. page {
  89. display: flex;
  90. flex-direction: column;
  91. height: 100%;
  92. }
  93. view,
  94. image,
  95. text {
  96. box-sizing: border-box;
  97. flex-shrink: 0;
  98. }
  99. .statusBar {
  100. background-color: #1b242d;
  101. }
  102. #app {
  103. width: 100vw;
  104. height: 100vh;
  105. }
  106. .flex {
  107. display: flex;
  108. }
  109. .flex-left {
  110. display: flex;
  111. align-items: center;
  112. }
  113. .flex-wrap {
  114. flex-wrap: wrap;
  115. }
  116. .flex-nowrap {
  117. flex-wrap: nowrap;
  118. }
  119. .flex-row {
  120. display: flex;
  121. flex-direction: row;
  122. }
  123. .flex-column {
  124. display: flex;
  125. flex-direction: column;
  126. }
  127. .justify-start {
  128. justify-content: flex-start;
  129. }
  130. .justify-end {
  131. justify-content: flex-end;
  132. }
  133. .justify-center {
  134. justify-content: center;
  135. }
  136. .justify-between {
  137. justify-content: space-between;
  138. }
  139. .justify-around {
  140. justify-content: space-around;
  141. }
  142. .justify-evenly {
  143. justify-content: space-evenly;
  144. }
  145. .items-start {
  146. align-items: flex-start;
  147. }
  148. .items-end {
  149. align-items: flex-end;
  150. }
  151. .items-center {
  152. align-items: center;
  153. }
  154. .items-baseline {
  155. align-items: baseline;
  156. }
  157. .items-stretch {
  158. align-items: stretch;
  159. }
  160. .self-start {
  161. align-self: flex-start;
  162. }
  163. .self-end {
  164. align-self: flex-end;
  165. }
  166. .self-center {
  167. align-self: center;
  168. }
  169. .self-baseline {
  170. align-self: baseline;
  171. }
  172. .self-stretch {
  173. align-self: stretch;
  174. }
  175. .flex-1 {
  176. flex: 1;
  177. }
  178. .flex-auto {
  179. flex: 1 1 auto;
  180. }
  181. .grow {
  182. flex-grow: 1;
  183. }
  184. .grow-0 {
  185. flex-grow: 0;
  186. }
  187. .shrink {
  188. flex-shrink: 1;
  189. }
  190. .shrink-0 {
  191. flex-shrink: 0;
  192. }
  193. .relative {
  194. position: relative;
  195. }
  196. .flex-center {
  197. display: flex;
  198. align-items: center;
  199. justify-content: center;
  200. }
  201. </style>
  202. <style lang="scss">
  203. .content-page-wrap {
  204. flex: 1;
  205. .head-title {
  206. font-weight: bold;
  207. font-size: 32rpx;
  208. text-align: center;
  209. margin-bottom: 32rpx;
  210. // height: 80rpx;
  211. }
  212. }
  213. .tabMain {
  214. width: 750rpx;
  215. display: flex;
  216. flex-direction: row;
  217. white-space: nowrap;
  218. }
  219. .tab {
  220. width: 750rpx;
  221. display: flex;
  222. flex-direction: row;
  223. white-space: nowrap;
  224. }
  225. /* 隐藏滚动条 */
  226. .tab ::-webkit-scrollbar {
  227. display: none;
  228. width: 0 !important;
  229. height: 0 !important;
  230. -webkit-appearance: none;
  231. background: transparent;
  232. }
  233. .tabItemTitle {
  234. color: #717171;
  235. font-size: 30rpx;
  236. height: 50rpx;
  237. line-height: 50rpx;
  238. display: flex;
  239. flex-wrap: nowrap;
  240. align-children: center;
  241. justify-content: center;
  242. }
  243. .tabItemTitleActive {
  244. color: $BLBL;
  245. font-size: 40rpx;
  246. font-weight: bold;
  247. }
  248. .videoCardMain {
  249. width: 33.33%;
  250. padding: 10rpx 16rpx 40rpx 0;
  251. .videoCardImgBox {
  252. text-align: center;
  253. position: relative;
  254. .videoCardImg {
  255. width: 100%;
  256. height: 308rpx;
  257. border-radius: 16rpx;
  258. }
  259. .video-state {
  260. position: absolute;
  261. bottom: 16rpx;
  262. left: 0;
  263. right: 0;
  264. color: #fff;
  265. font-size: 26rpx;
  266. }
  267. }
  268. .videoCardName {
  269. font-size: 28rpx;
  270. padding: 10rpx 0 0;
  271. color: #464646;
  272. font-weight: 600;
  273. }
  274. .videoCardRate {
  275. padding: 3rpx 15rpx;
  276. }
  277. }
  278. .videoCardMain:nth-child(3n) {
  279. padding-right: 0;
  280. }
  281. .childPageView {
  282. display: flex;
  283. flex-direction: column;
  284. flex: 1;
  285. }
  286. .childPageViewItem {
  287. flex: 1;
  288. flex-direction: column;
  289. overflow-y: auto;
  290. }
  291. .childPageViewItem::-webkit-scrollbar {
  292. display: none;
  293. -webkit-appearance: none;
  294. background: transparent;
  295. }
  296. </style>
  297. <style lang="less" scoped>
  298. /deep/.search-box {
  299. // margin-top: 40rpx;
  300. display: flex;
  301. align-items: center;
  302. .u-input {
  303. border-radius: 24rpx !important;
  304. background-color: #f3f6f6 !important;
  305. height: 80rpx;
  306. line-height: 80rpx;
  307. padding: 16rpx 24rpx !important;
  308. .u-input__content__prefix-icon {
  309. display: flex;
  310. }
  311. }
  312. .input-right {
  313. margin-left: 20rpx;
  314. image {
  315. width: 68rpx;
  316. height: 68rpx;
  317. }
  318. }
  319. }
  320. /deep/.zp-paging-touch-view {
  321. padding: 0 30rpx;
  322. }
  323. </style>