初始化端午项目
This commit is contained in:
@@ -3,7 +3,7 @@ import axios from "axios";
|
||||
import { Toast } from "vant";
|
||||
import {getShareConfig } from '@/api'
|
||||
|
||||
const imgUrl = new URL(`@/assets/images/share.jpg`, import.meta.url).href
|
||||
const imgUrl = new URL(`../assets/images/share.jpg`, import.meta.url).href
|
||||
const linkUrl = import.meta.env.VITE_HOST + import.meta.env.VITE_FOLDER
|
||||
|
||||
export function wxShare(option) {
|
||||
@@ -31,6 +31,7 @@ export function wxShare(option) {
|
||||
] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
||||
})
|
||||
wx.ready(function () {
|
||||
console.log('share config success');
|
||||
wx.onMenuShareTimeline({
|
||||
link: import.meta.env.VITE_URL, // 分享链接
|
||||
title: option.title, // 分享标题
|
||||
@@ -56,4 +57,5 @@ export function wxShare(option) {
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user