微信小程序兼容修改
This commit is contained in:
5
package-lock.json
generated
5
package-lock.json
generated
@@ -27,8 +27,9 @@
|
|||||||
},
|
},
|
||||||
"node_modules/sm-crypto": {
|
"node_modules/sm-crypto": {
|
||||||
"version": "0.3.13",
|
"version": "0.3.13",
|
||||||
"resolved": "https://registry.npmjs.org/sm-crypto/-/sm-crypto-0.3.13.tgz",
|
"resolved": "https://registry.npmmirror.com/sm-crypto/-/sm-crypto-0.3.13.tgz",
|
||||||
"integrity": "sha512-ztNF+pZq6viCPMA1A6KKu3bgpkmYti5avykRHbcFIdSipFdkVmfUw2CnpM2kBJyppIalqvczLNM3wR8OQ0pT5w==",
|
"integrity": "sha512-ztNF+pZq6viCPMA1A6KKu3bgpkmYti5avykRHbcFIdSipFdkVmfUw2CnpM2kBJyppIalqvczLNM3wR8OQ0pT5w==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsbn": "^1.1.0"
|
"jsbn": "^1.1.0"
|
||||||
}
|
}
|
||||||
@@ -52,7 +53,7 @@
|
|||||||
},
|
},
|
||||||
"sm-crypto": {
|
"sm-crypto": {
|
||||||
"version": "0.3.13",
|
"version": "0.3.13",
|
||||||
"resolved": "https://registry.npmjs.org/sm-crypto/-/sm-crypto-0.3.13.tgz",
|
"resolved": "https://registry.npmmirror.com/sm-crypto/-/sm-crypto-0.3.13.tgz",
|
||||||
"integrity": "sha512-ztNF+pZq6viCPMA1A6KKu3bgpkmYti5avykRHbcFIdSipFdkVmfUw2CnpM2kBJyppIalqvczLNM3wR8OQ0pT5w==",
|
"integrity": "sha512-ztNF+pZq6viCPMA1A6KKu3bgpkmYti5avykRHbcFIdSipFdkVmfUw2CnpM2kBJyppIalqvczLNM3wR8OQ0pT5w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"jsbn": "^1.1.0"
|
"jsbn": "^1.1.0"
|
||||||
|
|||||||
@@ -21,15 +21,25 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="companyinfo-right">
|
<view class="companyinfo-right">
|
||||||
<view class="row1">{{ companyInfo?.companyName }}</view>
|
<view class="row1">{{ companyInfo?.companyName }}</view>
|
||||||
<view class="row2">
|
<view class="row2" v-if="companyInfo?.industry || companyInfo?.scale">
|
||||||
{{ companyInfo?.scale }}
|
<dict-tree-Label
|
||||||
|
v-if="companyInfo?.industry"
|
||||||
|
dictType="industry"
|
||||||
|
:value="companyInfo?.industry"
|
||||||
|
></dict-tree-Label>
|
||||||
|
<span v-if="companyInfo?.industry && companyInfo?.scale"> · </span>
|
||||||
|
<dict-Label
|
||||||
|
v-if="companyInfo?.scale"
|
||||||
|
dictType="scale"
|
||||||
|
:value="companyInfo?.scale"
|
||||||
|
></dict-Label>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
||||||
<view class="info-title">公司介绍</view>
|
<view class="info-title">公司介绍</view>
|
||||||
<view class="info-desirption">{{
|
<view class="info-desirption">{{
|
||||||
companyInfo.companyIntroduction
|
companyInfo.description
|
||||||
}}</view>
|
}}</view>
|
||||||
<!-- <view class="info-title title2">公司地址</view>
|
<!-- <view class="info-title title2">公司地址</view>
|
||||||
<view class="locationCompany"></view> -->
|
<view class="locationCompany"></view> -->
|
||||||
@@ -46,32 +56,39 @@
|
|||||||
<view class="views">
|
<view class="views">
|
||||||
<view class="Detail-title"><text class="title">在招职位</text></view>
|
<view class="Detail-title"><text class="title">在招职位</text></view>
|
||||||
<template v-if="companyInfo.jobInfoList.length != 0">
|
<template v-if="companyInfo.jobInfoList.length != 0">
|
||||||
<view v-for="job in companyInfo.jobInfoList" :key="job.id">
|
<view v-for="job in companyInfo.jobInfoList" :key="job.jobId" class="job-card-wrapper">
|
||||||
<!-- @click="navTo(`/packageA/pages/post/post?jobId=${JSON.stringify(job)}`)" -->
|
<view class="cards" @click="navTo(`/packageA/pages/post/post?jobId=${job.jobId}`)">
|
||||||
<view class="cards" :style="getItemBackgroundStyle('bj2.png')">
|
<view class="card-header">
|
||||||
<view class="card-company">
|
<view class="card-title-row">
|
||||||
<text class="company">{{ job.jobTitle }}</text>
|
<text class="job-title">{{ job.jobTitle }}</text>
|
||||||
<view class="salary"> ¥{{ job.salaryRange }}/月 </view>
|
<view class="card-pay">
|
||||||
</view>
|
<view class="pay-text">
|
||||||
<view class="card-tags">
|
<text class="salary-amount">¥{{ formatSalary(job.minSalary, job.maxSalary) }}</text>
|
||||||
<view class="tag jy">
|
<text class="salary-unit">/月</text>
|
||||||
<image :src="`${baseUrl}/jobfair/jy.png`" mode=""></image>
|
</view>
|
||||||
{{ job.experienceRequirement }}
|
|
||||||
</view>
|
|
||||||
<view class="tag xl">
|
|
||||||
<image :src="`${baseUrl}/jobfair/xx.png`" mode=""></image>
|
|
||||||
{{ job.educationRequirement }}
|
|
||||||
</view>
|
|
||||||
<view class="tag yd" v-if="job.jobRequirement">
|
|
||||||
<image :src="`${baseUrl}/jobfair/lx-1.png`" mode=""></image>
|
|
||||||
{{ job.jobRequirement }}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-companyName">
|
|
||||||
<image :src="`${baseUrl}/jobfair/hd.png`" mode=""></image>
|
|
||||||
{{ job.jobDescription }}
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="card-tags" v-if="job.experience || job.education">
|
||||||
|
<view class="tag tag-experience" v-if="job.experience">
|
||||||
|
<image class="tag-icon" :src="`${baseUrl}/jobfair/jy.png`" mode="aspectFit"></image>
|
||||||
|
<view class="tag-text">
|
||||||
|
<dict-Label dictType="experience" :value="job.experience"></dict-Label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="tag tag-education" v-if="job.education">
|
||||||
|
<image class="tag-icon" :src="`${baseUrl}/jobfair/xx.png`" mode="aspectFit"></image>
|
||||||
|
<view class="tag-text">
|
||||||
|
<dict-Label dictType="education" :value="job.education"></dict-Label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="card-location" v-if="job.jobLocation">
|
||||||
|
<image class="location-icon" src="/static/icon/point3.png" mode="aspectFit"></image>
|
||||||
|
<text class="location-text">{{ job.jobLocation }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -90,7 +107,7 @@ import config from "@/config.js";
|
|||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import useLocationStore from "@/stores/useLocationStore";
|
import useLocationStore from "@/stores/useLocationStore";
|
||||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||||
const { $api, navTo, vacanciesTo, navBack } = inject("globalFunction");
|
const { $api, navTo, vacanciesTo, navBack, parseQueryParams } = inject("globalFunction");
|
||||||
const isExpanded = ref(false);
|
const isExpanded = ref(false);
|
||||||
const pageState = reactive({
|
const pageState = reactive({
|
||||||
page: 0,
|
page: 0,
|
||||||
@@ -101,9 +118,16 @@ const pageState = reactive({
|
|||||||
});
|
});
|
||||||
const companyInfo = ref({
|
const companyInfo = ref({
|
||||||
jobInfoList: [],
|
jobInfoList: [],
|
||||||
|
companyName: '',
|
||||||
|
scale: '',
|
||||||
|
industry: '',
|
||||||
|
description: '',
|
||||||
|
isCollection: false
|
||||||
});
|
});
|
||||||
|
|
||||||
const baseUrl = config.imgBaseUrl;
|
const baseUrl = config.imgBaseUrl;
|
||||||
|
const companyIdRef = ref(null);
|
||||||
|
|
||||||
const getItemBackgroundStyle = (imageName) => ({
|
const getItemBackgroundStyle = (imageName) => ({
|
||||||
backgroundImage: `url(${baseUrl}/jobfair/${imageName})`,
|
backgroundImage: `url(${baseUrl}/jobfair/${imageName})`,
|
||||||
backgroundSize: "100% 100%", // 覆盖整个容器
|
backgroundSize: "100% 100%", // 覆盖整个容器
|
||||||
@@ -111,14 +135,167 @@ const getItemBackgroundStyle = (imageName) => ({
|
|||||||
backgroundRepeat: "no-repeat",
|
backgroundRepeat: "no-repeat",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 获取公司详情
|
||||||
|
function getCompanyDetail(companyId) {
|
||||||
|
if (!companyId) {
|
||||||
|
console.error('companyId 不能为空');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 尝试获取公司详情,如果接口不存在,可能公司详情会包含在职位数据中
|
||||||
|
$api.createRequest(`/app/company/${companyId}`).then((resData) => {
|
||||||
|
if (resData && resData.data) {
|
||||||
|
const data = resData.data;
|
||||||
|
companyInfo.value = {
|
||||||
|
...companyInfo.value,
|
||||||
|
...data,
|
||||||
|
companyName: data.name || data.companyName || data.company?.name || '',
|
||||||
|
scale: data.scale || data.company?.scale || '',
|
||||||
|
industry: data.industry || data.company?.industry || '',
|
||||||
|
description: data.description || data.companyIntroduction || data.introduction || data.company?.introduction || '',
|
||||||
|
isCollection: data.isCollection || false,
|
||||||
|
// 如果接口直接返回了职位列表,也设置进去
|
||||||
|
jobInfoList: data.jobInfoList || data.jobs || data.list || companyInfo.value.jobInfoList || []
|
||||||
|
};
|
||||||
|
console.log('companyInfo',companyInfo.value);
|
||||||
|
}
|
||||||
|
// 获取在招职位列表
|
||||||
|
getCompanyJobs(companyId);
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('获取公司详情失败:', error);
|
||||||
|
// 如果获取公司详情失败,尝试通过职位列表接口获取公司信息
|
||||||
|
// 或者直接获取职位列表
|
||||||
|
getCompanyJobs(companyId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取公司在招职位列表
|
||||||
|
function getCompanyJobs(companyId) {
|
||||||
|
if (!companyId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用正确的 API 路径:/app/company/job/{companyId}
|
||||||
|
$api.createRequest(`/app/company/job/${companyId}`, {}, 'GET').then((resData) => {
|
||||||
|
console.log('获取职位列表返回数据:', resData);
|
||||||
|
if (resData) {
|
||||||
|
// 优先检查 rows 字段(根据实际返回的数据结构)
|
||||||
|
if (resData.rows && Array.isArray(resData.rows)) {
|
||||||
|
companyInfo.value.jobInfoList = resData.rows;
|
||||||
|
}
|
||||||
|
// 如果返回的是数组
|
||||||
|
else if (Array.isArray(resData)) {
|
||||||
|
companyInfo.value.jobInfoList = resData;
|
||||||
|
}
|
||||||
|
// 如果返回的是对象,包含列表字段
|
||||||
|
else if (resData.data) {
|
||||||
|
if (Array.isArray(resData.data)) {
|
||||||
|
companyInfo.value.jobInfoList = resData.data;
|
||||||
|
} else if (resData.data.rows && Array.isArray(resData.data.rows)) {
|
||||||
|
companyInfo.value.jobInfoList = resData.data.rows;
|
||||||
|
} else if (resData.data.list && Array.isArray(resData.data.list)) {
|
||||||
|
companyInfo.value.jobInfoList = resData.data.list;
|
||||||
|
} else if (resData.data.jobInfoList && Array.isArray(resData.data.jobInfoList)) {
|
||||||
|
companyInfo.value.jobInfoList = resData.data.jobInfoList;
|
||||||
|
} else {
|
||||||
|
companyInfo.value.jobInfoList = [];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
companyInfo.value.jobInfoList = [];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
companyInfo.value.jobInfoList = [];
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('获取在招职位列表失败:', error);
|
||||||
|
companyInfo.value.jobInfoList = [];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
companyInfo.value = JSON.parse(options.job);
|
console.log('options',options);
|
||||||
console.log(companyInfo.value, "companyInfo.value");
|
let companyId = null;
|
||||||
|
|
||||||
|
// 优先从 options 中获取 companyId(小程序和 H5 都支持)
|
||||||
|
if (options && options.companyId) {
|
||||||
|
companyId = decodeURIComponent(options.companyId);
|
||||||
|
}
|
||||||
|
// 如果 options 中没有,尝试从 URL 解析(仅 H5 环境)
|
||||||
|
else {
|
||||||
|
// 使用 try-catch 包裹,避免在小程序环境中访问 window.location 报错
|
||||||
|
try {
|
||||||
|
// #ifdef H5
|
||||||
|
const params = parseQueryParams();
|
||||||
|
companyId = params.companyId;
|
||||||
|
// #endif
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('解析 URL 参数失败:', e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('companyId', companyId);
|
||||||
|
|
||||||
|
if (companyId) {
|
||||||
|
companyIdRef.value = companyId;
|
||||||
|
getCompanyDetail(companyId);
|
||||||
|
} else {
|
||||||
|
console.error('未获取到 companyId 参数');
|
||||||
|
// 如果参数名是 job,尝试兼容旧的方式
|
||||||
|
if (options && options.job) {
|
||||||
|
try {
|
||||||
|
const parsedData = JSON.parse(options.job);
|
||||||
|
if (parsedData.companyId) {
|
||||||
|
companyIdRef.value = parsedData.companyId;
|
||||||
|
getCompanyDetail(parsedData.companyId);
|
||||||
|
} else {
|
||||||
|
companyInfo.value = { ...companyInfo.value, ...parsedData };
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('解析 job 参数失败:', e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
// 仅在 H5 环境中从 URL 获取参数(小程序环境中 onShow 不会传递 URL 参数)
|
||||||
|
// #ifdef H5
|
||||||
|
try {
|
||||||
|
const params = parseQueryParams();
|
||||||
|
const companyId = params.companyId;
|
||||||
|
|
||||||
|
if (companyId && companyId !== companyIdRef.value) {
|
||||||
|
companyIdRef.value = companyId;
|
||||||
|
getCompanyDetail(companyId);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('onShow 中解析 URL 参数失败:', e);
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
});
|
});
|
||||||
|
|
||||||
function expand() {
|
function expand() {
|
||||||
isExpanded.value = !isExpanded.value;
|
isExpanded.value = !isExpanded.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 格式化薪资范围
|
||||||
|
function formatSalary(minSalary, maxSalary) {
|
||||||
|
if (minSalary && maxSalary) {
|
||||||
|
return `${minSalary}-${maxSalary}`;
|
||||||
|
} else if (minSalary) {
|
||||||
|
return `${minSalary}起`;
|
||||||
|
} else if (maxSalary) {
|
||||||
|
return `最高${maxSalary}`;
|
||||||
|
}
|
||||||
|
return '面议';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 截断文本,超过指定长度显示省略号
|
||||||
|
function truncateText(text, maxLength) {
|
||||||
|
if (!text) return '';
|
||||||
|
if (text.length <= maxLength) return text;
|
||||||
|
return text.substring(0, maxLength) + '...';
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@@ -259,94 +436,136 @@ image {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cards {
|
.job-card-wrapper {
|
||||||
padding: 32rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.04);
|
|
||||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
|
||||||
margin-top: 22rpx;
|
margin-top: 22rpx;
|
||||||
padding-bottom: 18rpx;
|
|
||||||
|
|
||||||
.card-company {
|
&:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards {
|
||||||
|
padding: 30rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.08);
|
||||||
|
border-radius: 24rpx;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.98);
|
||||||
|
box-shadow: 0rpx 1rpx 8rpx 0rpx rgba(0, 0, 0, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.card-title-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
|
gap: 20rpx;
|
||||||
|
|
||||||
.company {
|
.job-title {
|
||||||
font-weight: 600;
|
flex: 1;
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
text-align: left;
|
||||||
|
word-break: break-all;
|
||||||
|
font-weight: 500;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.salary {
|
.card-pay {
|
||||||
font-weight: 600;
|
flex-shrink: 0;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #F83A3C;
|
|
||||||
white-space: nowrap;
|
|
||||||
line-height: 48rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-companyName {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
|
||||||
margin-top: 23rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
image{
|
|
||||||
width: 24rpx;
|
.pay-text {
|
||||||
height: 24rpx;
|
font-family: DIN-Medium;
|
||||||
margin-right: 8rpx;
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #4C6EFB;
|
||||||
|
line-height: 45rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
.salary-amount {
|
||||||
|
font-family: DIN-Medium;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #4C6EFB;
|
||||||
|
line-height: 45rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.salary-unit {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #4C6EFB;
|
||||||
|
margin-left: 4rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-tags {
|
.card-tags {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin: 25rpx 0 35rpx;
|
gap: 10rpx;
|
||||||
image{
|
margin-top: 20rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: fit-content;
|
||||||
|
height: 30rpx;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
background: #F4F4F4;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #6C7282;
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.tag-icon {
|
||||||
width: 24rpx;
|
width: 24rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
margin-right: 8rpx;
|
margin-right: 8rpx;
|
||||||
}
|
flex-shrink: 0;
|
||||||
.jy {
|
|
||||||
background: #D9EDFF;
|
|
||||||
color: #0086FF;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.xl {
|
.tag-text {
|
||||||
background: #FFF1D5;
|
line-height: 1;
|
||||||
color: #FF7F01;
|
}
|
||||||
}
|
}
|
||||||
.yd {
|
|
||||||
background: #FFD8D8;
|
|
||||||
color: #F83A3C;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag {
|
.card-location {
|
||||||
width: fit-content;
|
display: flex;
|
||||||
height: 30rpx;
|
align-items: flex-start;
|
||||||
border-radius: 4rpx;
|
margin-top: 20rpx;
|
||||||
padding: 6rpx 20rpx;
|
|
||||||
line-height: 30rpx;
|
.location-icon {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
margin-right: 4rpx;
|
||||||
|
margin-top: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.location-text {
|
||||||
|
flex: 1;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
text-align: center;
|
color: #999999;
|
||||||
white-space: nowrap;
|
line-height: 25rpx;
|
||||||
margin-right: 20rpx;
|
word-break: break-all;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-bottom {
|
|
||||||
margin-top: 32rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #6C7282;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppLayout title="我的浏览" :show-bg-image="false" :use-scroll-view="false">
|
<AppLayout title="我的浏览" :show-bg-image="false" :use-scroll-view="false">
|
||||||
<template #headerleft>
|
|
||||||
<view class="btnback">
|
|
||||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<view class="collection-content">
|
<view class="collection-content">
|
||||||
<view class="collection-search">
|
<view class="collection-search">
|
||||||
<view class="search-content">
|
<view class="search-content">
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppLayout title="我的收藏" :show-bg-image="false" :use-scroll-view="false">
|
<AppLayout title="我的收藏" :show-bg-image="false" :use-scroll-view="false">
|
||||||
<template #headerleft>
|
|
||||||
<view class="btn">
|
|
||||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<view class="collection-content">
|
<view class="collection-content">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="button-click" :class="{ active: type === 0 }" @click="changeType(0)">工作职位</view>
|
<view class="button-click" :class="{ active: type === 0 }" @click="changeType(0)">工作职位</view>
|
||||||
|
|||||||
@@ -16,25 +16,52 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 获取雷达图数据
|
||||||
|
function getRadarData() {
|
||||||
|
if (!props.value || !props.value.radarChart) {
|
||||||
|
// 如果没有数据,使用默认值0
|
||||||
|
const defaultRadarChart = {
|
||||||
|
skill: 0,
|
||||||
|
experience: 0,
|
||||||
|
education: 0,
|
||||||
|
salary: 0,
|
||||||
|
age: 0,
|
||||||
|
location: 0
|
||||||
|
};
|
||||||
|
const labels = ['学历', '年龄', '工作地', '技能', '工作经验', '期望薪资'];
|
||||||
|
const data = [defaultRadarChart.education, defaultRadarChart.age, defaultRadarChart.location,
|
||||||
|
defaultRadarChart.skill, defaultRadarChart.experience, defaultRadarChart.salary].map((item) => item * 0.05);
|
||||||
|
return { labels, data };
|
||||||
|
}
|
||||||
|
|
||||||
|
const { skill, experience, education, salary, age, location } = props.value.radarChart;
|
||||||
|
const labels = ['学历', '年龄', '工作地', '技能', '工作经验', '期望薪资'];
|
||||||
|
const data = [education, age, location, skill, experience, salary].map((item) => item * 0.05);
|
||||||
|
return { labels, data };
|
||||||
|
}
|
||||||
|
|
||||||
// 监听页面初始化
|
// 监听页面初始化
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (Object.keys(props.value).length > 0) {
|
// 延迟执行,确保 canvas 已经渲染
|
||||||
rawRadarChart();
|
setTimeout(() => {
|
||||||
}
|
const { labels, data } = getRadarData();
|
||||||
|
rawRadarChart(labels, data);
|
||||||
|
}, 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听 props.value 变化
|
// 监听 props.value 变化
|
||||||
watch(
|
watch(
|
||||||
() => props.value,
|
() => props.value,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal && Object.keys(newVal).length > 0) {
|
if (newVal) {
|
||||||
const { skill, experience, education, salary, age, location } = newVal.radarChart;
|
// 延迟执行,确保数据更新完成
|
||||||
const labels = ['学历', '年龄', '工作地', '技能', '工作经验', '期望薪资'];
|
setTimeout(() => {
|
||||||
const data = [education, age, location, skill, experience, salary].map((item) => item * 0.05);
|
const { labels, data } = getRadarData();
|
||||||
rawRadarChart(labels, data);
|
rawRadarChart(labels, data);
|
||||||
|
}, 50);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ deep: true, immediate: false } // deep 递归监听对象内部变化
|
{ deep: true, immediate: true } // deep 递归监听对象内部变化,immediate 立即执行一次
|
||||||
);
|
);
|
||||||
|
|
||||||
function rawRadarChart(labels, data) {
|
function rawRadarChart(labels, data) {
|
||||||
|
|||||||
@@ -208,7 +208,20 @@ const jobInfo = ref({});
|
|||||||
const state = reactive({});
|
const state = reactive({});
|
||||||
const mapCovers = ref([]);
|
const mapCovers = ref([]);
|
||||||
const jobIdRef = ref();
|
const jobIdRef = ref();
|
||||||
const raderData = ref({});
|
// 竞争力分析数据,初始化为包含默认值的完整结构,确保雷达图能正常渲染
|
||||||
|
const raderData = ref({
|
||||||
|
matchScore: 0,
|
||||||
|
rank: 0,
|
||||||
|
percentile: 0,
|
||||||
|
radarChart: {
|
||||||
|
skill: 0,
|
||||||
|
experience: 0,
|
||||||
|
education: 0,
|
||||||
|
salary: 0,
|
||||||
|
age: 0,
|
||||||
|
location: 0
|
||||||
|
}
|
||||||
|
});
|
||||||
const videoPalyerRef = ref(null);
|
const videoPalyerRef = ref(null);
|
||||||
const explainUrlRef = ref('');
|
const explainUrlRef = ref('');
|
||||||
|
|
||||||
@@ -246,10 +259,17 @@ onLoad((option) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
// 仅在 H5 环境中从 URL 获取参数(小程序环境中 onShow 不会传递 URL 参数)
|
||||||
|
// #ifdef H5
|
||||||
|
try {
|
||||||
const option = parseQueryParams(); // 兼容微信内置浏览器
|
const option = parseQueryParams(); // 兼容微信内置浏览器
|
||||||
if (option.jobId) {
|
if (option.jobId) {
|
||||||
initLoad(option);
|
initLoad(option);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('onShow 中解析 URL 参数失败:', e);
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
});
|
});
|
||||||
|
|
||||||
function initLoad(option) {
|
function initLoad(option) {
|
||||||
@@ -317,8 +337,59 @@ function getTextWidth(text, size = 12) {
|
|||||||
|
|
||||||
function getCompetivetuveness(jobId) {
|
function getCompetivetuveness(jobId) {
|
||||||
$api.createRequest(`/app/job/competitiveness/${jobId}`, {}, 'GET').then((resData) => {
|
$api.createRequest(`/app/job/competitiveness/${jobId}`, {}, 'GET').then((resData) => {
|
||||||
raderData.value = resData.data;
|
// 如果接口返回的数据为 null 或空,使用默认值0
|
||||||
currentStep.value = resData.data.matchScore * 0.04;
|
if (resData && resData.data) {
|
||||||
|
// 确保 radarChart 字段存在,如果不存在则使用默认值
|
||||||
|
const radarChart = resData.data.radarChart || {
|
||||||
|
skill: 0,
|
||||||
|
experience: 0,
|
||||||
|
education: 0,
|
||||||
|
salary: 0,
|
||||||
|
age: 0,
|
||||||
|
location: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
raderData.value = {
|
||||||
|
matchScore: resData.data.matchScore || 0,
|
||||||
|
rank: resData.data.rank || 0,
|
||||||
|
percentile: resData.data.percentile || 0,
|
||||||
|
radarChart: radarChart
|
||||||
|
};
|
||||||
|
currentStep.value = (resData.data.matchScore || 0) * 0.04;
|
||||||
|
} else {
|
||||||
|
// 接口返回 null 或空数据时,使用默认值0
|
||||||
|
raderData.value = {
|
||||||
|
matchScore: 0,
|
||||||
|
rank: 0,
|
||||||
|
percentile: 0,
|
||||||
|
radarChart: {
|
||||||
|
skill: 0,
|
||||||
|
experience: 0,
|
||||||
|
education: 0,
|
||||||
|
salary: 0,
|
||||||
|
age: 0,
|
||||||
|
location: 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
currentStep.value = 0;
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
// 接口请求失败时,使用默认值0
|
||||||
|
console.error('获取竞争力分析失败:', error);
|
||||||
|
raderData.value = {
|
||||||
|
matchScore: 0,
|
||||||
|
rank: 0,
|
||||||
|
percentile: 0,
|
||||||
|
radarChart: {
|
||||||
|
skill: 0,
|
||||||
|
experience: 0,
|
||||||
|
education: 0,
|
||||||
|
salary: 0,
|
||||||
|
age: 0,
|
||||||
|
location: 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
currentStep.value = 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
62
pages.json
62
pages.json
@@ -4,9 +4,9 @@
|
|||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "喀什智慧就业平台",
|
"navigationBarTitleText": "喀什智慧就业平台",
|
||||||
"navigationBarTitleTextSize": "30rpx",
|
"navigationBarTitleTextSize": "30rpx"
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
"path": "pages/mine/mine",
|
"path": "pages/mine/mine",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的",
|
"navigationBarTitleText": "我的",
|
||||||
"navigationBarTitleTextSize": "30rpx",
|
"navigationBarTitleTextSize": "30rpx"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/complete-info/components/map-location-picker",
|
"path": "pages/complete-info/components/map-location-picker",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择地址",
|
"navigationBarTitleText": "选择地址"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -63,50 +63,50 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "附近",
|
"navigationBarTitleText": "附近",
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/test/userTypeTest",
|
"path": "pages/test/userTypeTest",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "用户类型测试",
|
"navigationBarTitleText": "用户类型测试",
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/test/tabbar-test",
|
"path": "pages/test/tabbar-test",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "TabBar测试",
|
"navigationBarTitleText": "TabBar测试",
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/test/homepage-test",
|
"path": "pages/test/homepage-test",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "首页内容测试",
|
"navigationBarTitleText": "首页内容测试",
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/test/tabbar-user-type-test",
|
"path": "pages/test/tabbar-user-type-test",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "TabBar用户类型测试",
|
"navigationBarTitleText": "TabBar用户类型测试",
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/test/company-search-test",
|
"path": "pages/test/company-search-test",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "企业搜索功能测试",
|
"navigationBarTitleText": "企业搜索功能测试",
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/test/company-mine-test",
|
"path": "pages/test/company-mine-test",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "企业我的页面测试",
|
"navigationBarTitleText": "企业我的页面测试",
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
"path": "pages/job/companySearch",
|
"path": "pages/job/companySearch",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择企业",
|
"navigationBarTitleText": "选择企业",
|
||||||
"navigationStyle": "custom",
|
//"navigationStyle": "custom",
|
||||||
"disableScroll": false,
|
"disableScroll": false,
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"backgroundColor": "#f5f5f5"
|
"backgroundColor": "#f5f5f5"
|
||||||
@@ -190,8 +190,8 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "精选",
|
"navigationBarTitleText": "精选",
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
"navigationBarBackgroundColor": "#4778EC",
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/post/post",
|
"path": "pages/post/post",
|
||||||
@@ -235,8 +235,8 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的收藏",
|
"navigationBarTitleText": "我的收藏",
|
||||||
"navigationBarTitleTextSize": "30rpx",
|
"navigationBarTitleTextSize": "30rpx",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -244,31 +244,31 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的浏览",
|
"navigationBarTitleText": "我的浏览",
|
||||||
"navigationBarTitleTextSize": "30rpx",
|
"navigationBarTitleTextSize": "30rpx",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/addPosition/addPosition",
|
"path": "pages/addPosition/addPosition",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "添加岗位",
|
"navigationBarTitleText": "添加岗位",
|
||||||
"navigationBarTitleTextSize": "30rpx",
|
"navigationBarTitleTextSize": "30rpx"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/selectDate/selectDate",
|
"path": "pages/selectDate/selectDate",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": ""
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/personalInfo/personalInfo",
|
"path": "pages/personalInfo/personalInfo",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人信息",
|
"navigationBarTitleText": "个人信息",
|
||||||
"navigationBarTitleTextSize": "30rpx",
|
"navigationBarTitleTextSize": "30rpx"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -292,8 +292,8 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "精选企业",
|
"navigationBarTitleText": "精选企业",
|
||||||
"navigationBarTitleTextSize": "30rpx",
|
"navigationBarTitleTextSize": "30rpx",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -316,8 +316,8 @@
|
|||||||
"path": "pages/tiktok/tiktok",
|
"path": "pages/tiktok/tiktok",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
"navigationStyle": "custom"
|
//"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -701,9 +701,43 @@ const handleServiceClick = (serviceType) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理直播按钮点击
|
// 处理直播按钮点击 - 跳转微信视频号
|
||||||
const handleLiveClick = () => {
|
const handleLiveClick = () => {
|
||||||
$api.msg('该功能正在开发中');
|
// #ifdef MP-WEIXIN
|
||||||
|
const feedId = 'sphKH1AEeLfTJJE';
|
||||||
|
|
||||||
|
// 使用微信原生 API 打开视频号直播
|
||||||
|
if (typeof wx !== 'undefined' && wx.openChannelsUserProfile) {
|
||||||
|
wx.openChannelsUserProfile({
|
||||||
|
// feedId: feedId,
|
||||||
|
finderUserName: feedId, // 视频号 finderUserName,如果feedId足够可以留空
|
||||||
|
success: (res) => {
|
||||||
|
console.log('打开视频号成功', res);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('打开视频号失败', err);
|
||||||
|
$api.msg(err.errMsg || '无法打开直播,请稍后重试');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 如果 API 不存在,尝试使用 uni API
|
||||||
|
uni.openChannelsLive({
|
||||||
|
feedId: feedId,
|
||||||
|
success: (res) => {
|
||||||
|
console.log('打开视频号成功', res);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('打开视频号失败', err);
|
||||||
|
$api.msg('无法打开直播,请检查微信版本或稍后重试');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
// 非微信小程序环境提示
|
||||||
|
$api.msg('该功能仅在微信小程序中可用');
|
||||||
|
// #endif
|
||||||
};
|
};
|
||||||
|
|
||||||
// 跳转到测试页面
|
// 跳转到测试页面
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppLayout title="我的" back-gorund-color="#F4F4F4">
|
<AppLayout back-gorund-color="#F4F4F4">
|
||||||
<!-- 自定义tabbar -->
|
<!-- 自定义tabbar -->
|
||||||
<CustomTabBar :currentPage="4" />
|
<CustomTabBar :currentPage="4" />
|
||||||
<!-- 企业用户信息卡片 -->
|
<!-- 企业用户信息卡片 -->
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppLayout title="附近" :use-scroll-view="false">
|
<AppLayout :use-scroll-view="false">
|
||||||
<template #headerleft>
|
<template #headerleft>
|
||||||
<view class="btnback">
|
<view class="btnback">
|
||||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
<component :is="components[index]" :ref="(el) => handelComponentsRef(el, index)" />
|
<component :is="components[index]" :ref="(el) => handelComponentsRef(el, index)" />
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<oneComponent v-show="currentIndex === 0" :ref="(el) => handelComponentsRef(el, index)" />
|
<oneComponent v-if="index === 0" :ref="(el) => handelComponentsRef(el, index)" />
|
||||||
<twoComponent v-show="currentIndex === 1" :ref="(el) => handelComponentsRef(el, index)" />
|
<twoComponent v-if="index === 1" :ref="(el) => handelComponentsRef(el, index)" />
|
||||||
<threeComponent v-show="currentIndex === 2" :ref="(el) => handelComponentsRef(el, index)" />
|
<threeComponent v-if="index === 2" :ref="(el) => handelComponentsRef(el, index)" />
|
||||||
<fourComponent v-show="currentIndex === 3" :ref="(el) => handelComponentsRef(el, index)" />
|
<fourComponent v-if="index === 3" :ref="(el) => handelComponentsRef(el, index)" />
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|||||||
Reference in New Issue
Block a user