Commit 76438497 authored by Galen Zhao's avatar Galen Zhao Committed by linlinjava
Browse files

add share hidden func (#239)

parent 5fd62b13
...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; ...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.mysql.jdbc.StringUtils; import com.mysql.jdbc.StringUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; 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.util.ResponseUtil;
import org.linlinjava.litemall.core.validator.Order; import org.linlinjava.litemall.core.validator.Order;
import org.linlinjava.litemall.core.validator.Sort; import org.linlinjava.litemall.core.validator.Sort;
...@@ -185,6 +186,9 @@ public class WxGoodsController { ...@@ -185,6 +186,9 @@ public class WxGoodsController {
data.put("attribute", goodsAttributeListTask.get()); data.put("attribute", goodsAttributeListTask.get());
data.put("brand", brandCallableTask.get()); data.put("brand", brandCallableTask.get());
data.put("groupon", grouponRulesCallableTask.get()); data.put("groupon", grouponRulesCallableTask.get());
//SystemConfig.isAutoCreateShareImage()
data.put("share", SystemConfig.isAutoCreateShareImage());
} }
catch (Exception e) { catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -6,6 +6,7 @@ var user = require('../../utils/user.js'); ...@@ -6,6 +6,7 @@ var user = require('../../utils/user.js');
Page({ Page({
data: { data: {
canShare: false,
id: 0, id: 0,
goods: {}, goods: {},
groupon: [], //该商品支持的团购规格 groupon: [], //该商品支持的团购规格
...@@ -166,7 +167,8 @@ Page({ ...@@ -166,7 +167,8 @@ Page({
userHasCollect: res.data.userHasCollect, userHasCollect: res.data.userHasCollect,
shareImage: res.data.shareImage, shareImage: res.data.shareImage,
checkedSpecPrice: res.data.info.retailPrice, checkedSpecPrice: res.data.info.retailPrice,
groupon: res.data.groupon groupon: res.data.groupon,
canShare: res.data.share,
}); });
//如果是通过分享的团购参加团购,则团购项目应该与分享的一致并且不可更改 //如果是通过分享的团购参加团购,则团购项目应该与分享的一致并且不可更改
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<!-- 分享 --> <!-- 分享 -->
<view class='goods_name'> <view class='goods_name'>
<view class='goods_name_left'>{{goods.name}}</view> <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>
<view class="share-pop-box" hidden="{{!openShare}}"> <view class="share-pop-box" hidden="{{!openShare}}">
<view class="share-pop"> <view class="share-pop">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment