feat: 微信增加转发 分享 复制链接功能

This commit is contained in:
admin 2024-10-16 15:43:54 +08:00
parent 093a3619cb
commit 3db1115ee2
12 changed files with 77 additions and 29 deletions

View File

@ -40,14 +40,17 @@ const props = withDefaults(
{
list: [
{
imgUrl: "b-a1.png",
},
{
imgUrl: "b-a2.png",
},
{
imgUrl: "b-a3.png",
},
imgUrl: 'b-a1-1.1.1.png'
}
// {
// imgUrl: "b-a1.png",
// },
// {
// imgUrl: "b-a2.png",
// },
// {
// imgUrl: "b-a3.png",
// },
],
}
);
@ -75,6 +78,7 @@ const change = (e: any) => {
cursor: pointer;
image {
width: 100%;
height: 200px;
}
}
.title {

View File

@ -120,7 +120,7 @@ onMounted(() => {
height: 60rpx;
padding: 10rpx;
border-radius: 100%;
border: 2px solid #294ac7;
background-color: #294ac7;
border: 2px solid #608CF1;
background-color: #608CF1;
}
</style>

View File

@ -5,9 +5,11 @@ import App from "./App.vue";
import './static/style/common.scss'
import TabBar from "@/components/TabBar/index.vue"//路径根据你的文件修改
import myMixin from "@/pages/minix/index.js";
export function createApp() {
const app = createSSRApp(App);
app.mixin(myMixin);
app.use(uviewPlus);
app.use(pinia);
app.component('TabBar', TabBar)

37
src/pages/minix/index.js Normal file
View File

@ -0,0 +1,37 @@
export default {
data() {
return {
title1: "",
path1: "",
};
},
created() {
//#ifdef MP-WEIXIN
wx.showShareMenu({
withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"],
});
// 尝试通过 uni.getCurrentPages 获取当前页面栈,然后获取栈顶页面的路由信息
const pages = getCurrentPages();
if (pages.length > 0) {
const currentPage = pages[pages.length - 1];
this.path1 = currentPage.route;
}
//#endif
},
//2.配置分享好友
onShareAppMessage(res) {
return {
title: this.title1,
path: this.path1,
};
},
//2.配置分享到朋友圈
onShareTimeline(res) {
return {
title: this.title1,
path: this.path1,
};
},
};

View File

@ -242,7 +242,7 @@ const callNumber = (number: any) => {
.text {
font-weight: 400;
font-size: 28rpx;
color: #294ac7;
color: #608CF1;
line-height: 42rpx;
}
.desc {

View File

@ -28,12 +28,12 @@
<!-- 介绍 -->
<view class="avatar-card">
<uni-card
:shadow="'0rpx 0rpx 10rpx 0rpx rgba(5,68,37,0.12)'"
:padding="'10px 10px'"
:shadow="'0rpx 0rpx 0rpx 0rpx rgba(5,68,37,0.12)'"
:padding="'0px 0px'"
:border="false"
>
<view class="title">爱梵达</view>
<image
<!-- <view class="title">爱梵达</view> -->
<!-- <image
:src="`${url}/static/avatar/1.jpg`"
:mode="'widthFix'"
style="width: 100%"
@ -57,6 +57,11 @@
:src="`${url}/static/avatar/5.jpg`"
:mode="'widthFix'"
style="width: 100%"
/> -->
<image
:src="`${url}/static/img/6.png`"
:mode="'widthFix'"
style="width: 100%"
/>
</uni-card>
</view>
@ -72,17 +77,17 @@ import { url } from "@/utils/data";
const entryItemList = ref([
{
path: "1.png",
path: "01.png",
name: "报废车辆回收",
url: "/pagesVehicle/index",
},
{
path: "2.png",
path: "02.png",
name: "电池回收",
url: "/pagesBattery/index",
},
{
path: "3.png",
path: "03.png",
name: "废钢回收",
url: "/pagesScrapSteel/index",
},

View File

@ -60,7 +60,7 @@
<u-checkbox
:key="1"
:size="'28rpx'"
:activeColor="'#294AC7'"
:activeColor="'#608CF1'"
:name="1"
:usedAlone="true"
:checked="checkGroup.agreeCheck"

View File

@ -581,8 +581,8 @@ const contrlModalParams = reactive<any>({
{ name: "汽油" },
{ name: "柴油" },
{ name: "油气" },
{ name: "纯电" },
{ name: "油电" },
// { name: "" },
// { name: "" },
{ name: "无动力" },
{ name: "天然气" },
],

View File

@ -547,8 +547,8 @@ const contrlModalParams = reactive<any>({
{ name: "汽油" },
{ name: "柴油" },
{ name: "油气" },
{ name: "纯电" },
{ name: "油电" },
// { name: "" },
// { name: "" },
{ name: "无动力" },
{ name: "天然气" },
],

View File

@ -548,8 +548,8 @@ const contrlModalParams = reactive<any>({
{ name: "汽油" },
{ name: "柴油" },
{ name: "油气" },
{ name: "纯电" },
{ name: "油电" },
// { name: "" },
// { name: "" },
{ name: "无动力" },
{ name: "天然气" },
],

View File

@ -60,10 +60,10 @@ body {
.uni-calendar-item--multiple .uni-calendar-item--after-checked,
.uni-calendar-item__weeks-box .uni-calendar-item--checked,
.uni-datetime-picker--btn {
background-color: #294AC7 !important;
background-color: #608CF1 !important;
}
.uni-datetime-picker-btn-text {
color: #294AC7 !important;
color: #608CF1 !important;
}
.uni-date__x-input {
font-size: 12px;

View File

@ -17,9 +17,9 @@
/* uni.scss */
@import 'uview-plus/theme.scss';
$u-primary: #294AC7 !important;
$u-primary: #608CF1 !important;
/* 行为相关颜色 */
$uni-color-primary: #294AC7; // #007aff
$uni-color-primary: #608CF1; // #007aff
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #302423;