feat: latest code update
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
@tap="selectCompany(c.name)"
|
||||
>
|
||||
<view class="company-name">{{ c.name }}</view>
|
||||
<view class="company-count">{{ c.positions }} 个岗位</view>
|
||||
<view class="company-count">{{ c.positionCount > 0 ? c.positionCount + ' 个岗位' : '暂无题库' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -84,23 +84,12 @@
|
||||
<script>
|
||||
import { api } from '../../config'
|
||||
|
||||
const HOT_COMPANIES = [
|
||||
{ name: '腾讯', positions: 5 },
|
||||
{ name: '字节跳动', positions: 4 },
|
||||
{ name: '阿里巴巴', positions: 5 },
|
||||
{ name: '美团', positions: 3 },
|
||||
{ name: '百度', positions: 4 },
|
||||
{ name: '京东', positions: 3 },
|
||||
{ name: '网易', positions: 3 },
|
||||
{ name: '小红书', positions: 2 },
|
||||
]
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '',
|
||||
searching: false,
|
||||
hotCompanies: HOT_COMPANIES,
|
||||
hotCompanies: [],
|
||||
selectedCompany: '',
|
||||
selectedPosition: '',
|
||||
positions: [],
|
||||
@@ -109,7 +98,18 @@ export default {
|
||||
loadingQuestions: false,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.loadHotCompanies()
|
||||
},
|
||||
methods: {
|
||||
async loadHotCompanies() {
|
||||
try {
|
||||
const res = await uni.request({ url: api('/contribution/companies/hot'), method: 'GET' })
|
||||
if (res.statusCode === 200) this.hotCompanies = res.data || []
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
},
|
||||
difficultyLabel(d) {
|
||||
const map = { junior: '简单', medium: '中等', senior: '困难' }
|
||||
return map[d] || d || '中等'
|
||||
|
||||
Reference in New Issue
Block a user