feat(custom): 新增商品详情分享
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jdt-user",
|
||||
"version": "3.0.9",
|
||||
"version": "3.0.10",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"templateInfo": {
|
||||
@@ -9,7 +9,7 @@
|
||||
"css": "sass"
|
||||
},
|
||||
"taroConfig": {
|
||||
"version": "3.0.9"
|
||||
"version": "3.0.10"
|
||||
},
|
||||
"scripts": {
|
||||
"build:weapp": "taro build --type weapp",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: "商品详情",
|
||||
navigationStyle: "custom",
|
||||
enableShareAppMessage: true,
|
||||
});
|
||||
|
||||
@@ -39,11 +39,17 @@
|
||||
</view>
|
||||
<view class="title">{{ goodInfo.name }}</view>
|
||||
<view class="sub">{{ goodInfo.profile }}</view>
|
||||
<nut-button size="small" type="primary" @click.stop="add_cart(goodInfo)">
|
||||
<template #icon>
|
||||
<Cart2 />
|
||||
</template>
|
||||
</nut-button>
|
||||
<view class="cartBox">
|
||||
<nut-button
|
||||
size="small"
|
||||
type="primary"
|
||||
@click.stop="add_cart(goodInfo)"
|
||||
>
|
||||
<template #icon>
|
||||
<Cart2 />
|
||||
</template>
|
||||
</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 产品介绍 -->
|
||||
<view class="rich-box">
|
||||
@@ -100,6 +106,12 @@ Taro.useLoad(async (options) => {
|
||||
});
|
||||
});
|
||||
|
||||
Taro.useShareAppMessage(() => ({
|
||||
title: `捷兑通-${goodInfo.value.name}`,
|
||||
path: `/pages/goods/goods_detail/index?gid=${goodInfo.value.gid}&type=1`,
|
||||
imageUrl: `https://${goodInfo.value.cover}`,
|
||||
}));
|
||||
|
||||
const get_good_detail = async (gid: string) => {
|
||||
try {
|
||||
const res = await getActiveGoodsDetail({ gid: gid });
|
||||
@@ -236,11 +248,10 @@ page {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.nut-button {
|
||||
// margin: 10px;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
bottom: 20rpx;
|
||||
.cartBox {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user