Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
34b61d8e
ShopXO
项目概览
jcy2004x
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
34b61d8e
编写于
7月 07, 2021
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
QQ小程序支持可视化装修+多商户
上级
3720bd84
变更
43
展开全部
显示空白变更内容
内联
并排
Showing
43 changed file
with
3335 addition
and
61 deletion
+3335
-61
sourcecode/alipay/default/app.js
sourcecode/alipay/default/app.js
+1
-11
sourcecode/alipay/default/components/quick-nav/quick-nav.js
sourcecode/alipay/default/components/quick-nav/quick-nav.js
+1
-1
sourcecode/alipay/default/pages/index/index.js
sourcecode/alipay/default/pages/index/index.js
+7
-0
sourcecode/baidu/default/pages/index/index.js
sourcecode/baidu/default/pages/index/index.js
+8
-1
sourcecode/qq/default/app.js
sourcecode/qq/default/app.js
+1
-1
sourcecode/qq/default/app.json
sourcecode/qq/default/app.json
+7
-1
sourcecode/qq/default/components/layout/layout.js
sourcecode/qq/default/components/layout/layout.js
+51
-0
sourcecode/qq/default/components/layout/layout.json
sourcecode/qq/default/components/layout/layout.json
+3
-0
sourcecode/qq/default/components/layout/layout.qml
sourcecode/qq/default/components/layout/layout.qml
+123
-0
sourcecode/qq/default/components/layout/layout.qss
sourcecode/qq/default/components/layout/layout.qss
+707
-0
sourcecode/qq/default/pages/design/design.js
sourcecode/qq/default/pages/design/design.js
+84
-0
sourcecode/qq/default/pages/design/design.json
sourcecode/qq/default/pages/design/design.json
+6
-0
sourcecode/qq/default/pages/design/design.qml
sourcecode/qq/default/pages/design/design.qml
+14
-0
sourcecode/qq/default/pages/design/design.qss
sourcecode/qq/default/pages/design/design.qss
+155
-0
sourcecode/qq/default/pages/index/index.js
sourcecode/qq/default/pages/index/index.js
+7
-0
sourcecode/qq/default/pages/index/index.json
sourcecode/qq/default/pages/index/index.json
+2
-1
sourcecode/qq/default/pages/index/index.qml
sourcecode/qq/default/pages/index/index.qml
+43
-32
sourcecode/qq/default/pages/plugins/brand/index/index.js
sourcecode/qq/default/pages/plugins/brand/index/index.js
+0
-13
sourcecode/qq/default/pages/plugins/shop/design/design.js
sourcecode/qq/default/pages/plugins/shop/design/design.js
+201
-0
sourcecode/qq/default/pages/plugins/shop/design/design.json
sourcecode/qq/default/pages/plugins/shop/design/design.json
+10
-0
sourcecode/qq/default/pages/plugins/shop/design/design.qml
sourcecode/qq/default/pages/plugins/shop/design/design.qml
+20
-0
sourcecode/qq/default/pages/plugins/shop/design/design.qss
sourcecode/qq/default/pages/plugins/shop/design/design.qss
+158
-0
sourcecode/qq/default/pages/plugins/shop/detail/detail.js
sourcecode/qq/default/pages/plugins/shop/detail/detail.js
+247
-0
sourcecode/qq/default/pages/plugins/shop/detail/detail.json
sourcecode/qq/default/pages/plugins/shop/detail/detail.json
+10
-0
sourcecode/qq/default/pages/plugins/shop/detail/detail.qml
sourcecode/qq/default/pages/plugins/shop/detail/detail.qml
+53
-0
sourcecode/qq/default/pages/plugins/shop/detail/detail.qss
sourcecode/qq/default/pages/plugins/shop/detail/detail.qss
+202
-0
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.js
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.js
+184
-0
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.json
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.json
+6
-0
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qml
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qml
+20
-0
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qss
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qss
+29
-0
sourcecode/qq/default/pages/plugins/shop/index/index.js
sourcecode/qq/default/pages/plugins/shop/index/index.js
+193
-0
sourcecode/qq/default/pages/plugins/shop/index/index.json
sourcecode/qq/default/pages/plugins/shop/index/index.json
+8
-0
sourcecode/qq/default/pages/plugins/shop/index/index.qml
sourcecode/qq/default/pages/plugins/shop/index/index.qml
+42
-0
sourcecode/qq/default/pages/plugins/shop/index/index.qss
sourcecode/qq/default/pages/plugins/shop/index/index.qss
+59
-0
sourcecode/qq/default/pages/plugins/shop/public/header.qml
sourcecode/qq/default/pages/plugins/shop/public/header.qml
+72
-0
sourcecode/qq/default/pages/plugins/shop/search/search.js
sourcecode/qq/default/pages/plugins/shop/search/search.js
+343
-0
sourcecode/qq/default/pages/plugins/shop/search/search.json
sourcecode/qq/default/pages/plugins/shop/search/search.json
+8
-0
sourcecode/qq/default/pages/plugins/shop/search/search.qml
sourcecode/qq/default/pages/plugins/shop/search/search.qml
+72
-0
sourcecode/qq/default/pages/plugins/shop/search/search.qss
sourcecode/qq/default/pages/plugins/shop/search/search.qss
+162
-0
sourcecode/toutiao/default/pages/index/index.js
sourcecode/toutiao/default/pages/index/index.js
+7
-0
sourcecode/weixin/default/pages/index/index.js
sourcecode/weixin/default/pages/index/index.js
+7
-0
sourcecode/weixin/default/pages/plugins/shop/design/design.wxss
...code/weixin/default/pages/plugins/shop/design/design.wxss
+1
-0
sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss
...code/weixin/default/pages/plugins/shop/detail/detail.wxss
+1
-0
未找到文件。
sourcecode/alipay/default/app.js
浏览文件 @
34b61d8e
...
...
@@ -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
(
'
复制内容为空
'
);
}
...
...
sourcecode/alipay/default/components/quick-nav/quick-nav.js
浏览文件 @
34b61d8e
...
...
@@ -12,7 +12,7 @@ Component({
// 页面被展示
didMount
()
{
// 配置初始化
this
.
init_config
(
true
);
this
.
init_config
();
// 数据设置
var
system
=
app
.
get_system_info
();
...
...
sourcecode/alipay/default/pages/index/index.js
浏览文件 @
34b61d8e
...
...
@@ -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
)
{
...
...
sourcecode/baidu/default/pages/index/index.js
浏览文件 @
34b61d8e
...
...
@@ -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
;
...
...
sourcecode/qq/default/app.js
浏览文件 @
34b61d8e
...
...
@@ -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}}
"
,
...
...
sourcecode/qq/default/app.json
浏览文件 @
34b61d8e
...
...
@@ -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}}"
,
...
...
sourcecode/qq/default/components/layout/layout.js
0 → 100755
浏览文件 @
34b61d8e
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
sourcecode/qq/default/components/layout/layout.json
0 → 100755
浏览文件 @
34b61d8e
{
"component"
:
true
}
\ No newline at end of file
sourcecode/qq/default/components/layout/layout.qml
0 → 100755
浏览文件 @
34b61d8e
<
block
qq
:
if
=
"
{{(propData || null) != null && propData.length > 0}}
"
>
<
block
qq
:
for
=
"
{{propData}}
"
qq
:
key
=
"
key
"
qq
:
for
-
item
=
"
v
"
>
<
view
qq
:
if
=
"
{{(v.value || null) != null && (v.children || null) != null && v.children.length > 0 && (v.value_arr || null) != null && v.value_arr.length > 0 && v.children.length == v.value_arr.length && (v.status || 0) == 1}}
"
class
=
"
layout-view
"
>
<
view
class
=
"
layout-content-children {{((v.config || null) != null && (v.config.frontend_config || null) != null && (v.config.frontend_config.ent || null) != null) ? v.config.frontend_config.ent : ''}}
"
style
=
"
{{((v.config || null) != null && (v.config.frontend_config || null) != null && (v.config.frontend_config.style || null) != null) ? v.config.frontend_config.style : ''}}
"
>
<
block
qq
:
for
=
"
{{v.children}}
"
qq
:
key
=
"
keys
"
qq
:
for
-
item
=
"
vs
"
>
<
view
class
=
"
layout-content-container {{((vs.config || null) != null && (vs.config.frontend_config || null) != null && (vs.config.frontend_config.ent || null) != null) ? vs.config.frontend_config.ent : ''}}
"
style
=
"
{{((vs.config || null) != null && (vs.config.frontend_config || null) != null && (vs.config.frontend_config.style || null) != null) ? vs.config.frontend_config.style : ''}}
"
>
<
block
qq
:
if
=
"
{{(vs.children || null) != null && vs.children.length > 0}}
"
>
<
view
qq
:
for
=
"
{{vs.children}}
"
qq
:
key
=
"
keyss
"
qq
:
for
-
item
=
"
vss
"
class
=
"
layout-content
"
>
<
view
qq
:
if
=
"
{{(vss.config || null) != null}}
"
class
=
"
module-content
"
>
<
view
class
=
"
module-{{vss.value}}-container
"
style
=
"
{{((vss.config.frontend_config || null) != null && (vss.config.frontend_config.style || null) != null) ? vss.config.frontend_config.style : ''}}
"
>
<!--
单图
-->
<
block
qq
:
if
=
"
{{vss.value == 'images'}}
"
>
<
view
class
=
"
module-images-content {{vss.config.frontend_config.media_fixed.media_container_ent}}
"
style
=
"
{{vss.config.frontend_config.media_fixed.media_container_style}}
"
>
<
image
bindtap
=
"
layout_url_event
"
data
-
value
=
"
{{vss.config.url || ''}}
"
src
=
"
{{vss.config.images}}
"
mode
=
"
widthFix
"
class
=
"
{{vss.config.frontend_config.media_fixed.media_ent}}
"
><
/image
>
<
/view
>
<
/block
>
<!--
多图
-->
<
block
qq
:
elif
=
"
{{vss.value == 'many-images'}}
"
>
<
block
qq
:
if
=
"
{{vss.config.view_list_show_style == 'rolling'}}
"
>
<!--
滚动
-->
<
view
class
=
"
module-list-rolling
"
>
<
scroll
-
view
scroll
-
x
>
<
view
qq
:
for
=
"
{{vss.config.data_list}}
"
qq
:
key
=
"
ik
"
class
=
"
item
"
>
<
view
class
=
"
module-item {{vss.config.frontend_config.media_fixed.media_container_ent}}
"
style
=
"
width:{{((vss.config.view_list_show_style_value_arr || null) == null || (vss.config.view_list_show_style_value_arr.item_width || null) == null) ? 200 : vss.config.view_list_show_style_value_arr.item_width}}px;margin-left:{{((vss.config.view_list_show_style_value_arr || null) == null || (vss.config.view_list_show_style_value_arr.item_margin || null) == null || index == 0) ? 0 : vss.config.view_list_show_style_value_arr.item_margin}}px;{{vss.config.frontend_config.item_style}}{{vss.config.frontend_config.media_fixed.media_container_style}}
"
bindtap
=
"
layout_url_event
"
data
-
value
=
"
{{item.url || ''}}
"
>
<
image
src
=
"
{{item.images}}
"
mode
=
"
widthFix
"
class
=
"
{{vss.config.frontend_config.media_fixed.media_ent}}
"
><
/image
>
<
/view
>
<
/view
>
<
/scroll-view
>
<
/view
>
<
/block
>
<
block
qq
:
elif
=
"
{{vss.config.view_list_show_style == 'list'}}
"
>
<!--
列表
-->
<
view
class
=
"
module-list-content {{vss.config.frontend_config.list_ent}}
"
>
<
view
qq
:
for
=
"
{{vss.config.data_list}}
"
qq
:
key
=
"
ik
"
class
=
"
item
"
>
<
view
class
=
"
module-item
"
style
=
"
{{vss.config.frontend_config.item_style}}
"
>
<
view
class
=
"
{{vss.config.frontend_config.media_fixed.media_container_ent}}
"
style
=
"
{{vss.config.frontend_config.media_fixed.media_container_style}}
"
bindtap
=
"
layout_url_event
"
data
-
value
=
"
{{item.url || ''}}
"
>
<
image
src
=
"
{{item.images}}
"
mode
=
"
widthFix
"
class
=
"
{{vss.config.frontend_config.media_fixed.media_ent}}
"
><
/image
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/block
>
<
block
qq
:
else
>
<!--
默认轮播
-->
<
swiper
indicator
-
dots
=
"
{{vss.config.data_list.length > 0}}
"
indicator
-
color
=
"
{{indicator_color}}
"
indicator
-
active
-
color
=
"
{{indicator_active_color}}
"
autoplay
=
"
{{vss.config.data_list.length > 0}}
"
circular
=
"
{{circular}}
"
style
=
"
{{vss.config.frontend_config.media_fixed.media_container_style}}
"
>
<
block
qq
:
for
=
"
{{vss.config.data_list}}
"
qq
:
key
=
"
ik
"
>
<
swiper
-
item
class
=
"
{{vss.config.frontend_config.media_fixed.media_container_ent}}
"
>
<
image
src
=
"
{{item.images}}
"
mode
=
"
aspectFill
"
class
=
"
{{vss.config.frontend_config.media_fixed.media_ent}}
"
bindtap
=
"
layout_url_event
"
data
-
value
=
"
{{item.url || ''}}
"
><
/image
>
<
/swiper-item
>
<
/block
>
<
/swiper
>
<
/block
>
<
/block
>
<!--
视频
-->
<
block
qq
:
elif
=
"
{{vss.value == 'video'}}
"
>
<
view
class
=
"
module-video-content {{vss.config.frontend_config.media_fixed.media_container_ent}}
"
style
=
"
{{vss.config.frontend_config.media_fixed.media_container_style}}
"
>
<
video
src
=
"
{{vss.config.video}}
"
autoplay
=
"
{{false}}
"
show
-
center
-
play
-
btn
=
"
{{true}}
"
controls
=
"
{{false}}
"
show
-
play
-
btn
=
"
{{false}}
"
enable
-
progress
-
gesture
=
"
{{false}}
"
show
-
fullscreen
-
btn
=
"
{{false}}
"
controls
poster
=
"
{{(vss.config.content_images || null) != null ? vss.config.content_images : ''}}
"
class
=
"
{{vss.config.frontend_config.media_fixed.media_ent}}
"
><
/video
>
<
/view
>
<
/block
>
<!--
商品
-->
<
block
qq
:
elif
=
"
{{vss.value == 'goods'}}
"
>
<
block
qq
:
if
=
"
{{vss.config.view_list_show_style == 'rolling'}}
"
>
<!--
滚动
-->
<
view
class
=
"
module-goods-content module-list-rolling
"
>
<
scroll
-
view
scroll
-
x
>
<
view
qq
:
for
=
"
{{vss.config.data_list}}
"
qq
:
key
=
"
ik
"
class
=
"
item
"
>
<
view
class
=
"
module-item {{vss.config.frontend_config.media_fixed.media_container_ent}}
"
style
=
"
width:{{((vss.config.view_list_show_style_value_arr || null) == null || (vss.config.view_list_show_style_value_arr.item_width || null) == null) ? 200 : vss.config.view_list_show_style_value_arr.item_width}}px;margin-left:{{((vss.config.view_list_show_style_value_arr || null) == null || (vss.config.view_list_show_style_value_arr.item_margin || null) == null || index == 0) ? 0 : vss.config.view_list_show_style_value_arr.item_margin}}px;{{vss.config.frontend_config.item_style}}{{vss.config.frontend_config.media_fixed.media_container_style}}
"
bindtap
=
"
layout_url_event
"
data
-
value
=
"
{{item.goods_url || ''}}
"
>
<
image
src
=
"
{{item.images}}
"
mode
=
"
widthFix
"
class
=
"
{{vss.config.frontend_config.media_fixed.media_ent}}
"
><
/image
>
<
view
class
=
"
item-bottom
"
>
<
view
class
=
"
module-title
"
>
{{
item
.
title
}}
<
/view
>
<
view
class
=
"
module-price
"
>
{{
currency_symbol
}}{{
item
.
price
}}
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/scroll-view
>
<
/view
>
<
/block
>
<
block
qq
:
else
>
<!--
默认列表
-->
<
view
class
=
"
module-goods-content module-list-content {{vss.config.frontend_config.list_ent}}
"
>
<
view
qq
:
for
=
"
{{vss.config.data_list}}
"
qq
:
key
=
"
ik
"
class
=
"
item
"
>
<
view
class
=
"
module-item
"
style
=
"
{{vss.config.frontend_config.item_style}}
"
>
<
view
class
=
"
{{vss.config.frontend_config.media_fixed.media_container_ent}}
"
style
=
"
{{vss.config.frontend_config.media_fixed.media_container_style}}
"
bindtap
=
"
layout_url_event
"
data
-
value
=
"
{{item.goods_url || ''}}
"
>
<
image
src
=
"
{{item.images}}
"
mode
=
"
widthFix
"
class
=
"
{{vss.config.frontend_config.media_fixed.media_ent}}
"
><
/image
>
<
view
class
=
"
item-bottom
"
>
<
view
class
=
"
module-title
"
>
{{
item
.
title
}}
<
/view
>
<
view
class
=
"
module-price
"
>
{{
currency_symbol
}}{{
item
.
price
}}
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/block
>
<
/block
>
<!--
标题
-->
<
block
qq
:
elif
=
"
{{vss.value == 'title'}}
"
>
<
view
class
=
"
module-title-content
"
>
<
text
class
=
"
title-main
"
style
=
"
{{vss.config.frontend_config.style_title_main}}
"
>
{{
vss
.
config
.
title
}}
<
/text
>
<
text
qq
:
if
=
"
{{(vss.config.title_vice || null) != null}}
"
class
=
"
title-vice
"
style
=
"
{{vss.config.frontend_config.style_title_vice}}
"
>
{{
vss
.
config
.
title_vice
}}
<
/text
>
<
view
qq
:
if
=
"
{{(vss.config.title_more || null) != null}}
"
class
=
"
more-content
"
>
<
view
style
=
"
{{vss.config.frontend_config.style_title_more}}
"
bindtap
=
"
layout_url_event
"
data
-
value
=
"
{{vss.config.title_more_url || ''}}
"
>
{{
vss
.
config
.
title_more
}}
><
/view
>
<
/view
>
<
/view
>
<
/block
>
<
/view
>
<
/view
>
<
/view
>
<
/block
>
<
/view
>
<
/block
>
<
/view
>
<
/view
>
<
/block
>
<
/block
>
sourcecode/qq/default/components/layout/layout.qss
0 → 100755
浏览文件 @
34b61d8e
此差异已折叠。
点击以展开。
sourcecode/qq/default/pages/design/design.js
0 → 100644
浏览文件 @
34b61d8e
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
sourcecode/qq/default/pages/design/design.json
0 → 100644
浏览文件 @
34b61d8e
{
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"component-layout"
:
"/components/layout/layout"
}
}
\ No newline at end of file
sourcecode/qq/default/pages/design/design.qml
0 → 100644
浏览文件 @
34b61d8e
<
view
qq
:
if
=
"
{{(data || null) != null}}
"
>
<!--
拖拽模式
、
引入拖拽数据模块
-->
<
component
-
layout
prop
-
data
=
"
{{layout_data}}
"
><
/component-layout
>
<!--
结尾
-->
<
block
qq
:
if
=
"
{{(data.is_footer || 0) == 1}}
"
>
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/block
>
<
/view
>
<
view
qq
:
else
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
/view>
\ No newline at end of file
sourcecode/qq/default/pages/design/design.qss
0 → 100644
浏览文件 @
34b61d8e
/**
* 搜索
*/
.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
sourcecode/qq/default/pages/index/index.js
浏览文件 @
34b61d8e
...
...
@@ -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
)
{
...
...
sourcecode/qq/default/pages/index/index.json
浏览文件 @
34b61d8e
...
...
@@ -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
sourcecode/qq/default/pages/index/index.qml
浏览文件 @
34b61d8e
...
...
@@ -12,11 +12,14 @@
<
view
class
=
"
tips
"
>
{{
common_shop_notice
}}
<
/view
>
<
/view
>
<!--
轮播
-->
<
component
-
banner
prop
-
data
=
"
{{banner_list}}
"
><
/component-banner
>
<!--
拖拽模式下不展示
-->
<
block
qq
:
if
=
"
{{home_index_floor_data_type != 2}}
"
>
<!--
轮播
-->
<
component
-
banner
prop
-
data
=
"
{{banner_list}}
"
><
/component-banner
>
<!--
导航
-->
<
component
-
icon
-
nav
prop
-
data
=
"
{{navigation}}
"
><
/component-icon-nav
>
<!--
导航
-->
<
component
-
icon
-
nav
prop
-
data
=
"
{{navigation}}
"
><
/component-icon-nav
>
<
/block
>
<!--
限时秒杀
-->
<
view
qq
:
if
=
"
{{plugins_limitedtimediscount_is_valid == 1}}
"
>
...
...
@@ -25,7 +28,14 @@
<
/view
>
<!--
楼层数据
-->
<
block
qq
:
if
=
"
{{data_list.length > 0}}
"
>
<
block
qq
:
if
=
"
{{(data_list || nul) != null && data_list.length > 0}}
"
>
<!--
数据模式0
,
1
自动
+
手动
、
2
拖拽
-->
<
block
qq
:
if
=
"
{{home_index_floor_data_type == 2}}
"
>
<!--
引入拖拽数据模块
-->
<
component
-
layout
prop
-
data
=
"
{{data_list}}
"
><
/component-layout
>
<
/block
>
<
block
qq
:
else
>
<!--
自动
+
手动
-->
<
view
qq
:
for
=
"
{{data_list}}
"
qq
:
key
=
"
key
"
qq
:
for
-
item
=
"
floor
"
class
=
"
floor spacing-mb
"
>
<
view
class
=
"
spacing-nav-title
"
>
<
text
class
=
"
line
"
><
/text
>
...
...
@@ -58,6 +68,7 @@
<
/view
>
<
/view
>
<
/view
>
<
/block
>
<
/block
>
<!--
底部购买记录
-->
...
...
sourcecode/qq/default/pages/plugins/brand/index/index.js
浏览文件 @
34b61d8e
...
...
@@ -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
sourcecode/qq/default/pages/plugins/shop/design/design.js
0 → 100644
浏览文件 @
34b61d8e
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
sourcecode/qq/default/pages/plugins/shop/design/design.json
0 → 100644
浏览文件 @
34b61d8e
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#d2364c"
,
"backgroundColorTop"
:
"#d2364c"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"usingComponents"
:
{
"component-layout"
:
"/components/layout/layout"
}
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/design/design.qml
0 → 100644
浏览文件 @
34b61d8e
<
view
qq
:
if
=
"
{{(data || null) != null}}
"
>
<!--
头部
-->
<
block
qq
:
if
=
"
{{(data.is_header || 0) == 1}}
"
>
<
import
src
=
"
/pages/plugins/shop/public/header.qml
"
/>
<
template
is
=
"
shop-header
"
data
=
"
{{data_base: data_base, shop: shop, shop_navigation: shop_navigation, shop_goods_category: shop_goods_category, shop_favor_info: shop_favor_info, search_keywords_value: search_keywords_value, header_service_status: header_service_status, nav_category_status: nav_category_status}}
"
><
/template
>
<
/block
>
<!--
拖拽模式
、
引入拖拽数据模块
-->
<
component
-
layout
prop
-
data
=
"
{{layout_data}}
"
><
/component-layout
>
<!--
结尾
-->
<
block
qq
:
if
=
"
{{(data.is_footer || 0) == 1}}
"
>
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/block
>
<
/view
>
<
view
qq
:
else
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
/view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/design/design.qss
0 → 100644
浏览文件 @
34b61d8e
/**
* 搜索
*/
.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
sourcecode/qq/default/pages/plugins/shop/detail/detail.js
0 → 100644
浏览文件 @
34b61d8e
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
sourcecode/qq/default/pages/plugins/shop/detail/detail.json
0 → 100644
浏览文件 @
34b61d8e
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#d2364c"
,
"backgroundColorTop"
:
"#d2364c"
,
"backgroundColorBottom"
:
"#f5f5f5"
,
"backgroundTextStyle"
:
"light"
,
"usingComponents"
:
{
"component-layout"
:
"/components/layout/layout"
}
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/detail/detail.qml
0 → 100644
浏览文件 @
34b61d8e
<
view
qq
:
if
=
"
{{(data || null) != null}}
"
>
<!--
头部
-->
<
import
src
=
"
/pages/plugins/shop/public/header.qml
"
/>
<
template
is
=
"
shop-header
"
data
=
"
{{data_base: data_base, shop: shop, shop_navigation: shop_navigation, shop_goods_category: shop_goods_category, shop_favor_info: shop_favor_info, search_keywords_value: search_keywords_value, header_service_status: header_service_status, nav_category_status: nav_category_status}}
"
><
/template
>
<!--
数据模式
-->
<
block
qq
:
if
=
"
{{(shop.data_model || 0) == 1}}
"
>
<!--
拖拽模式
、
引入拖拽数据模块
-->
<
component
-
layout
prop
-
data
=
"
{{data}}
"
><
/component-layout
>
<
/block
>
<!--
自动模式
-->
<
block
qq
:
else
>
<
view
class
=
"
shop-category-list nav-roll oh bg-white margin-top-sm margin-bottom-sm
"
>
<
scroll
-
view
scroll
-
x
>
<
view
class
=
"
item {{(shop_category_tab_value == 0) ? 'active' : ''}}
"
bindtap
=
"
shop_category_tab_event
"
data
-
value
=
"
0
"
>
全部商品
<
/view
>
<
block
qq
:
if
=
"
{{shop_goods_category.length > 0}}
"
>
<
block
qq
:
for
=
"
{{shop_goods_category}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
item {{(shop_category_tab_value == item.id) ? 'active' : ''}}
"
bindtap
=
"
shop_category_tab_event
"
data
-
value
=
"
{{item.id}}
"
>
{{
item
.
name
}}
<
/view
>
<
/block
>
<
/block
>
<
/scroll-view
>
<
/view
>
<
view
class
=
"
data-list oh
"
>
<
block
qq
:
if
=
"
{{goods_list.length > 0}}
"
>
<
block
qq
:
for
=
"
{{goods_list}}
"
qq
:
key
=
"
key
"
>
<
view
qq
:
if
=
"
{{item.active != 0}}
"
class
=
"
items bg-white
"
>
<
navigator
url
=
"
/pages/goods-detail/goods-detail?goods_id={{item.id}}
"
hover
-
class
=
"
none
"
>
<
image
src
=
"
{{item.images}}
"
mode
=
"
aspectFit
"
/>
<
view
class
=
"
base
"
>
<
view
class
=
"
multi-text
"
>
{{
item
.
title
}}
<
/view
>
<
view
class
=
"
price
"
>
<
text
class
=
"
sales-price
"
>
{{
currency_symbol
}}{{
item
.
min_price
}}
<
/text
>
<
/view
>
<
/view
>
<
/navigator
>
<
/view
>
<
/block
>
<
/block
>
<
block
qq
:
else
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: 0}}
"
><
/template
>
<
/block
>
<
/view
>
<
/block
>
<!--
结尾
-->
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/view
>
<
view
qq
:
else
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
/view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/detail/detail.qss
0 → 100644
浏览文件 @
34b61d8e
/**
* 搜索
*/
.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
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.js
0 → 100755
浏览文件 @
34b61d8e
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
(
"
服务器请求出错
"
);
}
});
}
}
});
},
});
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.json
0 → 100755
浏览文件 @
34b61d8e
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"店铺收藏"
,
"usingComponents"
:
{
}
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qml
0 → 100755
浏览文件 @
34b61d8e
<
scroll
-
view
scroll
-
y
=
"
{{true}}
"
class
=
"
scroll-box
"
bindscrolltolower
=
"
scroll_lower
"
lower
-
threshold
=
"
30
"
>
<
view
class
=
"
list-item
"
qq
:
if
=
"
{{data_list.length > 0}}
"
>
<
view
class
=
"
item oh bg-white spacing-mb
"
qq
:
for
=
"
{{data_list}}
"
qq
:
for
-
item
=
"
item
"
>
<
navigator
url
=
"
/pages/plugins/shop/detail/detail?id={{item.shop_info.id}}
"
hover
-
class
=
"
none
"
>
<
image
class
=
"
logo fl
"
src
=
"
{{item.shop_info.logo}}
"
mode
=
"
aspectFill
"
/>
<
view
class
=
"
base
"
>
<
view
class
=
"
title single-text
"
>
{{
item
.
shop_info
.
name
}}
<
/view
>
<
view
class
=
"
describe multi-text cr-888
"
>
{{
item
.
shop_info
.
describe
}}
<
/view
>
<
/view
>
<
/navigator
>
<
button
class
=
"
submit-cancel
"
type
=
"
default
"
size
=
"
mini
"
bindtap
=
"
cancel_event
"
data
-
value
=
"
{{item.id}}
"
data
-
index
=
"
{{index}}
"
hover
-
class
=
"
none
"
>
取消
<
/button
>
<
/view
>
<
/view
>
<
view
qq
:
if
=
"
{{data_list.length == 0}}
"
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status}}
"
><
/template
>
<
/view
>
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/scroll-view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/faovr/faovr.qss
0 → 100755
浏览文件 @
34b61d8e
.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
sourcecode/qq/default/pages/plugins/shop/index/index.js
0 → 100755
浏览文件 @
34b61d8e
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
};
},
});
sourcecode/qq/default/pages/plugins/shop/index/index.json
0 → 100755
浏览文件 @
34b61d8e
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"所有店铺"
,
"usingComponents"
:
{
"component-quick-nav"
:
"/components/quick-nav/quick-nav"
,
"component-popup"
:
"/components/popup/popup"
}
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/index/index.qml
0 → 100755
浏览文件 @
34b61d8e
<
view
qq
:
if
=
"
{{(data_base || null) != null}}
"
>
<!--
分类
-->
<
scroll
-
view
qq
:
if
=
"
{{(shop_category || null) != null && shop_category.length > 0}}
"
class
=
"
nav-list bg-white oh
"
scroll
-
x
=
"
true
"
>
<
view
class
=
"
item cr-888 {{nav_active_value == 0 ? 'active' : ''}}
"
bindtap
=
"
nav_event
"
data
-
value
=
"
0
"
>
全部
<
/view
>
<
block
qq
:
for
=
"
{{shop_category}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
item cr-888 {{nav_active_value == item.id ? 'active' : ''}}
"
bindtap
=
"
nav_event
"
data
-
value
=
"
{{item.id}}
"
>
{{
item
.
name
}}
<
/view
>
<
/block
>
<
/scroll-view
>
<!--
列表
-->
<
scroll
-
view
scroll
-
y
=
"
{{true}}
"
class
=
"
scroll-box
"
bindscrolltolower
=
"
scroll_lower
"
lower
-
threshold
=
"
30
"
>
<
view
qq
:
if
=
"
{{(data_list || null) != null && data_list.length > 0}}
"
class
=
"
data-list oh spacing-mt
"
>
<
block
qq
:
for
=
"
{{data_list}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
item bg-white
"
>
<
navigator
url
=
"
/pages/plugins/shop/detail/detail?id={{item.id}}
"
hover
-
class
=
"
none
"
>
<
image
src
=
"
{{item.logo_long}}
"
mode
=
"
aspectFit
"
/>
<
view
class
=
"
base br-t-dashed
"
>
<
view
class
=
"
single-text name tc
"
>
{{
item
.
name
}}
<
/view
>
<
view
class
=
"
multi-text desc
"
>
{{
item
.
describe
}}
<
/view
>
<
view
class
=
"
oh margin-top-sm single-text base-bottom
"
>
<
view
class
=
"
bitem fl cr-888 single-text
"
>
商品
{{
item
.
goods_count
}}
<
/view
>
<
view
class
=
"
bitem fr cr-888 single-text tr
"
>
销量
{{
item
.
goods_sales_count
}}
<
/view
>
<
/view
>
<
/view
>
<
/navigator
>
<
/view
>
<
/block
>
<
/view
>
<
view
qq
:
else
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
/view
>
<!--
结尾
-->
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/scroll-view
>
<
/view
>
<
view
qq
:
else
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
/view>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/index/index.qss
0 → 100755
浏览文件 @
34b61d8e
/**
* 分类导航
*/
.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
sourcecode/qq/default/pages/plugins/shop/public/header.qml
0 → 100644
浏览文件 @
34b61d8e
<
template
name
=
"
shop-header
"
>
<!--
搜索
-->
<
view
class
=
"
search oh
"
>
<
input
type
=
"
done
"
placeholder
=
"
请输入您搜索的商品关键字
"
value
=
"
{{search_keywords_value || ''}}
"
class
=
"
bg-white wh-auto fl
"
placeholder
-
class
=
"
cr-ccc
"
bindinput
=
"
search_keywords_event
"
/>
<
view
class
=
"
search-btn fr
"
>
<
button
class
=
"
mini-btn
"
type
=
"
default
"
size
=
"
mini
"
hover
-
class
=
"
none
"
bindtap
=
"
search_button_event
"
data
-
value
=
"
/pages/goods-search/goods-search?
"
>
搜全站
<
/button
>
<
button
class
=
"
mini-btn
"
type
=
"
default
"
size
=
"
mini
"
hover
-
class
=
"
none
"
bindtap
=
"
search_button_event
"
data
-
value
=
"
/pages/plugins/shop/search/search?shop_id={{shop.id}}&
"
>
搜本店
<
/button
>
<
/view
>
<
/view
>
<!--
顶部
-->
<
view
class
=
"
header bg-white oh
"
>
<
image
src
=
"
{{shop.logo_long}}
"
mode
=
"
widthFix
"
class
=
"
shop-logo fl br-r padding-right-lg
"
><
/image
>
<
view
class
=
"
base fr
"
>
<
view
class
=
"
shop-title single-text
"
>
<
text
qq
:
if
=
"
{{((data_base.is_auth_fill_info || 0) == 1 || (data_base.is_auth_upload_pic || 0) == 1) && shop.auth_type == 1 && (shop.auth_type_name || null) != null}}
"
class
=
"
shop-auth-icon
"
>
{{
shop
.
auth_type_name
}}
<
/text
>
<
text
>
{{
shop
.
name
}}
<
/text
>
<
/view
>
<
view
class
=
"
base-bottom oh margin-top-sm
"
>
<
view
qq
:
if
=
"
{{(data_base.is_service_info || 0) == 1}}
"
class
=
"
fl margin-right-xxl
"
bindtap
=
"
header_service_event
"
>
<
image
src
=
"
/images/user-nav-customer-service-icon.png
"
mode
=
"
scaleToFill
"
class
=
"
va-m
"
/>
<
text
class
=
"
va-m cr-666
"
>
在线客服
<
/text
>
<
/view
>
<
view
class
=
"
fl single-text
"
bindtap
=
"
shop_favor_event
"
>
<
image
src
=
"
/images/default-favor-icon-{{shop_favor_info.status}}.png
"
mode
=
"
scaleToFill
"
class
=
"
va-m
"
/>
<
text
class
=
"
va-m {{shop_favor_info.status == 1 ? 'cr-main' : ''}}
"
>
{{
shop_favor_info
.
text
}}({{
shop_favor_info
.
count
}})
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<!--
在线客服
-->
<
view
qq
:
if
=
"
{{header_service_status && (data_base.is_service_info || 0) == 1}}
"
class
=
"
header-service bg-white oh padding-top-xxl br
"
>
<
view
qq
:
if
=
"
{{(shop.service_weixin_qrcode || null) != null}}
"
class
=
"
tc margin-bottom-sm
"
>
<
image
src
=
"
{{shop.service_weixin_qrcode}}
"
mode
=
"
scaleToFill
"
bindtap
=
"
image_show_event
"
data
-
value
=
"
{{shop.service_weixin_qrcode}}
"
/>
<
view
>
点击长按微信咨询
<
/view
>
<
/view
>
<
view
qq
:
if
=
"
{{(shop.service_qq || null) != null}}
"
class
=
"
item br-t single-text
"
>
<
text
>
QQ
:
<
/text
>
<
text
bindtap
=
"
text_copy_event
"
data
-
value
=
"
{{shop.service_qq}}
"
>
{{
shop
.
service_qq
}}
<
/text
>
<
/view
>
<
view
qq
:
if
=
"
{{(shop.service_tel || null) != null}}
"
class
=
"
item br-t single-text
"
>
<
text
>
电话
:
<
/text
>
<
text
bindtap
=
"
text_copy_event
"
data
-
value
=
"
{{shop.service_tel}}
"
>
{{
shop
.
service_tel
}}
<
/text
>
<
/view
>
<
view
qq
:
if
=
"
{{(shop.open_week_name || null) != null && (shop.close_week_name || null) != null}}
"
class
=
"
item br-t single-text
"
>
<
text
>
时间
:
<
/text
>
<
text
bindtap
=
"
text_copy_event
"
data
-
value
=
"
{{shop.open_week_name}}至{{shop.close_week_name}},{{shop.open_time}}-{{shop.close_time}}
"
>
{{
shop
.
open_week_name
}}
至
{{
shop
.
close_week_name
}}
,
{{
shop
.
open_time
}}
-
{{
shop
.
close_time
}}
<
/text
>
<
/view
>
<
/view
>
<!--
导航
-->
<
view
class
=
"
nav nav-roll bg-white padding-top-lg
"
>
<
view
class
=
"
item arrow-bottom nav-shop-category fl
"
bindtap
=
"
nav_shop_category_event
"
>
查看商品分类
<
/view
>
<
scroll
-
view
scroll
-
x
class
=
"
nav-scroll
"
>
<
block
qq
:
if
=
"
{{shop_navigation.length > 0}}
"
>
<
block
qq
:
for
=
"
{{shop_navigation}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
item
"
bindtap
=
"
nav_event
"
data
-
value
=
"
{{item.url}}
"
data
-
index
=
"
{{index}}
"
>
{{
item
.
name
}}
<
/view
>
<
/block
>
<
/block
>
<
/scroll-view
>
<
view
qq
:
if
=
"
{{nav_category_status}}
"
class
=
"
nav-category bg-white tc
"
>
<
scroll
-
view
scroll
-
y
class
=
"
category-scroll
"
>
<
block
qq
:
if
=
"
{{shop_goods_category.length > 0}}
"
>
<
block
qq
:
for
=
"
{{shop_goods_category}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
item single-text
"
bindtap
=
"
shop_category_event
"
data
-
value
=
"
{{item.id}}
"
>
{{
item
.
name
}}
<
/view
>
<
/block
>
<
/block
>
<
block
qq
:
else
>
<
view
class
=
"
padding-top-xxl padding-bottom-xxl cr-ccc
"
>
暂无数据
<
/view
>
<
/block
>
<
/scroll-view
>
<
/view
>
<
/view
>
<
/template>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/search/search.js
0 → 100755
浏览文件 @
34b61d8e
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
};
},
});
sourcecode/qq/default/pages/plugins/shop/search/search.json
0 → 100755
浏览文件 @
34b61d8e
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"店铺商品搜索"
,
"usingComponents"
:
{
"component-quick-nav"
:
"/components/quick-nav/quick-nav"
,
"component-popup"
:
"/components/popup/popup"
}
}
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/search/search.qml
0 → 100755
浏览文件 @
34b61d8e
<!--
排序
-->
<
view
class
=
"
nav-sort oh
"
>
<
view
class
=
"
nav-sort-content
"
>
<
block
qq
:
for
=
"
{{search_nav_sort_list}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
item tc fl
"
data
-
index
=
"
{{index}}
"
bindtap
=
"
nav_sort_event
"
>
<
text
class
=
"
cr-666
"
>
{{
item
.
name
}}
<
/text
>
<
image
qq
:
if
=
"
{{(item.icon || null) != null}}
"
class
=
"
icon
"
src
=
"
/images/search-{{item.icon}}-icon.png
"
mode
=
"
aspectFill
"
/>
<
/view
>
<
/block
>
<
/view
>
<
image
class
=
"
screening-submit
"
src
=
"
/images/search-submit-icon.png
"
mode
=
"
aspectFill
"
bindtap
=
"
popup_form_event_show
"
/>
<
/view
>
<!--
列表
-->
<
scroll
-
view
scroll
-
y
=
"
{{true}}
"
class
=
"
scroll-box
"
bindscrolltolower
=
"
scroll_lower
"
lower
-
threshold
=
"
30
"
>
<
view
class
=
"
data-list
"
>
<
view
class
=
"
items bg-white
"
qq
:
for
=
"
{{data_list}}
"
qq
:
key
=
"
key
"
>
<
navigator
url
=
"
/pages/goods-detail/goods-detail?goods_id={{item.id}}
"
hover
-
class
=
"
none
"
>
<
image
src
=
"
{{item.images}}
"
mode
=
"
aspectFit
"
/>
<
view
class
=
"
base
"
>
<
view
class
=
"
multi-text
"
>
{{
item
.
title
}}
<
/view
>
<
view
class
=
"
price
"
>
<
text
class
=
"
sales-price
"
>
{{
currency_symbol
}}{{
item
.
min_price
}}
<
/text
>
<
/view
>
<
/view
>
<
/navigator
>
<
/view
>
<
/view
>
<
view
qq
:
if
=
"
{{data_list.length == 0}}
"
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status, msg: data_list_loding_msg}}
"
><
/template
>
<
/view
>
<
import
src
=
"
/pages/common/bottom_line.qml
"
/>
<
template
is
=
"
bottom_line
"
data
=
"
{{status: data_bottom_line_status}}
"
><
/template
>
<
/scroll-view
>
<!--
筛选条件
popup
-->
<
component
-
popup
prop
-
show
=
"
{{is_show_popup_form}}
"
prop
-
position
=
"
left
"
bindonclose
=
"
popup_form_event_close
"
>
<
form
bindsubmit
=
"
form_submit_event
"
class
=
"
popup-form oh bg-white
"
>
<
view
class
=
"
search-map
"
>
<
view
class
=
"
map-item map-base
"
>
<
text
>
筛选出
<
/text
>
<
text
class
=
"
cr-main
"
>
{{
data_total
}}
<
/text
>
<
text
>
条数据
<
/text
>
<
text
class
=
"
map-remove-submit fr
"
bindtap
=
"
map_remove_event
"
>
清除
<
/text
>
<
/view
>
<!--
搜索关键字
-->
<
input
type
=
"
text
"
placeholder
=
"
其实搜索很简单^_^ !
"
name
=
"
wd
"
value
=
"
{{(post_data.wd || '')}}
"
class
=
"
map-keywords wh-auto
"
placeholder
-
class
=
"
cr-ccc
"
/>
<!--
分类
-->
<
view
qq
:
if
=
"
{{(category_list || null) != null && category_list.length > 0}}
"
class
=
"
map-item
"
>
<
view
class
=
"
map-nav tc
"
>
<
text
>
分类
<
/text
>
<
text
class
=
"
arrow-bottom
"
qq
:
if
=
"
{{category_list.length > 3}}
"
bindtap
=
"
more_event
"
data
-
value
=
"
category_list
"
>
更多
<
/text
>
<
/view
>
<
view
class
=
"
map-content map-text-items map-category-container oh bg-white
"
style
=
"
height:{{map_fields_list.category_list.height}};
"
>
<
block
qq
:
for
=
"
{{category_list}}
"
qq
:
key
=
"
key
"
>
<
view
class
=
"
fl {{item.active == 1 ? 'active' : ''}}
"
bindtap
=
"
map_item_event
"
data
-
index
=
"
{{index}}
"
data
-
field
=
"
category_list
"
>
{{
item
.
name
}}
<
/view
>
<
/block
>
<
/view
>
<
/view
>
<
button
formType
=
"
submit
"
class
=
"
bg-main search-submit wh-auto
"
disabled
=
"
{{popup_form_loading_status}}
"
hover
-
class
=
"
none
"
>
确认
<
/button
>
<
/view
>
<
/form
>
<
/component-popup
>
<!--
快捷导航
-->
<
component
-
quick
-
nav
><
/component-quick-nav>
\ No newline at end of file
sourcecode/qq/default/pages/plugins/shop/search/search.qss
0 → 100755
浏览文件 @
34b61d8e
/**
* 排序导航
*/
.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
sourcecode/toutiao/default/pages/index/index.js
浏览文件 @
34b61d8e
...
...
@@ -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
)
{
...
...
sourcecode/weixin/default/pages/index/index.js
浏览文件 @
34b61d8e
...
...
@@ -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
)
{
...
...
sourcecode/weixin/default/pages/plugins/shop/design/design.wxss
浏览文件 @
34b61d8e
...
...
@@ -29,6 +29,7 @@
color: #fff;
width: 150rpx;
font-size: 24rpx;
padding: 0;
}
.search-btn button:first-child {
background: #ff8c00;
...
...
sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss
浏览文件 @
34b61d8e
...
...
@@ -29,6 +29,7 @@
color: #fff;
width: 150rpx;
font-size: 24rpx;
padding: 0;
}
.search-btn button:first-child {
background: #ff8c00;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录