1212
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="padding-top">
|
||||
<scroll-view scroll-x class=" nav text-center">
|
||||
<view class="cu-item" v-for="(item,index) in channelList" :class="index==TabCur?'text-red cur':''" :key="item.channelId"
|
||||
@tap="tabSelect" :data-id="index">
|
||||
<view class="cu-item" v-for="(item,index) in channelList" :class="index==TabCur?'text-red cur':''"
|
||||
:key="item.channelId" @tap="tabSelect" :data-id="index">
|
||||
<image class="site-icon margin-right-sm" :src="imgURL+'site-'+item.channelCode+'.png'" mode="widthFix">
|
||||
</image>
|
||||
{{item.channelCode|channelCodeFamt}}
|
||||
@@ -28,11 +28,20 @@
|
||||
</view>
|
||||
<!-- 油站特色 -->
|
||||
<view v-if="ts" class="bg-gray padding-top-sm ">
|
||||
<view @click="goFinancial" style="margin-bottom: 20rpx;" class="bg-white padding ">
|
||||
<view class="advertisement_body">
|
||||
<view class="advertisement_body_label">车辆评估</view>
|
||||
<view>评估分数+改善建议,组合报告查询8.8折</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white padding ">
|
||||
<text>油站特色</text>
|
||||
<view class="">
|
||||
<text style="margin-top: 20rpx;margin-left: 0;" class="cu-tag line-yellow margin-right-xs" v-for="(itemy,index) in tagList" :key="index">{{itemy}}</text>
|
||||
<text style="margin-top: 20rpx;margin-left: 0;height: auto;line-height: 20px;" v-if="channelPrice.activitySwitch" class="cu-tag line-yellow margin-right-xs">{{channelPrice.activityContent}}</text>
|
||||
<text style="margin-top: 20rpx;margin-left: 0;" class="cu-tag line-yellow margin-right-xs"
|
||||
v-for="(itemy,index) in tagList" :key="index">{{itemy}}</text>
|
||||
<text style="margin-top: 20rpx;margin-left: 0;height: auto;line-height: 20px;"
|
||||
v-if="channelPrice.activitySwitch"
|
||||
class="cu-tag line-yellow margin-right-xs">{{channelPrice.activityContent}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -40,9 +49,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Financial from '@/api/Financial.js'
|
||||
export default {
|
||||
props: {
|
||||
channelPrice:{
|
||||
channelPrice: {
|
||||
type: Object,
|
||||
default () {}
|
||||
},
|
||||
@@ -50,8 +60,8 @@
|
||||
type: Array,
|
||||
default () {}
|
||||
},
|
||||
ts:{
|
||||
type:Boolean,
|
||||
ts: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
@@ -63,6 +73,7 @@
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
activeChannelCode() {
|
||||
if (this.channelList.length && this.channelList[this.TabCur]) {
|
||||
let channelCode = this.channelList[this.TabCur].channelCode
|
||||
@@ -100,31 +111,54 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goFinancial(){
|
||||
const user = uni.getStorageSync('user');
|
||||
if(user){
|
||||
Financial.findHomePageReport({customerId:user.id}).then(res=>{
|
||||
if(res.data){
|
||||
uni.navigateTo({
|
||||
url:`../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:'../../../Financial/pages/index?guide=1'
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '请先登录!',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
tabSelect(e) {
|
||||
this.TabCur = e.currentTarget.dataset.id;
|
||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
moneyIntercept(value){
|
||||
moneyIntercept(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log(value,'************************')
|
||||
console.log(value, '************************')
|
||||
// let valus = (parseInt(value * 100) / 100).toFixed(2)
|
||||
// let valus = `${String(value).split('.')[0]}.${String(value).split('.')[1].substring(1,2)}`
|
||||
// let valus = Number(valus).toFixed(2)
|
||||
// console.log(String(value).split('.')[1].substring(2,4),String(value).split('.')[1].length,'*-*-*-*-');
|
||||
// console.log( Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01,'************');
|
||||
// return String(value).split('.')[1]&&String(value).split('.')[1].length>2? Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}`)+0.01 :Number(value).toFixed(2);
|
||||
return String(value).split('.')[1]&&String(value).split('.')[1].length>2?Number(`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`).toFixed(2) :Number(value).toFixed(2);
|
||||
return String(value).split('.')[1] && String(value).split('.')[1].length > 2 ? Number(
|
||||
`${String(value).split('.')[0]}.${String(value).split('.')[1].substring(0,2)}${Number(String(value).split('.')[1].substr(2))==0?'':9}`
|
||||
).toFixed(2) : Number(value).toFixed(2);
|
||||
} else {
|
||||
return Number(value).toFixed(2)
|
||||
}
|
||||
}
|
||||
},
|
||||
moneyFormat(value) {
|
||||
if (value != 'xxx.x') {
|
||||
console.log('old:',value)
|
||||
let realAmount = Math.floor(value * 100) / 100
|
||||
console.log('new:',realAmount)
|
||||
console.log('old:', value)
|
||||
let realAmount = Math.floor(value * 100) / 100
|
||||
console.log('new:', realAmount)
|
||||
// return realAmount
|
||||
return Number(value).toFixed(2)
|
||||
} else {
|
||||
@@ -149,7 +183,7 @@
|
||||
case 'WJY':
|
||||
return '万金油'
|
||||
case 'LV':
|
||||
return '其他'
|
||||
return '其他'
|
||||
case 'TY':
|
||||
return '团油'
|
||||
case 'YDJY':
|
||||
@@ -162,6 +196,30 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.advertisement_body_label {
|
||||
color: #FFFFFF;
|
||||
margin-right: 20rpx;
|
||||
padding: 10rpx 35rpx 10rpx 10rpx;
|
||||
border-radius: 10rpx;
|
||||
border-right: 0px solid;
|
||||
background-image: linear-gradient(32deg, #FF9000 70%, rgba(255, 255, 255, 0) 50%), linear-gradient(148deg, #FF9000 70%, rgba(255, 255, 255, 0) 50%);
|
||||
}
|
||||
|
||||
.advertisement_body {
|
||||
width: 100%;
|
||||
height: 69rpx;
|
||||
background: rgba(255, 144, 0, 0.2);
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
opacity: 1;
|
||||
color: #FF9000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20rpx;
|
||||
/* justify-content: center; */
|
||||
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.site-icon {
|
||||
width: 2rem;
|
||||
vertical-align: middle;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
</view>
|
||||
<view class="seach_input_right">
|
||||
<input v-model="seachValue" placeholder="请输入地址" type="text" @confirm="seachFn" />
|
||||
<view @click="seachFn" class="seach_input_butten"> 搜索</view>
|
||||
<!-- <uni-combox @input="seachFn" emptyTips="请输入内容" class="seach_input_right_input" :border="false" :candidates="candidates" placeholder="Location..."></uni-combox> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -132,6 +133,7 @@
|
||||
that.List = e.data
|
||||
},
|
||||
fail(e) {
|
||||
that.loding(false);
|
||||
console.log(e, '错误')
|
||||
},
|
||||
})
|
||||
@@ -149,6 +151,14 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.seach_input_butten{
|
||||
color: #FF6700;
|
||||
height: 100%;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.list_item_samall_size {
|
||||
color: #BBBBBB;
|
||||
font-size: 24rpx;
|
||||
@@ -199,8 +209,9 @@
|
||||
|
||||
.seach_input_right {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
margin:0 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.seach_input_left {
|
||||
|
||||
Reference in New Issue
Block a user