From c376bddd4f4cc3d3e417eea1db73f147629eed7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=A6=E4=BF=8A=E6=B6=9B?= <18258134916@163.com> Date: Wed, 4 Aug 2021 09:14:52 +0800 Subject: [PATCH 1/6] =?UTF-8?q?pref:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- babel.config.js | 1 + index.js | 6 - public/index.html | 138 +- src/App.vue | 17 +- src/colorui/animation.css | 218 +- src/colorui/icon.css | 170 +- src/colorui/main.css | 3924 ++++++++--------- src/components/e-picker/e-picker.vue | 277 +- src/components/goods-list/list-A.vue | 165 +- src/components/goods-list/list-B.vue | 529 +-- src/components/goods-list/list-C.vue | 239 +- src/components/goods-list/list-D.vue | 166 +- src/components/he-clear-storage.vue | 192 +- src/components/he-empty-popup.vue | 138 +- src/components/he-html/he-html.vue | 264 +- src/components/he-html/node/node.vue | 662 +-- src/components/he-image.vue | 220 +- src/components/he-index-cart.vue | 100 +- src/components/he-line.vue | 112 +- src/components/he-load-more.vue | 316 +- src/components/he-loading.vue | 143 +- src/components/he-mask.vue | 181 +- src/components/he-navbar.vue | 495 ++- src/components/he-no-content-yet.vue | 93 +- src/components/he-number-box.vue | 552 +-- src/components/he-open-launch-weapp.vue | 75 + src/components/he-open-subscribe.vue | 111 +- src/components/he-popup.vue | 755 ++-- src/components/he-poster.vue | 351 +- src/components/he-products-featured.vue | 148 +- src/components/he-radio.vue | 66 +- src/components/he-select-address.vue | 385 +- src/components/he-share.vue | 322 +- src/components/he-specs/he-specs.vue | 6 +- src/components/he-swipe-action.vue | 434 +- src/components/he-switch.vue | 150 +- src/components/he-tell.vue | 26 +- src/components/he-toast.vue | 214 +- src/components/he-upload-image.vue | 112 +- src/components/pointer.less | 109 +- src/components/pointer.vue | 98 +- src/components/u-index-list.vue | 620 ++- src/components/user-newuser-coupon.vue | 61 +- src/leadshop/code/api.js | 196 +- src/leadshop/code/await-timeout.js | 15 +- src/leadshop/code/axios.js | 213 +- src/leadshop/code/cache.js | 123 +- src/leadshop/code/cloud.js | 162 +- src/leadshop/code/extend.js | 1005 ++--- src/leadshop/code/listToTree.js | 293 +- src/leadshop/code/md5.js | 447 +- src/leadshop/code/request.js | 254 +- src/leadshop/code/router.js | 584 ++- src/leadshop/code/utils.js | 244 +- src/leadshop/index.js | 255 +- src/leadshop/router/index.js | 147 +- src/leadshop/router/lib/hackRoute.js | 143 +- src/leadshop/router/lib/handleHooks.js | 282 +- src/leadshop/router/lib/index.js | 179 +- src/leadshop/store/apply.js | 87 +- src/leadshop/store/getters.js | 4 +- src/leadshop/store/index.js | 35 +- src/libs/base64src.js | 36 +- src/libs/function/$parent.js | 27 +- src/libs/function/MPageNavigate.js | 100 +- src/libs/function/addUnit.js | 6 +- src/libs/function/colorGradient.js | 201 +- src/libs/function/debounce.js | 24 +- src/libs/function/floatPrice.js | 33 +- src/libs/function/getQueryVariable.js | 18 +- src/libs/function/guid.js | 48 +- src/libs/function/resourceUrl.js | 14 +- src/libs/function/setTabBarItem.js | 89 +- src/libs/function/srcToBase64.js | 76 +- src/libs/function/test.js | 187 +- src/libs/function/timeFormat.js | 77 +- src/libs/function/toast.js | 16 +- src/libs/function/uniCopy.js | 80 +- src/libs/index.js | 76 +- src/libs/mixin/mixin.js | 2 +- src/libs/mixin/saveImageToPhotosAlbum.js | 93 +- src/main.js | 217 +- src/manifest.json | 89 +- src/pages.json | 199 +- src/pages/cart/index.vue | 136 +- src/pages/categories/component/index-b.vue | 2 +- src/pages/categories/component/index-c.vue | 2 +- src/pages/fitment/advertising/advertising.vue | 509 +-- src/pages/fitment/banner/banner.vue | 194 +- src/pages/fitment/banner/element.less | 48 +- src/pages/fitment/blank/blank.vue | 18 +- src/pages/fitment/common/covermask.vue | 81 +- src/pages/fitment/common/index.vue | 310 +- .../fitment/common/vuedraggable-helper.js | 40 +- src/pages/fitment/common/vuedraggable.js | 803 ++-- src/pages/fitment/common/widget.vue | 350 +- src/pages/fitment/coupon/coupon.vue | 107 +- src/pages/fitment/coupon/element.less | 358 +- src/pages/fitment/coupon/item.vue | 205 +- src/pages/fitment/goods/element.less | 354 +- src/pages/fitment/goods/goods.vue | 363 +- src/pages/fitment/navigation/element.less | 171 +- src/pages/fitment/navigation/navigation.vue | 565 ++- src/pages/fitment/notice/item.vue | 666 +-- src/pages/fitment/notice/notice.vue | 43 +- src/pages/fitment/rubik/element.less | 216 +- src/pages/fitment/rubik/rubik.vue | 1003 ++++- src/pages/fitment/search/element.less | 47 +- src/pages/fitment/search/search.vue | 135 +- src/pages/fitment/separate/separate.vue | 65 +- src/pages/fitment/tabs/element.less | 96 +- src/pages/fitment/tabs/tabs.vue | 57 +- src/pages/fitment/task/element.less | 53 +- src/pages/fitment/task/task.vue | 231 +- src/pages/fitment/title/element.less | 163 +- src/pages/fitment/title/title.vue | 157 +- src/pages/fitment/video/video.vue | 17 +- src/pages/fitment/wechat/wechat.vue | 135 +- src/pages/fitment/wechatLive/wechatLive.vue | 189 +- src/pages/goods/components/detail-args.vue | 100 + .../components/detail-basic-information.vue | 21 +- .../goods/components/detail-parameter.vue | 308 +- src/pages/goods/detail.vue | 28 +- src/pages/goods/evaluation.vue | 6 +- src/pages/goods/list.vue | 1 + src/pages/goods/search-list.vue | 383 +- src/pages/goods/search.vue | 250 +- src/pages/greet/index.vue | 56 +- src/pages/index/ad.vue | 655 +-- src/pages/index/components/favorites.vue | 50 +- src/pages/index/index.vue | 24 +- src/pages/live/index.vue | 714 +-- src/pages/order/after-sales-details.vue | 495 +-- src/pages/order/after-sales-records.vue | 630 +-- src/pages/order/apply-detail.vue | 139 +- src/pages/order/apply.vue | 225 +- .../components/applyDetail-operating.vue | 410 +- .../components/detail-bottom-operating.vue | 416 +- .../order/components/detail-product-info.vue | 97 +- src/pages/order/components/submit-button.vue | 221 +- src/pages/order/detail.vue | 20 +- src/pages/order/evaluation.vue | 507 ++- src/pages/order/fill-return-information.vue | 310 +- src/pages/order/index.vue | 108 +- src/pages/order/logistics.vue | 52 +- src/pages/order/submit.vue | 530 +-- src/pages/order/successful.vue | 803 ++-- src/pages/other/web.vue | 17 + src/pages/page/index.vue | 316 +- src/pages/user/components/user-features.vue | 359 +- src/pages/user/index.vue | 258 +- src/pages/user/login.vue | 281 +- src/plugins/task/components/browse.vue | 147 +- src/plugins/task/components/cartoon.vue | 34 +- src/plugins/task/components/popups.vue | 62 +- src/plugins/task/components/skeleton.vue | 312 +- src/plugins/task/index.vue | 560 +-- src/plugins/task/lists.vue | 277 +- src/plugins/task/mall.scss | 399 +- src/plugins/task/mall.vue | 129 +- src/plugins/task/rules.vue | 44 +- src/plugins/task/search-list.vue | 367 +- src/plugins/task/search.vue | 60 +- src/plugins/task/sort.vue | 123 +- src/plugins/task/store.js | 46 +- src/plugins/task/style.scss | 90 +- src/plugins/task/userinfo.vue | 276 +- src/resources.scss | 6 - src/siteinfo.js | 11 +- src/static/h5/js/wechat.js | 250 +- src/store/after.js | 8 +- src/store/cart.js | 97 +- src/store/components.js | 149 +- src/store/getters.js | 20 +- src/store/goods.js | 71 +- src/store/index.js | 42 +- src/store/order.js | 46 +- src/store/pages.js | 246 +- src/store/plugins.js | 137 +- src/store/setting.js | 157 +- src/store/user.js | 453 +- src/uni.scss | 88 +- src/utils/index.js | 25 +- src/utils/storageKey.js | 24 +- src/utils/zIndex.js | 18 +- src/version.js | 2 +- vue.config.js | 7 - 187 files changed, 21482 insertions(+), 19717 deletions(-) create mode 100644 src/components/he-open-launch-weapp.vue create mode 100644 src/pages/goods/components/detail-args.vue create mode 100644 src/pages/other/web.vue diff --git a/babel.config.js b/babel.config.js index 3ea7908..d4e6239 100644 --- a/babel.config.js +++ b/babel.config.js @@ -29,6 +29,7 @@ if ( } process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']; + process.UNI_LIBRARIES.forEach(libraryName => { plugins.push([ 'import', diff --git a/index.js b/index.js index d7452c6..e69de29 100644 --- a/index.js +++ b/index.js @@ -1,6 +0,0 @@ -/* -* @Author: qinuoyun -* @Date: 2020-12-09 14:19:45 -* @Last Modified by: qinuoyun -* @Last Modified time: 2021-01-06 15:44:29 -*/ diff --git a/public/index.html b/public/index.html index 60b1e07..590316e 100644 --- a/public/index.html +++ b/public/index.html @@ -1,67 +1,71 @@ - - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - - - - -
- - - - - \ No newline at end of file + + + + + + + <%= htmlWebpackPlugin.options.title %> + + + + + + +
+ + + + diff --git a/src/App.vue b/src/App.vue index 090a9a5..d6e50d8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,14 +1,7 @@ - diff --git a/src/colorui/animation.css b/src/colorui/animation.css index 931bb51..956e22e 100644 --- a/src/colorui/animation.css +++ b/src/colorui/animation.css @@ -1,184 +1,182 @@ -/* - Animation 微动画 +/* + Animation 微动画 基于ColorUI组建库的动画模块 by 文晓港 2019年3月26日19:52:28 */ /* css 滤镜 控制黑白底色gif的 */ -.gif-black{ - mix-blend-mode: screen; +.gif-black { + mix-blend-mode: screen; } -.gif-white{ - mix-blend-mode: multiply; +.gif-white { + mix-blend-mode: multiply; } - /* Animation css */ -[class*=animation-] { - animation-duration: .5s; - animation-timing-function: ease-out; - animation-fill-mode: both +[class*='animation-'] { + animation-duration: 0.5s; + animation-timing-function: ease-out; + animation-fill-mode: both; } .animation-fade { - animation-name: fade; - animation-duration: .8s; - animation-timing-function: linear + animation-name: fade; + animation-duration: 0.8s; + animation-timing-function: linear; } .animation-scale-up { - animation-name: scale-up + animation-name: scale-up; } .animation-scale-down { - animation-name: scale-down + animation-name: scale-down; } .animation-slide-top { - animation-name: slide-top + animation-name: slide-top; } .animation-slide-bottom { - animation-name: slide-bottom + animation-name: slide-bottom; } .animation-slide-left { - animation-name: slide-left + animation-name: slide-left; } .animation-slide-right { - animation-name: slide-right + animation-name: slide-right; } .animation-shake { - animation-name: shake + animation-name: shake; } .animation-reverse { - animation-direction: reverse + animation-direction: reverse; } @keyframes fade { - 0% { - opacity: 0 - } + 0% { + opacity: 0; + } - 100% { - opacity: 1 - } + 100% { + opacity: 1; + } } @keyframes scale-up { - 0% { - opacity: 0; - transform: scale(.2) - } + 0% { + opacity: 0; + transform: scale(0.2); + } - 100% { - opacity: 1; - transform: scale(1) - } + 100% { + opacity: 1; + transform: scale(1); + } } @keyframes scale-down { - 0% { - opacity: 0; - transform: scale(1.8) - } + 0% { + opacity: 0; + transform: scale(1.8); + } - 100% { - opacity: 1; - transform: scale(1) - } + 100% { + opacity: 1; + transform: scale(1); + } } @keyframes slide-top { - 0% { - opacity: 0; - transform: translateY(-100%) - } + 0% { + opacity: 0; + transform: translateY(-100%); + } - 100% { - opacity: 1; - transform: translateY(0) - } + 100% { + opacity: 1; + transform: translateY(0); + } } @keyframes slide-bottom { - 0% { - opacity: 0; - transform: translateY(100%) - } + 0% { + opacity: 0; + transform: translateY(100%); + } - 100% { - opacity: 1; - transform: translateY(0) - } + 100% { + opacity: 1; + transform: translateY(0); + } } @keyframes shake { + 0%, + 100% { + transform: translateX(0); + } - 0%, - 100% { - transform: translateX(0) - } - - 10% { - transform: translateX(-9px) - } + 10% { + transform: translateX(-9px); + } - 20% { - transform: translateX(8px) - } + 20% { + transform: translateX(8px); + } - 30% { - transform: translateX(-7px) - } + 30% { + transform: translateX(-7px); + } - 40% { - transform: translateX(6px) - } + 40% { + transform: translateX(6px); + } - 50% { - transform: translateX(-5px) - } + 50% { + transform: translateX(-5px); + } - 60% { - transform: translateX(4px) - } + 60% { + transform: translateX(4px); + } - 70% { - transform: translateX(-3px) - } + 70% { + transform: translateX(-3px); + } - 80% { - transform: translateX(2px) - } + 80% { + transform: translateX(2px); + } - 90% { - transform: translateX(-1px) - } + 90% { + transform: translateX(-1px); + } } @keyframes slide-left { - 0% { - opacity: 0; - transform: translateX(-100%) - } + 0% { + opacity: 0; + transform: translateX(-100%); + } - 100% { - opacity: 1; - transform: translateX(0) - } + 100% { + opacity: 1; + transform: translateX(0); + } } @keyframes slide-right { - 0% { - opacity: 0; - transform: translateX(100%) - } - - 100% { - opacity: 1; - transform: translateX(0) - } -} \ No newline at end of file + 0% { + opacity: 0; + transform: translateX(100%); + } + + 100% { + opacity: 1; + transform: translateX(0); + } +} diff --git a/src/colorui/icon.css b/src/colorui/icon.css index 59f503a..b7acd81 100644 --- a/src/colorui/icon.css +++ b/src/colorui/icon.css @@ -1,42 +1,42 @@ @keyframes cuIcon-spin { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - } + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } } .cuIconfont-spin { - -webkit-animation: cuIcon-spin 2s infinite linear; - animation: cuIcon-spin 2s infinite linear; - display: inline-block; + -webkit-animation: cuIcon-spin 2s infinite linear; + animation: cuIcon-spin 2s infinite linear; + display: inline-block; } .cuIconfont-pulse { - -webkit-animation: cuIcon-spin 1s infinite steps(8); - animation: cuIcon-spin 1s infinite steps(8); - display: inline-block; + -webkit-animation: cuIcon-spin 1s infinite steps(8); + animation: cuIcon-spin 1s infinite steps(8); + display: inline-block; } -[class*="cuIcon-"] { - font-family: "cuIcon"; - font-size: inherit; - font-style: normal; +[class*='cuIcon-'] { + font-family: 'cuIcon'; + font-size: inherit; + font-style: normal; } @font-face { - font-family: "iconfont"; /* Project id 2111115 */ + font-family: 'iconfont'; /* Project id 2111115 */ src: url('//at.alicdn.com/t/font_2111115_dpap8l2ayc8.woff2?t=1625016472123') format('woff2'), - url('//at.alicdn.com/t/font_2111115_dpap8l2ayc8.woff?t=1625016472123') format('woff'), - url('//at.alicdn.com/t/font_2111115_dpap8l2ayc8.ttf?t=1625016472123') format('truetype'); + url('//at.alicdn.com/t/font_2111115_dpap8l2ayc8.woff?t=1625016472123') format('woff'), + url('//at.alicdn.com/t/font_2111115_dpap8l2ayc8.ttf?t=1625016472123') format('truetype'); } .iconfont { - font-family: "iconfont" !important; + font-family: 'iconfont' !important; font-size: 16px; font-style: normal; -webkit-font-smoothing: antialiased; @@ -44,253 +44,253 @@ } .iconpopup_close2:before { - content: "\e6d0"; + content: '\e6d0'; } .iconsuccess:before { - content: "\e6ce"; + content: '\e6ce'; } .iconwarning:before { - content: "\e6cf"; + content: '\e6cf'; } .iconfold:before { - content: "\e6cd"; + content: '\e6cd'; } .iconlike1:before { - content: "\e6cb"; + content: '\e6cb'; } .iconlike2:before { - content: "\e6cc"; + content: '\e6cc'; } .icondistribution_dynamic:before { - content: "\e6c9"; + content: '\e6c9'; } .icondistribution_list:before { - content: "\e6ca"; + content: '\e6ca'; } .icona-personalcenter_distribution:before { - content: "\e6c8"; + content: '\e6c8'; } .iconpersonalcenter_information:before { - content: "\e6c7"; + content: '\e6c7'; } .iconbofang:before { - content: "\e600"; + content: '\e600'; } .iconpersonalcenter_phone2:before { - content: "\e6c5"; + content: '\e6c5'; } .iconpersonalcenter_add:before { - content: "\e6c6"; + content: '\e6c6'; } .icontuijian:before { - content: "\e6b2"; + content: '\e6b2'; } .iconjifen:before { - content: "\e6ab"; + content: '\e6ab'; } .icongonggao:before { - content: "\e6a8"; + content: '\e6a8'; } .iconbtn_back:before { - content: "\e691"; + content: '\e691'; } .iconimago_loadingfail:before { - content: "\e690"; + content: '\e690'; } .iconpersonalcenter_phone:before { - content: "\e67a"; + content: '\e67a'; } .iconarrow-down:before { - content: "\e601"; + content: '\e601'; } .icontrash:before { - content: "\e61a"; + content: '\e61a'; } .iconarrow-top:before { - content: "\e62b"; + content: '\e62b'; } .iconcopy:before { - content: "\e63a"; + content: '\e63a'; } .iconproductlist_rank_second:before { - content: "\e69e"; + content: '\e69e'; } .iconproductlist_rank_first:before { - content: "\e69f"; + content: '\e69f'; } .iconnav_classification_normal:before { - content: "\e671"; + content: '\e671'; } .iconproductdetails_tab_customerservice:before { - content: "\e673"; + content: '\e673'; } .iconnav_personalcenter_normal:before { - content: "\e674"; + content: '\e674'; } .iconsearch_empty:before { - content: "\e675"; + content: '\e675'; } .iconproductdetails_goodsservices:before { - content: "\e676"; + content: '\e676'; } .iconproductdetails_tab_customerservice_online:before { - content: "\e677"; + content: '\e677'; } .iconproductdetails_popup_enlargethepicture:before { - content: "\e678"; + content: '\e678'; } .iconproductdetails_share:before { - content: "\e67c"; + content: '\e67c'; } .iconproductdetails_tab_customerservice_telephone:before { - content: "\e67d"; + content: '\e67d'; } .iconbtn_addtocart:before { - content: "\e67e"; + content: '\e67e'; } .iconimago_defaultproduct:before { - content: "\e67f"; + content: '\e67f'; } .iconsearchbar_search:before { - content: "\e680"; + content: '\e680'; } .iconaddress_wechataddress:before { - content: "\e685"; + content: '\e685'; } .iconpersonalcenter_address:before { - content: "\e686"; + content: '\e686'; } .iconpersonalcenter_contactus:before { - content: "\e688"; + content: '\e688'; } .iconorderdetails_logistics:before { - content: "\e689"; + content: '\e689'; } .iconshoppingcart_shopname:before { - content: "\e68a"; + content: '\e68a'; } .iconproductrecommendation_line:before { - content: "\e68b"; + content: '\e68b'; } .iconevaluate_uploadpictures_deleto:before { - content: "\e68c"; + content: '\e68c'; } .iconevaluate_uploadpictures:before { - content: "\e68d"; + content: '\e68d'; } .iconclassification_line:before { - content: "\e68e"; + content: '\e68e'; } .iconpersonalcenter_clearcache:before { - content: "\e68f"; + content: '\e68f'; } .iconaftersalesdetails-refund:before { - content: "\e692"; + content: '\e692'; } .iconaftersalesdetails-exchangegoods:before { - content: "\e694"; + content: '\e694'; } .iconaftersalesdetails-returngoods:before { - content: "\e696"; + content: '\e696'; } .iconbtn_subtract:before { - content: "\e697"; + content: '\e697'; } .iconbtn_add:before { - content: "\e698"; + content: '\e698'; } .iconpopup_close:before { - content: "\e699"; + content: '\e699'; } .iconevaluate_star:before { - content: "\e69a"; + content: '\e69a'; } .iconbtn_arrow:before { - content: "\e69b"; + content: '\e69b'; } .iconaddress_edit:before { - content: "\e69c"; + content: '\e69c'; } .iconbtn_select:before { - content: "\e69d"; + content: '\e69d'; } .iconnav_home_selected:before { - content: "\e66a"; + content: '\e66a'; } .iconnav_personalcenter_selected:before { - content: "\e66c"; + content: '\e66c'; } .iconnav_shoppingcart_normal:before { - content: "\e66d"; + content: '\e66d'; } .iconnav_home_normal:before { - content: "\e66e"; + content: '\e66e'; } .iconnav_classification_selected:before { - content: "\e66f"; + content: '\e66f'; } .iconnav_shoppingcart_selected:before { - content: "\e670"; + content: '\e670'; } diff --git a/src/colorui/main.css b/src/colorui/main.css index 1d16dac..b691113 100644 --- a/src/colorui/main.css +++ b/src/colorui/main.css @@ -1,20 +1,11 @@ -/* - ColorUi for uniApp v2.1.6 | by 文晓港 2019-05-31 10:44:24 - 仅供学习交流,如作它用所承受的法律责任一概与作者无关 - - *使用ColorUi开发扩展与插件时,请注明基于ColorUi开发 - - (QQ交流群:240787041) -*/ - /* ================== 初始化 ==================== */ body { - background-color: transparentl; - font-size: 28upx; - color: #333333; - font-family: Helvetica Neue, Helvetica, sans-serif; + background-color: transparentl; + font-size: 28upx; + color: #333333; + font-family: Helvetica Neue, Helvetica, sans-serif; } view, @@ -26,15 +17,15 @@ textarea, label, navigator, image { - box-sizing: border-box; + box-sizing: border-box; } .round { - border-radius: 5000upx; + border-radius: 5000upx; } .radius { - border-radius: 6upx; + border-radius: 6upx; } /* ================== @@ -42,44 +33,44 @@ image { ==================== */ image { - max-width: 100%; - display: inline-block; - position: relative; - z-index: 0; + max-width: 100%; + display: inline-block; + position: relative; + z-index: 0; } image.loading::before { - content: ""; - background-color: #f5f5f5; - display: block; - position: absolute; - width: 100%; - height: 100%; - z-index: -2; + content: ''; + background-color: #f5f5f5; + display: block; + position: absolute; + width: 100%; + height: 100%; + z-index: -2; } image.loading::after { - content: "\e7f1"; - font-family: "cuIcon"; - position: absolute; - top: 0; - left: 0; - width: 32upx; - height: 32upx; - line-height: 32upx; - right: 0; - bottom: 0; - z-index: -1; - font-size: 32upx; - margin: auto; - color: #ccc; - -webkit-animation: cuIcon-spin 2s infinite linear; - animation: cuIcon-spin 2s infinite linear; - display: block; + content: '\e7f1'; + font-family: 'cuIcon'; + position: absolute; + top: 0; + left: 0; + width: 32upx; + height: 32upx; + line-height: 32upx; + right: 0; + bottom: 0; + z-index: -1; + font-size: 32upx; + margin: auto; + color: #ccc; + -webkit-animation: cuIcon-spin 2s infinite linear; + animation: cuIcon-spin 2s infinite linear; + display: block; } .response { - width: 100%; + width: 100%; } /* ================== @@ -89,135 +80,133 @@ image.loading::after { switch, checkbox, radio { - position: relative; + position: relative; } switch::after, switch::before { - font-family: "cuIcon"; - content: "\e645"; - position: absolute; - color: #ffffff !important; - top: 0%; - left: 0upx; - font-size: 26upx; - line-height: 26px; - width: 50%; - text-align: center; - pointer-events: none; - transform: scale(0, 0); - transition: all 0.3s ease-in-out 0s; - z-index: 9; - bottom: 0; - height: 26px; - margin: auto; + font-family: 'cuIcon'; + content: '\e645'; + position: absolute; + color: #ffffff !important; + top: 0%; + left: 0upx; + font-size: 26upx; + line-height: 26px; + width: 50%; + text-align: center; + pointer-events: none; + transform: scale(0, 0); + transition: all 0.3s ease-in-out 0s; + z-index: 9; + bottom: 0; + height: 26px; + margin: auto; } switch::before { - content: "\e646"; - right: 0; - transform: scale(1, 1); - left: auto; + content: '\e646'; + right: 0; + transform: scale(1, 1); + left: auto; } switch[checked]::after, switch.checked::after { - transform: scale(1, 1); + transform: scale(1, 1); } switch[checked]::before, switch.checked::before { - transform: scale(0, 0); + transform: scale(0, 0); } /* #ifndef MP-ALIPAY */ radio::before, checkbox::before { - font-family: "cuIcon"; - content: "\e645"; - position: absolute; - color: #ffffff !important; - top: 50%; - margin-top: -8px; - right: 5px; - font-size: 32upx; - line-height: 16px; - pointer-events: none; - transform: scale(1, 1); - transition: all 0.3s ease-in-out 0s; - z-index: 9; + font-family: 'cuIcon'; + content: '\e645'; + position: absolute; + color: #ffffff !important; + top: 50%; + margin-top: -8px; + right: 5px; + font-size: 32upx; + line-height: 16px; + pointer-events: none; + transform: scale(1, 1); + transition: all 0.3s ease-in-out 0s; + z-index: 9; } radio .wx-radio-input, checkbox .wx-checkbox-input, radio .uni-radio-input, checkbox .uni-checkbox-input { - margin: 0; - width: 24px; - height: 24px; + margin: 0; + width: 24px; + height: 24px; } checkbox.round .wx-checkbox-input, checkbox.round .uni-checkbox-input { - border-radius: 100upx; + border-radius: 100upx; } /* #endif */ switch[checked]::before { - transform: scale(0, 0); + transform: scale(0, 0); } switch .wx-switch-input, switch .uni-switch-input { - border: none; - padding: 0 24px; - width: 48px; - height: 26px; - margin: 0; - border-radius: 100upx; + border: none; + padding: 0 24px; + width: 48px; + height: 26px; + margin: 0; + border-radius: 100upx; } -switch .wx-switch-input:not([class*="bg-"]), -switch .uni-switch-input:not([class*="bg-"]) { - background: #8799a3 !important; +switch .wx-switch-input:not([class*='bg-']), +switch .uni-switch-input:not([class*='bg-']) { + background: #8799a3 !important; } switch .wx-switch-input::after, switch .uni-switch-input::after { - margin: auto; - width: 26px; - height: 26px; - border-radius: 100upx; - left: 0upx; - top: 0upx; - bottom: 0upx; - position: absolute; - transform: scale(0.9, 0.9); - transition: all 0.1s ease-in-out 0s; + margin: auto; + width: 26px; + height: 26px; + border-radius: 100upx; + left: 0upx; + top: 0upx; + bottom: 0upx; + position: absolute; + transform: scale(0.9, 0.9); + transition: all 0.1s ease-in-out 0s; } switch .wx-switch-input.wx-switch-input-checked::after, switch .uni-switch-input.uni-switch-input-checked::after { - margin: auto; - left: 22px; - box-shadow: none; - transform: scale(0.9, 0.9); + margin: auto; + left: 22px; + box-shadow: none; + transform: scale(0.9, 0.9); } radio-group { - display: inline-block; + display: inline-block; } - - switch.radius .wx-switch-input::after, switch.radius .wx-switch-input, switch.radius .wx-switch-input::before, switch.radius .uni-switch-input::after, switch.radius .uni-switch-input, switch.radius .uni-switch-input::before { - border-radius: 10upx; + border-radius: 10upx; } switch .wx-switch-input::before, @@ -228,51 +217,51 @@ switch .uni-switch-input::before, radio.radio::before, checkbox .uni-checkbox-input::before, radio .uni-radio-input::before { - display: none; + display: none; } radio.radio[checked]::after, radio.radio .uni-radio-input-checked::after { - content: ""; - background-color: transparent; - display: block; - position: absolute; - width: 8px; - height: 8px; - z-index: 999; - top: 0upx; - left: 0upx; - right: 0; - bottom: 0; - margin: auto; - border-radius: 200upx; - /* #ifndef MP */ - border: 7px solid #ffffff !important; - /* #endif */ - - /* #ifdef MP */ - border: 8px solid #ffffff !important; - /* #endif */ + content: ''; + background-color: transparent; + display: block; + position: absolute; + width: 8px; + height: 8px; + z-index: 999; + top: 0upx; + left: 0upx; + right: 0; + bottom: 0; + margin: auto; + border-radius: 200upx; + /* #ifndef MP */ + border: 7px solid #ffffff !important; + /* #endif */ + + /* #ifdef MP */ + border: 8px solid #ffffff !important; + /* #endif */ } .switch-sex::after { - content: "\e71c"; + content: '\e71c'; } .switch-sex::before { - content: "\e71a"; + content: '\e71a'; } .switch-sex .wx-switch-input, .switch-sex .uni-switch-input { - background: #e54d42 !important; - border-color: #e54d42 !important; + background: #e54d42 !important; + border-color: #e54d42 !important; } .switch-sex[checked] .wx-switch-input, .switch-sex.checked .uni-switch-input { - background: #0081ff !important; - border-color: #0081ff !important; + background: #0081ff !important; + border-color: #0081ff !important; } switch.red[checked] .wx-switch-input.wx-switch-input-checked, @@ -281,9 +270,9 @@ radio.red[checked] .wx-radio-input, switch.red.checked .uni-switch-input.uni-switch-input-checked, checkbox.red.checked .uni-checkbox-input, radio.red.checked .uni-radio-input { - background-color: #e54d42 !important; - border-color: #e54d42 !important; - color: #ffffff !important; + background-color: #e54d42 !important; + border-color: #e54d42 !important; + color: #ffffff !important; } switch.orange[checked] .wx-switch-input, @@ -292,9 +281,9 @@ radio.orange[checked] .wx-radio-input, switch.orange.checked .uni-switch-input, checkbox.orange.checked .uni-checkbox-input, radio.orange.checked .uni-radio-input { - background-color: #f37b1d !important; - border-color: #f37b1d !important; - color: #ffffff !important; + background-color: #f37b1d !important; + border-color: #f37b1d !important; + color: #ffffff !important; } switch.yellow[checked] .wx-switch-input, @@ -303,9 +292,9 @@ radio.yellow[checked] .wx-radio-input, switch.yellow.checked .uni-switch-input, checkbox.yellow.checked .uni-checkbox-input, radio.yellow.checked .uni-radio-input { - background-color: #fbbd08 !important; - border-color: #fbbd08 !important; - color: #333333 !important; + background-color: #fbbd08 !important; + border-color: #fbbd08 !important; + color: #333333 !important; } switch.olive[checked] .wx-switch-input, @@ -314,9 +303,9 @@ radio.olive[checked] .wx-radio-input, switch.olive.checked .uni-switch-input, checkbox.olive.checked .uni-checkbox-input, radio.olive.checked .uni-radio-input { - background-color: #8dc63f !important; - border-color: #8dc63f !important; - color: #ffffff !important; + background-color: #8dc63f !important; + border-color: #8dc63f !important; + color: #ffffff !important; } switch.green[checked] .wx-switch-input, @@ -331,10 +320,10 @@ checkbox.green.checked .uni-checkbox-input, checkbox.checked .uni-checkbox-input, radio.green.checked .uni-radio-input, radio.checked .uni-radio-input { - background-color: #39b54a !important; - border-color: #39b54a !important; - color: #ffffff !important; - border-color: #39B54A !important; + background-color: #39b54a !important; + border-color: #39b54a !important; + color: #ffffff !important; + border-color: #39b54a !important; } switch.cyan[checked] .wx-switch-input, @@ -343,9 +332,9 @@ radio.cyan[checked] .wx-radio-input, switch.cyan.checked .uni-switch-input, checkbox.cyan.checked .uni-checkbox-input, radio.cyan.checked .uni-radio-input { - background-color: #1cbbb4 !important; - border-color: #1cbbb4 !important; - color: #ffffff !important; + background-color: #1cbbb4 !important; + border-color: #1cbbb4 !important; + color: #ffffff !important; } switch.blue[checked] .wx-switch-input, @@ -354,9 +343,9 @@ radio.blue[checked] .wx-radio-input, switch.blue.checked .uni-switch-input, checkbox.blue.checked .uni-checkbox-input, radio.blue.checked .uni-radio-input { - background-color: #0081ff !important; - border-color: #0081ff !important; - color: #ffffff !important; + background-color: #0081ff !important; + border-color: #0081ff !important; + color: #ffffff !important; } switch.purple[checked] .wx-switch-input, @@ -365,9 +354,9 @@ radio.purple[checked] .wx-radio-input, switch.purple.checked .uni-switch-input, checkbox.purple.checked .uni-checkbox-input, radio.purple.checked .uni-radio-input { - background-color: #6739b6 !important; - border-color: #6739b6 !important; - color: #ffffff !important; + background-color: #6739b6 !important; + border-color: #6739b6 !important; + color: #ffffff !important; } switch.mauve[checked] .wx-switch-input, @@ -376,9 +365,9 @@ radio.mauve[checked] .wx-radio-input, switch.mauve.checked .uni-switch-input, checkbox.mauve.checked .uni-checkbox-input, radio.mauve.checked .uni-radio-input { - background-color: #9c26b0 !important; - border-color: #9c26b0 !important; - color: #ffffff !important; + background-color: #9c26b0 !important; + border-color: #9c26b0 !important; + color: #ffffff !important; } switch.pink[checked] .wx-switch-input, @@ -387,9 +376,9 @@ radio.pink[checked] .wx-radio-input, switch.pink.checked .uni-switch-input, checkbox.pink.checked .uni-checkbox-input, radio.pink.checked .uni-radio-input { - background-color: #e03997 !important; - border-color: #e03997 !important; - color: #ffffff !important; + background-color: #e03997 !important; + border-color: #e03997 !important; + color: #ffffff !important; } switch.brown[checked] .wx-switch-input, @@ -398,9 +387,9 @@ radio.brown[checked] .wx-radio-input, switch.brown.checked .uni-switch-input, checkbox.brown.checked .uni-checkbox-input, radio.brown.checked .uni-radio-input { - background-color: #a5673f !important; - border-color: #a5673f !important; - color: #ffffff !important; + background-color: #a5673f !important; + border-color: #a5673f !important; + color: #ffffff !important; } switch.grey[checked] .wx-switch-input, @@ -409,9 +398,9 @@ radio.grey[checked] .wx-radio-input, switch.grey.checked .uni-switch-input, checkbox.grey.checked .uni-checkbox-input, radio.grey.checked .uni-radio-input { - background-color: #8799a3 !important; - border-color: #8799a3 !important; - color: #ffffff !important; + background-color: #8799a3 !important; + border-color: #8799a3 !important; + color: #ffffff !important; } switch.gray[checked] .wx-switch-input, @@ -420,9 +409,9 @@ radio.gray[checked] .wx-radio-input, switch.gray.checked .uni-switch-input, checkbox.gray.checked .uni-checkbox-input, radio.gray.checked .uni-radio-input { - background-color: #f0f0f0 !important; - border-color: #f0f0f0 !important; - color: #333333 !important; + background-color: #f0f0f0 !important; + border-color: #f0f0f0 !important; + color: #333333 !important; } switch.black[checked] .wx-switch-input, @@ -431,9 +420,9 @@ radio.black[checked] .wx-radio-input, switch.black.checked .uni-switch-input, checkbox.black.checked .uni-checkbox-input, radio.black.checked .uni-radio-input { - background-color: #333333 !important; - border-color: #333333 !important; - color: #ffffff !important; + background-color: #333333 !important; + border-color: #333333 !important; + color: #ffffff !important; } switch.white[checked] .wx-switch-input, @@ -442,9 +431,9 @@ radio.white[checked] .wx-radio-input, switch.white.checked .uni-switch-input, checkbox.white.checked .uni-checkbox-input, radio.white.checked .uni-radio-input { - background-color: #ffffff !important; - border-color: #ffffff !important; - color: #333333 !important; + background-color: #ffffff !important; + border-color: #ffffff !important; + color: #333333 !important; } /* ================== @@ -468,7 +457,7 @@ radio.white.checked .uni-radio-input { .dashed-right, .dashed-bottom, .dashed-left { - position: relative; + position: relative; } .solid::after, @@ -486,134 +475,134 @@ radio.white.checked .uni-radio-input { .dashed-right::after, .dashed-bottom::after, .dashed-left::after { - content: " "; - width: 200%; - height: 200%; - position: absolute; - top: 0; - left: 0; - border-radius: inherit; - transform: scale(0.5); - transform-origin: 0 0; - pointer-events: none; - box-sizing: border-box; + content: ' '; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border-radius: inherit; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; } .solid::after { - border: 1upx solid rgba(0, 0, 0, 0.1); + border: 1upx solid rgba(0, 0, 0, 0.1); } .solid-top::after { - border-top: 1upx solid rgba(0, 0, 0, 0.1); + border-top: 1upx solid rgba(0, 0, 0, 0.1); } .solid-right::after { - border-right: 1upx solid rgba(0, 0, 0, 0.1); + border-right: 1upx solid rgba(0, 0, 0, 0.1); } .solid-bottom::after { - border-bottom: 1upx solid rgba(0, 0, 0, 0.1); + border-bottom: 1upx solid rgba(0, 0, 0, 0.1); } .solid-left::after { - border-left: 1upx solid rgba(0, 0, 0, 0.1); + border-left: 1upx solid rgba(0, 0, 0, 0.1); } .solids::after { - border: 8upx solid #eee; + border: 8upx solid #eee; } .solids-top::after { - border-top: 8upx solid #eee; + border-top: 8upx solid #eee; } .solids-right::after { - border-right: 8upx solid #eee; + border-right: 8upx solid #eee; } .solids-bottom::after { - border-bottom: 8upx solid #eee; + border-bottom: 8upx solid #eee; } .solids-left::after { - border-left: 8upx solid #eee; + border-left: 8upx solid #eee; } /* -- 虚线 -- */ .dashed::after { - border: 1upx dashed #ddd; + border: 1upx dashed #ddd; } .dashed-top::after { - border-top: 1upx dashed #ddd; + border-top: 1upx dashed #ddd; } .dashed-right::after { - border-right: 1upx dashed #ddd; + border-right: 1upx dashed #ddd; } .dashed-bottom::after { - border-bottom: 1upx dashed #ddd; + border-bottom: 1upx dashed #ddd; } .dashed-left::after { - border-left: 1upx dashed #ddd; + border-left: 1upx dashed #ddd; } /* -- 阴影 -- */ .shadow[class*='white'] { - --ShadowSize: 0 1upx 6upx; + --ShadowSize: 0 1upx 6upx; } .shadow-lg { - --ShadowSize: 0upx 40upx 100upx 0upx; + --ShadowSize: 0upx 40upx 100upx 0upx; } .shadow-warp { - position: relative; - box-shadow: 0 0 10upx rgba(0, 0, 0, 0.1); + position: relative; + box-shadow: 0 0 10upx rgba(0, 0, 0, 0.1); } .shadow-warp:before, .shadow-warp:after { - position: absolute; - content: ""; - top: 20upx; - bottom: 30upx; - left: 20upx; - width: 50%; - box-shadow: 0 30upx 20upx rgba(0, 0, 0, 0.2); - transform: rotate(-3deg); - z-index: -1; + position: absolute; + content: ''; + top: 20upx; + bottom: 30upx; + left: 20upx; + width: 50%; + box-shadow: 0 30upx 20upx rgba(0, 0, 0, 0.2); + transform: rotate(-3deg); + z-index: -1; } .shadow-warp:after { - right: 20upx; - left: auto; - transform: rotate(3deg); + right: 20upx; + left: auto; + transform: rotate(3deg); } .shadow-blur { - position: relative; + position: relative; } .shadow-blur::before { - content: ""; - display: block; - background: inherit; - filter: blur(10upx); - position: absolute; - width: 100%; - height: 100%; - top: 10upx; - left: 10upx; - z-index: -1; - opacity: 0.4; - transform-origin: 0 0; - border-radius: inherit; - transform: scale(1, 1); + content: ''; + display: block; + background: inherit; + filter: blur(10upx); + position: absolute; + width: 100%; + height: 100%; + top: 10upx; + left: 10upx; + z-index: -1; + opacity: 0.4; + transform-origin: 0 0; + border-radius: inherit; + transform: scale(1, 1); } /* ================== @@ -621,116 +610,116 @@ radio.white.checked .uni-radio-input { ==================== */ .cu-btn { - position: relative; - border: 0upx; - display: inline-flex; - align-items: center; - justify-content: center; - box-sizing: border-box; - padding: 0 30upx; - font-size: 28upx; - height: 64upx; - line-height: 1; - text-align: center; - text-decoration: none; - overflow: visible; - margin-left: initial; - transform: translate(0upx, 0upx); - margin-right: initial; + position: relative; + border: 0upx; + display: inline-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 0 30upx; + font-size: 28upx; + height: 64upx; + line-height: 1; + text-align: center; + text-decoration: none; + overflow: visible; + margin-left: initial; + transform: translate(0upx, 0upx); + margin-right: initial; } .cu-btn::after { - display: none; + display: none; } -.cu-btn:not([class*="bg-"]) { - background-color: #f0f0f0; +.cu-btn:not([class*='bg-']) { + background-color: #f0f0f0; } -.cu-btn[class*="line"] { - background-color: transparent; +.cu-btn[class*='line'] { + background-color: transparent; } -.cu-btn[class*="line"]::after { - content: " "; - display: block; - width: 200%; - height: 200%; - position: absolute; - top: 0; - left: 0; - border: 1upx solid currentColor; - transform: scale(0.5); - transform-origin: 0 0; - box-sizing: border-box; - border-radius: 12upx; - z-index: 1; - pointer-events: none; +.cu-btn[class*='line']::after { + content: ' '; + display: block; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border: 1upx solid currentColor; + transform: scale(0.5); + transform-origin: 0 0; + box-sizing: border-box; + border-radius: 12upx; + z-index: 1; + pointer-events: none; } -.cu-btn.round[class*="line"]::after { - border-radius: 1000upx; +.cu-btn.round[class*='line']::after { + border-radius: 1000upx; } -.cu-btn[class*="lines"]::after { - border: 6upx solid currentColor; +.cu-btn[class*='lines']::after { + border: 6upx solid currentColor; } -.cu-btn[class*="bg-"]::after { - display: none; +.cu-btn[class*='bg-']::after { + display: none; } .cu-btn.sm { - padding: 0 20upx; - font-size: 20upx; - height: 48upx; + padding: 0 20upx; + font-size: 20upx; + height: 48upx; } .cu-btn.lg { - padding: 0 40upx; - font-size: 32upx; - height: 80upx; + padding: 0 40upx; + font-size: 32upx; + height: 80upx; } .cu-btn.cuIcon.sm { - width: 48upx; - height: 48upx; + width: 48upx; + height: 48upx; } .cu-btn.cuIcon { - width: 64upx; - height: 64upx; - border-radius: 500upx; - padding: 0; + width: 64upx; + height: 64upx; + border-radius: 500upx; + padding: 0; } button.cuIcon.lg { - width: 80upx; - height: 80upx; + width: 80upx; + height: 80upx; } .cu-btn.shadow-blur::before { - top: 4upx; - left: 4upx; - filter: blur(6upx); - opacity: 0.6; + top: 4upx; + left: 4upx; + filter: blur(6upx); + opacity: 0.6; } .cu-btn.button-hover { - transform: translate(1upx, 1upx); + transform: translate(1upx, 1upx); } .block { - display: block; + display: block; } .cu-btn.block { - display: flex; + display: flex; } .cu-btn[disabled] { - opacity: 0.6; - color: #ffffff; + opacity: 0.6; + color: #ffffff; } /* ================== @@ -738,134 +727,134 @@ button.cuIcon.lg { ==================== */ .cu-tag { - font-size: 24upx; - vertical-align: middle; - position: relative; - display: inline-flex; - align-items: center; - justify-content: center; - box-sizing: border-box; - padding: 0upx 16upx; - height: 48upx; - font-family: Helvetica Neue, Helvetica, sans-serif; - white-space: nowrap; -} - -.cu-tag:not([class*="bg"]):not([class*="line"]) { - background-color: #f1f1f1; + font-size: 24upx; + vertical-align: middle; + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 0upx 16upx; + height: 48upx; + font-family: Helvetica Neue, Helvetica, sans-serif; + white-space: nowrap; +} + +.cu-tag:not([class*='bg']):not([class*='line']) { + background-color: #f1f1f1; } -.cu-tag[class*="line-"]::after { - content: " "; - width: 200%; - height: 200%; - position: absolute; - top: 0; - left: 0; - border: 1upx solid currentColor; - transform: scale(0.5); - transform-origin: 0 0; - box-sizing: border-box; - border-radius: inherit; - z-index: 1; - pointer-events: none; +.cu-tag[class*='line-']::after { + content: ' '; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border: 1upx solid currentColor; + transform: scale(0.5); + transform-origin: 0 0; + box-sizing: border-box; + border-radius: inherit; + z-index: 1; + pointer-events: none; } -.cu-tag.radius[class*="line"]::after { - border-radius: 12upx; +.cu-tag.radius[class*='line']::after { + border-radius: 12upx; } -.cu-tag.round[class*="line"]::after { - border-radius: 1000upx; +.cu-tag.round[class*='line']::after { + border-radius: 1000upx; } -.cu-tag[class*="line-"]::after { - border-radius: 0; +.cu-tag[class*='line-']::after { + border-radius: 0; } -.cu-tag+.cu-tag { - margin-left: 10upx; +.cu-tag + .cu-tag { + margin-left: 10upx; } .cu-tag.sm { - font-size: 20upx; - padding: 0upx 12upx; - height: 32upx; + font-size: 20upx; + padding: 0upx 12upx; + height: 32upx; } .cu-capsule { - display: inline-flex; - vertical-align: middle; + display: inline-flex; + vertical-align: middle; } -.cu-capsule+.cu-capsule { - margin-left: 10upx; +.cu-capsule + .cu-capsule { + margin-left: 10upx; } .cu-capsule .cu-tag { - margin: 0; + margin: 0; } -.cu-capsule .cu-tag[class*="line-"]:last-child::after { - border-left: 0upx solid transparent; +.cu-capsule .cu-tag[class*='line-']:last-child::after { + border-left: 0upx solid transparent; } -.cu-capsule .cu-tag[class*="line-"]:first-child::after { - border-right: 0upx solid transparent; +.cu-capsule .cu-tag[class*='line-']:first-child::after { + border-right: 0upx solid transparent; } .cu-capsule.radius .cu-tag:first-child { - border-top-left-radius: 6upx; - border-bottom-left-radius: 6upx; + border-top-left-radius: 6upx; + border-bottom-left-radius: 6upx; } .cu-capsule.radius .cu-tag:last-child::after, -.cu-capsule.radius .cu-tag[class*="line-"] { - border-top-right-radius: 12upx; - border-bottom-right-radius: 12upx; +.cu-capsule.radius .cu-tag[class*='line-'] { + border-top-right-radius: 12upx; + border-bottom-right-radius: 12upx; } .cu-capsule.round .cu-tag:first-child { - border-top-left-radius: 200upx; - border-bottom-left-radius: 200upx; - text-indent: 4upx; + border-top-left-radius: 200upx; + border-bottom-left-radius: 200upx; + text-indent: 4upx; } .cu-capsule.round .cu-tag:last-child::after, .cu-capsule.round .cu-tag:last-child { - border-top-right-radius: 200upx; - border-bottom-right-radius: 200upx; - text-indent: -4upx; + border-top-right-radius: 200upx; + border-bottom-right-radius: 200upx; + text-indent: -4upx; } .cu-tag.badge { - border-radius: 200upx; - position: absolute; - top: -10upx; - right: -10upx; - font-size: 20upx; - padding: 0upx 10upx; - height: 28upx; - color: #ffffff; + border-radius: 200upx; + position: absolute; + top: -10upx; + right: -10upx; + font-size: 20upx; + padding: 0upx 10upx; + height: 28upx; + color: #ffffff; } -.cu-tag.badge:not([class*="bg-"]) { - background-color: #dd514c; +.cu-tag.badge:not([class*='bg-']) { + background-color: #dd514c; } -.cu-tag:empty:not([class*="cuIcon-"]) { - padding: 0upx; - width: 16upx; - height: 16upx; - top: -4upx; - right: -4upx; +.cu-tag:empty:not([class*='cuIcon-']) { + padding: 0upx; + width: 16upx; + height: 16upx; + top: -4upx; + right: -4upx; } -.cu-tag[class*="cuIcon-"] { - width: 32upx; - height: 32upx; - top: -4upx; - right: -4upx; +.cu-tag[class*='cuIcon-'] { + width: 32upx; + height: 32upx; + top: -4upx; + right: -4upx; } /* ================== @@ -873,63 +862,63 @@ button.cuIcon.lg { ==================== */ .cu-avatar { - font-variant: small-caps; - margin: 0; - padding: 0; - display: inline-flex; - text-align: center; - justify-content: center; - align-items: center; - background-color: #ccc; - color: #ffffff; - white-space: nowrap; - position: relative; - width: 64upx; - height: 64upx; - background-size: cover; - background-position: center; - vertical-align: middle; - font-size: 1.5em; + font-variant: small-caps; + margin: 0; + padding: 0; + display: inline-flex; + text-align: center; + justify-content: center; + align-items: center; + background-color: #ccc; + color: #ffffff; + white-space: nowrap; + position: relative; + width: 64upx; + height: 64upx; + background-size: cover; + background-position: center; + vertical-align: middle; + font-size: 1.5em; } .cu-avatar.sm { - width: 48upx; - height: 48upx; - font-size: 1em; + width: 48upx; + height: 48upx; + font-size: 1em; } .cu-avatar.lg { - width: 96upx; - height: 96upx; - font-size: 2em; + width: 96upx; + height: 96upx; + font-size: 2em; } .cu-avatar.xl { - width: 128upx; - height: 128upx; - font-size: 2.5em; + width: 128upx; + height: 128upx; + font-size: 2.5em; } .cu-avatar .avatar-text { - font-size: 0.4em; + font-size: 0.4em; } .cu-avatar-group { - direction: rtl; - unicode-bidi: bidi-override; - padding: 0 10upx 0 40upx; - display: inline-block; + direction: rtl; + unicode-bidi: bidi-override; + padding: 0 10upx 0 40upx; + display: inline-block; } .cu-avatar-group .cu-avatar { - margin-left: -30upx; - border: 4upx solid #f1f1f1; - vertical-align: middle; + margin-left: -30upx; + border: 4upx solid #f1f1f1; + vertical-align: middle; } .cu-avatar-group .cu-avatar.sm { - margin-left: -20upx; - border: 1upx solid #f1f1f1; + margin-left: -20upx; + border: 1upx solid #f1f1f1; } /* ================== @@ -937,68 +926,77 @@ button.cuIcon.lg { ==================== */ .cu-progress { - overflow: hidden; - height: 28upx; - background-color: #ebeef5; - display: inline-flex; - align-items: center; - width: 100%; + overflow: hidden; + height: 28upx; + background-color: #ebeef5; + display: inline-flex; + align-items: center; + width: 100%; } -.cu-progress+view, -.cu-progress+text { - line-height: 1; +.cu-progress + view, +.cu-progress + text { + line-height: 1; } .cu-progress.xs { - height: 10upx; + height: 10upx; } .cu-progress.sm { - height: 20upx; + height: 20upx; } .cu-progress view { - width: 0; - height: 100%; - align-items: center; - display: flex; - justify-items: flex-end; - justify-content: space-around; - font-size: 20upx; - color: #ffffff; - transition: width 0.6s ease; + width: 0; + height: 100%; + align-items: center; + display: flex; + justify-items: flex-end; + justify-content: space-around; + font-size: 20upx; + color: #ffffff; + transition: width 0.6s ease; } .cu-progress text { - align-items: center; - display: flex; - font-size: 20upx; - color: #333333; - text-indent: 10upx; + align-items: center; + display: flex; + font-size: 20upx; + color: #333333; + text-indent: 10upx; } .cu-progress.text-progress { - padding-right: 60upx; + padding-right: 60upx; } .cu-progress.striped view { - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 72upx 72upx; + background-image: linear-gradient( + 45deg, + rgba(255, 255, 255, 0.15) 25%, + transparent 25%, + transparent 50%, + rgba(255, 255, 255, 0.15) 50%, + rgba(255, 255, 255, 0.15) 75%, + transparent 75%, + transparent + ); + background-size: 72upx 72upx; } .cu-progress.active view { - animation: progress-stripes 2s linear infinite; + animation: progress-stripes 2s linear infinite; } @keyframes progress-stripes { - from { - background-position: 72upx 0; - } + from { + background-position: 72upx 0; + } - to { - background-position: 0 0; - } + to { + background-position: 0 0; + } } /* ================== @@ -1006,934 +1004,933 @@ button.cuIcon.lg { ==================== */ .cu-load { - display: block; - line-height: 3em; - text-align: center; + display: block; + line-height: 3em; + text-align: center; } .cu-load::before { - font-family: "cuIcon"; - display: inline-block; - margin-right: 6upx; + font-family: 'cuIcon'; + display: inline-block; + margin-right: 6upx; } .cu-load.loading::before { - content: "\e67a"; - animation: cuIcon-spin 2s infinite linear; + content: '\e67a'; + animation: cuIcon-spin 2s infinite linear; } .cu-load.loading::after { - content: "加载中..."; + content: '加载中...'; } .cu-load.over::before { - content: "\e64a"; + content: '\e64a'; } .cu-load.over::after { - content: "没有更多了"; + content: '没有更多了'; } .cu-load.erro::before { - content: "\e658"; + content: '\e658'; } .cu-load.erro::after { - content: "加载失败"; + content: '加载失败'; } .cu-load.load-cuIcon::before { - font-size: 32upx; + font-size: 32upx; } .cu-load.load-cuIcon::after { - display: none; + display: none; } .cu-load.load-cuIcon.over { - display: none; + display: none; } .cu-load.load-modal { - position: fixed; - top: 0; - right: 0; - bottom: 140upx; - left: 0; - margin: auto; - width: 260upx; - height: 260upx; - background-color: #ffffff; - border-radius: 10upx; - box-shadow: 0 0 0upx 2000upx rgba(0, 0, 0, 0.5); - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - font-size: 28upx; - z-index: 9999; - line-height: 2.4em; -} - -.cu-load.load-modal [class*="cuIcon-"] { - font-size: 60upx; + position: fixed; + top: 0; + right: 0; + bottom: 140upx; + left: 0; + margin: auto; + width: 260upx; + height: 260upx; + background-color: #ffffff; + border-radius: 10upx; + box-shadow: 0 0 0upx 2000upx rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + font-size: 28upx; + z-index: 9999; + line-height: 2.4em; +} + +.cu-load.load-modal [class*='cuIcon-'] { + font-size: 60upx; } .cu-load.load-modal image { - width: 70upx; - height: 70upx; + width: 70upx; + height: 70upx; } .cu-load.load-modal::after { - content: ""; - position: absolute; - background-color: #ffffff; - border-radius: 50%; - width: 200upx; - height: 200upx; - font-size: 10px; - border-top: 6upx solid rgba(0, 0, 0, 0.05); - border-right: 6upx solid rgba(0, 0, 0, 0.05); - border-bottom: 6upx solid rgba(0, 0, 0, 0.05); - border-left: 6upx solid #f37b1d; - animation: cuIcon-spin 1s infinite linear; - z-index: -1; + content: ''; + position: absolute; + background-color: #ffffff; + border-radius: 50%; + width: 200upx; + height: 200upx; + font-size: 10px; + border-top: 6upx solid rgba(0, 0, 0, 0.05); + border-right: 6upx solid rgba(0, 0, 0, 0.05); + border-bottom: 6upx solid rgba(0, 0, 0, 0.05); + border-left: 6upx solid #f37b1d; + animation: cuIcon-spin 1s infinite linear; + z-index: -1; } .load-progress { - pointer-events: none; - top: 0; - position: fixed; - width: 100%; - left: 0; - z-index: 2000; + pointer-events: none; + top: 0; + position: fixed; + width: 100%; + left: 0; + z-index: 2000; } .load-progress.hide { - display: none; + display: none; } .load-progress .load-progress-bar { - position: relative; - width: 100%; - height: 4upx; - overflow: hidden; - transition: all 200ms ease 0s; + position: relative; + width: 100%; + height: 4upx; + overflow: hidden; + transition: all 200ms ease 0s; } .load-progress .load-progress-spinner { - position: absolute; - top: 10upx; - right: 10upx; - z-index: 2000; - display: block; + position: absolute; + top: 10upx; + right: 10upx; + z-index: 2000; + display: block; } .load-progress .load-progress-spinner::after { - content: ""; - display: block; - width: 24upx; - height: 24upx; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border: solid 4upx transparent; - border-top-color: inherit; - border-left-color: inherit; - border-radius: 50%; - -webkit-animation: load-progress-spinner 0.4s linear infinite; - animation: load-progress-spinner 0.4s linear infinite; + content: ''; + display: block; + width: 24upx; + height: 24upx; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border: solid 4upx transparent; + border-top-color: inherit; + border-left-color: inherit; + border-radius: 50%; + -webkit-animation: load-progress-spinner 0.4s linear infinite; + animation: load-progress-spinner 0.4s linear infinite; } @-webkit-keyframes load-progress-spinner { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - } + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } } @keyframes load-progress-spinner { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - } + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } } /* ================== 列表 ==================== */ .grayscale { - filter: grayscale(1); + filter: grayscale(1); } -.cu-list+.cu-list { - margin-top: 30upx +.cu-list + .cu-list { + margin-top: 30upx; } -.cu-list>.cu-item { - transition: all .6s ease-in-out 0s; - transform: translateX(0upx) +.cu-list > .cu-item { + transition: all 0.6s ease-in-out 0s; + transform: translateX(0upx); } -.cu-list>.cu-item.move-cur { - transform: translateX(-260upx) +.cu-list > .cu-item.move-cur { + transform: translateX(-260upx); } -.cu-list>.cu-item .move { - position: absolute; - right: 0; - display: flex; - width: 260upx; - height: 100%; - transform: translateX(100%) +.cu-list > .cu-item .move { + position: absolute; + right: 0; + display: flex; + width: 260upx; + height: 100%; + transform: translateX(100%); } -.cu-list>.cu-item .move view { - display: flex; - flex: 1; - justify-content: center; - align-items: center +.cu-list > .cu-item .move view { + display: flex; + flex: 1; + justify-content: center; + align-items: center; } .cu-list.menu-avatar { - overflow: hidden; + overflow: hidden; } -.cu-list.menu-avatar>.cu-item { - position: relative; - display: flex; - padding-right: 10upx; - height: 140upx; - background-color: #ffffff; - justify-content: flex-end; - align-items: center +.cu-list.menu-avatar > .cu-item { + position: relative; + display: flex; + padding-right: 10upx; + height: 140upx; + background-color: #ffffff; + justify-content: flex-end; + align-items: center; } -.cu-list.menu-avatar>.cu-item>.cu-avatar { - position: absolute; - left: 30upx +.cu-list.menu-avatar > .cu-item > .cu-avatar { + position: absolute; + left: 30upx; } -.cu-list.menu-avatar>.cu-item .flex .text-cut { - max-width: 510upx +.cu-list.menu-avatar > .cu-item .flex .text-cut { + max-width: 510upx; } -.cu-list.menu-avatar>.cu-item .content { - position: absolute; - left: 146upx; - width: calc(100% - 96upx - 60upx - 120upx - 20upx); - line-height: 1.6em; +.cu-list.menu-avatar > .cu-item .content { + position: absolute; + left: 146upx; + width: calc(100% - 96upx - 60upx - 120upx - 20upx); + line-height: 1.6em; } -.cu-list.menu-avatar>.cu-item .content.flex-sub { - width: calc(100% - 96upx - 60upx - 20upx); +.cu-list.menu-avatar > .cu-item .content.flex-sub { + width: calc(100% - 96upx - 60upx - 20upx); } -.cu-list.menu-avatar>.cu-item .content>view:first-child { - font-size: 30upx; - display: flex; - align-items: center +.cu-list.menu-avatar > .cu-item .content > view:first-child { + font-size: 30upx; + display: flex; + align-items: center; } -.cu-list.menu-avatar>.cu-item .content .cu-tag.sm { - display: inline-block; - margin-left: 10upx; - height: 28upx; - font-size: 16upx; - line-height: 32upx +.cu-list.menu-avatar > .cu-item .content .cu-tag.sm { + display: inline-block; + margin-left: 10upx; + height: 28upx; + font-size: 16upx; + line-height: 32upx; } -.cu-list.menu-avatar>.cu-item .action { - width: 100upx; - text-align: center +.cu-list.menu-avatar > .cu-item .action { + width: 100upx; + text-align: center; } -.cu-list.menu-avatar>.cu-item .action view+view { - margin-top: 10upx +.cu-list.menu-avatar > .cu-item .action view + view { + margin-top: 10upx; } -.cu-list.menu-avatar.comment>.cu-item .content { - position: relative; - left: 0; - width: auto; - flex: 1; +.cu-list.menu-avatar.comment > .cu-item .content { + position: relative; + left: 0; + width: auto; + flex: 1; } -.cu-list.menu-avatar.comment>.cu-item { - padding: 30upx 30upx 30upx 120upx; - height: auto +.cu-list.menu-avatar.comment > .cu-item { + padding: 30upx 30upx 30upx 120upx; + height: auto; } .cu-list.menu-avatar.comment .cu-avatar { - align-self: flex-start + align-self: flex-start; } -.cu-list.menu>.cu-item { - position: relative; - display: flex; - padding: 0 30upx; - min-height: 100upx; - background-color: #ffffff; - justify-content: space-between; - align-items: center +.cu-list.menu > .cu-item { + position: relative; + display: flex; + padding: 0 30upx; + min-height: 100upx; + background-color: #ffffff; + justify-content: space-between; + align-items: center; } -.cu-list.menu>.cu-item:last-child:after { - border: none +.cu-list.menu > .cu-item:last-child:after { + border: none; } -.cu-list.menu-avatar>.cu-item:after, -.cu-list.menu>.cu-item:after { - position: absolute; - top: 0; - left: 0; - box-sizing: border-box; - width: 200%; - height: 200%; - border-bottom: 1upx solid #ddd; - border-radius: inherit; - content: " "; - transform: scale(.5); - transform-origin: 0 0; - pointer-events: none +.cu-list.menu-avatar > .cu-item:after, +.cu-list.menu > .cu-item:after { + position: absolute; + top: 0; + left: 0; + box-sizing: border-box; + width: 200%; + height: 200%; + border-bottom: 1upx solid #ddd; + border-radius: inherit; + content: ' '; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; } -.cu-list.menu>.cu-item.grayscale { - background-color: #f5f5f5 +.cu-list.menu > .cu-item.grayscale { + background-color: #f5f5f5; } -.cu-list.menu>.cu-item.cur { - background-color: #fcf7e9 +.cu-list.menu > .cu-item.cur { + background-color: #fcf7e9; } -.cu-list.menu>.cu-item.arrow { - padding-right: 90upx +.cu-list.menu > .cu-item.arrow { + padding-right: 90upx; } -.cu-list.menu>.cu-item.arrow:before { - position: absolute; - top: 0; - right: 30upx; - bottom: 0; - display: block; - margin: auto; - width: 30upx; - height: 30upx; - color: #8799a3; - content: "\e6a3"; - text-align: center; - font-size: 34upx; - font-family: cuIcon; - line-height: 30upx +.cu-list.menu > .cu-item.arrow:before { + position: absolute; + top: 0; + right: 30upx; + bottom: 0; + display: block; + margin: auto; + width: 30upx; + height: 30upx; + color: #8799a3; + content: '\e6a3'; + text-align: center; + font-size: 34upx; + font-family: cuIcon; + line-height: 30upx; } -.cu-list.menu>.cu-item button.content { - padding: 0; - background-color: transparent; - justify-content: flex-start +.cu-list.menu > .cu-item button.content { + padding: 0; + background-color: transparent; + justify-content: flex-start; } -.cu-list.menu>.cu-item button.content:after { - display: none +.cu-list.menu > .cu-item button.content:after { + display: none; } -.cu-list.menu>.cu-item .cu-avatar-group .cu-avatar { - border-color: #ffffff +.cu-list.menu > .cu-item .cu-avatar-group .cu-avatar { + border-color: #ffffff; } -.cu-list.menu>.cu-item .content>view:first-child { - display: flex; - align-items: center +.cu-list.menu > .cu-item .content > view:first-child { + display: flex; + align-items: center; } -.cu-list.menu>.cu-item .content>text[class*=cuIcon] { - display: inline-block; - margin-right: 10upx; - width: 1.6em; - text-align: center +.cu-list.menu > .cu-item .content > text[class*='cuIcon'] { + display: inline-block; + margin-right: 10upx; + width: 1.6em; + text-align: center; } -.cu-list.menu>.cu-item .content>image { - display: inline-block; - margin-right: 10upx; - width: 1.6em; - height: 1.6em; - vertical-align: middle +.cu-list.menu > .cu-item .content > image { + display: inline-block; + margin-right: 10upx; + width: 1.6em; + height: 1.6em; + vertical-align: middle; } -.cu-list.menu>.cu-item .content { - font-size: 30upx; - line-height: 1.6em; - flex: 1 +.cu-list.menu > .cu-item .content { + font-size: 30upx; + line-height: 1.6em; + flex: 1; } -.cu-list.menu>.cu-item .content .cu-tag.sm { - display: inline-block; - margin-left: 10upx; - height: 28upx; - font-size: 16upx; - line-height: 32upx +.cu-list.menu > .cu-item .content .cu-tag.sm { + display: inline-block; + margin-left: 10upx; + height: 28upx; + font-size: 16upx; + line-height: 32upx; } -.cu-list.menu>.cu-item .action .cu-tag:empty { - right: 10upx +.cu-list.menu > .cu-item .action .cu-tag:empty { + right: 10upx; } .cu-list.menu { - display: block; - overflow: hidden + display: block; + overflow: hidden; } -.cu-list.menu.sm-border>.cu-item:after { - left: 30upx; - width: calc(200% - 120upx) +.cu-list.menu.sm-border > .cu-item:after { + left: 30upx; + width: calc(200% - 120upx); } -.cu-list.grid>.cu-item { - position: relative; - display: flex; - padding: 20upx 0 30upx; - transition-duration: 0s; - flex-direction: column +.cu-list.grid > .cu-item { + position: relative; + display: flex; + padding: 20upx 0 30upx; + transition-duration: 0s; + flex-direction: column; } -.cu-list.grid>.cu-item:after { - position: absolute; - top: 0; - left: 0; - box-sizing: border-box; - width: 200%; - height: 200%; - border-right: 1px solid rgba(0, 0, 0, .1); - border-bottom: 1px solid rgba(0, 0, 0, .1); - border-radius: inherit; - content: " "; - transform: scale(.5); - transform-origin: 0 0; - pointer-events: none +.cu-list.grid > .cu-item:after { + position: absolute; + top: 0; + left: 0; + box-sizing: border-box; + width: 200%; + height: 200%; + border-right: 1px solid rgba(0, 0, 0, 0.1); + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + border-radius: inherit; + content: ' '; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; } -.cu-list.grid>.cu-item text { - display: block; - margin-top: 10upx; - color: #888; - font-size: 26upx; - line-height: 40upx +.cu-list.grid > .cu-item text { + display: block; + margin-top: 10upx; + color: #888; + font-size: 26upx; + line-height: 40upx; } -.cu-list.grid>.cu-item [class*=cuIcon] { - position: relative; - display: block; - margin-top: 20upx; - width: 100%; - font-size: 48upx +.cu-list.grid > .cu-item [class*='cuIcon'] { + position: relative; + display: block; + margin-top: 20upx; + width: 100%; + font-size: 48upx; } -.cu-list.grid>.cu-item .cu-tag { - right: auto; - left: 50%; - margin-left: 20upx +.cu-list.grid > .cu-item .cu-tag { + right: auto; + left: 50%; + margin-left: 20upx; } .cu-list.grid { - background-color: #ffffff; - text-align: center + background-color: #ffffff; + text-align: center; } -.cu-list.grid.no-border>.cu-item { - padding-top: 10upx; - padding-bottom: 20upx +.cu-list.grid.no-border > .cu-item { + padding-top: 10upx; + padding-bottom: 20upx; } -.cu-list.grid.no-border>.cu-item:after { - border: none +.cu-list.grid.no-border > .cu-item:after { + border: none; } .cu-list.grid.no-border { - padding: 20upx 10upx + padding: 20upx 10upx; } -.cu-list.grid.col-3>.cu-item:nth-child(3n):after, -.cu-list.grid.col-4>.cu-item:nth-child(4n):after, -.cu-list.grid.col-5>.cu-item:nth-child(5n):after { - border-right-width: 0 +.cu-list.grid.col-3 > .cu-item:nth-child(3n):after, +.cu-list.grid.col-4 > .cu-item:nth-child(4n):after, +.cu-list.grid.col-5 > .cu-item:nth-child(5n):after { + border-right-width: 0; } .cu-list.card-menu { - overflow: hidden; - margin-right: 30upx; - margin-left: 30upx; - border-radius: 20upx + overflow: hidden; + margin-right: 30upx; + margin-left: 30upx; + border-radius: 20upx; } - /* ================== 操作条 ==================== */ .cu-bar { - display: flex; - position: relative; - align-items: center; - min-height: 100upx; - justify-content: space-between; + display: flex; + position: relative; + align-items: center; + min-height: 100upx; + justify-content: space-between; } .cu-bar .action { - display: flex; - align-items: center; - height: 100%; - justify-content: center; - max-width: 100%; + display: flex; + align-items: center; + height: 100%; + justify-content: center; + max-width: 100%; } .cu-bar .action.border-title { - position: relative; - top: -10upx; + position: relative; + top: -10upx; } -.cu-bar .action.border-title text[class*="bg-"]:last-child { - position: absolute; - bottom: -0.5rem; - min-width: 2rem; - height: 6upx; - left: 0; +.cu-bar .action.border-title text[class*='bg-']:last-child { + position: absolute; + bottom: -0.5rem; + min-width: 2rem; + height: 6upx; + left: 0; } .cu-bar .action.sub-title { - position: relative; - top: -0.2rem; + position: relative; + top: -0.2rem; } .cu-bar .action.sub-title text { - position: relative; - z-index: 1; -} - -.cu-bar .action.sub-title text[class*="bg-"]:last-child { - position: absolute; - display: inline-block; - bottom: -0.2rem; - border-radius: 6upx; - width: 100%; - height: 0.6rem; - left: 0.6rem; - opacity: 0.3; - z-index: 0; -} - -.cu-bar .action.sub-title text[class*="text-"]:last-child { - position: absolute; - display: inline-block; - bottom: -0.7rem; - left: 0.5rem; - opacity: 0.2; - z-index: 0; - text-align: right; - font-weight: 900; - font-size: 36upx; + position: relative; + z-index: 1; +} + +.cu-bar .action.sub-title text[class*='bg-']:last-child { + position: absolute; + display: inline-block; + bottom: -0.2rem; + border-radius: 6upx; + width: 100%; + height: 0.6rem; + left: 0.6rem; + opacity: 0.3; + z-index: 0; +} + +.cu-bar .action.sub-title text[class*='text-']:last-child { + position: absolute; + display: inline-block; + bottom: -0.7rem; + left: 0.5rem; + opacity: 0.2; + z-index: 0; + text-align: right; + font-weight: 900; + font-size: 36upx; } .cu-bar.justify-center .action.border-title text:last-child, .cu-bar.justify-center .action.sub-title text:last-child { - left: 0; - right: 0; - margin: auto; - text-align: center; + left: 0; + right: 0; + margin: auto; + text-align: center; } .cu-bar .action:first-child { - margin-left: 30upx; - font-size: 30upx; + margin-left: 30upx; + font-size: 30upx; } .cu-bar .action text.text-cut { - text-align: left; - width: 100%; + text-align: left; + width: 100%; } .cu-bar .cu-avatar:first-child { - margin-left: 20upx; + margin-left: 20upx; } -.cu-bar .action:first-child>text[class*="cuIcon-"] { - margin-left: -0.3em; - margin-right: 0.3em; +.cu-bar .action:first-child > text[class*='cuIcon-'] { + margin-left: -0.3em; + margin-right: 0.3em; } .cu-bar .action:last-child { - margin-right: 30upx; + margin-right: 30upx; } -.cu-bar .action>text[class*="cuIcon-"], -.cu-bar .action>view[class*="cuIcon-"] { - font-size: 36upx; +.cu-bar .action > text[class*='cuIcon-'], +.cu-bar .action > view[class*='cuIcon-'] { + font-size: 36upx; } -.cu-bar .action>text[class*="cuIcon-"]+text[class*="cuIcon-"] { - margin-left: 0.5em; +.cu-bar .action > text[class*='cuIcon-'] + text[class*='cuIcon-'] { + margin-left: 0.5em; } .cu-bar .content { - position: absolute; - text-align: center; - width: calc(100% - 340upx); - left: 0; - right: 0; - bottom: 0; - top: 0; - margin: auto; - height: 60upx; - font-size: 32upx; - line-height: 60upx; - cursor: none; - pointer-events: none; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; + position: absolute; + text-align: center; + width: calc(100% - 340upx); + left: 0; + right: 0; + bottom: 0; + top: 0; + margin: auto; + height: 60upx; + font-size: 32upx; + line-height: 60upx; + cursor: none; + pointer-events: none; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } .cu-bar.ios .content { - bottom: 7px; - height: 30px; - font-size: 32upx; - line-height: 30px; + bottom: 7px; + height: 30px; + font-size: 32upx; + line-height: 30px; } .cu-bar.btn-group { - justify-content: space-around; + justify-content: space-around; } .cu-bar.btn-group button { - padding: 20upx 32upx; + padding: 20upx 32upx; } .cu-bar.btn-group button { - flex: 1; - margin: 0 20upx; - max-width: 50%; + flex: 1; + margin: 0 20upx; + max-width: 50%; } .cu-bar .search-form { - background-color: #f5f5f5; - line-height: 64upx; - height: 64upx; - font-size: 24upx; - color: #333333; - flex: 1; - display: flex; - align-items: center; - margin: 0 30upx; + background-color: #f5f5f5; + line-height: 64upx; + height: 64upx; + font-size: 24upx; + color: #333333; + flex: 1; + display: flex; + align-items: center; + margin: 0 30upx; } -.cu-bar .search-form+.action { - margin-right: 30upx; +.cu-bar .search-form + .action { + margin-right: 30upx; } .cu-bar .search-form input { - flex: 1; - padding-right: 30upx; - height: 64upx; - line-height: 64upx; - font-size: 26upx; - background-color: transparent; + flex: 1; + padding-right: 30upx; + height: 64upx; + line-height: 64upx; + font-size: 26upx; + background-color: transparent; } -.cu-bar .search-form [class*="cuIcon-"] { - margin: 0 0.5em 0 0.8em; +.cu-bar .search-form [class*='cuIcon-'] { + margin: 0 0.5em 0 0.8em; } -.cu-bar .search-form [class*="cuIcon-"]::before { - top: 0upx; +.cu-bar .search-form [class*='cuIcon-']::before { + top: 0upx; } .cu-bar.fixed, .nav.fixed { - position: fixed; - width: 100%; - top: 0; - z-index: 1024; - box-shadow: 0 1upx 6upx rgba(0, 0, 0, 0.1); + position: fixed; + width: 100%; + top: 0; + z-index: 1024; + box-shadow: 0 1upx 6upx rgba(0, 0, 0, 0.1); } .cu-bar.foot { - position: fixed; - width: 100%; - bottom: 0; - z-index: 1024; - box-shadow: 0 -1upx 6upx rgba(0, 0, 0, 0.1); + position: fixed; + width: 100%; + bottom: 0; + z-index: 1024; + box-shadow: 0 -1upx 6upx rgba(0, 0, 0, 0.1); } .cu-bar.tabbar { - padding: 0; - height: calc(100upx + env(safe-area-inset-bottom) / 2); - padding-bottom: calc(env(safe-area-inset-bottom) / 2); + padding: 0; + height: calc(100upx + env(safe-area-inset-bottom) / 2); + padding-bottom: calc(env(safe-area-inset-bottom) / 2); } .cu-tabbar-height { - min-height: 100upx; - height: calc(100upx + env(safe-area-inset-bottom) / 2); + min-height: 100upx; + height: calc(100upx + env(safe-area-inset-bottom) / 2); } .cu-bar.tabbar.shadow { - box-shadow: 0 -1upx 6upx rgba(0, 0, 0, 0.1); + box-shadow: 0 -1upx 6upx rgba(0, 0, 0, 0.1); } .cu-bar.tabbar .action { - font-size: 22upx; - position: relative; - flex: 1; - text-align: center; - padding: 0; - display: block; - height: auto; - line-height: 1; - margin: 0; - background-color: inherit; - overflow: initial; + font-size: 22upx; + position: relative; + flex: 1; + text-align: center; + padding: 0; + display: block; + height: auto; + line-height: 1; + margin: 0; + background-color: inherit; + overflow: initial; } .cu-bar.tabbar.shop .action { - width: 140upx; - flex: initial; + width: 140upx; + flex: initial; } .cu-bar.tabbar .action.add-action { - position: relative; - z-index: 2; - padding-top: 50upx; -} - -.cu-bar.tabbar .action.add-action [class*="cuIcon-"] { - position: absolute; - width: 70upx; - z-index: 2; - height: 70upx; - border-radius: 50%; - line-height: 70upx; - font-size: 50upx; - top: -35upx; - left: 0; - right: 0; - margin: auto; - padding: 0; + position: relative; + z-index: 2; + padding-top: 50upx; +} + +.cu-bar.tabbar .action.add-action [class*='cuIcon-'] { + position: absolute; + width: 70upx; + z-index: 2; + height: 70upx; + border-radius: 50%; + line-height: 70upx; + font-size: 50upx; + top: -35upx; + left: 0; + right: 0; + margin: auto; + padding: 0; } .cu-bar.tabbar .action.add-action::after { - content: ""; - position: absolute; - width: 100upx; - height: 100upx; - top: -50upx; - left: 0; - right: 0; - margin: auto; - box-shadow: 0 -3upx 8upx rgba(0, 0, 0, 0.08); - border-radius: 50upx; - background-color: inherit; - z-index: 0; + content: ''; + position: absolute; + width: 100upx; + height: 100upx; + top: -50upx; + left: 0; + right: 0; + margin: auto; + box-shadow: 0 -3upx 8upx rgba(0, 0, 0, 0.08); + border-radius: 50upx; + background-color: inherit; + z-index: 0; } .cu-bar.tabbar .action.add-action::before { - content: ""; - position: absolute; - width: 100upx; - height: 30upx; - bottom: 30upx; - left: 0; - right: 0; - margin: auto; - background-color: inherit; - z-index: 1; + content: ''; + position: absolute; + width: 100upx; + height: 30upx; + bottom: 30upx; + left: 0; + right: 0; + margin: auto; + background-color: inherit; + z-index: 1; } .cu-bar.tabbar .btn-group { - flex: 1; - display: flex; - justify-content: space-around; - align-items: center; - padding: 0 10upx; + flex: 1; + display: flex; + justify-content: space-around; + align-items: center; + padding: 0 10upx; } .cu-bar.tabbar button.action::after { - border: 0; + border: 0; } -.cu-bar.tabbar .action [class*="cuIcon-"] { - width: 100upx; - position: relative; - display: block; - height: auto; - margin: 0 auto 10upx; - text-align: center; - font-size: 40upx; +.cu-bar.tabbar .action [class*='cuIcon-'] { + width: 100upx; + position: relative; + display: block; + height: auto; + margin: 0 auto 10upx; + text-align: center; + font-size: 40upx; } .cu-bar.tabbar .action .cuIcon-cu-image { - margin: 0 auto; + margin: 0 auto; } .cu-bar.tabbar .action .cuIcon-cu-image image { - width: 50upx; - height: 50upx; - display: inline-block; + width: 50upx; + height: 50upx; + display: inline-block; } .cu-bar.tabbar .submit { - align-items: center; - display: flex; - justify-content: center; - text-align: center; - position: relative; - flex: 2; - align-self: stretch; + align-items: center; + display: flex; + justify-content: center; + text-align: center; + position: relative; + flex: 2; + align-self: stretch; } .cu-bar.tabbar .submit:last-child { - flex: 2.6; + flex: 2.6; } -.cu-bar.tabbar .submit+.submit { - flex: 2; +.cu-bar.tabbar .submit + .submit { + flex: 2; } .cu-bar.tabbar.border .action::before { - content: " "; - width: 200%; - height: 200%; - position: absolute; - top: 0; - left: 0; - transform: scale(0.5); - transform-origin: 0 0; - border-right: 1upx solid rgba(0, 0, 0, 0.1); - z-index: 3; + content: ' '; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + transform: scale(0.5); + transform-origin: 0 0; + border-right: 1upx solid rgba(0, 0, 0, 0.1); + z-index: 3; } .cu-bar.tabbar.border .action:last-child:before { - display: none; + display: none; } .cu-bar.input { - padding-right: 20upx; - background-color: #ffffff; + padding-right: 20upx; + background-color: #ffffff; } .cu-bar.input input { - overflow: initial; - line-height: 64upx; - height: 64upx; - min-height: 64upx; - flex: 1; - font-size: 30upx; - margin: 0 20upx; + overflow: initial; + line-height: 64upx; + height: 64upx; + min-height: 64upx; + flex: 1; + font-size: 30upx; + margin: 0 20upx; } .cu-bar.input .action { - margin-left: 20upx; + margin-left: 20upx; } -.cu-bar.input .action [class*="cuIcon-"] { - font-size: 48upx; +.cu-bar.input .action [class*='cuIcon-'] { + font-size: 48upx; } -.cu-bar.input input+.action { - margin-right: 20upx; - margin-left: 0upx; +.cu-bar.input input + .action { + margin-right: 20upx; + margin-left: 0upx; } -.cu-bar.input .action:first-child [class*="cuIcon-"] { - margin-left: 0upx; +.cu-bar.input .action:first-child [class*='cuIcon-'] { + margin-left: 0upx; } .cu-custom { - display: block; - position: relative; + display: block; + position: relative; } .cu-custom .cu-bar .content { - width: calc(100% - 440upx); + width: calc(100% - 440upx); } /* #ifdef MP-ALIPAY */ .cu-custom .cu-bar .action .cuIcon-back { - opacity: 0; + opacity: 0; } /* #endif */ .cu-custom .cu-bar .content image { - height: 60upx; - width: 240upx; + height: 60upx; + width: 240upx; } .cu-custom .cu-bar { - min-height: 0px; - /* #ifdef MP-WEIXIN */ - padding-right: 220upx; - /* #endif */ - /* #ifdef MP-ALIPAY */ - padding-right: 150upx; - /* #endif */ - box-shadow: 0upx 0upx 0upx; - z-index: 9999; + min-height: 0px; + /* #ifdef MP-WEIXIN */ + padding-right: 220upx; + /* #endif */ + /* #ifdef MP-ALIPAY */ + padding-right: 150upx; + /* #endif */ + box-shadow: 0upx 0upx 0upx; + z-index: 9999; } .cu-custom .cu-bar .border-custom { - position: relative; - background: rgba(0, 0, 0, 0.15); - border-radius: 1000upx; - height: 30px; + position: relative; + background: rgba(0, 0, 0, 0.15); + border-radius: 1000upx; + height: 30px; } .cu-custom .cu-bar .border-custom::after { - content: " "; - width: 200%; - height: 200%; - position: absolute; - top: 0; - left: 0; - border-radius: inherit; - transform: scale(0.5); - transform-origin: 0 0; - pointer-events: none; - box-sizing: border-box; - border: 1upx solid #ffffff; - opacity: 0.5; + content: ' '; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border-radius: inherit; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; + border: 1upx solid #ffffff; + opacity: 0.5; } .cu-custom .cu-bar .border-custom::before { - content: " "; - width: 1upx; - height: 110%; - position: absolute; - top: 22.5%; - left: 0; - right: 0; - margin: auto; - transform: scale(0.5); - transform-origin: 0 0; - pointer-events: none; - box-sizing: border-box; - opacity: 0.6; - background-color: #ffffff; + content: ' '; + width: 1upx; + height: 110%; + position: absolute; + top: 22.5%; + left: 0; + right: 0; + margin: auto; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; + opacity: 0.6; + background-color: #ffffff; } .cu-custom .cu-bar .border-custom text { - display: block; - flex: 1; - margin: auto !important; - text-align: center; - font-size: 34upx; + display: block; + flex: 1; + margin: auto !important; + text-align: center; + font-size: 34upx; } /* ================== @@ -1941,23 +1938,23 @@ button.cuIcon.lg { ==================== */ .nav { - white-space: nowrap; + white-space: nowrap; } ::-webkit-scrollbar { - display: none; + display: none; } .nav .cu-item { - height: 90upx; - display: inline-block; - line-height: 90upx; - margin: 0 10upx; - padding: 0 20upx; + height: 90upx; + display: inline-block; + line-height: 90upx; + margin: 0 10upx; + padding: 0 20upx; } .nav .cu-item.cur { - border-bottom: 4upx solid; + border-bottom: 4upx solid; } /* ================== @@ -1965,85 +1962,85 @@ button.cuIcon.lg { ==================== */ .cu-timeline { - display: block; - background-color: #ffffff; + display: block; + background-color: #ffffff; } .cu-timeline .cu-time { - width: 120upx; - text-align: center; - padding: 20upx 0; - font-size: 26upx; - color: #888; - display: block; -} - -.cu-timeline>.cu-item { - padding: 30upx 30upx 30upx 120upx; - position: relative; - display: block; - z-index: 0; -} - -.cu-timeline>.cu-item:not([class*="text-"]) { - color: #ccc; -} - -.cu-timeline>.cu-item::after { - content: ""; - display: block; - position: absolute; - width: 1upx; - background-color: #ddd; - left: 60upx; - height: 100%; - top: 0; - z-index: 8; -} - -.cu-timeline>.cu-item::before { - font-family: "cuIcon"; - display: block; - position: absolute; - top: 36upx; - z-index: 9; - background-color: #ffffff; - width: 50upx; - height: 50upx; - text-align: center; - border: none; - line-height: 50upx; - left: 36upx; -} - -.cu-timeline>.cu-item:not([class*="cuIcon-"])::before { - content: "\e763"; -} - -.cu-timeline>.cu-item[class*="cuIcon-"]::before { - background-color: #ffffff; - width: 50upx; - height: 50upx; - text-align: center; - border: none; - line-height: 50upx; - left: 36upx; -} - -.cu-timeline>.cu-item>.content { - padding: 30upx; - border-radius: 6upx; - display: block; - line-height: 1.6; + width: 120upx; + text-align: center; + padding: 20upx 0; + font-size: 26upx; + color: #888; + display: block; +} + +.cu-timeline > .cu-item { + padding: 30upx 30upx 30upx 120upx; + position: relative; + display: block; + z-index: 0; +} + +.cu-timeline > .cu-item:not([class*='text-']) { + color: #ccc; +} + +.cu-timeline > .cu-item::after { + content: ''; + display: block; + position: absolute; + width: 1upx; + background-color: #ddd; + left: 60upx; + height: 100%; + top: 0; + z-index: 8; +} + +.cu-timeline > .cu-item::before { + font-family: 'cuIcon'; + display: block; + position: absolute; + top: 36upx; + z-index: 9; + background-color: #ffffff; + width: 50upx; + height: 50upx; + text-align: center; + border: none; + line-height: 50upx; + left: 36upx; +} + +.cu-timeline > .cu-item:not([class*='cuIcon-'])::before { + content: '\e763'; +} + +.cu-timeline > .cu-item[class*='cuIcon-']::before { + background-color: #ffffff; + width: 50upx; + height: 50upx; + text-align: center; + border: none; + line-height: 50upx; + left: 36upx; +} + +.cu-timeline > .cu-item > .content { + padding: 30upx; + border-radius: 6upx; + display: block; + line-height: 1.6; } -.cu-timeline>.cu-item>.content:not([class*="bg-"]) { - background-color: #f1f1f1; - color: #333333; +.cu-timeline > .cu-item > .content:not([class*='bg-']) { + background-color: #f1f1f1; + color: #333333; } -.cu-timeline>.cu-item>.content+.content { - margin-top: 20upx; +.cu-timeline > .cu-item > .content + .content { + margin-top: 20upx; } /* ================== @@ -2051,127 +2048,127 @@ button.cuIcon.lg { ==================== */ .cu-chat { - display: flex; - flex-direction: column; + display: flex; + flex-direction: column; } .cu-chat .cu-item { - display: flex; - padding: 30upx 30upx 70upx; - position: relative; + display: flex; + padding: 30upx 30upx 70upx; + position: relative; } -.cu-chat .cu-item>.cu-avatar { - width: 80upx; - height: 80upx; +.cu-chat .cu-item > .cu-avatar { + width: 80upx; + height: 80upx; } -.cu-chat .cu-item>.main { - max-width: calc(100% - 260upx); - margin: 0 40upx; - display: flex; - align-items: center; +.cu-chat .cu-item > .main { + max-width: calc(100% - 260upx); + margin: 0 40upx; + display: flex; + align-items: center; } -.cu-chat .cu-item>image { - height: 320upx; +.cu-chat .cu-item > image { + height: 320upx; } -.cu-chat .cu-item>.main .content { - padding: 20upx; - border-radius: 6upx; - display: inline-flex; - max-width: 100%; - align-items: center; - font-size: 30upx; - position: relative; - min-height: 80upx; - line-height: 40upx; - text-align: left; +.cu-chat .cu-item > .main .content { + padding: 20upx; + border-radius: 6upx; + display: inline-flex; + max-width: 100%; + align-items: center; + font-size: 30upx; + position: relative; + min-height: 80upx; + line-height: 40upx; + text-align: left; } -.cu-chat .cu-item>.main .content:not([class*="bg-"]) { - background-color: #ffffff; - color: #333333; +.cu-chat .cu-item > .main .content:not([class*='bg-']) { + background-color: #ffffff; + color: #333333; } .cu-chat .cu-item .date { - position: absolute; - font-size: 24upx; - color: #8799a3; - width: calc(100% - 320upx); - bottom: 20upx; - left: 160upx; + position: absolute; + font-size: 24upx; + color: #8799a3; + width: calc(100% - 320upx); + bottom: 20upx; + left: 160upx; } .cu-chat .cu-item .action { - padding: 0 30upx; - display: flex; - align-items: center; -} - -.cu-chat .cu-item>.main .content::after { - content: ""; - top: 27upx; - transform: rotate(45deg); - position: absolute; - z-index: 100; - display: inline-block; - overflow: hidden; - width: 24upx; - height: 24upx; - left: -12upx; - right: initial; - background-color: inherit; -} - -.cu-chat .cu-item.self>.main .content::after { - left: auto; - right: -12upx; -} - -.cu-chat .cu-item>.main .content::before { - content: ""; - top: 30upx; - transform: rotate(45deg); - position: absolute; - z-index: -1; - display: inline-block; - overflow: hidden; - width: 24upx; - height: 24upx; - left: -12upx; - right: initial; - background-color: inherit; - filter: blur(5upx); - opacity: 0.3; -} - -.cu-chat .cu-item>.main .content:not([class*="bg-"])::before { - background-color: #333333; - opacity: 0.1; -} - -.cu-chat .cu-item.self>.main .content::before { - left: auto; - right: -12upx; + padding: 0 30upx; + display: flex; + align-items: center; +} + +.cu-chat .cu-item > .main .content::after { + content: ''; + top: 27upx; + transform: rotate(45deg); + position: absolute; + z-index: 100; + display: inline-block; + overflow: hidden; + width: 24upx; + height: 24upx; + left: -12upx; + right: initial; + background-color: inherit; +} + +.cu-chat .cu-item.self > .main .content::after { + left: auto; + right: -12upx; +} + +.cu-chat .cu-item > .main .content::before { + content: ''; + top: 30upx; + transform: rotate(45deg); + position: absolute; + z-index: -1; + display: inline-block; + overflow: hidden; + width: 24upx; + height: 24upx; + left: -12upx; + right: initial; + background-color: inherit; + filter: blur(5upx); + opacity: 0.3; +} + +.cu-chat .cu-item > .main .content:not([class*='bg-'])::before { + background-color: #333333; + opacity: 0.1; +} + +.cu-chat .cu-item.self > .main .content::before { + left: auto; + right: -12upx; } .cu-chat .cu-item.self { - justify-content: flex-end; - text-align: right; + justify-content: flex-end; + text-align: right; } .cu-chat .cu-info { - display: inline-block; - margin: 20upx auto; - font-size: 24upx; - padding: 8upx 12upx; - background-color: rgba(0, 0, 0, 0.2); - border-radius: 6upx; - color: #ffffff; - max-width: 400upx; - line-height: 1.4; + display: inline-block; + margin: 20upx auto; + font-size: 24upx; + padding: 8upx 12upx; + background-color: rgba(0, 0, 0, 0.2); + border-radius: 6upx; + color: #ffffff; + max-width: 400upx; + line-height: 1.4; } /* ================== @@ -2179,87 +2176,87 @@ button.cuIcon.lg { ==================== */ .cu-card { - display: block; - overflow: hidden; + display: block; + overflow: hidden; } -.cu-card>.cu-item { - display: block; - background-color: #ffffff; - overflow: hidden; - border-radius: 10upx; - margin: 30upx; +.cu-card > .cu-item { + display: block; + background-color: #ffffff; + overflow: hidden; + border-radius: 10upx; + margin: 30upx; } -.cu-card>.cu-item.shadow-blur { - overflow: initial; +.cu-card > .cu-item.shadow-blur { + overflow: initial; } -.cu-card.no-card>.cu-item { - margin: 0upx; - border-radius: 0upx; +.cu-card.no-card > .cu-item { + margin: 0upx; + border-radius: 0upx; } .cu-card .grid.grid-square { - margin-bottom: -20upx; + margin-bottom: -20upx; } .cu-card.case .image { - position: relative; + position: relative; } .cu-card.case .image image { - width: 100%; + width: 100%; } .cu-card.case .image .cu-tag { - position: absolute; - right: 0; - top: 0; + position: absolute; + right: 0; + top: 0; } .cu-card.case .image .cu-bar { - position: absolute; - bottom: 0; - width: 100%; - background-color: transparent; - padding: 0upx 30upx; + position: absolute; + bottom: 0; + width: 100%; + background-color: transparent; + padding: 0upx 30upx; } .cu-card.case.no-card .image { - margin: 30upx 30upx 0; - overflow: hidden; - border-radius: 10upx; + margin: 30upx 30upx 0; + overflow: hidden; + border-radius: 10upx; } .cu-card.dynamic { - display: block; + display: block; } -.cu-card.dynamic>.cu-item { - display: block; - background-color: #ffffff; - overflow: hidden; +.cu-card.dynamic > .cu-item { + display: block; + background-color: #ffffff; + overflow: hidden; } -.cu-card.dynamic>.cu-item>.text-content { - padding: 0 30upx 0; - max-height: 6.4em; - overflow: hidden; - font-size: 30upx; - margin-bottom: 20upx; +.cu-card.dynamic > .cu-item > .text-content { + padding: 0 30upx 0; + max-height: 6.4em; + overflow: hidden; + font-size: 30upx; + margin-bottom: 20upx; } -.cu-card.dynamic>.cu-item .square-img { - width: 100%; - height: 200upx; - border-radius: 6upx; +.cu-card.dynamic > .cu-item .square-img { + width: 100%; + height: 200upx; + border-radius: 6upx; } -.cu-card.dynamic>.cu-item .only-img { - width: 100%; - height: 320upx; - border-radius: 6upx; +.cu-card.dynamic > .cu-item .only-img { + width: 100%; + height: 320upx; + border-radius: 6upx; } /* card.dynamic>.cu-item .comment { @@ -2270,45 +2267,45 @@ button.cuIcon.lg { } */ .cu-card.article { - display: block; + display: block; } -.cu-card.article>.cu-item { - padding-bottom: 30upx; +.cu-card.article > .cu-item { + padding-bottom: 30upx; } -.cu-card.article>.cu-item .title { - font-size: 30upx; - font-weight: 900; - color: #333333; - line-height: 100upx; - padding: 0 30upx; +.cu-card.article > .cu-item .title { + font-size: 30upx; + font-weight: 900; + color: #333333; + line-height: 100upx; + padding: 0 30upx; } -.cu-card.article>.cu-item .content { - display: flex; - padding: 0 30upx; +.cu-card.article > .cu-item .content { + display: flex; + padding: 0 30upx; } -.cu-card.article>.cu-item .content>image { - width: 240upx; - height: 6.4em; - margin-right: 20upx; - border-radius: 6upx; +.cu-card.article > .cu-item .content > image { + width: 240upx; + height: 6.4em; + margin-right: 20upx; + border-radius: 6upx; } -.cu-card.article>.cu-item .content .desc { - flex: 1; - display: flex; - flex-direction: column; - justify-content: space-between; +.cu-card.article > .cu-item .content .desc { + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; } -.cu-card.article>.cu-item .content .text-content { - font-size: 28upx; - color: #888; - height: 4.8em; - overflow: hidden; +.cu-card.article > .cu-item .content .text-content { + font-size: 28upx; + color: #888; + height: 4.8em; + overflow: hidden; } /* ================== @@ -2316,92 +2313,92 @@ button.cuIcon.lg { ==================== */ .cu-form-group { - background-color: #ffffff; - padding: 1upx 30upx; - display: flex; - align-items: center; - min-height: 100upx; - justify-content: space-between; + background-color: #ffffff; + padding: 1upx 30upx; + display: flex; + align-items: center; + min-height: 100upx; + justify-content: space-between; } -.cu-form-group+.cu-form-group { - border-top: 1upx solid #eee; +.cu-form-group + .cu-form-group { + border-top: 1upx solid #eee; } .cu-form-group .title { - text-align: justify; - padding-right: 30upx; - font-size: 30upx; - position: relative; - height: 60upx; - line-height: 60upx; + text-align: justify; + padding-right: 30upx; + font-size: 30upx; + position: relative; + height: 60upx; + line-height: 60upx; } .cu-form-group input { - flex: 1; - font-size: 30upx; - color: #555; - padding-right: 20upx; + flex: 1; + font-size: 30upx; + color: #555; + padding-right: 20upx; } -.cu-form-group>text[class*="cuIcon-"] { - font-size: 36upx; - padding: 0; - box-sizing: border-box; +.cu-form-group > text[class*='cuIcon-'] { + font-size: 36upx; + padding: 0; + box-sizing: border-box; } .cu-form-group textarea { - margin: 32upx 0 30upx; - height: 4.6em; - width: 100%; - line-height: 1.2em; - flex: 1; - font-size: 28upx; - padding: 0; + margin: 32upx 0 30upx; + height: 4.6em; + width: 100%; + line-height: 1.2em; + flex: 1; + font-size: 28upx; + padding: 0; } .cu-form-group.align-start .title { - height: 1em; - margin-top: 32upx; - line-height: 1em; + height: 1em; + margin-top: 32upx; + line-height: 1em; } .cu-form-group picker { - flex: 1; - padding-right: 40upx; - overflow: hidden; - position: relative; + flex: 1; + padding-right: 40upx; + overflow: hidden; + position: relative; } .cu-form-group picker .picker { - line-height: 100upx; - font-size: 28upx; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - width: 100%; - text-align: right; + line-height: 100upx; + font-size: 28upx; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + width: 100%; + text-align: right; } .cu-form-group picker::after { - font-family: cuIcon; - display: block; - content: "\e6a3"; - position: absolute; - font-size: 34upx; - color: #8799a3; - line-height: 100upx; - width: 60upx; - text-align: center; - top: 0; - bottom: 0; - right: -20upx; - margin: auto; + font-family: cuIcon; + display: block; + content: '\e6a3'; + position: absolute; + font-size: 34upx; + color: #8799a3; + line-height: 100upx; + width: 60upx; + text-align: center; + top: 0; + bottom: 0; + right: -20upx; + margin: auto; } .cu-form-group textarea[disabled], .cu-form-group textarea[disabled] .placeholder { - color: transparent; + color: transparent; } /* ================== @@ -2409,244 +2406,243 @@ button.cuIcon.lg { ==================== */ .cu-modal { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1110; - opacity: 0; - outline: 0; - text-align: center; - -ms-transform: scale(1.185); - transform: scale(1.185); - backface-visibility: hidden; - perspective: 2000upx; - background: rgba(0, 0, 0, 0.6); - transition: all 0.3s ease-in-out 0s; - pointer-events: none; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1110; + opacity: 0; + outline: 0; + text-align: center; + -ms-transform: scale(1.185); + transform: scale(1.185); + backface-visibility: hidden; + perspective: 2000upx; + background: rgba(0, 0, 0, 0.6); + transition: all 0.3s ease-in-out 0s; + pointer-events: none; } .cu-modal::before { - content: "\200B"; - display: inline-block; - height: 100%; - vertical-align: middle; + content: '\200B'; + display: inline-block; + height: 100%; + vertical-align: middle; } .cu-modal.show { - opacity: 1; - transition-duration: 0.3s; - -ms-transform: scale(1); - transform: scale(1); - overflow-x: hidden; - overflow-y: auto; - pointer-events: auto; + opacity: 1; + transition-duration: 0.3s; + -ms-transform: scale(1); + transform: scale(1); + overflow-x: hidden; + overflow-y: auto; + pointer-events: auto; } .cu-dialog { - position: relative; - display: inline-block; - vertical-align: middle; - margin-left: auto; - margin-right: auto; - width: 680upx; - max-width: 100%; - background-color: #f8f8f8; - border-radius: 10upx; - overflow: hidden; + position: relative; + display: inline-block; + vertical-align: middle; + margin-left: auto; + margin-right: auto; + width: 680upx; + max-width: 100%; + background-color: #f8f8f8; + border-radius: 10upx; + overflow: hidden; } .cu-modal.bottom-modal::before { - vertical-align: bottom; + vertical-align: bottom; } .cu-modal.bottom-modal .cu-dialog { - width: 100%; - border-radius: 0; + width: 100%; + border-radius: 0; } .cu-modal.bottom-modal { - margin-bottom: -1000upx; + margin-bottom: -1000upx; } .cu-modal.bottom-modal.show { - margin-bottom: 0; + margin-bottom: 0; } .cu-modal.drawer-modal { - transform: scale(1); - display: flex; + transform: scale(1); + display: flex; } .cu-modal.drawer-modal .cu-dialog { - height: 100%; - min-width: 200upx; - border-radius: 0; - margin: initial; - transition-duration: 0.3s; + height: 100%; + min-width: 200upx; + border-radius: 0; + margin: initial; + transition-duration: 0.3s; } .cu-modal.drawer-modal.justify-start .cu-dialog { - transform: translateX(-100%); + transform: translateX(-100%); } .cu-modal.drawer-modal.justify-end .cu-dialog { - transform: translateX(100%); + transform: translateX(100%); } .cu-modal.drawer-modal.show .cu-dialog { - transform: translateX(0%); + transform: translateX(0%); } -.cu-modal .cu-dialog>.cu-bar:first-child .action { - min-width: 100rpx; - margin-right: 0; - min-height: 100rpx; +.cu-modal .cu-dialog > .cu-bar:first-child .action { + min-width: 100rpx; + margin-right: 0; + min-height: 100rpx; } /* ================== 轮播 ==================== */ swiper .a-swiper-dot { - display: inline-block; - width: 16upx; - height: 16upx; - background: rgba(0, 0, 0, .3); - border-radius: 50%; - vertical-align: middle; + display: inline-block; + width: 16upx; + height: 16upx; + background: rgba(0, 0, 0, 0.3); + border-radius: 50%; + vertical-align: middle; } -swiper[class*="-dot"] .wx-swiper-dots, -swiper[class*="-dot"] .a-swiper-dots, -swiper[class*="-dot"] .uni-swiper-dots { - display: flex; - align-items: center; - width: 100%; - justify-content: center; +swiper[class*='-dot'] .wx-swiper-dots, +swiper[class*='-dot'] .a-swiper-dots, +swiper[class*='-dot'] .uni-swiper-dots { + display: flex; + align-items: center; + width: 100%; + justify-content: center; } swiper.square-dot .wx-swiper-dot, swiper.square-dot .a-swiper-dot, swiper.square-dot .uni-swiper-dot { - background-color: #ffffff; - opacity: 0.4; - width: 10upx; - height: 10upx; - border-radius: 20upx; - margin: 0 8upx !important; + background-color: #ffffff; + opacity: 0.4; + width: 10upx; + height: 10upx; + border-radius: 20upx; + margin: 0 8upx !important; } swiper.square-dot .wx-swiper-dot.wx-swiper-dot-active, swiper.square-dot .a-swiper-dot.a-swiper-dot-active, swiper.square-dot .uni-swiper-dot.uni-swiper-dot-active { - opacity: 1; - width: 30upx; + opacity: 1; + width: 30upx; } swiper.round-dot .wx-swiper-dot, swiper.round-dot .a-swiper-dot, swiper.round-dot .uni-swiper-dot { - width: 10upx; - height: 10upx; - position: relative; - margin: 4upx 8upx !important; + width: 10upx; + height: 10upx; + position: relative; + margin: 4upx 8upx !important; } swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active::after, swiper.round-dot .a-swiper-dot.a-swiper-dot-active::after, swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active::after { - content: ""; - position: absolute; - width: 10upx; - height: 10upx; - top: 0upx; - left: 0upx; - right: 0; - bottom: 0; - margin: auto; - background-color: #ffffff; - border-radius: 20upx; + content: ''; + position: absolute; + width: 10upx; + height: 10upx; + top: 0upx; + left: 0upx; + right: 0; + bottom: 0; + margin: auto; + background-color: #ffffff; + border-radius: 20upx; } swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active, swiper.round-dot .a-swiper-dot.a-swiper-dot-active, swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active { - width: 18upx; - height: 18upx; + width: 18upx; + height: 18upx; } .screen-swiper { - min-height: 375upx; + min-height: 375upx; } .screen-swiper image, .screen-swiper video, .swiper-item image, .swiper-item video { - width: 100%; - display: block; - height: 100%; - margin: 0; - pointer-events: none; + width: 100%; + display: block; + height: 100%; + margin: 0; + pointer-events: none; } .card-swiper { - height: 420upx !important; + height: 420upx !important; } .card-swiper swiper-item { - width: 610upx !important; - left: 70upx; - box-sizing: border-box; - padding: 40upx 0upx 70upx; - overflow: initial; + width: 610upx !important; + left: 70upx; + box-sizing: border-box; + padding: 40upx 0upx 70upx; + overflow: initial; } .card-swiper swiper-item .swiper-item { - width: 100%; - display: block; - height: 100%; - border-radius: 10upx; - transform: scale(0.9); - transition: all 0.2s ease-in 0s; - overflow: hidden; + width: 100%; + display: block; + height: 100%; + border-radius: 10upx; + transform: scale(0.9); + transition: all 0.2s ease-in 0s; + overflow: hidden; } .card-swiper swiper-item.cur .swiper-item { - transform: none; - transition: all 0.2s ease-in 0s; + transform: none; + transition: all 0.2s ease-in 0s; } - .tower-swiper { - height: 420upx; - position: relative; - max-width: 750upx; - overflow: hidden; + height: 420upx; + position: relative; + max-width: 750upx; + overflow: hidden; } .tower-swiper .tower-item { - position: absolute; - width: 300upx; - height: 380upx; - top: 0; - bottom: 0; - left: 50%; - margin: auto; - transition: all 0.2s ease-in 0s; - opacity: 1; + position: absolute; + width: 300upx; + height: 380upx; + top: 0; + bottom: 0; + left: 50%; + margin: auto; + transition: all 0.2s ease-in 0s; + opacity: 1; } .tower-swiper .tower-item.none { - opacity: 0; + opacity: 0; } .tower-swiper .tower-item .swiper-item { - width: 100%; - height: 100%; - border-radius: 6upx; - overflow: hidden; + width: 100%; + height: 100%; + border-radius: 6upx; + overflow: hidden; } /* ================== @@ -2654,135 +2650,135 @@ swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active { ==================== */ .cu-steps { - display: flex; + display: flex; } scroll-view.cu-steps { - display: block; - white-space: nowrap; + display: block; + white-space: nowrap; } scroll-view.cu-steps .cu-item { - display: inline-block; + display: inline-block; } .cu-steps .cu-item { - flex: 1; - text-align: center; - position: relative; - min-width: 100upx; + flex: 1; + text-align: center; + position: relative; + min-width: 100upx; } -.cu-steps .cu-item:not([class*="text-"]) { - color: #8799a3; +.cu-steps .cu-item:not([class*='text-']) { + color: #8799a3; } -.cu-steps .cu-item [class*="cuIcon-"], +.cu-steps .cu-item [class*='cuIcon-'], .cu-steps .cu-item .num { - display: block; - font-size: 40upx; - line-height: 80upx; + display: block; + font-size: 40upx; + line-height: 80upx; } .cu-steps .cu-item::before, .cu-steps .cu-item::after, .cu-steps.steps-arrow .cu-item::before, .cu-steps.steps-arrow .cu-item::after { - content: ""; - display: block; - position: absolute; - height: 0px; - width: calc(100% - 80upx); - border-bottom: 1px solid #ccc; - left: calc(0px - (100% - 80upx) / 2); - top: 40upx; - z-index: 0; + content: ''; + display: block; + position: absolute; + height: 0px; + width: calc(100% - 80upx); + border-bottom: 1px solid #ccc; + left: calc(0px - (100% - 80upx) / 2); + top: 40upx; + z-index: 0; } .cu-steps.steps-arrow .cu-item::before, .cu-steps.steps-arrow .cu-item::after { - content: "\e6a3"; - font-family: 'cuIcon'; - height: 30upx; - border-bottom-width: 0px; - line-height: 30upx; - top: 0; - bottom: 0; - margin: auto; - color: #ccc; + content: '\e6a3'; + font-family: 'cuIcon'; + height: 30upx; + border-bottom-width: 0px; + line-height: 30upx; + top: 0; + bottom: 0; + margin: auto; + color: #ccc; } .cu-steps.steps-bottom .cu-item::before, .cu-steps.steps-bottom .cu-item::after { - bottom: 40upx; - top: initial; + bottom: 40upx; + top: initial; } .cu-steps .cu-item::after { - border-bottom: 1px solid currentColor; - width: 0px; - transition: all 0.3s ease-in-out 0s; + border-bottom: 1px solid currentColor; + width: 0px; + transition: all 0.3s ease-in-out 0s; } -.cu-steps .cu-item[class*="text-"]::after { - width: calc(100% - 80upx); - color: currentColor; +.cu-steps .cu-item[class*='text-']::after { + width: calc(100% - 80upx); + color: currentColor; } .cu-steps .cu-item:first-child::before, .cu-steps .cu-item:first-child::after { - display: none; + display: none; } .cu-steps .cu-item .num { - width: 40upx; - height: 40upx; - border-radius: 50%; - line-height: 40upx; - margin: 20upx auto; - font-size: 24upx; - border: 1px solid currentColor; - position: relative; - overflow: hidden; + width: 40upx; + height: 40upx; + border-radius: 50%; + line-height: 40upx; + margin: 20upx auto; + font-size: 24upx; + border: 1px solid currentColor; + position: relative; + overflow: hidden; } -.cu-steps .cu-item[class*="text-"] .num { - background-color: currentColor; +.cu-steps .cu-item[class*='text-'] .num { + background-color: currentColor; } .cu-steps .cu-item .num::before, .cu-steps .cu-item .num::after { - content: attr(data-index); - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - margin: auto; - transition: all 0.3s ease-in-out 0s; - transform: translateY(0upx); + content: attr(data-index); + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + margin: auto; + transition: all 0.3s ease-in-out 0s; + transform: translateY(0upx); } -.cu-steps .cu-item[class*="text-"] .num::before { - transform: translateY(-40upx); - color: #ffffff; +.cu-steps .cu-item[class*='text-'] .num::before { + transform: translateY(-40upx); + color: #ffffff; } .cu-steps .cu-item .num::after { - transform: translateY(40upx); - color: #ffffff; - transition: all 0.3s ease-in-out 0s; + transform: translateY(40upx); + color: #ffffff; + transition: all 0.3s ease-in-out 0s; } -.cu-steps .cu-item[class*="text-"] .num::after { - content: "\e645"; - font-family: 'cuIcon'; - color: #ffffff; - transform: translateY(0upx); +.cu-steps .cu-item[class*='text-'] .num::after { + content: '\e645'; + font-family: 'cuIcon'; + color: #ffffff; + transform: translateY(0upx); } -.cu-steps .cu-item[class*="text-"] .num.err::after { - content: "\e646"; +.cu-steps .cu-item[class*='text-'] .num.err::after { + content: '\e646'; } /* ================== @@ -2792,540 +2788,540 @@ scroll-view.cu-steps .cu-item { /* -- flex弹性布局 -- */ .flex { - display: flex; + display: flex; } .basis-xs { - flex-basis: 20%; + flex-basis: 20%; } .basis-sm { - flex-basis: 40%; + flex-basis: 40%; } .basis-df { - flex-basis: 50%; + flex-basis: 50%; } .basis-lg { - flex-basis: 60%; + flex-basis: 60%; } .basis-xl { - flex-basis: 80%; + flex-basis: 80%; } .flex-sub { - flex: 1; + flex: 1; } .flex-twice { - flex: 2; + flex: 2; } .flex-treble { - flex: 3; + flex: 3; } .flex-direction { - flex-direction: column; + flex-direction: column; } .flex-wrap { - flex-wrap: wrap; + flex-wrap: wrap; } .align-start { - align-items: flex-start; + align-items: flex-start; } .align-end { - align-items: flex-end; + align-items: flex-end; } .align-center { - align-items: center; + align-items: center; } .align-stretch { - align-items: stretch; + align-items: stretch; } .self-start { - align-self: flex-start; + align-self: flex-start; } .self-center { - align-self: flex-center; + align-self: flex-center; } .self-end { - align-self: flex-end; + align-self: flex-end; } .self-stretch { - align-self: stretch; + align-self: stretch; } .align-stretch { - align-items: stretch; + align-items: stretch; } .justify-start { - justify-content: flex-start; + justify-content: flex-start; } .justify-end { - justify-content: flex-end; + justify-content: flex-end; } .justify-center { - justify-content: center; + justify-content: center; } .justify-between { - justify-content: space-between; + justify-content: space-between; } .justify-around { - justify-content: space-around; + justify-content: space-around; } /* grid布局 */ .grid { - display: flex; - flex-wrap: wrap; + display: flex; + flex-wrap: wrap; } .grid.grid-square { - overflow: hidden; + overflow: hidden; } .grid.grid-square .cu-tag { - position: absolute; - right: 0; - top: 0; - border-bottom-left-radius: 6upx; - padding: 6upx 12upx; - height: auto; - background-color: rgba(0, 0, 0, 0.5); -} - -.grid.grid-square>view>text[class*="cuIcon-"] { - font-size: 52upx; - position: absolute; - color: #8799a3; - margin: auto; - top: 0; - bottom: 0; - left: 0; - right: 0; - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; -} - -.grid.grid-square>view { - margin-right: 20upx; - margin-bottom: 20upx; - border-radius: 6upx; - position: relative; - overflow: hidden; + position: absolute; + right: 0; + top: 0; + border-bottom-left-radius: 6upx; + padding: 6upx 12upx; + height: auto; + background-color: rgba(0, 0, 0, 0.5); +} + +.grid.grid-square > view > text[class*='cuIcon-'] { + font-size: 52upx; + position: absolute; + color: #8799a3; + margin: auto; + top: 0; + bottom: 0; + left: 0; + right: 0; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.grid.grid-square > view { + margin-right: 20upx; + margin-bottom: 20upx; + border-radius: 6upx; + position: relative; + overflow: hidden; } -.grid.grid-square>view.bg-img image { - width: 100%; - height: 100%; - position: absolute; +.grid.grid-square > view.bg-img image { + width: 100%; + height: 100%; + position: absolute; } -.grid.col-1.grid-square>view { - padding-bottom: 100%; - height: 0; - margin-right: 0; +.grid.col-1.grid-square > view { + padding-bottom: 100%; + height: 0; + margin-right: 0; } -.grid.col-2.grid-square>view { - padding-bottom: calc((100% - 20upx)/2); - height: 0; - width: calc((100% - 20upx)/2); +.grid.col-2.grid-square > view { + padding-bottom: calc((100% - 20upx) / 2); + height: 0; + width: calc((100% - 20upx) / 2); } -.grid.col-3.grid-square>view { - padding-bottom: calc((100% - 40upx)/3); - height: 0; - width: calc((100% - 40upx)/3); +.grid.col-3.grid-square > view { + padding-bottom: calc((100% - 40upx) / 3); + height: 0; + width: calc((100% - 40upx) / 3); } -.grid.col-4.grid-square>view { - padding-bottom: calc((100% - 60upx)/4); - height: 0; - width: calc((100% - 60upx)/4); +.grid.col-4.grid-square > view { + padding-bottom: calc((100% - 60upx) / 4); + height: 0; + width: calc((100% - 60upx) / 4); } -.grid.col-5.grid-square>view { - padding-bottom: calc((100% - 80upx)/5); - height: 0; - width: calc((100% - 80upx)/5); +.grid.col-5.grid-square > view { + padding-bottom: calc((100% - 80upx) / 5); + height: 0; + width: calc((100% - 80upx) / 5); } -.grid.col-2.grid-square>view:nth-child(2n), -.grid.col-3.grid-square>view:nth-child(3n), -.grid.col-4.grid-square>view:nth-child(4n), -.grid.col-5.grid-square>view:nth-child(5n) { - margin-right: 0; +.grid.col-2.grid-square > view:nth-child(2n), +.grid.col-3.grid-square > view:nth-child(3n), +.grid.col-4.grid-square > view:nth-child(4n), +.grid.col-5.grid-square > view:nth-child(5n) { + margin-right: 0; } -.grid.col-1>view { - width: 100%; +.grid.col-1 > view { + width: 100%; } -.grid.col-2>view { - width: 50%; +.grid.col-2 > view { + width: 50%; } -.grid.col-3>view { - width: 33.33%; +.grid.col-3 > view { + width: 33.33%; } -.grid.col-4>view { - width: 25%; +.grid.col-4 > view { + width: 25%; } -.grid.col-5>view { - width: 20%; +.grid.col-5 > view { + width: 20%; } /* -- 内外边距 -- */ .margin-0 { - margin: 0; + margin: 0; } .margin-xs { - margin: 10upx; + margin: 10upx; } .margin-sm { - margin: 20upx; + margin: 20upx; } .margin { - margin: 30upx; + margin: 30upx; } .margin-lg { - margin: 40upx; + margin: 40upx; } .margin-xl { - margin: 50upx; + margin: 50upx; } .margin-top-xs { - margin-top: 10upx; + margin-top: 10upx; } .margin-top-sm { - margin-top: 20upx; + margin-top: 20upx; } .margin-top { - margin-top: 30upx; + margin-top: 30upx; } .margin-top-lg { - margin-top: 40upx; + margin-top: 40upx; } .margin-top-xl { - margin-top: 50upx; + margin-top: 50upx; } .margin-right-xs { - margin-right: 10upx; + margin-right: 10upx; } .margin-right-sm { - margin-right: 20upx; + margin-right: 20upx; } .margin-right { - margin-right: 30upx; + margin-right: 30upx; } .margin-right-lg { - margin-right: 40upx; + margin-right: 40upx; } .margin-right-xl { - margin-right: 50upx; + margin-right: 50upx; } .margin-bottom-xs { - margin-bottom: 10upx; + margin-bottom: 10upx; } .margin-bottom-sm { - margin-bottom: 20upx; + margin-bottom: 20upx; } .margin-bottom { - margin-bottom: 30upx; + margin-bottom: 30upx; } .margin-bottom-lg { - margin-bottom: 40upx; + margin-bottom: 40upx; } .margin-bottom-xl { - margin-bottom: 50upx; + margin-bottom: 50upx; } .margin-left-xs { - margin-left: 10upx; + margin-left: 10upx; } .margin-left-sm { - margin-left: 20upx; + margin-left: 20upx; } .margin-left { - margin-left: 30upx; + margin-left: 30upx; } .margin-left-lg { - margin-left: 40upx; + margin-left: 40upx; } .margin-left-xl { - margin-left: 50upx; + margin-left: 50upx; } .margin-lr-xs { - margin-left: 10upx; - margin-right: 10upx; + margin-left: 10upx; + margin-right: 10upx; } .margin-lr-sm { - margin-left: 20upx; - margin-right: 20upx; + margin-left: 20upx; + margin-right: 20upx; } .margin-lr { - margin-left: 30upx; - margin-right: 30upx; + margin-left: 30upx; + margin-right: 30upx; } .margin-lr-lg { - margin-left: 40upx; - margin-right: 40upx; + margin-left: 40upx; + margin-right: 40upx; } .margin-lr-xl { - margin-left: 50upx; - margin-right: 50upx; + margin-left: 50upx; + margin-right: 50upx; } .margin-tb-xs { - margin-top: 10upx; - margin-bottom: 10upx; + margin-top: 10upx; + margin-bottom: 10upx; } .margin-tb-sm { - margin-top: 20upx; - margin-bottom: 20upx; + margin-top: 20upx; + margin-bottom: 20upx; } .margin-tb { - margin-top: 30upx; - margin-bottom: 30upx; + margin-top: 30upx; + margin-bottom: 30upx; } .margin-tb-lg { - margin-top: 40upx; - margin-bottom: 40upx; + margin-top: 40upx; + margin-bottom: 40upx; } .margin-tb-xl { - margin-top: 50upx; - margin-bottom: 50upx; + margin-top: 50upx; + margin-bottom: 50upx; } .padding-0 { - padding: 0; + padding: 0; } .padding-xs { - padding: 10upx; + padding: 10upx; } .padding-sm { - padding: 20upx; + padding: 20upx; } .padding { - padding: 30upx; + padding: 30upx; } .padding-lg { - padding: 40upx; + padding: 40upx; } .padding-xl { - padding: 50upx; + padding: 50upx; } .padding-top-xs { - padding-top: 10upx; + padding-top: 10upx; } .padding-top-sm { - padding-top: 20upx; + padding-top: 20upx; } .padding-top { - padding-top: 30upx; + padding-top: 30upx; } .padding-top-lg { - padding-top: 40upx; + padding-top: 40upx; } .padding-top-xl { - padding-top: 50upx; + padding-top: 50upx; } .padding-right-xs { - padding-right: 10upx; + padding-right: 10upx; } .padding-right-sm { - padding-right: 20upx; + padding-right: 20upx; } .padding-right { - padding-right: 30upx; + padding-right: 30upx; } .padding-right-lg { - padding-right: 40upx; + padding-right: 40upx; } .padding-right-xl { - padding-right: 50upx; + padding-right: 50upx; } .padding-bottom-xs { - padding-bottom: 10upx; + padding-bottom: 10upx; } .padding-bottom-sm { - padding-bottom: 20upx; + padding-bottom: 20upx; } .padding-bottom { - padding-bottom: 30upx; + padding-bottom: 30upx; } .padding-bottom-lg { - padding-bottom: 40upx; + padding-bottom: 40upx; } .padding-bottom-xl { - padding-bottom: 50upx; + padding-bottom: 50upx; } .padding-left-xs { - padding-left: 10upx; + padding-left: 10upx; } .padding-left-sm { - padding-left: 20upx; + padding-left: 20upx; } .padding-left { - padding-left: 30upx; + padding-left: 30upx; } .padding-left-lg { - padding-left: 40upx; + padding-left: 40upx; } .padding-left-xl { - padding-left: 50upx; + padding-left: 50upx; } .padding-lr-xs { - padding-left: 10upx; - padding-right: 10upx; + padding-left: 10upx; + padding-right: 10upx; } .padding-lr-sm { - padding-left: 20upx; - padding-right: 20upx; + padding-left: 20upx; + padding-right: 20upx; } .padding-lr { - padding-left: 30upx; - padding-right: 30upx; + padding-left: 30upx; + padding-right: 30upx; } .padding-lr-lg { - padding-left: 40upx; - padding-right: 40upx; + padding-left: 40upx; + padding-right: 40upx; } .padding-lr-xl { - padding-left: 50upx; - padding-right: 50upx; + padding-left: 50upx; + padding-right: 50upx; } .padding-tb-xs { - padding-top: 10upx; - padding-bottom: 10upx; + padding-top: 10upx; + padding-bottom: 10upx; } .padding-tb-sm { - padding-top: 20upx; - padding-bottom: 20upx; + padding-top: 20upx; + padding-bottom: 20upx; } .padding-tb { - padding-top: 30upx; - padding-bottom: 30upx; + padding-top: 30upx; + padding-bottom: 30upx; } .padding-tb-lg { - padding-top: 40upx; - padding-bottom: 40upx; + padding-top: 40upx; + padding-bottom: 40upx; } .padding-tb-xl { - padding-top: 50upx; - padding-bottom: 50upx; + padding-top: 50upx; + padding-bottom: 50upx; } /* -- 浮动 -- */ .cf::after, .cf::before { - content: " "; - display: table; + content: ' '; + display: table; } .cf::after { - clear: both; + clear: both; } .fl { - float: left; + float: left; } .fr { - float: right; + float: right; } /* ================== @@ -3334,415 +3330,415 @@ scroll-view.cu-steps .cu-item { .line-red::after, .lines-red::after { - border-color: #e54d42; + border-color: #e54d42; } .line-orange::after, .lines-orange::after { - border-color: #f37b1d; + border-color: #f37b1d; } .line-yellow::after, .lines-yellow::after { - border-color: #fbbd08; + border-color: #fbbd08; } .line-olive::after, .lines-olive::after { - border-color: #8dc63f; + border-color: #8dc63f; } .line-green::after, .lines-green::after { - border-color: #39b54a; + border-color: #39b54a; } .line-cyan::after, .lines-cyan::after { - border-color: #1cbbb4; + border-color: #1cbbb4; } .line-blue::after, .lines-blue::after { - border-color: #0081ff; + border-color: #0081ff; } .line-purple::after, .lines-purple::after { - border-color: #6739b6; + border-color: #6739b6; } .line-mauve::after, .lines-mauve::after { - border-color: #9c26b0; + border-color: #9c26b0; } .line-pink::after, .lines-pink::after { - border-color: #e03997; + border-color: #e03997; } .line-brown::after, .lines-brown::after { - border-color: #a5673f; + border-color: #a5673f; } .line-grey::after, .lines-grey::after { - border-color: #8799a3; + border-color: #8799a3; } .line-gray::after, .lines-gray::after { - border-color: #aaaaaa; + border-color: #aaaaaa; } .line-black::after, .lines-black::after { - border-color: #333333; + border-color: #333333; } .line-white::after, .lines-white::after { - border-color: #ffffff; + border-color: #ffffff; } .bg-red { - background-color: #e54d42; - color: #ffffff; + background-color: #e54d42; + color: #ffffff; } .bg-orange { - background-color: #f37b1d; - color: #ffffff; + background-color: #f37b1d; + color: #ffffff; } .bg-yellow { - background-color: #fbbd08; - color: #333333; + background-color: #fbbd08; + color: #333333; } .bg-olive { - background-color: #8dc63f; - color: #ffffff; + background-color: #8dc63f; + color: #ffffff; } .bg-green { - background-color: #39b54a; - color: #ffffff; + background-color: #39b54a; + color: #ffffff; } .bg-cyan { - background-color: #1cbbb4; - color: #ffffff; + background-color: #1cbbb4; + color: #ffffff; } .bg-blue { - background-color: #0081ff; - color: #ffffff; + background-color: #0081ff; + color: #ffffff; } .bg-purple { - background-color: #6739b6; - color: #ffffff; + background-color: #6739b6; + color: #ffffff; } .bg-mauve { - background-color: #9c26b0; - color: #ffffff; + background-color: #9c26b0; + color: #ffffff; } .bg-pink { - background-color: #e03997; - color: #ffffff; + background-color: #e03997; + color: #ffffff; } .bg-brown { - background-color: #a5673f; - color: #ffffff; + background-color: #a5673f; + color: #ffffff; } .bg-grey { - background-color: #8799a3; - color: #ffffff; + background-color: #8799a3; + color: #ffffff; } .bg-gray { - background-color: #f0f0f0; - color: #333333; + background-color: #f0f0f0; + color: #333333; } .bg-black { - background-color: #333333; - color: #ffffff; + background-color: #333333; + color: #ffffff; } .bg-white { - background-color: #ffffff; - color: #666666; + background-color: #ffffff; + color: #666666; } .bg-shadeTop { - background-image: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.01)); - color: #ffffff; + background-image: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.01)); + color: #ffffff; } .bg-shadeBottom { - background-image: linear-gradient(rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 1)); - color: #ffffff; + background-image: linear-gradient(rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 1)); + color: #ffffff; } .bg-red.light { - color: #e54d42; - background-color: #fadbd9; + color: #e54d42; + background-color: #fadbd9; } .bg-orange.light { - color: #f37b1d; - background-color: #fde6d2; + color: #f37b1d; + background-color: #fde6d2; } .bg-yellow.light { - color: #fbbd08; - background-color: #fef2ced2; + color: #fbbd08; + background-color: #fef2ced2; } .bg-olive.light { - color: #8dc63f; - background-color: #e8f4d9; + color: #8dc63f; + background-color: #e8f4d9; } .bg-green.light { - color: #39b54a; - background-color: #d7f0dbff; + color: #39b54a; + background-color: #d7f0dbff; } .bg-cyan.light { - color: #1cbbb4; - background-color: #d2f1f0; + color: #1cbbb4; + background-color: #d2f1f0; } .bg-blue.light { - color: #0081ff; - background-color: #cce6ff; + color: #0081ff; + background-color: #cce6ff; } .bg-purple.light { - color: #6739b6; - background-color: #e1d7f0; + color: #6739b6; + background-color: #e1d7f0; } .bg-mauve.light { - color: #9c26b0; - background-color: #ebd4ef; + color: #9c26b0; + background-color: #ebd4ef; } .bg-pink.light { - color: #e03997; - background-color: #f9d7ea; + color: #e03997; + background-color: #f9d7ea; } .bg-brown.light { - color: #a5673f; - background-color: #ede1d9; + color: #a5673f; + background-color: #ede1d9; } .bg-grey.light { - color: #8799a3; - background-color: #e7ebed; + color: #8799a3; + background-color: #e7ebed; } .bg-gradual-red { - background-image: linear-gradient(45deg, #f43f3b, #ec008c); - color: #ffffff; + background-image: linear-gradient(45deg, #f43f3b, #ec008c); + color: #ffffff; } .bg-gradual-orange { - background-image: linear-gradient(45deg, #ff9700, #ed1c24); - color: #ffffff; + background-image: linear-gradient(45deg, #ff9700, #ed1c24); + color: #ffffff; } .bg-gradual-green { - background-image: linear-gradient(45deg, #39b54a, #8dc63f); - color: #ffffff; + background-image: linear-gradient(45deg, #39b54a, #8dc63f); + color: #ffffff; } .bg-gradual-purple { - background-image: linear-gradient(45deg, #9000ff, #5e00ff); - color: #ffffff; + background-image: linear-gradient(45deg, #9000ff, #5e00ff); + color: #ffffff; } .bg-gradual-pink { - background-image: linear-gradient(45deg, #ec008c, #6739b6); - color: #ffffff; + background-image: linear-gradient(45deg, #ec008c, #6739b6); + color: #ffffff; } .bg-gradual-blue { - background-image: linear-gradient(45deg, #0081ff, #1cbbb4); - color: #ffffff; + background-image: linear-gradient(45deg, #0081ff, #1cbbb4); + color: #ffffff; } -.shadow[class*="-red"] { - box-shadow: 6upx 6upx 8upx rgba(204, 69, 59, 0.2); +.shadow[class*='-red'] { + box-shadow: 6upx 6upx 8upx rgba(204, 69, 59, 0.2); } -.shadow[class*="-orange"] { - box-shadow: 6upx 6upx 8upx rgba(217, 109, 26, 0.2); +.shadow[class*='-orange'] { + box-shadow: 6upx 6upx 8upx rgba(217, 109, 26, 0.2); } -.shadow[class*="-yellow"] { - box-shadow: 6upx 6upx 8upx rgba(224, 170, 7, 0.2); +.shadow[class*='-yellow'] { + box-shadow: 6upx 6upx 8upx rgba(224, 170, 7, 0.2); } -.shadow[class*="-olive"] { - box-shadow: 6upx 6upx 8upx rgba(124, 173, 55, 0.2); +.shadow[class*='-olive'] { + box-shadow: 6upx 6upx 8upx rgba(124, 173, 55, 0.2); } -.shadow[class*="-green"] { - box-shadow: 6upx 6upx 8upx rgba(48, 156, 63, 0.2); +.shadow[class*='-green'] { + box-shadow: 6upx 6upx 8upx rgba(48, 156, 63, 0.2); } -.shadow[class*="-cyan"] { - box-shadow: 6upx 6upx 8upx rgba(28, 187, 180, 0.2); +.shadow[class*='-cyan'] { + box-shadow: 6upx 6upx 8upx rgba(28, 187, 180, 0.2); } -.shadow[class*="-blue"] { - box-shadow: 6upx 6upx 8upx rgba(0, 102, 204, 0.2); +.shadow[class*='-blue'] { + box-shadow: 6upx 6upx 8upx rgba(0, 102, 204, 0.2); } -.shadow[class*="-purple"] { - box-shadow: 6upx 6upx 8upx rgba(88, 48, 156, 0.2); +.shadow[class*='-purple'] { + box-shadow: 6upx 6upx 8upx rgba(88, 48, 156, 0.2); } -.shadow[class*="-mauve"] { - box-shadow: 6upx 6upx 8upx rgba(133, 33, 150, 0.2); +.shadow[class*='-mauve'] { + box-shadow: 6upx 6upx 8upx rgba(133, 33, 150, 0.2); } -.shadow[class*="-pink"] { - box-shadow: 6upx 6upx 8upx rgba(199, 50, 134, 0.2); +.shadow[class*='-pink'] { + box-shadow: 6upx 6upx 8upx rgba(199, 50, 134, 0.2); } -.shadow[class*="-brown"] { - box-shadow: 6upx 6upx 8upx rgba(140, 88, 53, 0.2); +.shadow[class*='-brown'] { + box-shadow: 6upx 6upx 8upx rgba(140, 88, 53, 0.2); } -.shadow[class*="-grey"] { - box-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); +.shadow[class*='-grey'] { + box-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); } -.shadow[class*="-gray"] { - box-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); +.shadow[class*='-gray'] { + box-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); } -.shadow[class*="-black"] { - box-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); +.shadow[class*='-black'] { + box-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); } -.shadow[class*="-white"] { - box-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); +.shadow[class*='-white'] { + box-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); } -.text-shadow[class*="-red"] { - text-shadow: 6upx 6upx 8upx rgba(204, 69, 59, 0.2); +.text-shadow[class*='-red'] { + text-shadow: 6upx 6upx 8upx rgba(204, 69, 59, 0.2); } -.text-shadow[class*="-orange"] { - text-shadow: 6upx 6upx 8upx rgba(217, 109, 26, 0.2); +.text-shadow[class*='-orange'] { + text-shadow: 6upx 6upx 8upx rgba(217, 109, 26, 0.2); } -.text-shadow[class*="-yellow"] { - text-shadow: 6upx 6upx 8upx rgba(224, 170, 7, 0.2); +.text-shadow[class*='-yellow'] { + text-shadow: 6upx 6upx 8upx rgba(224, 170, 7, 0.2); } -.text-shadow[class*="-olive"] { - text-shadow: 6upx 6upx 8upx rgba(124, 173, 55, 0.2); +.text-shadow[class*='-olive'] { + text-shadow: 6upx 6upx 8upx rgba(124, 173, 55, 0.2); } -.text-shadow[class*="-green"] { - text-shadow: 6upx 6upx 8upx rgba(48, 156, 63, 0.2); +.text-shadow[class*='-green'] { + text-shadow: 6upx 6upx 8upx rgba(48, 156, 63, 0.2); } -.text-shadow[class*="-cyan"] { - text-shadow: 6upx 6upx 8upx rgba(28, 187, 180, 0.2); +.text-shadow[class*='-cyan'] { + text-shadow: 6upx 6upx 8upx rgba(28, 187, 180, 0.2); } -.text-shadow[class*="-blue"] { - text-shadow: 6upx 6upx 8upx rgba(0, 102, 204, 0.2); +.text-shadow[class*='-blue'] { + text-shadow: 6upx 6upx 8upx rgba(0, 102, 204, 0.2); } -.text-shadow[class*="-purple"] { - text-shadow: 6upx 6upx 8upx rgba(88, 48, 156, 0.2); +.text-shadow[class*='-purple'] { + text-shadow: 6upx 6upx 8upx rgba(88, 48, 156, 0.2); } -.text-shadow[class*="-mauve"] { - text-shadow: 6upx 6upx 8upx rgba(133, 33, 150, 0.2); +.text-shadow[class*='-mauve'] { + text-shadow: 6upx 6upx 8upx rgba(133, 33, 150, 0.2); } -.text-shadow[class*="-pink"] { - text-shadow: 6upx 6upx 8upx rgba(199, 50, 134, 0.2); +.text-shadow[class*='-pink'] { + text-shadow: 6upx 6upx 8upx rgba(199, 50, 134, 0.2); } -.text-shadow[class*="-brown"] { - text-shadow: 6upx 6upx 8upx rgba(140, 88, 53, 0.2); +.text-shadow[class*='-brown'] { + text-shadow: 6upx 6upx 8upx rgba(140, 88, 53, 0.2); } -.text-shadow[class*="-grey"] { - text-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); +.text-shadow[class*='-grey'] { + text-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); } -.text-shadow[class*="-gray"] { - text-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); +.text-shadow[class*='-gray'] { + text-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); } -.text-shadow[class*="-black"] { - text-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); +.text-shadow[class*='-black'] { + text-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); } .bg-img { - background-size: cover; - background-position: center; - background-repeat: no-repeat; + background-size: cover; + background-position: center; + background-repeat: no-repeat; } .bg-mask { - background-color: #333333; - position: relative; + background-color: #333333; + position: relative; } .bg-mask::after { - content: ""; - border-radius: inherit; - width: 100%; - height: 100%; - display: block; - background-color: rgba(0, 0, 0, 0.4); - position: absolute; - left: 0; - right: 0; - bottom: 0; - top: 0; + content: ''; + border-radius: inherit; + width: 100%; + height: 100%; + display: block; + background-color: rgba(0, 0, 0, 0.4); + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; } .bg-mask view, .bg-mask cover-view { - z-index: 5; - position: relative; + z-index: 5; + position: relative; } .bg-video { - position: relative; + position: relative; } .bg-video video { - display: block; - height: 100%; - width: 100%; - -o-object-fit: cover; - object-fit: cover; - position: absolute; - top: 0; - z-index: 0; - pointer-events: none; + display: block; + height: 100%; + width: 100%; + -o-object-fit: cover; + object-fit: cover; + position: absolute; + top: 0; + z-index: 0; + pointer-events: none; } /* ================== @@ -3750,167 +3746,167 @@ scroll-view.cu-steps .cu-item { ==================== */ .text-xs { - font-size: 20upx; + font-size: 20upx; } .text-sm { - font-size: 24upx; + font-size: 24upx; } .text-df { - font-size: 28upx; + font-size: 28upx; } .text-lg { - font-size: 32upx; + font-size: 32upx; } .text-xl { - font-size: 36upx; + font-size: 36upx; } .text-xxl { - font-size: 44upx; + font-size: 44upx; } .text-sl { - font-size: 80upx; + font-size: 80upx; } .text-xsl { - font-size: 120upx; + font-size: 120upx; } .text-Abc { - text-transform: Capitalize; + text-transform: Capitalize; } .text-ABC { - text-transform: Uppercase; + text-transform: Uppercase; } .text-abc { - text-transform: Lowercase; + text-transform: Lowercase; } .text-price::before { - content: "¥"; - font-size: 80%; - margin-right: 4upx; + content: '¥'; + font-size: 80%; + margin-right: 4upx; } .text-cut { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } .text-bold { - font-weight: bold; + font-weight: bold; } .text-center { - text-align: center; + text-align: center; } .text-content { - line-height: 1.6; + line-height: 1.6; } .text-left { - text-align: left; + text-align: left; } .text-right { - text-align: right; + text-align: right; } .text-red, .line-red, .lines-red { - color: #e54d42; + color: #e54d42; } .text-orange, .line-orange, .lines-orange { - color: #f37b1d; + color: #f37b1d; } .text-yellow, .line-yellow, .lines-yellow { - color: #fbbd08; + color: #fbbd08; } .text-olive, .line-olive, .lines-olive { - color: #8dc63f; + color: #8dc63f; } .text-green, .line-green, .lines-green { - color: #39b54a; + color: #39b54a; } .text-cyan, .line-cyan, .lines-cyan { - color: #1cbbb4; + color: #1cbbb4; } .text-blue, .line-blue, .lines-blue { - color: #0081ff; + color: #0081ff; } .text-purple, .line-purple, .lines-purple { - color: #6739b6; + color: #6739b6; } .text-mauve, .line-mauve, .lines-mauve { - color: #9c26b0; + color: #9c26b0; } .text-pink, .line-pink, .lines-pink { - color: #e03997; + color: #e03997; } .text-brown, .line-brown, .lines-brown { - color: #a5673f; + color: #a5673f; } .text-grey, .line-grey, .lines-grey { - color: #8799a3; + color: #8799a3; } .text-gray, .line-gray, .lines-gray { - color: #aaaaaa; + color: #aaaaaa; } .text-black, .line-black, .lines-black { - color: #333333; + color: #333333; } .text-white, .line-white, .lines-white { - color: #ffffff; + color: #ffffff; } diff --git a/src/components/e-picker/e-picker.vue b/src/components/e-picker/e-picker.vue index e1f15d3..b702f78 100644 --- a/src/components/e-picker/e-picker.vue +++ b/src/components/e-picker/e-picker.vue @@ -1,138 +1,139 @@ - - - + + + diff --git a/src/components/goods-list/list-A.vue b/src/components/goods-list/list-A.vue index 0f3b36e..0dcb97c 100644 --- a/src/components/goods-list/list-A.vue +++ b/src/components/goods-list/list-A.vue @@ -1,111 +1,114 @@ diff --git a/src/components/goods-list/list-B.vue b/src/components/goods-list/list-B.vue index b707158..97422cb 100644 --- a/src/components/goods-list/list-B.vue +++ b/src/components/goods-list/list-B.vue @@ -1,322 +1,327 @@ + diff --git a/src/components/goods-list/list-C.vue b/src/components/goods-list/list-C.vue index 26a1cf7..e883e89 100644 --- a/src/components/goods-list/list-C.vue +++ b/src/components/goods-list/list-C.vue @@ -1,161 +1,164 @@ diff --git a/src/components/goods-list/list-D.vue b/src/components/goods-list/list-D.vue index 3a34045..31f7d42 100644 --- a/src/components/goods-list/list-D.vue +++ b/src/components/goods-list/list-D.vue @@ -1,114 +1,116 @@ diff --git a/src/components/he-clear-storage.vue b/src/components/he-clear-storage.vue index aafa91d..e1fb18a 100644 --- a/src/components/he-clear-storage.vue +++ b/src/components/he-clear-storage.vue @@ -1,116 +1,122 @@ + \ No newline at end of file + diff --git a/src/components/he-empty-popup.vue b/src/components/he-empty-popup.vue index 47977b3..fb3e645 100644 --- a/src/components/he-empty-popup.vue +++ b/src/components/he-empty-popup.vue @@ -1,101 +1,101 @@ \ No newline at end of file + diff --git a/src/components/he-html/he-html.vue b/src/components/he-html/he-html.vue index 1320d89..494cff8 100644 --- a/src/components/he-html/he-html.vue +++ b/src/components/he-html/he-html.vue @@ -1,11 +1,16 @@ @@ -34,13 +39,13 @@ * @event {Function} linkTap 链接被点击时触发 * @event {Function} error 媒体加载出错时触发 */ -const plugins=[] -const parser = require('./parser') +const plugins = []; +const parser = require('./parser'); // #ifndef APP-PLUS-NVUE -import node from './node/node' +import node from './node/node'; // #endif // #ifdef APP-PLUS-NVUE -const dom = weex.requireModule('dom') +const dom = weex.requireModule('dom'); // #endif export default { name: 'mp-html', @@ -50,7 +55,7 @@ export default { // #ifdef APP-PLUS-NVUE height: 0 // #endif - } + }; }, props: { // #ifdef APP-PLUS-NVUE @@ -84,7 +89,7 @@ export default { default: true }, tagStyle: Object, - useAnchor: null, + useAnchor: null }, // #ifndef APP-PLUS-NVUE components: { @@ -93,21 +98,19 @@ export default { // #endif watch: { content(content) { - this.setContent(content) + this.setContent(content); } }, created() { - this.plugins = [] - for (var i = plugins.length; i--;) - this.plugins.push(new plugins[i](this)) + this.plugins = []; + for (var i = plugins.length; i--; ) this.plugins.push(new plugins[i](this)); }, mounted() { - if (this.content && !this.nodes.length) - this.setContent(this.content); + if (this.content && !this.nodes.length) this.setContent(this.content); }, beforeDestroy() { - this._hook('onDetached') - clearInterval(this._timer) + this._hook('onDetached'); + clearInterval(this._timer); }, methods: { /** @@ -123,7 +126,7 @@ export default { page, selector, scrollTop - } + }; // #endif }, @@ -135,56 +138,56 @@ export default { */ navigateTo(id, offset) { return new Promise((resolve, reject) => { - if (!this.useAnchor) - return reject('Anchor is disabled') - offset = offset || parseInt(this.useAnchor) || 0 + if (!this.useAnchor) return reject('Anchor is disabled'); + offset = offset || parseInt(this.useAnchor) || 0; // #ifdef APP-PLUS-NVUE if (!id) { dom.scrollToElement(this.$refs.web, { offset - }) - resolve() + }); + resolve(); } else { this._navigateTo = { resolve, reject, offset - } - this.$refs.web.evalJs('uni.postMessage({data:{action:"getOffset",offset:(document.getElementById(' + id + ')||{}).offsetTop}})') + }; + this.$refs.web.evalJs( + 'uni.postMessage({data:{action:"getOffset",offset:(document.getElementById(' + id + ')||{}).offsetTop}})' + ); } // #endif // #ifndef APP-PLUS-NVUE - var deep = ' ' + var deep = ' '; // #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO - deep = '>>>' + deep = '>>>'; // #endif - var selector = uni.createSelectorQuery() + var selector = uni + .createSelectorQuery() // #ifndef MP-ALIPAY .in(this._in ? this._in.page : this) // #endif - .select((this._in ? this._in.selector : '._root') + (id ? `${deep}#${id}` : '')).boundingClientRect() - if (this._in) - selector.select(this._in.selector).scrollOffset() - .select(this._in.selector).boundingClientRect() // 获取 scroll-view 的位置和滚动距离 - else - selector.selectViewport().scrollOffset() // 获取窗口的滚动距离 + .select((this._in ? this._in.selector : '._root') + (id ? `${deep}#${id}` : '')) + .boundingClientRect(); + if (this._in) selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect(); + // 获取 scroll-view 的位置和滚动距离 + else selector.selectViewport().scrollOffset(); // 获取窗口的滚动距离 selector.exec(res => { - if (!res[0]) - return reject('Label not found') - var scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset + if (!res[0]) return reject('Label not found'); + var scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset; if (this._in) // scroll-view 跳转 - this._in.page[this._in.scrollTop] = scrollTop + this._in.page[this._in.scrollTop] = scrollTop; + // 页面跳转 else - // 页面跳转 uni.pageScrollTo({ scrollTop, duration: 300 - }) - resolve() - }) + }); + resolve(); + }); // #endif - }) + }); }, /** @@ -195,27 +198,26 @@ export default { var text = ''; (function traversal(nodes) { for (var i = 0; i < nodes.length; i++) { - var node = nodes[i] - if (node.type == 'text') - text += node.text.replace(/&/g, '&') - else if (node.name == 'br') - text += '\n' + var node = nodes[i]; + if (node.type == 'text') text += node.text.replace(/&/g, '&'); + else if (node.name == 'br') text += '\n'; else { // 块级标签前后加换行 - var isBlock = node.name == 'p' || node.name == 'div' || node.name == 'tr' || node.name == 'li' || (node.name[0] == 'h' && node.name[1] > '0' && node.name[1] < '7') - if (isBlock && text && text[text.length - 1] != '\n') - text += '\n' + var isBlock = + node.name == 'p' || + node.name == 'div' || + node.name == 'tr' || + node.name == 'li' || + (node.name[0] == 'h' && node.name[1] > '0' && node.name[1] < '7'); + if (isBlock && text && text[text.length - 1] != '\n') text += '\n'; // 递归获取子节点的文本 - if (node.children) - traversal(node.children) - if (isBlock && text[text.length - 1] != '\n') - text += '\n' - else if (node.name == 'td' || node.name == 'th') - text += '\t' + if (node.children) traversal(node.children); + if (isBlock && text[text.length - 1] != '\n') text += '\n'; + else if (node.name == 'td' || node.name == 'th') text += '\t'; } } - })(this.nodes) - return text + })(this.nodes); + return text; }, /** @@ -224,12 +226,15 @@ export default { */ getRect() { return new Promise((resolve, reject) => { - uni.createSelectorQuery() + uni + .createSelectorQuery() // #ifndef MP-ALIPAY .in(this) // #endif - .select('._root').boundingClientRect().exec(res => res[0] ? resolve(res[0]) : reject('Root label not found')) - }) + .select('._root') + .boundingClientRect() + .exec(res => (res[0] ? resolve(res[0]) : reject('Root label not found'))); + }); }, /** @@ -238,35 +243,35 @@ export default { * @param {Boolean} append 是否在尾部追加 */ setContent(content, append) { - if (!append || !this.imgList) - this.imgList = [] - var nodes = new parser(this).parse(content) + if (!append || !this.imgList) this.imgList = []; + var nodes = new parser(this).parse(content); // #ifdef APP-PLUS-NVUE - if (this._ready) - this._set(nodes, append) + if (this._ready) this._set(nodes, append); // #endif - this.$set(this, 'nodes', append ? (this.nodes || []).concat(nodes) : nodes) + this.$set(this, 'nodes', append ? (this.nodes || []).concat(nodes) : nodes); // #ifndef APP-PLUS-NVUE - this._videos = [] + this._videos = []; this.$nextTick(() => { - this._hook('onLoad') - this.$emit('load') - }) + this._hook('onLoad'); + this.$emit('load'); + }); // 等待图片加载完毕 - var height - clearInterval(this._timer) + var height; + clearInterval(this._timer); this._timer = setInterval(() => { - this.getRect().then(rect => { - // 350ms 总高度无变化就触发 ready 事件 - if (rect.height == height) { - this.$emit('ready', rect) - clearInterval(this._timer) - } - height = rect.height - }).catch(() => { }) - }, 350) + this.getRect() + .then(rect => { + // 350ms 总高度无变化就触发 ready 事件 + if (rect.height == height) { + this.$emit('ready', rect); + clearInterval(this._timer); + } + height = rect.height; + }) + .catch(() => {}); + }, 350); // #endif }, @@ -274,9 +279,7 @@ export default { * @description 调用插件钩子函数 */ _hook(name) { - for (var i = plugins.length; i--;) - if (this.plugins[i][name]) - this.plugins[i][name]() + for (var i = plugins.length; i--; ) if (this.plugins[i][name]) this.plugins[i][name](); }, // #ifdef APP-PLUS-NVUE @@ -284,99 +287,112 @@ export default { * @description 设置内容 */ _set(nodes, append) { - this.$refs.web.evalJs('setContent(' + JSON.stringify(nodes) + ',' + JSON.stringify([this.bgColor, this.errorImg, this.loadingImg, this.pauseVideo, this.scrollTable, this.selectable]) + ',' + append + ')') + this.$refs.web.evalJs( + 'setContent(' + + JSON.stringify(nodes) + + ',' + + JSON.stringify([ + this.bgColor, + this.errorImg, + this.loadingImg, + this.pauseVideo, + this.scrollTable, + this.selectable + ]) + + ',' + + append + + ')' + ); }, /** * @description 接收到 web-view 消息 */ _onMessage(e) { - var message = e.detail.data[0] + var message = e.detail.data[0]; switch (message.action) { // web-view 初始化完毕 case 'onJSBridgeReady': - this._ready = true - if (this.nodes) - this._set(this.nodes) - break + this._ready = true; + if (this.nodes) this._set(this.nodes); + break; // 内容 dom 加载完毕 case 'onLoad': - this.height = message.height - this._hook('onLoad') - this.$emit('load') - break + this.height = message.height; + this._hook('onLoad'); + this.$emit('load'); + break; // 所有图片加载完毕 case 'onReady': - this.getRect().then(res => { - this.$emit('ready', res) - }).catch(() => { }) - break + this.getRect() + .then(res => { + this.$emit('ready', res); + }) + .catch(() => {}); + break; // 总高度发生变化 case 'onHeightChange': - this.height = message.height - break + this.height = message.height; + break; // 图片点击 case 'onImgTap': - this.$emit('imgtap', message.attrs) + this.$emit('imgtap', message.attrs); if (this.previewImg) uni.previewImage({ current: parseInt(message.attrs.i), urls: this.imgList - }) - break + }); + break; // 链接点击 case 'onLinkTap': - var href = message.attrs.href - this.$emit('linktap', message.attrs) + var href = message.attrs.href; + this.$emit('linktap', message.attrs); if (href) { // 锚点跳转 if (href[0] == '#') { if (this.useAnchor) dom.scrollToElement(this.$refs.web, { offset: message.offset - }) + }); } // 打开外链 else if (href.includes('://')) { - if (this.copyLink) - plus.runtime.openWeb(href) - } - else + if (this.copyLink) plus.runtime.openWeb(href); + } else uni.navigateTo({ url: href, fail() { wx.switchTab({ url: href - }) + }); } - }) + }); } - break + break; // 获取到锚点的偏移量 case 'getOffset': if (typeof message.offset == 'number') { dom.scrollToElement(this.$refs.web, { offset: message.offset + this._navigateTo.offset - }) - this._navigateTo.resolve() - } else - this._navigateTo.reject('Label not found') - break + }); + this._navigateTo.resolve(); + } else this._navigateTo.reject('Label not found'); + break; // 点击 case 'onClick': - this.$emit('tap') - break + this.$emit('tap'); + break; // 出错 case 'onError': this.$emit('error', { source: message.source, attrs: message.attrs - }) + }); } } // #endif } -} +}; diff --git a/src/components/he-image.vue b/src/components/he-image.vue index d225cab..6dec931 100644 --- a/src/components/he-image.vue +++ b/src/components/he-image.vue @@ -1,128 +1,138 @@ diff --git a/src/components/he-index-cart.vue b/src/components/he-index-cart.vue index 5198955..63abee5 100644 --- a/src/components/he-index-cart.vue +++ b/src/components/he-index-cart.vue @@ -1,57 +1,57 @@ \ No newline at end of file + } +}; + diff --git a/src/components/he-line.vue b/src/components/he-line.vue index 82514a1..438da57 100644 --- a/src/components/he-line.vue +++ b/src/components/he-line.vue @@ -1,70 +1,68 @@ diff --git a/src/components/he-load-more.vue b/src/components/he-load-more.vue index 6e48b28..e482280 100644 --- a/src/components/he-load-more.vue +++ b/src/components/he-load-more.vue @@ -1,200 +1,204 @@ diff --git a/src/components/he-loading.vue b/src/components/he-loading.vue index 6c3392c..9b80cf0 100644 --- a/src/components/he-loading.vue +++ b/src/components/he-loading.vue @@ -1,93 +1,98 @@ diff --git a/src/components/he-mask.vue b/src/components/he-mask.vue index 7116cdf..d0f6646 100644 --- a/src/components/he-mask.vue +++ b/src/components/he-mask.vue @@ -1,10 +1,17 @@ diff --git a/src/components/he-navbar.vue b/src/components/he-navbar.vue index 3894965..d2b7b87 100644 --- a/src/components/he-navbar.vue +++ b/src/components/he-navbar.vue @@ -1,34 +1,39 @@ diff --git a/src/components/he-no-content-yet.vue b/src/components/he-no-content-yet.vue index 6dd15e3..73f56a4 100644 --- a/src/components/he-no-content-yet.vue +++ b/src/components/he-no-content-yet.vue @@ -1,62 +1,63 @@ + \ No newline at end of file + diff --git a/src/components/he-number-box.vue b/src/components/he-number-box.vue index bd5a914..d1981ae 100644 --- a/src/components/he-number-box.vue +++ b/src/components/he-number-box.vue @@ -1,309 +1,325 @@ - diff --git a/src/components/he-open-launch-weapp.vue b/src/components/he-open-launch-weapp.vue new file mode 100644 index 0000000..9e39660 --- /dev/null +++ b/src/components/he-open-launch-weapp.vue @@ -0,0 +1,75 @@ + + + + diff --git a/src/components/he-open-subscribe.vue b/src/components/he-open-subscribe.vue index 24e6a51..b90c159 100644 --- a/src/components/he-open-subscribe.vue +++ b/src/components/he-open-subscribe.vue @@ -1,14 +1,12 @@ + diff --git a/src/components/he-popup.vue b/src/components/he-popup.vue index 69d26a8..00c3eb3 100644 --- a/src/components/he-popup.vue +++ b/src/components/he-popup.vue @@ -1,48 +1,69 @@ diff --git a/src/components/he-poster.vue b/src/components/he-poster.vue index 89c5a32..7818a13 100644 --- a/src/components/he-poster.vue +++ b/src/components/he-poster.vue @@ -1,211 +1,214 @@ + \ No newline at end of file + diff --git a/src/components/he-products-featured.vue b/src/components/he-products-featured.vue index 2ecb995..29cb53e 100644 --- a/src/components/he-products-featured.vue +++ b/src/components/he-products-featured.vue @@ -1,95 +1,99 @@ + + \ No newline at end of file + diff --git a/src/components/he-radio.vue b/src/components/he-radio.vue index ceda072..4bfde8f 100644 --- a/src/components/he-radio.vue +++ b/src/components/he-radio.vue @@ -1,52 +1,52 @@ \ No newline at end of file + diff --git a/src/components/he-select-address.vue b/src/components/he-select-address.vue index 9b0ed2c..53109bf 100644 --- a/src/components/he-select-address.vue +++ b/src/components/he-select-address.vue @@ -1,217 +1,272 @@ + \ No newline at end of file + diff --git a/src/components/he-share.vue b/src/components/he-share.vue index d6f06ce..2f9f3c7 100644 --- a/src/components/he-share.vue +++ b/src/components/he-share.vue @@ -1,212 +1,208 @@ \ No newline at end of file + diff --git a/src/components/he-specs/he-specs.vue b/src/components/he-specs/he-specs.vue index ec96003..1ab9497 100644 --- a/src/components/he-specs/he-specs.vue +++ b/src/components/he-specs/he-specs.vue @@ -1,18 +1,20 @@ + + \ No newline at end of file + diff --git a/src/components/he-swipe-action.vue b/src/components/he-swipe-action.vue index 301f888..4715bae 100644 --- a/src/components/he-swipe-action.vue +++ b/src/components/he-swipe-action.vue @@ -1,37 +1,40 @@ diff --git a/src/components/he-switch.vue b/src/components/he-switch.vue index 6ee51ad..a1309c2 100644 --- a/src/components/he-switch.vue +++ b/src/components/he-switch.vue @@ -1,95 +1,99 @@ diff --git a/src/components/he-tell.vue b/src/components/he-tell.vue index 25dec13..1870114 100644 --- a/src/components/he-tell.vue +++ b/src/components/he-tell.vue @@ -15,16 +15,16 @@ @@ -85,7 +85,7 @@ export default { color: #666666; } .cu-btn.fr { - @include font_color("font_color"); + @include font_color('font_color'); } .he-line { height: 89px; @@ -96,4 +96,4 @@ export default { left: 50%; transform: translateX(-50%); } - \ No newline at end of file + diff --git a/src/components/he-toast.vue b/src/components/he-toast.vue index a45731d..90d53bd 100644 --- a/src/components/he-toast.vue +++ b/src/components/he-toast.vue @@ -1,130 +1,130 @@ \ No newline at end of file + diff --git a/src/components/he-upload-image.vue b/src/components/he-upload-image.vue index 17b278f..08267d1 100644 --- a/src/components/he-upload-image.vue +++ b/src/components/he-upload-image.vue @@ -1,10 +1,7 @@ diff --git a/src/components/pointer.less b/src/components/pointer.less index 40a6457..d35b43c 100644 --- a/src/components/pointer.less +++ b/src/components/pointer.less @@ -1,63 +1,58 @@ .pointer { - position: absolute; - bottom: 0; - display: -webkit-box; - display: -webkit-flex; - display: flex; + position: absolute; + bottom: 0; + display: -webkit-box; + display: -webkit-flex; + display: flex; + width: 100%; + + .circle .pointer-item { + display: inline-block; + width: 12px; + height: 12px; + background-color: rgba(0, 0, 0, 0.3); + border-radius: 100%; + } + + .strip .pointer-item { + display: inline-block; + width: 24px; + height: 4px; + background-color: #c5c5c5; + } + + .pointer-item + .pointer-item { + margin-left: 12px; + } + + .pointer-content { + margin: 0 40px; width: 100%; + box-sizing: border-box; + text-align: right; - - - .circle .pointer-item { - display: inline-block; - width: 12px; - height: 12px; - background-color: rgba(0, 0, 0, .3); - border-radius: 100%; - } - - .strip .pointer-item { - display: inline-block; - width: 24px; - height: 4px; - background-color: #c5c5c5; - } - - - .pointer-item+.pointer-item { - margin-left: 12px; + /deep/ .active { + background-color: #f44; + opacity: 1; } + } - - .pointer-content { - margin: 0 40px; - width: 100%; - box-sizing: border-box; - text-align: right; - - /deep/ .active { - background-color: #f44; - opacity: 1; - } - } - - .pointer-text { - margin: 0 40px; - width: 100%; - text-align: center; - - span { - display: inline-block; - min-width: 32px; - height: 32px; - padding: 0 10px; - color: #fff; - font-size: 24px; - line-height: 32px; - background: #000; - border-radius: 16px; - opacity: .3; - } + .pointer-text { + margin: 0 40px; + width: 100%; + text-align: center; + + span { + display: inline-block; + min-width: 32px; + height: 32px; + padding: 0 10px; + color: #fff; + font-size: 24px; + line-height: 32px; + background: #000; + border-radius: 16px; + opacity: 0.3; } - -} \ No newline at end of file + } +} diff --git a/src/components/pointer.vue b/src/components/pointer.vue index 35d9fab..15713cb 100644 --- a/src/components/pointer.vue +++ b/src/components/pointer.vue @@ -1,60 +1,60 @@ + + \ No newline at end of file + diff --git a/src/components/u-index-list.vue b/src/components/u-index-list.vue index 462418a..347d3b3 100644 --- a/src/components/u-index-list.vue +++ b/src/components/u-index-list.vue @@ -1,323 +1,319 @@ diff --git a/src/components/user-newuser-coupon.vue b/src/components/user-newuser-coupon.vue index aab085e..d855251 100644 --- a/src/components/user-newuser-coupon.vue +++ b/src/components/user-newuser-coupon.vue @@ -5,35 +5,19 @@ * @LastEditTime: 2021-06-05 17:02:18 * @LastEditors: fjt --> - diff --git a/src/pages/categories/component/index-b.vue b/src/pages/categories/component/index-b.vue index 12bcc4a..c610a5f 100644 --- a/src/pages/categories/component/index-b.vue +++ b/src/pages/categories/component/index-b.vue @@ -52,7 +52,7 @@ export default { \ No newline at end of file + diff --git a/src/pages/fitment/banner/banner.vue b/src/pages/fitment/banner/banner.vue index 7f9f35d..d9cf85f 100644 --- a/src/pages/fitment/banner/banner.vue +++ b/src/pages/fitment/banner/banner.vue @@ -1,93 +1,139 @@ + \ No newline at end of file + diff --git a/src/pages/fitment/banner/element.less b/src/pages/fitment/banner/element.less index f0afb8f..c4693bd 100644 --- a/src/pages/fitment/banner/element.less +++ b/src/pages/fitment/banner/element.less @@ -1,31 +1,29 @@ .banner { - box-sizing: content-box; + box-sizing: content-box; - .corner { - padding: 32px; + .corner { + padding: 32px; - .banner-item-cover { - box-sizing: content-box; - -webkit-appearance: none; - -webkit-border-radius: 16px; - -ms-border-radius: 16px; - -o-border-radius: 16px; - -moz-border-radius: 16px; - border-radius: 16px; - overflow: hidden; - } + .banner-item-cover { + box-sizing: content-box; + -webkit-appearance: none; + -webkit-border-radius: 16px; + -ms-border-radius: 16px; + -o-border-radius: 16px; + -moz-border-radius: 16px; + border-radius: 16px; + overflow: hidden; } + } - .banner-item-image { - width: 100%; - height: 100%; - } + .banner-item-image { + width: 100%; + height: 100%; + } - .banner-item-photo { - position: relative; - width: 100%; - height: 100%; - box-sizing: content-box; - } - -} \ No newline at end of file + .banner-item-photo { + position: relative; + width: 750px; + box-sizing: content-box; + } +} diff --git a/src/pages/fitment/blank/blank.vue b/src/pages/fitment/blank/blank.vue index 9ae0d11..12e1048 100644 --- a/src/pages/fitment/blank/blank.vue +++ b/src/pages/fitment/blank/blank.vue @@ -1,16 +1,16 @@ \ No newline at end of file + diff --git a/src/pages/fitment/common/covermask.vue b/src/pages/fitment/common/covermask.vue index 5bcb22c..072bab9 100644 --- a/src/pages/fitment/common/covermask.vue +++ b/src/pages/fitment/common/covermask.vue @@ -1,56 +1,57 @@ + + \ No newline at end of file + diff --git a/src/pages/fitment/common/index.vue b/src/pages/fitment/common/index.vue index d258c6c..831368f 100644 --- a/src/pages/fitment/common/index.vue +++ b/src/pages/fitment/common/index.vue @@ -1,156 +1,208 @@ + + diff --git a/src/pages/fitment/common/vuedraggable-helper.js b/src/pages/fitment/common/vuedraggable-helper.js index e414068..11d2ad2 100644 --- a/src/pages/fitment/common/vuedraggable-helper.js +++ b/src/pages/fitment/common/vuedraggable-helper.js @@ -1,37 +1,33 @@ +const regex = /-(\w)/g; + function getConsole() { - if (typeof window !== "undefined") { - return window.console; - } - return global.console; + if (typeof window !== 'undefined') { + return window.console; + } + return global.console; } const console = getConsole(); function cached(fn) { - const cache = Object.create(null); - return function cachedFn(str) { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; + const cache = Object.create(null); + return function cachedFn(str) { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; } -const regex = /-(\w)/g; -const camelize = cached(str => - str.replace(regex, (_, c) => (c ? c.toUpperCase() : "")) -); +const camelize = cached(str => str.replace(regex, (_, c) => (c ? c.toUpperCase() : ''))); function removeNode(node) { - if (node.parentElement !== null) { - node.parentElement.removeChild(node); - } + if (node.parentElement !== null) { + node.parentElement.removeChild(node); + } } function insertNodeAt(fatherNode, node, position) { - const refNode = - position === 0 - ? fatherNode.children[0] - : fatherNode.children[position - 1].nextSibling; - fatherNode.insertBefore(node, refNode); + const refNode = position === 0 ? fatherNode.children[0] : fatherNode.children[position - 1].nextSibling; + fatherNode.insertBefore(node, refNode); } -export {insertNodeAt, camelize, console, removeNode}; +export { insertNodeAt, camelize, console, removeNode }; diff --git a/src/pages/fitment/common/vuedraggable.js b/src/pages/fitment/common/vuedraggable.js index 98c17ee..f479c80 100644 --- a/src/pages/fitment/common/vuedraggable.js +++ b/src/pages/fitment/common/vuedraggable.js @@ -1,485 +1,462 @@ -import Sortable from "sortablejs"; -import {insertNodeAt, camelize, console, removeNode} from "./vuedraggable-helper"; +import Sortable from 'sortablejs'; +import { insertNodeAt, camelize, console, removeNode } from './vuedraggable-helper'; function buildAttribute(object, propName, value) { - if (value === undefined) { - return object; - } - object = object || {}; - object[propName] = value; + if (value === undefined) { return object; + } + object = object || {}; + object[propName] = value; + return object; } function computeVmIndex(vnodes, element) { - return vnodes.map(elt => elt.elm).indexOf(element); + return vnodes.map(elt => elt.elm).indexOf(element); } function computeIndexes(slots, children, isTransition, footerOffset) { - if (!slots) { - return []; - } - - const elmFromNodes = slots.map(elt => elt.elm); - const footerIndex = children.length - footerOffset; - const rawIndexes = [...children].map((elt, idx) => - idx >= footerIndex ? elmFromNodes.length : elmFromNodes.indexOf(elt) - ); - return isTransition ? rawIndexes.filter(ind => ind !== -1) : rawIndexes; + if (!slots) { + return []; + } + + const elmFromNodes = slots.map(elt => elt.elm); + const footerIndex = children.length - footerOffset; + const rawIndexes = [...children].map((elt, idx) => + idx >= footerIndex ? elmFromNodes.length : elmFromNodes.indexOf(elt) + ); + return isTransition ? rawIndexes.filter(ind => ind !== -1) : rawIndexes; } function emit(evtName, evtData) { - this.$nextTick(() => this.$emit(evtName.toLowerCase(), {...evtData})); + this.$nextTick(() => this.$emit(evtName.toLowerCase(), { ...evtData })); } function delegateAndEmit(evtName) { - return evtData => { - if (this.realList !== null) { - this["onDrag" + evtName](evtData); - } - emit.call(this, evtName, evtData); - }; + return evtData => { + if (this.realList !== null) { + this['onDrag' + evtName](evtData); + } + emit.call(this, evtName, evtData); + }; } function isTransitionName(name) { - return ["transition-group", "TransitionGroup"].includes(name); + return ['transition-group', 'TransitionGroup'].includes(name); } function isTransition(slots) { - if (!slots || slots.length !== 1) { - return false; - } - const [{componentOptions}] = slots; - if (!componentOptions) { - return false; - } - return isTransitionName(componentOptions.tag); + if (!slots || slots.length !== 1) { + return false; + } + const [{ componentOptions }] = slots; + if (!componentOptions) { + return false; + } + return isTransitionName(componentOptions.tag); } function getSlot(slot, scopedSlot, key) { - return slot[key] || (scopedSlot[key] ? scopedSlot[key]() : undefined); + return slot[key] || (scopedSlot[key] ? scopedSlot[key]() : undefined); } function computeChildrenAndOffsets(children, slot, scopedSlot) { - let headerOffset = 0; - let footerOffset = 0; - const header = getSlot(slot, scopedSlot, "header"); - if (header) { - headerOffset = header.length; - children = children ? [...header, ...children] : [...header]; - } - const footer = getSlot(slot, scopedSlot, "footer"); - if (footer) { - footerOffset = footer.length; - children = children ? [...children, ...footer] : [...footer]; - } - return {children, headerOffset, footerOffset}; + let headerOffset = 0; + let footerOffset = 0; + const header = getSlot(slot, scopedSlot, 'header'); + if (header) { + headerOffset = header.length; + children = children ? [...header, ...children] : [...header]; + } + const footer = getSlot(slot, scopedSlot, 'footer'); + if (footer) { + footerOffset = footer.length; + children = children ? [...children, ...footer] : [...footer]; + } + return { children, headerOffset, footerOffset }; } function getComponentAttributes($attrs, componentData) { - let attributes = null; - const update = (name, value) => { - attributes = buildAttribute(attributes, name, value); - }; - const attrs = Object.keys($attrs) - .filter(key => key === "id" || key.startsWith("data-")) - .reduce((res, key) => { - res[key] = $attrs[key]; - return res; - }, {}); - update("attrs", attrs); - - if (!componentData) { - return attributes; - } - const {on, props, attrs: componentDataAttrs} = componentData; - update("on", on); - update("props", props); - Object.assign(attributes.attrs, componentDataAttrs); + let attributes = null; + const update = (name, value) => { + attributes = buildAttribute(attributes, name, value); + }; + const attrs = Object.keys($attrs) + .filter(key => key === 'id' || key.startsWith('data-')) + .reduce((res, key) => { + res[key] = $attrs[key]; + return res; + }, {}); + update('attrs', attrs); + + if (!componentData) { return attributes; + } + const { on, props, attrs: componentDataAttrs } = componentData; + update('on', on); + update('props', props); + Object.assign(attributes.attrs, componentDataAttrs); + return attributes; } -const eventsListened = ["Start", "Add", "Remove", "Update", "End"]; -const eventsToEmit = ["Choose", "Unchoose", "Sort", "Filter", "Clone"]; -const readonlyProperties = ["Move", ...eventsListened, ...eventsToEmit].map( - evt => "on" + evt -); +const eventsListened = ['Start', 'Add', 'Remove', 'Update', 'End']; +const eventsToEmit = ['Choose', 'Unchoose', 'Sort', 'Filter', 'Clone']; +const readonlyProperties = ['Move', ...eventsListened, ...eventsToEmit].map(evt => 'on' + evt); var draggingElement = null; const props = { - options: Object, - list: { - type: Array, - required: false, - default: null + options: Object, + list: { + type: Array, + required: false, + default: null + }, + value: { + type: Array, + required: false, + default: null + }, + noTransitionOnDrag: { + type: Boolean, + default: false + }, + clone: { + type: Function, + default: original => { + return original; + } + }, + element: { + type: String, + default: 'div' + }, + tag: { + type: String, + default: null + }, + move: { + type: Function, + default: null + }, + componentData: { + type: Object, + required: false, + default: null + } +}; + +const draggableComponent = { + name: 'draggable', + + inheritAttrs: false, + + props, + + data() { + return { + transitionMode: false, + noneFunctionalComponentMode: false + }; + }, + + render(h) { + const slots = this.$slots.default; + this.transitionMode = isTransition(slots); + const { children, headerOffset, footerOffset } = computeChildrenAndOffsets(slots, this.$slots, this.$scopedSlots); + this.headerOffset = headerOffset; + this.footerOffset = footerOffset; + const attributes = getComponentAttributes(this.$attrs, this.componentData); + return h(this.getTag(), attributes, children); + }, + + created() { + if (this.list !== null && this.value !== null) { + console.error('Value and list props are mutually exclusive! Please set one or another.'); + } + + if (this.element !== 'div') { + console.warn( + 'Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props' + ); + } + + if (this.options !== undefined) { + console.warn( + 'Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props' + ); + } + }, + + mounted() { + this.noneFunctionalComponentMode = + this.getTag().toLowerCase() !== this.$el.nodeName.toLowerCase() && !this.getIsFunctional(); + if (this.noneFunctionalComponentMode && this.transitionMode) { + throw new Error( + `Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ${this.getTag()}` + ); + } + var optionsAdded = {}; + eventsListened.forEach(elt => { + optionsAdded['on' + elt] = delegateAndEmit.call(this, elt); + }); + + eventsToEmit.forEach(elt => { + optionsAdded['on' + elt] = emit.bind(this, elt); + }); + + const attributes = Object.keys(this.$attrs).reduce((res, key) => { + res[camelize(key)] = this.$attrs[key]; + return res; + }, {}); + + const options = Object.assign({}, this.options, attributes, optionsAdded, { + onMove: (evt, originalEvent) => { + return this.onDragMove(evt, originalEvent); + } + }); + !('draggable' in options) && (options.draggable = '>*'); + this._sortable = new Sortable(this.rootContainer, options); + this.computeIndexes(); + }, + + beforeDestroy() { + if (this._sortable !== undefined) this._sortable.destroy(); + }, + + computed: { + rootContainer() { + return this.transitionMode ? this.$el.children[0] : this.$el; }, - value: { - type: Array, - required: false, - default: null + + realList() { + return this.list ? this.list : this.value; + } + }, + + watch: { + options: { + handler(newOptionValue) { + this.updateOptions(newOptionValue); + }, + deep: true }, - noTransitionOnDrag: { - type: Boolean, - default: false + + $attrs: { + handler(newOptionValue) { + this.updateOptions(newOptionValue); + }, + deep: true }, - clone: { - type: Function, - default: original => { - return original; + + realList() { + this.computeIndexes(); + } + }, + + methods: { + getIsFunctional() { + const { fnOptions } = this._vnode; + return fnOptions && fnOptions.functional; + }, + + getTag() { + return this.tag || this.element; + }, + + updateOptions(newOptionValue) { + for (var property in newOptionValue) { + const value = camelize(property); + if (readonlyProperties.indexOf(value) === -1) { + this._sortable.option(value, newOptionValue[property]); } + } }, - element: { - type: String, - default: "div" + + getChildrenNodes() { + if (this.noneFunctionalComponentMode) { + return this.$children[0].$slots.default; + } + const rawNodes = this.$slots.default; + return this.transitionMode ? rawNodes[0].child.$slots.default : rawNodes; }, - tag: { - type: String, - default: null + + computeIndexes() { + this.$nextTick(() => { + this.visibleIndexes = computeIndexes( + this.getChildrenNodes(), + this.rootContainer.children, + this.transitionMode, + this.footerOffset + ); + }); }, - move: { - type: Function, - default: null + + getUnderlyingVm(htmlElt) { + const index = computeVmIndex(this.getChildrenNodes() || [], htmlElt); + if (index === -1) { + //Edge case during move callback: related element might be + //an element different from collection + return null; + } + const element = this.realList[index]; + return { index, element }; }, - componentData: { - type: Object, - required: false, - default: null - } -}; -const draggableComponent = { - name: "draggable", + getUnderlyingPotencialDraggableComponent({ __vue__: vue }) { + if (!vue || !vue.$options || !isTransitionName(vue.$options._componentTag)) { + if (!('realList' in vue) && vue.$children.length === 1 && 'realList' in vue.$children[0]) + return vue.$children[0]; - inheritAttrs: false, + return vue; + } + return vue.$parent; + }, - props, + emitChanges(evt) { + this.$nextTick(() => { + this.$emit('change', evt); + }); + }, - data() { - return { - transitionMode: false, - noneFunctionalComponentMode: false - }; + alterList(onList) { + if (this.list) { + onList(this.list); + return; + } + const newList = [...this.value]; + onList(newList); + this.$emit('input', newList); }, - render(h) { - const slots = this.$slots.default; - this.transitionMode = isTransition(slots); - const {children, headerOffset, footerOffset} = computeChildrenAndOffsets( - slots, - this.$slots, - this.$scopedSlots - ); - this.headerOffset = headerOffset; - this.footerOffset = footerOffset; - const attributes = getComponentAttributes(this.$attrs, this.componentData); - return h(this.getTag(), attributes, children); + spliceList() { + const spliceList = list => list.splice(...arguments); + this.alterList(spliceList); }, - created() { - if (this.list !== null && this.value !== null) { - console.error( - "Value and list props are mutually exclusive! Please set one or another." - ); - } + updatePosition(oldIndex, newIndex) { + const updatePosition = list => list.splice(newIndex, 0, list.splice(oldIndex, 1)[0]); + this.alterList(updatePosition); + }, - if (this.element !== "div") { - console.warn( - "Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props" - ); + getRelatedContextFromMoveEvent({ to, related }) { + const component = this.getUnderlyingPotencialDraggableComponent(to); + if (!component) { + return { component }; + } + const list = component.realList; + const context = { list, component }; + if (to !== related && list && component.getUnderlyingVm) { + const destination = component.getUnderlyingVm(related); + if (destination) { + return Object.assign(destination, context); } + } + return context; + }, - if (this.options !== undefined) { - console.warn( - "Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props" - ); - } + getVmIndex(domIndex) { + const indexes = this.visibleIndexes; + const numberIndexes = indexes.length; + return domIndex > numberIndexes - 1 ? numberIndexes : indexes[domIndex]; }, - mounted() { - this.noneFunctionalComponentMode = - this.getTag().toLowerCase() !== this.$el.nodeName.toLowerCase() && - !this.getIsFunctional(); - if (this.noneFunctionalComponentMode && this.transitionMode) { - throw new Error( - `Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ${this.getTag()}` - ); - } - var optionsAdded = {}; - eventsListened.forEach(elt => { - optionsAdded["on" + elt] = delegateAndEmit.call(this, elt); - }); - - eventsToEmit.forEach(elt => { - optionsAdded["on" + elt] = emit.bind(this, elt); - }); - - const attributes = Object.keys(this.$attrs).reduce((res, key) => { - res[camelize(key)] = this.$attrs[key]; - return res; - }, {}); - - const options = Object.assign({}, this.options, attributes, optionsAdded, { - onMove: (evt, originalEvent) => { - return this.onDragMove(evt, originalEvent); - } - }); - !("draggable" in options) && (options.draggable = ">*"); - this._sortable = new Sortable(this.rootContainer, options); - this.computeIndexes(); + getComponent() { + return this.$slots.default[0].componentInstance; }, - beforeDestroy() { - if (this._sortable !== undefined) this._sortable.destroy(); + resetTransitionData(index) { + if (!this.noTransitionOnDrag || !this.transitionMode) { + return; + } + var nodes = this.getChildrenNodes(); + nodes[index].data = null; + const transitionContainer = this.getComponent(); + transitionContainer.children = []; + transitionContainer.kept = undefined; }, - computed: { - rootContainer() { - return this.transitionMode ? this.$el.children[0] : this.$el; - }, + onDragStart(evt) { + this.context = this.getUnderlyingVm(evt.item); + evt.item._underlying_vm_ = this.clone(this.context.element); + draggingElement = evt.item; + }, - realList() { - return this.list ? this.list : this.value; - } + onDragAdd(evt) { + const element = evt.item._underlying_vm_; + if (element === undefined) { + return; + } + removeNode(evt.item); + const newIndex = this.getVmIndex(evt.newIndex); + this.spliceList(newIndex, 0, element); + this.computeIndexes(); + const added = { element, newIndex }; + this.emitChanges({ added }); }, - watch: { - options: { - handler(newOptionValue) { - this.updateOptions(newOptionValue); - }, - deep: true - }, - - $attrs: { - handler(newOptionValue) { - this.updateOptions(newOptionValue); - }, - deep: true - }, - - realList() { - this.computeIndexes(); - } + onDragRemove(evt) { + insertNodeAt(this.rootContainer, evt.item, evt.oldIndex); + if (evt.pullMode === 'clone') { + removeNode(evt.clone); + return; + } + const oldIndex = this.context.index; + this.spliceList(oldIndex, 1); + const removed = { element: this.context.element, oldIndex }; + this.resetTransitionData(oldIndex); + this.emitChanges({ removed }); }, - methods: { - getIsFunctional() { - const {fnOptions} = this._vnode; - return fnOptions && fnOptions.functional; - }, - - getTag() { - return this.tag || this.element; - }, - - updateOptions(newOptionValue) { - for (var property in newOptionValue) { - const value = camelize(property); - if (readonlyProperties.indexOf(value) === -1) { - this._sortable.option(value, newOptionValue[property]); - } - } - }, - - getChildrenNodes() { - if (this.noneFunctionalComponentMode) { - return this.$children[0].$slots.default; - } - const rawNodes = this.$slots.default; - return this.transitionMode ? rawNodes[0].child.$slots.default : rawNodes; - }, - - computeIndexes() { - this.$nextTick(() => { - this.visibleIndexes = computeIndexes( - this.getChildrenNodes(), - this.rootContainer.children, - this.transitionMode, - this.footerOffset - ); - }); - }, - - getUnderlyingVm(htmlElt) { - const index = computeVmIndex(this.getChildrenNodes() || [], htmlElt); - if (index === -1) { - //Edge case during move callback: related element might be - //an element different from collection - return null; - } - const element = this.realList[index]; - return {index, element}; - }, - - getUnderlyingPotencialDraggableComponent({__vue__: vue}) { - if ( - !vue || - !vue.$options || - !isTransitionName(vue.$options._componentTag) - ) { - if ( - !("realList" in vue) && - vue.$children.length === 1 && - "realList" in vue.$children[0] - ) - return vue.$children[0]; - - return vue; - } - return vue.$parent; - }, - - emitChanges(evt) { - this.$nextTick(() => { - this.$emit("change", evt); - }); - }, - - alterList(onList) { - if (this.list) { - onList(this.list); - return; - } - const newList = [...this.value]; - onList(newList); - this.$emit("input", newList); - }, - - spliceList() { - const spliceList = list => list.splice(...arguments); - this.alterList(spliceList); - }, - - updatePosition(oldIndex, newIndex) { - const updatePosition = list => - list.splice(newIndex, 0, list.splice(oldIndex, 1)[0]); - this.alterList(updatePosition); - }, - - getRelatedContextFromMoveEvent({to, related}) { - const component = this.getUnderlyingPotencialDraggableComponent(to); - if (!component) { - return {component}; - } - const list = component.realList; - const context = {list, component}; - if (to !== related && list && component.getUnderlyingVm) { - const destination = component.getUnderlyingVm(related); - if (destination) { - return Object.assign(destination, context); - } - } - return context; - }, - - getVmIndex(domIndex) { - const indexes = this.visibleIndexes; - const numberIndexes = indexes.length; - return domIndex > numberIndexes - 1 ? numberIndexes : indexes[domIndex]; - }, - - getComponent() { - return this.$slots.default[0].componentInstance; - }, - - resetTransitionData(index) { - if (!this.noTransitionOnDrag || !this.transitionMode) { - return; - } - var nodes = this.getChildrenNodes(); - nodes[index].data = null; - const transitionContainer = this.getComponent(); - transitionContainer.children = []; - transitionContainer.kept = undefined; - }, - - onDragStart(evt) { - this.context = this.getUnderlyingVm(evt.item); - evt.item._underlying_vm_ = this.clone(this.context.element); - draggingElement = evt.item; - }, - - onDragAdd(evt) { - const element = evt.item._underlying_vm_; - if (element === undefined) { - return; - } - removeNode(evt.item); - const newIndex = this.getVmIndex(evt.newIndex); - this.spliceList(newIndex, 0, element); - this.computeIndexes(); - const added = {element, newIndex}; - this.emitChanges({added}); - }, - - onDragRemove(evt) { - insertNodeAt(this.rootContainer, evt.item, evt.oldIndex); - if (evt.pullMode === "clone") { - removeNode(evt.clone); - return; - } - const oldIndex = this.context.index; - this.spliceList(oldIndex, 1); - const removed = {element: this.context.element, oldIndex}; - this.resetTransitionData(oldIndex); - this.emitChanges({removed}); - }, - - onDragUpdate(evt) { - removeNode(evt.item); - insertNodeAt(evt.from, evt.item, evt.oldIndex); - const oldIndex = this.context.index; - const newIndex = this.getVmIndex(evt.newIndex); - this.updatePosition(oldIndex, newIndex); - const moved = {element: this.context.element, oldIndex, newIndex}; - this.emitChanges({moved}); - }, - - updateProperty(evt, propertyName) { - evt.hasOwnProperty(propertyName) && - (evt[propertyName] += this.headerOffset); - }, - - computeFutureIndex(relatedContext, evt) { - if (!relatedContext.element) { - return 0; - } - const domChildren = [...evt.to.children].filter( - el => el.style["display"] !== "none" - ); - const currentDOMIndex = domChildren.indexOf(evt.related); - const currentIndex = relatedContext.component.getVmIndex(currentDOMIndex); - const draggedInList = domChildren.indexOf(draggingElement) !== -1; - return draggedInList || !evt.willInsertAfter - ? currentIndex - : currentIndex + 1; - }, - - onDragMove(evt, originalEvent) { - const onMove = this.move; - if (!onMove || !this.realList) { - return true; - } - - const relatedContext = this.getRelatedContextFromMoveEvent(evt); - const draggedContext = this.context; - const futureIndex = this.computeFutureIndex(relatedContext, evt); - Object.assign(draggedContext, {futureIndex}); - const sendEvt = Object.assign({}, evt, { - relatedContext, - draggedContext - }); - return onMove(sendEvt, originalEvent); - }, - - onDragEnd() { - this.computeIndexes(); - draggingElement = null; - } + onDragUpdate(evt) { + removeNode(evt.item); + insertNodeAt(evt.from, evt.item, evt.oldIndex); + const oldIndex = this.context.index; + const newIndex = this.getVmIndex(evt.newIndex); + this.updatePosition(oldIndex, newIndex); + const moved = { element: this.context.element, oldIndex, newIndex }; + this.emitChanges({ moved }); + }, + + updateProperty(evt, propertyName) { + evt.hasOwnProperty(propertyName) && (evt[propertyName] += this.headerOffset); + }, + + computeFutureIndex(relatedContext, evt) { + if (!relatedContext.element) { + return 0; + } + const domChildren = [...evt.to.children].filter(el => el.style['display'] !== 'none'); + const currentDOMIndex = domChildren.indexOf(evt.related); + const currentIndex = relatedContext.component.getVmIndex(currentDOMIndex); + const draggedInList = domChildren.indexOf(draggingElement) !== -1; + return draggedInList || !evt.willInsertAfter ? currentIndex : currentIndex + 1; + }, + + onDragMove(evt, originalEvent) { + const onMove = this.move; + if (!onMove || !this.realList) { + return true; + } + + const relatedContext = this.getRelatedContextFromMoveEvent(evt); + const draggedContext = this.context; + const futureIndex = this.computeFutureIndex(relatedContext, evt); + Object.assign(draggedContext, { futureIndex }); + const sendEvt = Object.assign({}, evt, { + relatedContext, + draggedContext + }); + return onMove(sendEvt, originalEvent); + }, + + onDragEnd() { + this.computeIndexes(); + draggingElement = null; } + } }; -if (typeof window !== "undefined" && "Vue" in window) { - window.Vue.component("draggable", draggableComponent); +if (typeof window !== 'undefined' && 'Vue' in window) { + window.Vue.component('draggable', draggableComponent); } export default draggableComponent; diff --git a/src/pages/fitment/common/widget.vue b/src/pages/fitment/common/widget.vue index 09c9544..bf8563d 100644 --- a/src/pages/fitment/common/widget.vue +++ b/src/pages/fitment/common/widget.vue @@ -1,243 +1,243 @@ + + \ No newline at end of file + diff --git a/src/pages/fitment/coupon/coupon.vue b/src/pages/fitment/coupon/coupon.vue index 0d0d2bd..d90f2c5 100644 --- a/src/pages/fitment/coupon/coupon.vue +++ b/src/pages/fitment/coupon/coupon.vue @@ -13,18 +13,8 @@ - - + + // #ifdef H5 -import heOpenSubscribe from "@/components/he-open-subscribe.vue"; +import heOpenSubscribe from '@/components/he-open-subscribe.vue'; // #endif -import item from "./item.vue"; +import item from './item.vue'; export default { components: { // #ifdef H5 heOpenSubscribe, // #endif - item, + item }, computed: { couponBox: function () { if (this.facade.list_style === 1) { - return ""; + return ''; } else if (this.facade.list_style === 2) { - return "flex flex-wrap"; + return 'flex flex-wrap'; } else if (this.facade.list_style === 3) { - return "flex"; + return 'flex'; } }, subTemplateId: function () { - return [this.$store.getters["setting/subscribe"].coupon_expire]; + return [this.$store.getters['setting/subscribe'].coupon_expire]; }, couponItem: function () { - let str = ""; + let str = ''; if (this.content.style === 3) { - str += " fillet "; + str += ' fillet '; } if (this.facade.list_style === 1) { - str += ""; + str += ''; } else if (this.facade.list_style === 2) { - str += "le-item-marginRight-odd "; + str += 'le-item-marginRight-odd '; } else if (this.facade.list_style === 3) { - str += "le-item-marginRight "; + str += 'le-item-marginRight '; } return str; }, @@ -83,29 +73,29 @@ export default { return () => { let style = {}; if (this.facade.list_style === 1) { - style.width = 710 + "rpx"; - style.marginBottom = 10 + "rpx"; + style.width = 710 + 'rpx'; + style.marginBottom = 10 + 'rpx'; } else if (this.facade.list_style === 2) { - style.width = 349 + "rpx"; - style.marginBottom = 10 + "rpx"; + style.width = 349 + 'rpx'; + style.marginBottom = 10 + 'rpx'; } else if (this.facade.list_style === 3) { - style.width = 280 + "rpx"; + style.width = 280 + 'rpx'; } return style; }; - }, + } }, props: { facade: { - type: [Object, Array], + type: [Object, Array] }, content: { - type: [Object, Array], - }, + type: [Object, Array] + } }, data() { return { - list: [], + list: [] }; }, methods: { @@ -119,22 +109,29 @@ export default { _array = data.map(function (item) { return item.id; }); - this.$heshop.coupon("get", { - behavior: "coupon", - coupon_id: _array, - }).then(function (response) { + this.$heshop + .coupon('get', { + behavior: 'coupon', + coupon_id: _array + }) + .then(function (response) { _this.list = response.data; - }).catch(function (error) { + }) + .catch(function (error) { _this.$toError(error); }); } } else if (autoplay === 1) { // 自动添加 - this.$heshop.coupon("get", { - behavior: "coupon", - }).page(1, number).then(function (response) { + this.$heshop + .coupon('get', { + behavior: 'coupon' + }) + .page(1, number) + .then(function (response) { _this.list = response.data; - }).catch(function (error) { + }) + .catch(function (error) { _this.$toError(error); }); } @@ -150,8 +147,8 @@ export default { fail: function () {}, complete: function () { _this.$heshop - .coupon("post", { - id: item.id, + .coupon('post', { + id: item.id }) .then(function () { item.can_obtain = false; @@ -160,13 +157,13 @@ export default { item.can_obtain = false; _this.$toError(error); }); - }, + } }); // #endif // #ifdef H5 _this.$heshop - .coupon("post", { - id: item.id, + .coupon('post', { + id: item.id }) .then(function () { item.can_obtain = false; @@ -178,26 +175,26 @@ export default { // #endif } else { uni.navigateTo({ - url: "/pages/user/login", + url: '/pages/user/login' }); } } - }, + } }, watch: { - "content.data": { + 'content.data': { handler() { this.getList(); }, deep: true, - immediate: true, - }, - }, + immediate: true + } + } }; \ No newline at end of file +@import './element.less'; + diff --git a/src/pages/fitment/goods/element.less b/src/pages/fitment/goods/element.less index b7bd422..69bd825 100644 --- a/src/pages/fitment/goods/element.less +++ b/src/pages/fitment/goods/element.less @@ -1,213 +1,205 @@ .goods { - overflow: hidden; - .clear { - clear: both; - } - - .chamfer { - .goods-item { - border-radius: 16px; - } - } + overflow: hidden; + .clear { + clear: both; + } - .white { + .chamfer { + .goods-item { + border-radius: 16px; } + } - .card { - .goods-item { - box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.05); - } - } + .white { + } - .stroke { - .goods-item { - border: 1px solid rgba(50, 50, 51, .1); - } + .card { + .goods-item { + box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.05); } + } - .lucency { - .goods-item { - background-color: transparent; - } + .stroke { + .goods-item { + border: 1px solid rgba(50, 50, 51, 0.1); } + } + .lucency { .goods-item { - box-sizing: border-box; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - background: #FFFFFF; - overflow: hidden; + background-color: transparent; + } + } - .goods-item-photo { - position: relative; - - .goods-item-image { - position: relative; - max-height: 500px; - overflow: hidden; - padding-top: 50%; - } - - .goods-item-cover { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - width: 100%; - background-repeat: no-repeat; - background-position: 50%; - background: #F3F5F7; - background-size: cover; - } - } + .goods-item { + box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + background: #ffffff; + overflow: hidden; - .goods-item-cover { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - width: 100%; - background-repeat: no-repeat; - background-position: 50%; - background-size: cover; - } + .goods-item-photo { + position: relative; - .goods-item-detail { - margin: 20px 20px 10px 20px; - position: relative; - - .goods-item-title { - font-size: 28px; - font-weight: 400; - color: #353535; - line-height: 1.4em; - min-height: 2.8em; - margin-bottom: 10px; - text-overflow: -o-ellipsis-lastline; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - line-clamp: 2; - -webkit-box-orient: vertical; - } - - .goods-item-info { - position: relative; - width: 100%; - line-height: 2em; - display: flex; - font-weight: 400; - justify-content: space-between - } - - .goods-item-price { - display: inline-block; - font-weight: 400; - - .goods-item-price__tag { - font-size: 24px; - padding-right: 4px; - - } - - .goods-item-price__val { - font-size: 32px; - } - } - - .goods-item-button { - display: inline-block; - - .le-icon { - vertical-align: 0; - } - - .iconfont { - font-size: 36px; - } - } - } + .goods-item-image { + position: relative; + max-height: 500px; + overflow: hidden; + padding-top: 50%; + } + + .goods-item-cover { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + background-repeat: no-repeat; + background-position: 50%; + background: #f3f5f7; + background-size: cover; + } } - .larger { - .goods-item-photo { - .goods-item-image { - height: 25%; - } - } + .goods-item-cover { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 100%; + background-repeat: no-repeat; + background-position: 50%; + background-size: cover; } + .goods-item-detail { + margin: 20px 20px 10px 20px; + position: relative; + + .goods-item-title { + font-size: 28px; + font-weight: 400; + color: #353535; + line-height: 1.4em; + min-height: 2.8em; + margin-bottom: 10px; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + line-clamp: 2; + -webkit-box-orient: vertical; + } + + .goods-item-info { + position: relative; + width: 100%; + line-height: 2em; + display: flex; + font-weight: 400; + justify-content: space-between; + } - .small, - .list, - .swipe { - .goods-item-photo { - .goods-item-image { - padding-top: 100%; - } + .goods-item-price { + display: inline-block; + font-weight: 400; + .goods-item-price__tag { + font-size: 24px; + padding-right: 4px; } - } - - .small { - .goods-wrapper { - float: left; - width: 50%; + .goods-item-price__val { + font-size: 32px; } + } + .goods-item-button { + display: inline-block; - } - - .list { - .goods-item-photo { - float: left; - width: 240px; - height: 240px; - min-height: auto; - margin-right: 20px; + .le-icon { + vertical-align: 0; } - .goods-item-detail { - height: 240px; - box-sizing: border-box; - margin: 0 30px 0 240px; - overflow: hidden; - - .goods-item-title { - font-weight: 400; - margin: 28px 0 0; - } - - .goods-item-info { - position: absolute; - left: 0; - bottom: 10px; - } + .iconfont { + font-size: 36px; } + } } + } - .swipe { - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-flex-wrap: nowrap; - flex-wrap: nowrap; - margin-bottom: -20px; - padding-bottom: 20px; - overflow-x: auto; - overflow-y: hidden; - -webkit-overflow-scrolling: touch; - - .goods-wrapper { - flex: 0 0 30%; - float: none; - width: 30%; - } + .larger { + .goods-item-photo { + .goods-item-image { + height: 25%; + } + } + } + + .small, + .list, + .swipe { + .goods-item-photo { + .goods-item-image { + padding-top: 100%; + } + } + } + .small { + .goods-wrapper { + float: left; + width: 50%; + } + } + + .list { + .goods-item-photo { + float: left; + width: 240px; + height: 240px; + min-height: auto; + margin-right: 20px; } -} \ No newline at end of file + .goods-item-detail { + height: 240px; + box-sizing: border-box; + margin: 0 30px 0 240px; + overflow: hidden; + + .goods-item-title { + font-weight: 400; + margin: 28px 0 0; + } + + .goods-item-info { + position: absolute; + left: 0; + bottom: 10px; + } + } + } + + .swipe { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: nowrap; + flex-wrap: nowrap; + margin-bottom: -20px; + padding-bottom: 20px; + overflow-x: auto; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + + .goods-wrapper { + flex: 0 0 30%; + float: none; + width: 30%; + } + } +} diff --git a/src/pages/fitment/goods/goods.vue b/src/pages/fitment/goods/goods.vue index ab6278f..2c1b928 100644 --- a/src/pages/fitment/goods/goods.vue +++ b/src/pages/fitment/goods/goods.vue @@ -1,196 +1,233 @@ + diff --git a/src/pages/fitment/navigation/element.less b/src/pages/fitment/navigation/element.less index d8ef225..5f293ab 100644 --- a/src/pages/fitment/navigation/element.less +++ b/src/pages/fitment/navigation/element.less @@ -1,104 +1,99 @@ .navigation { - background-color: #FFFFFF; - position: relative; - - ::-webkit-scrollbar { - display: none - } + background-color: #ffffff; + position: relative; + ::-webkit-scrollbar { + display: none; + } - .one { - white-space: nowrap; - overflow-x: auto; - overflow-y: hidden; - padding: 0 32px; + .one { + white-space: nowrap; + overflow-x: auto; + overflow-y: hidden; + padding: 0 32px; + } - } + .navigation-indicator { + position: absolute; + width: 100%; + height: 20px; + bottom: 10px; + } - .navigation-indicator { - position: absolute; - width: 100%; - height: 20px; - bottom: 10px; + .navigation-image-item { + display: inline-block; + vertical-align: middle; + margin-top: 16px; + margin-bottom: 10px; + .navigation-image-item__cover { + width: 100px; + height: 100px; + background-position: 50%; + background-size: cover; + display: block; + margin: 0 auto; + border: 0; } - .navigation-image-item { - display: inline-block; - vertical-align: middle; - margin-top: 16px; - margin-bottom: 10px; - - .navigation-image-item__cover { - width: 100px; - height: 100px; - background-position: 50%; - background-size: cover; - display: block; - margin: 0 auto; - border: 0; - } - - .navigation-image-item__title { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: 100%; - font-size: 24px; - line-height: 40rpx; - text-align: center; - overflow: hidden; - /*超出部分隐藏*/ - white-space: nowrap; - /*不换行*/ - text-overflow: ellipsis; - /*超出部分文字以...显示*/ - - } + .navigation-image-item__title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + font-size: 24px; + line-height: 40px; + text-align: center; + overflow: hidden; + /*超出部分隐藏*/ + white-space: nowrap; + /*不换行*/ + text-overflow: ellipsis; + /*超出部分文字以...显示*/ } + } - .navigation-text-item { - display: inline-block; - padding: 16rpx 0; - color: #333; - width: 25%; - text-decoration: none; - box-sizing: border-box; - // background-color: rgb(255, 255, 255); + .navigation-text-item { + display: inline-block; + padding: 16px 0; + color: #333; + width: 25%; + text-decoration: none; + box-sizing: border-box; - .navigation-text-item__title { - display: block; - width: 100%; - position: relative; - height: 30px; - font-size: 24px; - line-height: 30rpx; - text-align: center; - overflow: hidden; - box-sizing: border-box; - /*超出部分隐藏*/ - white-space: nowrap; - /*不换行*/ - text-overflow: ellipsis; - /*超出部分文字以...显示*/ - padding: 0 20rpx; - border-right: 1px solid #eee; - } + .navigation-text-item__title { + display: block; + width: 100%; + position: relative; + height: 30px; + font-size: 24px; + line-height: 30px; + text-align: center; + overflow: hidden; + box-sizing: border-box; + /*超出部分隐藏*/ + white-space: nowrap; + /*不换行*/ + text-overflow: ellipsis; + /*超出部分文字以...显示*/ + padding: 0 20px; + border-right: 1px solid #eee; } + } - .one { - .navigation-text-item:last-child { - .navigation-text-item__title { - border-right: 0; - } - } + .one { + .navigation-text-item:last-child { + .navigation-text-item__title { + border-right: 0; + } } + } - .two { - .navigation-text-item:last-child { - .navigation-text-item__title { - border-right: 0; - } - } + .two { + .navigation-text-item:last-child { + .navigation-text-item__title { + border-right: 0; + } } -} \ No newline at end of file + } +} diff --git a/src/pages/fitment/navigation/navigation.vue b/src/pages/fitment/navigation/navigation.vue index a139d59..918314f 100644 --- a/src/pages/fitment/navigation/navigation.vue +++ b/src/pages/fitment/navigation/navigation.vue @@ -1,226 +1,401 @@ + \ No newline at end of file + diff --git a/src/pages/fitment/notice/item.vue b/src/pages/fitment/notice/item.vue index 7843a0c..11e4ff2 100644 --- a/src/pages/fitment/notice/item.vue +++ b/src/pages/fitment/notice/item.vue @@ -1,17 +1,54 @@ \ No newline at end of file + diff --git a/src/pages/fitment/notice/notice.vue b/src/pages/fitment/notice/notice.vue index fe372a0..f29d25f 100644 --- a/src/pages/fitment/notice/notice.vue +++ b/src/pages/fitment/notice/notice.vue @@ -1,27 +1,36 @@ \ No newline at end of file + diff --git a/src/pages/fitment/rubik/element.less b/src/pages/fitment/rubik/element.less index 18ce287..73b84d0 100644 --- a/src/pages/fitment/rubik/element.less +++ b/src/pages/fitment/rubik/element.less @@ -1,145 +1,135 @@ .rubik { - overflow: hidden; - position: relative; + overflow: hidden; + position: relative; } .rubik-cube { - position: relative; - width: 750rpx; - height: 750rpx; - font-size: 28rpx; - - - .rubik-cube__item { - position: absolute; - } + position: relative; + width: 750px; + height: 750px; + font-size: 28px; + + .rubik-cube__item { + position: absolute; + } } .advertising { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - font-size: 12rpx; - margin-bottom: -4rpx; - - .advertising-item-1 { - position: relative; - text-align: center; - font-weight: 400; - color: #8C8C8C; - width: 750rpx; - margin-bottom: -2rpx; - - .advertising-item-tips { - width: 750rpx; - height: 750rpx; - line-height: 750rpx; - background: #F7F5FE; - } - - img { - width: 100%; - height: auto; - } + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + font-size: 12px; + margin-bottom: -4px; + + .advertising-item-1 { + position: relative; + text-align: center; + font-weight: 400; + color: #8c8c8c; + width: 750px; + margin-bottom: -2px; + + .advertising-item-tips { + width: 750px; + height: 750px; + line-height: 750px; + background: #f7f5fe; } - .advertising-item-2 { - position: relative; - width: 100%; - display: flex; - - .advertising-item-image { - margin-bottom: -2rpx; - flex: 1 1 auto; - width: 375rpx; - - - &:first-child .advertising-item-tips { - border-right: 0; - } - - img { - width: 100%; - height: auto; - } + img { + width: 100%; + height: auto; + } + } - } + .advertising-item-2 { + position: relative; + width: 100%; + display: flex; + .advertising-item-image { + margin-bottom: -2px; + flex: 1 1 auto; + width: 375px; - } + &:first-child .advertising-item-tips { + border-right: 0; + } - .advertising-item-3 { - position: relative; + img { width: 100%; - display: flex; - - .advertising-item-image { - margin-bottom: -2rpx; - - flex: 1 1 1; - width: 250rpx; + height: auto; + } + } + } - img { - width: 100%; - height: auto; - } + .advertising-item-3 { + position: relative; + width: 100%; + display: flex; - } + .advertising-item-image { + margin-bottom: -2px; + flex: 1 1 1; + width: 250px; + img { + width: 100%; + height: auto; + } } + } - .advertising-item-4 { - position: relative; - width: 750rpx; - height: 375rpx; - - .advertising-item-image { - margin-bottom: -2rpx; - - position: absolute; - width: 100%; - height: 100%; + .advertising-item-4 { + position: relative; + width: 750px; + height: 375px; - img { - width: 100%; - height: 100%; - } + .advertising-item-image { + margin-bottom: -2px; - } - } + position: absolute; + width: 100%; + height: 100%; - .advertising-item-5 { - position: relative; + img { width: 100%; - display: flex; + height: 100%; + } + } + } - .advertising-item-image { - margin-bottom: -2rpx; - margin-right: -2rpx; - flex: 1; - width: 187.5rpx; + .advertising-item-5 { + position: relative; + width: 100%; + display: flex; - img { - width: 100%; - height: auto; - } + .advertising-item-image { + margin-bottom: -2px; + margin-right: -2px; + flex: 1; + width: 187.5px; - } + img { + width: 100%; + height: auto; + } } + } - .advertising-item-6 { - position: relative; - width: 100%; - height: 376rpx; + .advertising-item-6 { + position: relative; + width: 100%; + height: 376px; - .advertising-item-image { - margin-bottom: -2rpx; + .advertising-item-image { + margin-bottom: -2px; - position: absolute; - } + position: absolute; } -} \ No newline at end of file + } +} diff --git a/src/pages/fitment/rubik/rubik.vue b/src/pages/fitment/rubik/rubik.vue index 8fe04ff..aa0749c 100644 --- a/src/pages/fitment/rubik/rubik.vue +++ b/src/pages/fitment/rubik/rubik.vue @@ -1,181 +1,854 @@ - + \ No newline at end of file + diff --git a/src/pages/fitment/search/element.less b/src/pages/fitment/search/element.less index 7a08893..65adc1e 100644 --- a/src/pages/fitment/search/element.less +++ b/src/pages/fitment/search/element.less @@ -1,30 +1,29 @@ .search { - width: 100%; - box-sizing: border-box; - padding: 20px 30px; - background-color: RGBA(243, 240, 253, 1); + width: 100%; + box-sizing: border-box; + padding: 20px 30px; + background-color: RGBA(243, 240, 253, 1); - .angle { - border-radius: 32px; - } + .angle { + border-radius: 32px; + } - .iconsearchbar_search { - font-size: 24px; - } - - .search-content { - height: 64px; - line-height: 64px; - font-size: 28px; - box-sizing: border-box; - color: RGBA(156, 156, 156, 1); - background-color: #FFFFFF; - padding-left: 30px; + .iconsearchbar_search { + font-size: 24px; + } + .search-content { + height: 64px; + line-height: 64px; + font-size: 28px; + box-sizing: border-box; + color: RGBA(156, 156, 156, 1); + background-color: #ffffff; + padding-left: 30px; - span { - padding-left: 10px; - font-size: 24px; - } + span { + padding-left: 10px; + font-size: 24px; } -} \ No newline at end of file + } +} diff --git a/src/pages/fitment/search/search.vue b/src/pages/fitment/search/search.vue index ff041b6..7573429 100644 --- a/src/pages/fitment/search/search.vue +++ b/src/pages/fitment/search/search.vue @@ -1,76 +1,87 @@ + + diff --git a/src/pages/fitment/separate/separate.vue b/src/pages/fitment/separate/separate.vue index ce7fb02..9055181 100644 --- a/src/pages/fitment/separate/separate.vue +++ b/src/pages/fitment/separate/separate.vue @@ -1,43 +1,40 @@ + diff --git a/src/pages/fitment/tabs/element.less b/src/pages/fitment/tabs/element.less index b8b5104..6e98bde 100644 --- a/src/pages/fitment/tabs/element.less +++ b/src/pages/fitment/tabs/element.less @@ -1,54 +1,54 @@ .tabs { - .tabs-header { - position: -webkit-sticky; - position: sticky; - z-index: 1; - top: var(--window-top); - white-space: nowrap; - overflow: hidden; - padding-right: 20px; - width: 750px; - .he-scroll-box { - width: 750px; - height: 88px; - .he-tab-item { - font-size: 26px; - font-family: PingFang SC; - font-weight: 500; - color: #666666; - line-height: 88px; - padding: 0 30px; - position: relative; - .he-tab-line { - position: absolute; - width: 24px; - height: 4px; - background: #000000; - left: 50%; - bottom: 12px; - transform: translateX(-50%); - } - } - .he-tab-item.active { - color: #E60B30; - .he-tab-line { - position: absolute; - width: 24px; - height: 4px; - background: #E60B30; - left: 50%; - bottom: 12px; - } - } + .tabs-header { + position: -webkit-sticky; + position: sticky; + z-index: 1; + top: var(--window-top); + white-space: nowrap; + overflow: hidden; + padding-right: 20px; + width: 750px; + .he-scroll-box { + width: 750px; + height: 88px; + .he-tab-item { + font-size: 26px; + font-family: PingFang SC; + font-weight: 500; + color: #666666; + line-height: 88px; + padding: 0 30px; + position: relative; + .he-tab-line { + position: absolute; + width: 24px; + height: 4px; + background: #000000; + left: 50%; + bottom: 12px; + transform: translateX(-50%); + } + } + .he-tab-item.active { + color: #e60b30; + .he-tab-line { + position: absolute; + width: 24px; + height: 4px; + background: #e60b30; + left: 50%; + bottom: 12px; } + } } + } - .tabs-content-active { - position: relative; + .tabs-content-active { + position: relative; - .tabs-content-shade { - position: absolute; - display: block; - } + .tabs-content-shade { + position: absolute; + display: block; } -} \ No newline at end of file + } +} diff --git a/src/pages/fitment/tabs/tabs.vue b/src/pages/fitment/tabs/tabs.vue index c9b7a6c..4c3ee12 100644 --- a/src/pages/fitment/tabs/tabs.vue +++ b/src/pages/fitment/tabs/tabs.vue @@ -7,7 +7,7 @@ scroll-x="true" :style="{ top: top + 'px', - background: facade.background_color ? facade.background_color : '#fff', + background: facade.background_color ? facade.background_color : '#fff' }" > @@ -33,31 +33,31 @@ + \ No newline at end of file +@import './element.less'; + diff --git a/src/pages/fitment/task/element.less b/src/pages/fitment/task/element.less index 21e2ce4..2037dfe 100644 --- a/src/pages/fitment/task/element.less +++ b/src/pages/fitment/task/element.less @@ -4,15 +4,13 @@ .clear { clear: both; - - } .control-task { position: relative; width: 710px; height: 212px; - background: #FFFFFF; + background: #ffffff; margin: 0 auto; border-radius: 16px; margin-top: 20px; @@ -29,7 +27,7 @@ top: 72px; width: 710px; height: 140px; - background: #FFFFFF; + background: #ffffff; border-radius: 0px 0px 16px 16px; } @@ -39,12 +37,12 @@ top: 0; width: 710px; height: 72px; - background: #FFB525; + background: #ffb525; border-radius: 16px 16px 0px 0px; font-size: 28px; font-family: PingFang SC; font-weight: 500; - color: #FFFFFE; + color: #fffffe; line-height: 72px; padding-left: 23px; } @@ -63,12 +61,12 @@ top: 42px; width: 140px; height: 56px; - background: #FFB525; + background: #ffb525; border-radius: 28px; font-size: 24px; font-family: PingFang SC; font-weight: 500; - color: #FFFFFF; + color: #ffffff; line-height: 56px; text-align: center; } @@ -92,7 +90,6 @@ text-overflow: ellipsis; } - &_tips { font-size: 26px; font-family: PingFang SC; @@ -103,8 +100,6 @@ top: 70px; left: 120px; } - - } .chamfer { @@ -113,7 +108,8 @@ } } - .white {} + .white { + } .card { .goods-item { @@ -123,7 +119,7 @@ .stroke { .goods-item { - border: 1px solid rgba(50, 50, 51, .1); + border: 1px solid rgba(50, 50, 51, 0.1); } } @@ -137,7 +133,7 @@ box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; - background: #FFFFFF; + background: #ffffff; overflow: hidden; .goods-item-photo { @@ -159,7 +155,7 @@ width: 100%; background-repeat: no-repeat; background-position: 50%; - background: #F3F5F7; + background: #f3f5f7; background-size: cover; } } @@ -202,20 +198,18 @@ line-height: 2em; display: flex; font-weight: 400; - justify-content: space-between + justify-content: space-between; } - .goods-item-price { display: inline-block; font-weight: 400; - color: #E60B30; + color: #e60b30; height: 30px; display: inline-flex; align-items: center; margin-top: 10px; - .goods-item-price__icon { display: inline-block; font-size: 24px; @@ -223,7 +217,7 @@ width: 24px; height: 24px; padding-right: 5px; - color: #FBAD15; + color: #fbad15; position: relative; top: -3px; } @@ -236,12 +230,10 @@ .goods-item-price__tag { font-size: 24px; - } .goods-item-price__val { font-size: 24px; - } } @@ -249,12 +241,12 @@ display: inline-block; width: 30%; height: 56px; - background: #E60B30; + background: #e60b30; border-radius: 28px; font-size: 24px; font-family: PingFang SC; font-weight: 500; - color: #FFFFFF; + color: #ffffff; text-align: center; line-height: 56px; margin-bottom: 8px; @@ -276,25 +268,23 @@ text-overflow: ellipsis; overflow: hidden; white-space: nowrap; - } .goods-item-button { display: block; width: 100%; height: 56px; - background: #E60B30; + background: #e60b30; border-radius: 28px; font-size: 24px; font-family: PingFang SC; font-weight: 500; - color: #FFFFFF; + color: #ffffff; text-align: center; line-height: 56px; margin-bottom: 20px; } } - } .larger { @@ -305,7 +295,6 @@ } } - .small, .list, .swipe { @@ -313,18 +302,14 @@ .goods-item-image { padding-top: 100%; } - } } - .small { .goods-wrapper { float: left; width: 50%; } - - } .list { @@ -379,7 +364,5 @@ text-overflow: ellipsis; white-space: nowrap; } - } - } diff --git a/src/pages/fitment/task/task.vue b/src/pages/fitment/task/task.vue index 19fbc31..74c39a9 100644 --- a/src/pages/fitment/task/task.vue +++ b/src/pages/fitment/task/task.vue @@ -1,42 +1,71 @@ + diff --git a/src/pages/fitment/title/element.less b/src/pages/fitment/title/element.less index 2639472..d741813 100644 --- a/src/pages/fitment/title/element.less +++ b/src/pages/fitment/title/element.less @@ -1,98 +1,95 @@ .title { - background: #FFFFFF; + background: #ffffff; - .title-style1, - .title-style2, - .title-style3 { - width: 100%; - padding: 0 32px; - box-sizing: border-box; - position: relative; - } - - .title-style3 { - .title-content { - font-size: 32px; - font-weight: 500; - color: #333333; - } - - .title-more { - position: absolute; - font-size: 28px; - font-weight: 400; - color: #333333; - right: 16px; - top: 0; - height: 100%; - line-height: 100%; - display: flex; - align-items: center; - justify-content: center; - } + .title-style1, + .title-style2, + .title-style3 { + width: 100%; + padding: 0 32px; + box-sizing: border-box; + position: relative; + } - .title-subtitle { - margin-top: 8px; - font-size: 24px; - height: 40px; - font-weight: 400; - color: #333333; - } + .title-style3 { + .title-content { + font-size: 32px; + font-weight: 500; + color: #333333; } + .title-more { + position: absolute; + font-size: 28px; + font-weight: 400; + color: #333333; + right: 16px; + top: 0; + height: 100%; + line-height: 100%; + display: flex; + align-items: center; + justify-content: center; + } - .title-style1 { - text-align: center; + .title-subtitle { + margin-top: 8px; + font-size: 24px; + height: 40px; + font-weight: 400; + color: #333333; + } + } - .title-content-before { - display: inline-block; - content: ""; - width: 20%; - height: 10px; - border-top: 2px solid #898989; - margin-right: 20px; - } + .title-style1 { + text-align: center; - .title-content-after { - display: inline-block; - content: ""; - width: 20%; - height: 10px; - border-top: 2px solid #898989; - margin-left: 20px; - } + .title-content-before { + display: inline-block; + content: ''; + width: 20%; + height: 10px; + border-top: 2px solid #898989; + margin-right: 20px; } - .title-style2 { - width: 85%; - box-sizing: border-box; - text-align: center; - line-height: 40px; - position: relative; - margin: 0 auto; - - .title-content { - font-weight: 400; - } + .title-content-after { + display: inline-block; + content: ''; + width: 20%; + height: 10px; + border-top: 2px solid #898989; + margin-left: 20px; + } + } - .title-decorate-before { - position: absolute; - content: ""; - width: 45%; - border-bottom: 2px solid #898989; - right: 0; - top: 60px; - } + .title-style2 { + width: 85%; + box-sizing: border-box; + text-align: center; + line-height: 40px; + position: relative; + margin: 0 auto; - .title-decorate-after { - position: absolute; - content: ""; - width: 45%; - border-bottom: 2px solid #898989; - left: 0; - top: 60px; - } + .title-content { + font-weight: 400; } + .title-decorate-before { + position: absolute; + content: ''; + width: 45%; + border-bottom: 2px solid #898989; + right: 0; + top: 60px; + } -} \ No newline at end of file + .title-decorate-after { + position: absolute; + content: ''; + width: 45%; + border-bottom: 2px solid #898989; + left: 0; + top: 60px; + } + } +} diff --git a/src/pages/fitment/title/title.vue b/src/pages/fitment/title/title.vue index e49f719..00257d7 100644 --- a/src/pages/fitment/title/title.vue +++ b/src/pages/fitment/title/title.vue @@ -1,75 +1,104 @@ - + \ No newline at end of file + diff --git a/src/pages/fitment/video/video.vue b/src/pages/fitment/video/video.vue index a2dbf23..4c12bf8 100644 --- a/src/pages/fitment/video/video.vue +++ b/src/pages/fitment/video/video.vue @@ -1,9 +1,6 @@ + + \ No newline at end of file + diff --git a/src/pages/fitment/wechat/wechat.vue b/src/pages/fitment/wechat/wechat.vue index 8413158..21edeb2 100644 --- a/src/pages/fitment/wechat/wechat.vue +++ b/src/pages/fitment/wechat/wechat.vue @@ -1,87 +1,86 @@ + + \ No newline at end of file + diff --git a/src/pages/fitment/wechatLive/wechatLive.vue b/src/pages/fitment/wechatLive/wechatLive.vue index 6e27d4f..c967521 100644 --- a/src/pages/fitment/wechatLive/wechatLive.vue +++ b/src/pages/fitment/wechatLive/wechatLive.vue @@ -1,77 +1,76 @@ - + + diff --git a/src/pages/goods/components/detail-basic-information.vue b/src/pages/goods/components/detail-basic-information.vue index 5c3ccd6..67781a7 100644 --- a/src/pages/goods/components/detail-basic-information.vue +++ b/src/pages/goods/components/detail-basic-information.vue @@ -18,6 +18,9 @@ 分享 + + {{ goodsIntroduce }} + @@ -110,6 +113,13 @@ export default { default: function () { return {}; } + }, + // 副标题 + goodsIntroduce: { + type: String, + default: function () { + return ''; + } } }, data() { @@ -256,7 +266,16 @@ export default { font-size: 32px; color: RGBA(153, 153, 153, 1); } - +.he-subtitle { + font-size: 22px; + font-family: PingFang SC; + font-weight: 500; + color: #999999; + line-height: 32px; + margin: 20px 0 0 0; + word-wrap: break-word; + word-break: normal; +} .he-coupon { width: 662px; height: 64px; diff --git a/src/pages/goods/components/detail-parameter.vue b/src/pages/goods/components/detail-parameter.vue index 0a38efa..0815242 100644 --- a/src/pages/goods/components/detail-parameter.vue +++ b/src/pages/goods/components/detail-parameter.vue @@ -1,174 +1,220 @@ \ No newline at end of file + diff --git a/src/pages/goods/detail.vue b/src/pages/goods/detail.vue index 9c92368..5288d53 100644 --- a/src/pages/goods/detail.vue +++ b/src/pages/goods/detail.vue @@ -1,10 +1,9 @@ diff --git a/src/pages/order/components/submit-button.vue b/src/pages/order/components/submit-button.vue index 5a6dd7c..34dbdef 100644 --- a/src/pages/order/components/submit-button.vue +++ b/src/pages/order/components/submit-button.vue @@ -1,147 +1,146 @@ diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue index 2ae191a..1818451 100644 --- a/src/pages/order/detail.vue +++ b/src/pages/order/detail.vue @@ -17,7 +17,12 @@ :freight="detail.freight" > - + @@ -99,8 +107,13 @@ export default { }, computed: { isBottom: function () { - let { status, is_evaluate } = this.detail; - return status === 100 || status === 202 || (status === 203 && is_evaluate === 0); + let { status, is_evaluate, goods, check_after } = this.detail; + return ( + status === 100 || + status === 202 || + (status === 201 && goods.length > 1 && !check_after) || + (status === 203 && is_evaluate === 0) + ); }, ...mapGetters('setting', { goodsSetting: 'goodsSetting' @@ -159,6 +172,7 @@ export default { } }; + diff --git a/src/pages/order/fill-return-information.vue b/src/pages/order/fill-return-information.vue index 294923a..769e7b0 100644 --- a/src/pages/order/fill-return-information.vue +++ b/src/pages/order/fill-return-information.vue @@ -1,215 +1,215 @@ \ No newline at end of file + diff --git a/src/pages/order/index.vue b/src/pages/order/index.vue index 03895cd..532f19d 100644 --- a/src/pages/order/index.vue +++ b/src/pages/order/index.vue @@ -1,6 +1,19 @@ + diff --git a/src/pages/order/logistics.vue b/src/pages/order/logistics.vue index 6ec523f..a8bc316 100644 --- a/src/pages/order/logistics.vue +++ b/src/pages/order/logistics.vue @@ -1,20 +1,14 @@ @@ -235,4 +221,4 @@ export default { } } } - \ No newline at end of file + diff --git a/src/pages/order/submit.vue b/src/pages/order/submit.vue index 9244709..74da535 100644 --- a/src/pages/order/submit.vue +++ b/src/pages/order/submit.vue @@ -4,289 +4,300 @@ 积分余额不足 - {{msg}} - 去赚积分 - 看看其他积分商品 + {{ msg }} + 去赚积分 + 看看其他积分商品 + diff --git a/src/pages/order/successful.vue b/src/pages/order/successful.vue index f6fced7..a6fd18a 100644 --- a/src/pages/order/successful.vue +++ b/src/pages/order/successful.vue @@ -1,479 +1,478 @@ \ No newline at end of file + diff --git a/src/pages/other/web.vue b/src/pages/other/web.vue new file mode 100644 index 0000000..405dca6 --- /dev/null +++ b/src/pages/other/web.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/pages/page/index.vue b/src/pages/page/index.vue index 5bf9671..e1b22a6 100644 --- a/src/pages/page/index.vue +++ b/src/pages/page/index.vue @@ -1,22 +1,106 @@ \ No newline at end of file + diff --git a/src/pages/user/components/user-features.vue b/src/pages/user/components/user-features.vue index 9b27800..600195f 100644 --- a/src/pages/user/components/user-features.vue +++ b/src/pages/user/components/user-features.vue @@ -1,12 +1,18 @@ @@ -62,22 +68,24 @@ 电话客服 - {{ - storeSetting.contact.phone.time - }} + {{ storeSetting.contact.phone.time }} - + 选择性别 - + - + - + - + - - - - - 确定 + + 确定 @@ -96,58 +113,93 @@ - + - {{getYear(index)-1}}年 + {{ getYear(index) - 1 }}年 - {{getYear(index)}}年 + {{ getYear(index) }}年 - + - {{(index)}}月 + {{ index }}月 - {{(index+1)}}月 + {{ index + 1 }}月 - + - {{(index)}}日 + {{ index }}日 - {{(index+1)}}日 + {{ index + 1 }}日 - - - - - 确定 + + 确定 diff --git a/src/resources.scss b/src/resources.scss index 2019f70..e69de29 100644 --- a/src/resources.scss +++ b/src/resources.scss @@ -1,6 +0,0 @@ -/* -* @Author: qinuoyun -* @Date: 2021-02-02 14:29:58 -* @Last Modified by: qinuoyun -* @Last Modified time: 2021-02-23 11:48:32 -*/ diff --git a/src/siteinfo.js b/src/siteinfo.js index 5f53a0b..6a1e13e 100644 --- a/src/siteinfo.js +++ b/src/siteinfo.js @@ -1,10 +1,5 @@ -/* - * @Description: - * @Author: fjt - * @Date: 2021-05-24 13:22:32 - * @LastEditTime: 2021-06-18 09:59:34 - * @LastEditors: fjt - */ module.exports = { - "siteroot": "" + // siteroot: 'https://test.leadshop.vip/index.php' + siteroot: 'https://dev.91bd.cn/index.php' + // siteroot: 'http://localhost:8080/index.php' }; diff --git a/src/static/h5/js/wechat.js b/src/static/h5/js/wechat.js index 022a4ac..9adaee9 100644 --- a/src/static/h5/js/wechat.js +++ b/src/static/h5/js/wechat.js @@ -1,155 +1,145 @@ -import Vue from "vue"; +import Vue from 'vue'; function isWechat() { - let mic = window.navigator.userAgent.toLowerCase().match(/micromessenger/i); - return mic && mic[0] === 'micromessenger' ? 1 : 0; + let mic = window.navigator.userAgent.toLowerCase().match(/micromessenger/i); + return mic && mic[0] === 'micromessenger' ? 1 : 0; } function call() { - let whiteList = [ - "/pages/order/submit" - ] - let pathname = window.location.pathname; - pathname = pathname.split("?")[0]; - if (whiteList.indexOf(pathname) > -1) { - init(); - } + let whiteList = ['/pages/order/submit']; + let pathname = window.location.pathname; + pathname = pathname.split('?')[0]; + if (whiteList.indexOf(pathname) > -1) { + init(); + } } -function init(callback, jsApiList = [ - "chooseWXPay", - "hideAllNonBaseMenuItem", - "showMenuItems", - "onMenuShareAppMessage", - "updateTimelineShareData", - "onMenuShareTimeline", - "hideMenuItems" -]) { - if (isWechat()) { - let url = window.location.href.split('#')[0]; - Vue.prototype.$heshop.jssdk('get', { - url: url - }).then((e) => { - let config = { - debug: false, - appId: e.appid, - timestamp: e.timestamp, - nonceStr: e.noncestr, - signature: e.signature, - jsApiList: jsApiList, - openTagList: ['wx-open-subscribe'] - }; - jWeixin.config(config); - jWeixin.error(err => { - console.error('config fail:', err); - }); - jWeixin.ready(() => { - if (callback) callback(jWeixin); - }); +function init( + callback, + jsApiList = [ + 'chooseWXPay', + 'hideAllNonBaseMenuItem', + 'showMenuItems', + 'onMenuShareAppMessage', + 'updateTimelineShareData', + 'onMenuShareTimeline', + 'hideMenuItems' + ] +) { + if (isWechat()) { + let url = window.location.href.split('#')[0]; + Vue.prototype.$heshop + .jssdk('get', { + url: url + }) + .then(e => { + let config = { + debug: false, + appId: e.appid, + timestamp: e.timestamp, + nonceStr: e.noncestr, + signature: e.signature, + jsApiList: jsApiList, + openTagList: ['wx-open-subscribe', 'wx-open-launch-weapp'] + }; + jWeixin.config(config); + jWeixin.error(err => { + console.error('config fail:', err); }); - } + jWeixin.ready(() => { + if (callback) callback(jWeixin); + }); + }); + } } -function chooseWXPay({ - timestamp, - nonceStr, - packAge, - signType, - paySign, - success, - fail, - cancel -}) { - jWeixin.chooseWXPay({ - timestamp: timestamp, - nonceStr: nonceStr, - package: packAge, - signType: signType, - paySign: paySign, - success: function (res) { - success && success(res); - }, - fail: function (err) { - fail && fail(err); - - }, - cancel: function (res) { - cancel && cancel(res); - }, - complete: function () {} - }); +function chooseWXPay({ timestamp, nonceStr, packAge, signType, paySign, success, fail, cancel }) { + jWeixin.chooseWXPay({ + timestamp: timestamp, + nonceStr: nonceStr, + package: packAge, + signType: signType, + paySign: paySign, + success: function (res) { + success && success(res); + }, + fail: function (err) { + fail && fail(err); + }, + cancel: function (res) { + cancel && cancel(res); + }, + complete: function () {} + }); } function hideAllNonBaseMenuItem() { - init(function (jssdk) { - jssdk.hideAllNonBaseMenuItem(); - }); + init(function (jssdk) { + jssdk.hideAllNonBaseMenuItem(); + }); } // 批量显示功能按钮接口 -function showMenuItems({ - menuList = [] -}) { - init(function (jssdk) { - jssdk.showMenuItems({ - menuList: menuList // 要显示的菜单项 - }); - }, ["showMenuItems"]); +function showMenuItems({ menuList = [] }) { + init( + function (jssdk) { + jssdk.showMenuItems({ + menuList: menuList // 要显示的菜单项 + }); + }, + ['showMenuItems'] + ); } // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮 -function hideMenuItems({ - menuList = [] -}) { - init(function (jssdk) { - jssdk.hideMenuItems({ - menuList: menuList - }); - }, ["hideMenuItems"]); +function hideMenuItems({ menuList = [] }) { + init( + function (jssdk) { + jssdk.hideMenuItems({ + menuList: menuList + }); + }, + ['hideMenuItems'] + ); } // 分享 -function updateShareData({ - title = '', - desc = ' ', - path = '', - imageUrl = '' -}) { - let { - origin, - pathname, - } = window.location; - init(function (jssdk) { - // 分享给用户 - jssdk.onMenuShareAppMessage({ - title: title, // 分享标题 - desc: desc, // 分享描述 - link: origin + pathname + "?r=wechat#" + path, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - imgUrl: imageUrl, // 分享图标 - type: 'link' // 如果type是music或video,则要提供数据链接,默认为空 - }); - // 分享到朋友圈 - jssdk.updateTimelineShareData({ - title: title, // 分享标题 - link: origin + pathname + "?r=wechat#" + path, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - imgUrl: imageUrl, // 分享图标 - }); - // 兼容分享到朋友圈(官网已经说废弃) - jssdk.onMenuShareTimeline({ - title: title, // 分享标题 - link: origin + pathname + "?r=wechat#" + path, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 - imgUrl: imageUrl, // 分享图标 - }); - }, ["onMenuShareAppMessage", "updateTimelineShareData", "onMenuShareTimeline"]) +function updateShareData({ title = '', desc = ' ', path = '', imageUrl = '' }) { + let { origin, pathname } = window.location; + init( + function (jssdk) { + // 分享给用户 + jssdk.onMenuShareAppMessage({ + title: title, // 分享标题 + desc: desc, // 分享描述 + link: origin + pathname + '?r=wechat#' + path, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: imageUrl, // 分享图标 + type: 'link' // 如果type是music或video,则要提供数据链接,默认为空 + }); + // 分享到朋友圈 + jssdk.updateTimelineShareData({ + title: title, // 分享标题 + link: origin + pathname + '?r=wechat#' + path, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: imageUrl // 分享图标 + }); + // 兼容分享到朋友圈(官网已经说废弃) + jssdk.onMenuShareTimeline({ + title: title, // 分享标题 + link: origin + pathname + '?r=wechat#' + path, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: imageUrl // 分享图标 + }); + }, + ['onMenuShareAppMessage', 'updateTimelineShareData', 'onMenuShareTimeline'] + ); } export default { - isWechat, - showMenuItems, - hideAllNonBaseMenuItem, - chooseWXPay, - updateShareData, - init, - call, - hideMenuItems -} \ No newline at end of file + isWechat, + showMenuItems, + hideAllNonBaseMenuItem, + chooseWXPay, + updateShareData, + init, + call, + hideMenuItems +}; diff --git a/src/store/after.js b/src/store/after.js index d178acf..3615cef 100644 --- a/src/store/after.js +++ b/src/store/after.js @@ -3,16 +3,16 @@ const after = { state: { cancel_after: { boole: false, - order_id: null, - }, + order_id: null + } }, mutations: { cancelAfter: function (state, data) { state.cancel_after = data; - }, + } }, getters: {}, - actions: {}, + actions: {} }; export default after; diff --git a/src/store/cart.js b/src/store/cart.js index 2b8b88a..18f297b 100644 --- a/src/store/cart.js +++ b/src/store/cart.js @@ -1,61 +1,64 @@ /* - * @Description: + * @Description: * @Author: fjt * @Date: 2021-04-26 12:37:36 * @LastEditTime: 2021-06-18 10:27:41 * @LastEditors: fjt */ const cart = { - namespaced: true, - state: { - cart_add: false, - cart_num: false + namespaced: true, + state: { + cart_add: false, + cart_num: false + }, + mutations: { + setCartAdd(state, data) { + state.cart_add = data; }, - mutations: { - setCartAdd(state, data) { - state.cart_add = data; - }, - cartNum(state, data) { - state.cart_num = data; - } - }, - getters: { - getCartAdd: function (state) { - return state.cart_add; - } + cartNum(state, data) { + state.cart_num = data; + } + }, + getters: { + getCartAdd: function (state) { + return state.cart_add; + } + }, + actions: { + getCartNumber: function ({}) { + return new Promise((resolve, reject) => { + let $heshop = this._vm.$heshop; + $heshop + .cart('get', { + behavior: 'number' + }) + .then(function (response) { + resolve(response); + }) + .catch(function () { + reject(); + }); + }); }, - actions: { - getCartNumber: function ({ }) { - return new Promise((resolve, reject) => { - let $heshop = this._vm.$heshop; - $heshop.cart('get', { - behavior: "number", - }).then(function (response) { - resolve(response); - }).catch(function () { - reject(); - }); - }) - }, - setCartNumber: function ({ rootGetters, dispatch }) { - let index = rootGetters['setting/getCartIndex']; - if (index === -1) { - return; - } - dispatch('getCartNumber').then(res => { - if (res !== 0) { - uni.setTabBarBadge({ - index: index, - text: res + "", - }); - } else { - uni.removeTabBarBadge({ - index: index, - }); - } - }); + setCartNumber: function ({ rootGetters, dispatch }) { + let index = rootGetters['setting/getCartIndex']; + if (index === -1) { + return; + } + dispatch('getCartNumber').then(res => { + if (res !== 0) { + uni.setTabBarBadge({ + index: index, + text: res + '' + }); + } else { + uni.removeTabBarBadge({ + index: index + }); } + }); } + } }; export default cart; diff --git a/src/store/components.js b/src/store/components.js index 6122214..ed528d0 100644 --- a/src/store/components.js +++ b/src/store/components.js @@ -1,82 +1,83 @@ -/* - * @Author: fjt - * @Date: 2021-05-16 17:54:36 - * @LastEditors: fjt - * @LastEditTime: 2021-06-14 21:55:11 - */ const components = { - namespaced: true, - state: { - search: { - height: 0, - top: 0, - fixed: false, - index: 0 - }, - page: [] + namespaced: true, + state: { + search: { + height: 0, + top: 0, + fixed: false, + index: 0 }, - mutations: { - setSearchFixed: function(state, data) { - state.search.fixed = data; - }, - setSearchIndex: function(state, data) { - state.search.index = data; - }, - setPage: function(state, data) { - state.page = data; - } + page: [] + }, + mutations: { + setSearchFixed: function (state, data) { + state.search.fixed = data; }, - getters: { - getSearchHeight: function(state) { - return state.search.height; - }, - getSearchFixed: function(state) { - return state.search.fixed; - }, - getSearchTop: function(state) { - return state.search.top; - }, - getSearchIndex: function(state) { - return state.search.index; - } + setSearchIndex: function (state, data) { + state.search.index = data; }, - actions: { - getSearch: function({ state }) { - let page = state.page; - let num = state.search.index; - let array = []; - for (let i = 0; i < page.length; i++) { - array.push( - new Promise((resolve, reject) => { - try { - let query = uni.createSelectorQuery(); - query.select('#' + page[i].name + '_' + i).boundingClientRect(rect => { - if (rect) { - resolve(rect.height); - } - - }).exec(); - } catch (e) { - reject(e); - } - }) - ) - if (i >= (num - 1)) break; + setPage: function (state, data) { + state.page = data; + } + }, + getters: { + getSearchHeight: function (state) { + return state.search.height; + }, + getSearchFixed: function (state) { + return state.search.fixed; + }, + getSearchTop: function (state) { + return state.search.top; + }, + getSearchIndex: function (state) { + return state.search.index; + } + }, + actions: { + getSearch: function ({ state }) { + let page = state.page; + let num = state.search.index; + let array = []; + for (let i = 0; i < page.length; i++) { + array.push( + new Promise((resolve, reject) => { + try { + let query = uni.createSelectorQuery(); + query + .select('#' + page[i].name + '_' + i) + .boundingClientRect(rect => { + if (rect) { + resolve(rect.height); + } + }) + .exec(); + } catch (e) { + reject(e); } - Promise.all(array).then(function(res) { - state.search.top = 0; - res.forEach((item) => { - state.search.top += parseInt(item); - }); - }).catch(function() { - }); - uni.createSelectorQuery().select('#search').boundingClientRect(function(rect) { - if (rect) { - state.search.height = rect.height; - } - }).exec(); - } + }) + ); + if (i >= num - 1) break; + } + Promise.all(array) + .then(function (res) { + state.search.top = 0; + res.forEach(item => { + state.search.top += parseInt(item); + }); + }) + .catch(function () {}); + uni + .createSelectorQuery() + .select('#search') + .boundingClientRect(function (rect) { + if (rect) { + state.search.height = rect.height; + } + }) + .exec(); } + } }; -export default components; \ No newline at end of file +export default components; diff --git a/src/store/getters.js b/src/store/getters.js index ed33697..d3e61b9 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -1,13 +1,13 @@ const getters = { - /** - * 获取当前属性栏目 - * @param {[type]} state [description] - * @return {[type]} [description] - */ - attribute: (state => { - let index = state.pages.status; - return state.pages.page[index].name; - }), + /** + * 获取当前属性栏目 + * @param {[type]} state [description] + * @return {[type]} [description] + */ + attribute: state => { + let index = state.pages.status; + return state.pages.page[index].name; + } }; -export default getters; \ No newline at end of file +export default getters; diff --git a/src/store/goods.js b/src/store/goods.js index ba73962..8ce1415 100644 --- a/src/store/goods.js +++ b/src/store/goods.js @@ -1,42 +1,39 @@ const goods = { - namespaced: true, - state: { - shareGoods: [] - }, - mutations: { - shareGoods: function (state, data) { - state.shareGoods = data; - } - }, - getters: { - shareGoods: function (state) { - return state.shareGoods; - } + namespaced: true, + state: { + shareGoods: [] + }, + mutations: { + shareGoods: function (state, data) { + state.shareGoods = data; + } + }, + getters: { + shareGoods: function (state) { + return state.shareGoods; + } + }, + actions: { + shareGoods: function ({ getters, commit }) { + let $heshop = this._vm.$heshop; + if (getters.shareGoods.length === 0) { + $heshop + .goods('get', { + behavior: 'recommend' + }) + .then(function (res) { + commit('shareGoods', res); + }) + .catch(function (err) { + console.error(err); + }); + } }, - actions: { - shareGoods: function ({ - getters, - commit - }) { - let $heshop = this._vm.$heshop; - if (getters.shareGoods.length === 0) { - $heshop.goods('get', { - behavior: 'recommend' - }).then(function (res) { - commit('shareGoods', res); - }).catch(function (err) { - console.error(err); - }); - } - }, - emptyShareGoods: function ({ - commit, - dispatch - }) { - commit('shareGoods', []); - dispatch('shareGoods'); - } + emptyShareGoods: function ({ commit, dispatch }) { + commit('shareGoods', []); + dispatch('shareGoods'); } + } }; -export default goods; \ No newline at end of file +export default goods; diff --git a/src/store/index.js b/src/store/index.js index 22eb9cb..032f828 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,23 +1,23 @@ -import setting from "./setting.js"; -import user from "./user.js"; -import pages from "./pages.js"; -import cart from "./cart.js"; -import order from "./order.js"; -import goods from "./goods.js"; -import after from "./after.js"; -import plugins from "./plugins.js"; -import task from "@/plugins/task/store.js"; -import components from "./components.js"; +import setting from './setting.js'; +import user from './user.js'; +import pages from './pages.js'; +import cart from './cart.js'; +import order from './order.js'; +import goods from './goods.js'; +import after from './after.js'; +import plugins from './plugins.js'; +import task from '@/plugins/task/store.js'; +import components from './components.js'; export default { - setting, - user, - pages, - cart, - order, - goods, - after, - plugins, - task, - components -} \ No newline at end of file + setting, + user, + pages, + cart, + order, + goods, + after, + plugins, + task, + components +}; diff --git a/src/store/order.js b/src/store/order.js index 2710721..4acdda5 100644 --- a/src/store/order.js +++ b/src/store/order.js @@ -1,29 +1,29 @@ const cart = { - namespaced: true, - state: { - cart_add: false, - isShip: { - bool: false, - id: null - } + namespaced: true, + state: { + cart_add: false, + isShip: { + bool: false, + id: null + } + }, + mutations: { + setCartAdd(state, data) { + state.cart_add = data; }, - mutations: { - setCartAdd(state, data) { - state.cart_add = data; - }, - setShip(state, data) { - state.isShip = data; - } + setShip(state, data) { + state.isShip = data; + } + }, + getters: { + getCartAdd: function (state) { + return state.cart_add; }, - getters: { - getCartAdd: function (state) { - return state.cart_add; - }, - getShip: function (state) { - return state.isShip; - } - }, - actions: {} + getShip: function (state) { + return state.isShip; + } + }, + actions: {} }; export default cart; diff --git a/src/store/pages.js b/src/store/pages.js index d37dfe6..97f5442 100644 --- a/src/store/pages.js +++ b/src/store/pages.js @@ -1,133 +1,127 @@ -/* - * @Author: imac - * @Date: 2020-05-30 15:02:36 - * @Last Modified by: qinuoyun - * @Last Modified time: 2021-02-04 09:15:45 - */ const pages = { - namespaced: true, - state: { - dragIndex: -1, - position: "top", - status: -1, - page: [], - coms: null, - iframeHeight: 0 + namespaced: true, + state: { + dragIndex: -1, + position: 'top', + status: -1, + page: [], + coms: null, + iframeHeight: 0 + }, + mutations: { + /** + * 设置属性信息 + * @param {[type]} state [description] + * @param {[type]} data [description] + */ + setAttribute(state, data) { + let { index, key, value } = data; + let { status } = state; + state.page[index][key] = JSON.parse(JSON.stringify(value)); }, - mutations: { - /** - * 设置属性信息 - * @param {[type]} state [description] - * @param {[type]} data [description] - */ - setAttribute(state, data) { - let {index, key, value} = data; - let {status} = state; - state.page[index][key] = JSON.parse(JSON.stringify(value)); - }, - /** - * 设置信息 - * @param {[type]} state [description] - * @param {[type]} data [description] - */ - setStatusIndex(state, data) { - state.status = data - }, - /** - * 设置信息 - * @param {[type]} state [description] - * @param {[type]} data [description] - */ - setIframeHeight(state, data) { - state.iframeHeight = data - }, - /** - * 设置页面 - * @param {[type]} state [description] - * @param {[type]} data [description] - */ - setPageData(state, data) { - state.page = data - }, - /** - * 获取页面内容 - * @param {[type]} state [description] - * @return {[type]} [description] - */ - getPageData(state) { - return JSON.stringify(state.page); - }, - /** - * 设置拖拽目的地 - * @param {[type]} state [description] - * @param {[type]} data [description] - */ - setDragIndex(state, data) { - state.dragIndex = data - }, - /** - * 设置拖拽位置 - * @param {[type]} state [description] - * @param {[type]} data [description] - */ - setDragPosition(state, data) { - state.position = data - }, - /** - * 设置当前原件 - * @param {[type]} state [description] - * @param {[type]} data [description] - */ - setComs(state, data) { - state.coms = data - } + /** + * 设置信息 + * @param {[type]} state [description] + * @param {[type]} data [description] + */ + setStatusIndex(state, data) { + state.status = data; + }, + /** + * 设置信息 + * @param {[type]} state [description] + * @param {[type]} data [description] + */ + setIframeHeight(state, data) { + state.iframeHeight = data; + }, + /** + * 设置页面 + * @param {[type]} state [description] + * @param {[type]} data [description] + */ + setPageData(state, data) { + state.page = data; + }, + /** + * 获取页面内容 + * @param {[type]} state [description] + * @return {[type]} [description] + */ + getPageData(state) { + return JSON.stringify(state.page); }, - actions: { - /** - * 添加元件 - * @param {[type]} state [description] - * @param {[type]} data [description] - * @return {[type]} [description] - */ - pushPagesComs(context, data) { - let {dragIndex, coms, page, status, position} = context.state; - let element = JSON.parse(JSON.stringify(coms)); - //数据阻隔,否则在激活状态下,在顶部的增加数据会错乱 - let pages = JSON.parse(JSON.stringify(page)); - if (dragIndex == -2) { - pages.push(element); - } - //在其他位置点 - if (dragIndex > 0) { - if (position == 'top') { - dragIndex; - } else { - dragIndex++; - } - pages.splice(dragIndex, 0, element); - } - //在顶部添加 - if (dragIndex === 0) { - pages.unshift(element) - } - //重新修改数据元素 - context.commit('setPageData', pages) - //判断是否在激活组件之前添加元件 - if (dragIndex <= status && dragIndex !== -2) { - //用户判断在有多个组件的时候,且在激活的组件之前,添加组件,需要修改激活位置 - let index = status + 1; - context.commit('setStatusIndex', index); - //获取父级信息 - let parent = window.parent.window.app; - let name = context.rootGetters.attribute; - //通知父级修改激活选项的位置 - parent.$store.commit('pages/setAttribute', name); - parent.$store.commit('pages/setActiveIndex', index); - } - //清空数据 - context.commit('setComs', "") + /** + * 设置拖拽目的地 + * @param {[type]} state [description] + * @param {[type]} data [description] + */ + setDragIndex(state, data) { + state.dragIndex = data; + }, + /** + * 设置拖拽位置 + * @param {[type]} state [description] + * @param {[type]} data [description] + */ + setDragPosition(state, data) { + state.position = data; + }, + /** + * 设置当前原件 + * @param {[type]} state [description] + * @param {[type]} data [description] + */ + setComs(state, data) { + state.coms = data; + } + }, + actions: { + /** + * 添加元件 + * @param {[type]} state [description] + * @param {[type]} data [description] + * @return {[type]} [description] + */ + pushPagesComs(context, data) { + let { dragIndex, coms, page, status, position } = context.state; + let element = JSON.parse(JSON.stringify(coms)); + //数据阻隔,否则在激活状态下,在顶部的增加数据会错乱 + let pages = JSON.parse(JSON.stringify(page)); + if (dragIndex == -2) { + pages.push(element); + } + //在其他位置点 + if (dragIndex > 0) { + if (position == 'top') { + dragIndex; + } else { + dragIndex++; } + pages.splice(dragIndex, 0, element); + } + //在顶部添加 + if (dragIndex === 0) { + pages.unshift(element); + } + //重新修改数据元素 + context.commit('setPageData', pages); + //判断是否在激活组件之前添加元件 + if (dragIndex <= status && dragIndex !== -2) { + //用户判断在有多个组件的时候,且在激活的组件之前,添加组件,需要修改激活位置 + let index = status + 1; + context.commit('setStatusIndex', index); + //获取父级信息 + let parent = window.parent.window.app; + let name = context.rootGetters.attribute; + //通知父级修改激活选项的位置 + parent.$store.commit('pages/setAttribute', name); + parent.$store.commit('pages/setActiveIndex', index); + } + //清空数据 + context.commit('setComs', ''); } + } }; -export default pages; \ No newline at end of file +export default pages; diff --git a/src/store/plugins.js b/src/store/plugins.js index 129d73b..4816764 100644 --- a/src/store/plugins.js +++ b/src/store/plugins.js @@ -1,10 +1,3 @@ -/* - * 插件配置 - * @Author: qinuoyun - * @Date: 2021-06-08 09:47:00 - * @Last Modified by: qinuoyun - * @Last Modified time: 2021-07-10 17:47:21 - */ const plugins = { namespaced: true, state: { @@ -21,7 +14,7 @@ const plugins = { * @param {[type]} data [description] */ setPlugins(state, data) { - console.log("获取插件所有配置信息", data) + console.log('获取插件所有配置信息', data); state.pluginsList = data; } }, @@ -31,25 +24,27 @@ const plugins = { * @param {[type]} state) [description] * @return {[type]} [description] */ - is_install: (state) => (name) => { - return state.todos.find(todo => todo.name === name) + is_install: state => name => { + return state.todos.find(todo => todo.name === name); }, /** * 获取插件配置信息 * @param {[type]} state) [description] * @return {[type]} [description] */ - manifest: (state) => (name, keys = "") => { - if (state.pluginsList[name]) { - if (keys) { - return state.pluginsList[name][keys]; + manifest: + state => + (name, keys = '') => { + if (state.pluginsList[name]) { + if (keys) { + return state.pluginsList[name][keys]; + } else { + return state.pluginsList[name]; + } } else { - return state.pluginsList[name]; + return false; } - } else { - return false; } - } }, actions: { /** @@ -58,17 +53,20 @@ const plugins = { * @param {[type]} options.commit [description] * @return {[type]} [description] */ - getPlugins: function({ commit }) { + getPlugins: function ({ commit }) { let $heshop = this._vm.$heshop; let $storageKey = this._vm.$storageKey; - $heshop.plugin('get', { include: 'empty', model: 'empty' }).then(function(res) { - commit('setPlugins', res); - // uni.setStorageSync($storageKey.plugins, res); - }).catch(function(err) { - console.log("插件获取配置错误", ) - console.error(err); - }); + $heshop + .plugin('get', { include: 'empty', model: 'empty' }) + .then(function (res) { + commit('setPlugins', res); + // uni.setStorageSync($storageKey.plugins, res); + }) + .catch(function (err) { + console.log('插件获取配置错误'); + console.error(err); + }); // if (uni.getStorageSync($storageKey.plugins)) { // commit('setPlugins', uni.getStorageSync($storageKey.plugins)); // } else { @@ -84,20 +82,27 @@ const plugins = { * 分享转发 * @return {[type]} [description] */ - onShare: function({ state, commit }) { + onShare: function ({ state, commit }) { let config = state.pluginsList['task']['share']; let $heshop = this._vm.$heshop; return new Promise((resolve, reject) => { - $heshop.plugin('post', { include: 'task', model: 'task' }, { - "number": 1, - "keyword": "share" - }).then(res => { - console.log("转发结果", res) - resolve(res) - }).catch(err => { - reject(err) - }); - }) + $heshop + .plugin( + 'post', + { include: 'task', model: 'task' }, + { + number: 1, + keyword: 'share' + } + ) + .then(res => { + console.log('转发结果', res); + resolve(res); + }) + .catch(err => { + reject(err); + }); + }); }, /** * 邀请执行 @@ -105,27 +110,34 @@ const plugins = { * @param {[type]} options.commit [description] * @return {[type]} [description] */ - onInvite: function({ state, commit }, { UID }) { - console.log("拿到用户ID", UID) + onInvite: function ({ state, commit }, { UID }) { + console.log('拿到用户ID', UID); let config = state.pluginsList['task']['share']; let $heshop = this._vm.$heshop; return new Promise((resolve, reject) => { - $heshop.plugin("post", { include: "task", model: "task" }, { - "number": UID, - "keyword": "invite" - }).then(res => { - console.log("邀请结果", res) - resolve(res) - }).catch(err => { - reject(err) - }); - }) + $heshop + .plugin( + 'post', + { include: 'task', model: 'task' }, + { + number: UID, + keyword: 'invite' + } + ) + .then(res => { + console.log('邀请结果', res); + resolve(res); + }) + .catch(err => { + reject(err); + }); + }); }, /** * 商品浏览信息 * @return {[type]} [description] */ - onBrowse: function({ state, commit }) { + onBrowse: function ({ state, commit }) { let config = state.pluginsList['task']['share']; let $heshop = this._vm.$heshop; /** @@ -134,15 +146,22 @@ const plugins = { * @return {[type]} [description] */ return new Promise((resolve, reject) => { - $heshop.plugin('post', { include: 'task', model: 'task' }, { - "number": 1, - "keyword": "browse" - }).then(res => { - resolve(res) - }).catch(err => { - reject(err) - }); - }) + $heshop + .plugin( + 'post', + { include: 'task', model: 'task' }, + { + number: 1, + keyword: 'browse' + } + ) + .then(res => { + resolve(res); + }) + .catch(err => { + reject(err); + }); + }); } } }; diff --git a/src/store/setting.js b/src/store/setting.js index 44c729b..c1f324a 100644 --- a/src/store/setting.js +++ b/src/store/setting.js @@ -16,7 +16,7 @@ const setting = { state.setting = data; }, setMenu(state, provider) { - state.menus = provider + state.menus = provider; }, setLocation(state, data) { state.location = data; @@ -28,48 +28,45 @@ const setting = { theme(state, data) { state.theme_color = data; }, - tabBar: function(state, data) { + tabBar: function (state, data) { state.tab_bar = data; }, - addressJson: function(state, data) { + addressJson: function (state, data) { state.addressJson = data; }, - subscribe: function(state, data) { + subscribe: function (state, data) { state.subscribe = data; } }, getters: { - storeSetting: function(state) { + storeSetting: function (state) { return state.setting.setting_collection && state.setting.setting_collection.store_setting; }, - goodsSetting: function(state) { + goodsSetting: function (state) { return state.setting.setting_collection && state.setting.setting_collection.goods_setting; }, - tradeSetting: function(state) { + tradeSetting: function (state) { return state.setting.setting_collection.trade_setting; }, - storagePicLimit: function(state) { - return Number(state.setting.storage_limit.pic_limit) * 1048576; - }, - getLocation: function(state) { + getLocation: function (state) { return state.location; }, - getPlatform: function(state) { + getPlatform: function (state) { return state.sys.platform; }, - getBasicSetting: function(state) { + getBasicSetting: function (state) { return state.setting.setting_collection && state.setting.setting_collection.basic_setting; }, - getTheme: function(state) { + getTheme: function (state) { return state.theme_color; }, - getTabBar: function(state) { + getTabBar: function (state) { return state.tab_bar.data; }, - statusBarHeight: function(state) { + statusBarHeight: function (state) { return state.sys.statusBarHeight; }, - getNavBarHeight: function(state) { + getNavBarHeight: function (state) { // #ifdef H5 return 44; // #endif @@ -77,16 +74,16 @@ const setting = { return state.sys.platform === 'ios' ? 44 : 48; // #endif }, - addressJson: function(state) { + addressJson: function (state) { return state.addressJson; }, - isProductsFeatured: function(state) { + isProductsFeatured: function (state) { return state.setting.setting_collection.goods_setting.recommend_showpage.goodsinfo.value; }, - subscribe: function(state) { + subscribe: function (state) { return state.subscribe; }, - getCartIndex: function(state) { + getCartIndex: function (state) { let list = state.tab_bar.data; let index = -1; for (let i = 0; i < list.length; i++) { @@ -96,68 +93,78 @@ const setting = { } return index; }, - getPicLimit: function(state) { + getPicLimit: function (state) { let limit = state.setting.storage_limit.pic_limit; return limit * 1024 * 1024; }, - shareSetting: function(state) { + shareSetting: function (state) { return state.setting.setting_collection && state.setting.setting_collection.share_setting; }, getSys: function (state) { return state.sys; + }, + getOpeningad: function (state) { + return state.setting.openingad; } }, actions: { - getSetting: function({ commit }) { + getSetting: function ({ commit }) { let $heshop = this._vm.$heshop; let $storageKey = this._vm.$storageKey; if (uni.getStorageSync($storageKey.setting)) { commit('setting', uni.getStorageSync($storageKey.setting)); } - $heshop.setting('get').then(function(res) { - commit('setting', res); - uni.setStorageSync($storageKey.setting, res); - }).catch(function(err) { - console.error(err); - }); + $heshop + .setting('get') + .then(function (res) { + commit('setting', res); + console.log(res); + uni.setStorageSync($storageKey.setting, res); + }) + .catch(function (err) { + console.error(err); + }); }, - resetting: function({ dispatch }) { + resetting: function ({ dispatch }) { let $storageKey = this._vm.$storageKey; uni.removeStorageSync($storageKey.setting); dispatch('getSetting'); }, - getLocation: function({ commit }) { + getLocation: function ({ commit }) { uni.getLocation({ type: 'wgs84', - success: function(res) { + success: function (res) { commit('setLocation', res); } }); }, - getSys: function({ commit }) { + getSys: function ({ commit }) { uni.getSystemInfo({ - success: function(res) { + success: function (res) { commit('setSys', res); } }); }, - getTheme: function({ commit }) { + getTheme: function ({ commit }) { let $heshop = this._vm.$heshop; let $storageKey = this._vm.$storageKey; if (uni.getStorageSync($storageKey.theme_color)) { commit('theme', uni.getStorageSync($storageKey.theme_color)); } else { - $heshop.fitment('post', { - keyword: 'themeColor' - }).then(function(res) { - commit('theme', res.content); - uni.setStorageSync($storageKey.theme_color, res.content); - }).catch(function(err) { - console.error(err); - }); + $heshop + .fitment('post', { + keyword: 'themeColor' + }) + .then(function (res) { + commit('theme', res.content); + uni.setStorageSync($storageKey.theme_color, res.content); + }) + .catch(function (err) { + console.error(err); + }); } }, - getTabBar: function({ commit }) { + getTabBar: function ({ commit }) { return new Promise((resolve, reject) => { let $heshop = this._vm.$heshop; let $storageKey = this._vm.$storageKey; @@ -165,41 +172,51 @@ const setting = { commit('tabBar', uni.getStorageSync($storageKey.tab_bar)); resolve(); } else { - $heshop.fitment('post', { - keyword: 'tabbar' - }).then(function(res) { - let data = JSON.parse(res.content); - commit('tabBar', data); - uni.setStorageSync($storageKey.tab_bar, data); - resolve(); - }).catch(function(err) { - console.error(err); - reject(); - }); + $heshop + .fitment('post', { + keyword: 'tabbar' + }) + .then(function (res) { + let data = JSON.parse(res.content); + commit('tabBar', data); + uni.setStorageSync($storageKey.tab_bar, data); + resolve(); + }) + .catch(function (err) { + console.error(err); + reject(); + }); } - }) + }); }, - getAddress: function({ commit }) { + getAddress: function ({ commit }) { let $heshop = this._vm.$heshop; let $storageKey = this._vm.$storageKey; if (uni.getStorageSync($storageKey.address_json)) { commit('addressJson', uni.getStorageSync($storageKey.address_json)); } else { - $heshop.search('post', { include: 'setting' }, { - keyword: 'addressjson', - content_key: '' - }).then(function(res) { - commit('addressJson', res); - uni.setStorageSync($storageKey.address_json, res); - }).catch(function(err) { - console.error(err); - }); + $heshop + .search( + 'post', + { include: 'setting' }, + { + keyword: 'addressjson', + content_key: '' + } + ) + .then(function (res) { + commit('addressJson', res); + uni.setStorageSync($storageKey.address_json, res); + }) + .catch(function (err) { + console.error(err); + }); } }, - subscribe: function({ commit }) { + subscribe: function ({ commit }) { let $heshop = this._vm.$heshop; - $heshop.subscribe('get').then(function(response) { - console.log("response-subscribe", response) + $heshop.subscribe('get').then(function (response) { + console.log('response-subscribe', response); commit('subscribe', response); }); } diff --git a/src/store/user.js b/src/store/user.js index 855867b..edc0230 100644 --- a/src/store/user.js +++ b/src/store/user.js @@ -1,241 +1,244 @@ const user = { - namespaced: true, - state: { - userInfo: null, - orderTotal: { - noevaluate: 0, - orderafter: 0, - unpaid: 0, - unreceived: 0, - unsent: 0 - }, - shippingAddress: [], - couponTotal: 0 + namespaced: true, + state: { + userInfo: null, + orderTotal: { + noevaluate: 0, + orderafter: 0, + unpaid: 0, + unreceived: 0, + unsent: 0 }, - mutations: { - userInfo(state, data) { - uni.setStorageSync('userInfo', data); - state.userInfo = data; - }, - orderTotal(state, data) { - state.orderTotal = data; - }, - shippingAddress(state, data) { - state.shippingAddress = data; - }, - couponTotal(state, data) { - state.couponTotal = data; - } + shippingAddress: [], + couponTotal: 0 + }, + mutations: { + userInfo(state, data) { + uni.setStorageSync('userInfo', data); + state.userInfo = data; }, - getters: { - userInfo: function (state) { - return state.userInfo; - }, - orderTotal: function (state) { - return state.orderTotal; - }, - getAddress: function (state) { - return state.shippingAddress; - }, - couponTotal: function (state) { - return state.couponTotal; - } + orderTotal(state, data) { + state.orderTotal = data; }, - actions: { - decryptUserInfo: function ({ - dispatch, - commit - }) { - let $heshop = this._vm.$heshop; - let $pageURL = this._vm.$pageURL; - let _this = this._vm; - return new Promise((resolve, reject) => { - // #ifndef H5 - uni.login({ - provider: 'weixin', - success: function (loginRes) { - uni.getUserInfo({ - success: function (res) { - $heshop.login("post", "weapp", { - code: loginRes.code, - iv: res.iv, - encryptedData: res.encryptedData - }).then(function (res) { - dispatch('visit'); - commit('apply/login', res, { - root: true - }); - resolve(); - }); - } - }); - } - }); - // #endif - // #ifdef H5 - let page = getCurrentPages()[getCurrentPages().length - 2]; - let route = '/pages/user/index'; - if (page) { - route = '/' + page.route; - let query = '?' - for (let key in page.options) { - query += `${key}=${page.options[key]}&` - } - query = query.slice(0, query.length - 1); - route = route + query; - } - let url = $pageURL + '&_skip=' + route; - $heshop.login("post", { - type: 'wechat', - include: 'login_url', - url: url, - scope: 'snsapi_userinfo' - }).then(function (res) { - document.location.replace(res.url); - }).catch(function (error) { - _this.$toError(error); - }); - // #endif - }) - }, - getUserProfile: function ({ - dispatch, - commit - }) { - return new Promise((resolve, reject) => { - let $heshop = this._vm.$heshop; - uni.login({ - provider: 'weixin', - success: function () { - - } - }); - uni.getUserProfile({ - lang: "zh_CN", - desc: '授权', - success: function (res) { - uni.login({ - provider: 'weixin', - success: function (loginRes) { - $heshop.login("post", "weapp", { - code: loginRes.code, - iv: res.iv, - encryptedData: res.encryptedData - }).then(function (res) { - dispatch('visit'); - commit('apply/login', res, { - root: true - }); - resolve(); - }).catch(function (error) { - console.error(error); - reject(); - }); - } - }); - } - }); - }) - }, - visit: function () { - if (uni.getStorageSync('token')) { - let $heshop = this._vm.$heshop; - $heshop.users('get', { - behavior: 'visit' - }).then(function () { - }).catch(function (err) { }); - } - }, - getOrderTotal: function ({ - commit - }) { - let $heshop = this._vm.$heshop; - $heshop.order('get', { - behavior: 'tabcount' - }).then(function (res) { - commit('orderTotal', res); - }).catch(function (err) { - console.error(err); + shippingAddress(state, data) { + state.shippingAddress = data; + }, + couponTotal(state, data) { + state.couponTotal = data; + } + }, + getters: { + userInfo: function (state) { + return state.userInfo; + }, + orderTotal: function (state) { + return state.orderTotal; + }, + getAddress: function (state) { + return state.shippingAddress; + }, + couponTotal: function (state) { + return state.couponTotal; + } + }, + actions: { + decryptUserInfo: function ({ dispatch, commit }) { + let $heshop = this._vm.$heshop; + let $pageURL = this._vm.$pageURL; + let _this = this._vm; + return new Promise((resolve, reject) => { + // #ifndef H5 + uni.login({ + provider: 'weixin', + success: function (loginRes) { + uni.getUserInfo({ + success: function (res) { + $heshop + .login('post', 'weapp', { + code: loginRes.code, + iv: res.iv, + encryptedData: res.encryptedData + }) + .then(function (res) { + dispatch('visit'); + commit('apply/login', res, { + root: true + }); + resolve(); + }); + } }); - }, + } + }); + // #endif // #ifdef H5 - weChatLogin: function ({ - commit, - dispatch - }, options) { - if (!options.code) return; - let $heshop = this._vm.$heshop; - return new Promise(function (resolve, reject) { - $heshop.login('post', { - type: "wechat", - include: "login" - }, { - code: options.code - }).then(function (res) { + let page = getCurrentPages()[getCurrentPages().length - 2]; + let route = '/pages/user/index'; + if (page) { + route = '/' + page.route; + let query = '?'; + for (let key in page.options) { + query += `${key}=${page.options[key]}&`; + } + query = query.slice(0, query.length - 1); + route = route + query; + } + let url = $pageURL + '&_skip=' + route; + $heshop + .login('post', { + type: 'wechat', + include: 'login_url', + url: url, + scope: 'snsapi_userinfo' + }) + .then(function (res) { + document.location.replace(res.url); + }) + .catch(function (error) { + _this.$toError(error); + }); + // #endif + }); + }, + getUserProfile: function ({ dispatch, commit }) { + return new Promise((resolve, reject) => { + let $heshop = this._vm.$heshop; + uni.login({ + provider: 'weixin', + success: function () {} + }); + uni.getUserProfile({ + lang: 'zh_CN', + desc: '授权', + success: function (res) { + uni.login({ + provider: 'weixin', + success: function (loginRes) { + $heshop + .login('post', 'weapp', { + code: loginRes.code, + iv: res.iv, + encryptedData: res.encryptedData + }) + .then(function (res) { + dispatch('visit'); commit('apply/login', res, { - root: true + root: true }); - dispatch('visit'); resolve(); - }).catch(function () { + }) + .catch(function (error) { + console.error(error); reject(); - }); - }) - }, - // #endif - getAddress: function ({ - commit, - state - }) { - let $heshop = this._vm.$heshop; - let $h = this._vm.$h; - if ($h.test.isEmpty(state.shippingAddress)) { - $heshop.address('get').then(function (res) { - let data = res; - data.forEach(function (item) { - item.is_select = false; - }); - commit('shippingAddress', data); - }).catch(function (err) { - console.error(err); - }); + }); + } + }); + } + }); + }); + }, + visit: function () { + if (uni.getStorageSync('token')) { + let $heshop = this._vm.$heshop; + $heshop + .users('get', { + behavior: 'visit' + }) + .then(function () {}) + .catch(function (err) {}); + } + }, + getOrderTotal: function ({ commit }) { + let $heshop = this._vm.$heshop; + $heshop + .order('get', { + behavior: 'tabcount' + }) + .then(function (res) { + commit('orderTotal', res); + }) + .catch(function (err) { + console.error(err); + }); + }, + // #ifdef H5 + weChatLogin: function ({ commit, dispatch }, options) { + if (!options.code) return; + let $heshop = this._vm.$heshop; + return new Promise(function (resolve, reject) { + $heshop + .login( + 'post', + { + type: 'wechat', + include: 'login' + }, + { + code: options.code } - }, - // #ifndef H5 - authLogin: function () { - uni.checkSession({ - success: function () { - }, - fail: function () { - uni.login({ - provider: 'weixin', - scopes: 'auth_base', - success: function () { - }, - fail: function () { - } - }); - }, - complete: function () { } + ) + .then(function (res) { + commit('apply/login', res, { + root: true }); - }, - // #endif - getCouponTotal: function ({ - commit - }) { - let $heshop = this._vm.$heshop; - $heshop.coupon('get', { - behavior: 'tabcount' - }).then(function (res) { - commit('couponTotal', res.can_use_coupon_num); - }).catch(function (err) { - console.error(err); + dispatch('visit'); + resolve(); + }) + .catch(function () { + reject(); + }); + }); + }, + // #endif + getAddress: function ({ commit, state }) { + let $heshop = this._vm.$heshop; + let $h = this._vm.$h; + if ($h.test.isEmpty(state.shippingAddress)) { + $heshop + .address('get') + .then(function (res) { + let data = res; + data.forEach(function (item) { + item.is_select = false; }); + commit('shippingAddress', data); + }) + .catch(function (err) { + console.error(err); + }); + } + }, + // #ifndef H5 + authLogin: function () { + uni.checkSession({ + success: function () {}, + fail: function () { + uni.login({ + provider: 'weixin', + scopes: 'auth_base', + success: function () {}, + fail: function () {} + }); }, - bindPhone: function ({ }) { - - } - } + complete: function () {} + }); + }, + // #endif + getCouponTotal: function ({ commit }) { + let $heshop = this._vm.$heshop; + $heshop + .coupon('get', { + behavior: 'tabcount' + }) + .then(function (res) { + commit('couponTotal', res.can_use_coupon_num); + }) + .catch(function (err) { + console.error(err); + }); + }, + bindPhone: function ({}) {} + } }; -export default user; \ No newline at end of file +export default user; diff --git a/src/uni.scss b/src/uni.scss index 9b69e3b..3f53d9a 100644 --- a/src/uni.scss +++ b/src/uni.scss @@ -1,47 +1,47 @@ /* start--主题色--start */ $themes: ( - red_theme: ( - font_color: #E60B30, - background_color: #E60B30, - border_color: #E60B30, - opacify_background_0: rgba(230, 11, 48, 0.05), - ), - purple_theme: ( - font_color: #8F2DF3, - background_color: #8F2DF3, - border_color: #8F2DF3, - opacify_background_0: rgba(143, 45, 243, 0.05), - ), - blue_theme: ( - font_color: #33A7FF, - background_color: #33A7FF, - border_color: #33A7FF, - opacify_background_0: rgba(51, 167, 255, 0.05), - ), - green_theme: ( - font_color: #1FC551, - background_color: #1FC551, - border_color: #1FC551, - opacify_background_0: rgba(31, 197, 81, 0.05), - ), - orange_theme: ( - font_color: #FF7F00, - background_color: #FF7F00, - border_color: #FF7F00, - opacify_background_0: rgba(255, 127, 0, 0.05), - ), - golden_theme: ( - font_color: #CAA45A, - background_color: #CAA45A, - border_color: #CAA45A, - opacify_background_0: rgba(202, 164, 90, 0.05), - ) + red_theme: ( + font_color: #e60b30, + background_color: #e60b30, + border_color: #e60b30, + opacify_background_0: rgba(230, 11, 48, 0.05) + ), + purple_theme: ( + font_color: #8f2df3, + background_color: #8f2df3, + border_color: #8f2df3, + opacify_background_0: rgba(143, 45, 243, 0.05) + ), + blue_theme: ( + font_color: #33a7ff, + background_color: #33a7ff, + border_color: #33a7ff, + opacify_background_0: rgba(51, 167, 255, 0.05) + ), + green_theme: ( + font_color: #1fc551, + background_color: #1fc551, + border_color: #1fc551, + opacify_background_0: rgba(31, 197, 81, 0.05) + ), + orange_theme: ( + font_color: #ff7f00, + background_color: #ff7f00, + border_color: #ff7f00, + opacify_background_0: rgba(255, 127, 0, 0.05) + ), + golden_theme: ( + font_color: #caa45a, + background_color: #caa45a, + border_color: #caa45a, + opacify_background_0: rgba(202, 164, 90, 0.05) + ) ); //遍历主题map @mixin themeify { @each $theme-name, $theme-map in $themes { $theme-map: $theme-map !global; - [data-theme="#{$theme-name}"] & { + [data-theme='#{$theme-name}'] & { @content; } } @@ -54,28 +54,28 @@ $themes: ( //获取背景颜色 @mixin background_color($color) { @include themeify { - background-color: themed($color)!important; + background-color: themed($color) !important; } } //获取渐变背景颜色 @mixin background_linear($color, $deg, $min, $max) { - @include themeify { - background: linear-gradient($deg, themed($color) $min, themed($color) $max) !important; - } + @include themeify { + background: linear-gradient($deg, themed($color) $min, themed($color) $max) !important; + } } //获取字体颜色 @mixin font_color($color) { @include themeify { - color: themed($color)!important; + color: themed($color) !important; } } //获取边框颜色 @mixin border_color($color) { @include themeify { - border-color: themed($color)!important; + border-color: themed($color) !important; } } -/* end--主题色--end */ \ No newline at end of file +/* end--主题色--end */ diff --git a/src/utils/index.js b/src/utils/index.js index 706e428..4fb5c53 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,17 +1,16 @@ - function doPreviewImage(url, images) { - uni.previewImage({ - urls: images, - current: url, - fail: function f(e) { - uni.showToast({ - title: '预览图片失败', - icon: 'none' - }); - } - }); + uni.previewImage({ + urls: images, + current: url, + fail: function f(e) { + uni.showToast({ + title: '预览图片失败', + icon: 'none' + }); + } + }); } export default { - doPreviewImage -} + doPreviewImage +}; diff --git a/src/utils/storageKey.js b/src/utils/storageKey.js index 363db57..e59c71a 100644 --- a/src/utils/storageKey.js +++ b/src/utils/storageKey.js @@ -1,13 +1,13 @@ export default { - address: 'address', - setting: 'setting', - plugins: 'plugins', - address_submit: 'address_submit', - cart_add: 'cart_add', - comments_submit: 'comments_submit', - evaluation_post: 'evaluation_post', - theme_color: 'theme_color', - tab_bar: 'tab_bar', - address_json: 'address_json', - shipping_address: 'shipping_address' -} \ No newline at end of file + address: 'address', + setting: 'setting', + plugins: 'plugins', + address_submit: 'address_submit', + cart_add: 'cart_add', + comments_submit: 'comments_submit', + evaluation_post: 'evaluation_post', + theme_color: 'theme_color', + tab_bar: 'tab_bar', + address_json: 'address_json', + shipping_address: 'shipping_address' +}; diff --git a/src/utils/zIndex.js b/src/utils/zIndex.js index 98aa861..72062d7 100644 --- a/src/utils/zIndex.js +++ b/src/utils/zIndex.js @@ -1,10 +1,10 @@ export default { - toast: 10090, - noNetwork: 10080, - popup: 10075, - mask: 10070, - navbar: 980, - topTips: 975, - sticky: 970, - indexListSticky: 965, -} \ No newline at end of file + toast: 10090, + noNetwork: 10080, + popup: 10075, + mask: 10070, + navbar: 980, + topTips: 975, + sticky: 970, + indexListSticky: 965 +}; diff --git a/src/version.js b/src/version.js index 5d1d835..509fa55 100644 --- a/src/version.js +++ b/src/version.js @@ -1 +1 @@ -module.exports = '1.1.0'; \ No newline at end of file +module.exports = '1.1.0'; diff --git a/vue.config.js b/vue.config.js index 3214cd0..3f274f4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,10 +1,3 @@ -/* - * @Description: - * @Author: qinuoyun - * @Date: 2020-11-23 16:45:10 - * @LastEditTime: 2021-05-25 09:09:09 - * @LastEditors: fjt - */ const path = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin'); //最新版本copy-webpack-plugin插件暂不兼容,推荐v5.0.0 -- Gitee From 5df96dc5009834171da459cada43b739c5f9ab09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=A6=E4=BF=8A=E6=B6=9B?= <18258134916@163.com> Date: Wed, 4 Aug 2021 16:54:44 +0800 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20=E7=89=88=E6=9D=83=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 126 ++++++++++----------- src/pages/user/components/he-copyright.vue | 50 +++++--- src/siteinfo.js | 4 +- src/store/setting.js | 3 + 4 files changed, 100 insertions(+), 83 deletions(-) diff --git a/public/index.html b/public/index.html index 590316e..4e1b4d5 100644 --- a/public/index.html +++ b/public/index.html @@ -1,71 +1,71 @@ - - - - + + + + <%= htmlWebpackPlugin.options.title %> - - + + - - -
- - - + + +
+ + + diff --git a/src/pages/user/components/he-copyright.vue b/src/pages/user/components/he-copyright.vue index 62805b9..f181b6f 100644 --- a/src/pages/user/components/he-copyright.vue +++ b/src/pages/user/components/he-copyright.vue @@ -1,33 +1,49 @@ \ No newline at end of file + diff --git a/src/siteinfo.js b/src/siteinfo.js index 6a1e13e..ba07f51 100644 --- a/src/siteinfo.js +++ b/src/siteinfo.js @@ -1,5 +1,3 @@ module.exports = { - // siteroot: 'https://test.leadshop.vip/index.php' - siteroot: 'https://dev.91bd.cn/index.php' - // siteroot: 'http://localhost:8080/index.php' + siteroot: 'http://localhost:8080/index.php' }; diff --git a/src/store/setting.js b/src/store/setting.js index c1f324a..3d9bcc8 100644 --- a/src/store/setting.js +++ b/src/store/setting.js @@ -105,6 +105,9 @@ const setting = { }, getOpeningad: function (state) { return state.setting.openingad; + }, + getCopyright(state) { + return state.setting.copyright_information; } }, actions: { -- Gitee From 6715f02eeeef8856c7d18502ca221e30e857c312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=A6=E4=BF=8A=E6=B6=9B?= <18258134916@163.com> Date: Thu, 12 Aug 2021 09:26:20 +0800 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=E5=90=88=E5=B9=B6=E6=8B=86?= =?UTF-8?q?=E5=8D=95=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 99 -- package.json | 1 + public/index.html | 126 +- src/App.vue | 1 + src/colorui/icon.css | 26 +- src/components/he-cart.vue | 354 ++-- src/components/he-login-layout.vue | 166 ++ src/components/he-number-box.vue | 3 + src/components/he-open-subscribe.vue | 38 +- src/components/he-select-address.vue | 32 +- src/leadshop/code/request.js | 19 +- src/leadshop/code/router.js | 3 + src/leadshop/router/index.js | 19 +- src/leadshop/store/apply.js | 12 +- src/main.js | 32 +- src/manifest.json | 7 + src/pages.json | 6 + src/pages/fitment/task/task.vue | 2 +- src/pages/goods/components/detail-args.vue | 14 +- src/pages/goods/components/detail-banner.vue | 481 +++--- .../components/detail-basic-information.vue | 20 +- .../goods/components/detail-bottom-button.vue | 453 +++-- .../goods/components/detail-free-shipping.vue | 190 ++- .../goods/components/detail-parameter.vue | 61 +- src/pages/goods/components/detail-service.vue | 158 +- .../components/detail-shipping-address.vue | 282 ++-- .../goods/components/detail-skeleton.vue | 443 +++-- src/pages/goods/components/detail-task.vue | 56 +- src/pages/goods/detail.vue | 4 +- .../order/components/detail-logistics.vue | 139 +- src/pages/order/detail.vue | 13 +- src/pages/order/logistics.vue | 9 +- src/pages/order/package.vue | 199 +++ src/pages/user/components/he-copyright.vue | 16 +- src/pages/user/components/user-features.vue | 4 +- src/pages/user/components/user-top.vue | 202 +-- src/pages/user/index.vue | 5 +- src/siteinfo.js | 5 +- src/static/h5/js/wechat.js | 19 +- src/static/mp-weixin/js/qqmap-wx-jssdk.js | 1504 +++++++++-------- src/static/mp-weixin/js/qqmap-wx-jssdk.min.js | 802 ++++++++- src/store/setting.js | 86 +- 42 files changed, 3819 insertions(+), 2292 deletions(-) create mode 100644 src/components/he-login-layout.vue create mode 100644 src/pages/order/package.vue diff --git a/package-lock.json b/package-lock.json index 59f0dd0..99b64c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3060,7 +3060,6 @@ "thread-loader": "^2.1.3", "url-loader": "^2.2.0", "vue-loader": "^15.9.2", - "vue-loader-v16": "npm:vue-loader@^16.0.0-beta.7", "vue-style-loader": "^4.1.2", "webpack": "^4.0.0", "webpack-bundle-analyzer": "^3.8.0", @@ -16164,104 +16163,6 @@ "vue-style-loader": "^4.1.0" } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.3.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.3.0.tgz", - "integrity": "sha512-UDgni/tUVSdwHuQo+vuBmEgamWx88SuSlEb5fgdvHrlJSPB9qMBRF6W7bfPWSqDns425Gt1wxAUif+f+h/rWjg==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "dev": true, - "optional": true - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "optional": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-router": { "version": "3.4.9", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.9.tgz", diff --git a/package.json b/package.json index ad83dc2..f64f705 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "regenerator-runtime": "^0.12.1", "sortablejs": "^1.13.0", "vue": "^2.6.11", + "vue-jsonp": "^2.0.0", "vue-lazyload": "^1.3.3", "vue-router": "^3.4.9", "vuex": "^3.6.0" diff --git a/public/index.html b/public/index.html index 4e1b4d5..585481d 100644 --- a/public/index.html +++ b/public/index.html @@ -1,71 +1,71 @@ - - - - + + + + <%= htmlWebpackPlugin.options.title %> - - + + - - -
- - - + + +
+ + + diff --git a/src/App.vue b/src/App.vue index d6e50d8..19fedc8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -38,6 +38,7 @@ export default { this.$store.dispatch('user/visit'); // 获取商城设置 this.$store.dispatch('setting/getSetting'); + this.$store.dispatch('setting/getAuth'); // 获取主题色 this.$store.dispatch('setting/getTheme'); // #ifndef H5 diff --git a/src/colorui/icon.css b/src/colorui/icon.css index b7acd81..ec2ad1e 100644 --- a/src/colorui/icon.css +++ b/src/colorui/icon.css @@ -30,9 +30,9 @@ @font-face { font-family: 'iconfont'; /* Project id 2111115 */ - src: url('//at.alicdn.com/t/font_2111115_dpap8l2ayc8.woff2?t=1625016472123') format('woff2'), - url('//at.alicdn.com/t/font_2111115_dpap8l2ayc8.woff?t=1625016472123') format('woff'), - url('//at.alicdn.com/t/font_2111115_dpap8l2ayc8.ttf?t=1625016472123') format('truetype'); + src: url('//at.alicdn.com/t/font_2111115_m114knhnos.woff2?t=1628656164424') format('woff2'), + url('//at.alicdn.com/t/font_2111115_m114knhnos.woff?t=1628656164424') format('woff'), + url('//at.alicdn.com/t/font_2111115_m114knhnos.ttf?t=1628656164424') format('truetype'); } .iconfont { @@ -43,6 +43,26 @@ -moz-osx-font-smoothing: grayscale; } +.iconbaoguo:before { + content: '\e6db'; +} + +.icondynamic_release:before { + content: '\e6da'; +} + +.iconfold1:before { + content: '\e6d9'; +} + +.iconfenxiaozhuangshi:before { + content: '\e6d6'; +} + +.iconshuzishanchu:before { + content: '\e6d1'; +} + .iconpopup_close2:before { content: '\e6d0'; } diff --git a/src/components/he-cart.vue b/src/components/he-cart.vue index af4fad6..18fea64 100644 --- a/src/components/he-cart.vue +++ b/src/components/he-cart.vue @@ -28,25 +28,50 @@ {{ item.name }} - {{ value.value }} + value.is_select ? 'he-attr__select' : '' + ]" + :key="valueIndex" + >{{ value.value }} - + @@ -55,14 +80,28 @@ - 数量 + 数量 (限兑{{ limitTaskNum }}{{ goods.unit }}) - 数量 + 数量 ({{ minNumber }}{{ goods.unit }}起购) - - + + @@ -71,45 +110,35 @@ - + - + diff --git a/src/components/he-login-layout.vue b/src/components/he-login-layout.vue new file mode 100644 index 0000000..5b5d9e2 --- /dev/null +++ b/src/components/he-login-layout.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/components/he-number-box.vue b/src/components/he-number-box.vue index d1981ae..649e028 100644 --- a/src/components/he-number-box.vue +++ b/src/components/he-number-box.vue @@ -209,6 +209,7 @@ export default { return ((num1 * baseNum - num2 * baseNum) / baseNum).toFixed(precision); }, computeVal(type) { + console.log(this.max); try { if (!this.disabledInput) uni.hideKeyboard(); if (this.disabled) return; @@ -220,9 +221,11 @@ export default { value = this.calcPlus(this.inputVal, this.step); } value = +value; + console.log(value); if (value < this.min || value > this.max) { return; } + console.log('占内存'); this.inputVal = value; this.handleChange(value, type); } catch (e) {} diff --git a/src/components/he-open-subscribe.vue b/src/components/he-open-subscribe.vue index b90c159..8b5c43e 100644 --- a/src/components/he-open-subscribe.vue +++ b/src/components/he-open-subscribe.vue @@ -1,23 +1,26 @@ + + \ No newline at end of file + diff --git a/src/pages/goods/components/detail-basic-information.vue b/src/pages/goods/components/detail-basic-information.vue index 67781a7..5755f50 100644 --- a/src/pages/goods/components/detail-basic-information.vue +++ b/src/pages/goods/components/detail-basic-information.vue @@ -4,8 +4,10 @@ {{ task.task_number }}积分+¥{{ task.task_price }} + >{{ task.task_number }} + 积分+¥ + {{ task.task_price }} + {{ price }} ¥{{ linePrice }} @@ -31,7 +33,7 @@ - + @@ -48,6 +50,7 @@ + + \ No newline at end of file + diff --git a/src/pages/goods/components/detail-free-shipping.vue b/src/pages/goods/components/detail-free-shipping.vue index 725edaa..53f22e9 100644 --- a/src/pages/goods/components/detail-free-shipping.vue +++ b/src/pages/goods/components/detail-free-shipping.vue @@ -1,122 +1,130 @@ \ No newline at end of file + diff --git a/src/pages/goods/components/detail-parameter.vue b/src/pages/goods/components/detail-parameter.vue index 0815242..9884fdd 100644 --- a/src/pages/goods/components/detail-parameter.vue +++ b/src/pages/goods/components/detail-parameter.vue @@ -4,18 +4,18 @@ 规格 - {{ - select ? '已选择:' + select.param_value.split('_').join('/') : '请选择' - }} + {{ select ? '已选择:' + select.param_value.split('_').join('/') : '请选择' }} + 运费 - {{ - shipping ? '送至' + shipping : '请先选择配送地址' - }} + {{ shipping ? '送至' + shipping : '请先选择配送地址' }} + @@ -56,12 +56,14 @@ + + \ No newline at end of file + diff --git a/src/pages/goods/components/detail-shipping-address.vue b/src/pages/goods/components/detail-shipping-address.vue index ee44a1b..e4e2407 100644 --- a/src/pages/goods/components/detail-shipping-address.vue +++ b/src/pages/goods/components/detail-shipping-address.vue @@ -1,192 +1,192 @@ + \ No newline at end of file + diff --git a/src/pages/goods/components/detail-skeleton.vue b/src/pages/goods/components/detail-skeleton.vue index bc79d24..7c29a8d 100644 --- a/src/pages/goods/components/detail-skeleton.vue +++ b/src/pages/goods/components/detail-skeleton.vue @@ -1,236 +1,337 @@ - \ No newline at end of file + diff --git a/src/pages/goods/components/detail-task.vue b/src/pages/goods/components/detail-task.vue index fb26ebd..831e205 100644 --- a/src/pages/goods/components/detail-task.vue +++ b/src/pages/goods/components/detail-task.vue @@ -2,11 +2,10 @@ - + 活动 - - {{getShowTextInfo(taskList)}} + {{ getShowTextInfo(taskList) }}
@@ -14,24 +13,23 @@
+ diff --git a/src/pages/goods/detail.vue b/src/pages/goods/detail.vue index 5288d53..4150e4f 100644 --- a/src/pages/goods/detail.vue +++ b/src/pages/goods/detail.vue @@ -127,6 +127,7 @@ import heNavbar from '../../components/he-navbar.vue'; import { mapGetters } from 'vuex'; import taskpopups from '@/plugins/task/components/popups.vue'; import taskbrowse from '@/plugins/task/components/browse.vue'; + export default { name: 'detail', components: { @@ -148,7 +149,6 @@ export default { }, computed: { ...mapGetters('setting', { - address: 'getLocation', goodsSetting: 'goodsSetting', navbarHeight: 'getNavBarHeight', statusBarHeight: 'statusBarHeight' @@ -190,6 +190,7 @@ export default { onShow() { console.log(this.task_browse); this.handleTaskBrowseLog(); + // console.log(this.address); }, data() { return { @@ -360,6 +361,7 @@ export default { } }, onLoad(options) { + console.count('onload'); this.task_browse = options.task_browse ? options.task_browse : null; this.copy_task_browse = this.task_browse; this.popupsList = []; diff --git a/src/pages/order/components/detail-logistics.vue b/src/pages/order/components/detail-logistics.vue index 7fd9d2c..d782abd 100644 --- a/src/pages/order/components/detail-logistics.vue +++ b/src/pages/order/components/detail-logistics.vue @@ -1,114 +1,87 @@ \ No newline at end of file + diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue index 1818451..ff78bb3 100644 --- a/src/pages/order/detail.vue +++ b/src/pages/order/detail.vue @@ -11,10 +11,9 @@ diff --git a/src/pages/order/package.vue b/src/pages/order/package.vue new file mode 100644 index 0000000..6b91c7c --- /dev/null +++ b/src/pages/order/package.vue @@ -0,0 +1,199 @@ + + + + + diff --git a/src/pages/user/components/he-copyright.vue b/src/pages/user/components/he-copyright.vue index f181b6f..81c95a6 100644 --- a/src/pages/user/components/he-copyright.vue +++ b/src/pages/user/components/he-copyright.vue @@ -1,10 +1,10 @@ diff --git a/src/pages/fitment/coupon/coupon.vue b/src/pages/fitment/coupon/coupon.vue index d90f2c5..69e023b 100644 --- a/src/pages/fitment/coupon/coupon.vue +++ b/src/pages/fitment/coupon/coupon.vue @@ -174,9 +174,7 @@ export default { }); // #endif } else { - uni.navigateTo({ - url: '/pages/user/login' - }); + this.$store.commit('apply/setLoginModel', true); } } } diff --git a/src/pages/goods/components/detail-task.vue b/src/pages/goods/components/detail-task.vue index 831e205..647866f 100644 --- a/src/pages/goods/components/detail-task.vue +++ b/src/pages/goods/components/detail-task.vue @@ -1,15 +1,10 @@ @@ -76,32 +71,13 @@ export default { } }; + diff --git a/src/pages/goods/detail.vue b/src/pages/goods/detail.vue index 4150e4f..a413915 100644 --- a/src/pages/goods/detail.vue +++ b/src/pages/goods/detail.vue @@ -108,6 +108,7 @@ + - - + + - - -
- - - + + +
+ + + diff --git a/src/components/he-cart.vue b/src/components/he-cart.vue index 9b92fab..bdde207 100644 --- a/src/components/he-cart.vue +++ b/src/components/he-cart.vue @@ -506,7 +506,7 @@ export default { if (err.status === 401) { _this.$store.commit('apply/setLoginModel', true); } - _this.$h.toast(err.data.message); + // _this.$h.toast(err.data.message); }); }, buy: function () { diff --git a/src/components/he-login-layout.vue b/src/components/he-login-layout.vue index 6e8c52f..a0b8ad6 100644 --- a/src/components/he-login-layout.vue +++ b/src/components/he-login-layout.vue @@ -100,6 +100,10 @@ export default { }); }, 1000); this.$store.commit('apply/setLoginModel', false); + // console.log() + if (this.$parent.__route__ === 'pages/user/index' || this.$parent.__route__ === 'pages/cart/index') { + this.$parent.getShowData(); + } }); } else { this.decryptUserInfo().then(() => { @@ -132,9 +136,15 @@ export default { }); }, 1000); this.$store.commit('apply/setLoginModel', false); + if (this.$parent.__route__ === 'pages/user/index' || this.$parent.__route__ === 'pages/cart/index') { + this.$parent.getShowData(); + } }); } } + }, + mounted() { + console.log(this.$parent); } }; diff --git a/src/main.js b/src/main.js index 1eb1604..7367f21 100644 --- a/src/main.js +++ b/src/main.js @@ -141,6 +141,7 @@ const app = new Vue({ '/pages/coupon/detail', '/plugins/task/mall', '/pages/live/index', + '/pages/cart/index', '/pages/index/demo' ], loginPage: '/pages/user/login' diff --git a/src/manifest.json b/src/manifest.json index e3fab79..592bd91 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -13,7 +13,8 @@ "enable": false }, "app-plus": { - /* 5+App特有相关 */ "usingComponents": true, + /* 5+App特有相关 */ + "usingComponents": true, "splashscreen": { "alwaysShowBeforeRender": true, "waiting": true, @@ -64,7 +65,8 @@ /* 快应用特有相关 */ }, "mp-weixin": { - /* 微信小程序特有相关 */ "appid": "", + /* 微信小程序特有相关 */ + "appid": "", "setting": { "urlCheck": false }, diff --git a/src/pages/goods/components/detail-bottom-button.vue b/src/pages/goods/components/detail-bottom-button.vue index 247535f..59db580 100644 --- a/src/pages/goods/components/detail-bottom-button.vue +++ b/src/pages/goods/components/detail-bottom-button.vue @@ -125,19 +125,21 @@ export default { } }, mounted() { - this.$store.dispatch('cart/getCartNumber').then(response => { - if (response !== 0) { - this.isNaNBool = true; - } else { - this.isNaNBool = false; - } - this.badge = response + ''; - }); + if (this.isLogin) { + this.$store.dispatch('cart/getCartNumber').then(response => { + if (response !== 0) { + this.isNaNBool = true; + } else { + this.isNaNBool = false; + } + this.badge = response + ''; + }); + } }, watch: { '$store.state.cart.cart_num': { handler(val) { - if (val) { + if (val && this.isLogin) { this.$store.dispatch('cart/getCartNumber').then(response => { if (response !== 0) { this.isNaNBool = true; diff --git a/src/pages/goods/components/detail-task.vue b/src/pages/goods/components/detail-task.vue index 647866f..7d9afa1 100644 --- a/src/pages/goods/components/detail-task.vue +++ b/src/pages/goods/components/detail-task.vue @@ -40,6 +40,7 @@ export default { * @return {[type]} [description] */ getShowTextInfo(taskList) { + console.log(taskList); let a = taskList['goods'].status; let b = taskList['order'].status; let text = ''; @@ -60,7 +61,7 @@ export default { */ handleTaskList() { this.$heshop - .plugin('get', { include: 'task', model: 'task' }) + .plugin('get', { include: 'task', model: 'task', goods_info: 1 }) .then(res => { this.taskList = res; }) diff --git a/src/pages/goods/detail.vue b/src/pages/goods/detail.vue index a413915..4b5dc7e 100644 --- a/src/pages/goods/detail.vue +++ b/src/pages/goods/detail.vue @@ -191,7 +191,7 @@ export default { } }, onShow() { - if (this.isLogin) { + if (this.$store.state.apply.is_login) { this.handleTaskBrowseLog(); } }, diff --git a/src/pages/order/components/detail-logistics.vue b/src/pages/order/components/detail-logistics.vue index d782abd..d6511bf 100644 --- a/src/pages/order/components/detail-logistics.vue +++ b/src/pages/order/components/detail-logistics.vue @@ -2,7 +2,7 @@ - {{ '订单被拆分为' + freight.length + '包裹' }} + {{ '订单被拆分为' + freight.length + '个包裹' }} diff --git a/src/pages/order/package.vue b/src/pages/order/package.vue index 6b91c7c..cf6055d 100644 --- a/src/pages/order/package.vue +++ b/src/pages/order/package.vue @@ -1,7 +1,7 @@ @@ -179,15 +179,19 @@ export default { } } .card__mid { - padding: 24px 0px 24px 0px; + padding: 24px 0 16px 0; .imgnext { width: 152px; height: 40px; - background: #000000; - opacity: 0.5; + background: rgba(0, 0, 0, 0.5); border-radius: 8px; z-index: 10; - margin-top: -40px; + //margin-top: -40px; + font-size: 22px; + font-family: PingFang SC; + color: #ffffff; + position: absolute; + bottom: 0; } } .card__down { diff --git a/src/pages/user/components/user-features.vue b/src/pages/user/components/user-features.vue index 16f1ed3..c9e42e6 100644 --- a/src/pages/user/components/user-features.vue +++ b/src/pages/user/components/user-features.vue @@ -184,8 +184,7 @@ export default { .then(res => { console.log('查看绑定手机号任务是否开启', res); if (res.status) { - // this.binding = res; - this.getTaskBinding(); + this.getTaskBinding(res); } }) .catch(err => { @@ -196,11 +195,10 @@ export default { * 获取获取设置状态 * @return {[type]} [description] */ - getTaskBinding() { + getTaskBinding(e = {}) { //用于单次提示 const value = uni.getStorageSync('statusTaskBinding'); if (value) { - this.binding = {}; return true; } this.$heshop @@ -209,18 +207,20 @@ export default { console.log('判断是否完成过该任务'); //判断如果存在的状态下 if (res && res.status === 0 && !this.is_binding) { + this.binding = {}; this.is_binding = true; this.popupsList.push({ display: true, remark: res.remark }); this.$parent.handleLoadData(); - this.binding = {}; uni.setStorageSync('statusTaskBinding', 1); } else if (res && res.status === 1) { this.binding = {}; + uni.setStorageSync('statusTaskBinding', 1); } else { //如果没有记录的状态下 + this.binding = e; this.setTaskBinding(); } }) @@ -270,12 +270,12 @@ export default { .plugin('get', { include: 'task', model: 'task', keyword: 'perfect' }) .then(res => { if (res.status) { - const value = uni.getStorageSync('statusTaskPerfect'); + // const value = uni.getStorageSync('statusTaskPerfect'); // 逻辑有问题 // if (!value) { // this.perfect = res; // } - this.getTaskPerfect(); + this.getTaskPerfect(res); } }) .catch(err => { @@ -286,11 +286,10 @@ export default { * 获取获取设置状态 * @return {[type]} [description] */ - getTaskPerfect() { + getTaskPerfect(e = {}) { //用于单次提示 const value = uni.getStorageSync('statusTaskPerfect'); if (value) { - this.perfect = {}; return true; } this.$heshop @@ -308,8 +307,10 @@ export default { uni.setStorageSync('statusTaskPerfect', 1); } else if (res && res.status === 1) { this.perfect = {}; + uni.setStorageSync('statusTaskPerfect', 1); } else { //如果没有记录的状态下 + this.perfect = e; this.setTaskPerfect(); } }) @@ -334,13 +335,14 @@ export default { .then(res => { console.log('重新执行用户绑定信息', res); if (res && res.msg) { - this.popupsList.push({ - display: true, - remark: res.msg - }); - this.$parent.handleLoadData(); - this.perfect = {}; - uni.setStorageSync('statusTaskPerfect', 1); + this.getTaskPerfect(); + // this.popupsList.push({ + // display: true, + // remark: res.msg + // }); + // this.$parent.handleLoadData(); + // this.perfect = {}; + // uni.setStorageSync('statusTaskPerfect', 1); } }) .catch(err => { diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue index 07da923..c58373e 100644 --- a/src/pages/user/index.vue +++ b/src/pages/user/index.vue @@ -242,25 +242,28 @@ export default { str = str.replace(/%s/, arg[i]); } return str; + }, + getShowData() { + if (this.isLogin) { + this.getOrderTotal(); + this.getCouponTotal(); + this.handleLoadData(); + this.setCartNumber(); + //处理积分领取 + this.popupsList = []; + this.handleTaskSign(); + + //延时执行数据 + setTimeout(() => { + this.$refs['features'].handleLoad(); + this.handleTaskInvite(); + }, 1000); + } + uni.login(); } }, onShow() { - if (this.isLogin) { - this.getOrderTotal(); - this.getCouponTotal(); - this.handleLoadData(); - this.setCartNumber(); - //处理积分领取 - this.popupsList = []; - this.handleTaskSign(); - - //延时执行数据 - setTimeout(() => { - this.$refs['features'].handleLoad(); - this.handleTaskInvite(); - }, 1000); - } - uni.login(); + this.getShowData(); } }; diff --git a/src/store/pages.js b/src/store/pages.js index 97f5442..9893cf6 100644 --- a/src/store/pages.js +++ b/src/store/pages.js @@ -16,7 +16,6 @@ const pages = { */ setAttribute(state, data) { let { index, key, value } = data; - let { status } = state; state.page[index][key] = JSON.parse(JSON.stringify(value)); }, /** @@ -80,10 +79,9 @@ const pages = { /** * 添加元件 * @param {[type]} state [description] - * @param {[type]} data [description] * @return {[type]} [description] */ - pushPagesComs(context, data) { + pushPagesComs(context) { let { dragIndex, coms, page, status, position } = context.state; let element = JSON.parse(JSON.stringify(coms)); //数据阻隔,否则在激活状态下,在顶部的增加数据会错乱 -- Gitee