App.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. <script>
  2. // // #ifdef MP-WEIXIN
  3. // const miniShopPlugin = requirePlugin('mini-shop-plugin');
  4. // // #endif
  5. export default {
  6. onLaunch: function (options) {
  7. if (options && options.path === 'pages_category_page1/goodsModule/goodsDetails' && options.query) {
  8. this.globalData.productShareItem = options.query
  9. }
  10. if (options && options.path === 'pages_category_page1/store/index' && options.query) {
  11. this.globalData.shopShareItem = options.query
  12. }
  13. if (options && options.path === 'pages_category_page1/distributionModule/recruit' && options.query) {
  14. this.globalData.distributeRecruitItem = options.query
  15. }
  16. if (options && options.path === 'pages_category_page1/goodsModule/inviteSpell' && options.query) {
  17. this.globalData.inviteSpellShareItem = options.query
  18. }
  19. //判断设备是否为 iPhone
  20. const self = this
  21. uni.getSystemInfo({
  22. success: function (res) {
  23. console.log(res, '检查机型')
  24. // 根据 model 进行判断
  25. // const iphoneModels = [
  26. // 'iPhone X',
  27. // 'iPhone XR',
  28. // 'iPhone XS Max',
  29. // 'iPhone 11',
  30. // 'iPhone 11 Pro',
  31. // 'iPhone 11 Pro Max',
  32. // 'iPhone 12/13 (Pro)',
  33. // 'iPhone 12/13 mini',
  34. // 'iPhone 12/13 Pro Max'
  35. // ]
  36. if (res.safeArea.top > 20 && res.model.indexOf('iPhone') !== -1) {
  37. self.globalData.isIphone = true
  38. }
  39. }
  40. })
  41. // 购物车右上角数量
  42. let allCartNum = (uni.getStorageSync('allCartNum')).toString()
  43. if (allCartNum > 0) {
  44. uni.setTabBarBadge({
  45. index: 2,
  46. text: allCartNum
  47. })
  48. }
  49. },
  50. globalData: {
  51. isIphone: false,
  52. },
  53. };
  54. </script>
  55. <style lang="scss">
  56. /*每个页面公共css */
  57. @import "uview-ui/index.scss";
  58. uni-rich-text img {
  59. max-width: 100% !important;
  60. }
  61. .line1 {
  62. text-overflow: ellipsis;
  63. white-space: nowrap;
  64. overflow: hidden;
  65. }
  66. .wid {
  67. width: 100%;
  68. }
  69. .fs4 {
  70. font-size: 4upx;
  71. }
  72. .fs18 {
  73. font-size: 18upx;
  74. }
  75. .fs20 {
  76. font-size: 20upx;
  77. }
  78. .fs22 {
  79. font-size: 22upx;
  80. }
  81. .fs24 {
  82. font-size: 24upx;
  83. }
  84. .fs26 {
  85. font-size: 26upx;
  86. }
  87. .fs28 {
  88. font-size: 28upx;
  89. }
  90. .fs30 {
  91. font-size: 30upx;
  92. }
  93. .fs32 {
  94. font-size: 32upx;
  95. }
  96. .fs34 {
  97. font-size: 34upx;
  98. }
  99. .fs36 {
  100. font-size: 36upx;
  101. }
  102. .fs38 {
  103. font-size: 38upx;
  104. }
  105. .fs40 {
  106. font-size: 40upx;
  107. }
  108. .fs42 {
  109. font-size: 42upx;
  110. }
  111. .fs44 {
  112. font-size: 44upx;
  113. }
  114. .fs46 {
  115. font-size: 46upx;
  116. }
  117. .fs48 {
  118. font-size: 46upx;
  119. }
  120. .fs50 {
  121. font-size: 50upx;
  122. }
  123. .fs60 {
  124. font-size: 60upx;
  125. }
  126. .fs-bold {
  127. font-weight: bold;
  128. }
  129. .fs-weight-300 {
  130. font-weight: 300;
  131. }
  132. .fs-weight-200 {
  133. font-weight: 200;
  134. }
  135. .fs-weight-400 {
  136. font-weight: 400;
  137. }
  138. .flex-display {
  139. display: flex;
  140. }
  141. .flex-center {
  142. display: flex;
  143. justify-content: center;
  144. }
  145. .flex-items {
  146. display: flex;
  147. align-items: center;
  148. }
  149. .flex-items-plus {
  150. display: flex;
  151. justify-content: center;
  152. align-items: center;
  153. }
  154. .flex-start {
  155. display: flex;
  156. justify-content: flex-start;
  157. }
  158. .flex-end {
  159. display: flex;
  160. justify-content: flex-end;
  161. }
  162. .flex-end-plus {
  163. display: flex;
  164. justify-content: flex-end;
  165. align-items: center;
  166. }
  167. .flex-column {
  168. flex-direction: column
  169. }
  170. .flex-column-plus {
  171. display: flex;
  172. flex-direction: column
  173. }
  174. .flex-row {
  175. flex-direction: row
  176. }
  177. .flex-row-plus {
  178. display: flex;
  179. flex-direction: row
  180. }
  181. .flex-sp-around {
  182. justify-content: space-around;
  183. }
  184. .flex-sp-between {
  185. justify-content: space-between;
  186. }
  187. .text-align {
  188. text-align: center;
  189. }
  190. .flex-wrap-1 {
  191. display: flex;
  192. flex-wrap: wrap
  193. }
  194. .flex-nowrap-1 {
  195. display: flex;
  196. flex-wrap: nowrap
  197. }
  198. .align-end {
  199. display: flex;
  200. align-items: flex-end;
  201. }
  202. .align-sp-between {
  203. align-content: space-between;
  204. }
  205. .mar-top-5 {
  206. margin-top: 5upx;
  207. }
  208. .mar-top-10 {
  209. margin-top: 10upx;
  210. }
  211. .mar-top-20 {
  212. margin-top: 20upx;
  213. }
  214. .mar-top-30 {
  215. margin-top: 30upx;
  216. }
  217. .mar-top-32 {
  218. margin-top: 32upx;
  219. }
  220. .mar-top-36 {
  221. margin-top: 36upx;
  222. }
  223. .mar-top-40 {
  224. margin-top: 40upx;
  225. }
  226. .mar-top-50 {
  227. margin-top: 50upx;
  228. }
  229. .mar-top-60 {
  230. margin-top: 60upx;
  231. }
  232. .mar-top-70 {
  233. margin-top: 70upx;
  234. }
  235. .mar-top-100 {
  236. margin-top: 100upx;
  237. }
  238. .mar-top-percent40 {
  239. margin-top: 40%;
  240. }
  241. .mar-top-half {
  242. margin-top: 50%;
  243. }
  244. .mar-left-6 {
  245. margin-left: 6upx;
  246. }
  247. .mar-left-5 {
  248. margin-left: 5upx;
  249. }
  250. .mar-left-10 {
  251. margin-left: 10upx;
  252. }
  253. .mar-left-20 {
  254. margin-left: 20upx;
  255. }
  256. .mar-left-30 {
  257. margin-left: 30upx;
  258. }
  259. .mar-left-35 {
  260. margin-left: 35upx;
  261. }
  262. .mar-left-40 {
  263. margin-left: 40upx;
  264. }
  265. .mar-left-50 {
  266. margin-left: 50upx;
  267. }
  268. .mar-left-60 {
  269. margin-left: 60upx;
  270. }
  271. .mar-left-70 {
  272. margin-left: 70upx;
  273. }
  274. .mar-right-10 {
  275. margin-right: 10upx;
  276. }
  277. .mar-right-20 {
  278. margin-right: 20upx;
  279. }
  280. .mar-right-25 {
  281. margin-right: 25upx;
  282. }
  283. .mar-right-30 {
  284. margin-right: 30upx;
  285. }
  286. .mar-right-35 {
  287. margin-right: 35upx;
  288. }
  289. .mar-right-40 {
  290. margin-right: 40upx;
  291. }
  292. .mar-right-50 {
  293. margin-right: 50upx;
  294. }
  295. .pad-left-10 {
  296. padding-left: 10upx;
  297. }
  298. .pad-left-20 {
  299. padding-left: 20upx;
  300. }
  301. .pad-left-40 {
  302. padding-left: 40upx;
  303. }
  304. .pad-right-20 {
  305. padding-right: 20upx;
  306. }
  307. .pad-top-20 {
  308. padding-top: 20upx;
  309. }
  310. .pad-top-40 {
  311. padding-top: 40upx;
  312. }
  313. .pad-bot-20 {
  314. padding-bottom: 20upx;
  315. }
  316. .pad-topbot-20 {
  317. padding: 20upx 0upx;
  318. }
  319. .pad-topbot-5 {
  320. padding: 0upx 5upx;
  321. }
  322. .pad-topbot-10 {
  323. padding: 0upx 10upx;
  324. }
  325. .pad-topbot-50 {
  326. padding: 50upx 0upx;
  327. }
  328. .pad-bot-20 {
  329. padding-bottom: 20upx;
  330. }
  331. .pad-bot-30 {
  332. padding-bottom: 30upx;
  333. }
  334. .pad-bot-40 {
  335. padding-bottom: 40upx;
  336. }
  337. .pad-bot-100 {
  338. padding-bottom: 100upx;
  339. }
  340. .pad-bot-140 {
  341. padding-bottom: 140upx;
  342. }
  343. .bor-rad-30 {
  344. border-radius: 30upx;
  345. }
  346. .bor-rad-45 {
  347. border-radius: 45upx;
  348. }
  349. .bor-rad-half {
  350. border-radius: 50%;
  351. }
  352. .backColor {
  353. background-color: #009688;
  354. }
  355. .backColorFFF {
  356. background-color: #FFFFFF;
  357. }
  358. .pos-abs {
  359. position: absolute;
  360. }
  361. .bor-bot-line {
  362. border-bottom: #C8C7CC 1upx solid;
  363. }
  364. .bor-line-F7F7F7 {
  365. border-bottom: #F7F7F7 1upx solid;
  366. }
  367. .bor-line-E5E5E5 {
  368. border-bottom: #E5E5E5 1upx solid;
  369. }
  370. .borRig-line-E5E5E5 {
  371. border-right: #DDDDDD 2upx solid;
  372. }
  373. .borRig-line-20 {
  374. border-bottom: #F7F7F7 20upx solid;
  375. }
  376. .font-color-red {
  377. color: red;
  378. }
  379. .font-color-FFF {
  380. color: #FFFFFF;
  381. }
  382. .font-color-8A734A {
  383. color: #8A734A;
  384. }
  385. .font-color-71521B {
  386. color: #71521B;
  387. }
  388. .font-color-222 {
  389. color: #222222;
  390. }
  391. .font-color-333 {
  392. color: #333333;
  393. }
  394. .font-color-666 {
  395. color: #666666;
  396. }
  397. .font-color-999 {
  398. color: #999999;
  399. }
  400. .font-color-656 {
  401. color: #656565;
  402. }
  403. .font-color-DDD {
  404. color: #DDDDDD;
  405. }
  406. .font-color-CCC {
  407. color: #CCCCCC;
  408. }
  409. .font-color-FFEBC4 {
  410. color: #FFEBC4;
  411. }
  412. .font-color-1CC363 {
  413. color: #1CC363;
  414. }
  415. .font-color-47A7EE {
  416. color: #47A7EE;
  417. }
  418. .font-color-C5AA7B {
  419. color: #C5AA7B;
  420. }
  421. .font-color-FF7700 {
  422. color: #FF7700;
  423. }
  424. .font-color-FF7911 {
  425. color: #FF7911;
  426. }
  427. .font-color-80 {
  428. color: #808080;
  429. }
  430. .font-color-DD {
  431. color: #DD524D;
  432. }
  433. .font-color-C83732 {
  434. color: #C83732;
  435. }
  436. .font-color-3F {
  437. color: #3F536E;
  438. }
  439. .font-color-009 {
  440. color: #009688;
  441. }
  442. .font-weight-500 {
  443. font-weight: 500;
  444. }
  445. .font-weight-bold {
  446. font-weight: bold;
  447. }
  448. .overflow {
  449. overflow: hidden;
  450. text-overflow: ellipsis;
  451. white-space: nowrap;
  452. }
  453. .overflowNoDot {
  454. display: block;
  455. overflow: hidden;
  456. }
  457. .discountsPriceLine {
  458. text-decoration: line-through;
  459. }
  460. .border-bottom-Line {
  461. border-bottom: 1upx solid #EDEDED;
  462. }
  463. .decoration {
  464. text-decoration: line-through;
  465. }
  466. .anonymous {
  467. margin-top: 25upx;
  468. .uni-checkbox-input {
  469. border-color: #C5AA7B !important;
  470. width: 30upx;
  471. height: 30upx;
  472. }
  473. .uni-checkbox-input-checked:before {
  474. font-size: 30upx !important;
  475. }
  476. .uni-checkbox-input-checked {
  477. background: #C5AA7B;
  478. }
  479. }
  480. .footprint {
  481. .itemList {
  482. .uni-checkbox-input {
  483. border-color: #C5AA7B !important;
  484. width: 36upx;
  485. height: 36upx;
  486. border-radius: 50%;
  487. margin-right: 20upx;
  488. }
  489. .uni-checkbox-input-checked:before {
  490. font-size: 36upx !important;
  491. }
  492. .uni-checkbox-input-checked {
  493. background: #C5AA7B;
  494. }
  495. }
  496. }
  497. .itemInfo {
  498. uni-slider {
  499. margin: 0;
  500. .uni-slider-thumb {
  501. display: none;
  502. }
  503. .uni-slider-handle-wrapper {
  504. height: 18upx;
  505. border-radius: 0;
  506. border: 1upx solid #FF736C;
  507. }
  508. .uni-slider-track {
  509. border-radius: 0;
  510. }
  511. .uni-slider-tap-area {
  512. flex: 0 0 70%;
  513. padding: 0;
  514. }
  515. }
  516. }
  517. .uni-modal {
  518. padding: 20rpx;
  519. box-sizing: border-box;
  520. }
  521. uni-modal .uni-modal__ft:after {
  522. border-top: none;
  523. }
  524. uni-modal .uni-modal__btn {
  525. color: #333333;
  526. border: 2rpx solid #333333;
  527. font-weight: 400;
  528. margin: 0 10rpx;
  529. font-size: 28rpx;
  530. }
  531. .uni-tabbar .uni-tabbar__reddot {
  532. background: #C5AA7B;
  533. color: #FFFFFF;
  534. }
  535. uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
  536. border-color: #C5AA7B;
  537. }
  538. .u-arrow {
  539. display: inline-block;
  540. width: 20rpx;
  541. height: 20rpx;
  542. border-top: 1rpx solid #999;
  543. border-right: 1rpx solid #999;
  544. }
  545. .u-arrow-up {
  546. transform: rotate(-45deg);
  547. }
  548. .u-arrow-down {
  549. transform: rotate(135deg);
  550. }
  551. .u-arrow-left {
  552. transform: rotate(-135deg);
  553. }
  554. .u-arrow-right {
  555. transform: rotate(45deg);
  556. }
  557. .uni-picker-container .uni-picker-action.uni-picker-action-confirm {
  558. color: #C5AA7B;
  559. }
  560. .u-drawer-content {
  561. border-radius: 0 !important;
  562. }
  563. </style>
  564. <style>
  565. .uni-modal__btn_primary {
  566. background: #333333;
  567. color: #FFEBC4 !important;
  568. }
  569. </style>