Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
80cecc03
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,发现更多精彩内容 >>
提交
80cecc03
编写于
7月 19, 2019
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
百度小程序web化优化
上级
efdd7654
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
92 addition
and
27 deletion
+92
-27
public/appmini/old/baidu/app.js
public/appmini/old/baidu/app.js
+13
-0
public/appmini/old/baidu/pages/goods-category/goods-category.js
.../appmini/old/baidu/pages/goods-category/goods-category.js
+27
-13
public/appmini/old/baidu/pages/goods-detail/goods-detail.js
public/appmini/old/baidu/pages/goods-detail/goods-detail.js
+20
-1
public/appmini/old/baidu/pages/goods-search/goods-search.js
public/appmini/old/baidu/pages/goods-search/goods-search.js
+17
-1
public/appmini/old/baidu/pages/index/index.js
public/appmini/old/baidu/pages/index/index.js
+14
-11
public/appmini/old/baidu/project.swan.json
public/appmini/old/baidu/project.swan.json
+1
-1
未找到文件。
public/appmini/old/baidu/app.js
浏览文件 @
80cecc03
...
...
@@ -468,6 +468,19 @@ App({
}
return
false
;
},
/**
* 删除数组中空元素
*/
array_notempty
(
data
)
{
var
arr
=
[];
data
.
map
(
function
(
val
,
index
)
{
if
(
val
!==
""
&&
val
!=
undefined
)
{
arr
.
push
(
val
);
}
});
return
arr
;
}
});
\ No newline at end of file
public/appmini/old/baidu/pages/goods-category/goods-category.js
浏览文件 @
80cecc03
...
...
@@ -44,6 +44,9 @@ Page({
data_list_loding_status
:
data
.
length
==
0
?
0
:
3
,
data_bottom_line_status
:
true
});
// 页面信息设置
this
.
set_page_info
();
}
else
{
this
.
setData
({
data_list_loding_status
:
0
,
...
...
@@ -86,5 +89,16 @@ Page({
// 事件
category_event
(
e
)
{
swan
.
navigateTo
({
url
:
'
/pages/goods-search/goods-search?category_id=
'
+
e
.
currentTarget
.
dataset
.
value
});
}
},
// web页面信息设置
set_page_info
()
{
swan
.
setPageInfo
({
title
:
app
.
data
.
application_title
+
'
- 商品分类
'
,
keywords
:
app
.
data
.
application_describe
,
description
:
app
.
data
.
application_describe
,
image
:
(
this
.
data
.
data_list
.
length
==
0
)
?
[]
:
app
.
array_notempty
(
this
.
data
.
data_list
.
map
(
function
(
v
)
{
return
v
.
big_images
;})).
slice
(
0
,
3
)
});
},
});
\ No newline at end of file
public/appmini/old/baidu/pages/goods-detail/goods-detail.js
浏览文件 @
80cecc03
...
...
@@ -124,6 +124,9 @@ Page({
// 不能选择规格处理
this
.
goods_specifications_choose_handle_dont
(
0
);
// 页面信息设置
this
.
set_page_info
();
if
(
data
.
goods
.
is_shelves
!=
1
)
{
this
.
setData
({
nav_submit_text
:
'
商品已下架
'
,
...
...
@@ -647,6 +650,22 @@ Page({
desc
:
app
.
data
.
application_describe
,
path
:
'
/pages/goods-detail/goods-detail?share=goods-detail&goods_id=
'
+
this
.
data
.
goods
.
id
};
}
},
// web页面信息设置
set_page_info
()
{
swan
.
setPageInfo
({
title
:
this
.
data
.
goods
.
seo_title
||
this
.
data
.
goods
.
title
,
keywords
:
this
.
data
.
goods
.
seo_keywords
||
this
.
data
.
goods
.
simple_desc
||
this
.
data
.
goods
.
title
,
articleTitle
:
this
.
data
.
goods
.
title
,
description
:
this
.
data
.
goods
.
seo_desc
||
app
.
data
.
application_describe
,
image
:
this
.
data
.
goods_photo
.
map
(
function
(
v
)
{
return
v
.
images
;}).
slice
(
0
,
3
),
video
:
((
this
.
data
.
goods
.
video
||
null
)
==
null
)
?
[]
:
[{
url
:
this
.
data
.
goods
.
video
,
duration
:
'
100
'
,
image
:
this
.
data
.
goods
.
images
}]
});
},
});
\ No newline at end of file
public/appmini/old/baidu/pages/goods-search/goods-search.js
浏览文件 @
80cecc03
...
...
@@ -87,6 +87,11 @@ Page({
data_page
:
this
.
data
.
data_page
+
1
});
// 页面信息设置
if
(
post_data
[
'
page
'
]
==
1
)
{
this
.
set_page_info
();
}
// 是否还有数据
if
(
this
.
data
.
data_page
>
1
&&
this
.
data
.
data_page
>
this
.
data
.
data_page_total
)
{
this
.
setData
({
data_bottom_line_status
:
true
});
...
...
@@ -183,5 +188,16 @@ Page({
data_page
:
1
});
this
.
get_data_list
(
1
);
}
},
// web页面信息设置
set_page_info
()
{
swan
.
setPageInfo
({
title
:
app
.
data
.
application_title
+
'
- 商品搜索
'
,
keywords
:
app
.
data
.
application_describe
,
description
:
app
.
data
.
application_describe
,
image
:
(
this
.
data
.
data_list
.
length
==
0
)
?
[]
:
this
.
data
.
data_list
.
map
(
function
(
v
)
{
return
v
.
images
;}).
slice
(
0
,
3
)
});
},
});
\ No newline at end of file
public/appmini/old/baidu/pages/index/index.js
浏览文件 @
80cecc03
...
...
@@ -20,19 +20,9 @@ Page({
},
onShow
()
{
this
.
set_page_info
();
this
.
init
();
},
// web页面信息设置
set_page_info
()
{
swan
.
setPageInfo
({
title
:
app
.
data
.
application_title
,
keywords
:
app
.
data
.
application_describe
,
description
:
app
.
data
.
application_describe
,
});
},
// 获取数据列表
init
()
{
var
self
=
this
;
...
...
@@ -72,6 +62,9 @@ Page({
if
(
this
.
data
.
common_app_is_limitedtimediscount
==
1
&&
this
.
data
.
plugins_limitedtimediscount_data
!=
null
)
{
this
.
plugins_limitedtimediscount_countdown
();
}
// 页面信息设置
this
.
set_page_info
();
}
else
{
self
.
setData
({
data_list_loding_status
:
0
,
...
...
@@ -168,6 +161,16 @@ Page({
desc
:
app
.
data
.
application_describe
,
path
:
'
/pages/index/index?share=index
'
};
}
},
// web页面信息设置
set_page_info
()
{
swan
.
setPageInfo
({
title
:
app
.
data
.
application_title
,
keywords
:
app
.
data
.
application_describe
,
description
:
app
.
data
.
application_describe
,
image
:
(
this
.
data
.
banner_list
.
length
==
0
)
?
[]
:
this
.
data
.
banner_list
.
map
(
function
(
v
)
{
return
v
.
images_url
;}).
slice
(
0
,
3
)
});
},
});
\ No newline at end of file
public/appmini/old/baidu/project.swan.json
浏览文件 @
80cecc03
{
"appid"
:
"16634987"
,
"cloudTesting"
:{
"forcePreview"
:
false
},
"editor"
:{
"curPath"
:
""
,
"expands"
:[
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/popup"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/icon-nav"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/slider"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/lib"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/lib/online-service"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/badge"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user-address-save"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user-address"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail"
],
"paths"
:[]},
"host"
:
"baiduboxapp"
,
"preview"
:{
"packageId"
:
222699
},
"setting"
:{
"urlCheck"
:
false
},
"swan"
:{
"baiduboxapp"
:{
"extensionJsVersion"
:
""
,
"swanJsVersion"
:
"3.30.43"
}}}
\ No newline at end of file
{
"appid"
:
"16634987"
,
"cloudTesting"
:{
"forcePreview"
:
false
},
"editor"
:{
"curPath"
:
""
,
"expands"
:[
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/popup"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/icon-nav"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/slider"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/lib"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/lib/online-service"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/badge"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user-address-save"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user-address"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail"
],
"paths"
:[]},
"host"
:
"baiduboxapp"
,
"preview"
:{
"packageId"
:
222764
},
"setting"
:{
"urlCheck"
:
false
},
"swan"
:{
"baiduboxapp"
:{
"extensionJsVersion"
:
""
,
"swanJsVersion"
:
"3.30.43"
}}}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录