diff --git a/.DS_Store b/.DS_Store
index d38987d..0fe8cbb 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/App.vue b/App.vue
index 859f969..73069f9 100644
--- a/App.vue
+++ b/App.vue
@@ -75,6 +75,29 @@ uni-modal,
@font-face {
font-family: DingTalk JinBuTi;
- src: url('@/static/font/DingTalk JinBuTi_min.ttf');
+ src: url('/static/font/DingTalk JinBuTi_min.woff2') format('woff2');
+ font-display: swap;
+}
+
+@font-face {
+ font-family: PingFangSC-Regular;
+ src: url('/static/font/PingFangSC-Regular.woff2') format('woff2');
+ font-display: swap;
+}
+
+@font-face {
+ font-family: PingFangSC-Medium;
+ src: url('/static/font/PingFangSC-Medium.woff2') format('woff2');
+ font-display: swap;
+}
+
+@font-face {
+ font-family: DIN-Medium;
+ src: url('/static/font/DIN-Medium.woff2') format('woff2');
+ font-display: swap;
+}
+
+body {
+ font-family: 'PingFangSC-Regular', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
diff --git a/components/AppLayout/AppLayout.vue b/components/AppLayout/AppLayout.vue
index 57ae6dc..e9b405f 100644
--- a/components/AppLayout/AppLayout.vue
+++ b/components/AppLayout/AppLayout.vue
@@ -110,9 +110,11 @@ const handleScrollToLower = () => {
align-items: center;
padding: 7rpx 3rpx;
.header-title {
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
color: #000000;
font-weight: bold;
.subtitle-text {
+ font-family: 'PingFangSC-Regular', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
font-size: 28rpx;
color: #333333;
diff --git a/components/md-render/md-render.vue b/components/md-render/md-render.vue
index 17185ba..5362565 100644
--- a/components/md-render/md-render.vue
+++ b/components/md-render/md-render.vue
@@ -276,11 +276,13 @@ ol {
align-items: center;
justify-content: space-between
.title-text
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
max-width: calc(100% - 160rpx);
overflow: hidden
text-overflow: ellipsis
font-size: 30rpx
.card-salary
+ font-family: DIN-Medium;
font-size: 28rpx;
color: #FF6E1C;
diff --git a/components/renderCompanys/renderCompanys.vue b/components/renderCompanys/renderCompanys.vue
index b0a6003..5a1456d 100644
--- a/components/renderCompanys/renderCompanys.vue
+++ b/components/renderCompanys/renderCompanys.vue
@@ -9,8 +9,12 @@
-
- 在招职位·{{ job.totalRecruitment || '-' }}个
+
+
+ 在招职位·
+ {{ job.totalRecruitment || '-' }}
+ 个
+
@@ -76,6 +80,7 @@ function nextDetail(company) {
justify-content: space-between
align-items: flex-start
.company{
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 500;
font-size: 32rpx;
color: #333333;
@@ -97,6 +102,7 @@ function nextDetail(company) {
display: flex
flex-wrap: wrap
.tag{
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
width: fit-content;
height: 30rpx;
background: #F4F4F4;
@@ -121,4 +127,7 @@ function nextDetail(company) {
color: #6C7282;
}
}
+.ris{
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
+}
diff --git a/components/renderJobs/renderJobs.vue b/components/renderJobs/renderJobs.vue
index 96cd980..bcb138c 100644
--- a/components/renderJobs/renderJobs.vue
+++ b/components/renderJobs/renderJobs.vue
@@ -99,11 +99,13 @@ function nextDetail(job) {
justify-content: space-between
align-items: flex-start
.company{
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.salary{
+ font-family: DIN-Medium;
font-weight: 500;
font-size: 28rpx;
color: #4C6EFB;
@@ -120,6 +122,7 @@ function nextDetail(job) {
display: flex
flex-wrap: wrap
.tag{
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
width: fit-content;
height: 30rpx;
background: #F4F4F4;
diff --git a/packageA/pages/choiceness/choiceness.vue b/packageA/pages/choiceness/choiceness.vue
index e1b2e3e..16f89af 100644
--- a/packageA/pages/choiceness/choiceness.vue
+++ b/packageA/pages/choiceness/choiceness.vue
@@ -88,6 +88,7 @@ function seeDetail(item) {
font-weight: 600;
font-size: 32rpx;
color: #333333;
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
}
.card-text{
margin-top: 16rpx
diff --git a/packageA/pages/exhibitors/exhibitors.vue b/packageA/pages/exhibitors/exhibitors.vue
index 73b8dc6..5853770 100644
--- a/packageA/pages/exhibitors/exhibitors.vue
+++ b/packageA/pages/exhibitors/exhibitors.vue
@@ -251,6 +251,7 @@ image {
font-weight: 500;
font-size: 32rpx;
color: #333333;
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
}
.row2{
font-weight: 400;
diff --git a/packageA/pages/myResume/myResume.vue b/packageA/pages/myResume/myResume.vue
index 2018d66..9ad5638 100644
--- a/packageA/pages/myResume/myResume.vue
+++ b/packageA/pages/myResume/myResume.vue
@@ -54,7 +54,7 @@
{{ userInfo.salaryMin / 1000 }}k-{{ userInfo.salaryMax / 1000 }}k
- 期望工资地:
+ 期望工作地:
青岛市-
@@ -91,6 +91,7 @@ image{
padding: 52rpx 48rpx
.tops-left{
.name{
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 600;
font-size: 44rpx;
color: #333333;
@@ -140,6 +141,7 @@ image{
.mys-info{
padding: 28rpx
.mys-h4{
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 600;
font-size: 32rpx;
color: #000000;
diff --git a/packageA/pages/post/post.vue b/packageA/pages/post/post.vue
index 09978cc..1759a31 100644
--- a/packageA/pages/post/post.vue
+++ b/packageA/pages/post/post.vue
@@ -113,10 +113,7 @@
v-for="(item, index) in matchingDegree"
:key="index"
class="progress-item"
- :class="{
- active: index < currentStep - 1,
- half: index < currentStep && currentStep < index + 1, // 半条
- }"
+ :class="getClass(index)"
/>
@@ -263,6 +260,21 @@ function jobCollection() {
});
}
}
+
+function getClass(index) {
+ const current = currentStep.value;
+ const floorIndex = Math.floor(current);
+
+ if (index < floorIndex) {
+ return 'active';
+ } else if (index === floorIndex) {
+ const decimal = current % 1;
+ const percent = Math.round(decimal * 100);
+ return `half${percent}`;
+ } else {
+ return '';
+ }
+}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 8120422..feebfaf 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -27,7 +27,18 @@
+
+
+
+
+
+ 左滑查看视频
+ 快去体验吧~
+ 去体验
+ 1
+
+
@@ -45,11 +56,20 @@ import { storeToRefs } from 'pinia';
import { useReadMsg } from '@/stores/useReadMsg';
const { unreadCount } = storeToRefs(useReadMsg());
const showTabbar = ref(true);
+const maskFristEntry = ref(false);
+
+onLoad(() => {
+ // 判断浏览器是否有 fristEntry 第一次进入
+ // let fristEntry = uni.getStorageSync('fristEntry') === false ? false : true; // 默认未读
+ // maskFristEntry.value = fristEntry ;
+ maskFristEntry.value = true;
+});
onShow(() => {
// 获取消息列表
useReadMsg().fetchMessages();
});
+
const state = reactive({
current: 0,
all: [{}],
@@ -69,7 +89,7 @@ function changeShowTabbar(val) {
showTabbar.value = val;
}
-// 查看消息类型
+//1 查看消息类型
function changeSwiperType(e) {
const index = e.detail.current;
state.current = index;
@@ -87,11 +107,20 @@ function handleTabChange(index) {
}
}
-// 查看消息类型
function changeSwiperMsgType(e) {
const currented = e.detail.current;
state.current = currented;
}
+// mask
+function closeFristEntry() {
+ uni.setStorageSync('fristEntry', false);
+ maskFristEntry.value = false;
+}
+
+function goExperience() {
+ closeFristEntry();
+ state.current = 1;
+}
diff --git a/pages/login/login.vue b/pages/login/login.vue
index ea4add3..29a6017 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -3,7 +3,7 @@
-
+
就业
@@ -245,6 +245,18 @@ function getTreeselect() {
// 登录
function loginTest() {
+ // uni.share({
+ // provider: 'weixin',
+ // scene: 'WXSceneSession',
+ // type: 2,
+ // imageUrl: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png',
+ // success: function (res) {
+ // console.log('success:' + JSON.stringify(res));
+ // },
+ // fail: function (err) {
+ // console.log('fail:' + JSON.stringify(err));
+ // },
+ // });
const params = {
username: 'test',
password: 'test',
@@ -453,4 +465,4 @@ function complete() {
color: #FFFFFF;
text-align: center;
line-height: 90rpx
-
+
\ No newline at end of file
diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue
index 518ce69..e3b7321 100644
--- a/pages/mine/mine.vue
+++ b/pages/mine/mine.vue
@@ -157,6 +157,7 @@ function getUserstatistics() {
padding: 36rpx 36rpx 64rpx 36rpx
border-radius: 20rpx 20rpx 0rpx 0rpx;
position: relative
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
.top-title{
font-weight: 500;
font-size: 32rpx;
@@ -218,6 +219,7 @@ function getUserstatistics() {
margin: 32rpx 16rpx 32rpx 10rpx
}
.left-text{
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 500;
font-size: 28rpx;
color: #333333;
@@ -252,8 +254,9 @@ function getUserstatistics() {
justify-content: center
align-items: center
.mini-num{
+ font-family: DIN-Medium;
font-weight: 500;
- font-size: 44rpx;
+ font-size: 46rpx;
color: #333333;
}
.mini-text{
@@ -283,6 +286,7 @@ function getUserstatistics() {
flex-direction: column;
align-items: flex-start;
.userinfo-ls-name
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 600;
font-size: 40rpx;
color: #333333;
diff --git a/pages/msglog/msglog.vue b/pages/msglog/msglog.vue
index 0653a6c..e099fca 100644
--- a/pages/msglog/msglog.vue
+++ b/pages/msglog/msglog.vue
@@ -118,6 +118,7 @@ function changeSwiperMsgType(e) {
font-weight: bold;
}
.header-btnLf {
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
display: flex;
justify-content: flex-start;
align-items: center;
diff --git a/pages/msglog/read.vue b/pages/msglog/read.vue
index ce6d9ad..58d67a9 100644
--- a/pages/msglog/read.vue
+++ b/pages/msglog/read.vue
@@ -133,6 +133,8 @@ defineExpose({ loadData });
display: flex;
justify-content: space-between;
width: 100%
+ text
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
.card-time
font-weight: 400;
font-size: 28rpx;
diff --git a/pages/msglog/unread.vue b/pages/msglog/unread.vue
index 54dd367..9181049 100644
--- a/pages/msglog/unread.vue
+++ b/pages/msglog/unread.vue
@@ -119,6 +119,8 @@ defineExpose({ loadData });
display: flex;
justify-content: space-between;
width: 100%
+ text
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
.card-time
font-weight: 400;
font-size: 28rpx;
diff --git a/pages/nearby/components/four.vue b/pages/nearby/components/four.vue
index 8ae482b..bae2ff1 100644
--- a/pages/nearby/components/four.vue
+++ b/pages/nearby/components/four.vue
@@ -294,6 +294,7 @@ defineExpose({ loadData, handleFilterConfirm });
background: #F6F6F6;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.active
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
color: #256BFA;
background: #E9F0FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
@@ -330,6 +331,7 @@ defineExpose({ loadData, handleFilterConfirm });
margin-right: 32rpx;
white-space: nowrap
.active
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 500;
font-size: 36rpx;
color: #000000;
diff --git a/pages/nearby/components/one.vue b/pages/nearby/components/one.vue
index b282e79..077a264 100644
--- a/pages/nearby/components/one.vue
+++ b/pages/nearby/components/one.vue
@@ -398,6 +398,7 @@ defineExpose({ loadData, handleFilterConfirm });
margin-right: 32rpx;
white-space: nowrap
.active
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 500;
font-size: 36rpx;
color: #000000;
diff --git a/pages/nearby/components/three.vue b/pages/nearby/components/three.vue
index 628d113..f81249a 100644
--- a/pages/nearby/components/three.vue
+++ b/pages/nearby/components/three.vue
@@ -33,7 +33,14 @@
donted: index === state.dont,
}"
>
- {{ item.stationName }}
+
+ {{ item.stationName }}
+
@@ -185,7 +192,6 @@ function openFilter() {
pageState.search[key] = value.join(',');
}
showFilter.value = false;
- console.log(pageState.search);
getJobList('refresh');
},
cancel: () => {
@@ -408,44 +414,43 @@ defineExpose({ loadData, handleFilterConfirm });
border-radius: 50%;
position: relative;
margin-bottom: 20rpx;
- .donted::after
+ .item-dont::before
position: absolute;
content: '';
color: #FFFFFF;
font-size: 20rpx;
text-align: center;
- left: 0;
- top: -5rpx;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%)
width: 27rpx;
height: 27rpx;
- line-height: 28rpx;
- background: blue !important;
+ background: #F7B000;
border-radius: 50%;
- .dontstart::after
+ .item-dont::after
position: absolute;
- content: '始';
- color: #FFFFFF;
+ // content: '始';
+ content: '';
font-size: 20rpx;
text-align: center;
- left: 0;
- top: -5rpx;
- width: 27rpx;
- height: 27rpx;
- line-height: 28rpx;
- background: #666666;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%)
+ width: 14rpx;
+ height: 14rpx;
+ background: #ffffff;
border-radius: 50%;
- // .dontend::after
+ // .donted::after
// position: absolute;
- // content: '终';
- // color: #FFFFFF;
+ // content: '';
// font-size: 20rpx;
// text-align: center;
- // left: 0;
- // top: -5rpx;
- // width: 27rpx;
- // height: 27rpx;
- // line-height: 28rpx;
- // background: #666666;
+ // left: 50%;
+ // top: 50%;
+ // transform: translate(-50%, -50%)
+ // width: 14rpx;
+ // height: 14rpx;
+ // background: #F7B000 !important;
// border-radius: 50%;
.item-text
position: absolute
@@ -458,6 +463,8 @@ defineExpose({ loadData, handleFilterConfirm });
text-align: center;
white-space: nowrap
transform: translate(-50% + 8rpx, 0)
+ .textActive
+ color: #F7B000
.three-item:nth-child(2n)
.item-text
margin-top: -90rpx;
@@ -468,7 +475,7 @@ defineExpose({ loadData, handleFilterConfirm });
top: -17rpx;
width: 100%;
height: 17rpx;
- background: #FFCB47;
+ background: #F7B000;
border-radius: 17rpx 17rpx 17rpx 17rpx;
z-index: 1;
.nearby-list
@@ -503,6 +510,7 @@ defineExpose({ loadData, handleFilterConfirm });
margin-right: 32rpx;
white-space: nowrap
.active
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 500;
font-size: 36rpx;
color: #000000;
diff --git a/pages/nearby/components/two.vue b/pages/nearby/components/two.vue
index 687d812..7eb10ea 100644
--- a/pages/nearby/components/two.vue
+++ b/pages/nearby/components/two.vue
@@ -276,6 +276,7 @@ defineExpose({ loadData, handleFilterConfirm });
background: #F6F6F6;
border-radius: 12rpx 12rpx 12rpx 12rpx;
.active
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
color: #256BFA;
background: #E9F0FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
@@ -311,6 +312,7 @@ defineExpose({ loadData, handleFilterConfirm });
margin-right: 32rpx;
white-space: nowrap
.active
+ font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
font-weight: 500;
font-size: 36rpx;
color: #000000;
diff --git a/static/.DS_Store b/static/.DS_Store
index 2fa6e39..d217aab 100644
Binary files a/static/.DS_Store and b/static/.DS_Store differ
diff --git a/static/font/.DS_Store b/static/font/.DS_Store
index b90d59a..03298ff 100644
Binary files a/static/font/.DS_Store and b/static/font/.DS_Store differ
diff --git a/static/font/DIN-Medium.woff2 b/static/font/DIN-Medium.woff2
new file mode 100644
index 0000000..fb53b47
Binary files /dev/null and b/static/font/DIN-Medium.woff2 differ
diff --git a/static/font/DingTalk JinBuTi_min.ttf b/static/font/DingTalk JinBuTi_min.ttf
deleted file mode 100644
index 1d8ae5d..0000000
Binary files a/static/font/DingTalk JinBuTi_min.ttf and /dev/null differ
diff --git a/static/font/DingTalk JinBuTi_min.woff2 b/static/font/DingTalk JinBuTi_min.woff2
new file mode 100644
index 0000000..5705da2
Binary files /dev/null and b/static/font/DingTalk JinBuTi_min.woff2 differ
diff --git a/static/font/PingFangSC-Medium.woff2 b/static/font/PingFangSC-Medium.woff2
new file mode 100644
index 0000000..283a337
Binary files /dev/null and b/static/font/PingFangSC-Medium.woff2 differ
diff --git a/static/font/PingFangSC-Regular.woff2 b/static/font/PingFangSC-Regular.woff2
new file mode 100644
index 0000000..3ac5b3f
Binary files /dev/null and b/static/font/PingFangSC-Regular.woff2 differ
diff --git a/static/gif/.DS_Store b/static/gif/.DS_Store
index 92eb508..8c4dbb8 100644
Binary files a/static/gif/.DS_Store and b/static/gif/.DS_Store differ
diff --git a/static/gif/indicateArrow.gif b/static/gif/indicateArrow.gif
deleted file mode 100644
index 1c2e475..0000000
Binary files a/static/gif/indicateArrow.gif and /dev/null differ
diff --git a/static/icon/pintDate.png b/static/icon/pintDate.png
new file mode 100644
index 0000000..4700b48
Binary files /dev/null and b/static/icon/pintDate.png differ
diff --git a/static/icon/point3.png b/static/icon/point3.png
new file mode 100644
index 0000000..3b0c3f3
Binary files /dev/null and b/static/icon/point3.png differ
diff --git a/static/icon/pointpeople.png b/static/icon/pointpeople.png
new file mode 100644
index 0000000..26b5dae
Binary files /dev/null and b/static/icon/pointpeople.png differ
diff --git a/static/imgs/4501750561414_.pic.jpg b/static/imgs/4501750561414_.pic.jpg
deleted file mode 100644
index 39c4cba..0000000
Binary files a/static/imgs/4501750561414_.pic.jpg and /dev/null differ
diff --git a/static/imgs/fristEntry.png b/static/imgs/fristEntry.png
new file mode 100644
index 0000000..1952571
Binary files /dev/null and b/static/imgs/fristEntry.png differ
diff --git a/stores/useLocationStore.js b/stores/useLocationStore.js
index c6a21d9..e4d2d05 100644
--- a/stores/useLocationStore.js
+++ b/stores/useLocationStore.js
@@ -47,8 +47,8 @@ const useLocationStore = defineStore("location", () => {
longitude: 120.382665,
latitude: 36.066938
}
- longitudeVal.value = res.longitude
- latitudeVal.value = res.latitude
+ longitudeVal.value = resd.longitude
+ latitudeVal.value = resd.latitude
msg('用户位置获取失败,使用模拟定位')
resole(resd)
},
diff --git a/unpackage/.DS_Store b/unpackage/.DS_Store
index c614825..ef439fb 100644
Binary files a/unpackage/.DS_Store and b/unpackage/.DS_Store differ
diff --git a/unpackage/dist/.DS_Store b/unpackage/dist/.DS_Store
index ac56028..90898c7 100644
Binary files a/unpackage/dist/.DS_Store and b/unpackage/dist/.DS_Store differ
diff --git a/unpackage/dist/build/.DS_Store b/unpackage/dist/build/.DS_Store
index 420738c..e4fd469 100644
Binary files a/unpackage/dist/build/.DS_Store and b/unpackage/dist/build/.DS_Store differ
diff --git a/utils/wechatShare.js b/utils/wechatShare.js
new file mode 100644
index 0000000..17cca7f
--- /dev/null
+++ b/utils/wechatShare.js
@@ -0,0 +1,63 @@
+import wx from 'weixin-js-sdk'
+import config from "@/config.js"
+
+export function setupWechatShare({
+ title,
+ desc,
+ link,
+ imgUrl
+}) {
+ // 通过后端接口获取签名(必须)
+ fetch(`${config.baseUrl}/wechat-signature?url=${encodeURIComponent(location.href.split('#')[0])}`)
+ .then(res => res.json())
+ .then(({
+ appId,
+ timestamp,
+ nonceStr,
+ signature
+ }) => {
+ wx.config({
+ debug: false,
+ appId,
+ timestamp,
+ nonceStr,
+ signature,
+ jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData']
+ })
+
+ wx.ready(() => {
+ // 分享给好友
+ wx.updateAppMessageShareData({
+ title,
+ desc,
+ link,
+ imgUrl,
+ success: () => {
+ console.log('分享配置成功')
+ }
+ })
+
+ // 分享到朋友圈
+ wx.updateTimelineShareData({
+ title,
+ link,
+ imgUrl,
+ success: () => {
+ console.log('朋友圈分享配置成功')
+ }
+ })
+ })
+ })
+}
+
+// 使用
+// import { setupWechatShare } from '@/utils/wechatShare.js'
+
+// onMounted(() => {
+// setupWechatShare({
+// title: '职位推荐:高级前端工程师',
+// desc: '某知名互联网公司,年薪40W,点击查看详情',
+// link: location.href,
+// imgUrl: 'https://yourcdn.com/job-thumbnail.png'
+// })
+// })
\ No newline at end of file