徐志豪 5 anni fa
parent
commit
c9b201573d

BIN
miniprogram/assets/font/iconfont.eot


File diff suppressed because it is too large
+ 1 - 0
miniprogram/assets/font/iconfont.js


+ 0 - 331
miniprogram/assets/font/iconfont.json

@@ -1,331 +0,0 @@
-{
-  "id": "1790241",
-  "name": "看房4dkk-经纪人端",
-  "font_family": "iconfont",
-  "css_prefix_text": "icon",
-  "description": "",
-  "glyphs": [
-    {
-      "icon_id": "16030488",
-      "name": "my_set",
-      "font_class": "my_set",
-      "unicode": "e708",
-      "unicode_decimal": 59144
-    },
-    {
-      "icon_id": "15968403",
-      "name": "card_mail",
-      "font_class": "card_mail",
-      "unicode": "e706",
-      "unicode_decimal": 59142
-    },
-    {
-      "icon_id": "15968404",
-      "name": "card_address",
-      "font_class": "card_address",
-      "unicode": "e707",
-      "unicode_decimal": 59143
-    },
-    {
-      "icon_id": "15727298",
-      "name": "my_product",
-      "font_class": "my_product",
-      "unicode": "e6fe",
-      "unicode_decimal": 59134
-    },
-    {
-      "icon_id": "15727299",
-      "name": "my_contacts",
-      "font_class": "my_contacts",
-      "unicode": "e6ff",
-      "unicode_decimal": 59135
-    },
-    {
-      "icon_id": "15727300",
-      "name": "my_enterprise",
-      "font_class": "my_enterprise",
-      "unicode": "e700",
-      "unicode_decimal": 59136
-    },
-    {
-      "icon_id": "15727301",
-      "name": "my_reportform",
-      "font_class": "my_reportform",
-      "unicode": "e701",
-      "unicode_decimal": 59137
-    },
-    {
-      "icon_id": "15602811",
-      "name": "search_clear",
-      "font_class": "search_clear",
-      "unicode": "e6fb",
-      "unicode_decimal": 59131
-    },
-    {
-      "icon_id": "15221670",
-      "name": "cus_edit",
-      "font_class": "cus_edit",
-      "unicode": "e6f7",
-      "unicode_decimal": 59127
-    },
-    {
-      "icon_id": "14817584",
-      "name": "scene_tit_tool",
-      "font_class": "scene_tit_tool",
-      "unicode": "e6f6",
-      "unicode_decimal": 59126
-    },
-    {
-      "icon_id": "14409269",
-      "name": "scene_alllayout",
-      "font_class": "scene_alllayout",
-      "unicode": "e6f5",
-      "unicode_decimal": 59125
-    },
-    {
-      "icon_id": "14409200",
-      "name": "vr_tagging",
-      "font_class": "vr_tagging",
-      "unicode": "e6d2",
-      "unicode_decimal": 59090
-    },
-    {
-      "icon_id": "14409201",
-      "name": "bot_input_more",
-      "font_class": "bot_input_more",
-      "unicode": "e6d3",
-      "unicode_decimal": 59091
-    },
-    {
-      "icon_id": "14409202",
-      "name": "bot_input_voice",
-      "font_class": "bot_input_voice",
-      "unicode": "e6d4",
-      "unicode_decimal": 59092
-    },
-    {
-      "icon_id": "14409203",
-      "name": "atab_msg",
-      "font_class": "atab_msg",
-      "unicode": "e6d5",
-      "unicode_decimal": 59093
-    },
-    {
-      "icon_id": "14409204",
-      "name": "atab_customer",
-      "font_class": "atab_customer",
-      "unicode": "e6d6",
-      "unicode_decimal": 59094
-    },
-    {
-      "icon_id": "14409205",
-      "name": "atab_me",
-      "font_class": "atab_me",
-      "unicode": "e6d7",
-      "unicode_decimal": 59095
-    },
-    {
-      "icon_id": "14409206",
-      "name": "cus_add",
-      "font_class": "cus_add",
-      "unicode": "e6d8",
-      "unicode_decimal": 59096
-    },
-    {
-      "icon_id": "14409207",
-      "name": "cus_call",
-      "font_class": "cus_call",
-      "unicode": "e6d9",
-      "unicode_decimal": 59097
-    },
-    {
-      "icon_id": "14409208",
-      "name": "cus_chose_allow",
-      "font_class": "cus_chose_allow",
-      "unicode": "e6da",
-      "unicode_decimal": 59098
-    },
-    {
-      "icon_id": "14409209",
-      "name": "tab_hose",
-      "font_class": "atab_hose",
-      "unicode": "e6db",
-      "unicode_decimal": 59099
-    },
-    {
-      "icon_id": "14409210",
-      "name": "list_about",
-      "font_class": "list_about",
-      "unicode": "e6dc",
-      "unicode_decimal": 59100
-    },
-    {
-      "icon_id": "14409211",
-      "name": "hose_arrow_active",
-      "font_class": "hose_arrow_active",
-      "unicode": "e6dd",
-      "unicode_decimal": 59101
-    },
-    {
-      "icon_id": "14409212",
-      "name": "cus_star",
-      "font_class": "cus_star",
-      "unicode": "e6de",
-      "unicode_decimal": 59102
-    },
-    {
-      "icon_id": "14409213",
-      "name": "hose_arrow_normal",
-      "font_class": "hose_arrow_normal",
-      "unicode": "e6df",
-      "unicode_decimal": 59103
-    },
-    {
-      "icon_id": "14409214",
-      "name": "minfo_fav_active",
-      "font_class": "minfo_fav_active",
-      "unicode": "e6e0",
-      "unicode_decimal": 59104
-    },
-    {
-      "icon_id": "14409215",
-      "name": "maps_call",
-      "font_class": "maps_call",
-      "unicode": "e6e1",
-      "unicode_decimal": 59105
-    },
-    {
-      "icon_id": "14409216",
-      "name": "maps_msg",
-      "font_class": "maps_msg",
-      "unicode": "e6e2",
-      "unicode_decimal": 59106
-    },
-    {
-      "icon_id": "14409217",
-      "name": "list_hose",
-      "font_class": "list_hose",
-      "unicode": "e6e3",
-      "unicode_decimal": 59107
-    },
-    {
-      "icon_id": "14409218",
-      "name": "scene_feedback",
-      "font_class": "scene_feedback",
-      "unicode": "e6e4",
-      "unicode_decimal": 59108
-    },
-    {
-      "icon_id": "14409219",
-      "name": "cus_msg",
-      "font_class": "cus_msg",
-      "unicode": "e6e5",
-      "unicode_decimal": 59109
-    },
-    {
-      "icon_id": "14409220",
-      "name": "scene_tags_close",
-      "font_class": "scene_tags_close",
-      "unicode": "e6e6",
-      "unicode_decimal": 59110
-    },
-    {
-      "icon_id": "14409221",
-      "name": "minfo_fav_normal",
-      "font_class": "minfo_fav_normal",
-      "unicode": "e6e7",
-      "unicode_decimal": 59111
-    },
-    {
-      "icon_id": "14409222",
-      "name": "scene_rule_normal",
-      "font_class": "scene_rule_normal",
-      "unicode": "e6e8",
-      "unicode_decimal": 59112
-    },
-    {
-      "icon_id": "14409223",
-      "name": "home_search",
-      "font_class": "home_search",
-      "unicode": "e6e9",
-      "unicode_decimal": 59113
-    },
-    {
-      "icon_id": "14409224",
-      "name": "rinfo_ban_ele",
-      "font_class": "rinfo_ban_ele",
-      "unicode": "e6ea",
-      "unicode_decimal": 59114
-    },
-    {
-      "icon_id": "14409225",
-      "name": "scene_tags_normal",
-      "font_class": "scene_tags_normal",
-      "unicode": "e6eb",
-      "unicode_decimal": 59115
-    },
-    {
-      "icon_id": "14409226",
-      "name": "scene_tit_arrow",
-      "font_class": "scene_tit_arrow",
-      "unicode": "e6ec",
-      "unicode_decimal": 59116
-    },
-    {
-      "icon_id": "14409227",
-      "name": "my_list_arrow",
-      "font_class": "my_list_arrow",
-      "unicode": "e6ed",
-      "unicode_decimal": 59117
-    },
-    {
-      "icon_id": "14409228",
-      "name": "scene_tit_share",
-      "font_class": "scene_tit_share",
-      "unicode": "e6ee",
-      "unicode_decimal": 59118
-    },
-    {
-      "icon_id": "14409229",
-      "name": "scene_vrmode",
-      "font_class": "scene_vrmode",
-      "unicode": "e6ef",
-      "unicode_decimal": 59119
-    },
-    {
-      "icon_id": "14409230",
-      "name": "scene_map_3d",
-      "font_class": "scene_map_3d",
-      "unicode": "e6f0",
-      "unicode_decimal": 59120
-    },
-    {
-      "icon_id": "14409231",
-      "name": "case_logo",
-      "font_class": "case_logo",
-      "unicode": "e6f1",
-      "unicode_decimal": 59121
-    },
-    {
-      "icon_id": "14409232",
-      "name": "maps_nav",
-      "font_class": "maps_nav",
-      "unicode": "e6f2",
-      "unicode_decimal": 59122
-    },
-    {
-      "icon_id": "14409233",
-      "name": "scene_rule_close",
-      "font_class": "scene_rule_close",
-      "unicode": "e6f3",
-      "unicode_decimal": 59123
-    },
-    {
-      "icon_id": "14409234",
-      "name": "mode_loading",
-      "font_class": "mode_loading",
-      "unicode": "e6f4",
-      "unicode_decimal": 59124
-    }
-  ]
-}

BIN
miniprogram/assets/font/iconfont.ttf


BIN
miniprogram/assets/font/iconfont.woff


BIN
miniprogram/assets/font/iconfont.woff2


File diff suppressed because it is too large
+ 18 - 6
miniprogram/assets/font/iconfont.wxss


+ 4 - 4
miniprogram/config/config.js

@@ -1,5 +1,5 @@
-export const IM_HOST = 'ws://haowantest.4dkankan.com'
-export const API_BASE_URL = 'http://haowantest.4dkankan.com'
+// export const IM_HOST = 'ws://haowantest.4dkankan.com'
+// export const API_BASE_URL = 'http://haowantest.4dkankan.com'
 
 
 // export const IM_HOST = 'ws://192.168.0.83:8075'
@@ -7,5 +7,5 @@ export const API_BASE_URL = 'http://haowantest.4dkankan.com'
 // export const API_BASE_URL = 'http://192.168.0.83:8075'
 
 
-// export const IM_HOST = 'wss://haowan.4dkankan.com'
-// export const API_BASE_URL = 'https://haowan.4dkankan.com'
+export const IM_HOST = 'wss://haowan.4dkankan.com'
+export const API_BASE_URL = 'https://haowan.4dkankan.com'

+ 5 - 3
miniprogram/dataReport/components/ec-canvas/defaultOption.js

@@ -1,6 +1,6 @@
 const defaultOptions = {
   title: {
-    text: '展会访问数据',
+    text: '',
     left: 'left',
     top: 0,
     textStyle: {
@@ -28,11 +28,13 @@ const defaultOptions = {
 
   tooltip: {
     show: true,
-    trigger: 'axis'
+    trigger: 'axis',
+    // formatter: "{c} {d}"
   },
   xAxis: {
-    type: 'value',
+    type: 'category',
     // boundaryGap: false,
+    data: ['9-15', '9-15', '9-15', '9-15', '9-15', '9-15', '9-15', '9-15', ],
     axisTick: {
       show: false
     },

+ 109 - 24
miniprogram/dataReport/components/scene-report/scene-report.js

@@ -4,32 +4,19 @@ import CensusApi from '../../../apis/census'
 
 Component({
   /**
-   * 组件的属性列表
-   */
-  properties: {
-    sceneNum: {
-      type: String,
-      observer: function (val) {
-        if (!this.properties.date || !this.properties.sceneNum) return;
-        CensusApi.getSceneCensus({date: this.properties.date, sceneNum: val})
-      }
-    },
-    date: {
-      type: String,
-      observer: function (val) {
-        if (!this.properties.date || !this.properties.sceneNum) return;
-        CensusApi.getSceneCensus({date: val, sceneNum: this.properties.sceneNum})
-      }
-    },
-  },
-
-  /**
    * 组件的初始数据
    */
   data: {
+    activeType: 0,
     ec: {
       onInit: initChart
     },
+    ec2: {
+      onInit: init2Chart
+    },
+    barEc: {
+      onInit: initBarChart
+    },
     dataNumList: [
       {
         value: 20,
@@ -58,6 +45,23 @@ Component({
         color: '#F69758'
         
       }
+    ],
+    chartTypes: [
+      {
+        icon: 'data_booth',
+        name: '展位数据',
+        value: 0
+      },
+      {
+        icon: 'data_visitor',
+        name: '访客数据',
+        value: 1
+      },
+      {
+        icon: 'data_wares',
+        name: '商品数据',
+        value: 2
+      },
     ]
   },
 
@@ -67,7 +71,12 @@ Component({
   ready () {
   },
   methods: {
-    
+    changeActiveType (e) {
+      const { value } = e.currentTarget.dataset
+      this.setData({
+        activeType: value
+      })
+    }
   }
 })
 
@@ -78,17 +87,93 @@ function initChart(canvas, width, height, dpr) {
     devicePixelRatio: dpr // new
   });
   canvas.setChart(chart);
+  
+  var option = {
+    title: {
+      text: ''
+    },
+    tooltip: {
+      formatter: `{a}: {c} \n ${new Date().getFullYear()}-{b}`
+    },
+    series: [
+      {
+        data: [500,500,500,500,500],
+        type: 'line',
+        smooth: true,
+        symbolSize: 0,
+        name: '浏览量'
+      },
+    ]
+  };
+
+  chart.setOption(mergeOptions(option));
+  return chart;
+}
+
+function initBarChart(canvas, width, height, dpr) {
+  const chart = echarts.init(canvas, null, {
+    width: width,
+    height: height,
+    devicePixelRatio: dpr // new
+  });
+  canvas.setChart(chart);
 
   var option = {
     title: {
-      text: '场景浏览数据'
+      text: ''
     },
+    xAxis: {
+      type: 'category',
+      data: ['aaa', 'aaa', 'aaa', 'asdsad'],
+      axisLabel: {
+        align: 'center'
+      }
+    },
+    series: [
+      {
+        name: '浏览量',
+        type: 'bar',
+        data: [2.0, 4.9, 7.0, 11],
+        barGap: 0,
+        barWidth: 10,
+        itemStyle: {
+          barBorderRadius:[10, 10, 0, 0],
+        }
+      }
+    ]
+  };
+  chart.setOption(mergeOptions(option));
+  return chart;
+}
+
+function init2Chart(canvas, width, height, dpr) {
+  const chart = echarts.init(canvas, null, {
+    width: width,
+    height: height,
+    devicePixelRatio: dpr // new
+  });
+  canvas.setChart(chart);
+
+  var option = {
     series: [
       {
-        data: [[0, 1000], [3, 500], [6, 750], [9, 1400], [12, 1250], [15, 1600], [18, 1800]],
+        data: [1000,1000,1000,1000],
+        type: 'line',
+        smooth: true,
+        name: '客户访问量',
+        areaStyle: {
+          opacity: 0.1
+        },
+        symbolSize: 0
+      },
+      {
+        data: [1201, 1201, 1201, 1201, 1201, 1201],
         type: 'line',
         smooth: true,
-        name: '主页访问量',
+        name: '商务询盘量',
+        areaStyle: {
+          opacity: 0.1
+        },
         symbolSize: 0
       },
     ]

+ 20 - 5
miniprogram/dataReport/components/scene-report/scene-report.wxml

@@ -1,17 +1,32 @@
 <view class="sub-title">综合数据</view>
 <view class="data-num-w">
-  <view class="data-num" wx:for="{{ dataNumList }}" wx:key="{{index}}" >
+  <view class="data-num" wx:for="{{ dataNumList }}" wx:key="index" >
     <view class="value" style="background-color: {{item.bgColor}}; color: {{ item.color }}">{{ item.value }}</view>
     <view class="label">{{ item.label }}</view>
   </view>
 </view>
 
 <view class="sub-title">可视化视图</view>
-<view class="canvas-container">
+<view class="chart-type-w">
+  <view class="chart-type {{ activeType === item.value ? 'is-active' : '' }}" wx:for="{{chartTypes}}" wx:key="index" data-value="{{item.value}}" bindtap="changeActiveType" >
+    <icon class="icon" icon="{{ item.icon }}" />
+    <text >{{ item.name }}</text>
+  </view>
+</view>
+<view class="canvas-container" wx:if="{{ activeType === chartTypes[0].value }}">
+  <view class="sub-title">展位浏览数据</view>
   <ec-canvas id="mychart-dom-multi-line"  canvas-id="mychart-multi-line" ec="{{ ec }}" />
 </view>
+<view class="canvas-container" wx:if="{{ activeType === chartTypes[1].value }}">
+  <view class="sub-title">客户访问数据</view>
+  <ec-canvas id="mychart-dom-multi-line"  canvas-id="mychart-multi-line" ec="{{ ec2 }}" />
+</view>
+<view class="canvas-container" wx:if="{{ activeType === chartTypes[2].value }}">
+  <view class="sub-title">热点(商品)浏览数据</view>
+  <ec-canvas id="mychart-dom-multi-line"  canvas-id="mychart-multi-bar" ec="{{ barEc }}" />
+</view>
 
-<view class="customer-report">
-  <view class="title">客户统计</view>
-  
+<view class="canvas-container" >
+  <view class="sub-title">商机转化率</view>
+  <ec-canvas id="mychart-dom-multi-line"  canvas-id="mychart-multi-bar" ec="{{ barEc }}" />
 </view>

+ 39 - 0
miniprogram/dataReport/components/scene-report/scene-report.wxss

@@ -39,4 +39,43 @@
   width: 100%;
   height: 476rpx;
   margin-bottom: 40rpx;
+  position: relative;
+}
+
+.canvas-container .sub-title {
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+.chart-type-w {
+  display: flex;
+  margin-bottom: 34rpx;
+}
+
+.chart-type {
+  flex: 1;
+  margin-right: 20rpx;
+  color: #909090;
+  border: 1px solid #909090;
+  border-radius: 8rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  padding-left: 32rpx;
+  text-align: right;
+  font-size: 22rpx;
+  display: flex;
+  align-items: center;
+}
+.chart-type:last-child {
+  margin-right: 0;
+}
+.icon {
+  height: 100%;
+  margin-right: 24rpx;
+}
+.chart-type.is-active {
+  border-color: #17D2D2;
+}
+.chart-type.is-active .icon {
+  color: #17D2D2;
 }

+ 4 - 4
miniprogram/pages/goods-detail/goods-detail.js

@@ -75,10 +75,10 @@ VueLikePage([], {
         Router.push('login')
         return
       }
-      // CenSus.addGoodsQueryNum({
-      //   goodsId: this.goods_id,
-      //   sceneNum: this.company.sceneNum
-      // })
+      CenSus.addGoodsQueryNum({
+        goodsId: this.goods_id,
+        sceneNum: this.company.sceneNum
+      })
       ImSend.sendMsg({content:'你好', msgType:'text', toId:this.company.guideId}).then(() => {
         Router.push({
           url: 'chat',