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
681ddb8a
Commit
681ddb8a
authored
Aug 21, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zyw-sc' into 'dev_7.1.0'
Feature zyw sc See merge request
!78
parents
999b9cf4
27bc66e2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
62 deletions
+104
-62
waterFlowLayout.js
src/component/waterFlowLayout/waterFlowLayout.js
+2
-33
waterFlowLayout.wxml
src/component/waterFlowLayout/waterFlowLayout.wxml
+1
-1
myShare.js
src/pages/myShare/myShare.js
+40
-1
myShare.wxml
src/pages/myShare/myShare.wxml
+6
-1
wantToBuyDetail.js
src/pages/wantToBuyDetail/wantToBuyDetail.js
+47
-5
wantToBuyDetail.wxml
src/pages/wantToBuyDetail/wantToBuyDetail.wxml
+8
-21
No files found.
src/component/waterFlowLayout/waterFlowLayout.js
View file @
681ddb8a
...
...
@@ -25,44 +25,13 @@ Component({
*/
methods
:
{
onTapLike
(
e
){
console
.
log
(
e
)
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
var
params
=
{
let
params
=
{
contentId
:
e
.
currentTarget
.
dataset
.
id
,
type
:
e
.
currentTarget
.
dataset
.
type
,
userId
:
memberId
}
if
(
!
e
.
currentTarget
.
dataset
.
type
){
wxService
.
post
(
`/merchant/contentMobileTerminal/operationSave`
,
params
).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
showToast
({
title
:
'点赞成功'
,
icon
:
'none'
})
}
}).
finally
(()
=>
{
})
}
else
{
wxService
.
post
(
`/merchant/contentMobileTerminal/operationDelete`
,
{
contentId
:
e
.
currentTarget
.
dataset
.
id
,
userId
:
memberId
}).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
showToast
({
title
:
'取消点赞成功'
,
icon
:
'none'
})
}
}).
finally
(()
=>
{
})
}
this
.
triggerEvent
(
'updataLike'
,
params
)
},
//详情
...
...
src/component/waterFlowLayout/waterFlowLayout.wxml
View file @
681ddb8a
...
...
@@ -19,7 +19,7 @@
<view class="item-title">{{headline}}</view>
</view>
<view class="share-wrap">
<view class="share-oprate"
bind
tap="onTapLike" data-id="{{id}}" data-type="{{type}}">
<view class="share-oprate"
catch
tap="onTapLike" data-id="{{id}}" data-type="{{type}}">
<image class="share-img" src="{{type ? '/assets/imgs/heart-primary.png' : '/assets/imgs/heart-default.png'}}"></image>
<text class="share-number">{{enjoySum || 0}}</text>
</view> <view class="share-oprate">
...
...
src/pages/myShare/myShare.js
View file @
681ddb8a
...
...
@@ -150,7 +150,7 @@ wxService.page({
currentTab
:
data
[
0
].
id
})
getContentList
(
data
[
0
].
id
)
this
.
getContentList
(
data
[
0
].
id
)
}
}).
finally
(()
=>
{
...
...
@@ -182,6 +182,45 @@ wxService.page({
}).
finally
(()
=>
{
})
},
// 点赞
gotoLike
(
e
){
console
.
log
(
e
.
detail
)
let
params
=
e
.
detail
if
(
!
e
.
detail
.
type
){
wxService
.
post
(
`/merchant/contentMobileTerminal/operationSave`
,
params
).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
showToast
({
title
:
'点赞成功'
,
icon
:
'none'
})
this
.
getContentList
(
this
.
data
.
currentTab
)
}
}).
finally
(()
=>
{
})
}
else
{
wxService
.
post
(
`/merchant/contentMobileTerminal/operationDelete`
,
{
contentId
:
e
.
detail
.
contentId
,
userId
:
e
.
detail
.
userId
}).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
showToast
({
title
:
'取消点赞成功'
,
icon
:
'none'
})
this
.
getContentList
(
this
.
data
.
currentTab
)
}
}).
finally
(()
=>
{
})
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
...
...
src/pages/myShare/myShare.wxml
View file @
681ddb8a
...
...
@@ -8,10 +8,15 @@
</view>
<scroll-view scroll-y >
<view class="main-content" wx:if="{{contentList.length > 0}}">
<water-flow-layout image-data="{{contentList}}"/>
<water-flow-layout image-data="{{contentList}}"
bind:updataLike="gotoLike"
/>
</view>
<view class="empty" wx:if="{{!contentList || contentList.length < 1}}">
暂无内容哦~
</view>
</scroll-view>
</view>
src/pages/wantToBuyDetail/wantToBuyDetail.js
View file @
681ddb8a
...
...
@@ -12,7 +12,7 @@ wxService.page({
contentInfo
:[],
id
:
''
,
pageNo
:
1
,
pageSize
:
3
0
,
pageSize
:
10
0
,
proList
:[]
},
...
...
@@ -55,17 +55,59 @@ wxService.page({
var
params
=
{
productIds
:
this
.
data
.
contentInfo
.
productIds
}
wxService
.
post
(
`/sale/product/buyer/listPage
ByCategoryId
?pageNo=
${
this
.
data
.
pageNo
}
&pageSize=
${
this
.
data
.
pageSize
}
`
,
params
).
then
(
res
=>
{
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
)
{
if
(
result
==
0
&&
data
.
content
)
{
this
.
setData
({
proList
:
data
proList
:
data
.
content
})
}
}).
finally
(()
=>
{
})
},
// 点赞
gotoLike
(){
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
params
=
{
contentId
:
this
.
data
.
contentInfo
.
id
,
type
:
this
.
data
.
contentInfo
.
currentType
,
userId
:
memberId
}
if
(
!
this
.
data
.
contentInfo
.
currentType
)
{
wxService
.
post
(
`/merchant/contentMobileTerminal/operationSave`
,
params
).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
showToast
({
title
:
'点赞成功'
,
icon
:
'none'
})
this
.
getContentList
(
this
.
data
.
currentTab
)
}
}).
finally
(()
=>
{
})
}
else
{
wxService
.
post
(
`/merchant/contentMobileTerminal/operationDelete`
,
{
contentId
:
this
.
data
.
contentInfo
.
id
,
userId
:
memberId
}).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
showToast
({
title
:
'取消点赞成功'
,
icon
:
'none'
})
this
.
getContentList
(
this
.
data
.
currentTab
)
}
}).
finally
(()
=>
{
})
}
}
...
...
src/pages/wantToBuyDetail/wantToBuyDetail.wxml
View file @
681ddb8a
...
...
@@ -7,7 +7,7 @@
<view class="buy-desc">
<view>{{contentInfo.describe}}</view>
<view class="share-wrap">
<view class="share-oprate">
<view class="share-oprate"
bindtap="gotoLike"
>
<image class="share-img" src="{{contentInfo.currentType ? '/assets/imgs/heart-primary.png' : '/assets/imgs/heart-default.png'}}"></image>
<text class="share-number">{{contentInfo.enjoySum || 0}}</text>
</view>
...
...
@@ -20,34 +20,21 @@
</view>
<view class="buy-product-wrap">
<view class="buy-product-content">
<view class="buy-list">
<view class="prod-img">
<image src="/assets/imgs/avatar.png"></image>
</view>
<view class="prod-info">
<view class="prod-name">商品名称商品名称商品名称商品名称商品名称</view>
<view class="sale-btn">限时特价</view>
<view class="bottom-price">
<text class="price">¥299</text>
<text class="cost-price">¥456</text>
<view class="look-over">查看详情</view>
</view>
</view>
</view>
<view class="buy-list">
<view class="buy-list" wx:for="{{proList}}" wx:key="{{index}}">
<view class="prod-img">
<image src="
/assets/imgs/avatar.png
"></image>
<image src="
{{item.indexUrl}}
"></image>
</view>
<view class="prod-info">
<view class="prod-name">
商品名称商品名称商品名称商品名称商品名称
</view>
<
view class="sale-btn">限时特价</view
>
<view class="prod-name">
{{item.productName}}
</view>
<
!-- <view class="sale-btn">限时特价</view> --
>
<view class="bottom-price">
<text class="price">¥
299
</text>
<
text class="cost-price">¥456</text
>
<text class="price">¥
{{item.minSalePrice}}
</text>
<
!-- <text class="cost-price">¥456</text> --
>
<view class="look-over">查看详情</view>
</view>
</view>
</view>
</view>
</view>
...
...
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