App.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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. //判断设备是否为 iPhone
  17. const self = this
  18. uni.getSystemInfo({
  19. success: function(res) {
  20. console.log(res,'检查机型')
  21. // 根据 model 进行判断
  22. // const iphoneModels = [
  23. // 'iPhone X',
  24. // 'iPhone XR',
  25. // 'iPhone XS Max',
  26. // 'iPhone 11',
  27. // 'iPhone 11 Pro',
  28. // 'iPhone 11 Pro Max',
  29. // 'iPhone 12/13 (Pro)',
  30. // 'iPhone 12/13 mini',
  31. // 'iPhone 12/13 Pro Max'
  32. // ]
  33. if (res.safeArea.top > 20 && res.model.indexOf('iPhone') !== -1) {
  34. self.globalData.isIphone = true
  35. }
  36. }
  37. })
  38. // 购物车右上角数量
  39. let allCartNum = (uni.getStorageSync('allCartNum')).toString()
  40. if(allCartNum > 0){
  41. uni.setTabBarBadge({
  42. index: 2,
  43. text: allCartNum
  44. })
  45. }
  46. },
  47. globalData: {
  48. isIphone:false,
  49. },
  50. };
  51. </script>
  52. <style lang="scss">
  53. /*每个页面公共css */
  54. @import "uview-ui/index.scss";
  55. uni-rich-text img {
  56. max-width: 100% !important;
  57. }
  58. .line1{
  59. text-overflow: ellipsis;
  60. white-space: nowrap;
  61. overflow: hidden;
  62. }
  63. .wid{width: 100%;}
  64. .fs4{font-size: 4upx;}
  65. .fs18{font-size: 18upx;}
  66. .fs20{font-size: 20upx;}
  67. .fs22{font-size: 22upx;}
  68. .fs24{font-size: 24upx;}
  69. .fs26{font-size: 26upx;}
  70. .fs28{font-size: 28upx;}
  71. .fs30{font-size: 30upx;}
  72. .fs32{font-size: 32upx;}
  73. .fs34{font-size: 34upx;}
  74. .fs36{font-size: 36upx;}
  75. .fs38{font-size: 38upx;}
  76. .fs40{font-size: 40upx;}
  77. .fs42{font-size: 42upx;}
  78. .fs44{font-size: 44upx;}
  79. .fs46{font-size: 46upx;}
  80. .fs48{font-size: 46upx;}
  81. .fs50{font-size: 50upx;}
  82. .fs60{font-size: 60upx;}
  83. .fs-bold{font-weight: bold;}
  84. .fs-weight-300{font-weight: 300;}
  85. .fs-weight-200{font-weight: 200;}
  86. .flex-display{display: flex;}
  87. .flex-center{display: flex;justify-content: center;}
  88. .flex-items{display: flex;align-items:center;}
  89. .flex-items-plus{display: flex;justify-content: center;align-items:center;}
  90. .flex-start{display: flex;justify-content: flex-start;}
  91. .flex-end{display: flex;justify-content: flex-end;}
  92. .flex-end-plus{display: flex;justify-content: flex-end;align-items:center;}
  93. .flex-column{flex-direction: column}
  94. .flex-column-plus{display: flex;flex-direction: column}
  95. .flex-row{flex-direction: row}
  96. .flex-row-plus{display: flex;flex-direction: row}
  97. .flex-sp-around{justify-content:space-around;}
  98. .flex-sp-between{justify-content:space-between;}
  99. .text-align{text-align: center;}
  100. .flex-wrap-1{display: flex;flex-wrap: wrap}
  101. .flex-nowrap-1{display: flex;flex-wrap: nowrap}
  102. .align-end{display: flex;align-items:flex-end;}
  103. .align-sp-between{align-content: space-between;}
  104. .mar-top-5{margin-top: 5upx;}
  105. .mar-top-10{margin-top: 10upx;}
  106. .mar-top-20{margin-top: 20upx;}
  107. .mar-top-30{margin-top: 30upx;}
  108. .mar-top-32{margin-top: 32upx;}
  109. .mar-top-36{margin-top: 36upx;}
  110. .mar-top-40{margin-top: 40upx;}
  111. .mar-top-50{margin-top: 50upx;}
  112. .mar-top-60{margin-top: 60upx;}
  113. .mar-top-70{margin-top: 70upx;}
  114. .mar-top-100{margin-top: 100upx;}
  115. .mar-top-percent40{margin-top: 40%;}
  116. .mar-top-half{margin-top: 50%;}
  117. .mar-left-6{margin-left: 6upx;}
  118. .mar-left-5{margin-left: 5upx;}
  119. .mar-left-10{margin-left: 10upx;}
  120. .mar-left-20{margin-left: 20upx;}
  121. .mar-left-30{margin-left: 30upx;}
  122. .mar-left-35{margin-left: 35upx;}
  123. .mar-left-40{margin-left: 40upx;}
  124. .mar-left-50{margin-left: 50upx;}
  125. .mar-left-60{margin-left: 60upx;}
  126. .mar-left-70{margin-left: 70upx;}
  127. .mar-right-10{margin-right: 10upx;}
  128. .mar-right-20{margin-right: 20upx;}
  129. .mar-right-25{margin-right: 25upx;}
  130. .mar-right-30{margin-right: 30upx;}
  131. .mar-right-35{margin-right: 35upx;}
  132. .mar-right-40{margin-right: 40upx;}
  133. .mar-right-50{margin-right: 50upx;}
  134. .pad-left-10{padding-left: 10upx;}
  135. .pad-left-20{padding-left: 20upx;}
  136. .pad-left-40{padding-left: 40upx;}
  137. .pad-right-20{padding-right: 20upx;}
  138. .pad-top-20{padding-top: 20upx;}
  139. .pad-top-40{padding-top: 40upx;}
  140. .pad-bot-20{padding-bottom: 20upx;}
  141. .pad-topbot-20{padding:20upx 0upx;}
  142. .pad-topbot-5{padding:0upx 5upx;}
  143. .pad-topbot-10{padding:0upx 10upx;}
  144. .pad-topbot-50{padding:50upx 0upx;}
  145. .pad-bot-20{padding-bottom:20upx;}
  146. .pad-bot-30{padding-bottom:30upx;}
  147. .pad-bot-40{padding-bottom:40upx;}
  148. .pad-bot-100{padding-bottom:100upx;}
  149. .pad-bot-140{padding-bottom:140upx;}
  150. .bor-rad-30{border-radius: 30upx;}
  151. .bor-rad-45{border-radius: 45upx;}
  152. .bor-rad-half{border-radius: 50%;}
  153. .backColor{background-color: #009688;}
  154. .backColorFFF{background-color: #FFFFFF;}
  155. .pos-abs{position: absolute;}
  156. .bor-bot-line{border-bottom: #C8C7CC 1upx solid;}
  157. .bor-line-F7F7F7{border-bottom: #F7F7F7 1upx solid;}
  158. .bor-line-E5E5E5{border-bottom: #E5E5E5 1upx solid;}
  159. .borRig-line-E5E5E5{border-right: #DDDDDD 2upx solid;}
  160. .borRig-line-20{border-bottom: #F7F7F7 20upx solid;}
  161. .font-color-red{color: red;}
  162. .font-color-FFF{color: #FFFFFF;}
  163. .font-color-8A734A{color: #8A734A;}
  164. .font-color-71521B{color: #71521B;}
  165. .font-color-222{color: #222222;}
  166. .font-color-333{color: #333333;}
  167. .font-color-666{color: #666666;}
  168. .font-color-999{color: #999999;}
  169. .font-color-656{color: #656565;}
  170. .font-color-DDD{color: #DDDDDD;}
  171. .font-color-CCC{color: #CCCCCC;}
  172. .font-color-FFEBC4{color: #FFEBC4;}
  173. .font-color-1CC363{color: #1CC363;}
  174. .font-color-47A7EE{color: #47A7EE;}
  175. .font-color-C5AA7B{color: #C5AA7B;}
  176. .font-color-FF7700{color: #FF7700;}
  177. .font-color-FF7911{color: #FF7911;}
  178. .font-color-80{color: #808080;}
  179. .font-color-DD{color: #DD524D;}
  180. .font-color-C83732{color: #C83732;}
  181. .font-color-3F{color: #3F536E;}
  182. .font-color-009{color: #009688;}
  183. .font-weight-500{font-weight: 500;}
  184. .font-weight-bold{font-weight: bold;}
  185. .overflow{overflow: hidden;text-overflow:ellipsis;white-space: nowrap;}
  186. .overflowNoDot{display:block;overflow:hidden;}
  187. .discountsPriceLine{text-decoration:line-through;}
  188. .border-bottom-Line{border-bottom: 1upx solid #EDEDED;}
  189. .decoration {text-decoration: line-through;}
  190. .anonymous {
  191. margin-top: 25upx;
  192. .uni-checkbox-input {
  193. border-color: #C5AA7B !important;
  194. width: 30upx;
  195. height: 30upx;
  196. }
  197. .uni-checkbox-input-checked:before {
  198. font-size: 30upx !important;
  199. }
  200. .uni-checkbox-input-checked {
  201. background: #C5AA7B;
  202. }
  203. }
  204. .footprint {
  205. .itemList {
  206. .uni-checkbox-input {
  207. border-color: #C5AA7B !important;
  208. width: 36upx;
  209. height: 36upx;
  210. border-radius: 50%;
  211. margin-right: 20upx;
  212. }
  213. .uni-checkbox-input-checked:before {
  214. font-size: 36upx !important;
  215. }
  216. .uni-checkbox-input-checked {
  217. background: #C5AA7B;
  218. }
  219. }
  220. }
  221. .itemInfo {
  222. uni-slider {
  223. margin: 0;
  224. .uni-slider-thumb {
  225. display: none;
  226. }
  227. .uni-slider-handle-wrapper {
  228. height: 18upx;
  229. border-radius: 0;
  230. border: 1upx solid #FF736C;
  231. }
  232. .uni-slider-track {
  233. border-radius: 0;
  234. }
  235. .uni-slider-tap-area {
  236. flex: 0 0 70%;
  237. padding: 0;
  238. }
  239. }
  240. }
  241. .uni-modal {
  242. padding: 20rpx;
  243. box-sizing: border-box;
  244. }
  245. uni-modal .uni-modal__ft:after {
  246. border-top: none;
  247. }
  248. uni-modal .uni-modal__btn {
  249. color: #333333;
  250. border: 2rpx solid #333333;
  251. font-weight: 400;
  252. margin: 0 10rpx;
  253. font-size: 28rpx;
  254. }
  255. .uni-tabbar .uni-tabbar__reddot{
  256. background: #C5AA7B;
  257. color: #FFFFFF;
  258. }
  259. uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
  260. border-color: #C5AA7B;
  261. }
  262. .u-arrow {
  263. display: inline-block;
  264. width: 20rpx;
  265. height: 20rpx;
  266. border-top: 1rpx solid #999;
  267. border-right: 1rpx solid #999;
  268. }
  269. .u-arrow-up {
  270. transform: rotate(-45deg);
  271. }
  272. .u-arrow-down {
  273. transform: rotate(135deg);
  274. }
  275. .u-arrow-left {
  276. transform: rotate(-135deg);
  277. }
  278. .u-arrow-right {
  279. transform: rotate(45deg);
  280. }
  281. .uni-picker-container .uni-picker-action.uni-picker-action-confirm {
  282. color: #C5AA7B;
  283. }
  284. .u-drawer-content {
  285. border-radius: 0 !important;
  286. }
  287. </style>
  288. <style>
  289. .uni-modal__btn_primary {
  290. background: #333333;
  291. color: #FFEBC4 !important;
  292. }
  293. </style>