فهرست منبع

Merge branch 'master' of https://git.citupro.com/zhengnaiwen_citu/menduner-uniapp

Xiao_123 6 ماه پیش
والد
کامیت
b552024d12
4فایلهای تغییر یافته به همراه50 افزوده شده و 16 حذف شده
  1. 0 2
      api/vip.js
  2. 1 3
      pages/index/my.vue
  3. 31 9
      pagesA/vip/blockEnt/index.vue
  4. 18 2
      pagesA/vip/index.vue

+ 0 - 2
api/vip.js

@@ -5,7 +5,6 @@ export const getBlockEnterpriseList = async () => {
   return request({
     url: '/app-api/menduner/system/person/enterprise-block/page',
     method: 'GET',
-    params,
     custom: {
       showLoading: false,
       auth: true
@@ -31,7 +30,6 @@ export const handleUnBlockEnterprise = async (enterpriseId) => {
   return request({
     url: '/app-api/menduner/system/person/enterprise-block/un-block?enterpriseId=' + enterpriseId,
     method: 'DELETE',
-    params,
     custom: {
       showLoading: false,
       auth: true

+ 1 - 3
pages/index/my.vue

@@ -3,7 +3,7 @@
 		<view class="pb-120">
 			<view class="text-center" :class="vip ? 'vipBox' : 'avatarBox'" @tap="handleTap">
 				<img :src="getUserAvatar(baseInfo?.avatar, baseInfo?.sex)" alt="" class="img-box">
-				<image v-if="vip" src="/static/svg/vip.svg" class="vipIcon"></image>
+				<image v-if="vip" src="/static/svg/vip.svg" class="vipIcon" @click.stop="handleToLink({path: '/pagesA/vip/index'})"></image>
 				<view v-if="!useUserStore.isLogin" class="font-weight-bold font-size-20">点击登录</view>
 				<view v-else class="font-weight-bold font-size-20">{{ baseInfo?.name || userInfo?.phone }}</view>
 			</view>
@@ -106,8 +106,6 @@ const list = ref([
 	{	title: '我的分享码',	path: 'shareQrCode'	},					
 	{	title: '在线简历',	path: '/pagesA/resumeOnline/index'	},					
 	{	title: '附件简历',	path: '/pagesA/resume/index'	},					
-	// {	title: '简历模板',	path: '/pagesA/resume/index'	},					
-	// {	title: '屏蔽企业',	path: '/pagesA/resume/index'	},					
 	{ title: '面试管理', path: '/pagesA/interview/index' },
 	{ title: '门墩儿商城', appId: 'wx6decdf12f9e7a061' },
 	{ title: '我要招聘', key: 'recruit' }

+ 31 - 9
pagesA/vip/blockEnt/index.vue

@@ -10,19 +10,17 @@
           cancelButton="none"
           :focus="false"
           bgColor="#fff"
-          @confirm="getData($event.value)"
+          @confirm="getEntList($event.value)"
           @clear="query.content = ''"
         >
         </uni-search-bar>
-        <button class="search-btn" @click.stop="getData" :loading="loading">搜索</button>
+        <button class="search-btn" @click.stop="getEntList" :loading="loading">搜索</button>
       </view>
     </view>
     <uni-popup ref="popup" type="bottom" background-color="#fff">
-			<uni-card v-for="(item, index) in list" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
+			<uni-card v-for="item in entList" :key="item.id" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
 				<view class="d-flex align-center">
-          <view @click="preview(item.url)"  style="flex: 1;">
-            <view class="font-size-14" style="font-weight: bold; margin: 15rpx 0; color: #777;">{{ item.title }}</view>
-          </view>
+          123
         </view>
 			</uni-card>
     </uni-popup>
@@ -40,12 +38,21 @@ import {
 const popup = ref()
 const loading = ref(false)
 const name = ref('')
-const list = ref()
-const getData = async () => {
+const entList = ref([])
+// 获取企业列表
+const getEntList = async (name) => {
+  // if (name) name.value = name
+  // if (!name) {
+  //   uni.showToast({
+  //     title: '请输入公司关键字',
+  //     icon: 'none'
+  //   })
+  //   return
+  // }
   try {
     loading.value = true
     const res = await getBlockEnterpriseList()
-    list.value = res?.data || []
+    entList.value = res?.data?.list || []
     popup.value.open()
   } catch (error) {
     uni.showToast({
@@ -56,6 +63,21 @@ const getData = async () => {
   }
 }
 
+const dataList = ref([])
+const getData = async () => {
+  try {
+    const res = await getBlockEnterpriseList()
+    dataList.value = res?.data?.list || []
+    popup.value.open()
+  } catch (error) {
+    uni.showToast({
+      title: '查询数据失败,请重试',
+      icon: 'none'
+    })
+  }
+}
+getData()
+
 </script>
 <style lang="scss" scoped>
 .stick {

+ 18 - 2
pagesA/vip/index.vue

@@ -9,6 +9,9 @@
       </view>
       <view class="nameBox">
 				<view class="name font-weight-bold font-size-16">{{ baseInfo?.name || userInfo?.phone }}</view>
+				<view class="vipInfo font-size-14">
+          14天双周卡将于{{ remaining }}后过期
+        </view>
       </view>
     </view>
     <view style="height: 20rpx; background-color: #f8f8fa;"></view>
@@ -31,7 +34,7 @@
 
 <script setup>
 import { userStore } from '@/store/user'
-import { ref, computed, watch } from 'vue'
+import { ref, computed } from 'vue'
 import { getUserAvatar } from '@/utils/avatar'
 
 
@@ -39,9 +42,16 @@ const useUserStore = userStore()
 const baseInfo = computed(() => useUserStore?.baseInfo)
 const userInfo = computed(() => useUserStore?.userInfo)
 
+const remaining = computed(() => {
+  if (!userInfo.value?.vipExpireDate) return '0'
+  const diffInMs =  (userInfo.value?.vipExpireDate-0) - new Date().getTime()
+  const day = diffInMs / (1000 * 60 * 60 * 24)
+  return day < 1 ? '今天' : Math.floor(day) + '天'
+})
+
 const list = ref([
 	{	title: '简历模板',	path: '/pagesA/vip/template/index'	},					
-	{	title: '屏蔽企业',	path: '/pagesA/vip/blockEnt/index'	},			
+	// {	title: '屏蔽企业',	path: '/pagesA/vip/blockEnt/index'	},			
 ])
 
 // 列表跳转
@@ -81,10 +91,16 @@ const handleToLink = (item) => {
     }
   }
   .nameBox {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-around;
     margin-left: 30rpx;
     .name {
       color: #724d2b;
     }
+    .vipInfo {
+      color: #211000;
+    }
   }
 }