Compare commits
2 Commits
1de0bacebf
...
910862cb5f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
910862cb5f | ||
|
|
fb88fdbb89 |
4
main.js
4
main.js
@@ -9,6 +9,7 @@ import globalFunction from '@/common/globalFunction'
|
|||||||
import '@/lib/string-similarity.min.js'
|
import '@/lib/string-similarity.min.js'
|
||||||
import similarityJobs from '@/utils/similarity_Job.js';
|
import similarityJobs from '@/utils/similarity_Job.js';
|
||||||
import config from '@/config.js';
|
import config from '@/config.js';
|
||||||
|
import shareMixin from './mixins/share.js';
|
||||||
// 组件
|
// 组件
|
||||||
import AppLayout from './components/AppLayout/AppLayout.vue';
|
import AppLayout from './components/AppLayout/AppLayout.vue';
|
||||||
import Empty from './components/empty/empty.vue';
|
import Empty from './components/empty/empty.vue';
|
||||||
@@ -36,6 +37,9 @@ import { getDict } from '@/apiRc/system/dict.js';
|
|||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
|
|
||||||
|
// 注册全局分享混入
|
||||||
|
app.mixin(shareMixin)
|
||||||
|
|
||||||
app.component('AppLayout', AppLayout)
|
app.component('AppLayout', AppLayout)
|
||||||
app.component('Empty', Empty)
|
app.component('Empty', Empty)
|
||||||
app.component('NoBouncePage', NoBouncePage)
|
app.component('NoBouncePage', NoBouncePage)
|
||||||
|
|||||||
16
mixins/share.js
Normal file
16
mixins/share.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
export default {
|
||||||
|
onShareAppMessage() {
|
||||||
|
return {
|
||||||
|
title: '喀什智慧就业平台',
|
||||||
|
path: '/pages/index/index',
|
||||||
|
imageUrl: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onShareTimeline() {
|
||||||
|
return {
|
||||||
|
title: '喀什智慧就业平台',
|
||||||
|
path: '/pages/index/index',
|
||||||
|
imageUrl: ''
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -32,9 +32,9 @@
|
|||||||
|
|
||||||
<!-- 控制栏 -->
|
<!-- 控制栏 -->
|
||||||
<view class="controls">
|
<view class="controls">
|
||||||
<!-- <text @click="togglePlay">{{ isPlaying ? '暂停' : '播放' }}</text>
|
<!-- <view class="control-text" @click="togglePlay">{{ isPlaying ? '暂停' : '播放' }}</view>
|
||||||
<text @click="toggleFullScreen">{{ isFullScreen ? '退出全屏' : '全屏' }}</text> -->
|
<view class="control-text" @click="toggleFullScreen">{{ isFullScreen ? '退出全屏' : '全屏' }}</view> -->
|
||||||
<text @click="close">关闭</text>
|
<view class="control-text" @click="close">关闭</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -180,7 +180,7 @@ defineExpose({ open });
|
|||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
.controls text {
|
.controls .control-text {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
padding: 8rpx 16rpx;
|
padding: 8rpx 16rpx;
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
import point from '@/static/icon/point.png';
|
import point from '@/static/icon/point.png';
|
||||||
import VideoPlayer from './component/videoPlayer.vue';
|
import VideoPlayer from './component/videoPlayer.vue';
|
||||||
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
||||||
import { onLoad, onShow, onHide } from '@dcloudio/uni-app';
|
import { onLoad, onShow, onHide, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
|
||||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||||
import RadarMap from './component/radarMap.vue';
|
import RadarMap from './component/radarMap.vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
@@ -364,10 +364,10 @@ function getCompanyIsAJobs(companyId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getTextWidth(text, size = 12) {
|
function getTextWidth(text, size = 12) {
|
||||||
const canvas = document.createElement('canvas');
|
// 在小程序环境中,document 对象不存在,使用估算方法
|
||||||
const context = canvas.getContext('2d');
|
// 简单估算:每个字符大约占 8px 宽度
|
||||||
context.font = `${12}px Arial`;
|
const estimatedWidth = text.length * 8;
|
||||||
return -(context.measureText(text).width / 2) - 20; // 计算文字中心点
|
return -(estimatedWidth / 2) - 20; // 计算文字中心点
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCompetivetuveness(jobId) {
|
function getCompetivetuveness(jobId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user