diff --git a/app.wxss b/app.wxss index c7b2ad7..02d8497 100644 --- a/app.wxss +++ b/app.wxss @@ -1,4 +1,6 @@ /**app.wxss**/ +/* 引入vant内置样式 */ +@import './miniprogram_npm/@vant/weapp/common/index.wxss'; .container { height: 100%; width: 100%; diff --git a/pages/insight/brandChild/index.js b/pages/insight/brandChild/index.js index 7b6a5fc..d8a6df8 100644 --- a/pages/insight/brandChild/index.js +++ b/pages/insight/brandChild/index.js @@ -69,7 +69,10 @@ Component({ methods: { toBrandInsight(e) { let id = e.currentTarget.dataset.id; //获取点击的id - console.log(id) + wx.setStorageSync('sBrand', id); + wx.navigateTo({ + url: "/pages/insight/pages/brandInsight/index" + }) }, handlerSearch(value) { @@ -105,7 +108,7 @@ Component({ action: 'getRecommendSeries', token: 't%2BrswgjvzGM=', }).then(res => { - // console.log(res) + console.log(res) }); }, }, diff --git a/pages/insight/brandChild/index.wxml b/pages/insight/brandChild/index.wxml index 828ef36..ce9cbda 100644 --- a/pages/insight/brandChild/index.wxml +++ b/pages/insight/brandChild/index.wxml @@ -12,7 +12,7 @@ - + {{it.brandname}} diff --git a/pages/insight/eventChild/index.js b/pages/insight/eventChild/index.js index e9362c8..0ab31e3 100644 --- a/pages/insight/eventChild/index.js +++ b/pages/insight/eventChild/index.js @@ -1,49 +1,3 @@ -// Page({ -// 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: '媒体测评', -// } -// ], -// }, -// onShow() { -// this.getTabBar().init(); -// }, -// toEventDetail() { -// wx.navigateTo({ -// url: "/pages/insight/pages/eventInsight/index" -// }) -// } -// }) const app = getApp(); Component({ data: { @@ -54,10 +8,10 @@ Component({ methods: { toEventDetail(value) { let id = value.currentTarget.dataset.id; - console.log(id); - // wx.navigateTo({ - // url: "/pages/insight/pages/eventInsight/index" - // }) + wx.setStorageSync('sRele', id); + wx.navigateTo({ + url: "/pages/insight/pages/eventInsight/index" + }) } }, lifetimes: { diff --git a/pages/insight/modalChild/index.js b/pages/insight/modalChild/index.js index 9a88c6c..da04632 100644 --- a/pages/insight/modalChild/index.js +++ b/pages/insight/modalChild/index.js @@ -53,9 +53,9 @@ const app = getApp(); // }) // }, // toBrandInsight() { -// wx.navigateTo({ -// url: "/pages/insight/pages/brandInsight/index" -// }) + // wx.navigateTo({ + // url: "/pages/insight/pages/brandInsight/index" + // }) // }, // }) Component({ @@ -80,9 +80,6 @@ Component({ currentBrand: id, }) }); - // this.setData({ - // popShow: true - // }) }, handlerSearch(value) { let keyword = value.detail; @@ -91,12 +88,38 @@ Component({ token: 't%2BrswgjvzGM=', queryname: keyword }).then(res => { - console.log(res); + //图片少了.png后缀 + let arr = [] + for (let i = 65; i <= 90; i++) { + arr.push({ + name: String.fromCharCode(i), + data: [] + }); + } + for(let i of res){ + for(let j of arr){ + if(i.firstword == j.name){ + let obj = { + brandname: i.name, + img: i.img+'.png', + data: i.data, + firstword: i.firstword + } + j.data.push(obj) + } + } + }; + this.setData({ + brandList: arr + }); }); }, toModalInsight(value) { - let id = value.target.dataset.id - console.log(id) + let id = value.target.dataset.id; + wx.setStorageSync('sSeriesName', id); + // wx.navigateTo({ + // url: "/pages/insight/pages/modalInsight/index" + // }) }, onClose() { this.setData({ diff --git a/pages/insight/pages/brandInsight/index.js b/pages/insight/pages/brandInsight/index.js index 17918e9..8c103b5 100644 --- a/pages/insight/pages/brandInsight/index.js +++ b/pages/insight/pages/brandInsight/index.js @@ -1,6 +1,22 @@ +const app = getApp(); Page({ data: { - + totalCount: 0, + }, + onShow() { + this.getData(); + }, + getData() { + app.globalData.request({ + action: 'getBrandOverviewCount0528', + token: 't%2BrswgjvzGM=', + sTimeType: wx.getStorageSync('sTimeType') || 34, + sBrand: wx.getStorageSync('sBrand') || 34, + }).then(res => { + this.setData({ + totalCount: res.count + }) + }) }, toDataList() { console.log('test') diff --git a/pages/insight/pages/brandInsight/index.wxml b/pages/insight/pages/brandInsight/index.wxml index ce72643..d59efe1 100644 --- a/pages/insight/pages/brandInsight/index.wxml +++ b/pages/insight/pages/brandInsight/index.wxml @@ -12,7 +12,7 @@ 一汽大众汽车 - 99.3w 数据总量 + {{totalCount}} 数据总量 diff --git a/pages/insight/pages/eventInsight/evDatalist/index.js b/pages/insight/pages/eventInsight/evDatalist/index.js new file mode 100644 index 0000000..f7596f1 --- /dev/null +++ b/pages/insight/pages/eventInsight/evDatalist/index.js @@ -0,0 +1,14 @@ +const app = getApp(); +Component({ + data: { + + }, + methods: { + + }, + lifetimes: { + attached() { + + } + } +}) \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evDatalist/index.json b/pages/insight/pages/eventInsight/evDatalist/index.json new file mode 100644 index 0000000..9263cc5 --- /dev/null +++ b/pages/insight/pages/eventInsight/evDatalist/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + + }, + "component": true +} \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evDatalist/index.wxml b/pages/insight/pages/eventInsight/evDatalist/index.wxml new file mode 100644 index 0000000..68ebc7b --- /dev/null +++ b/pages/insight/pages/eventInsight/evDatalist/index.wxml @@ -0,0 +1,3 @@ + + 数据列表 + \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evDatalist/index.wxss b/pages/insight/pages/eventInsight/evDatalist/index.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/insight/pages/eventInsight/evTailwing/index.js b/pages/insight/pages/eventInsight/evTailwing/index.js new file mode 100644 index 0000000..f7596f1 --- /dev/null +++ b/pages/insight/pages/eventInsight/evTailwing/index.js @@ -0,0 +1,14 @@ +const app = getApp(); +Component({ + data: { + + }, + methods: { + + }, + lifetimes: { + attached() { + + } + } +}) \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evTailwing/index.json b/pages/insight/pages/eventInsight/evTailwing/index.json new file mode 100644 index 0000000..9263cc5 --- /dev/null +++ b/pages/insight/pages/eventInsight/evTailwing/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + + }, + "component": true +} \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evTailwing/index.wxml b/pages/insight/pages/eventInsight/evTailwing/index.wxml new file mode 100644 index 0000000..793e4c9 --- /dev/null +++ b/pages/insight/pages/eventInsight/evTailwing/index.wxml @@ -0,0 +1,3 @@ + + 尾翼洞察 + \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evTailwing/index.wxss b/pages/insight/pages/eventInsight/evTailwing/index.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/insight/pages/eventInsight/evTotal/index.js b/pages/insight/pages/eventInsight/evTotal/index.js new file mode 100644 index 0000000..f7596f1 --- /dev/null +++ b/pages/insight/pages/eventInsight/evTotal/index.js @@ -0,0 +1,14 @@ +const app = getApp(); +Component({ + data: { + + }, + methods: { + + }, + lifetimes: { + attached() { + + } + } +}) \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evTotal/index.json b/pages/insight/pages/eventInsight/evTotal/index.json new file mode 100644 index 0000000..9263cc5 --- /dev/null +++ b/pages/insight/pages/eventInsight/evTotal/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + + }, + "component": true +} \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evTotal/index.wxml b/pages/insight/pages/eventInsight/evTotal/index.wxml new file mode 100644 index 0000000..f5f60b1 --- /dev/null +++ b/pages/insight/pages/eventInsight/evTotal/index.wxml @@ -0,0 +1,3 @@ + + test + \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evTotal/index.wxss b/pages/insight/pages/eventInsight/evTotal/index.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/insight/pages/eventInsight/evWeibo/index.js b/pages/insight/pages/eventInsight/evWeibo/index.js new file mode 100644 index 0000000..f7596f1 --- /dev/null +++ b/pages/insight/pages/eventInsight/evWeibo/index.js @@ -0,0 +1,14 @@ +const app = getApp(); +Component({ + data: { + + }, + methods: { + + }, + lifetimes: { + attached() { + + } + } +}) \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evWeibo/index.json b/pages/insight/pages/eventInsight/evWeibo/index.json new file mode 100644 index 0000000..9263cc5 --- /dev/null +++ b/pages/insight/pages/eventInsight/evWeibo/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + + }, + "component": true +} \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evWeibo/index.wxml b/pages/insight/pages/eventInsight/evWeibo/index.wxml new file mode 100644 index 0000000..c3c57fe --- /dev/null +++ b/pages/insight/pages/eventInsight/evWeibo/index.wxml @@ -0,0 +1,3 @@ + + WeiboTest + \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/evWeibo/index.wxss b/pages/insight/pages/eventInsight/evWeibo/index.wxss new file mode 100644 index 0000000..e69de29 diff --git a/pages/insight/pages/eventInsight/index.js b/pages/insight/pages/eventInsight/index.js index 17918e9..962d86b 100644 --- a/pages/insight/pages/eventInsight/index.js +++ b/pages/insight/pages/eventInsight/index.js @@ -1,6 +1,29 @@ +const app = getApp(); Page({ data: { - + detailData: {} + }, + onShow() { + this.getData(); + }, + getData() { + app.globalData.request({ + action: 'getEventData', + token: 't%2BrswgjvzGM=', + sRele: wx.getStorageSync('sRele') || '', + }).then(res => { + let data = res[0]; + let obj = { + title: data._source.events_title, + description: data._source.description, + source_time: data._source.source_time, + effect: data._source.Effect, + events_count: data._source.events_count + }; + this.setData({ + detailData: obj + }) + }) }, toDataList() { console.log('test') diff --git a/pages/insight/pages/eventInsight/index.json b/pages/insight/pages/eventInsight/index.json index 67fdffc..eeff981 100644 --- a/pages/insight/pages/eventInsight/index.json +++ b/pages/insight/pages/eventInsight/index.json @@ -1,6 +1,10 @@ { "usingComponents": { - "time-component":"/components/timecomponent/index" + "time-component":"/components/timecomponent/index", + "ev-total":"../eventInsight/evTotal/index", + "ev-weibo":"../eventInsight/evWeibo/index", + "ev-tailwing":"../eventInsight/evTailwing/index", + "ev-datalist":"../eventInsight/evDatalist/index" }, "navigationBarTitleText": "事件详情" } \ No newline at end of file diff --git a/pages/insight/pages/eventInsight/index.wxml b/pages/insight/pages/eventInsight/index.wxml index 78e70d9..63714bf 100644 --- a/pages/insight/pages/eventInsight/index.wxml +++ b/pages/insight/pages/eventInsight/index.wxml @@ -2,22 +2,22 @@ - 哈弗大狗追猎顶配版上市发布会即将耀目登场,快来关注 - 在当下汽车市场,鲜有一款车能像哈弗大狗一样在取名阶段就掀起全网关注。当然自上市以来,哈... + {{detailData.title}} + {{detailData.description}} 开始时间 - 2022-06-10 01:00:49 + {{detailData.source_time}} 影响力指数 - 71.4 + {{detailData.effect}} 传播总量 - 116045 + {{detailData.events_count}} @@ -25,16 +25,16 @@ - test + - test + - test + - test +