From b77edd5181cc6cbad7c678163a112d9f5385a445 Mon Sep 17 00:00:00 2001 From: Devil Date: Wed, 7 Jul 2021 16:15:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AE=9D=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E9=80=82=E9=85=8D=E5=8F=AF=E8=A7=86=E5=8C=96=E8=A3=85?= =?UTF-8?q?=E4=BF=AE+=E5=A4=9A=E5=95=86=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sourcecode/alipay/default/app.js | 4 +- sourcecode/alipay/default/app.json | 8 +- .../default/components/layout/layout.acss | 707 ++++++++++++++++++ .../default/components/layout/layout.axml | 123 +++ .../default/components/layout/layout.js | 37 + .../default/components/layout/layout.json | 3 + .../default/components/quick-nav/quick-nav.js | 8 +- .../alipay/default/pages/design/design.acss | 155 ++++ .../alipay/default/pages/design/design.axml | 14 + .../alipay/default/pages/design/design.js | 83 ++ .../alipay/default/pages/design/design.json | 6 + .../pages/goods-detail/goods-detail.acss | 37 + .../pages/goods-detail/goods-detail.axml | 29 +- .../pages/goods-detail/goods-detail.js | 55 +- .../alipay/default/pages/index/index.axml | 25 +- .../alipay/default/pages/index/index.js | 2 + .../alipay/default/pages/index/index.json | 3 +- .../pages/plugins/brand/index/index.js | 13 - .../pages/plugins/shop/design/design.acss | 157 ++++ .../pages/plugins/shop/design/design.axml | 20 + .../pages/plugins/shop/design/design.js | 201 +++++ .../pages/plugins/shop/design/design.json | 10 + .../pages/plugins/shop/detail/detail.acss | 201 +++++ .../pages/plugins/shop/detail/detail.axml | 53 ++ .../pages/plugins/shop/detail/detail.js | 247 ++++++ .../pages/plugins/shop/detail/detail.json | 10 + .../pages/plugins/shop/faovr/faovr.acss | 29 + .../pages/plugins/shop/faovr/faovr.axml | 20 + .../default/pages/plugins/shop/faovr/faovr.js | 184 +++++ .../pages/plugins/shop/faovr/faovr.json | 6 + .../pages/plugins/shop/index/index.acss | 59 ++ .../pages/plugins/shop/index/index.axml | 42 ++ .../default/pages/plugins/shop/index/index.js | 193 +++++ .../pages/plugins/shop/index/index.json | 8 + .../pages/plugins/shop/public/header.axml | 72 ++ .../pages/plugins/shop/search/search.acss | 162 ++++ .../pages/plugins/shop/search/search.axml | 72 ++ .../pages/plugins/shop/search/search.js | 343 +++++++++ .../pages/plugins/shop/search/search.json | 8 + .../signin/index-detail/index-detail.js | 10 - .../pages/goods-detail/goods-detail.css | 37 + .../pages/goods-detail/goods-detail.js | 56 +- .../pages/goods-detail/goods-detail.swan | 22 +- .../baidu/default/pages/index/index.swan | 2 +- .../pages/goods-detail/goods-detail.js | 53 +- .../pages/goods-detail/goods-detail.qml | 22 +- .../pages/goods-detail/goods-detail.qss | 37 + sourcecode/qq/default/pages/index/index.qml | 2 +- .../pages/goods-detail/goods-detail.js | 53 +- .../pages/goods-detail/goods-detail.ttml | 22 +- .../pages/goods-detail/goods-detail.ttss | 37 + .../toutiao/default/pages/index/index.ttml | 2 +- .../default/components/layout/layout.wxml | 4 +- .../weixin/default/pages/design/design.js | 6 +- .../pages/goods-detail/goods-detail.js | 30 +- .../pages/goods-detail/goods-detail.wxml | 6 +- .../pages/goods-detail/goods-detail.wxss | 2 +- .../weixin/default/pages/index/index.wxml | 2 +- .../pages/plugins/shop/design/design.js | 4 +- .../pages/plugins/shop/design/design.wxss | 2 + .../pages/plugins/shop/detail/detail.js | 2 + .../pages/plugins/shop/detail/detail.wxss | 5 +- .../default/pages/plugins/shop/index/index.js | 10 +- .../pages/plugins/shop/index/index.wxss | 34 +- 64 files changed, 3725 insertions(+), 146 deletions(-) create mode 100755 sourcecode/alipay/default/components/layout/layout.acss create mode 100755 sourcecode/alipay/default/components/layout/layout.axml create mode 100755 sourcecode/alipay/default/components/layout/layout.js create mode 100755 sourcecode/alipay/default/components/layout/layout.json create mode 100644 sourcecode/alipay/default/pages/design/design.acss create mode 100644 sourcecode/alipay/default/pages/design/design.axml create mode 100644 sourcecode/alipay/default/pages/design/design.js create mode 100644 sourcecode/alipay/default/pages/design/design.json create mode 100644 sourcecode/alipay/default/pages/plugins/shop/design/design.acss create mode 100644 sourcecode/alipay/default/pages/plugins/shop/design/design.axml create mode 100644 sourcecode/alipay/default/pages/plugins/shop/design/design.js create mode 100644 sourcecode/alipay/default/pages/plugins/shop/design/design.json create mode 100644 sourcecode/alipay/default/pages/plugins/shop/detail/detail.acss create mode 100644 sourcecode/alipay/default/pages/plugins/shop/detail/detail.axml create mode 100644 sourcecode/alipay/default/pages/plugins/shop/detail/detail.js create mode 100644 sourcecode/alipay/default/pages/plugins/shop/detail/detail.json create mode 100755 sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.acss create mode 100755 sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.axml create mode 100755 sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.js create mode 100755 sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.json create mode 100755 sourcecode/alipay/default/pages/plugins/shop/index/index.acss create mode 100755 sourcecode/alipay/default/pages/plugins/shop/index/index.axml create mode 100755 sourcecode/alipay/default/pages/plugins/shop/index/index.js create mode 100755 sourcecode/alipay/default/pages/plugins/shop/index/index.json create mode 100644 sourcecode/alipay/default/pages/plugins/shop/public/header.axml create mode 100755 sourcecode/alipay/default/pages/plugins/shop/search/search.acss create mode 100755 sourcecode/alipay/default/pages/plugins/shop/search/search.axml create mode 100755 sourcecode/alipay/default/pages/plugins/shop/search/search.js create mode 100755 sourcecode/alipay/default/pages/plugins/shop/search/search.json diff --git a/sourcecode/alipay/default/app.js b/sourcecode/alipay/default/app.js index 7e75f6413..fc422f240 100644 --- a/sourcecode/alipay/default/app.js +++ b/sourcecode/alipay/default/app.js @@ -73,8 +73,8 @@ App({ // 请求地址 request_url: "{{request_url}}", - // request_url: 'http://shopxo.com/', - // request_url: 'https://dev.shopxo.net/', + request_url: 'http://shopxo.com/', + request_url: 'https://dev.shopxo.net/', // 基础信息 application_title: "{{application_title}}", diff --git a/sourcecode/alipay/default/app.json b/sourcecode/alipay/default/app.json index ceb587231..05b220c62 100644 --- a/sourcecode/alipay/default/app.json +++ b/sourcecode/alipay/default/app.json @@ -27,6 +27,7 @@ "pages/user-orderaftersale-detail/user-orderaftersale-detail", "pages/extraction-address/extraction-address", "pages/common/open-setting-location/open-setting-location", + "pages/design/design", "pages/plugins/coupon/index/index", "pages/plugins/coupon/user/user", "pages/plugins/membershiplevelvip/index/index", @@ -78,7 +79,12 @@ "pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo", "pages/plugins/signin/user-coming-list/user-coming-list", "pages/plugins/points/index/index", - "pages/plugins/brand/index/index" + "pages/plugins/brand/index/index", + "pages/plugins/shop/index/index", + "pages/plugins/shop/detail/detail", + "pages/plugins/shop/search/search", + "pages/plugins/shop/design/design", + "pages/plugins/shop/faovr/faovr" ], "window": { "defaultTitle": "{{application_title}}", diff --git a/sourcecode/alipay/default/components/layout/layout.acss b/sourcecode/alipay/default/components/layout/layout.acss new file mode 100755 index 000000000..ef7cf9e31 --- /dev/null +++ b/sourcecode/alipay/default/components/layout/layout.acss @@ -0,0 +1,707 @@ +/** + * 布局基础 + */ +.layout-content-children,.layout-content-container{overflow:hidden;} + +/** + * 模块类型样式 - 数据列表 + */ +.module-list-content .item{float:left} +.module-list-content-avg-1{width:calc(100% + 1px);margin-left:-1px;margin-top:-1px;} +.module-list-content-avg-2{width:calc(100% + 2px);margin-left:-2px;margin-top:-2px;} +.module-list-content-avg-3{width:calc(100% + 3px);margin-left:-3px;margin-top:-3px;} +.module-list-content-avg-4{width:calc(100% + 4px);margin-left:-4px;margin-top:-4px;} +.module-list-content-avg-5{width:calc(100% + 5px);margin-left:-5px;margin-top:-5px;} +.module-list-content-avg-6{width:calc(100% + 6px);margin-left:-6px;margin-top:-6px;} +.module-list-content-avg-7{width:calc(100% + 7px);margin-left:-7px;margin-top:-7px;} +.module-list-content-avg-8{width:calc(100% + 8px);margin-left:-8px;margin-top:-8px;} +.module-list-content-avg-9{width:calc(100% + 9px);margin-left:-9px;margin-top:-9px;} +.module-list-content-avg-10{width:calc(100% + 10px);margin-left:-10px;margin-top:-10px;} +.module-list-content-avg-11{width:calc(100% + 11px);margin-left:-11px;margin-top:-11px;} +.module-list-content-avg-12{width:calc(100% + 12px);margin-left:-12px;margin-top:-12px;} +.module-list-content-avg-13{width:calc(100% + 13px);margin-left:-13px;margin-top:-13px;} +.module-list-content-avg-14{width:calc(100% + 14px);margin-left:-14px;margin-top:-14px;} +.module-list-content-avg-15{width:calc(100% + 15px);margin-left:-15px;margin-top:-15px;} +.module-list-content-avg-16{width:calc(100% + 16px);margin-left:-16px;margin-top:-16px;} +.module-list-content-avg-17{width:calc(100% + 17px);margin-left:-17px;margin-top:-17px;} +.module-list-content-avg-18{width:calc(100% + 18px);margin-left:-18px;margin-top:-18px;} +.module-list-content-avg-19{width:calc(100% + 19px);margin-left:-19px;margin-top:-19px;} +.module-list-content-avg-20{width:calc(100% + 20px);margin-left:-20px;margin-top:-20px;} +.module-list-content-avg-21{width:calc(100% + 21px);margin-left:-21px;margin-top:-21px;} +.module-list-content-avg-22{width:calc(100% + 22px);margin-left:-22px;margin-top:-22px;} +.module-list-content-avg-23{width:calc(100% + 23px);margin-left:-23px;margin-top:-23px;} +.module-list-content-avg-24{width:calc(100% + 24px);margin-left:-24px;margin-top:-24px;} +.module-list-content-avg-25{width:calc(100% + 25px);margin-left:-25px;margin-top:-25px;} +.module-list-content-avg-26{width:calc(100% + 26px);margin-left:-26px;margin-top:-26px;} +.module-list-content-avg-27{width:calc(100% + 27px);margin-left:-27px;margin-top:-27px;} +.module-list-content-avg-28{width:calc(100% + 28px);margin-left:-28px;margin-top:-28px;} +.module-list-content-avg-29{width:calc(100% + 29px);margin-left:-29px;margin-top:-29px;} +.module-list-content-avg-30{width:calc(100% + 30px);margin-left:-30px;margin-top:-30px;} +.module-list-sm-1 .item{width:100%;} +.module-list-sm-2 .item{width:50%;} +.module-list-sm-3 .item{width:33.33%;} +.module-list-sm-4 .item{width:25%;} +.module-list-sm-5 .item{width:20%;} +.module-list-sm-6 .item{width:16.66%;} +.module-list-sm-7 .item{width:14.28%;} +.module-list-sm-8 .item{width:12.5%;} +.module-list-sm-9 .item{width:11.11%;} +.module-list-sm-10 .item{width:10%;} +.module-list-sm-11 .item{width:9.09%;} +.module-list-sm-12 .item{width:8.33%;} + +/** + * 商品列表 + */ +.module-goods-content .module-item{background:#fff} +.module-goods-content .module-item .item-bottom{margin-top:5px} +.module-goods-content .module-item .module-title{margin-bottom:5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:38px;line-height:20px;font-size:12px;white-space:initial} +.module-goods-content .module-item .module-price{color:#f40;font-weight:bold;word-wrap:normal;text-overflow:ellipsis;white-space:nowrap;font-size:14px;} + + +/** + * 布局圆角 + */ +.layout-sm-border-radius-1{border-radius:1px;} +.layout-sm-border-radius-2{border-radius:2px;} +.layout-sm-border-radius-3{border-radius:3px;} +.layout-sm-border-radius-4{border-radius:4px;} +.layout-sm-border-radius-5{border-radius:5px;} +.layout-sm-border-radius-6{border-radius:6px;} +.layout-sm-border-radius-7{border-radius:7px;} +.layout-sm-border-radius-8{border-radius:8px;} +.layout-sm-border-radius-9{border-radius:9px;} +.layout-sm-border-radius-10{border-radius:10px;} +.layout-sm-border-radius-11{border-radius:11px;} +.layout-sm-border-radius-12{border-radius:12px;} +.layout-sm-border-radius-13{border-radius:13px;} +.layout-sm-border-radius-14{border-radius:14px;} +.layout-sm-border-radius-15{border-radius:15px;} +.layout-sm-border-radius-16{border-radius:16px;} +.layout-sm-border-radius-17{border-radius:17px;} +.layout-sm-border-radius-18{border-radius:18px;} +.layout-sm-border-radius-19{border-radius:19px;} +.layout-sm-border-radius-20{border-radius:20px;} +.layout-sm-border-radius-21{border-radius:21px;} +.layout-sm-border-radius-22{border-radius:22px;} +.layout-sm-border-radius-23{border-radius:23px;} +.layout-sm-border-radius-24{border-radius:24px;} +.layout-sm-border-radius-25{border-radius:25px;} +.layout-sm-border-radius-26{border-radius:26px;} +.layout-sm-border-radius-27{border-radius:27px;} +.layout-sm-border-radius-28{border-radius:28px;} +.layout-sm-border-radius-29{border-radius:29px;} +.layout-sm-border-radius-30{border-radius:30px;} + +/** + * 布局样式 - 边线大小 + */ +.layout-sm-border-top-1{border-top:1px;} +.layout-sm-border-top-2{border-top:2px;} +.layout-sm-border-top-3{border-top:3px;} +.layout-sm-border-top-4{border-top:4px;} +.layout-sm-border-top-5{border-top:5px;} +.layout-sm-border-top-6{border-top:6px;} +.layout-sm-border-top-7{border-top:7px;} +.layout-sm-border-top-8{border-top:8px;} +.layout-sm-border-top-9{border-top:9px;} +.layout-sm-border-top-10{border-top:10px;} + +.layout-sm-border-right-1{border-right:1px;} +.layout-sm-border-right-2{border-right:2px;} +.layout-sm-border-right-3{border-right:3px;} +.layout-sm-border-right-4{border-right:4px;} +.layout-sm-border-right-5{border-right:5px;} +.layout-sm-border-right-6{border-right:6px;} +.layout-sm-border-right-7{border-right:7px;} +.layout-sm-border-right-8{border-right:8px;} +.layout-sm-border-right-9{border-right:9px;} +.layout-sm-border-right-10{border-right:10px;} + +.layout-sm-border-bottom-1{border-bottom:1px;} +.layout-sm-border-bottom-2{border-bottom:2px;} +.layout-sm-border-bottom-3{border-bottom:3px;} +.layout-sm-border-bottom-4{border-bottom:4px;} +.layout-sm-border-bottom-5{border-bottom:5px;} +.layout-sm-border-bottom-6{border-bottom:6px;} +.layout-sm-border-bottom-7{border-bottom:7px;} +.layout-sm-border-bottom-8{border-bottom:8px;} +.layout-sm-border-bottom-9{border-bottom:9px;} +.layout-sm-border-bottom-10{border-bottom:10px;} + +.layout-sm-border-left-1{border-left:1px;} +.layout-sm-border-left-2{border-left:2px;} +.layout-sm-border-left-3{border-left:3px;} +.layout-sm-border-left-4{border-left:4px;} +.layout-sm-border-left-5{border-left:5px;} +.layout-sm-border-left-6{border-left:6px;} +.layout-sm-border-left-7{border-left:7px;} +.layout-sm-border-left-8{border-left:8px;} +.layout-sm-border-left-9{border-left:9px;} +.layout-sm-border-left-10{border-left:10px;} + +/** + * 布局边线 - 边线类型 + */ +.layout-sm-border-top-solid{border-top-style:solid;} +.layout-sm-border-top-dashed{border-top-style:dashed;} +.layout-sm-border-top-dotted{border-top-style:dotted;} +.layout-sm-border-top-double{border-top-style:double;} + +.layout-sm-border-right-solid{border-right-style:solid;} +.layout-sm-border-right-dashed{border-right-style:dashed;} +.layout-sm-border-right-dotted{border-right-style:dotted;} +.layout-sm-border-right-double{border-right-style:double;} + +.layout-sm-border-bottom-solid{border-bottom-style:solid;} +.layout-sm-border-bottom-dashed{border-bottom-style:dashed;} +.layout-sm-border-bottom-dotted{border-bottom-style:dotted;} +.layout-sm-border-bottom-double{border-bottom-style:double;} + +.layout-sm-border-left-solid{border-left-style:solid;} +.layout-sm-border-left-dashed{border-left-style:dashed;} +.layout-sm-border-left-dotted{border-left-style:dotted;} +.layout-sm-border-left-double{border-left-style:double;} + +/** + * 布局外边距 + */ +.layout-sm-margin-top-1{margin-top:1px;} +.layout-sm-margin-top-2{margin-top:2px;} +.layout-sm-margin-top-3{margin-top:3px;} +.layout-sm-margin-top-4{margin-top:4px;} +.layout-sm-margin-top-5{margin-top:5px;} +.layout-sm-margin-top-6{margin-top:6px;} +.layout-sm-margin-top-7{margin-top:7px;} +.layout-sm-margin-top-8{margin-top:8px;} +.layout-sm-margin-top-9{margin-top:9px;} +.layout-sm-margin-top-10{margin-top:10px;} +.layout-sm-margin-top-11{margin-top:11px;} +.layout-sm-margin-top-12{margin-top:12px;} +.layout-sm-margin-top-13{margin-top:13px;} +.layout-sm-margin-top-14{margin-top:14px;} +.layout-sm-margin-top-15{margin-top:15px;} +.layout-sm-margin-top-16{margin-top:16px;} +.layout-sm-margin-top-17{margin-top:17px;} +.layout-sm-margin-top-18{margin-top:18px;} +.layout-sm-margin-top-19{margin-top:19px;} +.layout-sm-margin-top-20{margin-top:20px;} +.layout-sm-margin-top-21{margin-top:21px;} +.layout-sm-margin-top-22{margin-top:22px;} +.layout-sm-margin-top-23{margin-top:23px;} +.layout-sm-margin-top-24{margin-top:24px;} +.layout-sm-margin-top-25{margin-top:25px;} +.layout-sm-margin-top-26{margin-top:26px;} +.layout-sm-margin-top-27{margin-top:27px;} +.layout-sm-margin-top-28{margin-top:28px;} +.layout-sm-margin-top-29{margin-top:29px;} +.layout-sm-margin-top-30{margin-top:30px;} +.layout-sm-margin-top-31{margin-top:31px;} +.layout-sm-margin-top-32{margin-top:32px;} +.layout-sm-margin-top-33{margin-top:33px;} +.layout-sm-margin-top-34{margin-top:34px;} +.layout-sm-margin-top-35{margin-top:35px;} +.layout-sm-margin-top-36{margin-top:36px;} +.layout-sm-margin-top-37{margin-top:37px;} +.layout-sm-margin-top-38{margin-top:38px;} +.layout-sm-margin-top-39{margin-top:39px;} +.layout-sm-margin-top-40{margin-top:40px;} +.layout-sm-margin-top-41{margin-top:41px;} +.layout-sm-margin-top-42{margin-top:42px;} +.layout-sm-margin-top-43{margin-top:43px;} +.layout-sm-margin-top-44{margin-top:44px;} +.layout-sm-margin-top-45{margin-top:45px;} +.layout-sm-margin-top-46{margin-top:46px;} +.layout-sm-margin-top-47{margin-top:47px;} +.layout-sm-margin-top-48{margin-top:48px;} +.layout-sm-margin-top-49{margin-top:49px;} +.layout-sm-margin-top-50{margin-top:50px;} +.layout-sm-margin-top-51{margin-top:51px;} +.layout-sm-margin-top-52{margin-top:52px;} +.layout-sm-margin-top-53{margin-top:53px;} +.layout-sm-margin-top-54{margin-top:54px;} +.layout-sm-margin-top-55{margin-top:55px;} +.layout-sm-margin-top-56{margin-top:56px;} +.layout-sm-margin-top-57{margin-top:57px;} +.layout-sm-margin-top-58{margin-top:58px;} +.layout-sm-margin-top-59{margin-top:59px;} +.layout-sm-margin-top-60{margin-top:60px;} + +.layout-sm-margin-right-1{margin-right:1px;} +.layout-sm-margin-right-2{margin-right:2px;} +.layout-sm-margin-right-3{margin-right:3px;} +.layout-sm-margin-right-4{margin-right:4px;} +.layout-sm-margin-right-5{margin-right:5px;} +.layout-sm-margin-right-6{margin-right:6px;} +.layout-sm-margin-right-7{margin-right:7px;} +.layout-sm-margin-right-8{margin-right:8px;} +.layout-sm-margin-right-9{margin-right:9px;} +.layout-sm-margin-right-10{margin-right:10px;} +.layout-sm-margin-right-11{margin-right:11px;} +.layout-sm-margin-right-12{margin-right:12px;} +.layout-sm-margin-right-13{margin-right:13px;} +.layout-sm-margin-right-14{margin-right:14px;} +.layout-sm-margin-right-15{margin-right:15px;} +.layout-sm-margin-right-16{margin-right:16px;} +.layout-sm-margin-right-17{margin-right:17px;} +.layout-sm-margin-right-18{margin-right:18px;} +.layout-sm-margin-right-19{margin-right:19px;} +.layout-sm-margin-right-20{margin-right:20px;} +.layout-sm-margin-right-21{margin-right:21px;} +.layout-sm-margin-right-22{margin-right:22px;} +.layout-sm-margin-right-23{margin-right:23px;} +.layout-sm-margin-right-24{margin-right:24px;} +.layout-sm-margin-right-25{margin-right:25px;} +.layout-sm-margin-right-26{margin-right:26px;} +.layout-sm-margin-right-27{margin-right:27px;} +.layout-sm-margin-right-28{margin-right:28px;} +.layout-sm-margin-right-29{margin-right:29px;} +.layout-sm-margin-right-30{margin-right:30px;} +.layout-sm-margin-right-31{margin-right:31px;} +.layout-sm-margin-right-32{margin-right:32px;} +.layout-sm-margin-right-33{margin-right:33px;} +.layout-sm-margin-right-34{margin-right:34px;} +.layout-sm-margin-right-35{margin-right:35px;} +.layout-sm-margin-right-36{margin-right:36px;} +.layout-sm-margin-right-37{margin-right:37px;} +.layout-sm-margin-right-38{margin-right:38px;} +.layout-sm-margin-right-39{margin-right:39px;} +.layout-sm-margin-right-40{margin-right:40px;} +.layout-sm-margin-right-41{margin-right:41px;} +.layout-sm-margin-right-42{margin-right:42px;} +.layout-sm-margin-right-43{margin-right:43px;} +.layout-sm-margin-right-44{margin-right:44px;} +.layout-sm-margin-right-45{margin-right:45px;} +.layout-sm-margin-right-46{margin-right:46px;} +.layout-sm-margin-right-47{margin-right:47px;} +.layout-sm-margin-right-48{margin-right:48px;} +.layout-sm-margin-right-49{margin-right:49px;} +.layout-sm-margin-right-50{margin-right:50px;} +.layout-sm-margin-right-51{margin-right:51px;} +.layout-sm-margin-right-52{margin-right:52px;} +.layout-sm-margin-right-53{margin-right:53px;} +.layout-sm-margin-right-54{margin-right:54px;} +.layout-sm-margin-right-55{margin-right:55px;} +.layout-sm-margin-right-56{margin-right:56px;} +.layout-sm-margin-right-57{margin-right:57px;} +.layout-sm-margin-right-58{margin-right:58px;} +.layout-sm-margin-right-59{margin-right:59px;} +.layout-sm-margin-right-60{margin-right:60px;} + +.layout-sm-margin-bottom-1{margin-bottom:1px;} +.layout-sm-margin-bottom-2{margin-bottom:2px;} +.layout-sm-margin-bottom-3{margin-bottom:3px;} +.layout-sm-margin-bottom-4{margin-bottom:4px;} +.layout-sm-margin-bottom-5{margin-bottom:5px;} +.layout-sm-margin-bottom-6{margin-bottom:6px;} +.layout-sm-margin-bottom-7{margin-bottom:7px;} +.layout-sm-margin-bottom-8{margin-bottom:8px;} +.layout-sm-margin-bottom-9{margin-bottom:9px;} +.layout-sm-margin-bottom-10{margin-bottom:10px;} +.layout-sm-margin-bottom-11{margin-bottom:11px;} +.layout-sm-margin-bottom-12{margin-bottom:12px;} +.layout-sm-margin-bottom-13{margin-bottom:13px;} +.layout-sm-margin-bottom-14{margin-bottom:14px;} +.layout-sm-margin-bottom-15{margin-bottom:15px;} +.layout-sm-margin-bottom-16{margin-bottom:16px;} +.layout-sm-margin-bottom-17{margin-bottom:17px;} +.layout-sm-margin-bottom-18{margin-bottom:18px;} +.layout-sm-margin-bottom-19{margin-bottom:19px;} +.layout-sm-margin-bottom-20{margin-bottom:20px;} +.layout-sm-margin-bottom-21{margin-bottom:21px;} +.layout-sm-margin-bottom-22{margin-bottom:22px;} +.layout-sm-margin-bottom-23{margin-bottom:23px;} +.layout-sm-margin-bottom-24{margin-bottom:24px;} +.layout-sm-margin-bottom-25{margin-bottom:25px;} +.layout-sm-margin-bottom-26{margin-bottom:26px;} +.layout-sm-margin-bottom-27{margin-bottom:27px;} +.layout-sm-margin-bottom-28{margin-bottom:28px;} +.layout-sm-margin-bottom-29{margin-bottom:29px;} +.layout-sm-margin-bottom-30{margin-bottom:30px;} +.layout-sm-margin-bottom-31{margin-bottom:31px;} +.layout-sm-margin-bottom-32{margin-bottom:32px;} +.layout-sm-margin-bottom-33{margin-bottom:33px;} +.layout-sm-margin-bottom-34{margin-bottom:34px;} +.layout-sm-margin-bottom-35{margin-bottom:35px;} +.layout-sm-margin-bottom-36{margin-bottom:36px;} +.layout-sm-margin-bottom-37{margin-bottom:37px;} +.layout-sm-margin-bottom-38{margin-bottom:38px;} +.layout-sm-margin-bottom-39{margin-bottom:39px;} +.layout-sm-margin-bottom-40{margin-bottom:40px;} +.layout-sm-margin-bottom-41{margin-bottom:41px;} +.layout-sm-margin-bottom-42{margin-bottom:42px;} +.layout-sm-margin-bottom-43{margin-bottom:43px;} +.layout-sm-margin-bottom-44{margin-bottom:44px;} +.layout-sm-margin-bottom-45{margin-bottom:45px;} +.layout-sm-margin-bottom-46{margin-bottom:46px;} +.layout-sm-margin-bottom-47{margin-bottom:47px;} +.layout-sm-margin-bottom-48{margin-bottom:48px;} +.layout-sm-margin-bottom-49{margin-bottom:49px;} +.layout-sm-margin-bottom-50{margin-bottom:50px;} +.layout-sm-margin-bottom-51{margin-bottom:51px;} +.layout-sm-margin-bottom-52{margin-bottom:52px;} +.layout-sm-margin-bottom-53{margin-bottom:53px;} +.layout-sm-margin-bottom-54{margin-bottom:54px;} +.layout-sm-margin-bottom-55{margin-bottom:55px;} +.layout-sm-margin-bottom-56{margin-bottom:56px;} +.layout-sm-margin-bottom-57{margin-bottom:57px;} +.layout-sm-margin-bottom-58{margin-bottom:58px;} +.layout-sm-margin-bottom-59{margin-bottom:59px;} +.layout-sm-margin-bottom-60{margin-bottom:60px;} + +.layout-sm-margin-left-1{margin-left:1px;} +.layout-sm-margin-left-2{margin-left:2px;} +.layout-sm-margin-left-3{margin-left:3px;} +.layout-sm-margin-left-4{margin-left:4px;} +.layout-sm-margin-left-5{margin-left:5px;} +.layout-sm-margin-left-6{margin-left:6px;} +.layout-sm-margin-left-7{margin-left:7px;} +.layout-sm-margin-left-8{margin-left:8px;} +.layout-sm-margin-left-9{margin-left:9px;} +.layout-sm-margin-left-10{margin-left:10px;} +.layout-sm-margin-left-11{margin-left:11px;} +.layout-sm-margin-left-12{margin-left:12px;} +.layout-sm-margin-left-13{margin-left:13px;} +.layout-sm-margin-left-14{margin-left:14px;} +.layout-sm-margin-left-15{margin-left:15px;} +.layout-sm-margin-left-16{margin-left:16px;} +.layout-sm-margin-left-17{margin-left:17px;} +.layout-sm-margin-left-18{margin-left:18px;} +.layout-sm-margin-left-19{margin-left:19px;} +.layout-sm-margin-left-20{margin-left:20px;} +.layout-sm-margin-left-21{margin-left:21px;} +.layout-sm-margin-left-22{margin-left:22px;} +.layout-sm-margin-left-23{margin-left:23px;} +.layout-sm-margin-left-24{margin-left:24px;} +.layout-sm-margin-left-25{margin-left:25px;} +.layout-sm-margin-left-26{margin-left:26px;} +.layout-sm-margin-left-27{margin-left:27px;} +.layout-sm-margin-left-28{margin-left:28px;} +.layout-sm-margin-left-29{margin-left:29px;} +.layout-sm-margin-left-30{margin-left:30px;} +.layout-sm-margin-left-31{margin-left:31px;} +.layout-sm-margin-left-32{margin-left:32px;} +.layout-sm-margin-left-33{margin-left:33px;} +.layout-sm-margin-left-34{margin-left:34px;} +.layout-sm-margin-left-35{margin-left:35px;} +.layout-sm-margin-left-36{margin-left:36px;} +.layout-sm-margin-left-37{margin-left:37px;} +.layout-sm-margin-left-38{margin-left:38px;} +.layout-sm-margin-left-39{margin-left:39px;} +.layout-sm-margin-left-40{margin-left:40px;} +.layout-sm-margin-left-41{margin-left:41px;} +.layout-sm-margin-left-42{margin-left:42px;} +.layout-sm-margin-left-43{margin-left:43px;} +.layout-sm-margin-left-44{margin-left:44px;} +.layout-sm-margin-left-45{margin-left:45px;} +.layout-sm-margin-left-46{margin-left:46px;} +.layout-sm-margin-left-47{margin-left:47px;} +.layout-sm-margin-left-48{margin-left:48px;} +.layout-sm-margin-left-49{margin-left:49px;} +.layout-sm-margin-left-50{margin-left:50px;} +.layout-sm-margin-left-51{margin-left:51px;} +.layout-sm-margin-left-52{margin-left:52px;} +.layout-sm-margin-left-53{margin-left:53px;} +.layout-sm-margin-left-54{margin-left:54px;} +.layout-sm-margin-left-55{margin-left:55px;} +.layout-sm-margin-left-56{margin-left:56px;} +.layout-sm-margin-left-57{margin-left:57px;} +.layout-sm-margin-left-58{margin-left:58px;} +.layout-sm-margin-left-59{margin-left:59px;} +.layout-sm-margin-left-60{margin-left:60px;} + +/** + * 布局内边距 + */ +.layout-sm-padding-top-1{padding-top:1px;} +.layout-sm-padding-top-2{padding-top:2px;} +.layout-sm-padding-top-3{padding-top:3px;} +.layout-sm-padding-top-4{padding-top:4px;} +.layout-sm-padding-top-5{padding-top:5px;} +.layout-sm-padding-top-6{padding-top:6px;} +.layout-sm-padding-top-7{padding-top:7px;} +.layout-sm-padding-top-8{padding-top:8px;} +.layout-sm-padding-top-9{padding-top:9px;} +.layout-sm-padding-top-10{padding-top:10px;} +.layout-sm-padding-top-11{padding-top:11px;} +.layout-sm-padding-top-12{padding-top:12px;} +.layout-sm-padding-top-13{padding-top:13px;} +.layout-sm-padding-top-14{padding-top:14px;} +.layout-sm-padding-top-15{padding-top:15px;} +.layout-sm-padding-top-16{padding-top:16px;} +.layout-sm-padding-top-17{padding-top:17px;} +.layout-sm-padding-top-18{padding-top:18px;} +.layout-sm-padding-top-19{padding-top:19px;} +.layout-sm-padding-top-20{padding-top:20px;} +.layout-sm-padding-top-21{padding-top:21px;} +.layout-sm-padding-top-22{padding-top:22px;} +.layout-sm-padding-top-23{padding-top:23px;} +.layout-sm-padding-top-24{padding-top:24px;} +.layout-sm-padding-top-25{padding-top:25px;} +.layout-sm-padding-top-26{padding-top:26px;} +.layout-sm-padding-top-27{padding-top:27px;} +.layout-sm-padding-top-28{padding-top:28px;} +.layout-sm-padding-top-29{padding-top:29px;} +.layout-sm-padding-top-30{padding-top:30px;} +.layout-sm-padding-top-31{padding-top:31px;} +.layout-sm-padding-top-32{padding-top:32px;} +.layout-sm-padding-top-33{padding-top:33px;} +.layout-sm-padding-top-34{padding-top:34px;} +.layout-sm-padding-top-35{padding-top:35px;} +.layout-sm-padding-top-36{padding-top:36px;} +.layout-sm-padding-top-37{padding-top:37px;} +.layout-sm-padding-top-38{padding-top:38px;} +.layout-sm-padding-top-39{padding-top:39px;} +.layout-sm-padding-top-40{padding-top:40px;} +.layout-sm-padding-top-41{padding-top:41px;} +.layout-sm-padding-top-42{padding-top:42px;} +.layout-sm-padding-top-43{padding-top:43px;} +.layout-sm-padding-top-44{padding-top:44px;} +.layout-sm-padding-top-45{padding-top:45px;} +.layout-sm-padding-top-46{padding-top:46px;} +.layout-sm-padding-top-47{padding-top:47px;} +.layout-sm-padding-top-48{padding-top:48px;} +.layout-sm-padding-top-49{padding-top:49px;} +.layout-sm-padding-top-50{padding-top:50px;} +.layout-sm-padding-top-51{padding-top:51px;} +.layout-sm-padding-top-52{padding-top:52px;} +.layout-sm-padding-top-53{padding-top:53px;} +.layout-sm-padding-top-54{padding-top:54px;} +.layout-sm-padding-top-55{padding-top:55px;} +.layout-sm-padding-top-56{padding-top:56px;} +.layout-sm-padding-top-57{padding-top:57px;} +.layout-sm-padding-top-58{padding-top:58px;} +.layout-sm-padding-top-59{padding-top:59px;} +.layout-sm-padding-top-60{padding-top:60px;} + +.layout-sm-padding-right-1{padding-right:1px;} +.layout-sm-padding-right-2{padding-right:2px;} +.layout-sm-padding-right-3{padding-right:3px;} +.layout-sm-padding-right-4{padding-right:4px;} +.layout-sm-padding-right-5{padding-right:5px;} +.layout-sm-padding-right-6{padding-right:6px;} +.layout-sm-padding-right-7{padding-right:7px;} +.layout-sm-padding-right-8{padding-right:8px;} +.layout-sm-padding-right-9{padding-right:9px;} +.layout-sm-padding-right-10{padding-right:10px;} +.layout-sm-padding-right-11{padding-right:11px;} +.layout-sm-padding-right-12{padding-right:12px;} +.layout-sm-padding-right-13{padding-right:13px;} +.layout-sm-padding-right-14{padding-right:14px;} +.layout-sm-padding-right-15{padding-right:15px;} +.layout-sm-padding-right-16{padding-right:16px;} +.layout-sm-padding-right-17{padding-right:17px;} +.layout-sm-padding-right-18{padding-right:18px;} +.layout-sm-padding-right-19{padding-right:19px;} +.layout-sm-padding-right-20{padding-right:20px;} +.layout-sm-padding-right-21{padding-right:21px;} +.layout-sm-padding-right-22{padding-right:22px;} +.layout-sm-padding-right-23{padding-right:23px;} +.layout-sm-padding-right-24{padding-right:24px;} +.layout-sm-padding-right-25{padding-right:25px;} +.layout-sm-padding-right-26{padding-right:26px;} +.layout-sm-padding-right-27{padding-right:27px;} +.layout-sm-padding-right-28{padding-right:28px;} +.layout-sm-padding-right-29{padding-right:29px;} +.layout-sm-padding-right-30{padding-right:30px;} +.layout-sm-padding-right-31{padding-right:31px;} +.layout-sm-padding-right-32{padding-right:32px;} +.layout-sm-padding-right-33{padding-right:33px;} +.layout-sm-padding-right-34{padding-right:34px;} +.layout-sm-padding-right-35{padding-right:35px;} +.layout-sm-padding-right-36{padding-right:36px;} +.layout-sm-padding-right-37{padding-right:37px;} +.layout-sm-padding-right-38{padding-right:38px;} +.layout-sm-padding-right-39{padding-right:39px;} +.layout-sm-padding-right-40{padding-right:40px;} +.layout-sm-padding-right-41{padding-right:41px;} +.layout-sm-padding-right-42{padding-right:42px;} +.layout-sm-padding-right-43{padding-right:43px;} +.layout-sm-padding-right-44{padding-right:44px;} +.layout-sm-padding-right-45{padding-right:45px;} +.layout-sm-padding-right-46{padding-right:46px;} +.layout-sm-padding-right-47{padding-right:47px;} +.layout-sm-padding-right-48{padding-right:48px;} +.layout-sm-padding-right-49{padding-right:49px;} +.layout-sm-padding-right-50{padding-right:50px;} +.layout-sm-padding-right-51{padding-right:51px;} +.layout-sm-padding-right-52{padding-right:52px;} +.layout-sm-padding-right-53{padding-right:53px;} +.layout-sm-padding-right-54{padding-right:54px;} +.layout-sm-padding-right-55{padding-right:55px;} +.layout-sm-padding-right-56{padding-right:56px;} +.layout-sm-padding-right-57{padding-right:57px;} +.layout-sm-padding-right-58{padding-right:58px;} +.layout-sm-padding-right-59{padding-right:59px;} +.layout-sm-padding-right-60{padding-right:60px;} + +.layout-sm-padding-bottom-1{padding-bottom:1px;} +.layout-sm-padding-bottom-2{padding-bottom:2px;} +.layout-sm-padding-bottom-3{padding-bottom:3px;} +.layout-sm-padding-bottom-4{padding-bottom:4px;} +.layout-sm-padding-bottom-5{padding-bottom:5px;} +.layout-sm-padding-bottom-6{padding-bottom:6px;} +.layout-sm-padding-bottom-7{padding-bottom:7px;} +.layout-sm-padding-bottom-8{padding-bottom:8px;} +.layout-sm-padding-bottom-9{padding-bottom:9px;} +.layout-sm-padding-bottom-10{padding-bottom:10px;} +.layout-sm-padding-bottom-11{padding-bottom:11px;} +.layout-sm-padding-bottom-12{padding-bottom:12px;} +.layout-sm-padding-bottom-13{padding-bottom:13px;} +.layout-sm-padding-bottom-14{padding-bottom:14px;} +.layout-sm-padding-bottom-15{padding-bottom:15px;} +.layout-sm-padding-bottom-16{padding-bottom:16px;} +.layout-sm-padding-bottom-17{padding-bottom:17px;} +.layout-sm-padding-bottom-18{padding-bottom:18px;} +.layout-sm-padding-bottom-19{padding-bottom:19px;} +.layout-sm-padding-bottom-20{padding-bottom:20px;} +.layout-sm-padding-bottom-21{padding-bottom:21px;} +.layout-sm-padding-bottom-22{padding-bottom:22px;} +.layout-sm-padding-bottom-23{padding-bottom:23px;} +.layout-sm-padding-bottom-24{padding-bottom:24px;} +.layout-sm-padding-bottom-25{padding-bottom:25px;} +.layout-sm-padding-bottom-26{padding-bottom:26px;} +.layout-sm-padding-bottom-27{padding-bottom:27px;} +.layout-sm-padding-bottom-28{padding-bottom:28px;} +.layout-sm-padding-bottom-29{padding-bottom:29px;} +.layout-sm-padding-bottom-30{padding-bottom:30px;} +.layout-sm-padding-bottom-31{padding-bottom:31px;} +.layout-sm-padding-bottom-32{padding-bottom:32px;} +.layout-sm-padding-bottom-33{padding-bottom:33px;} +.layout-sm-padding-bottom-34{padding-bottom:34px;} +.layout-sm-padding-bottom-35{padding-bottom:35px;} +.layout-sm-padding-bottom-36{padding-bottom:36px;} +.layout-sm-padding-bottom-37{padding-bottom:37px;} +.layout-sm-padding-bottom-38{padding-bottom:38px;} +.layout-sm-padding-bottom-39{padding-bottom:39px;} +.layout-sm-padding-bottom-40{padding-bottom:40px;} +.layout-sm-padding-bottom-41{padding-bottom:41px;} +.layout-sm-padding-bottom-42{padding-bottom:42px;} +.layout-sm-padding-bottom-43{padding-bottom:43px;} +.layout-sm-padding-bottom-44{padding-bottom:44px;} +.layout-sm-padding-bottom-45{padding-bottom:45px;} +.layout-sm-padding-bottom-46{padding-bottom:46px;} +.layout-sm-padding-bottom-47{padding-bottom:47px;} +.layout-sm-padding-bottom-48{padding-bottom:48px;} +.layout-sm-padding-bottom-49{padding-bottom:49px;} +.layout-sm-padding-bottom-50{padding-bottom:50px;} +.layout-sm-padding-bottom-51{padding-bottom:51px;} +.layout-sm-padding-bottom-52{padding-bottom:52px;} +.layout-sm-padding-bottom-53{padding-bottom:53px;} +.layout-sm-padding-bottom-54{padding-bottom:54px;} +.layout-sm-padding-bottom-55{padding-bottom:55px;} +.layout-sm-padding-bottom-56{padding-bottom:56px;} +.layout-sm-padding-bottom-57{padding-bottom:57px;} +.layout-sm-padding-bottom-58{padding-bottom:58px;} +.layout-sm-padding-bottom-59{padding-bottom:59px;} +.layout-sm-padding-bottom-60{padding-bottom:60px;} + +.layout-sm-padding-left-1{padding-left:1px;} +.layout-sm-padding-left-2{padding-left:2px;} +.layout-sm-padding-left-3{padding-left:3px;} +.layout-sm-padding-left-4{padding-left:4px;} +.layout-sm-padding-left-5{padding-left:5px;} +.layout-sm-padding-left-6{padding-left:6px;} +.layout-sm-padding-left-7{padding-left:7px;} +.layout-sm-padding-left-8{padding-left:8px;} +.layout-sm-padding-left-9{padding-left:9px;} +.layout-sm-padding-left-10{padding-left:10px;} +.layout-sm-padding-left-11{padding-left:11px;} +.layout-sm-padding-left-12{padding-left:12px;} +.layout-sm-padding-left-13{padding-left:13px;} +.layout-sm-padding-left-14{padding-left:14px;} +.layout-sm-padding-left-15{padding-left:15px;} +.layout-sm-padding-left-16{padding-left:16px;} +.layout-sm-padding-left-17{padding-left:17px;} +.layout-sm-padding-left-18{padding-left:18px;} +.layout-sm-padding-left-19{padding-left:19px;} +.layout-sm-padding-left-20{padding-left:20px;} +.layout-sm-padding-left-21{padding-left:21px;} +.layout-sm-padding-left-22{padding-left:22px;} +.layout-sm-padding-left-23{padding-left:23px;} +.layout-sm-padding-left-24{padding-left:24px;} +.layout-sm-padding-left-25{padding-left:25px;} +.layout-sm-padding-left-26{padding-left:26px;} +.layout-sm-padding-left-27{padding-left:27px;} +.layout-sm-padding-left-28{padding-left:28px;} +.layout-sm-padding-left-29{padding-left:29px;} +.layout-sm-padding-left-30{padding-left:30px;} +.layout-sm-padding-left-31{padding-left:31px;} +.layout-sm-padding-left-32{padding-left:32px;} +.layout-sm-padding-left-33{padding-left:33px;} +.layout-sm-padding-left-34{padding-left:34px;} +.layout-sm-padding-left-35{padding-left:35px;} +.layout-sm-padding-left-36{padding-left:36px;} +.layout-sm-padding-left-37{padding-left:37px;} +.layout-sm-padding-left-38{padding-left:38px;} +.layout-sm-padding-left-39{padding-left:39px;} +.layout-sm-padding-left-40{padding-left:40px;} +.layout-sm-padding-left-41{padding-left:41px;} +.layout-sm-padding-left-42{padding-left:42px;} +.layout-sm-padding-left-43{padding-left:43px;} +.layout-sm-padding-left-44{padding-left:44px;} +.layout-sm-padding-left-45{padding-left:45px;} +.layout-sm-padding-left-46{padding-left:46px;} +.layout-sm-padding-left-47{padding-left:47px;} +.layout-sm-padding-left-48{padding-left:48px;} +.layout-sm-padding-left-49{padding-left:49px;} +.layout-sm-padding-left-50{padding-left:50px;} +.layout-sm-padding-left-51{padding-left:51px;} +.layout-sm-padding-left-52{padding-left:52px;} +.layout-sm-padding-left-53{padding-left:53px;} +.layout-sm-padding-left-54{padding-left:54px;} +.layout-sm-padding-left-55{padding-left:55px;} +.layout-sm-padding-left-56{padding-left:56px;} +.layout-sm-padding-left-57{padding-left:57px;} +.layout-sm-padding-left-58{padding-left:58px;} +.layout-sm-padding-left-59{padding-left:59px;} +.layout-sm-padding-left-60{padding-left:60px;} + + +/** + * 模块基础样式 + */ +.module-content, +.module-images-container, +.module-slider-container, +.module-video-container, +.module-title-container, +.module-goods-container, +.module-list-content, +.module-list-content .item .module-item, +.module-list-content .item .module-item .module-title, +.module-list-content .item .module-item .module-price {overflow: hidden;} + +/** + * 模块类型样式 - 标题 + */ +.module-title-container .module-title-content{position:relative} +.module-title-container .title-main{font-size:16px;font-weight:600;color:#666} +.module-title-container .title-vice{color:#999;font-size:12px;margin-left:10px} +.module-title-container .more-content{position:absolute;top:calc(50% - 8px);right:0;font-size:12px;} + +/** + * 模块内容基础样式 + */ +.layout-content image, +.layout-content video{display:block;max-width:100%;max-height:100%} + +/** + * 不展示滚动导航点 + */ +.layout-content .slides-rolling-not-dot{margin-bottom:0px} + +/** + * 媒体文件固定大小 + */ +.module-fixed-doc{display:block;overflow:hidden;} +.module-fixed-doc-ent-width{width:100% !important;} +.module-fixed-doc-ent-height{height:100% !important;} +.module-fixed-doc-ent-auto{margin:0 auto !important;} +.module-fixed-doc-ent-cover{object-fit:cover !important;} + +/** + * 滚动列表 + */ +.module-list-rolling{width:100%;white-space:nowrap;box-sizing:border-box} +.module-list-rolling .item{display:inline-block;position:relative} \ No newline at end of file diff --git a/sourcecode/alipay/default/components/layout/layout.axml b/sourcecode/alipay/default/components/layout/layout.axml new file mode 100755 index 000000000..bbdf95066 --- /dev/null +++ b/sourcecode/alipay/default/components/layout/layout.axml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.title}} + {{currency_symbol}}{{item.price}} + + + + + + + + + + + + + + + {{item.title}} + {{currency_symbol}}{{item.price}} + + + + + + + + + + + + {{vss.config.title}} + {{vss.config.title_vice}} + + {{vss.config.title_more}} > + + + + + + + + + + + + + diff --git a/sourcecode/alipay/default/components/layout/layout.js b/sourcecode/alipay/default/components/layout/layout.js new file mode 100755 index 000000000..8eae9a322 --- /dev/null +++ b/sourcecode/alipay/default/components/layout/layout.js @@ -0,0 +1,37 @@ +const app = getApp(); +Component({ + data: { + // 基础配置 + currency_symbol: app.data.currency_symbol, + + // 轮播基础配置 + indicator_color: 'rgba(0, 0, 0, .3)', + indicator_active_color: '#e31c55', + circular: true, + }, + props: { + data: [] + }, + // 页面被展示 + didMount() { + // 配置初始化 + this.init_config(true); + }, + methods: { + // 初始化配置 + init_config(status) { + if((status || false) == true) { + this.setData({ + currency_symbol: app.get_config('currency_symbol') || app.data.currency_symbol + }); + } else { + app.is_config(this, 'init_config'); + } + }, + + // 链接地址事件 + layout_url_event(e) { + app.url_event(e); + }, + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/components/layout/layout.json b/sourcecode/alipay/default/components/layout/layout.json new file mode 100755 index 000000000..32640e0dc --- /dev/null +++ b/sourcecode/alipay/default/components/layout/layout.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/sourcecode/alipay/default/components/quick-nav/quick-nav.js b/sourcecode/alipay/default/components/quick-nav/quick-nav.js index fd993d79c..3bcccbd43 100644 --- a/sourcecode/alipay/default/components/quick-nav/quick-nav.js +++ b/sourcecode/alipay/default/components/quick-nav/quick-nav.js @@ -7,20 +7,16 @@ Component({ system: null, x: 0, y: 0, - is_first: 1, }, // 页面被展示 didMount() { - // 非首次进入则重新初始化配置接口 - if(this.data.is_first == 0) { - app.init_config(); - } + // 配置初始化 + this.init_config(true); // 数据设置 var system = app.get_system_info(); this.setData({ - is_first: 0, system: system, x: 5, y: (system.windowHeight || 450)-160, diff --git a/sourcecode/alipay/default/pages/design/design.acss b/sourcecode/alipay/default/pages/design/design.acss new file mode 100644 index 000000000..ff0487a09 --- /dev/null +++ b/sourcecode/alipay/default/pages/design/design.acss @@ -0,0 +1,155 @@ +/** + * 搜索 + */ +.search { + background: #d2364c; + padding: 20rpx 10rpx 25rpx 20rpx; + position: relative; +} +.search input { + width: calc(100% - 328rpx); + padding-left: 15rpx; + font-size: 24rpx; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.search input,.search-btn button { + height: 52rpx; + line-height: 52rpx; + border-radius: 6rpx; +} +.search-btn { + position: absolute; + top: 20rpx; + right: 20rpx; +} +.search-btn button { + color: #fff; + width: 150rpx; + font-size: 24rpx; +} +.search-btn button:first-child { + background: #ff8c00; + border: 1px solid #ff8c00; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.search-btn button:last-child { + background: #483E39; + border: 1px solid #483E39; + margin-left: 10rpx; +} + +/** + * 头部 + */ +.header { + padding: 20rpx 10rpx; +} +.shop-logo { + width: 280rpx; + margin-top: 5rpx; +} +.base-bottom image { + width: 28rpx; + height: 28rpx; + margin-right: 5rpx; +} +.header .base { + width: calc(100% - 320rpx); +} +.shop-title { + font-size: 32rpx; + font-weight: bold; + line-height: 40rpx; +} +.shop-auth-icon { + background-color: #f4c985; + border: 1px solid #e7ba77; + border-radius: 6rpx; + color: #856651; + text-align: center; + padding: 2rpx 12rpx; + font-size: 24rpx; + font-weight: bold; + margin-right: 10rpx; +} + +/** + * 客服 + */ +.header-service { + width: 390rpx; + position: absolute; + left: 80rpx; + top: 210rpx; + z-index: 2; + font-size: 24rpx; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.header-service image { + width: 260rpx; + height: 260rpx; +} +.header-service .item { + padding: 20rpx; +} + +/** + * 滚动 + */ +.nav-roll { + width: 100%; + white-space: nowrap; + box-sizing: border-box; +} +.nav-roll .item { + display: inline-block; +} + +/** + * 导航 + */ +.nav { + height: 70rpx; + border-bottom: 1px solid #d2364c; +} +.nav .nav-scroll { + float: right; + width: calc(100% - 230rpx); +} +.nav .item { + padding: 0 20rpx; + font-weight: bold; +} +.nav-shop-category { + padding-right: 38rpx !important; + background-size: 14px 14px; +} + +/** + * 导航商品分类 + */ +.nav-category { + background: #d2364c; + width: 220rpx; + z-index: 1; + position: absolute; + margin-top: 50rpx; + border: 1px solid #d2364c; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.nav-category .category-scroll { + max-height: 600rpx; +} +.nav-category .item { + padding: 15rpx 20rpx; + display: block; + font-weight: inherit; + color: #f1f1f1; +} +.nav-category .item:not(:last-child) { + border-bottom: 1px solid #c72e44; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/design/design.axml b/sourcecode/alipay/default/pages/design/design.axml new file mode 100644 index 000000000..0fce54b08 --- /dev/null +++ b/sourcecode/alipay/default/pages/design/design.axml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/design/design.js b/sourcecode/alipay/default/pages/design/design.js new file mode 100644 index 000000000..cc73db66a --- /dev/null +++ b/sourcecode/alipay/default/pages/design/design.js @@ -0,0 +1,83 @@ +const app = getApp(); +Page({ + data: { + data_bottom_line_status: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + params: null, + data: null, + layout_data: [] + }, + + onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); + this.setData({ + params: params, + }); + }, + + onShow() { + this.get_data(); + }, + + // 获取数据 + get_data() { + var self = this; + my.request({ + url: app.get_request_url("index", "design"), + method: "POST", + data: {"id": this.data.params.id || 0}, + dataType: "json", + success: res => { + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + data: ((data.data || null) != null && data.data.length != 0) ? data.data : null, + layout_data: data.layout_data || [], + data_list_loding_msg: '', + data_list_loding_status: 0, + data_bottom_line_status: true, + }); + + // 标题名称 + if((this.data.data || null) != null) + { + my.setNavigationBar({title: this.data.data.name}); + } + } else { + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: res.data.msg, + }); + } + }, + fail: () => { + my.stopPullDownRefresh(); + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: '服务器请求出错', + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data(); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + return { + title: this.data.data.name || this.data.data.seo_title || app.data.application_title, + desc: this.data.data.seo_desc || app.data.application_describe, + path: '/pages/design/design?id='+this.data.data.id+'&referrer=' + user_id + }; + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/design/design.json b/sourcecode/alipay/default/pages/design/design.json new file mode 100644 index 000000000..51447b40d --- /dev/null +++ b/sourcecode/alipay/default/pages/design/design.json @@ -0,0 +1,6 @@ +{ + "pullRefresh": true, + "usingComponents": { + "component-layout": "/components/layout/layout" + } +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/goods-detail/goods-detail.acss b/sourcecode/alipay/default/pages/goods-detail/goods-detail.acss index 38af6e1d9..ae0451133 100644 --- a/sourcecode/alipay/default/pages/goods-detail/goods-detail.acss +++ b/sourcecode/alipay/default/pages/goods-detail/goods-detail.acss @@ -504,4 +504,41 @@ .plugins-salerecords-tips-bottom-center { bottom: 10%; top: auto; +} + +/** + * 多商户 - 插件 + */ +.plugins-shop-container { + padding: 20rpx 10rpx; +} +.plugins-shop-logo { + width: 120rpx; + height: 120rpx !important; +} +.plugins-shop-base { + width: calc(100% - 190rpx); + padding-right: 50rpx; +} +.plugins-shop-title { + font-size: 32rpx; + font-weight: bold; + line-height: 40rpx; +} +.plugins-shop-auth-icon { + background-color: #f4c985; + border: 1px solid #e7ba77; + border-radius: 6rpx; + color: #856651; + text-align: center; + padding: 2rpx 12rpx; + font-size: 24rpx; + font-weight: bold; + margin-right: 10rpx; +} +.plugins-shop-desc { + color: #888; + font-size: 24rpx; + min-height: 72rpx; + line-height: 36rpx; } \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/goods-detail/goods-detail.axml b/sourcecode/alipay/default/pages/goods-detail/goods-detail.axml index b036edb68..88eee6c40 100644 --- a/sourcecode/alipay/default/pages/goods-detail/goods-detail.axml +++ b/sourcecode/alipay/default/pages/goods-detail/goods-detail.axml @@ -118,6 +118,20 @@ + + + + + + + {{plugins_shop_data.auth_type_name}} + {{plugins_shop_data.name}} + + {{plugins_shop_data.describe}} + + + + @@ -134,13 +148,6 @@ - - - @@ -177,12 +184,12 @@ - - 首页 + + {{nav_home_button_info.text}} - - {{goods_favor_text}} + + {{nav_favor_button_info.text}} diff --git a/sourcecode/alipay/default/pages/goods-detail/goods-detail.js b/sourcecode/alipay/default/pages/goods-detail/goods-detail.js index 92ebf8098..c3c79616c 100644 --- a/sourcecode/alipay/default/pages/goods-detail/goods-detail.js +++ b/sourcecode/alipay/default/pages/goods-detail/goods-detail.js @@ -18,8 +18,6 @@ Page({ goods_content_app: [], popup_status: false, - goods_favor_text: '收藏', - goods_favor_icon: '/images/default-favor-icon-0.png', temp_buy_number: 1, buy_event_type: 'buy', buy_button: {}, @@ -30,7 +28,19 @@ Page({ goods_spec_base_images: '', show_field_price_text: null, - goods_video_is_autoplay: false, + goods_video_is_autoplay: false, + + // 导航首页按钮 + nav_home_button_info: { + "text": "首页", + "icon": "/images/default-home-icon.png", + "value": "/pages/index/index" + }, + // 导航收藏按钮 + nav_favor_button_info: { + "text": "收藏", + "status": 0 + }, // 购物车快捷导航 quick_nav_cart_count: 0, @@ -65,6 +75,9 @@ Page({ plugins_salerecords_timer: null, plugins_salerecords_tips_content: null, plugins_salerecords_tips_ent: '', + + // 多商户 + plugins_shop_data: null, }, onLoad(params) { @@ -151,8 +164,10 @@ Page({ goods_specifications_choose: data.goods.specifications.choose || [], goods_content_app: data.goods.content_app || [], temp_buy_number: data.goods.buy_min_number || 1, - goods_favor_text: (data.goods.is_favor == 1) ? '已收藏' : '收藏', - goods_favor_icon: '/images/default-favor-icon-' + data.goods.is_favor+'.png', + nav_favor_button_info: { + "text": ((data.goods.is_favor == 1) ? '已' : '')+'收藏', + "status": data.goods.is_favor + }, buy_button: data.buy_button || null, goods_spec_base_price: data.goods.price, @@ -168,6 +183,8 @@ Page({ quick_nav_cart_count: data.common_cart_total || 0, plugins_salerecords_data: ((data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0) ? null : data.plugins_salerecords_data, + + plugins_shop_data: ((data.plugins_shop_data || null) == null || data.plugins_shop_data.length <= 0) ? null : data.plugins_shop_data, }); // 限时秒杀倒计时 @@ -195,6 +212,18 @@ Page({ // 购买记录提示 this.plugins_salerecords_tips_handle(); + + // 导航首页按钮、多商户 + if(this.data.plugins_shop_data != null) + { + this.setData({ + nav_home_button_info: { + "text": "店铺", + "icon": this.data.plugins_shop_data.shop_icon, + "value": "/pages/plugins/shop/detail/detail?id="+this.data.plugins_shop_data.id + } + }); + } } else { self.setData({ data_bottom_line_status: false, @@ -261,9 +290,13 @@ Page({ // 进入店铺 shop_event(e) { - my.switchTab({ - url: '/pages/index/index' - }); + var value = this.data.nav_home_button_info.value; + if (app.is_tabbar_pages(value)) + { + my.switchTab({ url: value }); + } else { + my.navigateTo({ url: value }); + } }, // 导航购买按钮事件 @@ -315,8 +348,10 @@ Page({ { this.setData({ 'goods.is_favor': res.data.data.status, - goods_favor_text: res.data.data.text, - goods_favor_icon: '/images/default-favor-icon-'+res.data.data.status+'.png' + nav_favor_button_info: { + "text": res.data.data.text, + "status": res.data.data.status + } }); app.showToast(res.data.msg, 'success'); } else { diff --git a/sourcecode/alipay/default/pages/index/index.axml b/sourcecode/alipay/default/pages/index/index.axml index 8adafc5c1..88017f369 100644 --- a/sourcecode/alipay/default/pages/index/index.axml +++ b/sourcecode/alipay/default/pages/index/index.axml @@ -12,11 +12,14 @@ {{common_shop_notice}} - - + + + + - - + + + @@ -25,8 +28,15 @@ - - + + + + + + + + + {{floor.name}} @@ -58,6 +68,7 @@ + @@ -75,7 +86,7 @@ - {{item.title}} + {{item.title}} {{item.add_time}} diff --git a/sourcecode/alipay/default/pages/index/index.js b/sourcecode/alipay/default/pages/index/index.js index 0d9b04768..d7f37c6d4 100644 --- a/sourcecode/alipay/default/pages/index/index.js +++ b/sourcecode/alipay/default/pages/index/index.js @@ -11,6 +11,7 @@ Page({ // 基础配置 currency_symbol: app.data.currency_symbol, common_shop_notice: null, + home_index_floor_data_type: 0, common_app_is_enable_search: 0, common_app_is_enable_answer: 0, common_app_is_header_nav_fixed: 0, @@ -44,6 +45,7 @@ Page({ this.setData({ currency_symbol: app.get_config('currency_symbol'), common_shop_notice: app.get_config('config.common_shop_notice'), + home_index_floor_data_type: app.get_config('config.home_index_floor_data_type'), common_app_is_enable_search: app.get_config('config.common_app_is_enable_search'), common_app_is_enable_answer: app.get_config('config.common_app_is_enable_answer'), common_app_is_header_nav_fixed: app.get_config('config.common_app_is_header_nav_fixed'), diff --git a/sourcecode/alipay/default/pages/index/index.json b/sourcecode/alipay/default/pages/index/index.json index e2fe61b65..115d137fe 100755 --- a/sourcecode/alipay/default/pages/index/index.json +++ b/sourcecode/alipay/default/pages/index/index.json @@ -3,6 +3,7 @@ "usingComponents": { "component-quick-nav": "/components/quick-nav/quick-nav", "component-icon-nav": "/components/icon-nav/icon-nav", - "component-slider": "/components/slider/slider" + "component-slider": "/components/slider/slider", + "component-layout": "/components/layout/layout" } } \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/brand/index/index.js b/sourcecode/alipay/default/pages/plugins/brand/index/index.js index 5bd39d618..bccd8fcae 100644 --- a/sourcecode/alipay/default/pages/plugins/brand/index/index.js +++ b/sourcecode/alipay/default/pages/plugins/brand/index/index.js @@ -19,9 +19,6 @@ Page({ onShow() { this.get_data(); - - // 显示分享菜单 - app.show_share_menu(); }, // 获取数据 @@ -116,14 +113,4 @@ Page({ path: '/pages/plugins/brand/index/index?referrer=' + user_id }; }, - - // 分享朋友圈 - onShareTimeline() { - var user_id = app.get_user_cache_info('id', 0) || 0; - return { - title: this.data.data_base.seo_title || '品牌 - '+app.data.application_title, - query: 'referrer=' + user_id, - imageUrl: this.data.data_base.right_images || '' - }; - }, }); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/design/design.acss b/sourcecode/alipay/default/pages/plugins/shop/design/design.acss new file mode 100644 index 000000000..d6418d1dd --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/design/design.acss @@ -0,0 +1,157 @@ +/** + * 搜索 + */ +.search { + background: #d2364c; + padding: 20rpx 10rpx 25rpx 20rpx; + position: relative; +} +.search input { + width: calc(100% - 328rpx); + padding-left: 15rpx; + font-size: 24rpx; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + padding-top: 0; + padding-bottom: 0; +} +.search input,.search-btn button { + height: 52rpx; + line-height: 52rpx; + border-radius: 6rpx; +} +.search-btn { + position: absolute; + top: 20rpx; + right: 20rpx; +} +.search-btn button { + color: #fff; + width: 150rpx; + font-size: 24rpx; +} +.search-btn button:first-child { + background: #ff8c00; + border: 1px solid #ff8c00; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.search-btn button:last-child { + background: #483E39; + border: 1px solid #483E39; + margin-left: 10rpx; +} + +/** + * 头部 + */ +.header { + padding: 20rpx 10rpx; +} +.shop-logo { + width: 280rpx; + margin-top: 5rpx; +} +.base-bottom image { + width: 28rpx; + height: 28rpx; + margin-right: 5rpx; +} +.header .base { + width: calc(100% - 320rpx); +} +.shop-title { + font-size: 32rpx; + font-weight: bold; + line-height: 40rpx; +} +.shop-auth-icon { + background-color: #f4c985; + border: 1px solid #e7ba77; + border-radius: 6rpx; + color: #856651; + text-align: center; + padding: 2rpx 12rpx; + font-size: 24rpx; + font-weight: bold; + margin-right: 10rpx; +} + +/** + * 客服 + */ +.header-service { + width: 390rpx; + position: absolute; + left: 80rpx; + top: 210rpx; + z-index: 2; + font-size: 24rpx; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.header-service image { + width: 260rpx; + height: 260rpx; +} +.header-service .item { + padding: 20rpx; +} + +/** + * 滚动 + */ +.nav-roll { + width: 100%; + white-space: nowrap; + box-sizing: border-box; +} +.nav-roll .item { + display: inline-block; +} + +/** + * 导航 + */ +.nav { + height: 70rpx; + border-bottom: 1px solid #d2364c; +} +.nav .nav-scroll { + float: right; + width: calc(100% - 230rpx); +} +.nav .item { + padding: 0 20rpx; + font-weight: bold; +} +.nav-shop-category { + padding-right: 38rpx !important; + background-size: 14px 14px; +} + +/** + * 导航商品分类 + */ +.nav-category { + background: #d2364c; + width: 220rpx; + z-index: 1; + position: absolute; + margin-top: 50rpx; + border: 1px solid #d2364c; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.nav-category .category-scroll { + max-height: 600rpx; +} +.nav-category .item { + padding: 15rpx 20rpx; + display: block; + font-weight: inherit; + color: #f1f1f1; +} +.nav-category .item:not(:last-child) { + border-bottom: 1px solid #c72e44; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/design/design.axml b/sourcecode/alipay/default/pages/plugins/shop/design/design.axml new file mode 100644 index 000000000..7df3d0b91 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/design/design.axml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/design/design.js b/sourcecode/alipay/default/pages/plugins/shop/design/design.js new file mode 100644 index 000000000..5190e301a --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/design/design.js @@ -0,0 +1,201 @@ +const app = getApp(); +Page({ + data: { + data_bottom_line_status: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + params: null, + user: null, + data_base: null, + shop: null, + shop_favor_user: [], + shop_navigation: [], + shop_goods_category: [], + data: null, + layout_data: [], + + // 基础配置 + search_keywords_value: '', + header_service_status: false, + nav_category_status: false, + shop_category_tab_value: 0, + shop_favor_info: { + "text": "收藏", + "status": 0, + "count": 0 + }, + }, + + onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); + this.setData({ + params: params, + user: app.get_user_cache_info(), + }); + }, + + onShow() { + this.get_data(); + }, + + // 获取数据 + get_data() { + var self = this; + my.request({ + url: app.get_request_url("index", "design", "shop"), + method: "POST", + data: {"id": this.data.params.id || 0}, + dataType: "json", + success: res => { + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + data_base: data.base || null, + shop: ((data.shop || null) == null || data.shop.length <= 0) ? null : data.shop, + shop_favor_user: data.shop_favor_user || [], + shop_navigation: data.shop_navigation || [], + shop_goods_category: data.shop_goods_category || [], + data: ((data.data || null) != null && data.data.length != 0) ? data.data : null, + layout_data: data.layout_data || [], + data_list_loding_msg: '', + data_list_loding_status: 0, + data_bottom_line_status: true, + }); + + // 收藏信息 + if((this.data.shop || null) != null) + { + var status = (this.data.shop_favor_user.indexOf(this.data.shop.id) != -1) ? 1 : 0; + this.setData({ + shop_favor_info: { + "count": this.data.shop.shop_favor_count || 0, + "status": status, + "text": ((status == 1) ? '已' : '')+'收藏' + } + }); + } + + // 标题名称 + if((this.data.data || null) != null) + { + my.setNavigationBar({title: this.data.data.name}); + } + } else { + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: res.data.msg, + }); + } + }, + fail: () => { + my.stopPullDownRefresh(); + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: '服务器请求出错', + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data(); + }, + + // 店铺收藏事件 + shop_favor_event(e) { + var user = app.get_user_info(this, 'shop_favor_event'); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + my.navigateTo({ + url: "/pages/login/login?event_callback=shop_favor_event" + }); + return false; + } else { + my.showLoading({content: '处理中...'}); + my.request({ + url: app.get_request_url("favor", "shopfavor", "shop"), + method: 'POST', + data: {"id": this.data.shop.id}, + dataType: 'json', + success: (res) => { + my.hideLoading(); + if(res.data.code == 0) + { + this.setData({shop_favor_info: res.data.data}); + app.showToast(res.data.msg, "success"); + } else { + if (app.is_login_check(res.data, this, 'shop_favor_event')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.hideLoading(); + app.showToast('服务器请求出错'); + } + }); + } + } + }, + + // 搜索输入事件 + search_keywords_event(e) { + this.setData({search_keywords_value: e.detail.value || ''}); + }, + + // 搜索事件 + search_button_event(e) { + var value = e.currentTarget.dataset.value || null; + my.navigateTo({ + url: value+'keywords='+this.data.search_keywords_value || '', + }); + }, + + // 导航分类事件 + header_service_event(e) { + this.setData({header_service_status: !this.data.header_service_status}); + }, + + // 导航分类事件 + nav_shop_category_event(e) { + this.setData({nav_category_status: !this.data.nav_category_status}); + }, + + // 导航分类事件 + shop_category_event(e) { + var value = e.currentTarget.dataset.value || null; + my.navigateTo({ url: '/pages/plugins/shop/search/search?shop_id='+this.data.shop.id+'&category_id='+value }); + }, + + // 导航事件 + nav_event(e) { + app.url_event(e); + }, + + // 剪切板 + text_copy_event(e) { + app.text_copy_event(e); + }, + + // 图片预览 + image_show_event(e) { + app.image_show_event(e); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + return { + title: this.data.data.name || this.data.data.seo_title || app.data.application_title, + desc: this.data.data.seo_desc || app.data.application_describe, + path: '/pages/plugins/shop/design/design?id='+this.data.data.id+'&referrer=' + user_id + }; + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/design/design.json b/sourcecode/alipay/default/pages/plugins/shop/design/design.json new file mode 100644 index 000000000..4c74b3c81 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/design/design.json @@ -0,0 +1,10 @@ +{ + "pullRefresh": true, + "navigationBarBackgroundColor": "#d2364c", + "titleBarColor": "#d2364c", + "backgroundColorBottom": "#f5f5f5", + "backgroundTextStyle": "light", + "usingComponents": { + "component-layout": "/components/layout/layout" + } +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/detail/detail.acss b/sourcecode/alipay/default/pages/plugins/shop/detail/detail.acss new file mode 100644 index 000000000..95ad41bf8 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/detail/detail.acss @@ -0,0 +1,201 @@ +/** + * 搜索 + */ +.search { + background: #d2364c; + padding: 20rpx 10rpx 25rpx 20rpx; + position: relative; +} +.search input { + width: calc(100% - 328rpx); + padding-left: 15rpx; + font-size: 24rpx; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + padding-top: 0; + padding-bottom: 0; +} +.search input,.search-btn button { + height: 52rpx; + line-height: 52rpx; + border-radius: 6rpx; +} +.search-btn { + position: absolute; + top: 20rpx; + right: 20rpx; +} +.search-btn button { + color: #fff; + width: 150rpx; + font-size: 24rpx; +} +.search-btn button:first-child { + background: #ff8c00; + border: 1px solid #ff8c00; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.search-btn button:last-child { + background: #483E39; + border: 1px solid #483E39; + margin-left: 10rpx; +} + +/** + * 头部 + */ +.header { + padding: 20rpx 10rpx; +} +.shop-logo { + width: 280rpx; + margin-top: 5rpx; +} +.base-bottom image { + width: 28rpx; + height: 28rpx; + margin-right: 5rpx; +} +.header .base { + width: calc(100% - 320rpx); +} +.shop-title { + font-size: 32rpx; + font-weight: bold; + line-height: 40rpx; +} +.shop-auth-icon { + background-color: #f4c985; + border: 1px solid #e7ba77; + border-radius: 6rpx; + color: #856651; + text-align: center; + padding: 2rpx 12rpx; + font-size: 24rpx; + font-weight: bold; + margin-right: 10rpx; +} + +/** + * 客服 + */ +.header-service { + width: 390rpx; + position: absolute; + left: 80rpx; + top: 210rpx; + z-index: 2; + font-size: 24rpx; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.header-service image { + width: 260rpx; + height: 260rpx; +} +.header-service .item { + padding: 20rpx; +} + +/** + * 滚动 + */ +.nav-roll { + width: 100%; + white-space: nowrap; + box-sizing: border-box; +} +.nav-roll .item { + display: inline-block; +} + +/** + * 导航 + */ +.nav { + height: 70rpx; + border-bottom: 1px solid #d2364c; +} +.nav .nav-scroll { + float: right; + width: calc(100% - 230rpx); +} +.nav .item { + padding: 0 20rpx; + font-weight: bold; +} +.nav-shop-category { + padding-right: 38rpx !important; + background-size: 14px 14px; +} + +/** + * 导航商品分类 + */ +.nav-category { + background: #d2364c; + width: 220rpx; + z-index: 1; + position: absolute; + margin-top: 50rpx; + border: 1px solid #d2364c; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.nav-category .category-scroll { + max-height: 600rpx; +} +.nav-category .item { + padding: 15rpx 20rpx; + display: block; + font-weight: inherit; + color: #f1f1f1; +} +.nav-category .item:not(:last-child) { + border-bottom: 1px solid #c72e44; +} + +/** + * 商品分类切换 + */ +.shop-category-list { + padding: 20rpx 10rpx; +} +.shop-category-list .item { + border-radius: 6rpx; + padding: 8rpx 20rpx; + font-size: 24rpx; +} +.shop-category-list .active { + background: #d2364c; + color: #fff; +} + +/** + * 商品列表 + */ +.data-list .items { + width: calc(50% - 5rpx); + margin-bottom: 10rpx; + padding-bottom: 20rpx; +} +.data-list .items:nth-child(2n) { + float: right; +} +.data-list .items:nth-child(2n+1) { + float: left; +} +.data-list .items image { + width: 100%; + height: 200px !important; +} +.data-list .items .base { + text-align: left; + font-size: 32rpx; + padding: 0 15rpx; +} +.data-list .items .base, +.data-list .items .base .price { + margin-top: 15rpx; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/detail/detail.axml b/sourcecode/alipay/default/pages/plugins/shop/detail/detail.axml new file mode 100644 index 000000000..a5da04835 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/detail/detail.axml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + 全部商品 + + + {{item.name}} + + + + + + + + + + + + {{item.title}} + + {{currency_symbol}}{{item.min_price}} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/detail/detail.js b/sourcecode/alipay/default/pages/plugins/shop/detail/detail.js new file mode 100644 index 000000000..1315b0992 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/detail/detail.js @@ -0,0 +1,247 @@ +const app = getApp(); +Page({ + data: { + data_bottom_line_status: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + params: null, + user: null, + data_base: null, + shop: null, + shop_favor_user: [], + shop_navigation: [], + shop_goods_category: [], + data: null, + goods_list: [], + + // 基础配置 + currency_symbol: app.data.currency_symbol, + search_keywords_value: '', + header_service_status: false, + nav_category_status: false, + shop_category_tab_value: 0, + shop_favor_info: { + "text": "收藏", + "status": 0, + "count": 0 + }, + }, + + onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); + this.setData({ + params: params, + user: app.get_user_cache_info(), + }); + }, + + onShow() { + this.get_data(); + + // 初始化配置 + this.init_config(); + }, + + // 初始化配置 + init_config(status) { + if((status || false) == true) { + this.setData({ + currency_symbol: app.get_config('currency_symbol'), + }); + } else { + app.is_config(this, 'init_config'); + } + }, + + // 获取数据 + get_data() { + var self = this; + my.request({ + url: app.get_request_url("detail", "index", "shop"), + method: "POST", + data: {"id": this.data.params.id || 0}, + dataType: "json", + success: res => { + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + self.setData({ + data_base: data.base || null, + shop: ((data.shop || null) == null || data.shop.length <= 0) ? null : data.shop, + shop_favor_user: data.shop_favor_user || [], + shop_navigation: data.shop_navigation || [], + shop_goods_category: data.shop_goods_category || [], + data: data.data || null, + goods_list: ((data.data || null) != null && (data.data.goods || null) != null && data.data.goods.length > 0) ? data.data.goods : [], + data_list_loding_msg: '', + data_list_loding_status: 0, + data_bottom_line_status: true, + }); + + // 自动模式数据、商品列表切换处理 + if((this.data.shop || null) != null && (this.data.shop.data_model || 0) == 0) + { + this.shop_category_tab_handle(); + } + + // 收藏信息 + if((this.data.shop || null) != null) + { + var status = (this.data.shop_favor_user.indexOf(this.data.shop.id) != -1) ? 1 : 0; + this.setData({ + shop_favor_info: { + "count": this.data.shop.shop_favor_count || 0, + "status": status, + "text": ((status == 1) ? '已' : '')+'收藏' + } + }); + } + + // 标题名称 + if((this.data.shop || null) != null) + { + my.setNavigationBar({title: this.data.shop.name}); + } + } else { + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: res.data.msg, + }); + } + }, + fail: () => { + my.stopPullDownRefresh(); + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: '服务器请求出错', + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data(); + }, + + // 店铺收藏事件 + shop_favor_event(e) { + var user = app.get_user_info(this, 'shop_favor_event'); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + my.navigateTo({ + url: "/pages/login/login?event_callback=shop_favor_event" + }); + return false; + } else { + my.showLoading({content: '处理中...'}); + my.request({ + url: app.get_request_url("favor", "shopfavor", "shop"), + method: 'POST', + data: {"id": this.data.shop.id}, + dataType: 'json', + success: (res) => { + my.hideLoading(); + if(res.data.code == 0) + { + this.setData({shop_favor_info: res.data.data}); + app.showToast(res.data.msg, "success"); + } else { + if (app.is_login_check(res.data, this, 'shop_favor_event')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.hideLoading(); + app.showToast('服务器请求出错'); + } + }); + } + } + }, + + // 搜索输入事件 + search_keywords_event(e) { + this.setData({search_keywords_value: e.detail.value || ''}); + }, + + // 搜索事件 + search_button_event(e) { + var value = e.currentTarget.dataset.value || null; + my.navigateTo({ + url: value+'keywords='+this.data.search_keywords_value || '', + }); + }, + + // 导航分类事件 + header_service_event(e) { + this.setData({header_service_status: !this.data.header_service_status}); + }, + + // 导航分类事件 + nav_shop_category_event(e) { + this.setData({nav_category_status: !this.data.nav_category_status}); + }, + + // 导航分类事件 + shop_category_event(e) { + var value = e.currentTarget.dataset.value || null; + my.navigateTo({ url: '/pages/plugins/shop/search/search?shop_id='+this.data.shop.id+'&category_id='+value }); + }, + + // 导航事件 + nav_event(e) { + app.url_event(e); + }, + + // 剪切板 + text_copy_event(e) { + app.text_copy_event(e); + }, + + // 图片预览 + image_show_event(e) { + app.image_show_event(e); + }, + + // 分类切换事件 + shop_category_tab_event(e) { + this.setData({shop_category_tab_value: e.currentTarget.dataset.value || 0}); + this.shop_category_tab_handle(); + }, + + // 分类切换处理 + shop_category_tab_handle() { + var value = this.data.shop_category_tab_value || 0; + var temp = this.data.data; + var goods = []; + if(temp.goods.length > 0) { + for(var i in temp.goods) { + if(temp.goods[i]['shop_category_id'] == value || value == 0) { + goods.push(temp.goods[i]); + } + } + } + + this.setData({ + goods_list: goods, + data_bottom_line_status: (goods.length > 0) + }); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + return { + title: this.data.shop.name || this.data.shop.seo_title || app.data.application_title, + desc: this.data.shop.describe || this.data.shop.seo_desc || app.data.application_describe, + path: '/pages/plugins/shop/detail/detail?id='+this.data.shop.id+'&referrer=' + user_id + }; + }, +}); \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/detail/detail.json b/sourcecode/alipay/default/pages/plugins/shop/detail/detail.json new file mode 100644 index 000000000..4c74b3c81 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/detail/detail.json @@ -0,0 +1,10 @@ +{ + "pullRefresh": true, + "navigationBarBackgroundColor": "#d2364c", + "titleBarColor": "#d2364c", + "backgroundColorBottom": "#f5f5f5", + "backgroundTextStyle": "light", + "usingComponents": { + "component-layout": "/components/layout/layout" + } +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.acss b/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.acss new file mode 100755 index 000000000..62987d519 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.acss @@ -0,0 +1,29 @@ +.item { + padding: 20rpx 10rpx; + position: relative; +} +.logo { + width: 140rpx; + height: 140rpx; + margin-right: 20rpx; +} +.title { + margin-bottom: 15rpx; + font-size: 32rpx; + font-weight: bold; +} +.describe { + font-size: 28rpx; + line-height: 42rpx; + min-height: 84rpx; + width: calc(100% - 325rpx); +} + +.submit-cancel { + position: absolute; + right: 10rpx; + bottom: 20rpx; + border: 1px solid #f7c3b3; + color: #f7c3b3 !important; + padding: 0 35rpx; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.axml b/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.axml new file mode 100755 index 000000000..c19c7b900 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.axml @@ -0,0 +1,20 @@ + + + + + + + {{item.shop_info.name}} + {{item.shop_info.describe}} + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.js b/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.js new file mode 100755 index 000000000..8c9aaf71b --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.js @@ -0,0 +1,184 @@ +const app = getApp(); +Page({ + data: { + data_list: [], + data_page_total: 0, + data_page: 1, + data_list_loding_status: 1, + data_bottom_line_status: false, + }, + + onShow() { + // 数据加载 + this.init(); + }, + + // 获取数据 + init() { + var user = app.get_user_info(this, "init"); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + my.redirectTo({ + url: "/pages/login/login?event_callback=init" + }); + return false; + } else { + // 获取数据 + this.get_data_list(); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + }, + + // 获取数据 + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data.data_bottom_line_status == true) { + return false; + } + } + + // 加载loding + my.showLoading({content: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + // 获取数据 + my.request({ + url: app.get_request_url("index", "shopfavor", "shop"), + method: "POST", + data: { + page: this.data.data_page + }, + dataType: "json", + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + if (res.data.data.data.length > 0) { + if (this.data.data_page <= 1) { + var temp_data_list = res.data.data.data; + } else { + var temp_data_list = this.data.data_list; + var temp_data = res.data.data.data; + for (var i in temp_data) { + temp_data_list.push(temp_data[i]); + } + } + this.setData({ + data_list: temp_data_list, + data_total: res.data.data.total, + data_page_total: res.data.data.page_total, + data_list_loding_status: 3, + data_page: this.data.data_page + 1 + }); + + // 是否还有数据 + if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) + { + this.setData({ data_bottom_line_status: true }); + } else { + this.setData({data_bottom_line_status: false}); + } + } else { + this.setData({ + data_list_loding_status: 0 + }); + } + } else { + this.setData({ + data_list_loding_status: 0 + }); + if (app.is_login_check(res.data, this, 'get_data_list')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data_list(1); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 取消 + cancel_event(e) { + my.confirm({ + title: "温馨提示", + content: "取消后不可恢复,确定继续吗?", + confirmButtonText: "确认", + cancelButtonText: "不了", + success: result => { + if (result.confirm) { + // 参数 + var id = e.currentTarget.dataset.value; + var index = e.currentTarget.dataset.index; + + // 加载loding + my.showLoading({content: "处理中..." }); + + my.request({ + url: app.get_request_url("delete", "shopfavor", "shop"), + method: "POST", + data: {ids: id}, + dataType: "json", + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: res => { + my.hideLoading(); + if (res.data.code == 0) { + var temp_data_list = this.data.data_list; + temp_data_list.splice(index, 1); + this.setData({data_list: temp_data_list}); + if(temp_data_list.length == 0) + { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + + app.showToast(res.data.msg, "success"); + } else { + if (app.is_login_check(res.data)) { + app.showToast(res.data.msg); + } else { + app.showToast('提交失败,请重试!'); + } + } + }, + fail: () => { + my.hideLoading(); + app.showToast("服务器请求出错"); + } + }); + } + } + }); + }, +}); diff --git a/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.json b/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.json new file mode 100755 index 000000000..1e9994a5d --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.json @@ -0,0 +1,6 @@ +{ + "pullRefresh": true, + "defaultTitle": "店铺收藏", + "usingComponents": { + } +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/index/index.acss b/sourcecode/alipay/default/pages/plugins/shop/index/index.acss new file mode 100755 index 000000000..b3cdff726 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/index/index.acss @@ -0,0 +1,59 @@ +/** + * 分类导航 + */ + .nav-list { + width: 100%; + height: 80rpx; + white-space: nowrap; + box-sizing: border-box; + border-bottom: 1px solid #f0f0f0; +} +.nav-list .item { + line-height: 80rpx; + padding: 0 30rpx; + display: inline-block; + position: relative; +} +.nav-list .active { + color: #d2364c; +} + +/** + * 数据列表 + */ +.scroll-box { + height: calc(100vh - 80rpx); +} +.data-list .item { + width: calc(50% - 45rpx); + margin-bottom: 10rpx; + padding: 20rpx; +} +.data-list .item:nth-child(2n) { + float: right; +} +.data-list .item:nth-child(2n+1) { + float: left; +} +.data-list .item image { + width: 100%; + height: 160rpx !important; +} +.data-list .item .base { + padding-top: 20rpx; +} +.data-list .item .name { + font-size: 28rpx; + font-weight: bold; +} +.data-list .item .desc { + color: #999; + margin-top: 10rpx; + font-size: 28rpx; + line-height: 40rpx; + min-height: 80rpx; +} +.data-list .item .base-bottom .bitem { + width: 45%; + font-size: 24rpx; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/index/index.axml b/sourcecode/alipay/default/pages/plugins/shop/index/index.axml new file mode 100755 index 000000000..606a26d94 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/index/index.axml @@ -0,0 +1,42 @@ + + + + 全部 + + {{item.name}} + + + + + + + + + + + + {{item.name}} + {{item.describe}} + + 商品 {{item.goods_count}} + 销量 {{item.goods_sales_count}} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/index/index.js b/sourcecode/alipay/default/pages/plugins/shop/index/index.js new file mode 100755 index 000000000..423e51907 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/index/index.js @@ -0,0 +1,193 @@ +const app = getApp(); +Page({ + data: { + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, + data_list: [], + data_total: 0, + data_page_total: 0, + data_page: 1, + params: null, + data_base: null, + shop_category: [], + nav_active_value: 0, + }, + + onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); + this.setData({params: params}); + + // 数据加载 + this.get_data(); + }, + + // 初始化 + get_data() { + my.showLoading({content: "加载中..." }); + var data = { + "category_id": this.data.nav_tab_value || 0 + }; + my.request({ + url: app.get_request_url("index", "index", "shop"), + method: "POST", + data: data, + dataType: "json", + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + this.setData({ + data_base: data.base || null, + shop_category: data.shop_category || [], + }); + + // 标题名称 + if((this.data.data_base || null) != null && (this.data.data_base.application_name || null) != null) + { + my.setNavigationBar({title: this.data.data_base.application_name}); + } + + // 获取列表数据 + this.get_data_list(1); + } else { + this.setData({ + data_list_loding_status: 0, + data_list_loding_msg: res.data.msg + }); + app.showToast(res.data.msg); + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 获取数据列表 + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data.data_bottom_line_status == true) { + return false; + } + } + + // 加载loding + my.showLoading({content: "加载中..." }); + + // 参数 + var data = { + "category_id": this.data.nav_active_value || 0 + }; + + // 获取数据 + my.request({ + url: app.get_request_url("shoplist", "index", "shop"), + method: "POST", + data: data, + dataType: "json", + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + // 列表数据处理 + if (data.data.length > 0) { + if (this.data.data_page <= 1) { + var temp_data_list = data.data; + } else { + var temp_data_list = this.data.data_list; + var temp_data = data.data; + for (var i in temp_data) { + temp_data_list.push(temp_data[i]); + } + } + this.setData({ + data_list: temp_data_list, + data_total: data.total, + data_page_total: data.page_total, + data_list_loding_status: 3, + data_page: this.data.data_page + 1 + }); + + // 是否还有数据 + if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) + { + this.setData({ data_bottom_line_status: true }); + } else { + this.setData({data_bottom_line_status: false}); + } + } else { + this.setData({ + data_list_loding_status: 0, + }); + if (this.data.data_page <= 1) { + this.setData({ + data_list: [], + data_bottom_line_status: false, + }); + } + } + } else { + this.setData({ + data_list_loding_status: 0, + data_list_loding_msg: res.data.msg + }); + app.showToast(res.data.msg); + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data(); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 导航事件 + nav_event(e) { + this.setData({ + nav_active_value: e.currentTarget.dataset.value || 0, + data_page: 1 + }); + + // 获取列表数据 + this.get_data_list(1); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + return { + title: this.data.data_base.seo_title || this.data.data_base.application_name || app.data.application_title, + desc: this.data.data_base.seo_desc || app.data.application_describe, + path: '/pages/plugins/shop/index/index?referrer=' + user_id + }; + }, +}); diff --git a/sourcecode/alipay/default/pages/plugins/shop/index/index.json b/sourcecode/alipay/default/pages/plugins/shop/index/index.json new file mode 100755 index 000000000..2324545f8 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/index/index.json @@ -0,0 +1,8 @@ +{ + "pullRefresh": true, + "defaultTitle": "所有店铺", + "usingComponents": { + "component-quick-nav": "/components/quick-nav/quick-nav", + "component-popup": "/components/popup/popup" + } +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/public/header.axml b/sourcecode/alipay/default/pages/plugins/shop/public/header.axml new file mode 100644 index 000000000..6087f51e4 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/public/header.axml @@ -0,0 +1,72 @@ + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/search/search.acss b/sourcecode/alipay/default/pages/plugins/shop/search/search.acss new file mode 100755 index 000000000..787ae74c0 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/search/search.acss @@ -0,0 +1,162 @@ +/** + * 排序导航 + */ +.nav-sort { + background: #eee; + } +.nav-sort-content .item { + height: 80rpx; + line-height: 80rpx; + width: 130rpx; +} +.nav-sort-content .item .icon { + width: 30rpx; + height: 30rpx; +} +.nav-sort-content .item text, .nav-sort-content .item image { + vertical-align:middle; +} +.screening-submit { + width: 50rpx; + height: 50rpx; + position: absolute; + top: 15rpx; + right: 20rpx; +} + +/** + * 商品列表 + */ +.scroll-box { + height: calc(100vh - 80rpx); + } +.data-list { + overflow: hidden; +} +.data-list .items { + width: calc(50% - 5rpx); + margin-bottom: 10rpx; + padding-bottom: 20rpx; +} +.data-list .items:nth-child(2n) { + float: right; +} +.data-list .items:nth-child(2n+1) { + float: left; +} +.data-list .items image { + width: 100%; + height: 200px !important; +} +.data-list .items .base { + text-align: left; + font-size: 32rpx; + padding: 0 15rpx; +} +.data-list .items .base, +.data-list .items .base .price { + margin-top: 15rpx; +} + +/** + * 条件 + */ +.search-map { + height: calc(100vh - 80rpx); + width: 680rpx; + overflow-y: scroll; + overflow-x: hidden; +} +.map-keywords { + border-radius: 0 !important; + padding: 0 10rpx; + line-height: 66rpx; + height: 66rpx; + font-size: 26rpx; + box-sizing: border-box; +} +.map-nav { + position: relative; +} +.map-nav .arrow-bottom { + position: absolute; + top: 0; + right: 10rpx; + padding-right: 46rpx; + color: #999; +} +.map-item { + background: #f0f0f0; + line-height: 76rpx; +} +.map-base, +.map-nav { + padding: 0 10rpx; +} +.map-content { + padding: 15rpx; + line-height: 60rpx; +} +.map-text-items view, +.map-images-text-items view { + padding: 0 15rpx; + border-radius: 2px; + margin: 15rpx; + border: 1px solid transparent; +} +.map-images-text-items view { + vertical-align: middle; + border: 1px solid #eee; + width: 150rpx; + height: 72rpx; + line-height: 72rpx; +} +.map-images-text-items view image { + width: 150rpx; + height: calc(100% - 8rpx); + display: block; + margin: 0 auto; + margin-top: 4rpx; +} +.map-text-items view.active, +.map-images-text-items view.active { + border: 1px solid #e23f36; + color: #e23f36; + font-weight: bold; +} +.search-map .search-submit { + height: 80rpx; + line-height: 80rpx; + position: absolute; + left: 0; + bottom: 0; + border-radius: 0; +} +.map-remove-submit { + color: #e23f36; +} + +/** + * 品牌基础信息 + */ +.brand-info { + padding: 35rpx 15rpx; +} +.brand-info image, +.brand-info .info-logo-empty { + width: 300rpx; + height: 130rpx; + border: 1px solid #eee; +} +.brand-info .info-logo-empty { + line-height: 130rpx; +} +.brand-info .info-right { + width: calc(100% - 330rpx); +} +.brand-info .info-desc { + color: #999; + font-size: 28rpx; + line-height: 40rpx; + min-height: 80rpx; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/search/search.axml b/sourcecode/alipay/default/pages/plugins/shop/search/search.axml new file mode 100755 index 000000000..8b720b221 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/search/search.axml @@ -0,0 +1,72 @@ + + + + + + {{item.name}} + + + + + + + + + + + + + + + {{item.title}} + + {{currency_symbol}}{{item.min_price}} + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/shop/search/search.js b/sourcecode/alipay/default/pages/plugins/shop/search/search.js new file mode 100755 index 000000000..5701782bb --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/search/search.js @@ -0,0 +1,343 @@ +const app = getApp(); +Page({ + data: { + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, + data_list: [], + data_total: 0, + data_page_total: 0, + data_page: 1, + params: null, + post_data: {}, + is_show_popup_form: false, + popup_form_loading_status: false, + search_nav_sort_list: [ + { name: "综合", field: "default", sort: "asc", "icon": null }, + { name: "销量", field: "sales_count", sort: "asc", "icon": "default" }, + { name: "热度", field: "access_count", sort: "asc", "icon": "default" }, + { name: "价格", field: "min_price", sort: "asc", "icon": "default" }, + { name: "最新", field: "id", sort: "asc", "icon": "default" } + ], + + // 基础配置 + currency_symbol: app.data.currency_symbol, + + // 搜素条件 + search_map_info: [], + category_list: [], + map_fields_list: { + "category_list": {"height":"82rpx", "default":"82rpx", "form_key":"category_ids"} + }, + }, + + onLoad(params) { + // 初始参数 + this.setData({ + params: params, + post_data: { + wd: params.keywords || '', + shop_id: params.shop_id || 0, + category_ids: ((params.category_id || 0) == 0) ? '' : JSON.stringify({"0":params.category_id}) + } + }); + }, + + onShow() { + // 数据加载 + this.init(); + + // 初始化配置 + this.init_config(); + }, + + // 初始化配置 + init_config(status) { + if((status || false) == true) { + this.setData({ + currency_symbol: app.get_config('currency_symbol'), + }); + } else { + app.is_config(this, 'init_config'); + } + }, + + // 获取数据 + init() { + // 获取数据 + this.get_data_list(); + }, + + // 搜索 + search_event() { + this.setData({ + data_list: [], + data_page: 1 + }); + this.get_data_list(1); + }, + + // 获取数据列表 + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data.data_bottom_line_status == true) { + return false; + } + } + + // 加载loding + my.showLoading({content: "加载中..." }); + + // 参数 + var post_data = this.request_map_handle(); + + // 获取数据 + my.request({ + url: app.get_request_url("index", "search", "shop"), + method: "POST", + data: post_data, + dataType: "json", + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + + // 仅首次请求赋值条件数据 + if(this.data.data_list_loding_status == 1) + { + this.setData({ + search_map_info: data.search_map_info || [], + category_list: data.shop_goods_category || [], + }); + + // 指定分类id选中处理 + if((this.data.params.category_id || 0) != 0 && this.data.category_list.length > 0) + { + var temp = this.data.category_list; + for(var i in temp) + { + if(temp[i]['id'] == this.data.params.category_id) + { + temp[i]['active'] = 1; + } + } + this.setData({category_list: temp}); + } + } + + // 列表数据处理 + if (data.data.length > 0) { + if (this.data.data_page <= 1) { + var temp_data_list = data.data; + } else { + var temp_data_list = this.data.data_list; + var temp_data = data.data; + for (var i in temp_data) { + temp_data_list.push(temp_data[i]); + } + } + this.setData({ + data_list: temp_data_list, + data_total: data.total, + data_page_total: data.page_total, + data_list_loding_status: 3, + data_page: this.data.data_page + 1 + }); + + // 是否还有数据 + if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) + { + this.setData({ data_bottom_line_status: true }); + } else { + this.setData({data_bottom_line_status: false}); + } + } else { + this.setData({ + data_list_loding_status: 0, + }); + if (this.data.data_page <= 1) { + this.setData({ + data_list: [], + data_bottom_line_status: false, + }); + } + } + } else { + this.setData({ + data_list_loding_status: 0, + data_list_loding_msg: res.data.msg + }); + app.showToast(res.data.msg); + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 搜索条件处理 + request_map_handle() { + var params = this.data.params; + var post_data = this.data.post_data; + post_data['page'] = this.data.data_page; + + // 店铺id + post_data['shop_id'] = params['shop_id'] || 0; + + // 搜索条件 + var data = this.data; + for(var i in data.map_fields_list) + { + if((data[i] != null) != null && data[i].length > 0) + { + var temp = {}; + var index = 0; + for(var k in data[i]) + { + if((data[i][k]['active'] || 0) == 1) + { + // 默认取值id + temp[index] = data[i][k]['id']; + index++; + } + } + post_data[data.map_fields_list[i]['form_key']] = (app.get_length(temp) > 0) ? JSON.stringify(temp) : ''; + } + } + + return post_data; + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data_list(1); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 搜索条件 + form_submit_event(e) { + this.setData({ post_data: e.detail.value, data_page: 1}); + this.popup_form_event_close(); + this.get_data_list(1); + }, + + // 筛选条件关闭 + popup_form_event_close(e) { + this.setData({ is_show_popup_form: false}); + }, + + // 筛选条件开启 + popup_form_event_show(e) { + this.setData({ is_show_popup_form: true }); + }, + + // 排序事件 + nav_sort_event(e) { + var index = e.currentTarget.dataset.index || 0; + var temp_post_data = this.data.post_data; + var temp_search_nav_sort = this.data.search_nav_sort_list; + var temp_sort = (temp_search_nav_sort[index]['sort'] == 'desc') ? 'asc' : 'desc'; + for (var i in temp_search_nav_sort) { + if(i != index) { + if (temp_search_nav_sort[i]['icon'] != null) { + temp_search_nav_sort[i]['icon'] = 'default'; + } + temp_search_nav_sort[i]['sort'] = 'desc'; + } + } + + temp_search_nav_sort[index]['sort'] = temp_sort; + if (temp_search_nav_sort[index]['icon'] != null) { + temp_search_nav_sort[index]['icon'] = temp_sort; + } + + temp_post_data['order_by_field'] = temp_search_nav_sort[index]['field']; + temp_post_data['order_by_type'] = temp_sort; + + this.setData({ + post_data: temp_post_data, + search_nav_sort_list: temp_search_nav_sort, + data_page: 1, + }); + this.get_data_list(1); + }, + + // 条件-更多数据展示事件 + more_event(e) { + var value = e.currentTarget.dataset.value || null; + var temp_more = this.data.map_fields_list; + if(value != null && (temp_more[value] || null) != null) + { + temp_more[value]['height'] = (temp_more[value]['height'] == 'auto') ? temp_more[value]['default'] : 'auto'; + this.setData({map_fields_list: temp_more}); + } + }, + + // 条件-选择事件 + map_item_event(e) { + var index = e.currentTarget.dataset.index; + var field = e.currentTarget.dataset.field; + var data = this.data; + if((data[field] || null) != null && (data[field][index] || null) != null) + { + data[field][index]['active'] = ((data[field][index]['active'] || 0) == 0) ? 1 : 0; + this.setData(data); + } + }, + + // 条件-清空 + map_remove_event(e) { + var data = this.data; + // 关键字 + data['post_data']['wd'] = ''; + + // 分类 + for(var i in data.map_fields_list) + { + if((data[i] != null) != null && data[i].length > 0) + { + for(var k in data[i]) + { + data[i][k]['active'] = 0; + } + } + } + + // 关闭条件弹层 + data['is_show_popup_form'] = false; + + // 分页恢复1页、重新获取数据 + data['data_page'] = 1; + this.setData(data); + this.get_data_list(1); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + var shop_id = this.data.params['shop_id'] || 0; + var category_id = this.data.params['category_id'] || 0; + var keywords = this.data.params['keywords'] || ''; + return { + title: this.data.shop.name || app.data.application_title, + desc: this.data.shop.describe || app.data.application_describe, + path: '/pages/plugins/shop/search/search?shop_id='+shop_id+'&referrer=' + user_id+'&category_id='+category_id+'&keywords='+keywords + }; + }, +}); diff --git a/sourcecode/alipay/default/pages/plugins/shop/search/search.json b/sourcecode/alipay/default/pages/plugins/shop/search/search.json new file mode 100755 index 000000000..b74b53e2b --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/shop/search/search.json @@ -0,0 +1,8 @@ +{ + "pullRefresh": true, + "defaultTitle": "店铺商品搜索", + "usingComponents": { + "component-quick-nav": "/components/quick-nav/quick-nav", + "component-popup": "/components/popup/popup" + } +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/signin/index-detail/index-detail.js b/sourcecode/alipay/default/pages/plugins/signin/index-detail/index-detail.js index 87b07ba70..c3f8db054 100644 --- a/sourcecode/alipay/default/pages/plugins/signin/index-detail/index-detail.js +++ b/sourcecode/alipay/default/pages/plugins/signin/index-detail/index-detail.js @@ -209,14 +209,4 @@ Page({ path: '/pages/plugins/signin/index-detail/index-detail?id='+this.data.data.id+'&referrer=' + user_id }; }, - - // 分享朋友圈 - onShareTimeline() { - var user_id = app.get_user_cache_info('id', 0) || 0; - return { - title: this.data.data.seo_title || '签到 - '+app.data.application_title, - query: 'id='+this.data.data.id+'&referrer=' + user_id, - imageUrl: this.data.data.right_images || '' - }; - }, }); \ No newline at end of file diff --git a/sourcecode/baidu/default/pages/goods-detail/goods-detail.css b/sourcecode/baidu/default/pages/goods-detail/goods-detail.css index 74004bbc3..96f98e496 100755 --- a/sourcecode/baidu/default/pages/goods-detail/goods-detail.css +++ b/sourcecode/baidu/default/pages/goods-detail/goods-detail.css @@ -508,4 +508,41 @@ .plugins-salerecords-tips-bottom-center { bottom: 10%; top: auto; +} + +/** + * 多商户 - 插件 + */ +.plugins-shop-container { + padding: 20rpx 10rpx; +} +.plugins-shop-logo { + width: 120rpx; + height: 120rpx !important; +} +.plugins-shop-base { + width: calc(100% - 190rpx); + padding-right: 50rpx; +} +.plugins-shop-title { + font-size: 32rpx; + font-weight: bold; + line-height: 40rpx; +} +.plugins-shop-auth-icon { + background-color: #f4c985; + border: 1px solid #e7ba77; + border-radius: 6rpx; + color: #856651; + text-align: center; + padding: 2rpx 12rpx; + font-size: 24rpx; + font-weight: bold; + margin-right: 10rpx; +} +.plugins-shop-desc { + color: #888; + font-size: 24rpx; + min-height: 72rpx; + line-height: 36rpx; } \ No newline at end of file diff --git a/sourcecode/baidu/default/pages/goods-detail/goods-detail.js b/sourcecode/baidu/default/pages/goods-detail/goods-detail.js index 23234ae4c..b78c6ff1b 100755 --- a/sourcecode/baidu/default/pages/goods-detail/goods-detail.js +++ b/sourcecode/baidu/default/pages/goods-detail/goods-detail.js @@ -16,8 +16,6 @@ Page({ goods_specifications_choose: [], goods_content_app: [], popup_status: false, - goods_favor_text: '收藏', - goods_favor_icon: '/images/default-favor-icon-0.png', temp_buy_number: 1, buy_event_type: 'buy', buy_button: {}, @@ -31,6 +29,18 @@ Page({ goods_video_is_autoplay: false, popup_share_status: false, + // 导航首页按钮 + nav_home_button_info: { + "text": "首页", + "icon": "/images/default-home-icon.png", + "value": "/pages/index/index" + }, + // 导航收藏按钮 + nav_favor_button_info: { + "text": "收藏", + "status": 0 + }, + // 购物车快捷导航 quick_nav_cart_count: 0, @@ -59,6 +69,9 @@ Page({ plugins_salerecords_timer: null, plugins_salerecords_tips_content: null, plugins_salerecords_tips_ent: '', + + // 多商户 + plugins_shop_data: null, }, onLoad(params) { @@ -135,8 +148,10 @@ Page({ goods_specifications_choose: data.goods.specifications.choose || [], goods_content_app: data.goods.content_app || [], temp_buy_number: data.goods.buy_min_number || 1, - goods_favor_text: data.goods.is_favor == 1 ? '已收藏' : '收藏', - goods_favor_icon: '/images/default-favor-icon-' + data.goods.is_favor + '.png', + nav_favor_button_info: { + "text": ((data.goods.is_favor == 1) ? '已' : '')+'收藏', + "status": data.goods.is_favor + }, buy_button: data.buy_button || null, goods_spec_base_price: data.goods.price, @@ -152,6 +167,8 @@ Page({ quick_nav_cart_count: data.common_cart_total || 0, plugins_salerecords_data: ((data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0) ? null : data.plugins_salerecords_data, + + plugins_shop_data: ((data.plugins_shop_data || null) == null || data.plugins_shop_data.length <= 0) ? null : data.plugins_shop_data, }); // 限时秒杀倒计时 @@ -169,6 +186,18 @@ Page({ // 购买记录提示 this.plugins_salerecords_tips_handle(); + // 导航首页按钮、多商户 + if(this.data.plugins_shop_data != null) + { + this.setData({ + nav_home_button_info: { + "text": "店铺", + "icon": this.data.plugins_shop_data.shop_icon, + "value": "/pages/plugins/shop/detail/detail?id="+this.data.plugins_shop_data.id + } + }); + } + // 页面信息设置 this.set_page_info(); } else { @@ -229,10 +258,15 @@ Page({ }, // 进入店铺 - shop_event(e) { - swan.switchTab({ - url: '/pages/index/index' - }); + shop_event(e) + { + var value = this.data.nav_home_button_info.value; + if (app.is_tabbar_pages(value)) + { + swan.switchTab({url: value}); + } else { + swan.navigateTo({url: value}); + } }, // 导航购买按钮事件 @@ -281,8 +315,10 @@ Page({ if (res.data.code == 0) { this.setData({ 'goods.is_favor': res.data.data.status, - goods_favor_text: res.data.data.text, - goods_favor_icon: '/images/default-favor-icon-'+res.data.data.status+'.png' + nav_favor_button_info: { + "text": res.data.data.text, + "status": res.data.data.status + } }); app.showToast(res.data.msg, "success"); } else { diff --git a/sourcecode/baidu/default/pages/goods-detail/goods-detail.swan b/sourcecode/baidu/default/pages/goods-detail/goods-detail.swan index 79760483d..7668d7480 100755 --- a/sourcecode/baidu/default/pages/goods-detail/goods-detail.swan +++ b/sourcecode/baidu/default/pages/goods-detail/goods-detail.swan @@ -111,6 +111,20 @@ + + + + + + + {{plugins_shop_data.auth_type_name}} + {{plugins_shop_data.name}} + + {{plugins_shop_data.describe}} + + + + @@ -163,12 +177,12 @@ - - 首页 + + {{nav_home_button_info.text}} - - {{goods_favor_text}} + + {{nav_favor_button_info.text}} diff --git a/sourcecode/baidu/default/pages/index/index.swan b/sourcecode/baidu/default/pages/index/index.swan index a6ac609bc..f8399d1fc 100755 --- a/sourcecode/baidu/default/pages/index/index.swan +++ b/sourcecode/baidu/default/pages/index/index.swan @@ -75,7 +75,7 @@ - {{item.title}} + {{item.title}} {{item.add_time}} diff --git a/sourcecode/qq/default/pages/goods-detail/goods-detail.js b/sourcecode/qq/default/pages/goods-detail/goods-detail.js index e8f215587..de53c9f19 100755 --- a/sourcecode/qq/default/pages/goods-detail/goods-detail.js +++ b/sourcecode/qq/default/pages/goods-detail/goods-detail.js @@ -16,8 +16,6 @@ Page({ goods_specifications_choose: [], goods_content_app: [], popup_status: false, - goods_favor_text: '收藏', - goods_favor_icon: '/images/default-favor-icon-0.png', temp_buy_number: 1, buy_event_type: 'buy', buy_button: {}, @@ -31,6 +29,18 @@ Page({ goods_video_is_autoplay: false, popup_share_status: false, + // 导航首页按钮 + nav_home_button_info: { + "text": "首页", + "icon": "/images/default-home-icon.png", + "value": "/pages/index/index" + }, + // 导航收藏按钮 + nav_favor_button_info: { + "text": "收藏", + "status": 0 + }, + // 购物车快捷导航 quick_nav_cart_count: 0, @@ -59,6 +69,9 @@ Page({ plugins_salerecords_timer: null, plugins_salerecords_tips_content: null, plugins_salerecords_tips_ent: '', + + // 多商户 + plugins_shop_data: null, }, onLoad(params) { @@ -136,8 +149,10 @@ Page({ goods_specifications_choose: data.goods.specifications.choose || [], goods_content_app: data.goods.content_app || [], temp_buy_number: data.goods.buy_min_number || 1, - goods_favor_text: (data.goods.is_favor == 1) ? '已收藏' : '收藏', - goods_favor_icon: '/images/default-favor-icon-' + data.goods.is_favor+'.png', + nav_favor_button_info: { + "text": ((data.goods.is_favor == 1) ? '已' : '')+'收藏', + "status": data.goods.is_favor + }, buy_button: data.buy_button || null, goods_spec_base_price: data.goods.price, @@ -161,6 +176,8 @@ Page({ quick_nav_cart_count: data.common_cart_total || 0, plugins_salerecords_data: ((data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0) ? null : data.plugins_salerecords_data, + + plugins_shop_data: ((data.plugins_shop_data || null) == null || data.plugins_shop_data.length <= 0) ? null : data.plugins_shop_data, }); // 限时秒杀倒计时 @@ -176,6 +193,18 @@ Page({ // 购买记录提示 this.plugins_salerecords_tips_handle(); + + // 导航首页按钮、多商户 + if(this.data.plugins_shop_data != null) + { + this.setData({ + nav_home_button_info: { + "text": "店铺", + "icon": this.data.plugins_shop_data.shop_icon, + "value": "/pages/plugins/shop/detail/detail?id="+this.data.plugins_shop_data.id + } + }); + } } else { self.setData({ data_bottom_line_status: false, @@ -242,9 +271,13 @@ Page({ // 进入店铺 shop_event(e) { - qq.switchTab({ - url: '/pages/index/index' - }); + var value = this.data.nav_home_button_info.value; + if (app.is_tabbar_pages(value)) + { + qq.switchTab({url: value}); + } else { + qq.navigateTo({url: value}); + } }, // 导航购买按钮事件 @@ -295,8 +328,10 @@ Page({ { this.setData({ 'goods.is_favor': res.data.data.status, - goods_favor_text: res.data.data.text, - goods_favor_icon: '/images/default-favor-icon-'+res.data.data.status+'.png' + nav_favor_button_info: { + "text": res.data.data.text, + "status": res.data.data.status + } }); app.showToast(res.data.msg, "success"); } else { diff --git a/sourcecode/qq/default/pages/goods-detail/goods-detail.qml b/sourcecode/qq/default/pages/goods-detail/goods-detail.qml index f1ef8a5e5..01a3bb1b7 100755 --- a/sourcecode/qq/default/pages/goods-detail/goods-detail.qml +++ b/sourcecode/qq/default/pages/goods-detail/goods-detail.qml @@ -118,6 +118,20 @@ + + + + + + + {{plugins_shop_data.auth_type_name}} + {{plugins_shop_data.name}} + + {{plugins_shop_data.describe}} + + + + @@ -170,12 +184,12 @@ - - 首页 + + {{nav_home_button_info.text}} - - {{goods_favor_text}} + + {{nav_favor_button_info.text}} diff --git a/sourcecode/qq/default/pages/goods-detail/goods-detail.qss b/sourcecode/qq/default/pages/goods-detail/goods-detail.qss index 44923c648..133d5052e 100755 --- a/sourcecode/qq/default/pages/goods-detail/goods-detail.qss +++ b/sourcecode/qq/default/pages/goods-detail/goods-detail.qss @@ -504,4 +504,41 @@ .plugins-salerecords-tips-bottom-center { bottom: 10%; top: auto; +} + +/** + * 多商户 - 插件 + */ +.plugins-shop-container { + padding: 20rpx 10rpx; +} +.plugins-shop-logo { + width: 120rpx; + height: 120rpx !important; +} +.plugins-shop-base { + width: calc(100% - 190rpx); + padding-right: 50rpx; +} +.plugins-shop-title { + font-size: 32rpx; + font-weight: bold; + line-height: 40rpx; +} +.plugins-shop-auth-icon { + background-color: #f4c985; + border: 1px solid #e7ba77; + border-radius: 6rpx; + color: #856651; + text-align: center; + padding: 2rpx 12rpx; + font-size: 24rpx; + font-weight: bold; + margin-right: 10rpx; +} +.plugins-shop-desc { + color: #888; + font-size: 24rpx; + min-height: 72rpx; + line-height: 36rpx; } \ No newline at end of file diff --git a/sourcecode/qq/default/pages/index/index.qml b/sourcecode/qq/default/pages/index/index.qml index 65067ea71..189fe6546 100755 --- a/sourcecode/qq/default/pages/index/index.qml +++ b/sourcecode/qq/default/pages/index/index.qml @@ -75,7 +75,7 @@ - {{item.title}} + {{item.title}} {{item.add_time}} diff --git a/sourcecode/toutiao/default/pages/goods-detail/goods-detail.js b/sourcecode/toutiao/default/pages/goods-detail/goods-detail.js index e96dcae3d..7e68ddbeb 100755 --- a/sourcecode/toutiao/default/pages/goods-detail/goods-detail.js +++ b/sourcecode/toutiao/default/pages/goods-detail/goods-detail.js @@ -16,8 +16,6 @@ Page({ goods_specifications_choose: [], goods_content_app: [], popup_status: false, - goods_favor_text: '收藏', - goods_favor_icon: '/images/default-favor-icon-0.png', temp_buy_number: 1, buy_event_type: 'buy', buy_button: {}, @@ -31,6 +29,18 @@ Page({ goods_video_is_autoplay: false, popup_share_status: false, + // 导航首页按钮 + nav_home_button_info: { + "text": "首页", + "icon": "/images/default-home-icon.png", + "value": "/pages/index/index" + }, + // 导航收藏按钮 + nav_favor_button_info: { + "text": "收藏", + "status": 0 + }, + // 购物车快捷导航 quick_nav_cart_count: 0, @@ -59,6 +69,9 @@ Page({ plugins_salerecords_timer: null, plugins_salerecords_tips_content: null, plugins_salerecords_tips_ent: '', + + // 多商户 + plugins_shop_data: null, }, onLoad(params) { @@ -136,8 +149,10 @@ Page({ goods_specifications_choose: data.goods.specifications.choose || [], goods_content_app: data.goods.content_app || [], temp_buy_number: data.goods.buy_min_number || 1, - goods_favor_text: (data.goods.is_favor == 1) ? '已收藏' : '收藏', - goods_favor_icon: '/images/default-favor-icon-' + data.goods.is_favor+'.png', + nav_favor_button_info: { + "text": ((data.goods.is_favor == 1) ? '已' : '')+'收藏', + "status": data.goods.is_favor + }, buy_button: data.buy_button || null, goods_spec_base_price: data.goods.price, @@ -161,6 +176,8 @@ Page({ quick_nav_cart_count: data.common_cart_total || 0, plugins_salerecords_data: ((data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0) ? null : data.plugins_salerecords_data, + + plugins_shop_data: ((data.plugins_shop_data || null) == null || data.plugins_shop_data.length <= 0) ? null : data.plugins_shop_data, }); // 限时秒杀倒计时 @@ -176,6 +193,18 @@ Page({ // 购买记录提示 this.plugins_salerecords_tips_handle(); + + // 导航首页按钮、多商户 + if(this.data.plugins_shop_data != null) + { + this.setData({ + nav_home_button_info: { + "text": "店铺", + "icon": this.data.plugins_shop_data.shop_icon, + "value": "/pages/plugins/shop/detail/detail?id="+this.data.plugins_shop_data.id + } + }); + } } else { self.setData({ data_bottom_line_status: false, @@ -242,9 +271,13 @@ Page({ // 进入店铺 shop_event(e) { - tt.switchTab({ - url: '/pages/index/index' - }); + var value = this.data.nav_home_button_info.value; + if (app.is_tabbar_pages(value)) + { + tt.switchTab({url: value}); + } else { + tt.navigateTo({url: value}); + } }, // 导航购买按钮事件 @@ -295,8 +328,10 @@ Page({ { this.setData({ 'goods.is_favor': res.data.data.status, - goods_favor_text: res.data.data.text, - goods_favor_icon: '/images/default-favor-icon-'+res.data.data.status+'.png' + nav_favor_button_info: { + "text": res.data.data.text, + "status": res.data.data.status + } }); app.showToast(res.data.msg, "success"); } else { diff --git a/sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttml b/sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttml index 3952e3520..c945a9c89 100755 --- a/sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttml +++ b/sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttml @@ -118,6 +118,20 @@ + + + + + + + {{plugins_shop_data.auth_type_name}} + {{plugins_shop_data.name}} + + {{plugins_shop_data.describe}} + + + + @@ -170,12 +184,12 @@ - - 首页 + + {{nav_home_button_info.text}} - - {{goods_favor_text}} + + {{nav_favor_button_info.text}} diff --git a/sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttss b/sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttss index 44923c648..133d5052e 100755 --- a/sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttss +++ b/sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttss @@ -504,4 +504,41 @@ .plugins-salerecords-tips-bottom-center { bottom: 10%; top: auto; +} + +/** + * 多商户 - 插件 + */ +.plugins-shop-container { + padding: 20rpx 10rpx; +} +.plugins-shop-logo { + width: 120rpx; + height: 120rpx !important; +} +.plugins-shop-base { + width: calc(100% - 190rpx); + padding-right: 50rpx; +} +.plugins-shop-title { + font-size: 32rpx; + font-weight: bold; + line-height: 40rpx; +} +.plugins-shop-auth-icon { + background-color: #f4c985; + border: 1px solid #e7ba77; + border-radius: 6rpx; + color: #856651; + text-align: center; + padding: 2rpx 12rpx; + font-size: 24rpx; + font-weight: bold; + margin-right: 10rpx; +} +.plugins-shop-desc { + color: #888; + font-size: 24rpx; + min-height: 72rpx; + line-height: 36rpx; } \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/index/index.ttml b/sourcecode/toutiao/default/pages/index/index.ttml index d4e9f714c..db949695c 100755 --- a/sourcecode/toutiao/default/pages/index/index.ttml +++ b/sourcecode/toutiao/default/pages/index/index.ttml @@ -78,7 +78,7 @@ - {{item.title}} + {{item.title}} {{item.add_time}} diff --git a/sourcecode/weixin/default/components/layout/layout.wxml b/sourcecode/weixin/default/components/layout/layout.wxml index 48af681c9..2ad5a02dc 100755 --- a/sourcecode/weixin/default/components/layout/layout.wxml +++ b/sourcecode/weixin/default/components/layout/layout.wxml @@ -50,8 +50,8 @@ autoplay="{{vss.config.data_list.length > 0}}" circular="{{circular}}" style="{{vss.config.frontend_config.media_fixed.media_container_style}}"> - - + + diff --git a/sourcecode/weixin/default/pages/design/design.js b/sourcecode/weixin/default/pages/design/design.js index 1d2a037e0..84756a5a8 100644 --- a/sourcecode/weixin/default/pages/design/design.js +++ b/sourcecode/weixin/default/pages/design/design.js @@ -10,7 +10,8 @@ Page({ }, onLoad(params) { - params['id'] = 1; + // 启动参数处理 + params = app.launch_params_handle(params); this.setData({ params: params, }); @@ -36,7 +37,7 @@ Page({ if (res.data.code == 0) { var data = res.data.data; self.setData({ - data: data.data || null, + data: ((data.data || null) != null && data.data.length != 0) ? data.data : null, layout_data: data.layout_data || [], data_list_loding_msg: '', data_list_loding_status: 0, @@ -46,6 +47,7 @@ Page({ // 标题名称 if((this.data.data || null) != null) { + console.log(this.data.data.length) wx.setNavigationBarTitle({title: this.data.data.name}); } } else { diff --git a/sourcecode/weixin/default/pages/goods-detail/goods-detail.js b/sourcecode/weixin/default/pages/goods-detail/goods-detail.js index 0b18dc3b9..2572aed80 100755 --- a/sourcecode/weixin/default/pages/goods-detail/goods-detail.js +++ b/sourcecode/weixin/default/pages/goods-detail/goods-detail.js @@ -16,8 +16,6 @@ Page({ goods_specifications_choose: [], goods_content_app: [], popup_status: false, - goods_favor_text: '收藏', - goods_favor_icon: '/images/default-favor-icon-0.png', temp_buy_number: 1, buy_event_type: 'buy', buy_button: {}, @@ -33,10 +31,15 @@ Page({ // 导航首页按钮 nav_home_button_info: { - "name": "首页", + "text": "首页", "icon": "/images/default-home-icon.png", "value": "/pages/index/index" }, + // 导航收藏按钮 + nav_favor_button_info: { + "text": "收藏", + "status": 0 + }, // 购物车快捷导航 quick_nav_cart_count: 0, @@ -164,8 +167,10 @@ Page({ goods_specifications_choose: data.goods.specifications.choose || [], goods_content_app: data.goods.content_app || [], temp_buy_number: data.goods.buy_min_number || 1, - goods_favor_text: (data.goods.is_favor == 1) ? '已收藏' : '收藏', - goods_favor_icon: '/images/default-favor-icon-' + data.goods.is_favor+'.png', + nav_favor_button_info: { + "text": ((data.goods.is_favor == 1) ? '已' : '')+'收藏', + "status": data.goods.is_favor + }, buy_button: data.buy_button || null, goods_spec_base_price: data.goods.price, @@ -213,7 +218,7 @@ Page({ { this.setData({ nav_home_button_info: { - "name": "店铺", + "text": "店铺", "icon": this.data.plugins_shop_data.shop_icon, "value": "/pages/plugins/shop/detail/detail?id="+this.data.plugins_shop_data.id } @@ -286,11 +291,11 @@ Page({ shop_event(e) { var value = this.data.nav_home_button_info.value; - if(value == '/pages/index/index') + if (app.is_tabbar_pages(value)) { - wx.switchTab({url: value}); + wx.switchTab({ url: value }); } else { - wx.navigateTo({url: value}); + wx.navigateTo({ url: value }); } }, @@ -342,8 +347,10 @@ Page({ { this.setData({ 'goods.is_favor': res.data.data.status, - goods_favor_text: res.data.data.text, - goods_favor_icon: '/images/default-favor-icon-'+res.data.data.status+'.png' + nav_favor_button_info: { + "text": res.data.data.text, + "status": res.data.data.status + } }); app.showToast(res.data.msg, "success"); } else { @@ -354,7 +361,6 @@ Page({ }, fail: () => { wx.hideLoading(); - app.showToast('服务器请求出错'); } }); diff --git a/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml b/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml index 05a5940de..169d64c42 100755 --- a/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml +++ b/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml @@ -183,11 +183,11 @@ - {{nav_home_button_info.name}} + {{nav_home_button_info.text}} - - {{goods_favor_text}} + + {{nav_favor_button_info.text}} diff --git a/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss b/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss index 61f415164..0ce0f8260 100755 --- a/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss +++ b/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss @@ -539,5 +539,5 @@ color: #888; font-size: 24rpx; min-height: 72rpx; - line-height: 36rpx; + line-height: 36rpx; } \ No newline at end of file diff --git a/sourcecode/weixin/default/pages/index/index.wxml b/sourcecode/weixin/default/pages/index/index.wxml index 460079375..281f22b34 100755 --- a/sourcecode/weixin/default/pages/index/index.wxml +++ b/sourcecode/weixin/default/pages/index/index.wxml @@ -86,7 +86,7 @@ - {{item.title}} + {{item.title}} {{item.add_time}} diff --git a/sourcecode/weixin/default/pages/plugins/shop/design/design.js b/sourcecode/weixin/default/pages/plugins/shop/design/design.js index 707652752..1342cbaeb 100644 --- a/sourcecode/weixin/default/pages/plugins/shop/design/design.js +++ b/sourcecode/weixin/default/pages/plugins/shop/design/design.js @@ -27,6 +27,8 @@ Page({ }, onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); this.setData({ params: params, user: app.get_user_cache_info(), @@ -58,7 +60,7 @@ Page({ shop_favor_user: data.shop_favor_user || [], shop_navigation: data.shop_navigation || [], shop_goods_category: data.shop_goods_category || [], - data: data.data || null, + data: ((data.data || null) != null && data.data.length != 0) ? data.data : null, layout_data: data.layout_data || [], data_list_loding_msg: '', data_list_loding_status: 0, diff --git a/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss b/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss index ff0487a09..d6418d1dd 100644 --- a/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss +++ b/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss @@ -12,6 +12,8 @@ font-size: 24rpx; border-top-right-radius: 0; border-bottom-right-radius: 0; + padding-top: 0; + padding-bottom: 0; } .search input,.search-btn button { height: 52rpx; diff --git a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.js b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.js index 063d0730f..0665cf0f9 100644 --- a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.js +++ b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.js @@ -28,6 +28,8 @@ Page({ }, onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); this.setData({ params: params, user: app.get_user_cache_info(), diff --git a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss index 23c627927..95ad41bf8 100644 --- a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss +++ b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss @@ -12,6 +12,8 @@ font-size: 24rpx; border-top-right-radius: 0; border-bottom-right-radius: 0; + padding-top: 0; + padding-bottom: 0; } .search input,.search-btn button { height: 52rpx; @@ -162,7 +164,8 @@ } .shop-category-list .item { border-radius: 6rpx; - padding: 5rpx 20rpx; + padding: 8rpx 20rpx; + font-size: 24rpx; } .shop-category-list .active { background: #d2364c; diff --git a/sourcecode/weixin/default/pages/plugins/shop/index/index.js b/sourcecode/weixin/default/pages/plugins/shop/index/index.js index 1c69e2e70..651ccb62e 100755 --- a/sourcecode/weixin/default/pages/plugins/shop/index/index.js +++ b/sourcecode/weixin/default/pages/plugins/shop/index/index.js @@ -15,13 +15,15 @@ Page({ }, onLoad(params) { - // 显示分享菜单 - app.show_share_menu(); - }, + // 启动参数处理 + params = app.launch_params_handle(params); + this.setData({params: params}); - onShow() { // 数据加载 this.get_data(); + + // 显示分享菜单 + app.show_share_menu(); }, // 初始化 diff --git a/sourcecode/weixin/default/pages/plugins/shop/index/index.wxss b/sourcecode/weixin/default/pages/plugins/shop/index/index.wxss index 8bf7e055f..b3cdff726 100755 --- a/sourcecode/weixin/default/pages/plugins/shop/index/index.wxss +++ b/sourcecode/weixin/default/pages/plugins/shop/index/index.wxss @@ -6,15 +6,15 @@ height: 80rpx; white-space: nowrap; box-sizing: border-box; + border-bottom: 1px solid #f0f0f0; } .nav-list .item { - padding: 20rpx 30rpx; - border-bottom: 3px solid #f0f0f0; + line-height: 80rpx; + padding: 0 30rpx; display: inline-block; position: relative; } .nav-list .active { - border-bottom: 3px solid #d2364c; color: #d2364c; } @@ -25,29 +25,33 @@ height: calc(100vh - 80rpx); } .data-list .item { - width: calc(50% - 5rpx); - margin-bottom: 10rpx; + width: calc(50% - 45rpx); + margin-bottom: 10rpx; + padding: 20rpx; } .data-list .item:nth-child(2n) { - float: right; + float: right; } .data-list .item:nth-child(2n+1) { - float: left; + float: left; } .data-list .item image { - width: 100%; - height: 160rpx !important; + width: 100%; + height: 160rpx !important; } .data-list .item .base { padding-top: 20rpx; - margin: 20rpx; +} +.data-list .item .name { + font-size: 28rpx; + font-weight: bold; } .data-list .item .desc { - color: #999; - margin-top: 10rpx; - font-size: 28rpx; - line-height: 40rpx; - min-height: 80rpx; + color: #999; + margin-top: 10rpx; + font-size: 28rpx; + line-height: 40rpx; + min-height: 80rpx; } .data-list .item .base-bottom .bitem { width: 45%;