zx 3 years ago
parent 5c95bf7cba
commit 9ed287bf6b

@ -1,4 +1,6 @@
/**app.wxss**/
/* 引入vant内置样式 */
@import './miniprogram_npm/@vant/weapp/common/index.wxss';
.container {
height: 100%;
width: 100%;

@ -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)
});
},
},

@ -12,7 +12,7 @@
<van-index-bar class="bs-bar" sticky-offset-top="40">
<view wx:for="{{brandList}}" wx:for-item="item" wx:key="index">
<van-index-anchor index="{{item.name}}" />
<van-cell wx:for="{{item.data}}" wx:for-item="it" wx:key="index" clickable data-id="{{it.brandid}}" bind:click="toBrandInsight">
<van-cell wx:for="{{item.data}}" wx:for-item="it" wx:key="index" clickable data-id="{{it.brandname}}" bind:click="toBrandInsight">
<view slot="title" class="cell-item">
<image slot="icon" class="bs-item-image" src="{{it.img}}" />
<text>{{it.brandname}}</text>

@ -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: {

@ -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({

@ -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')

@ -12,7 +12,7 @@
<van-image round src=""></van-image>
<view class="brand-number">
<view>一汽大众汽车</view>
<view>99.3w <text style="font-size: 13px;font-weight: 400;color: rgba(255,255,255,0.6000);">数据总量</text></view>
<view>{{totalCount}} <text style="font-size: 13px;font-weight: 400;color: rgba(255,255,255,0.6000);">数据总量</text></view>
</view>
</view>
<van-divider custom-style="background: linear-gradient(117deg, rgba(245,245,245,0) 0%, #EEEEEE 50%, rgba(232,232,232,0) 100%);" hairline />

@ -0,0 +1,14 @@
const app = getApp();
Component({
data: {
},
methods: {
},
lifetimes: {
attached() {
}
}
})

@ -0,0 +1,6 @@
{
"usingComponents": {
},
"component": true
}

@ -0,0 +1,14 @@
const app = getApp();
Component({
data: {
},
methods: {
},
lifetimes: {
attached() {
}
}
})

@ -0,0 +1,6 @@
{
"usingComponents": {
},
"component": true
}

@ -0,0 +1,14 @@
const app = getApp();
Component({
data: {
},
methods: {
},
lifetimes: {
attached() {
}
}
})

@ -0,0 +1,6 @@
{
"usingComponents": {
},
"component": true
}

@ -0,0 +1,14 @@
const app = getApp();
Component({
data: {
},
methods: {
},
lifetimes: {
attached() {
}
}
})

@ -0,0 +1,6 @@
{
"usingComponents": {
},
"component": true
}

@ -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')

@ -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": "事件详情"
}

@ -2,22 +2,22 @@
<view class="top-brand-switch">
<view class="switch-container">
<view class="switch-middle">
<view class="main-title">哈弗大狗追猎顶配版上市发布会即将耀目登场,快来关注</view>
<view class="sub-title">在当下汽车市场,鲜有一款车能像哈弗大狗一样在取名阶段就掀起全网关注。当然自上市以来,哈...</view>
<view class="main-title">{{detailData.title}}</view>
<view class="van-multi-ellipsis--l2" style="font-size: 14px;font-weight: 400;color: rgba(255,255,255,0.6000);margin: 12rpx 32rpx 0rpx 32rpx;">{{detailData.description}}</view>
</view>
<van-divider custom-style="background: linear-gradient(117deg, rgba(245,245,245,0) 0%, #EEEEEE 50%, rgba(232,232,232,0) 100%);" hairline />
<van-row>
<van-col class="tab-btn" span="10">
<view class="bottom-title">开始时间</view>
<view class="bottom-number">2022-06-10 01:00:49</view>
<view class="bottom-number">{{detailData.source_time}}</view>
</van-col>
<van-col class="tab-btn" span="7">
<view class="bottom-title">影响力指数</view>
<view class="bottom-number">71.4</view>
<view class="bottom-number">{{detailData.effect}}</view>
</van-col>
<van-col class="tab-btn" span="7">
<view class="bottom-title">传播总量</view>
<view class="bottom-number">116045</view>
<view class="bottom-number">{{detailData.events_count}}</view>
</van-col>
</van-row>
</view>
@ -25,16 +25,16 @@
<view class="bottom-view">
<van-tabs class="view-tabs" swipe-threshold="4">
<van-tab title="概括">
<view>test</view>
<ev-total></ev-total>
</van-tab>
<van-tab title="微博洞察">
<view>test</view>
<ev-weibo></ev-weibo>
</van-tab>
<van-tab title="尾翼洞察">
<view>test</view>
<ev-tailwing></ev-tailwing>
</van-tab>
<van-tab title="数据列表">
<view>test</view>
<ev-datalist></ev-datalist>
</van-tab>
</van-tabs>
</view>

Loading…
Cancel
Save