App.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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{width: 100%;}
  67. .fs4{font-size: 4upx;}
  68. .fs18{font-size: 18upx;}
  69. .fs20{font-size: 20upx;}
  70. .fs22{font-size: 22upx;}
  71. .fs24{font-size: 24upx;}
  72. .fs26{font-size: 26upx;}
  73. .fs28{font-size: 28upx;}
  74. .fs30{font-size: 30upx;}
  75. .fs32{font-size: 32upx;}
  76. .fs34{font-size: 34upx;}
  77. .fs36{font-size: 36upx;}
  78. .fs38{font-size: 38upx;}
  79. .fs40{font-size: 40upx;}
  80. .fs42{font-size: 42upx;}
  81. .fs44{font-size: 44upx;}
  82. .fs46{font-size: 46upx;}
  83. .fs48{font-size: 46upx;}
  84. .fs50{font-size: 50upx;}
  85. .fs60{font-size: 60upx;}
  86. .fs-bold{font-weight: bold;}
  87. .fs-weight-300{font-weight: 300;}
  88. .fs-weight-200{font-weight: 200;}
  89. .fs-weight-400{font-weight: 400;}
  90. .flex-display{display: flex;}
  91. .flex-center{display: flex;justify-content: center;}
  92. .flex-items{display: flex;align-items:center;}
  93. .flex-items-plus{display: flex;justify-content: center;align-items:center;}
  94. .flex-start{display: flex;justify-content: flex-start;}
  95. .flex-end{display: flex;justify-content: flex-end;}
  96. .flex-end-plus{display: flex;justify-content: flex-end;align-items:center;}
  97. .flex-column{flex-direction: column}
  98. .flex-column-plus{display: flex;flex-direction: column}
  99. .flex-row{flex-direction: row}
  100. .flex-row-plus{display: flex;flex-direction: row}
  101. .flex-sp-around{justify-content:space-around;}
  102. .flex-sp-between{justify-content:space-between;}
  103. .text-align{text-align: center;}
  104. .flex-wrap-1{display: flex;flex-wrap: wrap}
  105. .flex-nowrap-1{display: flex;flex-wrap: nowrap}
  106. .align-end{display: flex;align-items:flex-end;}
  107. .align-sp-between{align-content: space-between;}
  108. .mar-top-5{margin-top: 5upx;}
  109. .mar-top-10{margin-top: 10upx;}
  110. .mar-top-20{margin-top: 20upx;}
  111. .mar-top-30{margin-top: 30upx;}
  112. .mar-top-32{margin-top: 32upx;}
  113. .mar-top-36{margin-top: 36upx;}
  114. .mar-top-40{margin-top: 40upx;}
  115. .mar-top-50{margin-top: 50upx;}
  116. .mar-top-60{margin-top: 60upx;}
  117. .mar-top-70{margin-top: 70upx;}
  118. .mar-top-100{margin-top: 100upx;}
  119. .mar-top-percent40{margin-top: 40%;}
  120. .mar-top-half{margin-top: 50%;}
  121. .mar-left-6{margin-left: 6upx;}
  122. .mar-left-5{margin-left: 5upx;}
  123. .mar-left-10{margin-left: 10upx;}
  124. .mar-left-20{margin-left: 20upx;}
  125. .mar-left-30{margin-left: 30upx;}
  126. .mar-left-35{margin-left: 35upx;}
  127. .mar-left-40{margin-left: 40upx;}
  128. .mar-left-50{margin-left: 50upx;}
  129. .mar-left-60{margin-left: 60upx;}
  130. .mar-left-70{margin-left: 70upx;}
  131. .mar-right-10{margin-right: 10upx;}
  132. .mar-right-20{margin-right: 20upx;}
  133. .mar-right-25{margin-right: 25upx;}
  134. .mar-right-30{margin-right: 30upx;}
  135. .mar-right-35{margin-right: 35upx;}
  136. .mar-right-40{margin-right: 40upx;}
  137. .mar-right-50{margin-right: 50upx;}
  138. .pad-left-10{padding-left: 10upx;}
  139. .pad-left-20{padding-left: 20upx;}
  140. .pad-left-40{padding-left: 40upx;}
  141. .pad-right-20{padding-right: 20upx;}
  142. .pad-top-20{padding-top: 20upx;}
  143. .pad-top-40{padding-top: 40upx;}
  144. .pad-bot-20{padding-bottom: 20upx;}
  145. .pad-topbot-20{padding:20upx 0upx;}
  146. .pad-topbot-5{padding:0upx 5upx;}
  147. .pad-topbot-10{padding:0upx 10upx;}
  148. .pad-topbot-50{padding:50upx 0upx;}
  149. .pad-bot-20{padding-bottom:20upx;}
  150. .pad-bot-30{padding-bottom:30upx;}
  151. .pad-bot-40{padding-bottom:40upx;}
  152. .pad-bot-100{padding-bottom:100upx;}
  153. .pad-bot-140{padding-bottom:140upx;}
  154. .bor-rad-30{border-radius: 30upx;}
  155. .bor-rad-45{border-radius: 45upx;}
  156. .bor-rad-half{border-radius: 50%;}
  157. .backColor{background-color: #009688;}
  158. .backColorFFF{background-color: #FFFFFF;}
  159. .pos-abs{position: absolute;}
  160. .bor-bot-line{border-bottom: #C8C7CC 1upx solid;}
  161. .bor-line-F7F7F7{border-bottom: #F7F7F7 1upx solid;}
  162. .bor-line-E5E5E5{border-bottom: #E5E5E5 1upx solid;}
  163. .borRig-line-E5E5E5{border-right: #DDDDDD 2upx solid;}
  164. .borRig-line-20{border-bottom: #F7F7F7 20upx solid;}
  165. .font-color-red{color: red;}
  166. .font-color-FFF{color: #FFFFFF;}
  167. .font-color-8A734A{color: #8A734A;}
  168. .font-color-71521B{color: #71521B;}
  169. .font-color-222{color: #222222;}
  170. .font-color-333{color: #333333;}
  171. .font-color-666{color: #666666;}
  172. .font-color-999{color: #999999;}
  173. .font-color-656{color: #656565;}
  174. .font-color-DDD{color: #DDDDDD;}
  175. .font-color-CCC{color: #CCCCCC;}
  176. .font-color-FFEBC4{color: #FFEBC4;}
  177. .font-color-1CC363{color: #1CC363;}
  178. .font-color-47A7EE{color: #47A7EE;}
  179. .font-color-C5AA7B{color: #C5AA7B;}
  180. .font-color-FF7700{color: #FF7700;}
  181. .font-color-FF7911{color: #FF7911;}
  182. .font-color-80{color: #808080;}
  183. .font-color-DD{color: #DD524D;}
  184. .font-color-C83732{color: #C83732;}
  185. .font-color-3F{color: #3F536E;}
  186. .font-color-009{color: #009688;}
  187. .font-weight-500{font-weight: 500;}
  188. .font-weight-bold{font-weight: bold;}
  189. .overflow{overflow: hidden;text-overflow:ellipsis;white-space: nowrap;}
  190. .overflowNoDot{display:block;overflow:hidden;}
  191. .discountsPriceLine{text-decoration:line-through;}
  192. .border-bottom-Line{border-bottom: 1upx solid #EDEDED;}
  193. .decoration {text-decoration: line-through;}
  194. .anonymous {
  195. margin-top: 25upx;
  196. .uni-checkbox-input {
  197. border-color: #C5AA7B !important;
  198. width: 30upx;
  199. height: 30upx;
  200. }
  201. .uni-checkbox-input-checked:before {
  202. font-size: 30upx !important;
  203. }
  204. .uni-checkbox-input-checked {
  205. background: #C5AA7B;
  206. }
  207. }
  208. .footprint {
  209. .itemList {
  210. .uni-checkbox-input {
  211. border-color: #C5AA7B !important;
  212. width: 36upx;
  213. height: 36upx;
  214. border-radius: 50%;
  215. margin-right: 20upx;
  216. }
  217. .uni-checkbox-input-checked:before {
  218. font-size: 36upx !important;
  219. }
  220. .uni-checkbox-input-checked {
  221. background: #C5AA7B;
  222. }
  223. }
  224. }
  225. .itemInfo {
  226. uni-slider {
  227. margin: 0;
  228. .uni-slider-thumb {
  229. display: none;
  230. }
  231. .uni-slider-handle-wrapper {
  232. height: 18upx;
  233. border-radius: 0;
  234. border: 1upx solid #FF736C;
  235. }
  236. .uni-slider-track {
  237. border-radius: 0;
  238. }
  239. .uni-slider-tap-area {
  240. flex: 0 0 70%;
  241. padding: 0;
  242. }
  243. }
  244. }
  245. .uni-modal {
  246. padding: 20rpx;
  247. box-sizing: border-box;
  248. }
  249. uni-modal .uni-modal__ft:after {
  250. border-top: none;
  251. }
  252. uni-modal .uni-modal__btn {
  253. color: #333333;
  254. border: 2rpx solid #333333;
  255. font-weight: 400;
  256. margin: 0 10rpx;
  257. font-size: 28rpx;
  258. }
  259. .uni-tabbar .uni-tabbar__reddot{
  260. background: #C5AA7B;
  261. color: #FFFFFF;
  262. }
  263. uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
  264. border-color: #C5AA7B;
  265. }
  266. .u-arrow {
  267. display: inline-block;
  268. width: 20rpx;
  269. height: 20rpx;
  270. border-top: 1rpx solid #999;
  271. border-right: 1rpx solid #999;
  272. }
  273. .u-arrow-up {
  274. transform: rotate(-45deg);
  275. }
  276. .u-arrow-down {
  277. transform: rotate(135deg);
  278. }
  279. .u-arrow-left {
  280. transform: rotate(-135deg);
  281. }
  282. .u-arrow-right {
  283. transform: rotate(45deg);
  284. }
  285. .uni-picker-container .uni-picker-action.uni-picker-action-confirm {
  286. color: #C5AA7B;
  287. }
  288. .u-drawer-content {
  289. border-radius: 0 !important;
  290. }
  291. </style>
  292. <style>
  293. .uni-modal__btn_primary {
  294. background: #333333;
  295. color: #FFEBC4 !important;
  296. }
  297. </style>