From 6c1e43d919b199a47f1fc67831ed4b8f3ab7788b Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期五, 17 六月 2022 17:07:33 +0800
Subject: [PATCH] expire dialog show

---
 src/pages/desktop/index/components/Desktop.vue |   93 +++++++---------------------------------------
 1 files changed, 15 insertions(+), 78 deletions(-)

diff --git a/src/pages/desktop/index/components/Desktop.vue b/src/pages/desktop/index/components/Desktop.vue
index d54701d..6501c6c 100644
--- a/src/pages/desktop/index/components/Desktop.vue
+++ b/src/pages/desktop/index/components/Desktop.vue
@@ -95,7 +95,7 @@
         <span class="ver-text">鐗堟湰锛�</span>{{ versionName }}
       </div>
       <div class="ver">
-        <span class="ver-text">鐘舵�侊細</span>{{ versionState }}
+        <span class="ver-text">鐘舵�侊細</span>灏氭湭婵�娲�
       </div>
       <el-divider></el-divider>
       <div class="info" v-if="versionName == 'SmartAI姝e紡鐗�'">
@@ -157,7 +157,6 @@
       <!-- <el-divider></el-divider> -->
 
       <span slot="footer" class="dialog-footer">
-        <!-- v-if="!snExpire && versionName != 'SmartAI姝e紡鐗�'" -->
         <div class="btns">
           <el-button
             v-if="!snExpire && versionName != 'SmartAI姝e紡鐗�'"
@@ -169,7 +168,7 @@
             class="cancel"
             v-if="snExpire && versionName != 'SmartAI姝e紡鐗�'"
             @click="$emit('quit')"
-            >閫�鍑虹櫥褰�
+            >閫�鍑虹櫥闄�
           </el-button>
           <el-button class="ok" type="primary" @click="activateVersion"
             >婵�娲�</el-button
@@ -208,12 +207,13 @@
               <span>{{ item.orderMoney }} 鍏�</span>
             </div>
             <div class="desc">
+              <div>璁㈠崟鐢熸垚鏃ユ湡锛歿{ item.createTime }}</div>
               <div>浜у搧鍚嶇О锛歿{ prod.productName }}</div>
               <div>浜у搧绫诲瀷锛歿{ prod.productTypeName }}</div>
               <div>绯荤粺鐗堟湰锛歿{ prod.edition }}</div>
               <div>閫氶亾鏁伴噺锛歿{ prod.ChCount }}</div>
-              <div>鎽勫儚鏈烘暟閲忥細{{ prod.cameraCount }}</div>
-              <div>鏈嶅姟鏃堕暱锛歿{ prod.serveYear }} 骞�</div>
+              <div>鎺堟潈鏁伴噺锛歿{ prod.authCount }}</div>
+              <div>璧锋鏈嶅姟鏃堕棿 锛歿{ startAndEnd(item.createTime, prod.serveYear) }}</div>
             </div>
           </div>
         </div>
@@ -256,10 +256,10 @@
       showFreeVersion: false,
       activeDialog: false,
       countdown: 60,
-      innerDialog: true,
+      innerDialog: false,
       versionName: "",
       codeMsg: "鑾峰彇楠岃瘉鐮�",
-      versionState: "灏氭湭婵�娲�",
+      // versionState: ,
       secrectKey: "",
       curOrder: {},
       curProd: {},
@@ -268,76 +268,7 @@
       snExpire: false,
       timer: null,
       token: "",
-      orderList: [
-        {
-          id: "da09c92a-8bc0-4586-998e-4b6113f457fc",
-          orderMoney: 2320,
-          products: [
-            {
-              ChCount: 16,
-              activateCode: "E8B72-E0B09-5F44B-8BBC4-1C5AC",
-              activeTime: "",
-              appendix: [],
-              authCount: 16,
-              cameraCount: 0,
-              codeStatus: 0,
-              devCount: 1,
-              devIdList: ["407394c3-bc46-446b-88d5-ddf6d4694e32"],
-              devInstallLimit: 1,
-              edition: "",
-              moduleNames: [],
-              orderId: "",
-              productBaseDetail: null,
-              productId: "44aa3c6c-cb1a-445c-9c42-3af3f0d1bcf4",
-              productName: "SmartAI浜у搧瀵嗛挜",
-              productPrice: 0,
-              productType: 5,
-              productTypeName: "浜у搧瀵嗛挜",
-              productVersion: "",
-              sdkNames: [],
-              serveYear: 2,
-              targetPlatform: "",
-              usedCount: 0,
-              userId: "",
-            },
-          ],
-        },
-
-        {
-          id: "da09c92a-8bc0-4586-998e-4b6113f457fc",
-
-          orderMoney: 2320,
-          products: [
-            {
-              ChCount: 16,
-              activateCode: "E8B72-E0B09-5F44B-8BBC4-1C5AC",
-              activeTime: "",
-              appendix: [],
-              authCount: 16,
-              cameraCount: 0,
-              codeStatus: 0,
-              devCount: 1,
-              devIdList: ["407394c3-bc46-446b-88d5-ddf6d4694e32"],
-              devInstallLimit: 1,
-              edition: "",
-              moduleNames: [],
-              orderId: "",
-              productBaseDetail: null,
-              productId: "44aa3c6c-cb1a-445c-9c42-3af3f0d1bcf4",
-              productName: "SmartAI浜у搧瀵嗛挜",
-              productPrice: 0,
-              productType: 5,
-              productTypeName: "浜у搧瀵嗛挜",
-              productVersion: "",
-              sdkNames: [],
-              serveYear: 2,
-              targetPlatform: "",
-              usedCount: 0,
-              userId: "",
-            },
-          ],
-        },
-      ],
+      orderList: [ ],
       phone: {
         phoneNum: "",
         verifyCode: "",
@@ -354,6 +285,11 @@
     this.validateSn();
   },
   methods: {
+    startAndEnd(createTime,serveYear){
+      let year = createTime.split("-")[0]
+      let endTime = parseInt(year) + serveYear + createTime.slice(4)
+      return createTime + " - " + endTime
+    },
     activeVerByOrd() {
       activeByOrder({
         token: this.token,
@@ -373,6 +309,7 @@
     validateSn() {
       getSN().then((res) => {
         this.snExpire = res.data.expire;
+        this.activeDialog = res.data.expire
         this.showFreeVersion = res.data.sn == "" || res.data.expire;
         this.versionName = this.getVersionName(res.data.edition);
       });
@@ -427,7 +364,7 @@
             getShopOrderList({ token: this.token })
               .then((res) => {
                 if (res.code == 200) {
-                  // this.orderList = res.data.list;
+                  this.orderList = res.data.list;
                 } else {
                   this.$notify.error("鑾峰彇璁㈠崟鍒楄〃澶辫触");
                 }

--
Gitblit v1.8.0