zx 3 years ago
parent b5d53ee13f
commit ac902f2fd9

@ -1,6 +1,7 @@
{
"usingComponents": {
"time-component":"/components/timecomponent/index",
"time-custom": "../../../../components/timeCustom/index",
"total-review":"./totalReview/index",
"weibo-insight":"./weiboInsight/index",
"tutor-insight":"./TutorInsight/index",

@ -1,6 +1,6 @@
<view>
<view class="top-brand-switch">
<time-component bind:change="changeTime"></time-component>
<time-custom bind:change="changeTime"></time-custom>
<view class="switch-container">
<van-row>
<van-col class="tab-btn" bindtap="goBack" span="8"><van-icon name="exchange" /> 切换品牌</van-col>

@ -8,6 +8,10 @@ Component({
sQuDao: [],
sQingGan: [],
sCrisis: [],
sTimeType: 34,
sStartTime: '',
sEndTime: '',
iTimeType: 0,
//API
affList: [],
qgList: [],
@ -34,14 +38,16 @@ Component({
app.globalData.request({
action: 'getList', //数据列表
token: 't%2BrswgjvzGM=',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sTimeType: this.data.sTimeType,
sStartTime: this.data.sStartTime,
sEndTime: this.data.sEndTime,
sQuDao: (this.data.sQuDao).join(',') || '-1',
sQingGan: (this.data.sQingGan).join(',') || '-1',
iPageIndex: 1,
iPageSize: 10,
sType: 'BrandDataHot',
isSourcetype: 0, //1返回渠道 0不返回
iTimeType: 0, //0发布时间 1入库时间
iTimeType: this.data.iTimeType, //0发布时间 1入库时间
sCrisis: (this.data.sCrisis).join(','),
sRele: wx.getStorageSync('sRele') || '',
}).then(res => {
@ -49,18 +55,19 @@ Component({
});
},
changeTime(event) {
wx.setStorageSync('sTimeType', event.detail.sTimeType);
this.setData({sTimeType: event.detail.sTimeType})
if(event.detail.sStartTime) {
wx.setStorageSync('sStartTime', event.detail.sStartTime);
this.setData({sStartTime: event.detail.sStartTime})
};
if(event.detail.sEndTime) {
wx.setStorageSync('sEndTime', event.detail.sEndTime);
this.setData({sEndTime: event.detail.sEndTime})
};
this.getData();
},
changeSource(event) {this.setData({ sQuDao: event.detail });this.getData()},
changeQingGan(event) {this.setData({ sQingGan: event.detail });this.getData()},
changeWeiJi(event) {this.setData({ sCrisis: event.detail });this.getData()}
changeWeiJi(event) {this.setData({ sCrisis: event.detail });this.getData()},
iTimeTypeByChange(event) {this.setData({iTimeType: event.detail});this.getData()},
},
lifetimes: {
attached() {

@ -1,6 +1,7 @@
{
"usingComponents": {
"time-component":"/components/timecomponent/index"
"time-component":"/components/timecomponent/index",
"time-custom": "../../../../../components/timeCustom/index"
},
"component": true
}

@ -15,12 +15,18 @@
</van-checkbox-group>
</van-dropdown-item>
<van-dropdown-item id="sort" title="时间范围">
<view style="margin-top: -32rpx;">
<time-component bind:change="changeTime"></time-component>
<view style="margin-top: -32rpx;">
<time-custom bind:change="changeTime"></time-custom>
</view>
</van-dropdown-item>
<van-dropdown-item id="back" title="更多筛选">
<view style="padding: 0rpx 32rpx 32rpx 32rpx;">
<view>排序方式</view>
<van-radio-group value="{{ iTimeType }}" bind:change="iTimeTypeByChange">
<van-radio name="0">发布时间</van-radio>
<van-radio name="1">入库时间</van-radio>
</van-radio-group>
</view>
</van-dropdown-item>
</van-dropdown-menu>
</view>

@ -36,5 +36,17 @@ Page({
this.setData({
tabActive: n
})
}
},
changeTime(event) {
this.setData({ compShow: false })
wx.setStorageSync('sTimeType', event.detail.sTimeType);
if(event.detail.sStartTime) {
wx.setStorageSync('sStartTime', event.detail.sStartTime);
};
if(event.detail.sEndTime) {
wx.setStorageSync('sEndTime', event.detail.sEndTime);
};
this.setData({ compShow: true }) //重新渲染组件刷新页面
this.getData();
},
})

@ -1,6 +1,7 @@
{
"usingComponents": {
"time-component":"/components/timecomponent/index",
"time-custom": "../../../../components/timeCustom/index",
"ev-total":"../eventInsight/evTotal/index",
"ev-weibo":"../eventInsight/evWeibo/index",
"ev-tailwing":"../eventInsight/evTailwing/index",

@ -1,5 +1,6 @@
<view>
<view class="top-brand-switch">
<time-custom bind:change="changeTime"></time-custom>
<view class="switch-container">
<view class="switch-middle">
<view class="main-title">{{detailData.title}}</view>

@ -1,6 +1,7 @@
{
"usingComponents": {
"time-component":"/components/timecomponent/index",
"time-custom": "../../../../components/timeCustom/index",
"total-review":"./totalReview/index",
"weibo-insight":"./weiboInsight/index",
"tutor-insight":"./TutorInsight/index",

@ -1,6 +1,6 @@
<view>
<view class="top-brand-switch">
<time-component bind:change="changeTime"></time-component>
<time-custom bind:change="changeTime"></time-custom>
<view class="switch-container">
<van-row>
<van-col class="tab-btn" bindtap="goBack" span="8"><van-icon name="exchange" /> 切换车型</van-col>

Loading…
Cancel
Save