liyongli 3 năm trước cách đây
mục cha
commit
34cc5ab6e5

+ 24 - 2
app.js

@@ -2,9 +2,31 @@
 App({
   onLaunch: function () {
     let test = wx.getAccountInfoSync().miniProgram.envVersion;
-    if(test !== 'release') { // 非正式环境
+    if (test !== 'release') { // 非正式环境
       this.baseUrl = "https://bigdata.smcic.net"
     }
+    let _this = this;
+    wx.request({
+      url: this.baseUrl + '/sys-config',
+      success: function (res) {
+        if (res.statusCode !== 200) return wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
+        })
+        let data = res.data || [];
+        for (let i = 0; i < data.length; i++) {
+          const d = data[i];
+          _this.introduce[d.name] = d.value;
+        }
+      },
+      fail: function (err) {
+        wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
+        })
+      },
+    })
   },
-  baseUrl: "https://bigdata.smcic.net"
+  baseUrl: "https://bigdata.smcic.net",
+  introduce: {}
 })

+ 1 - 0
app.wxss

@@ -3,6 +3,7 @@ page{
   width: 100%;
   height: 100vh;
   background-color: #20223b;
+  --tips-btn: 1.05em;
 }
 .container {
   position: absolute;

BIN
assets/1.jpg


+ 1 - 1
components/tab/tab.wxml

@@ -1,7 +1,7 @@
 <!--components/tab/tab.wxml-->
 <scroll-view scroll-x class="Tab">
   <view wx:for="{{tabList}}" class="{{'tabItem ' + (type == item.type ? 'active' : '')}}" wx:key="type">
-    <view class="item" bindtap="click" data-type="{{item.type}}" data-title="{{item.oriName}}"
+    <view class="item" bindtap="click" data-type="{{item.type}}" data-title="{{item.oriName || item.name}}"
       data-isUpdate="{{item.isUpdate}}"
       data-index="{{index}}"
       data-worldImgURL="{{item.worldImgURL}}" data-worldURL="{{item.worldURL}}">

+ 36 - 12
pages/home/components/topic/topic.js

@@ -88,6 +88,7 @@ Component({
    */
   data: {
     error: "",
+    detail: "",
     headData: {},
     contrast: [],
     all: [],
@@ -142,14 +143,16 @@ Component({
             _this.setData({
               headData: res.data || {}
             })
-          } else _this.setData({
-            error: '请重启后查看'
+          } else  wx.showToast({
+            title: '请重启小程序',
+            icon: "error"
           })
         },
         data,
         fail: function (err) {
-          _this.setData({
-            error: '数据错误'
+          wx.showToast({
+            title: '请重启小程序',
+            icon: "error"
           })
         },
         complete: function (res) { }
@@ -173,8 +176,9 @@ Component({
               _this.setData({
                 contrast
               })
-          } else _this.setData({
-            error: '请重启后查看'
+          } else  wx.showToast({
+            title: '请重启小程序',
+            icon: "error"
           })
         },
         data,
@@ -224,8 +228,9 @@ Component({
             let newType = JSON.stringify(list);
             if (oldType != newType)
               _this.setData(setD)
-          } else _this.setData({
-            error: '请重启后查看'
+          } else  wx.showToast({
+            title: '请重启小程序',
+            icon: "error"
           })
         },
         data,
@@ -251,8 +256,9 @@ Component({
             _this.setData({
               wordList: res.data || []
             })
-          } else _this.setData({
-            error: '请重启后查看'
+          } else  wx.showToast({
+            title: '请重启小程序',
+            icon: "error"
           })
         },
         data,
@@ -308,8 +314,9 @@ Component({
               }
             }
             _this.setData(p)
-          } else _this.setData({
-            error: '请重启后查看'
+          } else  wx.showToast({
+            title: '请重启小程序',
+            icon: "error"
           })
         },
         data,
@@ -340,6 +347,23 @@ Component({
           toUrl = true;
         }
       })
+    },
+    showDetail: function (e) {
+      let introduce = e.currentTarget.dataset.introduce || "";
+      console.log(introduce)
+      this.setData({
+        detail: app.introduce[introduce] || ""
+      })
     }
   }
 })
+/**
+ * 总浏览量:抖音,快手等平台浏览数总和。
+ * 总点赞数:抖音,快手等平台点赞数总和。
+ * 总转发量:抖音,快手等平台转发数总和。
+ * 直播点赞数:抖音,快手等平台直播场次点赞总和。
+ * 原创量:抖音,快手等平台原创数总和。
+ * 总评论数:抖音,快手等平台评论数总和。
+ * 直播观看人数:抖音,快手等平台直播场次观看人数总和。
+ * 直播评论数:抖音,快手等平台直播场次直播评论数总和。
+ */

+ 2 - 0
pages/home/components/topic/topic.json

@@ -3,6 +3,8 @@
   "usingComponents": {
     "chart" : "/components/Chart/Chart",
     "table" : "/components/table/table",
+    "mp-icon": "weui-miniprogram/icon/icon",
+    "mp-dialog": "weui-miniprogram/dialog/dialog",
     "mp-toptips": "weui-miniprogram/toptips/toptips",
     "wordCloud": "/components/wordCloud/wordCloud",
     "lineChart": "/components/lineChart/lineChart"

+ 46 - 12
pages/home/components/topic/topic.wxml

@@ -3,11 +3,19 @@
 
 <view class="topic">
   <view class="topTable">
-    <view class="topicTable">
-      <view wx:if="{{headData.total_pv != -1}}" class="topicItem">总浏览量:</view>
-      <view wx:if="{{headData.total_digg != -1}}" class="topicItem">总点赞数:</view>
-      <view wx:if="{{headData.total_comment != -1}}" class="topicItem">总转发量:</view>
-      <view wx:if="{{headData.live_digg != -1}}" class="topicItem">直播点赞数:</view>
+    <view class="topicTable title">
+      <view wx:if="{{headData.total_pv != -1}}" data-introduce="total_pv" bindtap="showDetail" class="topicItem">
+        总浏览量 <text wx:if="{{select == 1}}" class="show">?</text> :
+      </view>
+      <view wx:if="{{headData.total_digg != -1}}" data-introduce="total_digg" bindtap="showDetail" class="topicItem">总点赞数
+        <text wx:if="{{select == 1}}" class="show">?</text> :
+      </view>
+      <view wx:if="{{headData.total_comment != -1}}" data-introduce="total_forward" bindtap="showDetail" class="topicItem">总转发量
+        <text wx:if="{{select == 1}}" class="show">?</text> :
+      </view>
+      <view wx:if="{{headData.live_digg != -1}}" data-introduce="live_digg" bindtap="showDetail" class="topicItem">直播点赞数
+        <text wx:if="{{select == 1}}" class="show">?</text> :
+      </view>
     </view>
     <view class="topicTable">
       <view wx:if="{{headData.total_pv != -1}}" class="topicItem">{{filter.valueFormat(headData.total_pv)}}</view>
@@ -16,13 +24,20 @@
       </view>
       <view wx:if="{{headData.live_digg != -1}}" class="topicItem">{{filter.valueFormat(headData.live_digg)}}</view>
     </view>
-    <view class="topicTable">
-      <view wx:if="{{headData.total_ori != -1}}" class="topicItem topicItemRigh">原创量:</view>
-      <view wx:if="{{headData.total_comment != -1}}" class="topicItem topicItemRigh">总评论数:</view>
+    <view class="topicTable title">
+      <view wx:if="{{headData.total_ori != -1}}" data-introduce="total_ori" bindtap="showDetail"
+        class="topicItem topicItemRigh">原创量 <text wx:if="{{select == 1}}" class="show">?</text> :
+      </view>
+      <view wx:if="{{headData.total_comment != -1}}" data-introduce="total_comment" bindtap="showDetail"
+        class="topicItem topicItemRigh">总评论数 <text wx:if="{{select == 1}}" class="show">?</text> :
+      </view>
       <view class="topicItem topicItemRigh">
-        <view wx:if="{{headData.live_uv != -1}}">直播观看人数:</view>
+        <view wx:if="{{headData.live_uv != -1}}" data-introduce="live_uv" bindtap="showDetail">直播观看人数 <text
+          wx:if="{{select == 1}}" class="show">?</text> :</view>
+      </view>
+      <view wx:if="{{headData.live_digg != -1}}" data-introduce="live_digg" bindtap="showDetail" class="topicItem">直播评论数
+        <text wx:if="{{select == 1}}" class="show">?</text> :
       </view>
-      <view wx:if="{{headData.live_digg != -1}}" class="topicItem">直播点赞数:</view>
     </view>
     <view class="topicTable">
       <view wx:if="{{headData.total_ori != -1}}" class="topicItem">{{filter.valueFormat(headData.total_ori)}}</view>
@@ -110,7 +125,26 @@
     <chart id="{{'id' + 8}}" canvasId="{{'canvasId' + 8}}" wx:if="{{yangshi && yangshi.length}}" list="{{yangshi}}"
       yType="pv" xType="nickname" />
   </view>
-
   <!-- 错误提示 -->
   <mp-toptips msg="{{error}}" ext-class="toptips" type="error" show="{{error}}"></mp-toptips>
-</view>
+</view>
+
+<!-- <cover-view wx:if="{{detail !== ''}}" style="width: 750rpx; height: 100vh;position: absolute;background-color:rgba(0,0,0,.5)">
+    <mp-dialog show="{{detail !== ''}}" bindbuttontap="showDetail" buttons="{{[{ text: '确定'}]}}">
+      <view>{{detail}}</view>
+    </mp-dialog>
+  </cover-view> -->
+  <cover-view wx:if="{{detail}}" class="modolBg">
+    <cover-view class="local_dialog">
+      <cover-view class="local_dialog_title">
+        <cover-view class="local_dialog_close" bindtap="showDetail">
+          <cover-view class="local_dialog_close_left"></cover-view>
+          <cover-view class="local_dialog_close_right"></cover-view>
+        </cover-view>
+      </cover-view>
+      <cover-view class="local_dialog_body">
+        {{detail}}
+      </cover-view>
+    </cover-view>
+  </cover-view>
+<!-- <mp-toptips msg="{{detail}}" type="info" show="{{detail !== ''}}"></mp-toptips> -->

+ 86 - 5
pages/home/components/topic/topic.wxss

@@ -12,23 +12,27 @@
   flex: 1;
   white-space: nowrap;
 }
+
 .topTable .topicTable .topicItem {
-  padding: 5px 10px;
+  padding: 5px 0 5px 5px;
 }
 
-.topic .itemView{
+.topic .itemView {
   padding: 5px 10px
 }
+
 .topic .localCells {
   height: 40px;
   line-height: 40px;
 }
-.topic .pKvm{
+
+.topic .pKvm {
   text-align: right;
   margin-right: 10px;
   margin-top: -20px;
 }
-.topic .kvm{
+
+.topic .kvm {
   display: inline-block;
   width: 3.5em;
   color: #fff;
@@ -38,11 +42,88 @@
   text-align: center;
   box-shadow: 0 0 7px #1989fa;
 }
-.topic .kvmText{
+
+.topic .kvmText {
   padding-top: 0.7em;
   width: 2em;
   margin: 0 auto;
   line-height: 1.1em;
   color: #bfcbd9;
   font-weight: 400;
+}
+
+.show {
+  display: inline-block;
+  /* border: 1rpx solid #e2dd52;
+  color: #e2dd52; */
+  border: 1rpx solid #1989fa;
+  color: #1989fa;
+  width: var(--tips-btn);
+  height: var(--tips-btn);
+  line-height: var(--tips-btn);
+  font-size: 12px;
+  text-align: center;
+  border-radius: 50%;
+}
+
+.self_toptips {
+  background-color: rgba(0, 0, 0, .3);
+}
+
+.modolBg {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 1;
+  background-color: rgba(0, 0, 0, .5);
+}
+
+.local_dialog {
+  top: 50%;
+  left: 50%;
+  width: 500rpx;
+  position: absolute;
+  border-radius: 1em;
+  background-image: url("https://bigdata.smcic.net/data/bg12345.jpg");
+  background-size: 100% 100%;
+  transform: translate(-50%, -50%);
+}
+
+.local_dialog_title {
+  height: 1.5em;
+  text-align: right;
+  padding: 8px 15px;
+  margin-bottom: 1rpx;
+  line-height: 1.5em;
+}
+
+.local_dialog_close {
+  display: inline-block;
+  position: relative;
+  width: 1.5em;
+  height: 1.5em;
+}
+
+.local_dialog_close_left,
+.local_dialog_close_right {
+  position: absolute;
+  width: 100%;
+  height: 1rpx;
+  background-color: #121212;
+  top: 50%;
+  transform: rotate(45deg);
+}
+
+.local_dialog_close_right {
+  transform: rotate(135deg);
+}
+
+.local_dialog_body {
+  padding: 8px 15px 15px 15px;
+  white-space: normal;
+  line-height: 1.5em;
+  font-size: 14px;
+  color: #222;
 }

+ 8 - 8
pages/home/home.js

@@ -6,7 +6,6 @@ Page({
    * 页面的初始数据
    */
   data: {
-    actName: "第一季",
     activityList: ["第一季", "第二季"],
     select: "1",
     pageName: "话题",
@@ -127,14 +126,16 @@ Page({
           _this.data.type !== tab[0].type && (setD.type = tab[0].type);
           _this.data.title !== tab[0].name && (setD.title = tab[0].name);
           _this.setData(setD)
-        } else _this.setData({
-          error: '请重启后查看'
+        } else wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
         })
       },
       data:params,
       fail: function (err) {
-        this.setData({
-          error: '数据错误'
+        wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
         })
       },
       complete: function (res) {
@@ -155,12 +156,11 @@ Page({
   bindPickerChange(r) {
     // let v = r.detail.value;
     let v = this.data.select == 0 ? 1: 0;
-    let actName = v === 1 ? "第一季" : "第二季"
     this.setData({
       select: v,
-      type: 0,
-      actName
+      type: 0
     }, () => {
+      app.select = v;
       this.getData()
     })
   }

+ 1 - 0
pages/home/home.json

@@ -2,6 +2,7 @@
   "usingComponents": {
     "tab" : "/components/tab/tab",
     "home": "/pages/home/components/contrast/contrast",
+    "mp-icon": "weui-miniprogram/icon/icon",
     "topic": "/pages/home/components/topic/topic"
   }
 }

+ 18 - 4
pages/home/home.wxml

@@ -3,15 +3,29 @@
   <view class="activity">
     <view class="actbtn">
       <!-- <picker bindchange="bindPickerChange" value="{{select}}" range="{{activityList}}">
-          <button style="color: #fff;width:90%;background-color: #1989fa;" class="mini-btn" type="default" size="mini">{{actName}}</button>
+        <button style="color: #fff;width:90%;background-color: #1989fa;" class="mini-btn" type="default" size="mini">
+          <view class="iconType">
+            <text class="title">{{activityList[select]}}</text>
+            <view class="icon">
+              <mp-icon type="field" icon="arrow" color="#fff" size="{{10}}"></mp-icon>
+            </view>
+          </view>
+        </button>
       </picker> -->
-      <button bindtap="bindPickerChange" style="color: #fff;width:90%;background-color: #1989fa;" class="mini-btn" type="default" size="mini">{{actName}}</button>
+      <button bindtap="bindPickerChange" style="color: #fff;width:90%;background-color: #1989fa;" class="mini-btn"
+        type="default" size="mini">
+        <view class="iconType">
+          <mp-icon class="icon" wx:if="{{select == 1}}" type="field" icon="back" color="#fff" size="{{8}}"></mp-icon>
+          <text class="title">{{activityList[select]}}</text>
+          <mp-icon class="icon" wx:if="{{select == 0}}" type="field" icon="arrow" color="#fff" size="{{10}}"></mp-icon>
+        </view>
+      </button>
     </view>
     <view class="btnGrounp">
       <tab tabList="{{tabList}}" type="{{type}}" bindchangeBar="changeBar"></tab>
     </view>
   </view>
   <home wx:if="{{ type === -1 }}" tablelist="{{tablelist}}" select="{{select}}" />
-  <topic wx:if="{{ type > -1 }}" isUpdata="{{isUpdata}}" select="{{select}}" isShow="{{isShow}}" type="{{type}}" title="{{title}}"
-    jsonURL="{{jsonURL}}" imgURL="{{imgURL}}" sonList="{{tabList[indexNum].childList || []}}" />
+  <topic wx:if="{{ type > -1 }}" isUpdata="{{isUpdata}}" select="{{select}}" isShow="{{isShow}}" type="{{type}}"
+    title="{{title}}" jsonURL="{{jsonURL}}" imgURL="{{imgURL}}" sonList="{{tabList[indexNum].childList || []}}" />
 </view>

+ 12 - 2
pages/home/home.wxss

@@ -21,7 +21,7 @@
 }
 
 .activity .actbtn {
-  width: 160rpx;
+  width: 230rpx;
   vertical-align: middle;
   padding: 14px 0;
   display: inline-block;
@@ -29,8 +29,18 @@
 }
 
 .activity .btnGrounp {
-  width: 590rpx;
+  width: 520rpx;
   vertical-align: middle;
   display: inline-block;
   vertical-align: middle;
 }
+
+.iconType .title{
+  display: inline-block;
+  vertical-align: middle;
+  margin: 0 3px;
+}
+.iconType .icon{
+  display: inline-block;
+  vertical-align: middle;
+}

+ 49 - 33
pages/sonTopic/sonTopic.js

@@ -6,6 +6,8 @@ Page({
    * 页面的初始数据
    */
   data: {
+    detail: "",
+    select: 1,
     userSort: [],
     sonTitle: "",
     imgURL: "",
@@ -51,16 +53,17 @@ Page({
       tabList: sonlist,
       imgURL,
       type,
-      sonTitle: second_name
+      sonTitle: second_name,
+      select: app.select - 0
     })
-    this.getData({ topic_name: second_name || title, season: this.data.select - 0 + 1  });
-    this.getPing({ topic_name: second_name || title, season: this.data.select - 0 + 1  });
-    this.getAccount({ topic_name: second_name || title, platform: "ALL", type: "all", season: this.data.select - 0 + 1  });
-    this.getAccount({ topic_name: second_name || title, platform: "douyin", type: "douyin", season: this.data.select - 0 + 1  });
-    this.getAccount({ topic_name: second_name || title, platform: "kuaishou", type: "kuaishou", season: this.data.select - 0 + 1  });
-    this.getAccount({ topic_name: second_name || title, platform: "yangshi", type: "yangshi", season: this.data.select - 0 + 1  });
-    // this.getWorld({ season: this.data.select - 0 + 1 });
-    this.getWeibo({ topic_name: second_name || title, time: "30d", type: "yangshi", season: this.data.select - 0 + 1  });
+    this.getData({ topic_name: second_name || title, season: app.select - 0 + 1  });
+    this.getPing({ topic_name: second_name || title, season: app.select - 0 + 1  });
+    this.getAccount({ topic_name: second_name || title, platform: "ALL", type: "all", season: app.select - 0 + 1  });
+    this.getAccount({ topic_name: second_name || title, platform: "douyin", type: "douyin", season: app.select - 0 + 1  });
+    this.getAccount({ topic_name: second_name || title, platform: "kuaishou", type: "kuaishou", season: app.select - 0 + 1  });
+    this.getAccount({ topic_name: second_name || title, platform: "yangshi", type: "yangshi", season: app.select - 0 + 1  });
+    // this.getWorld({ season: app.select - 0 + 1 });
+    this.getWeibo({ topic_name: second_name || title, time: "30d", type: "yangshi", season: app.select - 0 + 1  });
   },
 
   /**
@@ -118,19 +121,19 @@ Page({
     this.setData({
       selectread: val.detail
     })
-    this.getWeibo({ topic_name: this.data.sonTitle, time: val.detail, type: "weiboread", season: this.data.select - 0 + 1 }, "read")
+    this.getWeibo({ topic_name: this.data.sonTitle, time: val.detail, type: "weiboread", season: app.select - 0 + 1 }, "read")
   },
   lineChengeme: function (val) {
     this.setData({
       selectme: val.detail
     })
-    this.getWeibo({ topic_name: this.data.sonTitle, time: val.detail, type: "weibome", season: this.data.select - 0 + 1 }, "me")
+    this.getWeibo({ topic_name: this.data.sonTitle, time: val.detail, type: "weibome", season: app.select - 0 + 1 }, "me")
   },
   lineChengeori: function (val) {
     this.setData({
       selectori: val.detail
     })
-    this.getWeibo({ topic_name: this.data.sonTitle, time: val.detail, type: "weiboori", season: this.data.select - 0 + 1 }, "ori")
+    this.getWeibo({ topic_name: this.data.sonTitle, time: val.detail, type: "weiboori", season: app.select - 0 + 1 }, "ori")
   },
 
   getData: function (data) {
@@ -142,8 +145,9 @@ Page({
           _this.setData({
             headData: res.data || {}
           })
-        } else _this.setData({
-          error: '请重启后查看'
+        } else  wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
         })
       },
       data,
@@ -170,8 +174,9 @@ Page({
           _this.setData({
             contrast
           })
-        } else _this.setData({
-          error: '请重启后查看'
+        } else  wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
         })
       },
       data,
@@ -214,14 +219,16 @@ Page({
             setD.userSort = userSort;
           setD[data.type] = list;
           _this.setData(setD)
-        } else _this.setData({
-          error: '请重启后查看'
+        } else  wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
         })
       },
       data,
       fail: function (err) {
-        _this.setData({
-          error: '数据错误'
+        wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
         })
       },
       complete: function (res) { }
@@ -236,8 +243,9 @@ Page({
           _this.setData({
             wordList: res.data || []
           })
-        } else _this.setData({
-          error: '请重启后查看'
+        } else  wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
         })
       },
       data,
@@ -269,7 +277,6 @@ Page({
             '30d': { name: '30天', type: '30d' },
           }
           if (type) {
-            console.log(server, _this.data['select' + type], type)
             p["weibo" + type] = server[_this.data['select' + type]][type] || [];
             p["weiboBtnList" + type] = [];
           } else {
@@ -293,8 +300,9 @@ Page({
             }
           }
           _this.setData(p)
-        } else _this.setData({
-          error: '请重启后查看'
+        } else  wx.showToast({
+          title: '请重启小程序',
+          icon: "error"
         })
       },
       data,
@@ -324,14 +332,22 @@ Page({
       selectori: "30d",
       sonTitle: second_name
     })
-    this.getData({ topic_name: second_name, season: this.data.select - 0 + 1 });
-    this.getPing({ topic_name: second_name, season: this.data.select - 0 + 1 });
-    this.getAccount({ topic_name: second_name, platform: "ALL", type: "all", season: this.data.select - 0 + 1 });
-    this.getAccount({ topic_name: second_name, platform: "douyin", type: "douyin", season: this.data.select - 0 + 1 });
-    this.getAccount({ topic_name: second_name, platform: "kuaishou", type: "kuaishou", season: this.data.select - 0 + 1 });
-    this.getAccount({ topic_name: second_name, platform: "yangshi", type: "yangshi", season: this.data.select - 0 + 1 });
-    // this.getWorld({ season: this.data.select - 0 + 1 });
+    this.getData({ topic_name: second_name, season: app.select - 0 + 1 });
+    this.getPing({ topic_name: second_name, season: app.select - 0 + 1 });
+    this.getAccount({ topic_name: second_name, platform: "ALL", type: "all", season: app.select - 0 + 1 });
+    this.getAccount({ topic_name: second_name, platform: "douyin", type: "douyin", season: app.select - 0 + 1 });
+    this.getAccount({ topic_name: second_name, platform: "kuaishou", type: "kuaishou", season: app.select - 0 + 1 });
+    this.getAccount({ topic_name: second_name, platform: "yangshi", type: "yangshi", season: app.select - 0 + 1 });
+    // this.getWorld({ season: app.select - 0 + 1 });
 
-    this.getWeibo({ topic_name: second_name, time: "30d", type: "yangshi", season: this.data.select - 0 + 1 });
+    this.getWeibo({ topic_name: second_name, time: "30d", type: "yangshi", season: app.select - 0 + 1 });
+  },
+  showDetail: function (e) {
+    if(app.select - 0 != 1) return;
+    let introduce = e.currentTarget.dataset.introduce || "";
+    console.log(introduce)
+    this.setData({
+      detail: app.introduce[introduce] || ""
+    })
   }
 })

+ 82 - 38
pages/sonTopic/sonTopic.wxml

@@ -3,34 +3,57 @@
 <view class="topic basePage">
   <view class="mainTitle">{{pTitle}}</view>
   <tab tabList="{{tabList}}" type="{{type}}" bindchangeBar="changeBar"></tab>
-  <view class="topicTable">
-    <view wx:if="{{headData.total_pv != -1}}" class="topicItem">总浏览量:</view>
-    <view wx:if="{{headData.total_pv != -1}}" class="topicItem">{{filter.valueFormat(headData.total_pv)}}</view>
-    <view wx:if="{{headData.total_ori != -1}}" class="topicItem">原创量:</view>
-    <view wx:if="{{headData.total_ori != -1}}" class="topicItem">{{filter.valueFormat(headData.total_ori)}}</view>
-  </view>
-  <view class="topicTable">
-    <view wx:if="{{headData.total_digg != -1}}" class="topicItem">总点赞数:</view>
-    <view wx:if="{{headData.total_digg != -1}}" class="topicItem">{{filter.valueFormat(headData.total_digg)}}</view>
-    <view wx:if="{{headData.total_comment != -1}}" class="topicItem">总评论数:</view>
-    <view wx:if="{{headData.total_comment != -1}}" class="topicItem">{{filter.valueFormat(headData.total_comment)}}</view>
-  </view>
-  <view class="topicTable">
-    <view wx:if="{{headData.total_forward != -1}}" class="topicItem">总转发量:</view>
-    <view wx:if="{{headData.total_forward != -1}}" class="topicItem">{{filter.valueFormat(headData.total_forward)}}</view>
-    <view class="topicItem"></view>
-    <view class="topicItem"></view>
+  {{detail !== ''}}
+  <view class="topTable">
+    <view class="topicTable">
+      <view wx:if="{{headData.total_pv != -1}}" data-introduce="total_pv" bindtap="showDetail" class="topicItem">总浏览量
+        <text wx:if="{{select == 1}}" class="show">?</text> :</view>
+      <view wx:if="{{headData.total_digg != -1}}" data-introduce="total_digg" bindtap="showDetail" class="topicItem">
+        总点赞数 <text wx:if="{{select == 1}}" class="show">?</text> :</view>
+      <view wx:if="{{headData.total_comment != -1}}" data-introduce="total_comment" bindtap="showDetail"
+        class="topicItem">总转发量 <text wx:if="{{select == 1}}" class="show">?</text> :</view>
+      <view wx:if="{{headData.live_digg != -1}}" data-introduce="live_digg" bindtap="showDetail" class="topicItem">直播点赞数
+        <text wx:if="{{select == 1}}" class="show">?</text> :</view>
+    </view>
+    <view class="topicTable">
+      <view wx:if="{{headData.total_pv != -1}}" class="topicItem">{{filter.valueFormat(headData.total_pv)}}</view>
+      <view wx:if="{{headData.total_digg != -1}}" class="topicItem">{{filter.valueFormat(headData.total_digg)}}</view>
+      <view wx:if="{{headData.total_comment != -1}}" class="topicItem">{{filter.valueFormat(headData.total_forward)}}
+      </view>
+      <view wx:if="{{headData.live_digg != -1}}" class="topicItem">{{filter.valueFormat(headData.live_digg)}}</view>
+    </view>
+    <view class="topicTable">
+      <view wx:if="{{headData.total_ori != -1}}" data-introduce="total_ori" bindtap="showDetail"
+        class="topicItem topicItemRigh">原创量 <text wx:if="{{select == 1}}" class="show">?</text> :</view>
+      <view wx:if="{{headData.total_comment != -1}}" data-introduce="total_comment" bindtap="showDetail"
+        class="topicItem topicItemRigh">总评论数 <text wx:if="{{select == 1}}" class="show">?</text> :</view>
+      <view class="topicItem topicItemRigh">
+        <view wx:if="{{headData.live_uv != -1}}" data-introduce="live_uv" bindtap="showDetail">直播观看人数 <text
+          wx:if="{{select == 1}}" class="show">?</text> :</view>
+      </view>
+      <view wx:if="{{headData.live_digg != -1}}" data-introduce="live_digg" bindtap="showDetail" class="topicItem">直播评论数
+        <text wx:if="{{select == 1}}" class="show">?</text> :</view>
+    </view>
+    <view class="topicTable">
+      <view wx:if="{{headData.total_ori != -1}}" class="topicItem">{{filter.valueFormat(headData.total_ori)}}</view>
+      <view wx:if="{{headData.total_comment != -1}}" class="topicItem">{{filter.valueFormat(headData.total_comment)}}
+      </view>
+      <view class="topicItem">
+        <view wx:if="{{headData.live_uv != -1}}">{{filter.valueFormat(headData.live_uv)}}</view>
+      </view>
+      <view wx:if="{{headData.live_comment != -1}}" class="topicItem">{{filter.valueFormat(headData.live_comment)}}
+      </view>
+    </view>
   </view>
   <view class="itemView" wx:if="{{contrast.length}}">
     <view class="localCells">平台对比</view>
-    <chart id="{{'id' + 1}}" canvasId="{{'canvasId' + 1}}"  list="{{contrast}}" wx:if="{{contrast && contrast.length}}" yType="total_pv" xType="platform" />
+    <chart id="{{'id' + 1}}" canvasId="{{'canvasId' + 1}}" list="{{contrast}}" wx:if="{{contrast && contrast.length}}"
+      yType="total_pv" xType="platform" />
   </view>
   <view class="itemView" wx:if="{{all.length}}">
     <view class="localCells">账号排名</view>
-    <chart
-    id="{{'id' + 2}}" canvasId="{{'canvasId' + 2}}" 
-      btnList="{{userSort}}"
-      wx:if="{{all && all.length}}" list="{{all}}" yType="{{btnList[0].type}}" xType="nickname" />
+    <chart id="{{'id' + 2}}" canvasId="{{'canvasId' + 2}}" btnList="{{userSort}}" wx:if="{{all && all.length}}"
+      list="{{all}}" yType="{{btnList[0].type}}" xType="nickname" />
   </view>
   <!-- <view class="itemView" style="padding: 0" wx:if="{{!!imgURL}}">
     <view class="localCells" style="padding: 5px 10px;">词云</view>
@@ -40,51 +63,72 @@
   </view> -->
   <view class="itemView" wx:if="{{douyin.length}}">
     <view class="localCells">抖音-评论排行</view>
-    <chart id="{{'id' + 3}}" canvasId="{{'canvasId' + 3}}"  list="{{douyin}}" wx:if="{{douyin && douyin.length}}" yType="comment_count" xType="nickname" />
+    <chart id="{{'id' + 3}}" canvasId="{{'canvasId' + 3}}" list="{{douyin}}" wx:if="{{douyin && douyin.length}}"
+      yType="comment_count" xType="nickname" />
   </view>
   <view class="itemView" wx:if="{{douyin.length}}">
     <view class="localCells">抖音-点赞排行</view>
-    <chart id="{{'id' + 4}}" canvasId="{{'canvasId' + 4}}"  list="{{douyin}}" wx:if="{{douyin && douyin.length}}" yType="digg_count" xType="nickname" />
+    <chart id="{{'id' + 4}}" canvasId="{{'canvasId' + 4}}" list="{{douyin}}" wx:if="{{douyin && douyin.length}}"
+      yType="digg_count" xType="nickname" />
   </view>
   <view class="itemView" wx:if="{{douyin.length && title !== '西安'}}">
     <view class="localCells">抖音-粉丝量排行</view>
-    <chart id="{{'id' + 5}}" canvasId="{{'canvasId' + 5}}"  list="{{douyin}}" wx:if="{{douyin && douyin.length}}" yType="mplatform_followers_count" xType="nickname" />
+    <chart id="{{'id' + 5}}" canvasId="{{'canvasId' + 5}}" list="{{douyin}}" wx:if="{{douyin && douyin.length}}"
+      yType="mplatform_followers_count" xType="nickname" />
   </view>
 
 
   <view class="itemView" wx:if="{{kuaishou.length}}">
     <view class="localCells">快手-播放量排行</view>
-    <chart id="{{'id' + 6}}" canvasId="{{'canvasId' + 6}}"  list="{{kuaishou}}" wx:if="{{kuaishou && kuaishou.length}}" yType="pv" xType="nickname" />
+    <chart id="{{'id' + 6}}" canvasId="{{'canvasId' + 6}}" list="{{kuaishou}}" wx:if="{{kuaishou && kuaishou.length}}"
+      yType="pv" xType="nickname" />
   </view>
   <view class="itemView" wx:if="{{kuaishou.length}}">
     <view class="localCells">快手-评论排行</view>
-    <chart id="{{'id' + 7}}" canvasId="{{'canvasId' + 7}}"  list="{{kuaishou}}" wx:if="{{kuaishou && kuaishou.length}}" yType="comment_count" xType="nickname" />
+    <chart id="{{'id' + 7}}" canvasId="{{'canvasId' + 7}}" list="{{kuaishou}}" wx:if="{{kuaishou && kuaishou.length}}"
+      yType="comment_count" xType="nickname" />
   </view>
 
 
   <view class="itemView" wx:if="{{weiboBtnListread.length}}">
     <view class="localCells">微博-阅读量趋势</view>
-    <lineChart id="{{'id' + 11}}" canvasId="{{'canvasId' + 11}}" type="line" select="{{selectread}}" bindlineChenge="lineChengeread"
-      btnList="{{weiboBtnListread}}"
-      isShow="{{isShow}}" wx:if="{{weiboBtnListread && weiboBtnListread.length}}" list="{{weiboread}}" yType="value" xType="time" />
+    <lineChart id="{{'id' + 11}}" canvasId="{{'canvasId' + 11}}" type="line" select="{{selectread}}"
+      bindlineChenge="lineChengeread" btnList="{{weiboBtnListread}}" isShow="{{isShow}}"
+      wx:if="{{weiboBtnListread && weiboBtnListread.length}}" list="{{weiboread}}" yType="value" xType="time" />
   </view>
   <view class="itemView" wx:if="{{weiboBtnListme.length}}">
     <view class="localCells">微博-讨论趋势</view>
-    <lineChart id="{{'id' + 10}}" canvasId="{{'canvasId' + 10}}" type="line" select="{{selectme}}" bindlineChenge="lineChengeme"
-      btnList="{{weiboBtnListme}}"
-      isShow="{{isShow}}" wx:if="{{weiboBtnListme && weiboBtnListme.length}}" list="{{weibome}}" yType="value" xType="time" />
+    <lineChart id="{{'id' + 10}}" canvasId="{{'canvasId' + 10}}" type="line" select="{{selectme}}"
+      bindlineChenge="lineChengeme" btnList="{{weiboBtnListme}}" isShow="{{isShow}}"
+      wx:if="{{weiboBtnListme && weiboBtnListme.length}}" list="{{weibome}}" yType="value" xType="time" />
   </view>
   <view class="itemView" wx:if="{{weiboBtnListori.length}}">
     <view class="localCells">微博-原创趋势</view>
-    <lineChart id="{{'id' + 9}}" canvasId="{{'canvasId' + 9}}"  type="line" select="{{selectori}}" bindlineChenge="lineChengeori"
-      btnList="{{weiboBtnListori}}"
-      isShow="{{isShow}}" wx:if="{{weiboBtnListori && weiboBtnListori.length}}" list="{{weiboori}}" yType="value" xType="time" />
+    <lineChart id="{{'id' + 9}}" canvasId="{{'canvasId' + 9}}" type="line" select="{{selectori}}"
+      bindlineChenge="lineChengeori" btnList="{{weiboBtnListori}}" isShow="{{isShow}}"
+      wx:if="{{weiboBtnListori && weiboBtnListori.length}}" list="{{weiboori}}" yType="value" xType="time" />
   </view>
   <view class="itemView" wx:if="{{yangshi.length}}">
     <view class="localCells">央视-浏览排行</view>
-    <chart id="{{'id' + 8}}" canvasId="{{'canvasId' + 8}}"  wx:if="{{yangshi && yangshi.length}}" list="{{yangshi}}" yType="pv" xType="nickname" />
+    <chart id="{{'id' + 8}}" canvasId="{{'canvasId' + 8}}" wx:if="{{yangshi && yangshi.length}}" list="{{yangshi}}"
+      yType="pv" xType="nickname" />
   </view>
 
   <!-- 错误提示 -->
   <mp-toptips msg="{{error}}" ext-class="toptips" type="error" show="{{error}}"></mp-toptips>
-</view>
+</view>
+
+<cover-view wx:if="{{detail !== ''}}" class="modolBg">
+  <cover-view class="local_dialog">
+    <cover-view class="local_dialog_title">
+      <cover-view class="local_dialog_close" bindtap="showDetail">
+        <cover-view class="local_dialog_close_left"></cover-view>
+        <cover-view class="local_dialog_close_right"></cover-view>
+      </cover-view>
+    </cover-view>
+    <cover-view class="local_dialog_body">
+      {{detail}}
+    </cover-view>
+  </cover-view>
+</cover-view>
+<!-- <mp-toptips msg="{{detail}}" type="success" show="{{detail !== ''}}"></mp-toptips> -->

+ 79 - 2
pages/sonTopic/sonTopic.wxss

@@ -1,11 +1,23 @@
 /* pages/sonTopic/sonTopic.wxss */
-.topic .topicTable {
+/* .topic .topicTable {
   display: flex;
 }
 
 .topic .topicTable .topicItem {
   flex: 1;
   padding: 5px 10px;
+} */
+.topTable {
+  display: flex;
+  margin-bottom: 10px;
+}
+
+.topTable .topicTable {
+  flex: 1;
+  white-space: nowrap;
+}
+.topTable .topicTable .topicItem {
+  padding: 5px 0 5px 5px;
 }
 .topic .itemView,
 .topic .mainTitle{
@@ -16,4 +28,69 @@
   font-size: 18px;
   font-weight: 400;
   border-bottom-color:red;
-}
+}
+
+.show{
+  display: inline-block;
+  /* border: 1rpx solid #e2dd52;
+  color: #e2dd52; */
+  border: 1rpx solid #1989fa;
+  color: #1989fa;
+  width: var(--tips-btn);
+  height: var(--tips-btn);
+  line-height: var(--tips-btn);
+  font-size: 12px;
+  text-align: center;
+  border-radius: 50%;
+}
+
+.modolBg{
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 1;
+  background-color: rgba(0,0,0,.5);
+}
+.local_dialog{
+  top:50%;
+  left: 50%;
+  width: 500rpx;
+  padding: 5px 10px;
+  position: absolute;
+  border-radius: 1em;
+  background-color: #fff;
+  transform: translate(-50%, -50%);
+}
+.local_dialog_title{
+  width: 100%;
+  height: 1.5em;
+  text-align: right;
+  line-height: 1.5em;
+}
+.local_dialog_close{
+  display: inline-block;
+  position: relative;
+  width: 1.5em;
+  height: 1.5em;
+}
+.local_dialog_close_left,
+.local_dialog_close_right{
+  position: absolute;
+  width: 100%;
+  height: 1rpx;
+  background-color: #121212;
+  top: 50%;
+  transform: rotate(45deg);
+}
+.local_dialog_close_right{
+  transform: rotate(135deg);
+}
+.local_dialog_body{
+  white-space:normal;
+  line-height: 1.5em;
+  padding: 10px 0;
+  font-size: 14px;
+  color: #222;
+}

+ 0 - 1
project.config.json

@@ -30,7 +30,6 @@
       "outputPath": ""
     },
     "enableEngineNative": false,
-    "bundle": false,
     "useIsolateContext": true,
     "useCompilerModule": true,
     "userConfirmedUseCompilerModuleSwitch": false,