mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-02 03:48:47 +08:00
支付宝小程序适配可视化装修+多商户
This commit is contained in:
parent
32fd815c79
commit
b77edd5181
@ -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}}",
|
||||
|
@ -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}}",
|
||||
|
707
sourcecode/alipay/default/components/layout/layout.acss
Executable file
707
sourcecode/alipay/default/components/layout/layout.acss
Executable file
@ -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}
|
123
sourcecode/alipay/default/components/layout/layout.axml
Executable file
123
sourcecode/alipay/default/components/layout/layout.axml
Executable file
@ -0,0 +1,123 @@
|
||||
<block a:if="{{(data || null) != null && data.length > 0}}">
|
||||
<block a:for="{{data}}" a:key="key" a:for-item="v">
|
||||
<view a:if="{{(v.value || null) != null && (v.children || null) != null && v.children.length > 0 && (v.value_arr || null) != null && v.value_arr.length > 0 && v.children.length == v.value_arr.length && (v.status || 0) == 1}}" class="layout-view">
|
||||
<view class="layout-content-children {{((v.config || null) != null && (v.config.frontend_config || null) != null && (v.config.frontend_config.ent || null) != null) ? v.config.frontend_config.ent : ''}}" style="{{((v.config || null) != null && (v.config.frontend_config || null) != null && (v.config.frontend_config.style || null) != null) ? v.config.frontend_config.style : ''}}">
|
||||
<block a:for="{{v.children}}" a:key="keys" a:for-item="vs">
|
||||
<view class="layout-content-container {{((vs.config || null) != null && (vs.config.frontend_config || null) != null && (vs.config.frontend_config.ent || null) != null) ? vs.config.frontend_config.ent : ''}}" style="{{((vs.config || null) != null && (vs.config.frontend_config || null) != null && (vs.config.frontend_config.style || null) != null) ? vs.config.frontend_config.style : ''}}">
|
||||
<block a:if="{{(vs.children || null) != null && vs.children.length > 0}}">
|
||||
<view a:for="{{vs.children}}" a:key="keyss" a:for-item="vss" class="layout-content">
|
||||
<view a:if="{{(vss.config || null) != null}}" class="module-content">
|
||||
<view class="module-{{vss.value}}-container" style="{{((vss.config.frontend_config || null) != null && (vss.config.frontend_config.style || null) != null) ? vss.config.frontend_config.style : ''}}">
|
||||
<!-- 单图 -->
|
||||
<block a:if="{{vss.value == 'images'}}">
|
||||
<view class="module-images-content {{vss.config.frontend_config.media_fixed.media_container_ent}}" style="{{vss.config.frontend_config.media_fixed.media_container_style}}">
|
||||
<image onTap="layout_url_event" data-value="{{vss.config.url || ''}}" src="{{vss.config.images}}" mode="widthFix" class="{{vss.config.frontend_config.media_fixed.media_ent}}"></image>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 多图 -->
|
||||
<block a:elif="{{vss.value == 'many-images'}}">
|
||||
<block a:if="{{vss.config.view_list_show_style == 'rolling'}}">
|
||||
<!-- 滚动 -->
|
||||
<view class="module-list-rolling">
|
||||
<scroll-view scroll-x>
|
||||
<view a:for="{{vss.config.data_list}}" a:key="ik" class="item">
|
||||
<view class="module-item {{vss.config.frontend_config.media_fixed.media_container_ent}}" style="width:{{((vss.config.view_list_show_style_value_arr || null) == null || (vss.config.view_list_show_style_value_arr.item_width || null) == null) ? 200 : vss.config.view_list_show_style_value_arr.item_width}}px;margin-left:{{((vss.config.view_list_show_style_value_arr || null) == null || (vss.config.view_list_show_style_value_arr.item_margin || null) == null || index == 0) ? 0 : vss.config.view_list_show_style_value_arr.item_margin}}px;{{vss.config.frontend_config.item_style}}{{vss.config.frontend_config.media_fixed.media_container_style}}" onTap="layout_url_event" data-value="{{item.url || ''}}">
|
||||
<image src="{{item.images}}" mode="widthFix" class="{{vss.config.frontend_config.media_fixed.media_ent}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</block>
|
||||
<block a:elif="{{vss.config.view_list_show_style == 'list'}}">
|
||||
<!-- 列表 -->
|
||||
<view class="module-list-content {{vss.config.frontend_config.list_ent}}">
|
||||
<view a:for="{{vss.config.data_list}}" a:key="ik" class="item">
|
||||
<view class="module-item" style="{{vss.config.frontend_config.item_style}}">
|
||||
<view class="{{vss.config.frontend_config.media_fixed.media_container_ent}}" style="{{vss.config.frontend_config.media_fixed.media_container_style}}" onTap="layout_url_event" data-value="{{item.url || ''}}">
|
||||
<image src="{{item.images}}" mode="widthFix" class="{{vss.config.frontend_config.media_fixed.media_ent}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block a:else>
|
||||
<!-- 默认轮播 -->
|
||||
<swiper
|
||||
indicator-dots="{{vss.config.data_list.length > 0}}"
|
||||
indicator-color="{{indicator_color}}"
|
||||
indicator-active-color="{{indicator_active_color}}"
|
||||
autoplay="{{vss.config.data_list.length > 0}}"
|
||||
circular="{{circular}}" style="{{vss.config.frontend_config.media_fixed.media_container_style}}">
|
||||
<block a:for="{{vss.config.data_list}}" a:key="ik">
|
||||
<swiper-item class="{{vss.config.frontend_config.media_fixed.media_container_ent}}">
|
||||
<image src="{{item.images}}" mode="aspectFill" class="{{vss.config.frontend_config.media_fixed.media_ent}}" onTap="layout_url_event" data-value="{{item.url || ''}}"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</block>
|
||||
</block>
|
||||
|
||||
<!-- 视频 -->
|
||||
<block a:elif="{{vss.value == 'video'}}">
|
||||
<view class="module-video-content {{vss.config.frontend_config.media_fixed.media_container_ent}}" style="{{vss.config.frontend_config.media_fixed.media_container_style}}">
|
||||
<video src="{{vss.config.video}}" autoplay="{{true}}" show-center-play-btn="{{true}}" controls="{{false}}" show-play-btn="{{false}}" enable-progress-gesture="{{false}}" show-fullscreen-btn="{{false}}" controls poster="{{(vss.config.content_images || null) != null ? vss.config.content_images : ''}}" class="{{vss.config.frontend_config.media_fixed.media_ent}}"></video>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 商品 -->
|
||||
<block a:elif="{{vss.value == 'goods'}}">
|
||||
<block a:if="{{vss.config.view_list_show_style == 'rolling'}}">
|
||||
<!-- 滚动 -->
|
||||
<view class="module-goods-content module-list-rolling">
|
||||
<scroll-view scroll-x>
|
||||
<view a:for="{{vss.config.data_list}}" a:key="ik" class="item">
|
||||
<view class="module-item {{vss.config.frontend_config.media_fixed.media_container_ent}}" style="width:{{((vss.config.view_list_show_style_value_arr || null) == null || (vss.config.view_list_show_style_value_arr.item_width || null) == null) ? 200 : vss.config.view_list_show_style_value_arr.item_width}}px;margin-left:{{((vss.config.view_list_show_style_value_arr || null) == null || (vss.config.view_list_show_style_value_arr.item_margin || null) == null || index == 0) ? 0 : vss.config.view_list_show_style_value_arr.item_margin}}px;{{vss.config.frontend_config.item_style}}{{vss.config.frontend_config.media_fixed.media_container_style}}" onTap="layout_url_event" data-value="{{item.goods_url || ''}}">
|
||||
<image src="{{item.images}}" mode="widthFix" class="{{vss.config.frontend_config.media_fixed.media_ent}}"></image>
|
||||
<view class="item-bottom">
|
||||
<view class="module-title">{{item.title}}</view>
|
||||
<view class="module-price">{{currency_symbol}}{{item.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</block>
|
||||
<block a:else>
|
||||
<!-- 默认列表 -->
|
||||
<view class="module-goods-content module-list-content {{vss.config.frontend_config.list_ent}}">
|
||||
<view a:for="{{vss.config.data_list}}" a:key="ik" class="item">
|
||||
<view class="module-item" style="{{vss.config.frontend_config.item_style}}">
|
||||
<view class="{{vss.config.frontend_config.media_fixed.media_container_ent}}" style="{{vss.config.frontend_config.media_fixed.media_container_style}}" onTap="layout_url_event" data-value="{{item.goods_url || ''}}">
|
||||
<image src="{{item.images}}" mode="widthFix" class="{{vss.config.frontend_config.media_fixed.media_ent}}"></image>
|
||||
<view class="item-bottom">
|
||||
<view class="module-title">{{item.title}}</view>
|
||||
<view class="module-price">{{currency_symbol}}{{item.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
|
||||
<!-- 标题 -->
|
||||
<block a:elif="{{vss.value == 'title'}}">
|
||||
<view class="module-title-content">
|
||||
<text class="title-main" style="{{vss.config.frontend_config.style_title_main}}">{{vss.config.title}}</text>
|
||||
<text a:if="{{(vss.config.title_vice || null) != null}}" class="title-vice" style="{{vss.config.frontend_config.style_title_vice}}">{{vss.config.title_vice}}</text>
|
||||
<view a:if="{{(vss.config.title_more || null) != null}}" class="more-content">
|
||||
<view style="{{vss.config.frontend_config.style_title_more}}" onTap="layout_url_event" data-value="{{vss.config.title_more_url || ''}}">{{vss.config.title_more}} ></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
37
sourcecode/alipay/default/components/layout/layout.js
Executable file
37
sourcecode/alipay/default/components/layout/layout.js
Executable file
@ -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);
|
||||
},
|
||||
},
|
||||
});
|
3
sourcecode/alipay/default/components/layout/layout.json
Executable file
3
sourcecode/alipay/default/components/layout/layout.json
Executable file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
@ -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,
|
||||
|
155
sourcecode/alipay/default/pages/design/design.acss
Normal file
155
sourcecode/alipay/default/pages/design/design.acss
Normal file
@ -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;
|
||||
}
|
14
sourcecode/alipay/default/pages/design/design.axml
Normal file
14
sourcecode/alipay/default/pages/design/design.axml
Normal file
@ -0,0 +1,14 @@
|
||||
<view a:if="{{(data || null) != null}}">
|
||||
<!-- 拖拽模式、引入拖拽数据模块 -->
|
||||
<component-layout data="{{layout_data}}"></component-layout>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<block a:if="{{(data.is_footer || 0) == 1}}">
|
||||
<import src="/pages/common/bottom_line.axml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
</block>
|
||||
</view>
|
||||
<view a:else>
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
|
||||
</view>
|
83
sourcecode/alipay/default/pages/design/design.js
Normal file
83
sourcecode/alipay/default/pages/design/design.js
Normal file
@ -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
|
||||
};
|
||||
},
|
||||
});
|
6
sourcecode/alipay/default/pages/design/design.json
Normal file
6
sourcecode/alipay/default/pages/design/design.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"pullRefresh": true,
|
||||
"usingComponents": {
|
||||
"component-layout": "/components/layout/layout"
|
||||
}
|
||||
}
|
@ -505,3 +505,40 @@
|
||||
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;
|
||||
}
|
@ -118,6 +118,20 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 多商户 -->
|
||||
<view a:if="{{plugins_shop_data != null}}" class="plugins-shop-container spacing-mt bg-white oh">
|
||||
<navigator url="/pages/plugins/shop/detail/detail?id={{plugins_shop_data.id}}" hover-class="none">
|
||||
<image src="{{plugins_shop_data.logo}}" mode="aspectFit" class="plugins-shop-logo fl"></image>
|
||||
<view class="plugins-shop-base fr arrow-right">
|
||||
<view class="plugins-shop-title single-text">
|
||||
<text a:if="{{plugins_shop_data.auth_type == 1}}" class="plugins-shop-auth-icon">{{plugins_shop_data.auth_type_name}}</text>
|
||||
<text>{{plugins_shop_data.name}}</text>
|
||||
</view>
|
||||
<view class="plugins-shop-desc multi-text cr-888 margin-top-sm">{{plugins_shop_data.describe}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情参数 -->
|
||||
<view a:if="{{(goods.parameters || null) != null && goods.parameters.detail.length > 0}}" class="goods-parameters spacing-mt bg-white">
|
||||
<view class="spacing-nav-title">
|
||||
@ -134,13 +148,6 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 属性导航 -->
|
||||
<!-- <view a:if="{{false}}" class="spacing">
|
||||
<view class="goods-spec-show-title bg-white arrow-right cr-666" onTap="good_spec_nav_event">
|
||||
属性
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 商品详情 -->
|
||||
<view class="goods-detail spacing-mt bg-white">
|
||||
<view class="spacing-nav-title">
|
||||
@ -177,12 +184,12 @@
|
||||
<!-- 底部操作 -->
|
||||
<view class="goods-buy-nav wh-auto bg-white">
|
||||
<view class="shop fl tc br-t" onTap="shop_event">
|
||||
<image src="/images/default-home-icon.png" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">首页</text>
|
||||
<image src="{{nav_home_button_info.icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{nav_home_button_info.text}}</text>
|
||||
</view>
|
||||
<view class="collect fl tc br-t" onTap="goods_favor_event">
|
||||
<image src="{{goods_favor_icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{goods_favor_text}}</text>
|
||||
<image src="/images/default-favor-icon-{{nav_favor_button_info.status}}.png" mode="scaleToFill" />
|
||||
<text class="dis-block {{nav_favor_button_info.status == 1 ? 'cr-main' : 'cr-888'}}">{{nav_favor_button_info.text}}</text>
|
||||
</view>
|
||||
|
||||
|
||||
|
@ -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: {},
|
||||
@ -32,6 +30,18 @@ Page({
|
||||
show_field_price_text: null,
|
||||
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 {
|
||||
|
@ -12,11 +12,14 @@
|
||||
<view class="tips">{{common_shop_notice}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 轮播 -->
|
||||
<component-slider data="{{banner_list}}" />
|
||||
<!-- 拖拽模式下不展示 -->
|
||||
<block a:if="{{home_index_floor_data_type != 2}}">
|
||||
<!-- 轮播 -->
|
||||
<component-slider data="{{banner_list}}" />
|
||||
|
||||
<!-- 导航 -->
|
||||
<component-icon-nav data="{{navigation}}" />
|
||||
<!-- 导航 -->
|
||||
<component-icon-nav data="{{navigation}}" />
|
||||
</block>
|
||||
|
||||
<!-- 限时秒杀 -->
|
||||
<view a:if="{{plugins_limitedtimediscount_is_valid == 1}}">
|
||||
@ -25,7 +28,14 @@
|
||||
</view>
|
||||
|
||||
<!-- 楼层数据 -->
|
||||
<block a:if="{{data_list.length > 0}}">
|
||||
<block a:if="{{(data_list || nul) != null && data_list.length > 0}}">
|
||||
<!-- 数据模式0,1自动+手动、2拖拽 -->
|
||||
<block a:if="{{home_index_floor_data_type == 2}}">
|
||||
<!-- 引入拖拽数据模块 -->
|
||||
<component-layout data="{{data_list}}"></component-layout>
|
||||
</block>
|
||||
<block a:else>
|
||||
<!-- 自动+手动 -->
|
||||
<view a:for="{{data_list}}" a:for-item="floor" class="floor spacing-mb">
|
||||
<view class="spacing-nav-title">
|
||||
<text class="line"></text>
|
||||
@ -58,6 +68,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
|
||||
<!-- 底部购买记录 -->
|
||||
@ -75,7 +86,7 @@
|
||||
<view class="item-content fl">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
|
||||
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
|
||||
<text class="margin-left-sm">{{item.title}}</text>
|
||||
<text class="margin-left-sm single-text">{{item.title}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
|
||||
|
@ -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'),
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
@ -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 || ''
|
||||
};
|
||||
},
|
||||
});
|
157
sourcecode/alipay/default/pages/plugins/shop/design/design.acss
Normal file
157
sourcecode/alipay/default/pages/plugins/shop/design/design.acss
Normal file
@ -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;
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<view a:if="{{(data || null) != null}}">
|
||||
<!-- 头部 -->
|
||||
<block a:if="{{(data.is_header || 0) == 1}}">
|
||||
<import src="/pages/plugins/shop/public/header.axml" />
|
||||
<template is="shop-header" data="{{data_base: data_base, shop: shop, shop_navigation: shop_navigation, shop_goods_category: shop_goods_category, shop_favor_info: shop_favor_info, search_keywords_value: search_keywords_value, header_service_status: header_service_status, nav_category_status: nav_category_status}}"></template>
|
||||
</block>
|
||||
|
||||
<!-- 拖拽模式、引入拖拽数据模块 -->
|
||||
<component-layout data="{{layout_data}}"></component-layout>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<block a:if="{{(data.is_footer || 0) == 1}}">
|
||||
<import src="/pages/common/bottom_line.axml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
</block>
|
||||
</view>
|
||||
<view a:else>
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
|
||||
</view>
|
201
sourcecode/alipay/default/pages/plugins/shop/design/design.js
Normal file
201
sourcecode/alipay/default/pages/plugins/shop/design/design.js
Normal file
@ -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
|
||||
};
|
||||
},
|
||||
});
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"pullRefresh": true,
|
||||
"navigationBarBackgroundColor": "#d2364c",
|
||||
"titleBarColor": "#d2364c",
|
||||
"backgroundColorBottom": "#f5f5f5",
|
||||
"backgroundTextStyle": "light",
|
||||
"usingComponents": {
|
||||
"component-layout": "/components/layout/layout"
|
||||
}
|
||||
}
|
201
sourcecode/alipay/default/pages/plugins/shop/detail/detail.acss
Normal file
201
sourcecode/alipay/default/pages/plugins/shop/detail/detail.acss
Normal file
@ -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;
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
<view a:if="{{(data || null) != null}}">
|
||||
<!-- 头部 -->
|
||||
<import src="/pages/plugins/shop/public/header.axml" />
|
||||
<template is="shop-header" data="{{data_base: data_base, shop: shop, shop_navigation: shop_navigation, shop_goods_category: shop_goods_category, shop_favor_info: shop_favor_info, search_keywords_value: search_keywords_value, header_service_status: header_service_status, nav_category_status: nav_category_status}}"></template>
|
||||
|
||||
<!-- 数据模式 -->
|
||||
<block a:if="{{(shop.data_model || 0) == 1}}">
|
||||
<!-- 拖拽模式、引入拖拽数据模块 -->
|
||||
<component-layout data="{{data}}"></component-layout>
|
||||
</block>
|
||||
<!-- 自动模式 -->
|
||||
<block a:else>
|
||||
<view class="shop-category-list nav-roll oh bg-white margin-top-sm margin-bottom-sm">
|
||||
<scroll-view scroll-x>
|
||||
<view class="item {{(shop_category_tab_value == 0) ? 'active' : ''}}" onTap="shop_category_tab_event" data-value="0">全部商品</view>
|
||||
<block a:if="{{shop_goods_category.length > 0}}">
|
||||
<block a:for="{{shop_goods_category}}" a:key="key">
|
||||
<view class="item {{(shop_category_tab_value == item.id) ? 'active' : ''}}" onTap="shop_category_tab_event" data-value="{{item.id}}">{{item.name}}</view>
|
||||
</block>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="data-list oh">
|
||||
<block a:if="{{goods_list.length > 0}}">
|
||||
<block a:for="{{goods_list}}" a:key="key">
|
||||
<view a:if="{{item.active != 0}}" class="items bg-white">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.id}}" hover-class="none">
|
||||
<image src="{{item.images}}" mode="aspectFit" />
|
||||
<view class="base">
|
||||
<view class="multi-text">{{item.title}}</view>
|
||||
<view class="price">
|
||||
<text class="sales-price">{{currency_symbol}}{{item.min_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<block a:else>
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: 0}}"></template>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<import src="/pages/common/bottom_line.axml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
</view>
|
||||
<view a:else>
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
|
||||
</view>
|
247
sourcecode/alipay/default/pages/plugins/shop/detail/detail.js
Normal file
247
sourcecode/alipay/default/pages/plugins/shop/detail/detail.js
Normal file
@ -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
|
||||
};
|
||||
},
|
||||
});
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"pullRefresh": true,
|
||||
"navigationBarBackgroundColor": "#d2364c",
|
||||
"titleBarColor": "#d2364c",
|
||||
"backgroundColorBottom": "#f5f5f5",
|
||||
"backgroundTextStyle": "light",
|
||||
"usingComponents": {
|
||||
"component-layout": "/components/layout/layout"
|
||||
}
|
||||
}
|
29
sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.acss
Executable file
29
sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.acss
Executable file
@ -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;
|
||||
}
|
20
sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.axml
Executable file
20
sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.axml
Executable file
@ -0,0 +1,20 @@
|
||||
<scroll-view scroll-y="{{true}}" class="scroll-box" onScrollToLower="scroll_lower" lower-threshold="30">
|
||||
<view class="list-item" a:if="{{data_list.length > 0}}">
|
||||
<view class="item oh bg-white spacing-mb" a:for="{{data_list}}" a:for-item="item" >
|
||||
<navigator url="/pages/plugins/shop/detail/detail?id={{item.shop_info.id}}" hover-class="none">
|
||||
<image class="logo fl" src="{{item.shop_info.logo}}" mode="aspectFill" />
|
||||
<view class="base">
|
||||
<view class="title single-text">{{item.shop_info.name}}</view>
|
||||
<view class="describe multi-text cr-888">{{item.shop_info.describe}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
<button class="submit-cancel" type="default" size="mini" onTap="cancel_event" data-value="{{item.id}}" data-index="{{index}}" hover-class="none">取消</button>
|
||||
</view>
|
||||
</view>
|
||||
<view a:if="{{data_list.length == 0}}">
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
|
||||
</view>
|
||||
<import src="/pages/common/bottom_line.axml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
</scroll-view>
|
184
sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.js
Executable file
184
sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.js
Executable file
@ -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("服务器请求出错");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
6
sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.json
Executable file
6
sourcecode/alipay/default/pages/plugins/shop/faovr/faovr.json
Executable file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"pullRefresh": true,
|
||||
"defaultTitle": "店铺收藏",
|
||||
"usingComponents": {
|
||||
}
|
||||
}
|
59
sourcecode/alipay/default/pages/plugins/shop/index/index.acss
Executable file
59
sourcecode/alipay/default/pages/plugins/shop/index/index.acss
Executable file
@ -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;
|
||||
}
|
42
sourcecode/alipay/default/pages/plugins/shop/index/index.axml
Executable file
42
sourcecode/alipay/default/pages/plugins/shop/index/index.axml
Executable file
@ -0,0 +1,42 @@
|
||||
<view a:if="{{(data_base || null) != null}}">
|
||||
<!-- 分类 -->
|
||||
<scroll-view a:if="{{(shop_category || null) != null && shop_category.length > 0}}" class="nav-list bg-white oh" scroll-x="true">
|
||||
<view class="item cr-888 {{nav_active_value == 0 ? 'active' : ''}}" onTap="nav_event" data-value="0">全部</view>
|
||||
<block a:for="{{shop_category}}" a:key="key">
|
||||
<view class="item cr-888 {{nav_active_value == item.id ? 'active' : ''}}" onTap="nav_event" data-value="{{item.id}}">{{item.name}}</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<scroll-view scroll-y="{{true}}" class="scroll-box" onScrollToLower="scroll_lower" lower-threshold="30">
|
||||
<view a:if="{{(data_list || null) != null && data_list.length > 0}}" class="data-list oh spacing-mt">
|
||||
<block a:for="{{data_list}}" a:key="key">
|
||||
<view class="item bg-white">
|
||||
<navigator url="/pages/plugins/shop/detail/detail?id={{item.id}}" hover-class="none">
|
||||
<image src="{{item.logo_long}}" mode="aspectFit" />
|
||||
<view class="base br-t-dashed">
|
||||
<view class="single-text name tc">{{item.name}}</view>
|
||||
<view class="multi-text desc">{{item.describe}}</view>
|
||||
<view class="oh margin-top-sm single-text base-bottom">
|
||||
<view class="bitem fl cr-888 single-text">商品 {{item.goods_count}}</view>
|
||||
<view class="bitem fr cr-888 single-text tr">销量 {{item.goods_sales_count}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view a:else>
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<import src="/pages/common/bottom_line.axml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view a:else>
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
|
||||
</view>
|
193
sourcecode/alipay/default/pages/plugins/shop/index/index.js
Executable file
193
sourcecode/alipay/default/pages/plugins/shop/index/index.js
Executable file
@ -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
|
||||
};
|
||||
},
|
||||
});
|
8
sourcecode/alipay/default/pages/plugins/shop/index/index.json
Executable file
8
sourcecode/alipay/default/pages/plugins/shop/index/index.json
Executable file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"pullRefresh": true,
|
||||
"defaultTitle": "所有店铺",
|
||||
"usingComponents": {
|
||||
"component-quick-nav": "/components/quick-nav/quick-nav",
|
||||
"component-popup": "/components/popup/popup"
|
||||
}
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
<template name="shop-header">
|
||||
<!-- 搜索 -->
|
||||
<view class="search oh">
|
||||
<input type="done" placeholder="请输入您搜索的商品关键字" value="{{search_keywords_value || ''}}" class="bg-white wh-auto fl" placeholder-class="cr-ccc" onInput="search_keywords_event" />
|
||||
<view class="search-btn fr">
|
||||
<button class="mini-btn" type="default" size="mini" hover-class="none" onTap="search_button_event" data-value="/pages/goods-search/goods-search?">搜全站</button>
|
||||
<button class="mini-btn" type="default" size="mini" hover-class="none" onTap="search_button_event" data-value="/pages/plugins/shop/search/search?shop_id={{shop.id}}&">搜本店</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 顶部 -->
|
||||
<view class="header bg-white oh">
|
||||
<image src="{{shop.logo_long}}" mode="widthFix" class="shop-logo fl br-r padding-right-lg"></image>
|
||||
<view class="base fr">
|
||||
<view class="shop-title single-text">
|
||||
<text a:if="{{((data_base.is_auth_fill_info || 0) == 1 || (data_base.is_auth_upload_pic || 0) == 1) && shop.auth_type == 1 && (shop.auth_type_name || null) != null}}" class="shop-auth-icon">{{shop.auth_type_name}}</text>
|
||||
<text>{{shop.name}}</text>
|
||||
</view>
|
||||
<view class="base-bottom oh margin-top-sm">
|
||||
<view a:if="{{(data_base.is_service_info || 0) == 1}}" class="fl margin-right-xxl" onTap="header_service_event">
|
||||
<image src="/images/user-nav-customer-service-icon.png" mode="scaleToFill" class="va-m" />
|
||||
<text class="va-m cr-666">在线客服</text>
|
||||
</view>
|
||||
<view class="fl single-text" onTap="shop_favor_event">
|
||||
<image src="/images/default-favor-icon-{{shop_favor_info.status}}.png" mode="scaleToFill" class="va-m" />
|
||||
<text class="va-m {{shop_favor_info.status == 1 ? 'cr-main' : ''}}">{{shop_favor_info.text}}({{shop_favor_info.count}})</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 在线客服 -->
|
||||
<view a:if="{{header_service_status && (data_base.is_service_info || 0) == 1}}" class="header-service bg-white oh padding-top-xxl br">
|
||||
<view a:if="{{(shop.service_weixin_qrcode || null) != null}}" class="tc margin-bottom-sm">
|
||||
<image src="{{shop.service_weixin_qrcode}}" mode="scaleToFill" onTap="image_show_event" data-value="{{shop.service_weixin_qrcode}}" />
|
||||
<view>点击长按微信咨询</view>
|
||||
</view>
|
||||
<view a:if="{{(shop.service_qq || null) != null}}" class="item br-t single-text">
|
||||
<text>QQ:</text>
|
||||
<text onTap="text_copy_event" data-value="{{shop.service_qq}}">{{shop.service_qq}}</text>
|
||||
</view>
|
||||
<view a:if="{{(shop.service_tel || null) != null}}" class="item br-t single-text">
|
||||
<text>电话:</text>
|
||||
<text onTap="text_copy_event" data-value="{{shop.service_tel}}">{{shop.service_tel}}</text>
|
||||
</view>
|
||||
<view a:if="{{(shop.open_week_name || null) != null && (shop.close_week_name || null) != null}}" class="item br-t single-text">
|
||||
<text>时间:</text>
|
||||
<text onTap="text_copy_event" data-value="{{shop.open_week_name}}至{{shop.close_week_name}},{{shop.open_time}}-{{shop.close_time}}">{{shop.open_week_name}}至{{shop.close_week_name}},{{shop.open_time}}-{{shop.close_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 导航 -->
|
||||
<view class="nav nav-roll bg-white padding-top-lg">
|
||||
<view class="item arrow-bottom nav-shop-category fl" onTap="nav_shop_category_event">查看商品分类</view>
|
||||
<scroll-view scroll-x class="nav-scroll">
|
||||
<block a:if="{{shop_navigation.length > 0}}">
|
||||
<block a:for="{{shop_navigation}}" a:key="key">
|
||||
<view class="item" onTap="nav_event" data-value="{{item.url}}" data-index="{{index}}">{{item.name}}</view>
|
||||
</block>
|
||||
</block>
|
||||
</scroll-view>
|
||||
<view a:if="{{nav_category_status}}" class="nav-category bg-white tc">
|
||||
<scroll-view scroll-y class="category-scroll">
|
||||
<block a:if="{{shop_goods_category.length > 0}}">
|
||||
<block a:for="{{shop_goods_category}}" a:key="key">
|
||||
<view class="item single-text" onTap="shop_category_event" data-value="{{item.id}}">{{item.name}}</view>
|
||||
</block>
|
||||
</block>
|
||||
<block a:else>
|
||||
<view class="padding-top-xxl padding-bottom-xxl cr-ccc">暂无数据</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
162
sourcecode/alipay/default/pages/plugins/shop/search/search.acss
Executable file
162
sourcecode/alipay/default/pages/plugins/shop/search/search.acss
Executable file
@ -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;
|
||||
}
|
72
sourcecode/alipay/default/pages/plugins/shop/search/search.axml
Executable file
72
sourcecode/alipay/default/pages/plugins/shop/search/search.axml
Executable file
@ -0,0 +1,72 @@
|
||||
<!-- 排序 -->
|
||||
<view class="nav-sort oh">
|
||||
<view class="nav-sort-content">
|
||||
<block a:for="{{search_nav_sort_list}}" a:key="key">
|
||||
<view class="item tc fl" data-index="{{index}}" onTap="nav_sort_event">
|
||||
<text class="cr-666">{{item.name}}</text>
|
||||
<image a:if="{{(item.icon || null) != null}}" class="icon" src="/images/search-{{item.icon}}-icon.png" mode="aspectFill" />
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<image class="screening-submit" src="/images/search-submit-icon.png" mode="aspectFill" onTap="popup_form_event_show" />
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<scroll-view scroll-y="{{true}}" class="scroll-box" onScrollToLower="scroll_lower" lower-threshold="30">
|
||||
<view class="data-list">
|
||||
<view class="items bg-white" a:for="{{data_list}}" a:key="key">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.id}}" hover-class="none">
|
||||
<image src="{{item.images}}" mode="aspectFit" />
|
||||
<view class="base">
|
||||
<view class="multi-text">{{item.title}}</view>
|
||||
<view class="price">
|
||||
<text class="sales-price">{{currency_symbol}}{{item.min_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view a:if="{{data_list.length == 0}}">
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
|
||||
</view>
|
||||
|
||||
<import src="/pages/common/bottom_line.axml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 筛选条件 popup -->
|
||||
<component-popup prop-show="{{is_show_popup_form}}" prop-position="left" onClose="popup_form_event_close">
|
||||
<form onSubmit="form_submit_event" class="popup-form oh bg-white">
|
||||
<view class="search-map">
|
||||
<view class="map-item map-base">
|
||||
<text>筛选出</text>
|
||||
<text class="cr-main"> {{data_total}} </text>
|
||||
<text>条数据</text>
|
||||
<text class="map-remove-submit fr" onTap="map_remove_event">清除</text>
|
||||
</view>
|
||||
|
||||
<!-- 搜索关键字 -->
|
||||
<input type="text" placeholder="其实搜索很简单^_^ !" name="wd" value="{{(post_data.wd || '')}}" class="map-keywords wh-auto" placeholder-class="cr-ccc" />
|
||||
|
||||
<!-- 分类 -->
|
||||
<view a:if="{{(category_list || null) != null && category_list.length > 0}}" class="map-item">
|
||||
<view class="map-nav tc">
|
||||
<text>分类</text>
|
||||
<text class="arrow-bottom" a:if="{{category_list.length > 3}}" onTap="more_event" data-value="category_list">更多</text>
|
||||
</view>
|
||||
<view class="map-content map-text-items map-category-container oh bg-white" style="height:{{map_fields_list.category_list.height}};">
|
||||
<block a:for="{{category_list}}" a:key="key">
|
||||
<view class="fl {{item.active == 1 ? 'active' : ''}}" onTap="map_item_event" data-index="{{index}}" data-field="category_list">{{item.name}}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button formType="submit" class="bg-main search-submit wh-auto" disabled="{{popup_form_loading_status}}" hover-class="none">确认</button>
|
||||
</view>
|
||||
</form>
|
||||
</component-popup>
|
||||
|
||||
<!-- 快捷导航 -->
|
||||
<component-quick-nav></component-quick-nav>
|
343
sourcecode/alipay/default/pages/plugins/shop/search/search.js
Executable file
343
sourcecode/alipay/default/pages/plugins/shop/search/search.js
Executable file
@ -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
|
||||
};
|
||||
},
|
||||
});
|
8
sourcecode/alipay/default/pages/plugins/shop/search/search.json
Executable file
8
sourcecode/alipay/default/pages/plugins/shop/search/search.json
Executable file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"pullRefresh": true,
|
||||
"defaultTitle": "店铺商品搜索",
|
||||
"usingComponents": {
|
||||
"component-quick-nav": "/components/quick-nav/quick-nav",
|
||||
"component-popup": "/components/popup/popup"
|
||||
}
|
||||
}
|
@ -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 || ''
|
||||
};
|
||||
},
|
||||
});
|
@ -509,3 +509,40 @@
|
||||
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;
|
||||
}
|
@ -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 {
|
||||
|
@ -111,6 +111,20 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 多商户 -->
|
||||
<view s-if="plugins_shop_data != null" class="plugins-shop-container spacing-mt bg-white oh">
|
||||
<navigator url="/pages/plugins/shop/detail/detail?id={{plugins_shop_data.id}}" hover-class="none">
|
||||
<image src="{{plugins_shop_data.logo}}" mode="aspectFit" class="plugins-shop-logo fl"></image>
|
||||
<view class="plugins-shop-base fr arrow-right">
|
||||
<view class="plugins-shop-title single-text">
|
||||
<text s-if="plugins_shop_data.auth_type == 1" class="plugins-shop-auth-icon">{{plugins_shop_data.auth_type_name}}</text>
|
||||
<text>{{plugins_shop_data.name}}</text>
|
||||
</view>
|
||||
<view class="plugins-shop-desc multi-text cr-888 margin-top-sm">{{plugins_shop_data.describe}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情参数 -->
|
||||
<view s-if="(goods.parameters || null) != null && goods.parameters.detail.length > 0" class="goods-parameters spacing-mt bg-white">
|
||||
<view class="spacing-nav-title">
|
||||
@ -163,12 +177,12 @@
|
||||
<!-- 底部操作 -->
|
||||
<view class="goods-buy-nav wh-auto bg-white">
|
||||
<view class="shop fl tc br-t" bindtap="shop_event">
|
||||
<image src="/images/default-home-icon.png" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">首页</text>
|
||||
<image src="{{nav_home_button_info.icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{nav_home_button_info.text}}</text>
|
||||
</view>
|
||||
<view class="collect fl tc br-t" bindtap="goods_favor_event">
|
||||
<image src="{{goods_favor_icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{goods_favor_text}}</text>
|
||||
<image src="/images/default-favor-icon-{{nav_favor_button_info.status}}.png" mode="scaleToFill" />
|
||||
<text class="dis-block {{nav_favor_button_info.status == 1 ? 'cr-main' : 'cr-888'}}">{{nav_favor_button_info.text}}</text>
|
||||
</view>
|
||||
|
||||
<view class="fr goods-buy-nav-btn-number-{{buy_button.count || 0}}">
|
||||
|
@ -75,7 +75,7 @@
|
||||
<view class="item-content fl">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
|
||||
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
|
||||
<text class="margin-left-sm">{{item.title}}</text>
|
||||
<text class="margin-left-sm single-text">{{item.title}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
|
||||
|
@ -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 {
|
||||
|
@ -118,6 +118,20 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 多商户 -->
|
||||
<view qq:if="{{plugins_shop_data != null}}" class="plugins-shop-container spacing-mt bg-white oh">
|
||||
<navigator url="/pages/plugins/shop/detail/detail?id={{plugins_shop_data.id}}" hover-class="none">
|
||||
<image src="{{plugins_shop_data.logo}}" mode="aspectFit" class="plugins-shop-logo fl"></image>
|
||||
<view class="plugins-shop-base fr arrow-right">
|
||||
<view class="plugins-shop-title single-text">
|
||||
<text qq:if="{{plugins_shop_data.auth_type == 1}}" class="plugins-shop-auth-icon">{{plugins_shop_data.auth_type_name}}</text>
|
||||
<text>{{plugins_shop_data.name}}</text>
|
||||
</view>
|
||||
<view class="plugins-shop-desc multi-text cr-888 margin-top-sm">{{plugins_shop_data.describe}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情参数 -->
|
||||
<view qq:if="{{(goods.parameters || null) != null && goods.parameters.detail.length > 0}}" class="goods-parameters spacing-mt bg-white">
|
||||
<view class="spacing-nav-title">
|
||||
@ -170,12 +184,12 @@
|
||||
<!-- 底部操作 -->
|
||||
<view class="goods-buy-nav wh-auto bg-white">
|
||||
<view class="shop fl tc br-t" bindtap="shop_event">
|
||||
<image src="/images/default-home-icon.png" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">首页</text>
|
||||
<image src="{{nav_home_button_info.icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{nav_home_button_info.text}}</text>
|
||||
</view>
|
||||
<view class="collect fl tc br-t" bindtap="goods_favor_event">
|
||||
<image src="{{goods_favor_icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{goods_favor_text}}</text>
|
||||
<image src="/images/default-favor-icon-{{nav_favor_button_info.status}}.png" mode="scaleToFill" />
|
||||
<text class="dis-block {{nav_favor_button_info.status == 1 ? 'cr-main' : 'cr-888'}}">{{nav_favor_button_info.text}}</text>
|
||||
</view>
|
||||
<view class="fr goods-buy-nav-btn-number-{{buy_button.count || 0}}">
|
||||
<block qq:if="{{(buy_button.data || null) != null && buy_button.data.length > 0}}">
|
||||
|
@ -505,3 +505,40 @@
|
||||
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;
|
||||
}
|
@ -75,7 +75,7 @@
|
||||
<view class="item-content fl">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
|
||||
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
|
||||
<text class="margin-left-sm">{{item.title}}</text>
|
||||
<text class="margin-left-sm single-text">{{item.title}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
|
||||
|
@ -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 {
|
||||
|
@ -118,6 +118,20 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 多商户 -->
|
||||
<view tt:if="{{plugins_shop_data != null}}" class="plugins-shop-container spacing-mt bg-white oh">
|
||||
<navigator url="/pages/plugins/shop/detail/detail?id={{plugins_shop_data.id}}" hover-class="none">
|
||||
<image src="{{plugins_shop_data.logo}}" mode="aspectFit" class="plugins-shop-logo fl"></image>
|
||||
<view class="plugins-shop-base fr arrow-right">
|
||||
<view class="plugins-shop-title single-text">
|
||||
<text tt:if="{{plugins_shop_data.auth_type == 1}}" class="plugins-shop-auth-icon">{{plugins_shop_data.auth_type_name}}</text>
|
||||
<text>{{plugins_shop_data.name}}</text>
|
||||
</view>
|
||||
<view class="plugins-shop-desc multi-text cr-888 margin-top-sm">{{plugins_shop_data.describe}}</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<!-- 商品详情参数 -->
|
||||
<view tt:if="{{(goods.parameters || null) != null && goods.parameters.detail.length > 0}}" class="goods-parameters spacing-mt bg-white">
|
||||
<view class="spacing-nav-title">
|
||||
@ -170,12 +184,12 @@
|
||||
<!-- 底部操作 -->
|
||||
<view class="goods-buy-nav wh-auto bg-white">
|
||||
<view class="shop fl tc br-t" bindtap="shop_event">
|
||||
<image src="/images/default-home-icon.png" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">首页</text>
|
||||
<image src="{{nav_home_button_info.icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{nav_home_button_info.text}}</text>
|
||||
</view>
|
||||
<view class="collect fl tc br-t" bindtap="goods_favor_event">
|
||||
<image src="{{goods_favor_icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{goods_favor_text}}</text>
|
||||
<image src="/images/default-favor-icon-{{nav_favor_button_info.status}}.png" mode="scaleToFill" />
|
||||
<text class="dis-block {{nav_favor_button_info.status == 1 ? 'cr-main' : 'cr-888'}}">{{nav_favor_button_info.text}}</text>
|
||||
</view>
|
||||
<view class="fr goods-buy-nav-btn-number-{{buy_button.count || 0}}">
|
||||
<block tt:if="{{(buy_button.data || null) != null && buy_button.data.length > 0}}">
|
||||
|
@ -505,3 +505,40 @@
|
||||
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;
|
||||
}
|
@ -78,7 +78,7 @@
|
||||
<view class="item-content fl">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
|
||||
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
|
||||
<text class="margin-left-sm">{{item.title}}</text>
|
||||
<text class="margin-left-sm single-text">{{item.title}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
|
||||
|
@ -50,8 +50,8 @@
|
||||
autoplay="{{vss.config.data_list.length > 0}}"
|
||||
circular="{{circular}}" style="{{vss.config.frontend_config.media_fixed.media_container_style}}">
|
||||
<block wx:for="{{vss.config.data_list}}" wx:key="ik">
|
||||
<swiper-item class="{{vss.config.frontend_config.media_fixed.media_container_ent}}" bindtap="layout_url_event" data-value="{{item.url || ''}}">
|
||||
<image src="{{item.images}}" mode="aspectFill" class="{{vss.config.frontend_config.media_fixed.media_ent}}"></image>
|
||||
<swiper-item class="{{vss.config.frontend_config.media_fixed.media_container_ent}}">
|
||||
<image src="{{item.images}}" mode="aspectFill" class="{{vss.config.frontend_config.media_fixed.media_ent}}" bindtap="layout_url_event" data-value="{{item.url || ''}}"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
@ -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 {
|
||||
|
@ -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('服务器请求出错');
|
||||
}
|
||||
});
|
||||
|
@ -183,11 +183,11 @@
|
||||
<view class="goods-buy-nav wh-auto bg-white">
|
||||
<view class="shop fl tc br-t" bindtap="shop_event">
|
||||
<image src="{{nav_home_button_info.icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{nav_home_button_info.name}}</text>
|
||||
<text class="dis-block cr-888">{{nav_home_button_info.text}}</text>
|
||||
</view>
|
||||
<view class="collect fl tc br-t" bindtap="goods_favor_event">
|
||||
<image src="{{goods_favor_icon}}" mode="scaleToFill" />
|
||||
<text class="dis-block cr-888">{{goods_favor_text}}</text>
|
||||
<image src="/images/default-favor-icon-{{nav_favor_button_info.status}}.png" mode="scaleToFill" />
|
||||
<text class="dis-block {{nav_favor_button_info.status == 1 ? 'cr-main' : 'cr-888'}}">{{nav_favor_button_info.text}}</text>
|
||||
</view>
|
||||
<view class="fr goods-buy-nav-btn-number-{{buy_button.count || 0}}">
|
||||
<block wx:if="{{(buy_button.data || null) != null && buy_button.data.length > 0}}">
|
||||
|
@ -86,7 +86,7 @@
|
||||
<view class="item-content fl">
|
||||
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
|
||||
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
|
||||
<text class="margin-left-sm">{{item.title}}</text>
|
||||
<text class="margin-left-sm single-text">{{item.title}}</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -28,6 +28,8 @@ Page({
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 启动参数处理
|
||||
params = app.launch_params_handle(params);
|
||||
this.setData({
|
||||
params: params,
|
||||
user: app.get_user_cache_info(),
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
},
|
||||
|
||||
// 初始化
|
||||
|
@ -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,8 +25,9 @@
|
||||
height: calc(100vh - 80rpx);
|
||||
}
|
||||
.data-list .item {
|
||||
width: calc(50% - 5rpx);
|
||||
width: calc(50% - 45rpx);
|
||||
margin-bottom: 10rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.data-list .item:nth-child(2n) {
|
||||
float: right;
|
||||
@ -40,7 +41,10 @@
|
||||
}
|
||||
.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;
|
||||
|
Loading…
Reference in New Issue
Block a user