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
5d2884d6
Commit
5d2884d6
authored
Sep 27, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
种草触点header带参
parent
9d2288bf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
50 deletions
+13
-50
productDetail.js
src/pages/productDetail/productDetail.js
+2
-0
wantToBuyDetail.js
src/pages/wantToBuyDetail/wantToBuyDetail.js
+1
-4
friendShareList.js
src/subPackage/page/pages/friendShareList/friendShareList.js
+3
-40
friendShareList.wxml
...ubPackage/page/pages/friendShareList/friendShareList.wxml
+4
-4
Http.js
src/utils/Http.js
+2
-2
wxService.js
src/utils/wxService.js
+1
-0
No files found.
src/pages/productDetail/productDetail.js
View file @
5d2884d6
...
...
@@ -273,6 +273,7 @@ wxService.page({
// 加入购物车
this
.
getPutCart
(
trolleySku
)
}
else
if
(
this
.
data
.
showSkuPopupType
==
'buy'
)
{
console
.
log
(
'buy'
)
// 关闭弹框
this
.
setData
({
showSkuPopup
:
false
...
...
@@ -285,6 +286,7 @@ wxService.page({
trolleySku2Buy
:
JSON
.
stringify
(
trolleySku2Buy
)
}
const
{
fromZc
}
=
this
.
data
console
.
log
(
'fromZc'
,
fromZc
)
//判断是否从种草商品过来购买
if
(
fromZc
)
{
wxService
.
updateLocalTentacleInfo
();
...
...
src/pages/wantToBuyDetail/wantToBuyDetail.js
View file @
5d2884d6
...
...
@@ -123,8 +123,8 @@ wxService.page({
//存储
var
timestamp
=
Date
.
parse
(
new
Date
())
var
expiration
=
timestamp
+
1800000
wx
.
setStorageSync
(
'TEMP_TENTACLE_INFO'
,
tempObj
);
wx
.
setStorageSync
(
'TIME_EXPIRATION'
,
expiration
);
wx
.
setStorageSync
(
'TEMP_TENTACLE_INFO'
,
tempObj
);
wxService
.
router
(
`/pages/productDetail/productDetail?id=
${
productId
}
&fromZc=1`
);
},
...
...
@@ -194,9 +194,6 @@ wxService.page({
//获取内容下商品列表
getProList
(){
var
params
=
{
productIds
:
this
.
data
.
contentInfo
.
productIds
}
...
...
src/subPackage/page/pages/friendShareList/friendShareList.js
View file @
5d2884d6
...
...
@@ -64,45 +64,20 @@ wxService.page({
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
let
productIds
=
[]
for
(
var
i
in
data
.
spreadProducts
){
if
(
data
.
spreadProducts
[
i
].
id
){
productIds
.
push
(
data
.
spreadProducts
[
i
].
id
)
}
}
this
.
getByIdExtendProList
(
productIds
)
}
}).
finally
(()
=>
{
})
},
// 根据商品id,获取商品列表
getByIdExtendProList
(
productIds
){
let
params
=
{
productIds
:
productIds
}
wxService
.
post
(
`/sale/product/buyer/listPage?pageNo=
${
this
.
data
.
pageNo
}
&pageSize=
${
this
.
data
.
pageSize
}
`
,
params
).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
&&
data
.
content
)
{
this
.
setData
({
proList
:
data
.
content
proList
:
data
})
for
(
var
i
in
data
.
content
){
this
.
data
.
sharePicData
.
push
(
data
.
content
[
i
].
indexUrl
)
for
(
var
i
in
data
)
{
this
.
data
.
sharePicData
.
push
(
data
[
i
].
imgUrl
)
this
.
setData
({
sharePicData
:
this
.
data
.
sharePicData
})
}
console
.
log
(
this
.
data
.
sharePicData
)
}
}).
finally
(()
=>
{
})
},
/**
* 用户点击右上角分享
*/
...
...
@@ -113,18 +88,6 @@ wxService.page({
item
.
id
=
item
.
productId
})
// wxService.getTentacleContent(tentacleInfo).then(res => {
// if (res && res.tentacleId) {
// let id = Integer.digit(this.data.id, 10, 64);
// let tentacleId = Integer.digit(res.tentacleId, 10, 64);
// var path = `subPackage/page/pages/friendShareList/friendShareList?id=${id}&t=${tentacleId}`;
// console.log(path)
// return {
// path: path
// }
// }
// });
//修改为参数memberId
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
var
path
=
`subPackage/page/pages/friendShareList/friendShareList`
;
...
...
src/subPackage/page/pages/friendShareList/friendShareList.wxml
View file @
5d2884d6
...
...
@@ -21,16 +21,16 @@
<view class="buy-product-wrap">
<view class="buy-product-content">
<block wx:for="{{proList}}" wx:key="{{index}}">
<navigator hover-class="none" url="/pages/productDetail/productDetail?id={{item.
productI
d}}">
<navigator hover-class="none" url="/pages/productDetail/productDetail?id={{item.
i
d}}">
<view class="buy-list" data-item="{{contentInfo}}" data-productid="{{item.productId}}">
<view class="prod-img">
<image src="{{item.i
ndex
Url}}" />
<image src="{{item.i
mg
Url}}" />
</view>
<view class="prod-info">
<view class="prod-name">{{item.
productN
ame}}</view>
<view class="prod-name">{{item.
n
ame}}</view>
<!-- <view class="sale-btn">限时特价</view> -->
<view class="bottom-price">
<text class="price">¥{{utils.numberFormat(item.
minSalePrice / 100
)}}</text>
<text class="price">¥{{utils.numberFormat(item.
price
)}}</text>
<!-- <text class="cost-price">¥456</text> -->
<view class="look-over">查看详情</view>
</view>
...
...
src/utils/Http.js
View file @
5d2884d6
...
...
@@ -224,8 +224,8 @@ class Http {
wx
.
setStorageSync
(
'TIME_EXPIRATION'
,
time
+
30
*
60
*
1000
);
return
JSON
.
stringify
(
tentacle
);
}
else
{
wx
.
removeStorageSync
(
'TENTACLE_CONTENT'
)
wx
.
removeStorageSync
(
'TIME_EXPIRATION'
)
//
wx.removeStorageSync('TENTACLE_CONTENT')
//
wx.removeStorageSync('TIME_EXPIRATION')
}
return
JSON
.
stringify
(
null
);
...
...
src/utils/wxService.js
View file @
5d2884d6
...
...
@@ -317,6 +317,7 @@ class WXService extends Http {
//判断tentacleInfo是否为空
if
(
!
tentacleInfo
)
{
wx
.
setStorageSync
(
'TENTACLE_CONTENT'
,
tempTentacleInfo
);
console
.
log
(
'TENTACLE_CONTENT'
,
wx
.
getStorageSync
(
'TENTACLE_CONTENT'
))
return
;
}
//tentacleInfo 不为空
...
...
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