From f11e64a7bd84184acc78f9ec3dc4bb58ca5a14d5 Mon Sep 17 00:00:00 2001 From: liuyongli <1598631486@qq.com> Date: Fri, 18 Nov 2022 08:45:53 +0800 Subject: [PATCH] no message --- app.json | 3 +- contrastPackages/addTheme/index.js | 2 +- pages/brandCrisis/crisisList/index.js | 19 +-- pages/index/Salesranking/Salesranking.js | 113 ++++++++++++------ pages/index/Salesranking/Salesranking.wxml | 7 +- pages/insight/index.js | 11 +- pages/insight/index.wxml | 2 +- pages/insight/pages/editTheme/index.js | 2 +- .../pages/eventInsight/evDatalist/index.js | 4 +- pages/insight/pages/eventInsight/index.js | 18 +++ pages/insight/pages/eventInsight/index.wxml | 4 + pages/insight/pages/eventInsight/index.wxss | 53 +++++--- .../pages/modalInsight/modalDataList/index.js | 4 +- pages/insight/pages/themeList/index.js | 4 +- pages/insight/pages/themeList/index.wxml | 2 +- pages/insight/themeChild/index.js | 1 + pages/mine/pages/myReport/index.js | 3 - pages/varComm/pages/theme/index.js | 2 +- pages/varComm/pages/theme/index.wxml | 2 +- project.private.config.json | 9 +- 20 files changed, 186 insertions(+), 79 deletions(-) diff --git a/app.json b/app.json index ea6e2dc..81cfc4d 100644 --- a/app.json +++ b/app.json @@ -134,7 +134,8 @@ "van-collapse-item": "@vant/weapp/collapse-item/index", "van-tag": "@vant/weapp/tag/index", "van-picker": "@vant/weapp/picker/index", - "van-nav-bar": "@vant/weapp/nav-bar/index" + "van-nav-bar": "@vant/weapp/nav-bar/index", + "van-tree-select": "@vant/weapp/tree-select/index" } } \ No newline at end of file diff --git a/contrastPackages/addTheme/index.js b/contrastPackages/addTheme/index.js index c432043..ee81263 100644 --- a/contrastPackages/addTheme/index.js +++ b/contrastPackages/addTheme/index.js @@ -119,7 +119,7 @@ Page({ app.globalData.request({ action: 'getSchemeDataToTheme', token: wx.getStorageSync('token'), - sType: 'former ' + sType: 'former' }).then(res => { this.setData({ issList: res diff --git a/pages/brandCrisis/crisisList/index.js b/pages/brandCrisis/crisisList/index.js index dc2890a..da1b78a 100644 --- a/pages/brandCrisis/crisisList/index.js +++ b/pages/brandCrisis/crisisList/index.js @@ -11,11 +11,11 @@ Page({ brand: '', intervalSel: 0, newsList: [{ - title: '已读', + title: '未读', value: 1 }, { - title: '未读', + title: '已读', value: 2 }, ], @@ -96,24 +96,25 @@ Page({ } }, getList() { - let sTimeType = wx.getStorageSync("sTimeType") || 34; - let sStartTime = wx.getStorageSync("sStartTime") || ''; - let sEndTime = wx.getStorageSync("sEndTime") || ''; + // let sTimeType = wx.getStorageSync("sTimeType") || 34; + // let sStartTime = wx.getStorageSync("sStartTime") || ''; + // let sEndTime = wx.getStorageSync("sEndTime") || ''; let sCrisis = this.data.value; let obj = { action: "getSwsQyMessageList", - sTimeType: sTimeType, - sStartTime: sStartTime, - sEndTime: sEndTime, + // sTimeType: sTimeType, + // sStartTime: sStartTime, + // sEndTime: sEndTime, iPageIndex: iPageIndex, iPageSize: iPageSize, // sType: "BrandData", iReadState: this.data.iReadState, - sCrisis: sCrisis, + crisis: sCrisis, // sBrand: this.data.brand, // sSeriesName: sSeriesName, token: wx.getStorageSync('token') || 't%2BrswgjvzGM=' } + console.log('dez',obj) app.globalData.request(obj).then(res => { if (res && res.length > 0) { iPageIndex++; diff --git a/pages/index/Salesranking/Salesranking.js b/pages/index/Salesranking/Salesranking.js index 19aa314..26fe89a 100644 --- a/pages/index/Salesranking/Salesranking.js +++ b/pages/index/Salesranking/Salesranking.js @@ -49,11 +49,14 @@ Page({ imageUrl: getApp().globalData.imageUrl, mockData: [], show1: false, - + mainActiveIndex: 0, + mainActiveIndex2:0, + activeId: '', // ec: { lazyLoad: true // 设置图表懒加载 - } + }, + showvalue:false, }, // 标签切换点击事件 onChange(val) { @@ -190,27 +193,22 @@ Page({ }).then(res => { let arr = [] res.forEach(ele => { - let data = ele.data - if (data) { - let obj = { - text: ele.value, - value: ele.key, - } - arr.push(obj) + let data = ele.data || [] + let obj = { + text: ele.value, + id: ele.key, + } + if (data.length > 0) { + obj.children = []; data.forEach(e => { let ol = { text: e.value, - value: e.key + id: e.key } - arr.push(ol) + obj.children.push(ol) }) - } else { - let obj = { - text: ele.value, - value: ele.key, - } - arr.push(obj) - } + } + arr.push(obj) }) this.setData({ grades3: arr @@ -238,27 +236,22 @@ Page({ }).then(res => { let arr = [] res.forEach(ele => { - let data = ele.data - if (data) { - let obj = { - text: ele.value, - value: ele.key, - } - arr.push(obj) + let data = ele.data || [] + let obj = { + text: ele.value, + id: ele.key, + } + if (data.length > 0) { + obj.children = []; data.forEach(e => { let ol = { text: e.value, - value: e.key + id: e.key } - arr.push(ol) + obj.children.push(ol) }) - } else { - let obj = { - text: ele.value, - value: ele.key, - } - arr.push(obj) - } + } + arr.push(obj) }) this.setData({ grades1: arr, @@ -309,7 +302,8 @@ Page({ iPageSize = 20 this.setData({ ranking: [], - a: e.detail != 0 + a: e.detail != 0, + showvalue:false }) this.getTrend() }, @@ -409,4 +403,53 @@ Page({ active: n }) }, + // 树形结构父级点击 + onClickNav({ detail = {} }) { + this.setData({ + mainActiveIndex: detail.index || 0, + }); + let {grades3} = this.data; + if(!grades3[detail.index].children) { + this.setData({ + ranking: [], + sEnergyType:grades3[detail.index].id || "", + }) + this.getTrend() + + } + }, + onClickNav2({ detail = {} }) { + this.setData({ + mainActiveIndex2: detail.index || 0, + }); + let {grades1} = this.data; + console.log('xds',grades1[detail.index]) + if(!grades1[detail.index].children) { + this.setData({ + ranking: [], + sSpec: grades1[detail.index].id || "", + }) + this.getTrend() + } + }, + + // 树形结构子级点击 + onClickItem({ detail = {} }) { + const activeId = this.data.activeId === detail.id ? null : detail.id; + let {mainActiveIndex} = this.data; + this.setData({ + ranking: [], + sEnergyType: mainActiveIndex+","+activeId, + }); + this.getTrend() + }, + onClickItem2({ detail = {} }) { + const activeId = this.data.activeId === detail.id ? null : detail.id; + let {mainActiveIndex2} = this.data; + this.setData({ + ranking: [], + sSpec: mainActiveIndex2+","+activeId, + }); + this.getTrend() + }, }) \ No newline at end of file diff --git a/pages/index/Salesranking/Salesranking.wxml b/pages/index/Salesranking/Salesranking.wxml index 3f5a32c..b06803c 100644 --- a/pages/index/Salesranking/Salesranking.wxml +++ b/pages/index/Salesranking/Salesranking.wxml @@ -24,10 +24,13 @@ - + + - + + + diff --git a/pages/insight/index.js b/pages/insight/index.js index d0e18da..a16fb23 100644 --- a/pages/insight/index.js +++ b/pages/insight/index.js @@ -6,6 +6,7 @@ Page({ height:app.globalData.navBarHeight + app.globalData.statusBarHeight, statusBarHeight:app.globalData.statusBarHeight, navBarHeight:app.globalData.navBarHeight, + show: false, navData: [{ text: '品牌洞察', component: 'brand-child' @@ -29,7 +30,7 @@ Page({ } }, onLoad() { - + }, onShow() { if(!wx.getStorageSync('token')) { @@ -39,6 +40,14 @@ Page({ } else { this.getTabBar().init(); } + this.setData({ + show: true + }) + }, + themeHide() { + this.setData({ + show: false + }) }, changeTab(val) { let n = val.detail.index; diff --git a/pages/insight/index.wxml b/pages/insight/index.wxml index 314c5f2..79f871c 100644 --- a/pages/insight/index.wxml +++ b/pages/insight/index.wxml @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/pages/insight/pages/editTheme/index.js b/pages/insight/pages/editTheme/index.js index dfe6dd0..03569fd 100644 --- a/pages/insight/pages/editTheme/index.js +++ b/pages/insight/pages/editTheme/index.js @@ -397,7 +397,7 @@ Page({ "Classify": 0, "StartTime": this.data.StartTime, "EndTime": this.data.EndTime, - "Types": "theme", + "Types": "theme_v6", "DetailsData": [dtData], "Warning": { "Statu": this.data.Statu, diff --git a/pages/insight/pages/eventInsight/evDatalist/index.js b/pages/insight/pages/eventInsight/evDatalist/index.js index 67f1da2..bb243a5 100644 --- a/pages/insight/pages/eventInsight/evDatalist/index.js +++ b/pages/insight/pages/eventInsight/evDatalist/index.js @@ -263,10 +263,10 @@ Component({ let date = d.toISOString().replace(/\D/g, ''); let result = this.data.result.length let total = this.data.total - if (result == 0 && total>50000) { + if (result == 0 && total*1 > 50000) { wx.showModal({ title: '提示', - content: '全部数据超过50000(万)条,是否要全部导出', + content: '全部数据超过50000条,是否要全部导出', success: function (r) { if (r.confirm) { that.setData({ diff --git a/pages/insight/pages/eventInsight/index.js b/pages/insight/pages/eventInsight/index.js index 5b8d4a4..ddab9fa 100644 --- a/pages/insight/pages/eventInsight/index.js +++ b/pages/insight/pages/eventInsight/index.js @@ -49,4 +49,22 @@ Page({ this.setData({ compShow: true }) //重新渲染组件刷新页面 this.getData(); }, + createReport(){ + app.globalData.request({ + action: 'getToPptTask', + sType: 'ToEventPptV6', + token: 't%2BrswgjvzGM=', + sTimeType: wx.getStorageSync('sTimeType') || 34, + sStartTime: wx.getStorageSync('sStartTime') || '', + sEndTime: wx.getStorageSync('sEndTime') || '', + sRele: wx.getStorageSync('sRele') || '', + // sBrand: wx.getStorageSync('sBrand') || '', + // sSeriesName: wx.getStorageSync('sSeriesName') || '', + }).then(res => { + wx.showModal({ + title: '数据生成中,请前往”我的“查看生成进度', + showCancel: false + }) + }); + } }) \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/index.wxml b/pages/insight/pages/eventInsight/index.wxml index 9e7ddf8..0034311 100644 --- a/pages/insight/pages/eventInsight/index.wxml +++ b/pages/insight/pages/eventInsight/index.wxml @@ -1,6 +1,10 @@ + + 生成报告 + + {{detailData.title}} {{detailData.description}} diff --git a/pages/insight/pages/eventInsight/index.wxss b/pages/insight/pages/eventInsight/index.wxss index e76c78a..38158ab 100644 --- a/pages/insight/pages/eventInsight/index.wxss +++ b/pages/insight/pages/eventInsight/index.wxss @@ -4,16 +4,19 @@ color: #FFFFFF; margin: 0rpx 32rpx 0rpx 32rpx; } + .sub-title { font-size: 14px; font-weight: 400; - color: rgba(255,255,255,0.6000); + color: rgba(255, 255, 255, 0.6000); margin: 12rpx 32rpx 0rpx 32rpx; } + .top-brand-switch { background: #006BFF; padding: 1rpx 32rpx 32rpx 32rpx } + .switch-container { /* height: 330rpx; */ background: rgb(77, 159, 253); @@ -23,46 +26,66 @@ margin-top: 32rpx; border-image: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)) 1 1; } + .tab-btn { text-align: center; } + .bottom-title { font-size: 13px; font-weight: 400; - color: rgba(255,255,255,0.6000); + color: rgba(255, 255, 255, 0.6000); } + .bottom-number { font-size: 10px; font-weight: 600; color: #FFFFFF; } + .switch-middle { align-items: center; } + .brand-number { font-size: 18px; font-weight: 600; color: #FFFFFF; } + /* 图表 */ .bottom-view { background: #FFF; border-radius: 12px 12px 0px 0px; } + /* tabs */ -.view-tabs .van-tabs__nav{ - background-color: #006BFF;/* 标签背景颜色 */ - } - .view-tabs .van-tab { - color: #999999; /* 字体颜色 */ - background-color: #F9F9F9;/* 标签背景颜色 */ - } - - .view-tabs .van-tab--active{ - color: #0084FF; /* 字体颜色 */ +.view-tabs .van-tabs__nav { + background-color: #006BFF; + /* 标签背景颜色 */ +} + +.view-tabs .van-tab { + color: #999999; + /* 字体颜色 */ + background-color: #F9F9F9; + /* 标签背景颜色 */ +} + +.view-tabs .van-tab--active { + color: #0084FF; + /* 字体颜色 */ font-size: 16px; font-weight: 600; - } - .view-tabs .van-tabs__line { +} + +.view-tabs .van-tabs__line { background: transparent; - } \ No newline at end of file +} + +.tab-btn { + font-size: 14px; + text-align: center; + color: #FFFFFF; + margin-bottom: 8px; +} \ No newline at end of file diff --git a/pages/insight/pages/modalInsight/modalDataList/index.js b/pages/insight/pages/modalInsight/modalDataList/index.js index cd117f6..78230eb 100644 --- a/pages/insight/pages/modalInsight/modalDataList/index.js +++ b/pages/insight/pages/modalInsight/modalDataList/index.js @@ -263,10 +263,10 @@ Page({ let date = d.toISOString().replace(/\D/g, ''); let result = this.data.result.length let total = this.data.total - if (result == 0 && total>50000) { + if (result == 0 && total*1 > 50000) { wx.showModal({ title: '提示', - content: '全部数据超过50000(万)条,是否要全部导出', + content: '全部数据超过50000条,是否要全部导出', success: function (r) { if (r.confirm) { that.setData({ diff --git a/pages/insight/pages/themeList/index.js b/pages/insight/pages/themeList/index.js index c795f10..3003611 100644 --- a/pages/insight/pages/themeList/index.js +++ b/pages/insight/pages/themeList/index.js @@ -363,10 +363,10 @@ Page({ let date = d.toISOString().replace(/\D/g, ''); let result = this.data.result.length let total = this.data.total - if (result == 0 && total>50000) { + if (result == 0 && total*1 > 50000) { wx.showModal({ title: '提示', - content: '全部数据超过50000(万)条,是否要全部导出', + content: '全部数据超过50000条,是否要全部导出', success: function (r) { if (r.confirm) { that.setData({ diff --git a/pages/insight/pages/themeList/index.wxml b/pages/insight/pages/themeList/index.wxml index 3364854..417f87d 100644 --- a/pages/insight/pages/themeList/index.wxml +++ b/pages/insight/pages/themeList/index.wxml @@ -110,7 +110,7 @@ - + 生成数据 数据看板 diff --git a/pages/insight/themeChild/index.js b/pages/insight/themeChild/index.js index 556f7ff..e9e6250 100644 --- a/pages/insight/themeChild/index.js +++ b/pages/insight/themeChild/index.js @@ -42,6 +42,7 @@ Component({ }, editTheme(event) { let id = event.currentTarget.dataset.id + this.triggerEvent('hide') wx.navigateTo({ url: '/pages/insight/pages/editTheme/index' + '?Guid=' + id, }) diff --git a/pages/mine/pages/myReport/index.js b/pages/mine/pages/myReport/index.js index c144e0f..8d0344b 100644 --- a/pages/mine/pages/myReport/index.js +++ b/pages/mine/pages/myReport/index.js @@ -167,9 +167,6 @@ Page({ let pos1 = path.lastIndexOf('/'); let pos2 = path.lastIndexOf('\\'); let position = Math.max(pos1, pos2); - console.log('frfrcf', pos1) - console.log('frfrcf', position) - console.log('frfrcf', path) if (position < 0) return path; else diff --git a/pages/varComm/pages/theme/index.js b/pages/varComm/pages/theme/index.js index 51c1821..a667cf7 100644 --- a/pages/varComm/pages/theme/index.js +++ b/pages/varComm/pages/theme/index.js @@ -113,7 +113,7 @@ Component({ app.globalData.request({ action: 'getSchemeDataToTheme', token: wx.getStorageSync('token'), - sType:'former' + sType:'contrast' }).then(res => { this.setData({ themeList: res diff --git a/pages/varComm/pages/theme/index.wxml b/pages/varComm/pages/theme/index.wxml index dd035ae..79bb1a2 100644 --- a/pages/varComm/pages/theme/index.wxml +++ b/pages/varComm/pages/theme/index.wxml @@ -38,7 +38,7 @@ - 主题推荐 + 主题列表 diff --git a/project.private.config.json b/project.private.config.json index e07779f..088ec53 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -21,9 +21,16 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "", + "pathName": "pages/insight/pages/brandInsight/index", + "query": "img=http%3A%2F%2Fv.sws010.com%2Fimg%2Fbrand%2F33.png", + "launchMode": "default", + "scene": null } ] } }, - "libVersion": "2.25.2" + "libVersion": "2.25.4" } \ No newline at end of file