Skip to content

Commit

Permalink
add share hidden func (linlinjava#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
galenzhao authored and linlinjava committed Jul 24, 2019
1 parent 39526de commit 7c79d2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.mysql.jdbc.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.linlinjava.litemall.core.system.SystemConfig;
import org.linlinjava.litemall.core.util.ResponseUtil;
import org.linlinjava.litemall.core.validator.Order;
import org.linlinjava.litemall.core.validator.Sort;
Expand Down Expand Up @@ -185,6 +186,9 @@ public Object detail(@LoginUser Integer userId, @NotNull Integer id) {
data.put("attribute", goodsAttributeListTask.get());
data.put("brand", brandCallableTask.get());
data.put("groupon", grouponRulesCallableTask.get());
//SystemConfig.isAutoCreateShareImage()
data.put("share", SystemConfig.isAutoCreateShareImage());

}
catch (Exception e) {
e.printStackTrace();
Expand Down
4 changes: 3 additions & 1 deletion litemall-wx/pages/goods/goods.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var user = require('../../utils/user.js');

Page({
data: {
canShare: false,
id: 0,
goods: {},
groupon: [], //该商品支持的团购规格
Expand Down Expand Up @@ -166,7 +167,8 @@ Page({
userHasCollect: res.data.userHasCollect,
shareImage: res.data.shareImage,
checkedSpecPrice: res.data.info.retailPrice,
groupon: res.data.groupon
groupon: res.data.groupon,
canShare: res.data.share,
});

//如果是通过分享的团购参加团购,则团购项目应该与分享的一致并且不可更改
Expand Down
2 changes: 1 addition & 1 deletion litemall-wx/pages/goods/goods.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- 分享 -->
<view class='goods_name'>
<view class='goods_name_left'>{{goods.name}}</view>
<view class="goods_name_right" bindtap="shareFriendOrCircle">分享</view>
<view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle">分享</view>
</view>
<view class="share-pop-box" hidden="{{!openShare}}">
<view class="share-pop">
Expand Down

0 comments on commit 7c79d2c

Please sign in to comment.