Explorar o código

Merge branch 'dev/v1.1.15_yf' of jianyu/web into feature/v1.1.15

yangfeng hai 1 semana
pai
achega
9d01ffea49

+ 22 - 0
apps/bigmember_pc/src/assets/style/common.scss

@@ -311,3 +311,25 @@ a {
 .mt-16px {
   margin-top: 16px;
 }
+
+.custom-toast-loading{
+  background-color: transparent!important;
+  .el-loading-spinner{
+    width: 120px;
+    height: 120px;
+    left: 50%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    border-radius: 16px;
+    background: rgba(0, 0, 0, 0.7);
+  }
+  .el-icon-loading{
+    font-size: 24px;
+    color: #fff;
+    line-height: 1.5;
+  }
+  .el-loading-text{
+    color: #fff;
+  }
+}

+ 12 - 2
apps/bigmember_pc/src/components/zhima/report-guide-banner.vue

@@ -208,6 +208,8 @@ const handleDownload = debounce((item) => {
             window.open(`${item.url}?name=${item.name}&id=${props.bId}`)
           }
         }
+        // 重新获取报告按钮状态(查询使用次数)
+        getReportBtnStatus()
       })
     }
   }
@@ -229,12 +231,12 @@ const onClickCompetitor = (ent, parent) => {
     deductPackage(item, (code, data) => {
       if (code === 0 && data) {
         window.open(`/swordfish/page_big_pc/report/analysis/detail?id=${data}`)
-        // 重新获取报告按钮状态
-        getReportBtnStatus()
       } else {
         // 没购买过||抵扣失败跳到购买页
         window.open(`${parent.url}?name=${ent}&id=${props.bId}`)
       }
+      // 重新获取报告按钮状态(查询使用次数)
+      getReportBtnStatus()
     })
   }
 }
@@ -324,6 +326,12 @@ const startBubbleAnimation = () => {
 
 // 套餐扣除
 const deductPackage = async (item, callback) => {
+  const loading = that.$loading({
+    lock: true,
+    text: 'Loading',
+    spinner: 'el-icon-loading',
+    customClass: 'custom-toast-loading'
+  })
   const { type, name } = item
   const params = {
     ent_name: type === 'competitor' ? name : '',
@@ -334,8 +342,10 @@ const deductPackage = async (item, callback) => {
   }
   try {
     const { error_code: code, data } = await ajaxReportEquityDeduct(params)
+    loading.close()
     callback && callback(code, data)
   } catch (error) {
+    loading.close()
     callback && callback()
   }
 }

+ 1 - 0
apps/bigmember_pc/src/main.js

@@ -42,6 +42,7 @@ Vue.prototype.$echarts = echarts
 Vue.prototype.$alert = MessageBox.alert
 Vue.prototype.$confirm = MessageBox.confirm
 Vue.config.productionTip = false
+Vue.prototype.$loading = Loading.service
 
 //  适配 vite-plugin-qiankun
 

+ 15 - 0
apps/bigmember_pc/src/views/reportDownload/record.vue

@@ -307,6 +307,10 @@
                   >{{ scope.row.buyer }}</span
                 >
               </div>
+              <div>
+                <span>获取方式:</span>
+                <span>{{scope.row.acquisition_method | formatGetWay}}</span>
+              </div>
             </div>
             <!-- 业主采购、企业中标分析报告-->
             <el-tooltip
@@ -672,6 +676,17 @@ export default {
           break
       }
       return result
+    },
+    formatGetWay(value) {
+      if(value === 0) {
+        return '付费购买'
+      } else if(value > 0){
+        return '会员获取-免费下载'
+      } else if (value < 0) {
+        return '会员获取-付费购买'
+      } else {
+        return '-'
+      }
     }
   },
   computed: {

+ 19 - 0
apps/mobile/src/views/reportAnalysis/components/listItem.vue

@@ -197,6 +197,14 @@
             {{ data.buyer || '-' }}
           </p>
         </div>
+        <div class="item">
+          <p class="label">获取方式:</p>
+          <p
+            class="value ellipsis"
+          >
+            {{ data.acquisition_method | formatGetWay }}
+          </p>
+        </div>
       </div>
     </div>
     <div class="foot_btn" @click="$emit('download', data)">
@@ -295,6 +303,17 @@ export default {
       const end = new Date(rangeTimeArr[1] * 1000).getTime()
       console.log(start)
       return `${dateFormatter(start, fmt)}至${dateFormatter(end, fmt)}`
+    },
+    formatGetWay(value) {
+      if(value === 0) {
+        return '付费购买'
+      } else if(value > 0){
+        return '会员获取-免费下载'
+      } else if (value < 0) {
+        return '会员获取-付费购买'
+      } else {
+        return '-'
+      }
     }
   },
   props: {