|
@@ -10,13 +10,6 @@
|
|
|
<link rel="stylesheet" type="text/css" href="css/mui.min.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="css/iconfont.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="css/main.css" />
|
|
|
- <script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
|
|
|
- <script>
|
|
|
- //屏蔽分享
|
|
|
-// document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
|
|
|
-// WeixinJSBridge.call('hideOptionMenu');
|
|
|
-// });
|
|
|
- </script>
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
@@ -96,8 +89,9 @@
|
|
|
<script src="js/mui.min.js"></script>
|
|
|
<script src="js/jquery-2.1.1.min.js"></script>
|
|
|
<script src="js/main.js"></script>
|
|
|
+ <script src="js/wechat-utils-1.0.js"></script>
|
|
|
<script>
|
|
|
- var productId = getParam("productId");
|
|
|
+ var productId = getParam("productId"),productName='',productRemark='';
|
|
|
console.log(productId);
|
|
|
|
|
|
mui.ready(function() {
|
|
@@ -156,11 +150,23 @@
|
|
|
|
|
|
var li = document.createElement('li');
|
|
|
li.className = 'mui-table-view-cell mui-media mui-col-xs-12';
|
|
|
- li.innerHTML = '<a href="#"><div class="index-pro-tit">'+productInfo.productName+'</div>'
|
|
|
+ var zen='';
|
|
|
+ if(productInfo.productColorList.length>0){
|
|
|
+ $.each(productInfo.productColorList[0].salesUserGiftList, function() {
|
|
|
+ zen += this.giftName + "、"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if(zen != '') {
|
|
|
+ zen = '<div class="details-title"><p><span class="iconfont icon-liwu"></span>' + zen.substring(0, zen.length - 1) + '</p></div>';
|
|
|
+ }
|
|
|
+ productName=productInfo.productName;
|
|
|
+ productRemark=productInfo.productRemark;
|
|
|
+ li.innerHTML = '<a><div class="index-pro-tit">'+productInfo.productName+'</div>'
|
|
|
+'<p class="mui-text-left">'+productInfo.productRemark+'<span style="float: right;color: #ff3b3b;">¥'+(productInfo.productDiscount/ 100).toFixed(2)+'</span></p></a>'
|
|
|
- +'<div class="index-title"><p><span class="iconfont icon-liwu"></span>美国aiberle咖啡杯、美国aiberle加湿器</p></div></br>'
|
|
|
- +'<a href="#"><img class="mui-media-object" src="'+productInfo.productIntroduceImg+'"></a>';
|
|
|
+ +zen+'</br>'
|
|
|
+ +'<a><img class="mui-media-object" src="'+productInfo.productIntroduceImg+'"></a>';
|
|
|
table.appendChild(li);
|
|
|
+ fenxiang();
|
|
|
} else {
|
|
|
mui.alert("获取数据失败!");
|
|
|
}
|
|
@@ -362,6 +368,24 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ //分享
|
|
|
+ function fenxiang(){
|
|
|
+ var src = location.href;
|
|
|
+ src = "https://s.iamberry.com/aiberle/wechat/pro-details.html?productId="+productId;
|
|
|
+ window.wxFriend = {
|
|
|
+ "appId": "",
|
|
|
+ "imgUrl": 'https://s.iamberry.com/aiberle/wechat/images/indexShare.jpg',
|
|
|
+ "link": src,
|
|
|
+ "desc": productRemark,
|
|
|
+ "title": 'Aiberle爱贝源-'+productName,
|
|
|
+ "netError": "您的网络异常,请刷新重试!如多次刷新无效,请向我们反应 ~",
|
|
|
+ "shareTimeSuccess": "分享成功",
|
|
|
+ "shareTimeCancel": "已取消分享",
|
|
|
+ "shareAppSuccess": "分享成功!",
|
|
|
+ "shareAppCancel": "已取消分享"
|
|
|
+ };
|
|
|
+ getConfig();
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
|