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