Ver código fonte

influencer 폴더 생성, 제품 업데이트 상태 추가

DESKTOP-T61HUSC\user 5 meses atrás
pai
commit
198a5d41af

+ 6 - 0
assets/scss/default.scss

@@ -202,6 +202,7 @@
             >span{
               color: #999;
               line-height: 1.2;
+              display: block;
               font-size: 0.8rem;
             }
             .sold--out{
@@ -215,6 +216,11 @@
               display: flex;
               align-items: center;
               justify-content: center;
+              &.blue--type{
+                >span{
+                  background-color: #007aff;
+                }
+              }
               >span{
                 color: #ffffff;
                 text-align: center;

+ 0 - 1
assets/scss/mode-w-m.scss

@@ -40,7 +40,6 @@
         background-position: center;
         background-repeat: no-repeat;
         background-size: 100%;
-        background-image: url(../img/pf_sample.svg);
         margin-bottom: 20px;
       }
       .pro--id{

+ 2 - 2
components/common/header.vue

@@ -1,9 +1,9 @@
 <template>
   <header class="new--header">
     <div class="pro--wrap">
-      <div class="pro--img"></div>
+      <div class="pro--img" style="background-image: url(/assets/img/pf_sample.svg);"></div>
       <div class="pro--id" @click="proOn ? (proOn = false) : (proOn = true)">
-        {{ userId }} <i class="ico" :class="[proOn ? 'on' : '']">></i>
+        {{ useStoreAuth.getSnsTempData.user.NICK_NAME }} <i class="ico" :class="[proOn ? 'on' : '']">></i>
         <div class="id--box" v-show="proOn">
           <button type="button" class="btn-profile" @click="myPage(userId)">
             마이페이지

+ 0 - 2
pages/index.vue

@@ -132,8 +132,6 @@
    ************************/
   //import PrivacyPop from "@/components/login/privacyPop.vue";
   //import AgrNPop from "@/components/terms/agreeNListPop.vue";
-  import apiUrl from "@/composables/useApi";
-  import QRCode from "qrcode";
   import { useI18n } from "vue-i18n";
 
   /************************

+ 0 - 0
pages/view/item/add.vue → pages/view/influencer/item/add.vue


+ 0 - 0
pages/view/item/evtListClosed.vue → pages/view/influencer/item/evtListClosed.vue


+ 0 - 0
pages/view/item/evtListOngoing.vue → pages/view/influencer/item/evtListOngoing.vue


+ 0 - 0
pages/view/item/evtListPending.vue → pages/view/influencer/item/evtListPending.vue


+ 20 - 4
pages/view/item/index.vue → pages/view/influencer/item/index.vue

@@ -83,7 +83,16 @@
             <h3>{{ items.NAME }}</h3>
             <p>공급가: {{ items.PRICE1 }}<br>판매가: {{ items.PRICE2 }}</p>
             <span>등록일: {{ items.REGDATE.slice(0, 10) }}</span>
-            <div v-show="items.STATUS == 1" class="sold--out"><span>품절</span></div>
+            <span>업데이트 날짜: {{ items.UDPDATE.slice(0, 10) }}</span>
+            <div
+              v-if="items.STATUS == 1 || isRecentUpdate(items.UDPDATE)"
+              class="sold--out"
+              :class="{ 'blue--type': isRecentUpdate(items.UDPDATE) }"
+            >
+              <span>
+                {{ isRecentUpdate(items.UDPDATE) ? '업데이트' : '품절' }}
+              </span>
+            </div>
           </div>
         </div>
         <div class="item--pagination">
@@ -145,6 +154,14 @@ import "@vuepic/vue-datepicker/dist/main.css";
 |    함수(METHODS)
 ************************************************************************/
 
+  const isRecentUpdate = (dateStr) => {
+    const today = new Date();
+    const updateDate = new Date(dateStr);
+    const diffDays = (today - updateDate) / (1000 * 60 * 60 * 24);
+    // 업데이트 날짜가 오늘 날짜 기준 최근 7일인지 확인
+    return diffDays <= 7;
+  }
+
   const paginatedItems = computed(() => {
     const start = (currentPage.value - 1) * itemsPerPage;
     return itemList.value.slice(start, start + itemsPerPage);
@@ -167,15 +184,14 @@ import "@vuepic/vue-datepicker/dist/main.css";
 
   const evtListGet = async () => {
     let _req = {
-      compId: useAuthStore().getCompanyId,
-      status: null,
+      // Y : 노출, N : 비노출
+      SHOW_YN: "",
     };
 
     await useAxios()
       .post("/item/list", _req)
       .then((res) => {
         itemList.value = res.data;
-        //pageTotal.value = res.data._total_cnt;
       });
   };