dev
xiaowen 3 years ago
parent 946f585f7d
commit ba2ba87551

@ -12,9 +12,9 @@ Page({
sourceData: [],
mockData: [],
heightTop: 210,
lastTime: 0,
showPop: false,
series: []
series: [],
type: 2
},
onLaunch() {
wx.getSystemInfo({
@ -29,8 +29,15 @@ Page({
}
})
},
onLoad() {
let pages = getCurrentPages();
let currentPage = pages[pages.length-1]
let options = currentPage.options
this.setData({
type: options.type || 2
})
},
onShow() {
this.getTabBar().init();
this.getData();
this.createSelectorQuery().select(".nav-top").boundingClientRect(res => {
if (res) {
@ -51,24 +58,18 @@ Page({
})
},
handlerChoose(e) {
let thisTime = e.timeStamp;
let lastTime = this.data.lastTime;
const row = e.currentTarget.dataset.row;
wx.setStorageSync('sBrand', row.brandname);
if (lastTime != 0 && thisTime - lastTime < 500) {
this.setData({
showPop: false
})
if(this.data.type === 1) {
wx.switchTab({
url: "/pages/brandCrisis/index"
})
} else {
this.setData({
lastTime: thisTime,
showPop: true
})
this.getSeries(row.brandname);
}
})
return;
}
this.setData({
showPop: true
})
this.getSeries(row.brandname);
},
handlerCloseDialog() {
this.setData({

@ -25,20 +25,10 @@
</view>
</view>
</van-index-bar>
<van-transition show="{{ showPop }}" duration="{{ { enter: 300, leave: 1000 } }}" name="fade-right">
<view class="bs-right-pop" style="top: {{heightTop}}px;height: calc(100% - {{heightTop}}px - 85px);">
<view class="bs-r-inner">
<view class="bs-r-close">
<van-icon name="cross" bindtap="handlerCloseDialog" />
</view>
<view class="bs-r-cont">
<view class="bs-item" wx:for="{{series}}" wx:key="index" wx:for-item="item" data-row="{{item}}" bindtap="handlerChooseS">
<image slot="icon" class="bs-item-image" src="{{item.img}}" lazy-load="{{true}}" />
<text>{{item.name}}</text>
</view>
</view>
</view>
<van-popup z-index="2000" show="{{showPop}}" custom-style="height: calc(100% - {{heightTop}}px);width: 68%; top: {{heightTop*2+55}}px;" position="right" bind:close="handlerCloseDialog">
<view class="bs-item" wx:for="{{series}}" wx:key="index" wx:for-item="item" data-row="{{item}}" bindtap="handlerChooseS">
<image slot="icon" class="bs-item-image" src="{{item.img}}" lazy-load="{{true}}" />
<text>{{item.name}}</text>
</view>
</van-transition>
</van-popup>
</view>

@ -53,7 +53,7 @@
background: #F9F9F9;
}
.bs-bar .van-index-bar__sidebar {
top: 63% !important;
top: 56% !important;
}
/*横向列表项*/
.bs-tabs {
@ -69,7 +69,7 @@
}
.bs-tab-sv {
width: 100%;
width: 100%;
height: 150rpx;
white-space: nowrap;
display: flex;
justify-content: flex-start;
@ -124,14 +124,4 @@
height: calc(100% - 26px);
width: 100%;
overflow: auto;
}
.van-enter-active-class,
.van-leave-active-class {
transition-property: background-color, transform;
}
.van-enter-class,
.van-leave-to-class {
background-color: red;
transform: rotate(-360deg) translate3d(-100%, -100%, 0);
}

@ -2,7 +2,12 @@ const app = getApp();
Page({
data: {
imageUrl: getApp().globalData.imageUrl,
id: ''
id: "",
source: "",
user_author: "",
sourcetime: "",
title: "",
content: ""
},
onLoad() {
wx.setNavigationBarTitle({
@ -20,11 +25,23 @@ Page({
},
getData() {
app.globalData.request({
action: 'getSwsQyQuartz',
id: this.data.id,
action: 'getDataById',
sId: this.data.id,
sType: 'ZhuTiFenXiBl',
token: wx.getStorageSync('token') || 't%2BrswgjvzGM='
}).then(res => {
console.log(res)
let arr = res || [];
if(arr.length > 0) {
let data = arr[0];
console.log(data)
this.setData({
source: data._source.source,
user_author: data._source.user_author,
sourcetime: data._source.sourcetime,
title: data._source.title,
content: data._source.content
})
}
})
}
})

@ -11,21 +11,21 @@
</view>
</view>
<view class="d-top-cp-d2">
哈弗大狗追猎顶配版上市发布会即将耀目登场
{{title}}
</view>
<view class="d-top-cp-d3"></view>
<view class="d-top-cp-d4">
<view class="d-top-cp-d4-dd1">
<view style="font-size: 12px;color: #98CDFF;">发布时间</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">2022-06-10 01:00:49</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">{{sourcetime}}</view>
</view>
<view class="d-top-cp-d4-dd1" style="text-align: center;">
<view style="font-size: 12px;color: #98CDFF;">来源</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">汽车之家</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">{{source}}</view>
</view>
<view class="d-top-cp-d4-dd1" style="text-align: right;">
<view style="font-size: 12px;color: #98CDFF;">作者</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">小猪说车</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">{{user_author}}</view>
</view>
</view>
</view>
@ -33,8 +33,7 @@
</view>
<view class="bc-cont">
<view class="bc-c-d1">
在沙漠中驾驶极易迷失方向以下那种驾驶行为是正确的A一直走直线B手机有信号就随便开C开启循迹导航功能。能做这道题的是哈弗大狗追猎版。因为它新增了8种驾驶模式、循迹导航、人脸识别、遥控泊车、驾驶模式记忆、座椅记忆、外后视镜记忆、座舱清洁和等离子发生器等功能而8种驾驶模式中的沙地模式+循迹导航,将能让这台车驰骋沙海。
6月6日哈弗大狗追猎版深入中国第七大沙漠——库布齐的茫茫沙海成功打卡并宣布上市哈弗大狗1.5T 马犬追猎版、哈弗大狗2.0T 中华田园犬追猎版和哈弗大狗2.0T 哮天犬追猎版三款车型分别售价14.89万元、16.19万元和16.79万元。我觉得, 刻度座驾一直是哈弗大狗的产品属性。而追猎版的到来让这台车的属性更靠越野一些可能来到了4/5确实够劲。
{{content}}
</view>
<view class="bc-c-d2">
<view style="font-size: 14px; color: #333333;">相似信息</view>

@ -25,7 +25,14 @@
{
"name": "详情",
"pathName": "pages/detail/index",
"query": "id=10&mod=0",
"query": "id=452949383c124d65a4b315b64309d29e&mod=0",
"launchMode": "default",
"scene": null
},
{
"name": "品牌车型搜索",
"pathName": "pages/brandSearch/index",
"query": "",
"launchMode": "default",
"scene": null
}

Loading…
Cancel
Save