Prechádzať zdrojové kódy

店铺优化,提醒

yjwang 1 týždeň pred
rodič
commit
78acb63a13
2 zmenil súbory, kde vykonal 79 pridanie a 5 odobranie
  1. 11 0
      src/api/store/store.js
  2. 68 5
      src/views/index.vue

+ 11 - 0
src/api/store/store.js

@@ -174,3 +174,14 @@ export function queryValidStoreLastInfo() {
     method: 'get'
   })
 }
+
+/**
+ * 店铺资质提醒接口6个月
+ * @returns {*}
+ */
+export function qualificationReminder() {
+  return request({
+    url: '/store/store/qualificationReminder',
+    method: 'get'
+  })
+}

+ 68 - 5
src/views/index.vue

@@ -61,6 +61,15 @@
        :visible.sync="dialogVisible"
        width="40%"
        center>
+       <div v-if="qualificationCheck" class="urgent-notice">
+         <div class="notice-content">
+           <div class="notice-title">【重要通知】</div>
+           <div class="notice-desc">
+             您店铺的入驻资质已届满6个月有效期!<br/>
+             请立即更新并上传最新资质提交审核,避免影响店铺正常运营!
+           </div>
+         </div>
+       </div>
        <div v-for="(item,index) in promptList">({{index+1}})、{{item}}</div>
        <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible = false">已 知 晓</el-button>
@@ -76,7 +85,7 @@
 import doctorChart from "./components/store/doctorChart.vue";
 import PanelGroup from "./components/store/PanelGroup.vue";
 import StoreOrderMoney from "./components/store/StoreOrderMoney.vue";
-import { queryValidStoreLastInfo } from '@/api/store/store';
+import { qualificationReminder, queryValidStoreLastInfo } from '@/api/store/store'
 export default {
   name: 'Index',
   components: {
@@ -84,6 +93,7 @@ PanelGroup,StoreOrderMoney,doctorChart
   },
   data() {
     return {
+      qualificationCheck:false,
        data:null,
       promptList:[],
       dialogVisible: false,
@@ -111,12 +121,26 @@ PanelGroup,StoreOrderMoney,doctorChart
           console.log("noticeInfo接口完整响应:", response);
           if (response.code === 200) {
             this.promptList = response.data;
-            if (this.promptList && this.promptList.length > 0) {
-              this.dialogVisible = true;
-            }
+            //请求店铺资质提醒接口满6个月
+            qualificationReminder().then(response => {
+              if(response.code === 200) {
+                if(response.check) {
+                  this.qualificationCheck = true;
+                }
+              }
+            })
+            this.dialogVisible = true;
             console.log("通知信息请求完成!", this.promptList);
           } else {
-            console.warn("接口返回非成功状态:", response.code);
+            //请求店铺资质提醒接口满6个月
+            qualificationReminder().then(response => {
+              if(response.code === 200) {
+                if(response.check) {
+                  this.qualificationCheck = true;
+                  this.dialogVisible = true;
+                }
+              }
+            })
           }
         })
         .catch(err => {
@@ -179,4 +203,43 @@ PanelGroup,StoreOrderMoney,doctorChart
   .ivu-mb {
     margin-bottom: 10px;
   }
+
+  .urgent-notice {
+    background-color: #fff1f0; /* 浅红色背景 */
+    border: 1px solid #ffccc7; /* 红色边框 */
+    border-radius: 8px;
+    padding: 20px;
+    margin-bottom: 20px;
+    display: flex;
+    align-items: flex-start;
+    gap: 12px;
+    box-shadow: 0 2px 8px rgba(245, 108, 108, 0.1); /* 轻微红色阴影增强醒目度 */
+  }
+
+  .notice-icon {
+    font-size: 24px;
+    margin-top: 2px;
+  }
+
+  .notice-content {
+    flex: 1;
+  }
+
+  .notice-title {
+    font-size: 16px;
+    font-weight: 700;
+    color: #f56c6c; /* 红色标题 */
+    margin-bottom: 8px;
+  }
+
+  .notice-desc {
+    font-size: 14px;
+    color: #e53e3e; /* 深红色文案 */
+    line-height: 1.6;
+    font-weight: 500;
+  }
+  .prompt-item {
+    margin: 8px 0;
+    color: #333;
+  }
   </style>