Browse Source

修改导卡进度

吴sir 3 months ago
parent
commit
1f3b897997

+ 5 - 2
src/views/admin/order/BuyCard/detaile.vue

@@ -198,9 +198,12 @@ watch(() => modelValue.value, async (val) => {
 const CardProgress = async () => {
     const res = await GuideCardProgress({ id: FormDataList.value.id });
     if (res.code === 200) {
-        show.value = res.data !== 0 && res.data != '\r总体进度:10/10 (100.00%)';
+        const searchStr = '100.00%';
+        const regex = new RegExp(searchStr);
+        const match = res.data.match(regex);
+        show.value = res.data !== 0 && !match;
         schedule.value = res.data;
-        if (res.data == '\r总体进度:10/10 (100.00%)') {
+        if (match) {
             getICCIDDetaile();
         }
     }

+ 5 - 2
src/views/user/order/BuyCard/detaile.vue

@@ -198,9 +198,12 @@ watch(() => modelValue.value, async (val) => {
 const CardProgress = async () => {
     const res = await GuideCardProgress({ id: FormDataList.value.id });
     if (res.code === 200) {
-        show.value = res.data !== 0 && res.data != '\r总体进度:10/10 (100.00%)';
+        const searchStr = '100.00%';
+        const regex = new RegExp(searchStr);
+        const match = res.data.match(regex);
+        show.value = res.data !== 0 && !match;
         schedule.value = res.data;
-        if (res.data == '\r总体进度:10/10 (100.00%)') {
+        if (match) {
             getICCIDDetaile();
         }
     }