feat: 分享设置
This commit is contained in:
16
dist/common.wxss
vendored
16
dist/common.wxss
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
/*! ../../../../utils/index */
|
/*! ../../../../utils/index */
|
||||||
|
|
||||||
|
/*! ../wxs/utils */
|
||||||
|
|
||||||
|
/*! ./../popup */
|
||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
|
||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
|
||||||
@@ -12,18 +16,30 @@
|
|||||||
|
|
||||||
/*! ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
/*! ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
|
||||||
|
|
||||||
|
/*! ./options */
|
||||||
|
|
||||||
|
/*! ./wxs */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/button */
|
/*! @antmjs/vantui/es/button */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/cell */
|
/*! @antmjs/vantui/es/cell */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/dialog */
|
/*! @antmjs/vantui/es/dialog */
|
||||||
|
|
||||||
|
/*! @antmjs/vantui/es/icon */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/image */
|
/*! @antmjs/vantui/es/image */
|
||||||
|
|
||||||
|
/*! @antmjs/vantui/es/share-sheet */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/skeleton */
|
/*! @antmjs/vantui/es/skeleton */
|
||||||
|
|
||||||
/*! @antmjs/vantui/es/toast */
|
/*! @antmjs/vantui/es/toast */
|
||||||
|
|
||||||
|
/*! @babel/runtime/helpers/defineProperty */
|
||||||
|
|
||||||
|
/*! @babel/runtime/helpers/objectWithoutProperties */
|
||||||
|
|
||||||
/*! @tarojs/components */
|
/*! @tarojs/components */
|
||||||
|
|
||||||
/*! @tarojs/runtime */
|
/*! @tarojs/runtime */
|
||||||
@@ -38,10 +54,22 @@
|
|||||||
|
|
||||||
/*! react/jsx-runtime */
|
/*! react/jsx-runtime */
|
||||||
|
|
||||||
|
/*!***********************************************************!*\
|
||||||
|
!*** ./node_modules/@antmjs/vantui/es/share-sheet/wxs.js ***!
|
||||||
|
\***********************************************************/
|
||||||
|
|
||||||
|
/*!*************************************************************!*\
|
||||||
|
!*** ./node_modules/@antmjs/vantui/es/share-sheet/index.js ***!
|
||||||
|
\*************************************************************/
|
||||||
|
|
||||||
/*!*************************************************************!*\
|
/*!*************************************************************!*\
|
||||||
!*** ./src/pages/activityList/components/details/index.tsx ***!
|
!*** ./src/pages/activityList/components/details/index.tsx ***!
|
||||||
\*************************************************************/
|
\*************************************************************/
|
||||||
|
|
||||||
|
/*!***************************************************************!*\
|
||||||
|
!*** ./node_modules/@antmjs/vantui/es/share-sheet/options.js ***!
|
||||||
|
\***************************************************************/
|
||||||
|
|
||||||
/*!***************************************************************************************************************************************************************************!*\
|
/*!***************************************************************************************************************************************************************************!*\
|
||||||
!*** ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/activityList/components/details/index.tsx ***!
|
!*** ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/activityList/components/details/index.tsx ***!
|
||||||
\***************************************************************************************************************************************************************************/
|
\***************************************************************************************************************************************************************************/
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
/*!****************************************************************************************************************************************************************************************************************************!*\
|
||||||
|
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].oneOf[0].use[2]!./node_modules/@antmjs/vantui/es/share-sheet/index.css ***!
|
||||||
|
\****************************************************************************************************************************************************************************************************************************/
|
||||||
|
.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom::after,.van-hairline--left::after,.van-hairline--right::after,.van-hairline--surround::after,.van-hairline--top-bottom::after,.van-hairline--top::after,.van-hairline::after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #ebedf0;-webkit-transform:scale(.5);transform:scale(.5)}.van-share-sheet__options{position:relative;display:-webkit-flex;display:flex;padding:32rpx 0 32rpx 16rpx;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.van-share-sheet__options--border::before{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:' ';pointer-events:none;top:0;right:0;left:32rpx;border-top:1PX solid #ebedf0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-user-select:none;user-select:none}.van-share-sheet__option:active{opacity:.7}.van-share-sheet__button{height:auto;padding:0;line-height:inherit;background-color:transparent;border:0}.van-share-sheet__button::after{border:0}.van-share-sheet__icon{width:96rpx;height:96rpx;margin:0 32rpx}.van-share-sheet__name{margin-top:16rpx;padding:0 8rpx;color:#646566;font-size:24rpx}.van-share-sheet__option-description{padding:0 8rpx;color:#c8c9cc;font-size:24rpx}.van-share-sheet__header{padding:24rpx 32rpx 8rpx;text-align:center}.van-share-sheet__title{margin-top:16rpx;color:#323233;font-weight:400;font-size:28rpx;line-height:40rpx}.van-share-sheet__title:empty{display:none}.van-share-sheet__title:not(:empty)+.van-share-sheet__title{display:none}.van-share-sheet__description{display:block;margin-top:16rpx;color:#969799;font-size:24rpx;line-height:32rpx}.van-share-sheet__description:empty{display:none}.van-share-sheet__description:not(:empty)+.van-share-sheet__description{display:none}.van-share-sheet__cancel{display:block;box-sizing:content-box;width:100%;height:auto;padding:0;font-size:32rpx;line-height:96rpx;text-align:center;background:#fff;border:none}.van-share-sheet__cancel::before{display:block;height:16rpx;background-color:#f7f8fa;content:' '}.van-share-sheet__cancel::after{display:none}.van-share-sheet__cancel:active{background-color:#f2f3f5}
|
||||||
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||||
!*** css ./node_modules/cache-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[3]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[5]!./src/pages/activityList/components/details/index.scss ***!
|
!*** css ./node_modules/cache-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[3]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[5]!./src/pages/activityList/components/details/index.scss ***!
|
||||||
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||||
@@ -52,3 +56,19 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
}
|
}
|
||||||
|
.share {
|
||||||
|
padding: 20rpx;
|
||||||
|
color: #52c41a;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-webkit-flex-direction: row-reverse;
|
||||||
|
-ms-flex-direction: row-reverse;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
-ms-flex-align: center;
|
||||||
|
align-items: center;
|
||||||
|
-webkit-justify-content: space-between;
|
||||||
|
-ms-flex-pack: justify;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|||||||
2
dist/pages/home/index.js
vendored
2
dist/pages/home/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -3,8 +3,7 @@
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
|
|
||||||
|
.RichText {
|
||||||
.RichText{
|
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
}
|
}
|
||||||
@@ -21,19 +20,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.imagesArr {
|
||||||
.imagesArr{
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// justify-content: space-between;
|
// justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wechatCode{
|
.wechatCode {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 60px;
|
margin-bottom: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.share {
|
||||||
|
padding: 20px;
|
||||||
|
color: #52c41a;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
import { Button, Cell, Dialog, Skeleton, Toast } from "@antmjs/vantui";
|
import {
|
||||||
|
Button,
|
||||||
|
Cell,
|
||||||
|
Dialog,
|
||||||
|
Icon,
|
||||||
|
ShareSheet,
|
||||||
|
Skeleton,
|
||||||
|
Toast,
|
||||||
|
} from "@antmjs/vantui";
|
||||||
import { Input, RichText, View } from "@tarojs/components";
|
import { Input, RichText, View } from "@tarojs/components";
|
||||||
import Taro, { getCurrentInstance, useShareTimeline } from "@tarojs/taro";
|
import Taro, { getCurrentInstance, useShareTimeline } from "@tarojs/taro";
|
||||||
import react, { useEffect, useState } from "react";
|
import react, { useEffect, useState } from "react";
|
||||||
@@ -30,9 +38,21 @@ const details = () => {
|
|||||||
|
|
||||||
const [show, setShow] = react.useState(false);
|
const [show, setShow] = react.useState(false);
|
||||||
const [canelshow, setcanelshow] = react.useState(false);
|
const [canelshow, setcanelshow] = react.useState(false);
|
||||||
|
const [showShare, setshowShare] = react.useState(false)
|
||||||
|
|
||||||
const [value, setValue] = react.useState("");
|
const [value, setValue] = react.useState("");
|
||||||
|
|
||||||
|
Taro.useShareAppMessage((res) => {
|
||||||
|
if (res.from === "button") {
|
||||||
|
// 来自页面内转发按钮
|
||||||
|
console.log(res.target);
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
title: "活动详情",
|
||||||
|
path: `/pages/activityList/components/details/index?id=${id}`,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (status === "1" || detailStatus !== "1") {
|
if (status === "1" || detailStatus !== "1") {
|
||||||
setdisable(true);
|
setdisable(true);
|
||||||
@@ -51,8 +71,8 @@ const details = () => {
|
|||||||
// 分享到朋友圈
|
// 分享到朋友圈
|
||||||
useShareTimeline(() => {
|
useShareTimeline(() => {
|
||||||
return {
|
return {
|
||||||
title: "分享朋友圈", //字符串 自定义标题
|
title: "一起来玩吧", //字符串 自定义标题
|
||||||
// query: `id=${this.data.shop.shop_id}`, //页面携带参数
|
query: `id=${id}`, //页面携带参数
|
||||||
// imageUrl: moments //图片地址
|
// imageUrl: moments //图片地址
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -471,6 +491,30 @@ const details = () => {
|
|||||||
{/* 调试按钮 */}
|
{/* 调试按钮 */}
|
||||||
{/* <Cell title="组件调用" onClick={() => setShow(true)} /> */}
|
{/* <Cell title="组件调用" onClick={() => setShow(true)} /> */}
|
||||||
|
|
||||||
|
<View className="share" onClick={() => setshowShare(true)}>
|
||||||
|
<Icon name="share" size="32px" className="icon"></Icon>
|
||||||
|
</View>
|
||||||
|
<View>
|
||||||
|
<ShareSheet
|
||||||
|
show={showShare}
|
||||||
|
description="一起来玩吧 ~"
|
||||||
|
title="立即分享给好友"
|
||||||
|
options={[
|
||||||
|
{
|
||||||
|
name: "好友",
|
||||||
|
icon: "wechat",
|
||||||
|
openType:"share"
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: "朋友圈",
|
||||||
|
// icon: "weibo",
|
||||||
|
// openType:"weibo"
|
||||||
|
// },
|
||||||
|
]}
|
||||||
|
onClose={() => setshowShare(false)}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
className={`detailBtn`}
|
className={`detailBtn`}
|
||||||
style={{ bottom: `${bottomheight ?? 0}px` }}
|
style={{ bottom: `${bottomheight ?? 0}px` }}
|
||||||
@@ -480,7 +524,7 @@ const details = () => {
|
|||||||
type={disable ? "warning" : "primary"}
|
type={disable ? "warning" : "primary"}
|
||||||
block
|
block
|
||||||
// disabled={disable}
|
// disabled={disable}
|
||||||
onClick={async() => {
|
onClick={async () => {
|
||||||
if (disable) {
|
if (disable) {
|
||||||
setShow(true);
|
setShow(true);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -71,15 +71,15 @@ const Home = () => {
|
|||||||
console.log(res.target);
|
console.log(res.target);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title: "自定义转发标题",
|
title: "cityNew",
|
||||||
path: "/page/user?id=123",
|
path: `/pages/home/index`,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// 分享到朋友圈
|
// 分享到朋友圈
|
||||||
useShareTimeline(() => {
|
useShareTimeline(() => {
|
||||||
return {
|
return {
|
||||||
title: "分享朋友圈", //字符串 自定义标题
|
title: "一起来玩吧", //字符串 自定义标题
|
||||||
// query: `id=${this.data.shop.shop_id}`, //页面携带参数
|
// query: `id=${this.data.shop.shop_id}`, //页面携带参数
|
||||||
// imageUrl: moments //图片地址
|
// imageUrl: moments //图片地址
|
||||||
};
|
};
|
||||||
@@ -103,9 +103,9 @@ const Home = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getsystemConfig(); //获取系统配置
|
getsystemConfig(); //获取系统配置
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
getdetails(); //获取活动详情
|
// getdetails(); //获取活动详情
|
||||||
}, 300);
|
// }, 800);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -138,6 +138,7 @@ const Home = () => {
|
|||||||
okFun: async (res: any) => {
|
okFun: async (res: any) => {
|
||||||
console.log("systemConfig--", res);
|
console.log("systemConfig--", res);
|
||||||
await setsystemConfig(res?.data ?? []);
|
await setsystemConfig(res?.data ?? []);
|
||||||
|
await getdetails()
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
await getTable(objParams);
|
await getTable(objParams);
|
||||||
@@ -269,7 +270,7 @@ const Home = () => {
|
|||||||
getsystemConfig(); //获取系统配置
|
getsystemConfig(); //获取系统配置
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getdetails(); //获取活动详情
|
getdetails(); //获取活动详情
|
||||||
}, 300);
|
}, 500);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -551,6 +552,7 @@ const Home = () => {
|
|||||||
></OfficialAccount>
|
></OfficialAccount>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
{/* 打开视频号主页-需要开放平台主主体认证 */}
|
{/* 打开视频号主页-需要开放平台主主体认证 */}
|
||||||
{/* <View
|
{/* <View
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user