flat:AI+
This commit is contained in:
@@ -5,12 +5,18 @@
|
||||
|
||||
<!-- 格子布局 -->
|
||||
<view class="grid-container">
|
||||
<view class="grid-item blue">
|
||||
<text class="title">事业单位</text>
|
||||
<view class="status">已关注 ✓</view>
|
||||
<view
|
||||
class="grid-item"
|
||||
:style="{ backgroundColor: item.backgroudColor }"
|
||||
v-for="item in list"
|
||||
:key="item.companyCardId"
|
||||
>
|
||||
<text class="title">{{ item.name }}</text>
|
||||
<view class="status" v-if="item.isCollection" @click="delCollectionCard(item)">已关注 ✓</view>
|
||||
<view class="status" v-else @click="CollectionCard(item)">特别关注</view>
|
||||
</view>
|
||||
|
||||
<view class="grid-item green">
|
||||
<!-- <view class="grid-item green">
|
||||
<text class="title">银行招聘</text>
|
||||
<view class="status">特别关注</view>
|
||||
</view>
|
||||
@@ -23,11 +29,45 @@
|
||||
<view class="grid-item red">
|
||||
<text class="title">中国500强</text>
|
||||
<view class="status">特别关注</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { $api, navTo } = inject('globalFunction');
|
||||
const list = ref([]);
|
||||
|
||||
onLoad(() => {
|
||||
getPremiumList();
|
||||
});
|
||||
|
||||
function CollectionCard(item) {
|
||||
$api.createRequest(`/app/company/card/collection/${item.companyCardId}`, {}, 'PUT').then((resData) => {
|
||||
getPremiumList();
|
||||
$api.msg('关注成功');
|
||||
});
|
||||
}
|
||||
|
||||
function delCollectionCard(item) {
|
||||
$api.createRequest(`/app/company/card/collection/${item.companyCardId}`, {}, 'DELETE').then((resData) => {
|
||||
getPremiumList();
|
||||
$api.msg('取消关注');
|
||||
});
|
||||
}
|
||||
|
||||
function getPremiumList() {
|
||||
$api.createRequest('/app/company/card').then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
list.value = rows;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
/* 页面整体样式 */
|
||||
.container
|
||||
|
Reference in New Issue
Block a user