新增分享,找回密码,实名认证,签约
This commit is contained in:
@@ -22,7 +22,8 @@ Page({
|
||||
valueIndex : '', // 选中规格下标index
|
||||
specselectIndex : '',
|
||||
qtyNumber : 1, // 产品数量
|
||||
goodsSize : false
|
||||
goodsSize : false,
|
||||
invite : ''
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -30,7 +31,8 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
goodsId: options.id
|
||||
goodsId: options.id,
|
||||
invite : options.invite || ''
|
||||
})
|
||||
},
|
||||
|
||||
@@ -46,17 +48,23 @@ Page({
|
||||
* 商品详情
|
||||
*/
|
||||
goodsInfo() {
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
wx.$api.mall.goodsSee(this.data.goodsId).then(res => {
|
||||
console.log(res.data)
|
||||
this.setData({
|
||||
goodsData : res.data,
|
||||
mallContent : res.data.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"'),
|
||||
skus : res.data.skus,
|
||||
skuid : res.data.skus[0].sku_id,
|
||||
selectSkusValues: res.data.skus[0],
|
||||
specselect : res.data.skus[0].unit.split('|')
|
||||
specselect : res.data.skus[0].unit.split('|'),
|
||||
invite : res.data.invite
|
||||
})
|
||||
}).catch(err =>{})
|
||||
}).catch(err =>{}).finally(() => {
|
||||
wx.hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -245,5 +253,25 @@ Page({
|
||||
urls : imgs,
|
||||
current : imgs[index]
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 分享给朋友
|
||||
*/
|
||||
onShareAppMessage(){
|
||||
return{
|
||||
title : this.data.goodsData.name,
|
||||
path : '/pages/mall/details/details?id=' + this.data.goodsId + '&invite=' + this.data.invite,
|
||||
imageUrl: this.data.goodsData.cover
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 分享朋友圈
|
||||
*/
|
||||
onShareTimeline(){
|
||||
return{
|
||||
title : this.data.goodsData.name,
|
||||
query : '/pages/mall/details/details?id=' + this.data.goodsId + '&invite=' + this.data.invite,
|
||||
imageUrl : this.data.goodsData.cover
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -23,15 +23,14 @@
|
||||
<view class="goodsInfo-top">
|
||||
<view class="goodsInfo-price">
|
||||
<view class="goodsInfo-cost"><text>¥</text>{{goodsData.original_price}}</view>
|
||||
<!-- <view class="goodsInfo-vip"><text>会员价¥</text>99.00</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="goodsInfo-name">
|
||||
{{goodsData.name}}
|
||||
</view>
|
||||
<view class="goodsInfo-share" bindtap="shareTap">
|
||||
<button class="goodsInfo-share" size="mini" open-type="share">
|
||||
<image class="goodsInfo-share-image" src="/static/icons/goodsShare.png"></image>分享
|
||||
</view>
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="goodsWhite goodsItem">
|
||||
|
||||
@@ -103,7 +103,7 @@ page {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.goodsInfo-share {
|
||||
.goodsInfo-share[size="mini"] {
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
right: 30rpx;
|
||||
@@ -111,6 +111,8 @@ page {
|
||||
font-size: 27rpx;
|
||||
line-height: 34rpx;
|
||||
color: #9b9b9b;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.goodsInfo-share-image {
|
||||
|
||||
Reference in New Issue
Block a user