From 5b7bf0836049d624eb806e6e90c37e90a544c223 Mon Sep 17 00:00:00 2001
From: wylyl22 <2373073266@qq.com>
Date: Tue, 12 Jul 2022 16:01:48 +0800
Subject: [PATCH] 712
---
components/chartdisplay/index.js | 2 +-
components/indexCom/dataChild/index.js | 1 -
components/indexCom/eventChild/index.js | 104 ++++++------
components/indexCom/eventChild/index.wxml | 6 +-
components/indexCom/mediaChild/index.js | 39 +++--
components/indexCom/mediaChild/index.wxml | 2 +-
components/indexCom/rankingChild/index.js | 198 +---------------------
components/indexCom/soundChild/index.js | 4 +-
components/option/columnarOption.js | 108 ++++++------
components/option/sColumnarOption.js | 2 +-
components/option/singleLineOption.js | 72 ++++++++
pages/index/Rankdetail/Rankdetail.js | 1 -
pages/index/Rankdetail/Rankdetail.wxml | 4 +-
project.private.config.json | 7 +
14 files changed, 225 insertions(+), 325 deletions(-)
create mode 100644 components/option/singleLineOption.js
diff --git a/components/chartdisplay/index.js b/components/chartdisplay/index.js
index 3c6fb59..d3aa09f 100644
--- a/components/chartdisplay/index.js
+++ b/components/chartdisplay/index.js
@@ -5,7 +5,7 @@ const data2= [600,700,800,900,1000,1200,1300,1400,1500,1600,1700,1900,2000,2100,
Component({
data: {
showChart: true,
- brandOption: histogram(data,data2,'#0084FF',false)
+ brandOption: histogram(data,data2,[],'#0084FF',false)
,
},
diff --git a/components/indexCom/dataChild/index.js b/components/indexCom/dataChild/index.js
index 8a0dd7b..689f142 100644
--- a/components/indexCom/dataChild/index.js
+++ b/components/indexCom/dataChild/index.js
@@ -11,7 +11,6 @@ const dValue=[
[25, 167, 564, 256, 1009, 2000, 140]]
const dColor=['#FF4852','#FF6E25','#FFBF00','#20CC62','#00D6D6','#00AAFF','#7257FF']
const dx=['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00']
-
Component({
data: {
// totallist:totallist,
diff --git a/components/indexCom/eventChild/index.js b/components/indexCom/eventChild/index.js
index 3ef2f10..5cb9158 100644
--- a/components/indexCom/eventChild/index.js
+++ b/components/indexCom/eventChild/index.js
@@ -1,39 +1,41 @@
+const app = getApp();
Component({
data: {
imageUrl: getApp().globalData.imageUrl,
bgImage: "background-image: url("+ getApp().globalData.imageUrl + "/sj_beijin.png)",
- questes: [
- {
- tip: '比亚迪宋MAX紧凑型mpv你看了不...',
- title: '72.45',
- subtitle: '媒体测评',
- },
- {
- tip: '今日上市!长城SUV',
- title: '72.45',
- subtitle: '媒体测评',
- },
- {
- tip: '子龙来也!捷途X90子龙',
- title: '72.45',
- subtitle: '媒体测评',
- },
- {
- tip: '全新一代蒙迪欧亮相',
- title: '72.45',
- subtitle: '媒体测评',
- },
- {
- tip: '新款比亚迪汉DM-i即将上市',
- title: '72.45',
- subtitle: '媒体测评',
- },
- {
- tip: '全新一代蒙迪欧亮相',
- title: '72.45',
- subtitle: '媒体测评',
- }
- ],
+ questes:[],
+ // [
+ // {
+ // tip: '比亚迪宋MAX紧凑型mpv你看了不...',
+ // title: '72.45',
+ // subtitle: '媒体测评',
+ // },
+ // {
+ // tip: '今日上市!长城SUV',
+ // title: '72.45',
+ // subtitle: '媒体测评',
+ // },
+ // {
+ // tip: '子龙来也!捷途X90子龙',
+ // title: '72.45',
+ // subtitle: '媒体测评',
+ // },
+ // {
+ // tip: '全新一代蒙迪欧亮相',
+ // title: '72.45',
+ // subtitle: '媒体测评',
+ // },
+ // {
+ // tip: '新款比亚迪汉DM-i即将上市',
+ // title: '72.45',
+ // subtitle: '媒体测评',
+ // },
+ // {
+ // tip: '全新一代蒙迪欧亮相',
+ // title: '72.45',
+ // subtitle: '媒体测评',
+ // }
+ // ],
content:[
{
time: '2022-04-29 23:00:00',
@@ -63,25 +65,29 @@ Component({
},
-
- methods: {
- bindtaps(){
- wx.request({
- url: 'http://cloud.sws010.com/api/v7.ashx',
- method:"POST",
- data:{
- action:"getEventsListH",
- sType: 'Home',
- sTimeType: 3,
- sQuDao: 1,
- iTimeType:1
- },
- success:(res)=>{
-
- console.log(res.Data)
- }
+ lifetimes: {
+ attached() {
+ app.globalData.request({action: 'getEventsListH', sType: 'Home', sTimeType: 3}).then(res => {
+ const arr = []
+ res.forEach(ele => {
+ let obj = {
+ title: ele.events_title,
+ num: ele.events_influence,
+ brand:ele.events_brand
+ }
+ arr.push(obj)
+ })
+ this.setData({
+ // countYear: data.count_year,
+ // count6month: data.count_6month,
+ // countAll: data.count_all,
+ questes: arr
+ })
})
},
+ },
+ methods: {
+
priceSel(e){
this.setData({
intervalSel: e.currentTarget.dataset.index
diff --git a/components/indexCom/eventChild/index.wxml b/components/indexCom/eventChild/index.wxml
index 32eedde..44a8c08 100644
--- a/components/indexCom/eventChild/index.wxml
+++ b/components/indexCom/eventChild/index.wxml
@@ -5,13 +5,13 @@
热点事件
- {{item.tip}}
+ {{item.title}}
- {{item.title}}
+ {{item.num}}
- 关联品牌:{{item.subtitle}}
+ 关联品牌:{{item.brand}}
影响力
diff --git a/components/indexCom/mediaChild/index.js b/components/indexCom/mediaChild/index.js
index 87bf1d0..2645e22 100644
--- a/components/indexCom/mediaChild/index.js
+++ b/components/indexCom/mediaChild/index.js
@@ -1,4 +1,5 @@
const app = getApp();
+
Component({
data: {
imageUrl: getApp().globalData.imageUrl,
@@ -31,34 +32,32 @@ Component({
ranking:[]
},
+
lifetimes: {
- // console.log('111',this.data.media),
attached() {
- app.globalData.request({action: 'getWebsiteHome0528', sType: 'Home',sTimeType: 34,}).then(res => {
- const data = res;
- const ranking = data.ranking || [];
+ app.globalData.request({action: 'getWebsiteHome0528', sType: 'Home', sTimeType: 34}).then(res => {
const arr = []
- arr.push({
- volume: 250799,
- media: '抖音',
- })
- ranking.forEach(ele => {
- let obj = {
- media: ele.value,
- volume: ele.key,
- }
- arr.push(obj)
- })
+ let a=res
+ // a.forEach(ele => {
+ // let obj = {
+ // title: key,
+ // num: this.data[key],
+
+ // }
+ // arr.push(obj)
+ // })
this.setData({
- ranking: arr
+ // countYear: data.count_year,
+ // count6month: data.count_6month,
+ // countAll: data.count_all,
+ ranking: a
})
})
},
},
- onLoad(){
- console.log('121',this.data.arr)
- },
methods: {
-
+ a(){
+ console.log()
+ },
}
})
\ No newline at end of file
diff --git a/components/indexCom/mediaChild/index.wxml b/components/indexCom/mediaChild/index.wxml
index 934ff03..7364cfc 100644
--- a/components/indexCom/mediaChild/index.wxml
+++ b/components/indexCom/mediaChild/index.wxml
@@ -2,7 +2,7 @@
- 传播重点媒体排行
+ 传播重点媒体排行
排名
媒体
diff --git a/components/indexCom/rankingChild/index.js b/components/indexCom/rankingChild/index.js
index 0dc7c35..f727a58 100644
--- a/components/indexCom/rankingChild/index.js
+++ b/components/indexCom/rankingChild/index.js
@@ -1,198 +1,14 @@
+import histogram from "../../option/columnarOption"
+const data1=['大众速腾', '激励帝豪', '吉利星越', '奥迪A4', '奥迪Q5']
+const data2=[1400, 2000, 1500, 1800, 1490, 900, 310]
+const data3=['尾翼互动量']
Component({
data: {
imageUrl: getApp().globalData.imageUrl,
showChart: true,
- brandOption: {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- },
- confine: true
- },
-
- legend: {
- x:'15',
- icon: 'rectangle',//data图标样式
- itemWidth: 10,//data图标大小
- itemHeight: 10,
- textStyle: {
- fontSize: 9
- },
- data: ['尾翼互动量'],
- },
- //图表位置
- grid: {
- left: 20,
- right: 20,
- bottom: 15,
- top: 40,
- containLabel: true
- },
- yAxis: [
- {
- type: 'value',
- axisTick:{
- show:false //去除刻度线
- },
- axisLine:{
- show:false //去除轴线
- },
- axisLabel: {
- color: '#999999',//y轴文本颜色
- textStyle: {
- fontSize : 9
- }
- },
- splitLine: { //分割线
- // lineStyle:{
- // // color:"#2d3436"
-
- // }
- show: true,
- lineStyle: {
- type: 'dashed',
- color: '#E8E8E8',
- }
- }
- }
- ],
- xAxis: [
- {
- type: 'category',
- data: ['长安', '大众', '丰田', '吉利', '哈佛'],
- axisTick:{
- show:false //去除刻度线
- },
- axisLine:{
- show:false, //去除轴线
- },
- axisLabel: {
- color: '#999999',//x轴文本颜色
- textStyle: {
- fontSize : 9
- }
-
- }
- }
- ],
- series:
- {
- barWidth : 24,
- type: 'bar',
- data: [1400, 2000, 1500, 1800, 1490, 900, 310],
- stack:"Search Engine",
- emphasis: {//折线图的高亮状态。
- focus: "series",//聚焦当前高亮的数据所在的系列的所有图形。
- },
- itemStyle: {
- normal:{
- color: '#00AAFF',
- lineStyle: {
- color: '#00AAFF'
- }
- }
- }
- },
-
-
- },
- modelOption: {
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- },
- confine: true
- },
-
- legend: {
- x:'15',
- icon: 'rectangle',//data图标样式
- itemWidth: 10,//data图标大小
- itemHeight: 10,
- textStyle: {
- fontSize: 9
- },
- data: ['尾翼互动量'],
- },
- //图表位置
- grid: {
- left: 20,
- right: 20,
- bottom: 15,
- top: 40,
- containLabel: true
- },
- yAxis: [
- {
- type: 'value',
- axisTick:{
- show:false //去除刻度线
- },
- axisLine:{
- show:false //去除轴线
- },
- axisLabel: {
- color: '#999999',//y轴文本颜色
- textStyle: {
- fontSize : 9
- }
- },
- splitLine: { //分割线
- // lineStyle:{
- // // color:"#2d3436"
-
- // }
- show: true,
- lineStyle: {
- type: 'dashed',
- color: '#E8E8E8',
- }
- }
- }
- ],
- xAxis: [
- {
-
- type: 'category',
- data: ['大众速腾', '激励帝豪', '吉利星越', '奥迪A4', '奥迪Q5'],
- axisTick:{
- show:false //去除刻度线
- },
- axisLine:{
- show:false, //去除轴线
- },
- axisLabel: {
- color: '#999999',//x轴文本颜色
- textStyle: {
- fontSize : 9
- }
-
- }
- }
- ],
- series:
- {
- barWidth : 24,
- type: 'bar',
- data: [1400, 2000, 1500, 1800, 1490, 900, 310],
- stack:"Search Engine",
- emphasis: {//折线图的高亮状态。
- focus: "series",//聚焦当前高亮的数据所在的系列的所有图形。
- },
- itemStyle: {
- normal:{
- color: '#20CC62',
- lineStyle: {
- color: '#20CC62'
- }
- }
- }
- },
-
-
- },
+ brandOption: histogram(data1,data2,data3,'#0084FF'),
+
+ modelOption: histogram(data1,data2,data3,'#20CC62'),
},
onShow() {
this.getTabBar().init();
diff --git a/components/indexCom/soundChild/index.js b/components/indexCom/soundChild/index.js
index d174b3b..917eb24 100644
--- a/components/indexCom/soundChild/index.js
+++ b/components/indexCom/soundChild/index.js
@@ -1,3 +1,5 @@
+const app = getApp();
+
import sHistogram from "../../option/sColumnarOption"
const dx=['长安','大众','丰田','吉利','哈佛']
const ds=[
@@ -22,7 +24,7 @@ Component({
this.getTabBar().init();
},
-
+
methods: {
priceSel(e){
this.setData({
diff --git a/components/option/columnarOption.js b/components/option/columnarOption.js
index 32f4db2..799bf2e 100644
--- a/components/option/columnarOption.js
+++ b/components/option/columnarOption.js
@@ -1,6 +1,6 @@
-// 柱状
-export default function histogram(dx=[],ds=[],data=[],color1='', direction=true) {
- // direction true为垂直 fales为水平
+// 单柱状
+export default function histogram(dx=[],ds=[],data=[],color1='',direction=true) {
+ // direction true为垂直 false为水平
return {
tooltip: {
trigger: 'axis',
@@ -27,34 +27,7 @@ export default function histogram(dx=[],ds=[],data=[],color1='', direction=true)
top: 20,
containLabel: true
},
- yAxis:direction?[
- {
- type: 'value',
- axisTick:{
- show:false //去除刻度线
- },
- axisLine:{
- show:false //去除轴线
- },
- axisLabel: {
- color: '#999999',//y轴文本颜色
- textStyle: {
- fontSize : 9
- }
- },
- splitLine: { //分割线
- // lineStyle:{
- // // color:"#2d3436"
-
- // }
- show: true,
- lineStyle: {
- type: 'dashed',
- color: '#E8E8E8',
- }
- }
- }
- ]:[
+ xAxis: direction?[
{
type: 'category',
data: dx,
@@ -72,26 +45,34 @@ export default function histogram(dx=[],ds=[],data=[],color1='', direction=true)
}
}
- ],
- xAxis: direction?[
+ ]:[
{
- type: 'category',
- data: dx,
+ type: 'value',
axisTick:{
show:false //去除刻度线
},
axisLine:{
- show:false, //去除轴线
+ show:false //去除轴线
},
axisLabel: {
- color: '#999999',//x轴文本颜色
+ color: '#999999',//y轴文本颜色
textStyle: {
fontSize : 9
}
-
+ },
+ splitLine: { //分割线
+ // lineStyle:{
+ // // color:"#2d3436"
+ // }
+ show: true,
+ lineStyle: {
+ type: 'dashed',
+ color: '#E8E8E8',
+ }
}
}
- ]:[
+ ],
+ yAxis:direction?[
{
type: 'value',
axisTick:{
@@ -118,17 +99,25 @@ export default function histogram(dx=[],ds=[],data=[],color1='', direction=true)
}
}
}
+ ]:[
+ {
+ type: 'category',
+ data: dx,
+ axisTick:{
+ show:false //去除刻度线
+ },
+ axisLine:{
+ show:false, //去除轴线
+ },
+ axisLabel: {
+ color: '#999999',//x轴文本颜色
+ textStyle: {
+ fontSize : 9
+ }
+ }
+ }
],
- series:columar(data,ds,color1)
- }
-
-}
-
-function columar(data=[],ds=[],color1=''){
-// MS判断多条数据还是单条数据 true为单条false为多条
- let list=[]
- for (let i = 0; i < 1; i++) {
- list.push({
+ series:{
type: 'bar',
data: ds,
stack:"Search Engine",
@@ -138,16 +127,27 @@ function columar(data=[],ds=[],color1=''){
itemStyle: {
normal:{
color: color1,
- lineStyle: {
- color: color1
- }
+ // lineStyle: {
+ // color: color1
+ // }
}
}
- })
}
- return list
+ }
+
}
+// function columar(data=[],ds=[],color1=''){
+// // MS判断多条数据还是单条数据 true为单条false为多条
+// let list=[]
+// for (let i = 0; i < 1; i++) {
+// list.push({
+
+// })
+// }
+// return list
+// }
+
diff --git a/components/option/sColumnarOption.js b/components/option/sColumnarOption.js
index ec207ed..09ede69 100644
--- a/components/option/sColumnarOption.js
+++ b/components/option/sColumnarOption.js
@@ -1,4 +1,4 @@
-// 柱状
+// 多条柱状
export default function sHistogram(dx=[],ds=[],data=[],color2=[]) {
// MS判断多条数据还是单条数据 true为单条false为多条
return {
diff --git a/components/option/singleLineOption.js b/components/option/singleLineOption.js
new file mode 100644
index 0000000..9bfe948
--- /dev/null
+++ b/components/option/singleLineOption.js
@@ -0,0 +1,72 @@
+// 折线
+export default function brokenLine(dName=[],dValue=[] ,dColor=[],dx=[]){
+ return{
+ grid:{
+ left:30,
+ top:25,
+ height:146,
+ width:323
+ },
+ yAxis: [
+ {
+ type: 'value',
+ axisTick:{
+ show:false //去除刻度线
+ },
+ axisLine:{
+ show:false //去除轴线
+ },
+ axisLabel: {
+ color: '#999999',//y轴文本颜色
+ textStyle: {
+ fontSize : 9
+ }
+ },
+ splitLine: { //分割线
+ // lineStyle:{
+ // // color:"#2d3436"
+
+ // }
+ show: true,
+ lineStyle: {
+ type: 'dashed',
+ color: '#E8E8E8',
+ }
+ }
+ }
+ ],
+ xAxis: [
+ {
+ type: 'category',
+ data: dx,
+ axisTick:{
+ show:false //去除刻度线
+ },
+ axisLine:{
+ show:false, //去除轴线
+ },
+ axisLabel: {
+ color: '#999999',//x轴文本颜色
+ textStyle: {
+ fontSize : 9
+ }
+ }
+ }
+ ],
+ series:{
+ type: 'line',
+ symbol:'none', //去圆点
+ data: dValue,
+ itemStyle: {
+ normal:{
+ color: '#0084FF',
+ lineStyle: {
+ color: '#0084FF'
+ }
+ }
+ }}
+
+ }
+ }
+
+
\ No newline at end of file
diff --git a/pages/index/Rankdetail/Rankdetail.js b/pages/index/Rankdetail/Rankdetail.js
index a40bc46..dca0c79 100644
--- a/pages/index/Rankdetail/Rankdetail.js
+++ b/pages/index/Rankdetail/Rankdetail.js
@@ -18,7 +18,6 @@ Page({
value:0,
// 时间
priceOpt: ['2022年5月','2022年4月','2022年3月',
-
'2022年2月','2022年1月','2021年12月',
'2021年11月','2021年10月','2021年9月',
'2021年8月','2021年7月','2021年6月',
diff --git a/pages/index/Rankdetail/Rankdetail.wxml b/pages/index/Rankdetail/Rankdetail.wxml
index 940a0bb..87bb533 100644
--- a/pages/index/Rankdetail/Rankdetail.wxml
+++ b/pages/index/Rankdetail/Rankdetail.wxml
@@ -3,11 +3,11 @@
-
+
销量排行榜
-
+
销量排行榜
排名
diff --git a/project.private.config.json b/project.private.config.json
index 954f60c..d84a06c 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -49,6 +49,13 @@
"query": "",
"launchMode": "default",
"scene": null
+ },
+ {
+ "name": "",
+ "pathName": "pages/index/Rankdetail/Rankdetail",
+ "query": "",
+ "launchMode": "default",
+ "scene": null
}
]
}