Browse Source

获客数

xiaohaizhao 1 year ago
parent
commit
75f719fc8a
1 changed files with 24 additions and 1 deletions
  1. 24 1
      components/bottomModules/bottom2.vue

+ 24 - 1
components/bottomModules/bottom2.vue

@@ -1,7 +1,10 @@
 <template>
   <view class="box">
     <view class="title"> 免费帮您获取装修预算 </view>
-    <view class="total"> 今日已有 <text class="num">258</text>位业主申请 </view>
+    <view class="total">
+      今日已有 <text class="num">{{ applyForCount }}</text
+      >位业主申请
+    </view>
     <view
       class="input-box"
       hover-class="navigator-hover"
@@ -11,6 +14,7 @@
         type="digit"
         @input="onInput"
         :focus="areaFocus"
+        @blur="areaFocus = false"
         placeholder="您房子的面积是多少?"
         style="color: #fff"
         placeholder-class="placeholder"
@@ -83,6 +87,7 @@ export default {
   name: "bottom2",
   data() {
     return {
+      applyForCount: 0,
       areaFocus: false,
       submitData: {
         area: "100",
@@ -141,6 +146,24 @@ export default {
       ],
     };
   },
+  created() {
+    this.$Http
+      .basic({
+        classname: "sysmanage.develop.datafunction.datafunction",
+        method: "execute",
+        content: {
+          functionname: "appointmentcount",
+          parameter: {},
+        },
+      })
+      .then((res) => {
+        if (this.cutoff(res.msg)) return;
+        console.log("获取申请数量", res);
+        if (res.data.length) {
+          this.applyForCount = res.data[0].count;
+        }
+      });
+  },
   methods: {
     onSelect({ name }, key) {
       this.submitData[key] = name;