From 34b61d8e311650dbdd7e10adf69cfc4b94c7a691 Mon Sep 17 00:00:00 2001 From: Devil Date: Wed, 7 Jul 2021 18:33:55 +0800 Subject: [PATCH] =?UTF-8?q?QQ=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8F=AF=E8=A7=86=E5=8C=96=E8=A3=85=E4=BF=AE+=E5=A4=9A?= =?UTF-8?q?=E5=95=86=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sourcecode/alipay/default/app.js | 12 +- .../default/components/quick-nav/quick-nav.js | 2 +- .../alipay/default/pages/index/index.js | 7 + sourcecode/baidu/default/pages/index/index.js | 9 +- sourcecode/qq/default/app.js | 2 +- sourcecode/qq/default/app.json | 8 +- .../qq/default/components/layout/layout.js | 51 ++ .../qq/default/components/layout/layout.json | 3 + .../qq/default/components/layout/layout.qml | 123 +++ .../qq/default/components/layout/layout.qss | 707 ++++++++++++++++++ sourcecode/qq/default/pages/design/design.js | 84 +++ .../qq/default/pages/design/design.json | 6 + sourcecode/qq/default/pages/design/design.qml | 14 + sourcecode/qq/default/pages/design/design.qss | 155 ++++ sourcecode/qq/default/pages/index/index.js | 7 + sourcecode/qq/default/pages/index/index.json | 3 +- sourcecode/qq/default/pages/index/index.qml | 75 +- .../pages/plugins/brand/index/index.js | 13 - .../pages/plugins/shop/design/design.js | 201 +++++ .../pages/plugins/shop/design/design.json | 10 + .../pages/plugins/shop/design/design.qml | 20 + .../pages/plugins/shop/design/design.qss | 158 ++++ .../pages/plugins/shop/detail/detail.js | 247 ++++++ .../pages/plugins/shop/detail/detail.json | 10 + .../pages/plugins/shop/detail/detail.qml | 53 ++ .../pages/plugins/shop/detail/detail.qss | 202 +++++ .../default/pages/plugins/shop/faovr/faovr.js | 184 +++++ .../pages/plugins/shop/faovr/faovr.json | 6 + .../pages/plugins/shop/faovr/faovr.qml | 20 + .../pages/plugins/shop/faovr/faovr.qss | 29 + .../default/pages/plugins/shop/index/index.js | 193 +++++ .../pages/plugins/shop/index/index.json | 8 + .../pages/plugins/shop/index/index.qml | 42 ++ .../pages/plugins/shop/index/index.qss | 59 ++ .../pages/plugins/shop/public/header.qml | 72 ++ .../pages/plugins/shop/search/search.js | 343 +++++++++ .../pages/plugins/shop/search/search.json | 8 + .../pages/plugins/shop/search/search.qml | 72 ++ .../pages/plugins/shop/search/search.qss | 162 ++++ .../toutiao/default/pages/index/index.js | 7 + .../weixin/default/pages/index/index.js | 7 + .../pages/plugins/shop/design/design.wxss | 1 + .../pages/plugins/shop/detail/detail.wxss | 1 + 43 files changed, 3335 insertions(+), 61 deletions(-) create mode 100755 sourcecode/qq/default/components/layout/layout.js create mode 100755 sourcecode/qq/default/components/layout/layout.json create mode 100755 sourcecode/qq/default/components/layout/layout.qml create mode 100755 sourcecode/qq/default/components/layout/layout.qss create mode 100644 sourcecode/qq/default/pages/design/design.js create mode 100644 sourcecode/qq/default/pages/design/design.json create mode 100644 sourcecode/qq/default/pages/design/design.qml create mode 100644 sourcecode/qq/default/pages/design/design.qss create mode 100644 sourcecode/qq/default/pages/plugins/shop/design/design.js create mode 100644 sourcecode/qq/default/pages/plugins/shop/design/design.json create mode 100644 sourcecode/qq/default/pages/plugins/shop/design/design.qml create mode 100644 sourcecode/qq/default/pages/plugins/shop/design/design.qss create mode 100644 sourcecode/qq/default/pages/plugins/shop/detail/detail.js create mode 100644 sourcecode/qq/default/pages/plugins/shop/detail/detail.json create mode 100644 sourcecode/qq/default/pages/plugins/shop/detail/detail.qml create mode 100644 sourcecode/qq/default/pages/plugins/shop/detail/detail.qss create mode 100755 sourcecode/qq/default/pages/plugins/shop/faovr/faovr.js create mode 100755 sourcecode/qq/default/pages/plugins/shop/faovr/faovr.json create mode 100755 sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qml create mode 100755 sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qss create mode 100755 sourcecode/qq/default/pages/plugins/shop/index/index.js create mode 100755 sourcecode/qq/default/pages/plugins/shop/index/index.json create mode 100755 sourcecode/qq/default/pages/plugins/shop/index/index.qml create mode 100755 sourcecode/qq/default/pages/plugins/shop/index/index.qss create mode 100644 sourcecode/qq/default/pages/plugins/shop/public/header.qml create mode 100755 sourcecode/qq/default/pages/plugins/shop/search/search.js create mode 100755 sourcecode/qq/default/pages/plugins/shop/search/search.json create mode 100755 sourcecode/qq/default/pages/plugins/shop/search/search.qml create mode 100755 sourcecode/qq/default/pages/plugins/shop/search/search.qss diff --git a/sourcecode/alipay/default/app.js b/sourcecode/alipay/default/app.js index fc422f240..1b9713d52 100644 --- a/sourcecode/alipay/default/app.js +++ b/sourcecode/alipay/default/app.js @@ -986,17 +986,7 @@ App({ var value = e.currentTarget.dataset.value || null; if(value != null) { - var self = this; - my.setClipboardData({ - data: value, - success (res) { - my.getClipboardData({ - success (res) { - self.showToast('复制成功', 'success'); - } - }); - } - }); + console.info('官方剪贴板api已下线'); } else { this.showToast('复制内容为空'); } diff --git a/sourcecode/alipay/default/components/quick-nav/quick-nav.js b/sourcecode/alipay/default/components/quick-nav/quick-nav.js index 3bcccbd43..5d04b9fa6 100644 --- a/sourcecode/alipay/default/components/quick-nav/quick-nav.js +++ b/sourcecode/alipay/default/components/quick-nav/quick-nav.js @@ -12,7 +12,7 @@ Component({ // 页面被展示 didMount() { // 配置初始化 - this.init_config(true); + this.init_config(); // 数据设置 var system = app.get_system_info(); diff --git a/sourcecode/alipay/default/pages/index/index.js b/sourcecode/alipay/default/pages/index/index.js index d7f37c6d4..106782dac 100644 --- a/sourcecode/alipay/default/pages/index/index.js +++ b/sourcecode/alipay/default/pages/index/index.js @@ -82,6 +82,13 @@ Page({ header: { 'content-type': 'application/x-www-form-urlencoded' }, success: res => { my.stopPullDownRefresh(); + + // 获取最新缓存 + if(this.data.load_status == 0) { + self.init_config(true); + } + + // 设置首次加载状态 self.setData({load_status: 1}); if (res.data.code == 0) { diff --git a/sourcecode/baidu/default/pages/index/index.js b/sourcecode/baidu/default/pages/index/index.js index cd4054413..02948e4ef 100755 --- a/sourcecode/baidu/default/pages/index/index.js +++ b/sourcecode/baidu/default/pages/index/index.js @@ -70,7 +70,14 @@ Page({ dataType: "json", success: res => { swan.stopPullDownRefresh(); - self.setData({ load_status: 1 }); + + // 获取最新缓存 + if(this.data.load_status == 0) { + self.init_config(true); + } + + // 设置首次加载状态 + self.setData({load_status: 1}); if (res.data.code == 0) { var data = res.data.data; diff --git a/sourcecode/qq/default/app.js b/sourcecode/qq/default/app.js index 5328929ab..dddb6bec7 100755 --- a/sourcecode/qq/default/app.js +++ b/sourcecode/qq/default/app.js @@ -74,7 +74,7 @@ App({ // 请求地址 request_url: "{{request_url}}", // request_url: 'http://shopxo.com/', - // request_url: 'https://dev.shopxo.net/', + request_url: 'https://dev.shopxo.net/', // 基础信息 application_title: "{{application_title}}", diff --git a/sourcecode/qq/default/app.json b/sourcecode/qq/default/app.json index 61f55cc8e..3a559b306 100755 --- a/sourcecode/qq/default/app.json +++ b/sourcecode/qq/default/app.json @@ -27,6 +27,7 @@ "pages/user-orderaftersale-detail/user-orderaftersale-detail", "pages/extraction-address/extraction-address", "pages/common/open-setting-location/open-setting-location", + "pages/design/design", "pages/plugins/coupon/index/index", "pages/plugins/coupon/user/user", "pages/plugins/wallet/user/user", @@ -55,7 +56,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": { "navigationBarTitleText": "{{application_title}}", diff --git a/sourcecode/qq/default/components/layout/layout.js b/sourcecode/qq/default/components/layout/layout.js new file mode 100755 index 000000000..76c4af007 --- /dev/null +++ b/sourcecode/qq/default/components/layout/layout.js @@ -0,0 +1,51 @@ +const app = getApp(); +Component({ + data: { + // 基础配置 + is_first: 1, + currency_symbol: app.data.currency_symbol, + + // 轮播基础配置 + indicator_color: 'rgba(0, 0, 0, .3)', + indicator_active_color: '#e31c55', + circular: true, + }, + properties: { + propData: Array + }, + lifetimes: { + // 在组件实例进入页面节点树时执行 + attached: function() { + this.init_config(); + }, + }, + pageLifetimes: { + // 页面被展示 + show: function() { + this.init_config(); + + // 非首次进入则重新初始化配置接口 + if(this.data.is_first == 0) { + app.init_config(); + } + this.setData({is_first: 0}); + }, + }, + methods: { + // 初始化配置 + init_config(status) { + if((status || false) == true) { + this.setData({ + currency_symbol: app.get_config('currency_symbol') || app.data.currency_symbol + }); + } else { + app.is_config(this, 'init_config'); + } + }, + + // 链接地址事件 + layout_url_event(e) { + app.url_event(e); + }, + }, +}); \ No newline at end of file diff --git a/sourcecode/qq/default/components/layout/layout.json b/sourcecode/qq/default/components/layout/layout.json new file mode 100755 index 000000000..32640e0dc --- /dev/null +++ b/sourcecode/qq/default/components/layout/layout.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/sourcecode/qq/default/components/layout/layout.qml b/sourcecode/qq/default/components/layout/layout.qml new file mode 100755 index 000000000..202a1bd51 --- /dev/null +++ b/sourcecode/qq/default/components/layout/layout.qml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.title}} + {{currency_symbol}}{{item.price}} + + + + + + + + + + + + + + + {{item.title}} + {{currency_symbol}}{{item.price}} + + + + + + + + + + + + {{vss.config.title}} + {{vss.config.title_vice}} + + {{vss.config.title_more}} > + + + + + + + + + + + + + diff --git a/sourcecode/qq/default/components/layout/layout.qss b/sourcecode/qq/default/components/layout/layout.qss new file mode 100755 index 000000000..ef7cf9e31 --- /dev/null +++ b/sourcecode/qq/default/components/layout/layout.qss @@ -0,0 +1,707 @@ +/** + * 布局基础 + */ +.layout-content-children,.layout-content-container{overflow:hidden;} + +/** + * 模块类型样式 - 数据列表 + */ +.module-list-content .item{float:left} +.module-list-content-avg-1{width:calc(100% + 1px);margin-left:-1px;margin-top:-1px;} +.module-list-content-avg-2{width:calc(100% + 2px);margin-left:-2px;margin-top:-2px;} +.module-list-content-avg-3{width:calc(100% + 3px);margin-left:-3px;margin-top:-3px;} +.module-list-content-avg-4{width:calc(100% + 4px);margin-left:-4px;margin-top:-4px;} +.module-list-content-avg-5{width:calc(100% + 5px);margin-left:-5px;margin-top:-5px;} +.module-list-content-avg-6{width:calc(100% + 6px);margin-left:-6px;margin-top:-6px;} +.module-list-content-avg-7{width:calc(100% + 7px);margin-left:-7px;margin-top:-7px;} +.module-list-content-avg-8{width:calc(100% + 8px);margin-left:-8px;margin-top:-8px;} +.module-list-content-avg-9{width:calc(100% + 9px);margin-left:-9px;margin-top:-9px;} +.module-list-content-avg-10{width:calc(100% + 10px);margin-left:-10px;margin-top:-10px;} +.module-list-content-avg-11{width:calc(100% + 11px);margin-left:-11px;margin-top:-11px;} +.module-list-content-avg-12{width:calc(100% + 12px);margin-left:-12px;margin-top:-12px;} +.module-list-content-avg-13{width:calc(100% + 13px);margin-left:-13px;margin-top:-13px;} +.module-list-content-avg-14{width:calc(100% + 14px);margin-left:-14px;margin-top:-14px;} +.module-list-content-avg-15{width:calc(100% + 15px);margin-left:-15px;margin-top:-15px;} +.module-list-content-avg-16{width:calc(100% + 16px);margin-left:-16px;margin-top:-16px;} +.module-list-content-avg-17{width:calc(100% + 17px);margin-left:-17px;margin-top:-17px;} +.module-list-content-avg-18{width:calc(100% + 18px);margin-left:-18px;margin-top:-18px;} +.module-list-content-avg-19{width:calc(100% + 19px);margin-left:-19px;margin-top:-19px;} +.module-list-content-avg-20{width:calc(100% + 20px);margin-left:-20px;margin-top:-20px;} +.module-list-content-avg-21{width:calc(100% + 21px);margin-left:-21px;margin-top:-21px;} +.module-list-content-avg-22{width:calc(100% + 22px);margin-left:-22px;margin-top:-22px;} +.module-list-content-avg-23{width:calc(100% + 23px);margin-left:-23px;margin-top:-23px;} +.module-list-content-avg-24{width:calc(100% + 24px);margin-left:-24px;margin-top:-24px;} +.module-list-content-avg-25{width:calc(100% + 25px);margin-left:-25px;margin-top:-25px;} +.module-list-content-avg-26{width:calc(100% + 26px);margin-left:-26px;margin-top:-26px;} +.module-list-content-avg-27{width:calc(100% + 27px);margin-left:-27px;margin-top:-27px;} +.module-list-content-avg-28{width:calc(100% + 28px);margin-left:-28px;margin-top:-28px;} +.module-list-content-avg-29{width:calc(100% + 29px);margin-left:-29px;margin-top:-29px;} +.module-list-content-avg-30{width:calc(100% + 30px);margin-left:-30px;margin-top:-30px;} +.module-list-sm-1 .item{width:100%;} +.module-list-sm-2 .item{width:50%;} +.module-list-sm-3 .item{width:33.33%;} +.module-list-sm-4 .item{width:25%;} +.module-list-sm-5 .item{width:20%;} +.module-list-sm-6 .item{width:16.66%;} +.module-list-sm-7 .item{width:14.28%;} +.module-list-sm-8 .item{width:12.5%;} +.module-list-sm-9 .item{width:11.11%;} +.module-list-sm-10 .item{width:10%;} +.module-list-sm-11 .item{width:9.09%;} +.module-list-sm-12 .item{width:8.33%;} + +/** + * 商品列表 + */ +.module-goods-content .module-item{background:#fff} +.module-goods-content .module-item .item-bottom{margin-top:5px} +.module-goods-content .module-item .module-title{margin-bottom:5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:38px;line-height:20px;font-size:12px;white-space:initial} +.module-goods-content .module-item .module-price{color:#f40;font-weight:bold;word-wrap:normal;text-overflow:ellipsis;white-space:nowrap;font-size:14px;} + + +/** + * 布局圆角 + */ +.layout-sm-border-radius-1{border-radius:1px;} +.layout-sm-border-radius-2{border-radius:2px;} +.layout-sm-border-radius-3{border-radius:3px;} +.layout-sm-border-radius-4{border-radius:4px;} +.layout-sm-border-radius-5{border-radius:5px;} +.layout-sm-border-radius-6{border-radius:6px;} +.layout-sm-border-radius-7{border-radius:7px;} +.layout-sm-border-radius-8{border-radius:8px;} +.layout-sm-border-radius-9{border-radius:9px;} +.layout-sm-border-radius-10{border-radius:10px;} +.layout-sm-border-radius-11{border-radius:11px;} +.layout-sm-border-radius-12{border-radius:12px;} +.layout-sm-border-radius-13{border-radius:13px;} +.layout-sm-border-radius-14{border-radius:14px;} +.layout-sm-border-radius-15{border-radius:15px;} +.layout-sm-border-radius-16{border-radius:16px;} +.layout-sm-border-radius-17{border-radius:17px;} +.layout-sm-border-radius-18{border-radius:18px;} +.layout-sm-border-radius-19{border-radius:19px;} +.layout-sm-border-radius-20{border-radius:20px;} +.layout-sm-border-radius-21{border-radius:21px;} +.layout-sm-border-radius-22{border-radius:22px;} +.layout-sm-border-radius-23{border-radius:23px;} +.layout-sm-border-radius-24{border-radius:24px;} +.layout-sm-border-radius-25{border-radius:25px;} +.layout-sm-border-radius-26{border-radius:26px;} +.layout-sm-border-radius-27{border-radius:27px;} +.layout-sm-border-radius-28{border-radius:28px;} +.layout-sm-border-radius-29{border-radius:29px;} +.layout-sm-border-radius-30{border-radius:30px;} + +/** + * 布局样式 - 边线大小 + */ +.layout-sm-border-top-1{border-top:1px;} +.layout-sm-border-top-2{border-top:2px;} +.layout-sm-border-top-3{border-top:3px;} +.layout-sm-border-top-4{border-top:4px;} +.layout-sm-border-top-5{border-top:5px;} +.layout-sm-border-top-6{border-top:6px;} +.layout-sm-border-top-7{border-top:7px;} +.layout-sm-border-top-8{border-top:8px;} +.layout-sm-border-top-9{border-top:9px;} +.layout-sm-border-top-10{border-top:10px;} + +.layout-sm-border-right-1{border-right:1px;} +.layout-sm-border-right-2{border-right:2px;} +.layout-sm-border-right-3{border-right:3px;} +.layout-sm-border-right-4{border-right:4px;} +.layout-sm-border-right-5{border-right:5px;} +.layout-sm-border-right-6{border-right:6px;} +.layout-sm-border-right-7{border-right:7px;} +.layout-sm-border-right-8{border-right:8px;} +.layout-sm-border-right-9{border-right:9px;} +.layout-sm-border-right-10{border-right:10px;} + +.layout-sm-border-bottom-1{border-bottom:1px;} +.layout-sm-border-bottom-2{border-bottom:2px;} +.layout-sm-border-bottom-3{border-bottom:3px;} +.layout-sm-border-bottom-4{border-bottom:4px;} +.layout-sm-border-bottom-5{border-bottom:5px;} +.layout-sm-border-bottom-6{border-bottom:6px;} +.layout-sm-border-bottom-7{border-bottom:7px;} +.layout-sm-border-bottom-8{border-bottom:8px;} +.layout-sm-border-bottom-9{border-bottom:9px;} +.layout-sm-border-bottom-10{border-bottom:10px;} + +.layout-sm-border-left-1{border-left:1px;} +.layout-sm-border-left-2{border-left:2px;} +.layout-sm-border-left-3{border-left:3px;} +.layout-sm-border-left-4{border-left:4px;} +.layout-sm-border-left-5{border-left:5px;} +.layout-sm-border-left-6{border-left:6px;} +.layout-sm-border-left-7{border-left:7px;} +.layout-sm-border-left-8{border-left:8px;} +.layout-sm-border-left-9{border-left:9px;} +.layout-sm-border-left-10{border-left:10px;} + +/** + * 布局边线 - 边线类型 + */ +.layout-sm-border-top-solid{border-top-style:solid;} +.layout-sm-border-top-dashed{border-top-style:dashed;} +.layout-sm-border-top-dotted{border-top-style:dotted;} +.layout-sm-border-top-double{border-top-style:double;} + +.layout-sm-border-right-solid{border-right-style:solid;} +.layout-sm-border-right-dashed{border-right-style:dashed;} +.layout-sm-border-right-dotted{border-right-style:dotted;} +.layout-sm-border-right-double{border-right-style:double;} + +.layout-sm-border-bottom-solid{border-bottom-style:solid;} +.layout-sm-border-bottom-dashed{border-bottom-style:dashed;} +.layout-sm-border-bottom-dotted{border-bottom-style:dotted;} +.layout-sm-border-bottom-double{border-bottom-style:double;} + +.layout-sm-border-left-solid{border-left-style:solid;} +.layout-sm-border-left-dashed{border-left-style:dashed;} +.layout-sm-border-left-dotted{border-left-style:dotted;} +.layout-sm-border-left-double{border-left-style:double;} + +/** + * 布局外边距 + */ +.layout-sm-margin-top-1{margin-top:1px;} +.layout-sm-margin-top-2{margin-top:2px;} +.layout-sm-margin-top-3{margin-top:3px;} +.layout-sm-margin-top-4{margin-top:4px;} +.layout-sm-margin-top-5{margin-top:5px;} +.layout-sm-margin-top-6{margin-top:6px;} +.layout-sm-margin-top-7{margin-top:7px;} +.layout-sm-margin-top-8{margin-top:8px;} +.layout-sm-margin-top-9{margin-top:9px;} +.layout-sm-margin-top-10{margin-top:10px;} +.layout-sm-margin-top-11{margin-top:11px;} +.layout-sm-margin-top-12{margin-top:12px;} +.layout-sm-margin-top-13{margin-top:13px;} +.layout-sm-margin-top-14{margin-top:14px;} +.layout-sm-margin-top-15{margin-top:15px;} +.layout-sm-margin-top-16{margin-top:16px;} +.layout-sm-margin-top-17{margin-top:17px;} +.layout-sm-margin-top-18{margin-top:18px;} +.layout-sm-margin-top-19{margin-top:19px;} +.layout-sm-margin-top-20{margin-top:20px;} +.layout-sm-margin-top-21{margin-top:21px;} +.layout-sm-margin-top-22{margin-top:22px;} +.layout-sm-margin-top-23{margin-top:23px;} +.layout-sm-margin-top-24{margin-top:24px;} +.layout-sm-margin-top-25{margin-top:25px;} +.layout-sm-margin-top-26{margin-top:26px;} +.layout-sm-margin-top-27{margin-top:27px;} +.layout-sm-margin-top-28{margin-top:28px;} +.layout-sm-margin-top-29{margin-top:29px;} +.layout-sm-margin-top-30{margin-top:30px;} +.layout-sm-margin-top-31{margin-top:31px;} +.layout-sm-margin-top-32{margin-top:32px;} +.layout-sm-margin-top-33{margin-top:33px;} +.layout-sm-margin-top-34{margin-top:34px;} +.layout-sm-margin-top-35{margin-top:35px;} +.layout-sm-margin-top-36{margin-top:36px;} +.layout-sm-margin-top-37{margin-top:37px;} +.layout-sm-margin-top-38{margin-top:38px;} +.layout-sm-margin-top-39{margin-top:39px;} +.layout-sm-margin-top-40{margin-top:40px;} +.layout-sm-margin-top-41{margin-top:41px;} +.layout-sm-margin-top-42{margin-top:42px;} +.layout-sm-margin-top-43{margin-top:43px;} +.layout-sm-margin-top-44{margin-top:44px;} +.layout-sm-margin-top-45{margin-top:45px;} +.layout-sm-margin-top-46{margin-top:46px;} +.layout-sm-margin-top-47{margin-top:47px;} +.layout-sm-margin-top-48{margin-top:48px;} +.layout-sm-margin-top-49{margin-top:49px;} +.layout-sm-margin-top-50{margin-top:50px;} +.layout-sm-margin-top-51{margin-top:51px;} +.layout-sm-margin-top-52{margin-top:52px;} +.layout-sm-margin-top-53{margin-top:53px;} +.layout-sm-margin-top-54{margin-top:54px;} +.layout-sm-margin-top-55{margin-top:55px;} +.layout-sm-margin-top-56{margin-top:56px;} +.layout-sm-margin-top-57{margin-top:57px;} +.layout-sm-margin-top-58{margin-top:58px;} +.layout-sm-margin-top-59{margin-top:59px;} +.layout-sm-margin-top-60{margin-top:60px;} + +.layout-sm-margin-right-1{margin-right:1px;} +.layout-sm-margin-right-2{margin-right:2px;} +.layout-sm-margin-right-3{margin-right:3px;} +.layout-sm-margin-right-4{margin-right:4px;} +.layout-sm-margin-right-5{margin-right:5px;} +.layout-sm-margin-right-6{margin-right:6px;} +.layout-sm-margin-right-7{margin-right:7px;} +.layout-sm-margin-right-8{margin-right:8px;} +.layout-sm-margin-right-9{margin-right:9px;} +.layout-sm-margin-right-10{margin-right:10px;} +.layout-sm-margin-right-11{margin-right:11px;} +.layout-sm-margin-right-12{margin-right:12px;} +.layout-sm-margin-right-13{margin-right:13px;} +.layout-sm-margin-right-14{margin-right:14px;} +.layout-sm-margin-right-15{margin-right:15px;} +.layout-sm-margin-right-16{margin-right:16px;} +.layout-sm-margin-right-17{margin-right:17px;} +.layout-sm-margin-right-18{margin-right:18px;} +.layout-sm-margin-right-19{margin-right:19px;} +.layout-sm-margin-right-20{margin-right:20px;} +.layout-sm-margin-right-21{margin-right:21px;} +.layout-sm-margin-right-22{margin-right:22px;} +.layout-sm-margin-right-23{margin-right:23px;} +.layout-sm-margin-right-24{margin-right:24px;} +.layout-sm-margin-right-25{margin-right:25px;} +.layout-sm-margin-right-26{margin-right:26px;} +.layout-sm-margin-right-27{margin-right:27px;} +.layout-sm-margin-right-28{margin-right:28px;} +.layout-sm-margin-right-29{margin-right:29px;} +.layout-sm-margin-right-30{margin-right:30px;} +.layout-sm-margin-right-31{margin-right:31px;} +.layout-sm-margin-right-32{margin-right:32px;} +.layout-sm-margin-right-33{margin-right:33px;} +.layout-sm-margin-right-34{margin-right:34px;} +.layout-sm-margin-right-35{margin-right:35px;} +.layout-sm-margin-right-36{margin-right:36px;} +.layout-sm-margin-right-37{margin-right:37px;} +.layout-sm-margin-right-38{margin-right:38px;} +.layout-sm-margin-right-39{margin-right:39px;} +.layout-sm-margin-right-40{margin-right:40px;} +.layout-sm-margin-right-41{margin-right:41px;} +.layout-sm-margin-right-42{margin-right:42px;} +.layout-sm-margin-right-43{margin-right:43px;} +.layout-sm-margin-right-44{margin-right:44px;} +.layout-sm-margin-right-45{margin-right:45px;} +.layout-sm-margin-right-46{margin-right:46px;} +.layout-sm-margin-right-47{margin-right:47px;} +.layout-sm-margin-right-48{margin-right:48px;} +.layout-sm-margin-right-49{margin-right:49px;} +.layout-sm-margin-right-50{margin-right:50px;} +.layout-sm-margin-right-51{margin-right:51px;} +.layout-sm-margin-right-52{margin-right:52px;} +.layout-sm-margin-right-53{margin-right:53px;} +.layout-sm-margin-right-54{margin-right:54px;} +.layout-sm-margin-right-55{margin-right:55px;} +.layout-sm-margin-right-56{margin-right:56px;} +.layout-sm-margin-right-57{margin-right:57px;} +.layout-sm-margin-right-58{margin-right:58px;} +.layout-sm-margin-right-59{margin-right:59px;} +.layout-sm-margin-right-60{margin-right:60px;} + +.layout-sm-margin-bottom-1{margin-bottom:1px;} +.layout-sm-margin-bottom-2{margin-bottom:2px;} +.layout-sm-margin-bottom-3{margin-bottom:3px;} +.layout-sm-margin-bottom-4{margin-bottom:4px;} +.layout-sm-margin-bottom-5{margin-bottom:5px;} +.layout-sm-margin-bottom-6{margin-bottom:6px;} +.layout-sm-margin-bottom-7{margin-bottom:7px;} +.layout-sm-margin-bottom-8{margin-bottom:8px;} +.layout-sm-margin-bottom-9{margin-bottom:9px;} +.layout-sm-margin-bottom-10{margin-bottom:10px;} +.layout-sm-margin-bottom-11{margin-bottom:11px;} +.layout-sm-margin-bottom-12{margin-bottom:12px;} +.layout-sm-margin-bottom-13{margin-bottom:13px;} +.layout-sm-margin-bottom-14{margin-bottom:14px;} +.layout-sm-margin-bottom-15{margin-bottom:15px;} +.layout-sm-margin-bottom-16{margin-bottom:16px;} +.layout-sm-margin-bottom-17{margin-bottom:17px;} +.layout-sm-margin-bottom-18{margin-bottom:18px;} +.layout-sm-margin-bottom-19{margin-bottom:19px;} +.layout-sm-margin-bottom-20{margin-bottom:20px;} +.layout-sm-margin-bottom-21{margin-bottom:21px;} +.layout-sm-margin-bottom-22{margin-bottom:22px;} +.layout-sm-margin-bottom-23{margin-bottom:23px;} +.layout-sm-margin-bottom-24{margin-bottom:24px;} +.layout-sm-margin-bottom-25{margin-bottom:25px;} +.layout-sm-margin-bottom-26{margin-bottom:26px;} +.layout-sm-margin-bottom-27{margin-bottom:27px;} +.layout-sm-margin-bottom-28{margin-bottom:28px;} +.layout-sm-margin-bottom-29{margin-bottom:29px;} +.layout-sm-margin-bottom-30{margin-bottom:30px;} +.layout-sm-margin-bottom-31{margin-bottom:31px;} +.layout-sm-margin-bottom-32{margin-bottom:32px;} +.layout-sm-margin-bottom-33{margin-bottom:33px;} +.layout-sm-margin-bottom-34{margin-bottom:34px;} +.layout-sm-margin-bottom-35{margin-bottom:35px;} +.layout-sm-margin-bottom-36{margin-bottom:36px;} +.layout-sm-margin-bottom-37{margin-bottom:37px;} +.layout-sm-margin-bottom-38{margin-bottom:38px;} +.layout-sm-margin-bottom-39{margin-bottom:39px;} +.layout-sm-margin-bottom-40{margin-bottom:40px;} +.layout-sm-margin-bottom-41{margin-bottom:41px;} +.layout-sm-margin-bottom-42{margin-bottom:42px;} +.layout-sm-margin-bottom-43{margin-bottom:43px;} +.layout-sm-margin-bottom-44{margin-bottom:44px;} +.layout-sm-margin-bottom-45{margin-bottom:45px;} +.layout-sm-margin-bottom-46{margin-bottom:46px;} +.layout-sm-margin-bottom-47{margin-bottom:47px;} +.layout-sm-margin-bottom-48{margin-bottom:48px;} +.layout-sm-margin-bottom-49{margin-bottom:49px;} +.layout-sm-margin-bottom-50{margin-bottom:50px;} +.layout-sm-margin-bottom-51{margin-bottom:51px;} +.layout-sm-margin-bottom-52{margin-bottom:52px;} +.layout-sm-margin-bottom-53{margin-bottom:53px;} +.layout-sm-margin-bottom-54{margin-bottom:54px;} +.layout-sm-margin-bottom-55{margin-bottom:55px;} +.layout-sm-margin-bottom-56{margin-bottom:56px;} +.layout-sm-margin-bottom-57{margin-bottom:57px;} +.layout-sm-margin-bottom-58{margin-bottom:58px;} +.layout-sm-margin-bottom-59{margin-bottom:59px;} +.layout-sm-margin-bottom-60{margin-bottom:60px;} + +.layout-sm-margin-left-1{margin-left:1px;} +.layout-sm-margin-left-2{margin-left:2px;} +.layout-sm-margin-left-3{margin-left:3px;} +.layout-sm-margin-left-4{margin-left:4px;} +.layout-sm-margin-left-5{margin-left:5px;} +.layout-sm-margin-left-6{margin-left:6px;} +.layout-sm-margin-left-7{margin-left:7px;} +.layout-sm-margin-left-8{margin-left:8px;} +.layout-sm-margin-left-9{margin-left:9px;} +.layout-sm-margin-left-10{margin-left:10px;} +.layout-sm-margin-left-11{margin-left:11px;} +.layout-sm-margin-left-12{margin-left:12px;} +.layout-sm-margin-left-13{margin-left:13px;} +.layout-sm-margin-left-14{margin-left:14px;} +.layout-sm-margin-left-15{margin-left:15px;} +.layout-sm-margin-left-16{margin-left:16px;} +.layout-sm-margin-left-17{margin-left:17px;} +.layout-sm-margin-left-18{margin-left:18px;} +.layout-sm-margin-left-19{margin-left:19px;} +.layout-sm-margin-left-20{margin-left:20px;} +.layout-sm-margin-left-21{margin-left:21px;} +.layout-sm-margin-left-22{margin-left:22px;} +.layout-sm-margin-left-23{margin-left:23px;} +.layout-sm-margin-left-24{margin-left:24px;} +.layout-sm-margin-left-25{margin-left:25px;} +.layout-sm-margin-left-26{margin-left:26px;} +.layout-sm-margin-left-27{margin-left:27px;} +.layout-sm-margin-left-28{margin-left:28px;} +.layout-sm-margin-left-29{margin-left:29px;} +.layout-sm-margin-left-30{margin-left:30px;} +.layout-sm-margin-left-31{margin-left:31px;} +.layout-sm-margin-left-32{margin-left:32px;} +.layout-sm-margin-left-33{margin-left:33px;} +.layout-sm-margin-left-34{margin-left:34px;} +.layout-sm-margin-left-35{margin-left:35px;} +.layout-sm-margin-left-36{margin-left:36px;} +.layout-sm-margin-left-37{margin-left:37px;} +.layout-sm-margin-left-38{margin-left:38px;} +.layout-sm-margin-left-39{margin-left:39px;} +.layout-sm-margin-left-40{margin-left:40px;} +.layout-sm-margin-left-41{margin-left:41px;} +.layout-sm-margin-left-42{margin-left:42px;} +.layout-sm-margin-left-43{margin-left:43px;} +.layout-sm-margin-left-44{margin-left:44px;} +.layout-sm-margin-left-45{margin-left:45px;} +.layout-sm-margin-left-46{margin-left:46px;} +.layout-sm-margin-left-47{margin-left:47px;} +.layout-sm-margin-left-48{margin-left:48px;} +.layout-sm-margin-left-49{margin-left:49px;} +.layout-sm-margin-left-50{margin-left:50px;} +.layout-sm-margin-left-51{margin-left:51px;} +.layout-sm-margin-left-52{margin-left:52px;} +.layout-sm-margin-left-53{margin-left:53px;} +.layout-sm-margin-left-54{margin-left:54px;} +.layout-sm-margin-left-55{margin-left:55px;} +.layout-sm-margin-left-56{margin-left:56px;} +.layout-sm-margin-left-57{margin-left:57px;} +.layout-sm-margin-left-58{margin-left:58px;} +.layout-sm-margin-left-59{margin-left:59px;} +.layout-sm-margin-left-60{margin-left:60px;} + +/** + * 布局内边距 + */ +.layout-sm-padding-top-1{padding-top:1px;} +.layout-sm-padding-top-2{padding-top:2px;} +.layout-sm-padding-top-3{padding-top:3px;} +.layout-sm-padding-top-4{padding-top:4px;} +.layout-sm-padding-top-5{padding-top:5px;} +.layout-sm-padding-top-6{padding-top:6px;} +.layout-sm-padding-top-7{padding-top:7px;} +.layout-sm-padding-top-8{padding-top:8px;} +.layout-sm-padding-top-9{padding-top:9px;} +.layout-sm-padding-top-10{padding-top:10px;} +.layout-sm-padding-top-11{padding-top:11px;} +.layout-sm-padding-top-12{padding-top:12px;} +.layout-sm-padding-top-13{padding-top:13px;} +.layout-sm-padding-top-14{padding-top:14px;} +.layout-sm-padding-top-15{padding-top:15px;} +.layout-sm-padding-top-16{padding-top:16px;} +.layout-sm-padding-top-17{padding-top:17px;} +.layout-sm-padding-top-18{padding-top:18px;} +.layout-sm-padding-top-19{padding-top:19px;} +.layout-sm-padding-top-20{padding-top:20px;} +.layout-sm-padding-top-21{padding-top:21px;} +.layout-sm-padding-top-22{padding-top:22px;} +.layout-sm-padding-top-23{padding-top:23px;} +.layout-sm-padding-top-24{padding-top:24px;} +.layout-sm-padding-top-25{padding-top:25px;} +.layout-sm-padding-top-26{padding-top:26px;} +.layout-sm-padding-top-27{padding-top:27px;} +.layout-sm-padding-top-28{padding-top:28px;} +.layout-sm-padding-top-29{padding-top:29px;} +.layout-sm-padding-top-30{padding-top:30px;} +.layout-sm-padding-top-31{padding-top:31px;} +.layout-sm-padding-top-32{padding-top:32px;} +.layout-sm-padding-top-33{padding-top:33px;} +.layout-sm-padding-top-34{padding-top:34px;} +.layout-sm-padding-top-35{padding-top:35px;} +.layout-sm-padding-top-36{padding-top:36px;} +.layout-sm-padding-top-37{padding-top:37px;} +.layout-sm-padding-top-38{padding-top:38px;} +.layout-sm-padding-top-39{padding-top:39px;} +.layout-sm-padding-top-40{padding-top:40px;} +.layout-sm-padding-top-41{padding-top:41px;} +.layout-sm-padding-top-42{padding-top:42px;} +.layout-sm-padding-top-43{padding-top:43px;} +.layout-sm-padding-top-44{padding-top:44px;} +.layout-sm-padding-top-45{padding-top:45px;} +.layout-sm-padding-top-46{padding-top:46px;} +.layout-sm-padding-top-47{padding-top:47px;} +.layout-sm-padding-top-48{padding-top:48px;} +.layout-sm-padding-top-49{padding-top:49px;} +.layout-sm-padding-top-50{padding-top:50px;} +.layout-sm-padding-top-51{padding-top:51px;} +.layout-sm-padding-top-52{padding-top:52px;} +.layout-sm-padding-top-53{padding-top:53px;} +.layout-sm-padding-top-54{padding-top:54px;} +.layout-sm-padding-top-55{padding-top:55px;} +.layout-sm-padding-top-56{padding-top:56px;} +.layout-sm-padding-top-57{padding-top:57px;} +.layout-sm-padding-top-58{padding-top:58px;} +.layout-sm-padding-top-59{padding-top:59px;} +.layout-sm-padding-top-60{padding-top:60px;} + +.layout-sm-padding-right-1{padding-right:1px;} +.layout-sm-padding-right-2{padding-right:2px;} +.layout-sm-padding-right-3{padding-right:3px;} +.layout-sm-padding-right-4{padding-right:4px;} +.layout-sm-padding-right-5{padding-right:5px;} +.layout-sm-padding-right-6{padding-right:6px;} +.layout-sm-padding-right-7{padding-right:7px;} +.layout-sm-padding-right-8{padding-right:8px;} +.layout-sm-padding-right-9{padding-right:9px;} +.layout-sm-padding-right-10{padding-right:10px;} +.layout-sm-padding-right-11{padding-right:11px;} +.layout-sm-padding-right-12{padding-right:12px;} +.layout-sm-padding-right-13{padding-right:13px;} +.layout-sm-padding-right-14{padding-right:14px;} +.layout-sm-padding-right-15{padding-right:15px;} +.layout-sm-padding-right-16{padding-right:16px;} +.layout-sm-padding-right-17{padding-right:17px;} +.layout-sm-padding-right-18{padding-right:18px;} +.layout-sm-padding-right-19{padding-right:19px;} +.layout-sm-padding-right-20{padding-right:20px;} +.layout-sm-padding-right-21{padding-right:21px;} +.layout-sm-padding-right-22{padding-right:22px;} +.layout-sm-padding-right-23{padding-right:23px;} +.layout-sm-padding-right-24{padding-right:24px;} +.layout-sm-padding-right-25{padding-right:25px;} +.layout-sm-padding-right-26{padding-right:26px;} +.layout-sm-padding-right-27{padding-right:27px;} +.layout-sm-padding-right-28{padding-right:28px;} +.layout-sm-padding-right-29{padding-right:29px;} +.layout-sm-padding-right-30{padding-right:30px;} +.layout-sm-padding-right-31{padding-right:31px;} +.layout-sm-padding-right-32{padding-right:32px;} +.layout-sm-padding-right-33{padding-right:33px;} +.layout-sm-padding-right-34{padding-right:34px;} +.layout-sm-padding-right-35{padding-right:35px;} +.layout-sm-padding-right-36{padding-right:36px;} +.layout-sm-padding-right-37{padding-right:37px;} +.layout-sm-padding-right-38{padding-right:38px;} +.layout-sm-padding-right-39{padding-right:39px;} +.layout-sm-padding-right-40{padding-right:40px;} +.layout-sm-padding-right-41{padding-right:41px;} +.layout-sm-padding-right-42{padding-right:42px;} +.layout-sm-padding-right-43{padding-right:43px;} +.layout-sm-padding-right-44{padding-right:44px;} +.layout-sm-padding-right-45{padding-right:45px;} +.layout-sm-padding-right-46{padding-right:46px;} +.layout-sm-padding-right-47{padding-right:47px;} +.layout-sm-padding-right-48{padding-right:48px;} +.layout-sm-padding-right-49{padding-right:49px;} +.layout-sm-padding-right-50{padding-right:50px;} +.layout-sm-padding-right-51{padding-right:51px;} +.layout-sm-padding-right-52{padding-right:52px;} +.layout-sm-padding-right-53{padding-right:53px;} +.layout-sm-padding-right-54{padding-right:54px;} +.layout-sm-padding-right-55{padding-right:55px;} +.layout-sm-padding-right-56{padding-right:56px;} +.layout-sm-padding-right-57{padding-right:57px;} +.layout-sm-padding-right-58{padding-right:58px;} +.layout-sm-padding-right-59{padding-right:59px;} +.layout-sm-padding-right-60{padding-right:60px;} + +.layout-sm-padding-bottom-1{padding-bottom:1px;} +.layout-sm-padding-bottom-2{padding-bottom:2px;} +.layout-sm-padding-bottom-3{padding-bottom:3px;} +.layout-sm-padding-bottom-4{padding-bottom:4px;} +.layout-sm-padding-bottom-5{padding-bottom:5px;} +.layout-sm-padding-bottom-6{padding-bottom:6px;} +.layout-sm-padding-bottom-7{padding-bottom:7px;} +.layout-sm-padding-bottom-8{padding-bottom:8px;} +.layout-sm-padding-bottom-9{padding-bottom:9px;} +.layout-sm-padding-bottom-10{padding-bottom:10px;} +.layout-sm-padding-bottom-11{padding-bottom:11px;} +.layout-sm-padding-bottom-12{padding-bottom:12px;} +.layout-sm-padding-bottom-13{padding-bottom:13px;} +.layout-sm-padding-bottom-14{padding-bottom:14px;} +.layout-sm-padding-bottom-15{padding-bottom:15px;} +.layout-sm-padding-bottom-16{padding-bottom:16px;} +.layout-sm-padding-bottom-17{padding-bottom:17px;} +.layout-sm-padding-bottom-18{padding-bottom:18px;} +.layout-sm-padding-bottom-19{padding-bottom:19px;} +.layout-sm-padding-bottom-20{padding-bottom:20px;} +.layout-sm-padding-bottom-21{padding-bottom:21px;} +.layout-sm-padding-bottom-22{padding-bottom:22px;} +.layout-sm-padding-bottom-23{padding-bottom:23px;} +.layout-sm-padding-bottom-24{padding-bottom:24px;} +.layout-sm-padding-bottom-25{padding-bottom:25px;} +.layout-sm-padding-bottom-26{padding-bottom:26px;} +.layout-sm-padding-bottom-27{padding-bottom:27px;} +.layout-sm-padding-bottom-28{padding-bottom:28px;} +.layout-sm-padding-bottom-29{padding-bottom:29px;} +.layout-sm-padding-bottom-30{padding-bottom:30px;} +.layout-sm-padding-bottom-31{padding-bottom:31px;} +.layout-sm-padding-bottom-32{padding-bottom:32px;} +.layout-sm-padding-bottom-33{padding-bottom:33px;} +.layout-sm-padding-bottom-34{padding-bottom:34px;} +.layout-sm-padding-bottom-35{padding-bottom:35px;} +.layout-sm-padding-bottom-36{padding-bottom:36px;} +.layout-sm-padding-bottom-37{padding-bottom:37px;} +.layout-sm-padding-bottom-38{padding-bottom:38px;} +.layout-sm-padding-bottom-39{padding-bottom:39px;} +.layout-sm-padding-bottom-40{padding-bottom:40px;} +.layout-sm-padding-bottom-41{padding-bottom:41px;} +.layout-sm-padding-bottom-42{padding-bottom:42px;} +.layout-sm-padding-bottom-43{padding-bottom:43px;} +.layout-sm-padding-bottom-44{padding-bottom:44px;} +.layout-sm-padding-bottom-45{padding-bottom:45px;} +.layout-sm-padding-bottom-46{padding-bottom:46px;} +.layout-sm-padding-bottom-47{padding-bottom:47px;} +.layout-sm-padding-bottom-48{padding-bottom:48px;} +.layout-sm-padding-bottom-49{padding-bottom:49px;} +.layout-sm-padding-bottom-50{padding-bottom:50px;} +.layout-sm-padding-bottom-51{padding-bottom:51px;} +.layout-sm-padding-bottom-52{padding-bottom:52px;} +.layout-sm-padding-bottom-53{padding-bottom:53px;} +.layout-sm-padding-bottom-54{padding-bottom:54px;} +.layout-sm-padding-bottom-55{padding-bottom:55px;} +.layout-sm-padding-bottom-56{padding-bottom:56px;} +.layout-sm-padding-bottom-57{padding-bottom:57px;} +.layout-sm-padding-bottom-58{padding-bottom:58px;} +.layout-sm-padding-bottom-59{padding-bottom:59px;} +.layout-sm-padding-bottom-60{padding-bottom:60px;} + +.layout-sm-padding-left-1{padding-left:1px;} +.layout-sm-padding-left-2{padding-left:2px;} +.layout-sm-padding-left-3{padding-left:3px;} +.layout-sm-padding-left-4{padding-left:4px;} +.layout-sm-padding-left-5{padding-left:5px;} +.layout-sm-padding-left-6{padding-left:6px;} +.layout-sm-padding-left-7{padding-left:7px;} +.layout-sm-padding-left-8{padding-left:8px;} +.layout-sm-padding-left-9{padding-left:9px;} +.layout-sm-padding-left-10{padding-left:10px;} +.layout-sm-padding-left-11{padding-left:11px;} +.layout-sm-padding-left-12{padding-left:12px;} +.layout-sm-padding-left-13{padding-left:13px;} +.layout-sm-padding-left-14{padding-left:14px;} +.layout-sm-padding-left-15{padding-left:15px;} +.layout-sm-padding-left-16{padding-left:16px;} +.layout-sm-padding-left-17{padding-left:17px;} +.layout-sm-padding-left-18{padding-left:18px;} +.layout-sm-padding-left-19{padding-left:19px;} +.layout-sm-padding-left-20{padding-left:20px;} +.layout-sm-padding-left-21{padding-left:21px;} +.layout-sm-padding-left-22{padding-left:22px;} +.layout-sm-padding-left-23{padding-left:23px;} +.layout-sm-padding-left-24{padding-left:24px;} +.layout-sm-padding-left-25{padding-left:25px;} +.layout-sm-padding-left-26{padding-left:26px;} +.layout-sm-padding-left-27{padding-left:27px;} +.layout-sm-padding-left-28{padding-left:28px;} +.layout-sm-padding-left-29{padding-left:29px;} +.layout-sm-padding-left-30{padding-left:30px;} +.layout-sm-padding-left-31{padding-left:31px;} +.layout-sm-padding-left-32{padding-left:32px;} +.layout-sm-padding-left-33{padding-left:33px;} +.layout-sm-padding-left-34{padding-left:34px;} +.layout-sm-padding-left-35{padding-left:35px;} +.layout-sm-padding-left-36{padding-left:36px;} +.layout-sm-padding-left-37{padding-left:37px;} +.layout-sm-padding-left-38{padding-left:38px;} +.layout-sm-padding-left-39{padding-left:39px;} +.layout-sm-padding-left-40{padding-left:40px;} +.layout-sm-padding-left-41{padding-left:41px;} +.layout-sm-padding-left-42{padding-left:42px;} +.layout-sm-padding-left-43{padding-left:43px;} +.layout-sm-padding-left-44{padding-left:44px;} +.layout-sm-padding-left-45{padding-left:45px;} +.layout-sm-padding-left-46{padding-left:46px;} +.layout-sm-padding-left-47{padding-left:47px;} +.layout-sm-padding-left-48{padding-left:48px;} +.layout-sm-padding-left-49{padding-left:49px;} +.layout-sm-padding-left-50{padding-left:50px;} +.layout-sm-padding-left-51{padding-left:51px;} +.layout-sm-padding-left-52{padding-left:52px;} +.layout-sm-padding-left-53{padding-left:53px;} +.layout-sm-padding-left-54{padding-left:54px;} +.layout-sm-padding-left-55{padding-left:55px;} +.layout-sm-padding-left-56{padding-left:56px;} +.layout-sm-padding-left-57{padding-left:57px;} +.layout-sm-padding-left-58{padding-left:58px;} +.layout-sm-padding-left-59{padding-left:59px;} +.layout-sm-padding-left-60{padding-left:60px;} + + +/** + * 模块基础样式 + */ +.module-content, +.module-images-container, +.module-slider-container, +.module-video-container, +.module-title-container, +.module-goods-container, +.module-list-content, +.module-list-content .item .module-item, +.module-list-content .item .module-item .module-title, +.module-list-content .item .module-item .module-price {overflow: hidden;} + +/** + * 模块类型样式 - 标题 + */ +.module-title-container .module-title-content{position:relative} +.module-title-container .title-main{font-size:16px;font-weight:600;color:#666} +.module-title-container .title-vice{color:#999;font-size:12px;margin-left:10px} +.module-title-container .more-content{position:absolute;top:calc(50% - 8px);right:0;font-size:12px;} + +/** + * 模块内容基础样式 + */ +.layout-content image, +.layout-content video{display:block;max-width:100%;max-height:100%} + +/** + * 不展示滚动导航点 + */ +.layout-content .slides-rolling-not-dot{margin-bottom:0px} + +/** + * 媒体文件固定大小 + */ +.module-fixed-doc{display:block;overflow:hidden;} +.module-fixed-doc-ent-width{width:100% !important;} +.module-fixed-doc-ent-height{height:100% !important;} +.module-fixed-doc-ent-auto{margin:0 auto !important;} +.module-fixed-doc-ent-cover{object-fit:cover !important;} + +/** + * 滚动列表 + */ +.module-list-rolling{width:100%;white-space:nowrap;box-sizing:border-box} +.module-list-rolling .item{display:inline-block;position:relative} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/design/design.js b/sourcecode/qq/default/pages/design/design.js new file mode 100644 index 000000000..33d43598f --- /dev/null +++ b/sourcecode/qq/default/pages/design/design.js @@ -0,0 +1,84 @@ +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; + qq.request({ + url: app.get_request_url("index", "design"), + method: "POST", + data: {"id": this.data.params.id || 0}, + dataType: "json", + success: res => { + qq.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) + { + console.log(this.data.data.length) + qq.setNavigationBarTitle({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: () => { + qq.stopPullDownRefresh(); + self.setData({ + data_bottom_line_status: false, + data_list_loding_status: 2, + data_list_loding_msg: '服务器请求出错', + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data(); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + return { + title: this.data.data.name || this.data.data.seo_title || app.data.application_title, + desc: this.data.data.seo_desc || app.data.application_describe, + path: '/pages/design/design?id='+this.data.data.id+'&referrer=' + user_id + }; + }, +}); \ No newline at end of file diff --git a/sourcecode/qq/default/pages/design/design.json b/sourcecode/qq/default/pages/design/design.json new file mode 100644 index 000000000..f3ed38dea --- /dev/null +++ b/sourcecode/qq/default/pages/design/design.json @@ -0,0 +1,6 @@ +{ + "enablePullDownRefresh": true, + "usingComponents": { + "component-layout": "/components/layout/layout" + } +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/design/design.qml b/sourcecode/qq/default/pages/design/design.qml new file mode 100644 index 000000000..6b38188f2 --- /dev/null +++ b/sourcecode/qq/default/pages/design/design.qml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/qq/default/pages/design/design.qss b/sourcecode/qq/default/pages/design/design.qss new file mode 100644 index 000000000..aeef85439 --- /dev/null +++ b/sourcecode/qq/default/pages/design/design.qss @@ -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: 400rpx; + position: absolute; + left: 80rpx; + top: 210rpx; + z-index: 2; + font-size: 24rpx; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.header-service image { + width: 260rpx; + height: 260rpx; +} +.header-service .item { + padding: 20rpx; +} + +/** + * 滚动 + */ +.nav-roll { + width: 100%; + white-space: nowrap; + box-sizing: border-box; +} +.nav-roll .item { + display: inline-block; +} + +/** + * 导航 + */ +.nav { + height: 70rpx; + border-bottom: 1px solid #d2364c; +} +.nav .nav-scroll { + float: right; + width: calc(100% - 230rpx); +} +.nav .item { + padding: 0 20rpx; + font-weight: bold; +} +.nav-shop-category { + padding-right: 38rpx !important; + background-size: 14px 14px; +} + +/** + * 导航商品分类 + */ +.nav-category { + background: #d2364c; + width: 220rpx; + z-index: 1; + position: absolute; + margin-top: 50rpx; + border: 1px solid #d2364c; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.nav-category .category-scroll { + max-height: 600rpx; +} +.nav-category .item { + padding: 15rpx 20rpx; + display: block; + font-weight: inherit; + color: #f1f1f1; +} +.nav-category .item:not(:last-child) { + border-bottom: 1px solid #c72e44; +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/index/index.js b/sourcecode/qq/default/pages/index/index.js index 1f4fa6cea..0acf9fd8b 100755 --- a/sourcecode/qq/default/pages/index/index.js +++ b/sourcecode/qq/default/pages/index/index.js @@ -70,6 +70,13 @@ Page({ dataType: "json", success: res => { qq.stopPullDownRefresh(); + + // 获取最新缓存 + if(this.data.load_status == 0) { + self.init_config(true); + } + + // 设置首次加载状态 self.setData({load_status: 1}); if (res.data.code == 0) { diff --git a/sourcecode/qq/default/pages/index/index.json b/sourcecode/qq/default/pages/index/index.json index 56fe01f9c..58b626d20 100755 --- a/sourcecode/qq/default/pages/index/index.json +++ b/sourcecode/qq/default/pages/index/index.json @@ -7,6 +7,7 @@ "usingComponents": { "component-quick-nav": "/components/quick-nav/quick-nav", "component-icon-nav": "/components/icon-nav/icon-nav", - "component-banner": "/components/slider/slider" + "component-banner": "/components/slider/slider", + "component-layout": "/components/layout/layout" } } \ No newline at end of file diff --git a/sourcecode/qq/default/pages/index/index.qml b/sourcecode/qq/default/pages/index/index.qml index 189fe6546..0e2f429c5 100755 --- a/sourcecode/qq/default/pages/index/index.qml +++ b/sourcecode/qq/default/pages/index/index.qml @@ -12,11 +12,14 @@ {{common_shop_notice}} - - + + + + - - + + + @@ -25,39 +28,47 @@ - - - - - {{floor.name}} - - - - - - - {{icv.name}} - - - - {{floor.describe}} - - - + + + + + + + + + + + + {{floor.name}} - - - - - - {{goods.title}} - {{currency_symbol}}{{goods.min_price}} - + + + + + + {{icv.name}} + + + + {{floor.describe}} + + + + + + + + {{goods.title}} + {{currency_symbol}}{{goods.min_price}} + + + + - + diff --git a/sourcecode/qq/default/pages/plugins/brand/index/index.js b/sourcecode/qq/default/pages/plugins/brand/index/index.js index e28273c7c..54ef09fbc 100644 --- a/sourcecode/qq/default/pages/plugins/brand/index/index.js +++ b/sourcecode/qq/default/pages/plugins/brand/index/index.js @@ -19,9 +19,6 @@ Page({ onShow() { this.get_data(); - - // 显示分享菜单 - app.show_share_menu(); }, // 获取数据 @@ -116,14 +113,4 @@ Page({ path: '/pages/plugins/brand/index/index?referrer=' + user_id }; }, - - // 分享朋友圈 - onShareTimeline() { - var user_id = app.get_user_cache_info('id', 0) || 0; - return { - title: this.data.data_base.seo_title || '品牌 - '+app.data.application_title, - query: 'referrer=' + user_id, - imageUrl: this.data.data_base.right_images || '' - }; - }, }); \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/design/design.js b/sourcecode/qq/default/pages/plugins/shop/design/design.js new file mode 100644 index 000000000..801104333 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/design/design.js @@ -0,0 +1,201 @@ +const app = getApp(); +Page({ + data: { + data_bottom_line_status: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + params: null, + user: null, + data_base: null, + shop: null, + shop_favor_user: [], + shop_navigation: [], + shop_goods_category: [], + data: null, + layout_data: [], + + // 基础配置 + search_keywords_value: '', + header_service_status: false, + nav_category_status: false, + shop_category_tab_value: 0, + shop_favor_info: { + "text": "收藏", + "status": 0, + "count": 0 + }, + }, + + onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); + this.setData({ + params: params, + user: app.get_user_cache_info(), + }); + }, + + onShow() { + this.get_data(); + }, + + // 获取数据 + get_data() { + var self = this; + qq.request({ + url: app.get_request_url("index", "design", "shop"), + method: "POST", + data: {"id": this.data.params.id || 0}, + dataType: "json", + success: res => { + qq.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) + { + qq.setNavigationBarTitle({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: () => { + qq.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)) { + qq.navigateTo({ + url: "/pages/login/login?event_callback=shop_favor_event" + }); + return false; + } else { + qq.showLoading({title: '处理中...'}); + qq.request({ + url: app.get_request_url("favor", "shopfavor", "shop"), + method: 'POST', + data: {"id": this.data.shop.id}, + dataType: 'json', + success: (res) => { + qq.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: () => { + qq.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; + qq.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; + qq.navigateTo({ url: '/pages/plugins/shop/search/search?shop_id='+this.data.shop.id+'&category_id='+value }); + }, + + // 导航事件 + nav_event(e) { + app.url_event(e); + }, + + // 剪切板 + text_copy_event(e) { + app.text_copy_event(e); + }, + + // 图片预览 + image_show_event(e) { + app.image_show_event(e); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + return { + title: this.data.data.name || this.data.data.seo_title || app.data.application_title, + desc: this.data.data.seo_desc || app.data.application_describe, + path: '/pages/plugins/shop/design/design?id='+this.data.data.id+'&referrer=' + user_id + }; + }, +}); \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/design/design.json b/sourcecode/qq/default/pages/plugins/shop/design/design.json new file mode 100644 index 000000000..f723ed479 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/design/design.json @@ -0,0 +1,10 @@ +{ + "enablePullDownRefresh": true, + "navigationBarBackgroundColor": "#d2364c", + "backgroundColorTop": "#d2364c", + "backgroundColorBottom": "#f5f5f5", + "backgroundTextStyle": "light", + "usingComponents": { + "component-layout": "/components/layout/layout" + } +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/design/design.qml b/sourcecode/qq/default/pages/plugins/shop/design/design.qml new file mode 100644 index 000000000..8c7cb6c64 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/design/design.qml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/design/design.qss b/sourcecode/qq/default/pages/plugins/shop/design/design.qss new file mode 100644 index 000000000..a75e37c76 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/design/design.qss @@ -0,0 +1,158 @@ +/** + * 搜索 + */ +.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; + padding: 0; +} +.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: 400rpx; + position: absolute; + left: 80rpx; + top: 210rpx; + z-index: 2; + font-size: 24rpx; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.header-service image { + width: 260rpx; + height: 260rpx; +} +.header-service .item { + padding: 20rpx; +} + +/** + * 滚动 + */ +.nav-roll { + width: 100%; + white-space: nowrap; + box-sizing: border-box; +} +.nav-roll .item { + display: inline-block; +} + +/** + * 导航 + */ +.nav { + height: 70rpx; + border-bottom: 1px solid #d2364c; +} +.nav .nav-scroll { + float: right; + width: calc(100% - 230rpx); +} +.nav .item { + padding: 0 20rpx; + font-weight: bold; +} +.nav-shop-category { + padding-right: 38rpx !important; + background-size: 14px 14px; +} + +/** + * 导航商品分类 + */ +.nav-category { + background: #d2364c; + width: 220rpx; + z-index: 1; + position: absolute; + margin-top: 50rpx; + border: 1px solid #d2364c; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.nav-category .category-scroll { + max-height: 600rpx; +} +.nav-category .item { + padding: 15rpx 20rpx; + display: block; + font-weight: inherit; + color: #f1f1f1; +} +.nav-category .item:not(:last-child) { + border-bottom: 1px solid #c72e44; +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/detail/detail.js b/sourcecode/qq/default/pages/plugins/shop/detail/detail.js new file mode 100644 index 000000000..de4aa61b9 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/detail/detail.js @@ -0,0 +1,247 @@ +const app = getApp(); +Page({ + data: { + data_bottom_line_status: false, + data_list_loding_status: 1, + data_list_loding_msg: '', + params: null, + user: null, + data_base: null, + shop: null, + shop_favor_user: [], + shop_navigation: [], + shop_goods_category: [], + data: null, + goods_list: [], + + // 基础配置 + currency_symbol: app.data.currency_symbol, + search_keywords_value: '', + header_service_status: false, + nav_category_status: false, + shop_category_tab_value: 0, + shop_favor_info: { + "text": "收藏", + "status": 0, + "count": 0 + }, + }, + + onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); + this.setData({ + params: params, + user: app.get_user_cache_info(), + }); + }, + + onShow() { + this.get_data(); + + // 初始化配置 + this.init_config(); + }, + + // 初始化配置 + init_config(status) { + if((status || false) == true) { + this.setData({ + currency_symbol: app.get_config('currency_symbol'), + }); + } else { + app.is_config(this, 'init_config'); + } + }, + + // 获取数据 + get_data() { + var self = this; + qq.request({ + url: app.get_request_url("detail", "index", "shop"), + method: "POST", + data: {"id": this.data.params.id || 0}, + dataType: "json", + success: res => { + qq.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) + { + qq.setNavigationBarTitle({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: () => { + qq.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)) { + qq.navigateTo({ + url: "/pages/login/login?event_callback=shop_favor_event" + }); + return false; + } else { + qq.showLoading({title: '处理中...'}); + qq.request({ + url: app.get_request_url("favor", "shopfavor", "shop"), + method: 'POST', + data: {"id": this.data.shop.id}, + dataType: 'json', + success: (res) => { + qq.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: () => { + qq.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; + qq.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; + qq.navigateTo({ url: '/pages/plugins/shop/search/search?shop_id='+this.data.shop.id+'&category_id='+value }); + }, + + // 导航事件 + nav_event(e) { + app.url_event(e); + }, + + // 剪切板 + text_copy_event(e) { + app.text_copy_event(e); + }, + + // 图片预览 + image_show_event(e) { + app.image_show_event(e); + }, + + // 分类切换事件 + shop_category_tab_event(e) { + this.setData({shop_category_tab_value: e.currentTarget.dataset.value || 0}); + this.shop_category_tab_handle(); + }, + + // 分类切换处理 + shop_category_tab_handle() { + var value = this.data.shop_category_tab_value || 0; + var temp = this.data.data; + var goods = []; + if(temp.goods.length > 0) { + for(var i in temp.goods) { + if(temp.goods[i]['shop_category_id'] == value || value == 0) { + goods.push(temp.goods[i]); + } + } + } + + this.setData({ + goods_list: goods, + data_bottom_line_status: (goods.length > 0) + }); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + return { + title: this.data.shop.name || this.data.shop.seo_title || app.data.application_title, + desc: this.data.shop.describe || this.data.shop.seo_desc || app.data.application_describe, + path: '/pages/plugins/shop/detail/detail?id='+this.data.shop.id+'&referrer=' + user_id + }; + }, +}); \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/detail/detail.json b/sourcecode/qq/default/pages/plugins/shop/detail/detail.json new file mode 100644 index 000000000..f723ed479 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/detail/detail.json @@ -0,0 +1,10 @@ +{ + "enablePullDownRefresh": true, + "navigationBarBackgroundColor": "#d2364c", + "backgroundColorTop": "#d2364c", + "backgroundColorBottom": "#f5f5f5", + "backgroundTextStyle": "light", + "usingComponents": { + "component-layout": "/components/layout/layout" + } +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/detail/detail.qml b/sourcecode/qq/default/pages/plugins/shop/detail/detail.qml new file mode 100644 index 000000000..30b6d7853 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/detail/detail.qml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + 全部商品 + + + {{item.name}} + + + + + + + + + + + + {{item.title}} + + {{currency_symbol}}{{item.min_price}} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/detail/detail.qss b/sourcecode/qq/default/pages/plugins/shop/detail/detail.qss new file mode 100644 index 000000000..0bcc7197c --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/detail/detail.qss @@ -0,0 +1,202 @@ +/** + * 搜索 + */ +.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; + padding: 0; +} +.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: 400rpx; + position: absolute; + left: 80rpx; + top: 210rpx; + z-index: 2; + font-size: 24rpx; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.header-service image { + width: 260rpx; + height: 260rpx; +} +.header-service .item { + padding: 20rpx; +} + +/** + * 滚动 + */ +.nav-roll { + width: 100%; + white-space: nowrap; + box-sizing: border-box; +} +.nav-roll .item { + display: inline-block; +} + +/** + * 导航 + */ +.nav { + height: 70rpx; + border-bottom: 1px solid #d2364c; +} +.nav .nav-scroll { + float: right; + width: calc(100% - 230rpx); +} +.nav .item { + padding: 0 20rpx; + font-weight: bold; +} +.nav-shop-category { + padding-right: 38rpx !important; + background-size: 14px 14px; +} + +/** + * 导航商品分类 + */ +.nav-category { + background: #d2364c; + width: 220rpx; + z-index: 1; + position: absolute; + margin-top: 50rpx; + border: 1px solid #d2364c; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); +} +.nav-category .category-scroll { + max-height: 600rpx; +} +.nav-category .item { + padding: 15rpx 20rpx; + display: block; + font-weight: inherit; + color: #f1f1f1; +} +.nav-category .item:not(:last-child) { + border-bottom: 1px solid #c72e44; +} + +/** + * 商品分类切换 + */ +.shop-category-list { + padding: 20rpx 10rpx; +} +.shop-category-list .item { + border-radius: 6rpx; + padding: 8rpx 20rpx; + font-size: 24rpx; +} +.shop-category-list .active { + background: #d2364c; + color: #fff; +} + +/** + * 商品列表 + */ +.data-list .items { + width: calc(50% - 5rpx); + margin-bottom: 10rpx; + padding-bottom: 20rpx; +} +.data-list .items:nth-child(2n) { + float: right; +} +.data-list .items:nth-child(2n+1) { + float: left; +} +.data-list .items image { + width: 100%; + height: 200px !important; +} +.data-list .items .base { + text-align: left; + font-size: 32rpx; + padding: 0 15rpx; +} +.data-list .items .base, +.data-list .items .base .price { + margin-top: 15rpx; +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.js b/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.js new file mode 100755 index 000000000..9f07b28b6 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.js @@ -0,0 +1,184 @@ +const app = getApp(); +Page({ + data: { + data_list: [], + data_page_total: 0, + data_page: 1, + data_list_loding_status: 1, + data_bottom_line_status: false, + }, + + onShow() { + // 数据加载 + this.init(); + }, + + // 获取数据 + init() { + var user = app.get_user_info(this, "init"); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + qq.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 + qq.showLoading({title: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + // 获取数据 + qq.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 => { + qq.hideLoading(); + qq.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: () => { + qq.hideLoading(); + qq.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) { + qq.showModal({ + title: "温馨提示", + content: "取消后不可恢复,确定继续吗?", + confirmText: "确认", + cancelText: "不了", + success: result => { + if (result.confirm) { + // 参数 + var id = e.currentTarget.dataset.value; + var index = e.currentTarget.dataset.index; + + // 加载loding + qq.showLoading({title: "处理中..." }); + + qq.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 => { + qq.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: () => { + qq.hideLoading(); + app.showToast("服务器请求出错"); + } + }); + } + } + }); + }, +}); diff --git a/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.json b/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.json new file mode 100755 index 000000000..98b7f1192 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.json @@ -0,0 +1,6 @@ +{ + "enablePullDownRefresh": true, + "navigationBarTitleText": "店铺收藏", + "usingComponents": { + } +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qml b/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qml new file mode 100755 index 000000000..caf0ec696 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qml @@ -0,0 +1,20 @@ + + + + + + + {{item.shop_info.name}} + {{item.shop_info.describe}} + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qss b/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qss new file mode 100755 index 000000000..62987d519 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qss @@ -0,0 +1,29 @@ +.item { + padding: 20rpx 10rpx; + position: relative; +} +.logo { + width: 140rpx; + height: 140rpx; + margin-right: 20rpx; +} +.title { + margin-bottom: 15rpx; + font-size: 32rpx; + font-weight: bold; +} +.describe { + font-size: 28rpx; + line-height: 42rpx; + min-height: 84rpx; + width: calc(100% - 325rpx); +} + +.submit-cancel { + position: absolute; + right: 10rpx; + bottom: 20rpx; + border: 1px solid #f7c3b3; + color: #f7c3b3 !important; + padding: 0 35rpx; +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/index/index.js b/sourcecode/qq/default/pages/plugins/shop/index/index.js new file mode 100755 index 000000000..283ee9d11 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/index/index.js @@ -0,0 +1,193 @@ +const app = getApp(); +Page({ + data: { + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, + data_list: [], + data_total: 0, + data_page_total: 0, + data_page: 1, + params: null, + data_base: null, + shop_category: [], + nav_active_value: 0, + }, + + onLoad(params) { + // 启动参数处理 + params = app.launch_params_handle(params); + this.setData({params: params}); + + // 数据加载 + this.get_data(); + }, + + // 初始化 + get_data() { + qq.showLoading({title: "加载中..." }); + var data = { + "category_id": this.data.nav_tab_value || 0 + }; + qq.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 => { + qq.hideLoading(); + qq.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) + { + qq.setNavigationBarTitle({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: () => { + qq.hideLoading(); + qq.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 + qq.showLoading({title: "加载中..." }); + + // 参数 + var data = { + "category_id": this.data.nav_active_value || 0 + }; + + // 获取数据 + qq.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 => { + qq.hideLoading(); + qq.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: () => { + qq.hideLoading(); + qq.stopPullDownRefresh(); + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data(); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 导航事件 + nav_event(e) { + this.setData({ + nav_active_value: e.currentTarget.dataset.value || 0, + data_page: 1 + }); + + // 获取列表数据 + this.get_data_list(1); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + return { + title: this.data.data_base.seo_title || this.data.data_base.application_name || app.data.application_title, + desc: this.data.data_base.seo_desc || app.data.application_describe, + path: '/pages/plugins/shop/index/index?referrer=' + user_id + }; + }, +}); diff --git a/sourcecode/qq/default/pages/plugins/shop/index/index.json b/sourcecode/qq/default/pages/plugins/shop/index/index.json new file mode 100755 index 000000000..19ce470a7 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/index/index.json @@ -0,0 +1,8 @@ +{ + "enablePullDownRefresh": true, + "navigationBarTitleText": "所有店铺", + "usingComponents": { + "component-quick-nav": "/components/quick-nav/quick-nav", + "component-popup": "/components/popup/popup" + } +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/index/index.qml b/sourcecode/qq/default/pages/plugins/shop/index/index.qml new file mode 100755 index 000000000..ec692c225 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/index/index.qml @@ -0,0 +1,42 @@ + + + + 全部 + + {{item.name}} + + + + + + + + + + + + {{item.name}} + {{item.describe}} + + 商品 {{item.goods_count}} + 销量 {{item.goods_sales_count}} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/index/index.qss b/sourcecode/qq/default/pages/plugins/shop/index/index.qss new file mode 100755 index 000000000..b3cdff726 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/index/index.qss @@ -0,0 +1,59 @@ +/** + * 分类导航 + */ + .nav-list { + width: 100%; + height: 80rpx; + white-space: nowrap; + box-sizing: border-box; + border-bottom: 1px solid #f0f0f0; +} +.nav-list .item { + line-height: 80rpx; + padding: 0 30rpx; + display: inline-block; + position: relative; +} +.nav-list .active { + color: #d2364c; +} + +/** + * 数据列表 + */ +.scroll-box { + height: calc(100vh - 80rpx); +} +.data-list .item { + width: calc(50% - 45rpx); + margin-bottom: 10rpx; + padding: 20rpx; +} +.data-list .item:nth-child(2n) { + float: right; +} +.data-list .item:nth-child(2n+1) { + float: left; +} +.data-list .item image { + width: 100%; + height: 160rpx !important; +} +.data-list .item .base { + padding-top: 20rpx; +} +.data-list .item .name { + font-size: 28rpx; + font-weight: bold; +} +.data-list .item .desc { + color: #999; + margin-top: 10rpx; + font-size: 28rpx; + line-height: 40rpx; + min-height: 80rpx; +} +.data-list .item .base-bottom .bitem { + width: 45%; + font-size: 24rpx; +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/public/header.qml b/sourcecode/qq/default/pages/plugins/shop/public/header.qml new file mode 100644 index 000000000..68486ce75 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/public/header.qml @@ -0,0 +1,72 @@ + \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/search/search.js b/sourcecode/qq/default/pages/plugins/shop/search/search.js new file mode 100755 index 000000000..6666e5710 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/search/search.js @@ -0,0 +1,343 @@ +const app = getApp(); +Page({ + data: { + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, + data_list: [], + data_total: 0, + data_page_total: 0, + data_page: 1, + params: null, + post_data: {}, + is_show_popup_form: false, + popup_form_loading_status: false, + search_nav_sort_list: [ + { name: "综合", field: "default", sort: "asc", "icon": null }, + { name: "销量", field: "sales_count", sort: "asc", "icon": "default" }, + { name: "热度", field: "access_count", sort: "asc", "icon": "default" }, + { name: "价格", field: "min_price", sort: "asc", "icon": "default" }, + { name: "最新", field: "id", sort: "asc", "icon": "default" } + ], + + // 基础配置 + currency_symbol: app.data.currency_symbol, + + // 搜素条件 + search_map_info: [], + category_list: [], + map_fields_list: { + "category_list": {"height":"82rpx", "default":"82rpx", "form_key":"category_ids"} + }, + }, + + onLoad(params) { + // 初始参数 + this.setData({ + params: params, + post_data: { + wd: params.keywords || '', + shop_id: params.shop_id || 0, + category_ids: ((params.category_id || 0) == 0) ? '' : JSON.stringify({"0":params.category_id}) + } + }); + }, + + onShow() { + // 数据加载 + this.init(); + + // 初始化配置 + this.init_config(); + }, + + // 初始化配置 + init_config(status) { + if((status || false) == true) { + this.setData({ + currency_symbol: app.get_config('currency_symbol'), + }); + } else { + app.is_config(this, 'init_config'); + } + }, + + // 获取数据 + init() { + // 获取数据 + this.get_data_list(); + }, + + // 搜索 + search_event() { + this.setData({ + data_list: [], + data_page: 1 + }); + this.get_data_list(1); + }, + + // 获取数据列表 + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data.data_bottom_line_status == true) { + return false; + } + } + + // 加载loding + qq.showLoading({title: "加载中..." }); + + // 参数 + var post_data = this.request_map_handle(); + + // 获取数据 + qq.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 => { + qq.hideLoading(); + qq.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: () => { + qq.hideLoading(); + qq.stopPullDownRefresh(); + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 搜索条件处理 + request_map_handle() { + var params = this.data.params; + var post_data = this.data.post_data; + post_data['page'] = this.data.data_page; + + // 店铺id + post_data['shop_id'] = params['shop_id'] || 0; + + // 搜索条件 + var data = this.data; + for(var i in data.map_fields_list) + { + if((data[i] != null) != null && data[i].length > 0) + { + var temp = {}; + var index = 0; + for(var k in data[i]) + { + if((data[i][k]['active'] || 0) == 1) + { + // 默认取值id + temp[index] = data[i][k]['id']; + index++; + } + } + post_data[data.map_fields_list[i]['form_key']] = (app.get_length(temp) > 0) ? JSON.stringify(temp) : ''; + } + } + + return post_data; + }, + + // 下拉刷新 + onPullDownRefresh() { + this.setData({ + data_page: 1 + }); + this.get_data_list(1); + }, + + // 滚动加载 + scroll_lower(e) { + this.get_data_list(); + }, + + // 搜索条件 + form_submit_event(e) { + this.setData({ post_data: e.detail.value, data_page: 1}); + this.popup_form_event_close(); + this.get_data_list(1); + }, + + // 筛选条件关闭 + popup_form_event_close(e) { + this.setData({ is_show_popup_form: false}); + }, + + // 筛选条件开启 + popup_form_event_show(e) { + this.setData({ is_show_popup_form: true }); + }, + + // 排序事件 + nav_sort_event(e) { + var index = e.currentTarget.dataset.index || 0; + var temp_post_data = this.data.post_data; + var temp_search_nav_sort = this.data.search_nav_sort_list; + var temp_sort = (temp_search_nav_sort[index]['sort'] == 'desc') ? 'asc' : 'desc'; + for (var i in temp_search_nav_sort) { + if(i != index) { + if (temp_search_nav_sort[i]['icon'] != null) { + temp_search_nav_sort[i]['icon'] = 'default'; + } + temp_search_nav_sort[i]['sort'] = 'desc'; + } + } + + temp_search_nav_sort[index]['sort'] = temp_sort; + if (temp_search_nav_sort[index]['icon'] != null) { + temp_search_nav_sort[index]['icon'] = temp_sort; + } + + temp_post_data['order_by_field'] = temp_search_nav_sort[index]['field']; + temp_post_data['order_by_type'] = temp_sort; + + this.setData({ + post_data: temp_post_data, + search_nav_sort_list: temp_search_nav_sort, + data_page: 1, + }); + this.get_data_list(1); + }, + + // 条件-更多数据展示事件 + more_event(e) { + var value = e.currentTarget.dataset.value || null; + var temp_more = this.data.map_fields_list; + if(value != null && (temp_more[value] || null) != null) + { + temp_more[value]['height'] = (temp_more[value]['height'] == 'auto') ? temp_more[value]['default'] : 'auto'; + this.setData({map_fields_list: temp_more}); + } + }, + + // 条件-选择事件 + map_item_event(e) { + var index = e.currentTarget.dataset.index; + var field = e.currentTarget.dataset.field; + var data = this.data; + if((data[field] || null) != null && (data[field][index] || null) != null) + { + data[field][index]['active'] = ((data[field][index]['active'] || 0) == 0) ? 1 : 0; + this.setData(data); + } + }, + + // 条件-清空 + map_remove_event(e) { + var data = this.data; + // 关键字 + data['post_data']['wd'] = ''; + + // 分类 + for(var i in data.map_fields_list) + { + if((data[i] != null) != null && data[i].length > 0) + { + for(var k in data[i]) + { + data[i][k]['active'] = 0; + } + } + } + + // 关闭条件弹层 + data['is_show_popup_form'] = false; + + // 分页恢复1页、重新获取数据 + data['data_page'] = 1; + this.setData(data); + this.get_data_list(1); + }, + + // 自定义分享 + onShareAppMessage() { + var user_id = app.get_user_cache_info('id', 0) || 0; + var shop_id = this.data.params['shop_id'] || 0; + var category_id = this.data.params['category_id'] || 0; + var keywords = this.data.params['keywords'] || ''; + return { + title: this.data.shop.name || app.data.application_title, + desc: this.data.shop.describe || app.data.application_describe, + path: '/pages/plugins/shop/search/search?shop_id='+shop_id+'&referrer=' + user_id+'&category_id='+category_id+'&keywords='+keywords + }; + }, +}); diff --git a/sourcecode/qq/default/pages/plugins/shop/search/search.json b/sourcecode/qq/default/pages/plugins/shop/search/search.json new file mode 100755 index 000000000..32e4acc96 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/search/search.json @@ -0,0 +1,8 @@ +{ + "enablePullDownRefresh": true, + "navigationBarTitleText": "店铺商品搜索", + "usingComponents": { + "component-quick-nav": "/components/quick-nav/quick-nav", + "component-popup": "/components/popup/popup" + } +} \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/search/search.qml b/sourcecode/qq/default/pages/plugins/shop/search/search.qml new file mode 100755 index 000000000..e8896c595 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/search/search.qml @@ -0,0 +1,72 @@ + + + + + + {{item.name}} + + + + + + + + + + + + + + + {{item.title}} + + {{currency_symbol}}{{item.min_price}} + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/qq/default/pages/plugins/shop/search/search.qss b/sourcecode/qq/default/pages/plugins/shop/search/search.qss new file mode 100755 index 000000000..787ae74c0 --- /dev/null +++ b/sourcecode/qq/default/pages/plugins/shop/search/search.qss @@ -0,0 +1,162 @@ +/** + * 排序导航 + */ +.nav-sort { + background: #eee; + } +.nav-sort-content .item { + height: 80rpx; + line-height: 80rpx; + width: 130rpx; +} +.nav-sort-content .item .icon { + width: 30rpx; + height: 30rpx; +} +.nav-sort-content .item text, .nav-sort-content .item image { + vertical-align:middle; +} +.screening-submit { + width: 50rpx; + height: 50rpx; + position: absolute; + top: 15rpx; + right: 20rpx; +} + +/** + * 商品列表 + */ +.scroll-box { + height: calc(100vh - 80rpx); + } +.data-list { + overflow: hidden; +} +.data-list .items { + width: calc(50% - 5rpx); + margin-bottom: 10rpx; + padding-bottom: 20rpx; +} +.data-list .items:nth-child(2n) { + float: right; +} +.data-list .items:nth-child(2n+1) { + float: left; +} +.data-list .items image { + width: 100%; + height: 200px !important; +} +.data-list .items .base { + text-align: left; + font-size: 32rpx; + padding: 0 15rpx; +} +.data-list .items .base, +.data-list .items .base .price { + margin-top: 15rpx; +} + +/** + * 条件 + */ +.search-map { + height: calc(100vh - 80rpx); + width: 680rpx; + overflow-y: scroll; + overflow-x: hidden; +} +.map-keywords { + border-radius: 0 !important; + padding: 0 10rpx; + line-height: 66rpx; + height: 66rpx; + font-size: 26rpx; + box-sizing: border-box; +} +.map-nav { + position: relative; +} +.map-nav .arrow-bottom { + position: absolute; + top: 0; + right: 10rpx; + padding-right: 46rpx; + color: #999; +} +.map-item { + background: #f0f0f0; + line-height: 76rpx; +} +.map-base, +.map-nav { + padding: 0 10rpx; +} +.map-content { + padding: 15rpx; + line-height: 60rpx; +} +.map-text-items view, +.map-images-text-items view { + padding: 0 15rpx; + border-radius: 2px; + margin: 15rpx; + border: 1px solid transparent; +} +.map-images-text-items view { + vertical-align: middle; + border: 1px solid #eee; + width: 150rpx; + height: 72rpx; + line-height: 72rpx; +} +.map-images-text-items view image { + width: 150rpx; + height: calc(100% - 8rpx); + display: block; + margin: 0 auto; + margin-top: 4rpx; +} +.map-text-items view.active, +.map-images-text-items view.active { + border: 1px solid #e23f36; + color: #e23f36; + font-weight: bold; +} +.search-map .search-submit { + height: 80rpx; + line-height: 80rpx; + position: absolute; + left: 0; + bottom: 0; + border-radius: 0; +} +.map-remove-submit { + color: #e23f36; +} + +/** + * 品牌基础信息 + */ +.brand-info { + padding: 35rpx 15rpx; +} +.brand-info image, +.brand-info .info-logo-empty { + width: 300rpx; + height: 130rpx; + border: 1px solid #eee; +} +.brand-info .info-logo-empty { + line-height: 130rpx; +} +.brand-info .info-right { + width: calc(100% - 330rpx); +} +.brand-info .info-desc { + color: #999; + font-size: 28rpx; + line-height: 40rpx; + min-height: 80rpx; +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/index/index.js b/sourcecode/toutiao/default/pages/index/index.js index 467ea3264..58604eb70 100755 --- a/sourcecode/toutiao/default/pages/index/index.js +++ b/sourcecode/toutiao/default/pages/index/index.js @@ -70,6 +70,13 @@ Page({ dataType: "json", success: res => { tt.stopPullDownRefresh(); + + // 获取最新缓存 + if(this.data.load_status == 0) { + self.init_config(true); + } + + // 设置首次加载状态 self.setData({load_status: 1}); if (res.data.code == 0) { diff --git a/sourcecode/weixin/default/pages/index/index.js b/sourcecode/weixin/default/pages/index/index.js index 2ec1e988e..9e6749676 100755 --- a/sourcecode/weixin/default/pages/index/index.js +++ b/sourcecode/weixin/default/pages/index/index.js @@ -73,6 +73,13 @@ Page({ dataType: "json", success: res => { wx.stopPullDownRefresh(); + + // 获取最新缓存 + if(this.data.load_status == 0) { + self.init_config(true); + } + + // 设置首次加载状态 self.setData({load_status: 1}); if (res.data.code == 0) { diff --git a/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss b/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss index d602bc9e1..a75e37c76 100644 --- a/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss +++ b/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss @@ -29,6 +29,7 @@ color: #fff; width: 150rpx; font-size: 24rpx; + padding: 0; } .search-btn button:first-child { background: #ff8c00; diff --git a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss index fdece58f6..0bcc7197c 100644 --- a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss +++ b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss @@ -29,6 +29,7 @@ color: #fff; width: 150rpx; font-size: 24rpx; + padding: 0; } .search-btn button:first-child { background: #ff8c00;