Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
9ae4544b
Commit
9ae4544b
authored
Mar 15, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优化功能
parent
4e862ab0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
9 deletions
+36
-9
wxHtml.js
src/component/html2wxml/wxHtml.js
+1
-2
index.js
src/config/index.js
+2
-2
productDetail.js
src/pages/productDetail/productDetail.js
+23
-2
project.config.json
src/project.config.json
+9
-2
index.js
src/wxParser/index.js
+1
-1
No files found.
src/component/html2wxml/wxHtml.js
View file @
9ae4544b
...
@@ -46,11 +46,10 @@ Component({
...
@@ -46,11 +46,10 @@ Component({
bind
:
'richText'
,
bind
:
'richText'
,
html
:
this
.
data
.
html
||
``
,
html
:
this
.
data
.
html
||
``
,
target
:
this
,
target
:
this
,
enablePreviewImage
:
fals
e
,
// 禁用图片预览功能
enablePreviewImage
:
tru
e
,
// 禁用图片预览功能
tapLink
:
(
url
)
=>
{
// 点击超链接时的回调函数
tapLink
:
(
url
)
=>
{
// 点击超链接时的回调函数
// url 就是 HTML 富文本中 a 标签的 href 属性值
// url 就是 HTML 富文本中 a 标签的 href 属性值
// 这里可以自定义点击事件逻辑,比如页面跳转
// 这里可以自定义点击事件逻辑,比如页面跳转
console
.
log
(
url
)
if
(
url
){
if
(
url
){
//跳转到web页面
//跳转到web页面
if
(
url
.
indexOf
(
'http:'
)
>
-
1
||
url
.
indexOf
(
'https'
)
>
-
1
){
if
(
url
.
indexOf
(
'http:'
)
>
-
1
||
url
.
indexOf
(
'https'
)
>
-
1
){
...
...
src/config/index.js
View file @
9ae4544b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
// 修改 BRANCH_ID 为对应的商户id
// 修改 BRANCH_ID 为对应的商户id
// app.js 中brandId 修改为对应
// app.js 中brandId 修改为对应
const
PROJECT_ENV
=
'
prod
'
// 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
const
PROJECT_ENV
=
'
test
'
// 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
//仅生产环境时 配置 :
//仅生产环境时 配置 :
//3001 3001 , wx313ec36b710125d4
//3001 3001 , wx313ec36b710125d4
//2006 泰华 , wx40fec8944623c8b3
//2006 泰华 , wx40fec8944623c8b3
...
@@ -23,7 +23,7 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门
...
@@ -23,7 +23,7 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门
//2017 ACTREE wx2aae34874e88cdf5
//2017 ACTREE wx2aae34874e88cdf5
//2992 山东盛联微商城 wx53dedc202ae0d0c2
//2992 山东盛联微商城 wx53dedc202ae0d0c2
const
BRANCH_ID
=
2010
const
BRANCH_ID
=
1002
const
isMall
=
true
const
isMall
=
true
// const needMock = '' //
// const needMock = '' //
...
...
src/pages/productDetail/productDetail.js
View file @
9ae4544b
...
@@ -167,7 +167,6 @@ wxService.page({
...
@@ -167,7 +167,6 @@ wxService.page({
title
:
'加载中'
title
:
'加载中'
})
})
//获取商品详情
//获取商品详情
console
.
log
(
'productId-----'
,
this
.
data
.
productId
)
wxService
.
get
(
`/sale/product/buyer/findByProductId?productId=
${
this
.
data
.
productId
}
`
).
then
(
res
=>
{
wxService
.
get
(
`/sale/product/buyer/findByProductId?productId=
${
this
.
data
.
productId
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
...
@@ -175,12 +174,34 @@ wxService.page({
...
@@ -175,12 +174,34 @@ wxService.page({
data
.
type
=
'share'
;
data
.
type
=
'share'
;
this
.
setData
({
this
.
setData
({
productInfo
:
data
productInfo
:
data
})
},()
=>
{
this
.
getUncacheStock
();
});
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
})
})
},
},
//刷新最新商品库存信息
getUncacheStock
(){
//获取商品详情
wxService
.
get
(
`/sale/product/buyer/findDtoByProductId?productId=
${
this
.
data
.
productId
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
data
){
this
.
data
.
productInfo
.
stock
=
data
.
stock
;
this
.
data
.
productInfo
.
productSku
=
data
.
productSku
;
if
(
data
.
descHtml
){
this
.
data
.
productInfo
.
descHtml
=
data
.
descHtml
;
}
this
.
setData
({
productInfo
:
this
.
data
.
productInfo
})
}
}
}).
finally
(()
=>
{})
},
// 获取会员等级开关
// 获取会员等级开关
getMemberLevel
()
{
getMemberLevel
()
{
...
...
src/project.config.json
View file @
9ae4544b
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
},
},
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.8.2"
,
"libVersion"
:
"2.8.2"
,
"appid"
:
"wx
e6d270a3e399ade9
"
,
"appid"
:
"wx
ac09792264c49b5c
"
,
"projectname"
:
"%E5%BE%AE%E5%95%86%E5%9F%8E"
,
"projectname"
:
"%E5%BE%AE%E5%95%86%E5%9F%8E"
,
"debugOptions"
:
{
"debugOptions"
:
{
"hidedInDevtools"
:
[]
"hidedInDevtools"
:
[]
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
16
,
"current"
:
80
,
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
...
@@ -581,6 +581,13 @@
...
@@ -581,6 +581,13 @@
"pathName"
:
"subPackageA/page/pages/shareArticle/shareArticle"
,
"pathName"
:
"subPackageA/page/pages/shareArticle/shareArticle"
,
"query"
:
""
,
"query"
:
""
,
"scene"
:
null
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"分类下商品列表"
,
"pathName"
:
"subPackage/page/pages/categoryPro/categoryPro"
,
"query"
:
"id=659088011908222976&name=盖浇饭哦"
,
"scene"
:
null
}
}
]
]
}
}
...
...
src/wxParser/index.js
View file @
9ae4544b
...
@@ -33,7 +33,7 @@ const parse = ({ bind = 'wxParserData', html, target, enablePreviewImage = true,
...
@@ -33,7 +33,7 @@ const parse = ({ bind = 'wxParserData', html, target, enablePreviewImage = true,
return
return
}
}
let
src
=
e
.
target
.
dataset
.
src
let
src
=
e
.
target
.
dataset
.
src
let
tagFrom
=
e
.
target
.
dataset
.
from
let
tagFrom
=
e
.
target
.
dataset
.
from
;
if
(
typeof
(
tagFrom
)
!==
'undefined'
&&
tagFrom
.
length
>
0
)
{
if
(
typeof
(
tagFrom
)
!==
'undefined'
&&
tagFrom
.
length
>
0
)
{
wx
.
previewImage
({
wx
.
previewImage
({
current
:
src
,
// 当前显示图片的 http 链接
current
:
src
,
// 当前显示图片的 http 链接
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment