新增分享,找回密码,实名认证,签约

This commit is contained in:
唐明明
2023-08-25 14:04:31 +08:00
parent 32cc588ae7
commit 0f7c37d548
106 changed files with 2130 additions and 1313 deletions

View File

@@ -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
}
}
})

View File

@@ -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">

View File

@@ -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 {