7.13(优化
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
{{item.authorName}}
|
||||
</view>
|
||||
<view style="color: #999;font-size: 26rpx;">
|
||||
{{item.city || "未知"}} {{item.diffDays}}天前
|
||||
{{item.city || "未知"}} {{item.createTime|filtersTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -292,7 +292,8 @@
|
||||
} from "@/api/system/user.js"
|
||||
import {
|
||||
shareApi,
|
||||
formatNumber
|
||||
formatNumber,
|
||||
getTimeDifference
|
||||
} from "@/utils/index.js"
|
||||
import promptBox from "@/components/prompt-box/prompt-box.vue"
|
||||
import popupbox from "@/components/prompt-box/popupbox.vue"
|
||||
@@ -320,6 +321,11 @@
|
||||
popupbox
|
||||
},
|
||||
filters: {
|
||||
filtersTime(value) {
|
||||
// console.log(value);
|
||||
if (!value) return '--';
|
||||
return getTimeDifference(value);
|
||||
},
|
||||
filtersLikeNum(value) {
|
||||
if (!value) return 0;
|
||||
return formatNumber(value);
|
||||
@@ -669,13 +675,6 @@
|
||||
item.wide = uni.$u.getPx(`${item.wide}rpx`) * num + 'rpx'
|
||||
item.high = uni.$u.getPx(`${item.high}rpx`) * num + 'rpx'
|
||||
}
|
||||
const date1 = new Date();
|
||||
const date2 = new Date(item.createTime);
|
||||
// 计算相差的毫秒数
|
||||
const diffTime = Math.abs(date2 - date1);
|
||||
// 将毫秒数转换为天数
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
item.diffDays = diffDays
|
||||
})
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
}).catch(err => {
|
||||
@@ -709,13 +708,6 @@
|
||||
// item.high = this.pxToRpx(item.high) + 'rpx'
|
||||
// }
|
||||
}
|
||||
const date1 = new Date();
|
||||
const date2 = new Date(item.createTime);
|
||||
// 计算相差的毫秒数
|
||||
const diffTime = Math.abs(date2 - date1);
|
||||
// 将毫秒数转换为天数
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
item.diffDays = diffDays
|
||||
})
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
}).catch(err => {
|
||||
@@ -758,14 +750,6 @@
|
||||
// item.high = this.pxToRpx(item.high) + 'rpx'
|
||||
// }
|
||||
}
|
||||
|
||||
const date1 = new Date();
|
||||
const date2 = new Date(item.createTime);
|
||||
// 计算相差的毫秒数
|
||||
const diffTime = Math.abs(date2 - date1);
|
||||
// 将毫秒数转换为天数
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
item.diffDays = diffDays
|
||||
})
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
}).catch(err => {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<u-popup :show="show" :round="10" mode="bottom">
|
||||
<view class="outsideview">
|
||||
<view class="topview">
|
||||
<image src="https://qicheoss.oss-cn-shanghai.aliyuncs.com/static/images/images/logo.jpg" mode="" shape="circle"></image>
|
||||
<image src="http://qicheoss.oss-cn-shanghai.aliyuncs.com/static/logo.png" mode="" shape="circle"></image>
|
||||
<!-- <view class="txt">用户协议与隐私政策</view> -->
|
||||
<text class="txt">用户协议与隐私政策</text>
|
||||
</view>
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
</view>
|
||||
<view class="store_down">
|
||||
<view class="down_l">
|
||||
<image :src="merchantObj.backImage ? merchantObj.backImage : storeBackImage " mode=""></image>
|
||||
<image :src="merchantObj.avatar ? merchantObj.avatar : storeBackImage " mode=""></image>
|
||||
</view>
|
||||
<view class="down_r">
|
||||
<view class="r_up"> {{merchantObj.name ? merchantObj.name : '--'}} </view>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<view class="footview" hover-class="hover-footview" v-for="(item,index) in merchantList" :key="item.id"
|
||||
@click="link(`/pages/serve/coupons/cou_detail?id=${item.id}`,`${item.id}`,`${index}`)">
|
||||
<view class="footleft">
|
||||
<image class="footleft_img" :src="item.backImage"></image>
|
||||
<image class="footleft_img" :src="item.avatar"></image>
|
||||
<!-- coverImage 封面图 backImage 背景图 avatar 头像 -->
|
||||
</view>
|
||||
<view class="footright">
|
||||
|
||||
@@ -76,10 +76,13 @@
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
if(this.type == 'hot') {
|
||||
let city = uni.getStorageSync('current_city');
|
||||
console.log(city);
|
||||
getCardProductListAPI({
|
||||
limit:pageSize,
|
||||
page:pageNo,
|
||||
isHot:true
|
||||
isHot:true,
|
||||
city:city
|
||||
}).then(res=>{
|
||||
this.$refs.paging.complete(res.data.list)
|
||||
}).catch(err=>{
|
||||
@@ -88,7 +91,6 @@
|
||||
} else {
|
||||
this.getHelpList()
|
||||
}
|
||||
|
||||
},
|
||||
// 去详情
|
||||
toDetailPages(item){
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
<template>
|
||||
<view style="width: 750rpx;">
|
||||
<view class="serve-header">
|
||||
<image class="serve-bj" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_bj.png`" mode="aspectFill"></image>
|
||||
<image class="serve-bj" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_bj.png`"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
<view :style="{height: `${$u.sys().statusBarHeight}px;`}" />
|
||||
<view class="serve-title">
|
||||
<image class="serve-title-car" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_car.png`" mode=""></image>
|
||||
<image class="serve-title-tit" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_title.png`" mode=""></image>
|
||||
<image class="serve-title-car" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_car.png`" mode="">
|
||||
</image>
|
||||
<image class="serve-title-tit" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_title.png`"
|
||||
mode=""></image>
|
||||
</view>
|
||||
<view class="serve-search flex justify-between align-center">
|
||||
<view class="serve-search-left flex align-center" @click="$tab.navigateTo('/pagesA/search/serve_search')">
|
||||
<image class="serve-search-image" :src="`${config.aliyunOssUrl}/static/images/app/icon/search.png`" mode="">
|
||||
<image class="serve-search-image" :src="`${config.aliyunOssUrl}/static/images/app/icon/search.png`"
|
||||
mode="">
|
||||
</image>
|
||||
<view class="">搜索想要的商品</view>
|
||||
</view>
|
||||
@@ -22,15 +26,17 @@
|
||||
<u-swiper keyName="image" :list="branner" height="360rpx" @click="brannerClick"></u-swiper>
|
||||
</view>
|
||||
<view class="serve-assistance">
|
||||
<image class="serve-assistance-bj" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_assistance.png`" mode=""></image>
|
||||
<image class="serve-assistance-bj"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/home/serve_assistance.png`" mode=""></image>
|
||||
<view class="serve-assistance-all" @click="toMyActivityListPage">
|
||||
<view class="up_r_txt">更多</view>
|
||||
<u-icon name="arrow-right" color="#ffffff" size="10"></u-icon>
|
||||
</view>
|
||||
<image class="serve-assistance-serve-ass" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_ass.png`" mode=""></image>
|
||||
<image class="serve-assistance-serve-ass"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/home/serve_ass.png`" mode=""></image>
|
||||
<view class="serve-assistance-swiper">
|
||||
<swiper class="swiper" circular previousMargin='0rpx' nextMargin="0rpx"
|
||||
:indicator-dots="false" :autoplay="false" interval="4000" duration="500" @change="actTrimChengFn" :current="colorIndex" >
|
||||
<swiper class="swiper" circular previousMargin='0rpx' nextMargin="0rpx" :indicator-dots="false"
|
||||
:autoplay="false" interval="4000" duration="500" @change="actTrimChengFn" :current="colorIndex">
|
||||
<swiper-item v-for="(item,index) in couponList3" :key="index">
|
||||
<view id="showimage1" class="swiper-item flex">
|
||||
<image class="swiper-item-image" :src="item.cover" mode="aspectFill"></image>
|
||||
@@ -44,9 +50,9 @@
|
||||
<view class="schedule-num" :style="{width:item.widthNum+'rpx' }"></view>
|
||||
</view>
|
||||
<view class="swiper-item-cont-down flex justify-center align-center">
|
||||
<count-down :type="1" :stopTime="item.stopTime"></count-down> 后结束
|
||||
<count-down :type="1" :stopTime="item.stopTime"></count-down> 后结束
|
||||
</view>
|
||||
<!-- <u-count-down :time="item.stopTime" format="DD:HH:mm:ss" autoStart millisecond
|
||||
<!-- <u-count-down :time="item.stopTime" format="DD:HH:mm:ss" autoStart millisecond
|
||||
@change="onChange">
|
||||
|
||||
</u-count-down> -->
|
||||
@@ -62,7 +68,7 @@
|
||||
<view class="swiper-line-list flex justify-center align-center">
|
||||
<view v-if="couponList3.length==1" class="swiper-line-box2">
|
||||
</view>
|
||||
<view v-else class="swiper-line-box">
|
||||
<view v-else class="swiper-line-box">
|
||||
<view class="swiper-line"
|
||||
:style="{transform:`translateX(${96 / (couponList3.length-1) * colorIndex}rpx)`,transition: `transform 0.5s`}" />
|
||||
</view>
|
||||
@@ -72,14 +78,16 @@
|
||||
<view class="serve-seckill">
|
||||
<view class="serve-seckill-hea">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/home/serve_seckill.png`" mode=""></image>
|
||||
<image class="serve-seckill-logo" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_seckill_logo.png`" mode=""></image>
|
||||
<image class="serve-seckill-logo"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/home/serve_seckill_logo.png`" mode=""></image>
|
||||
<view class="up_r" @click="toCouponsPages(1)">
|
||||
<view class="up_r_txt">查看更多</view>
|
||||
<u-icon name="arrow-right" color="#999999" size="10"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="serve-seckill-bj">
|
||||
<image class="serve-seckill-bj-img" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_seckill_bj.png`"></image>
|
||||
<image class="serve-seckill-bj-img"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/home/serve_seckill_bj.png`"></image>
|
||||
<view class="serve-seckill-list flex" v-for="(item,index) in couponList2" :key="index">
|
||||
<image style="width: 200rpx;height: 200rpx;border-radius: 16rpx;" :src="item.cover"
|
||||
mode="aspectFill"></image>
|
||||
@@ -105,7 +113,8 @@
|
||||
<!-- 积分商城 -->
|
||||
<view class="serve-integral">
|
||||
<view class="serve-integral-header flex justify-between align-center">
|
||||
<image class="serve-integral-logo" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_integral_logo.png`" mode="">
|
||||
<image class="serve-integral-logo"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/home/serve_integral_logo.png`" mode="">
|
||||
</image>
|
||||
<view class="flex justify-center align-center" style="width: 160rpx;" @click="navRightsInterestsFn">
|
||||
<view class="f-28 c666">查看更多</view>
|
||||
@@ -130,7 +139,8 @@
|
||||
<view class="serve-hot-sales">
|
||||
<view class="serve-hot-list flex align-center justify-between">
|
||||
<view class="flex align-center">
|
||||
<view v-for="(item,index) in couponHotList" style="margin-right: 24rpx;" :key="index" @click="toDetailPages(item)">
|
||||
<view v-for="(item,index) in couponHotList" style="margin-right: 24rpx;" :key="index"
|
||||
@click="toDetailPages(item)">
|
||||
<image :src="item.cover" class="serve-hot-list-image" mode=""></image>
|
||||
<view class="f-28 serve-hot-list-name">{{item.name}}</view>
|
||||
<view class="serve-hot-list-butt fff">
|
||||
@@ -146,7 +156,8 @@
|
||||
<!-- 互动中心 -->
|
||||
<view class="serve-welfare">
|
||||
<view class="serve-welfare-header flex justify-between align-center">
|
||||
<image class="serve-welfare-logo" :src="`${config.aliyunOssUrl}/static/images/app/home/serve_welfare_logo.png`" mode=""></image>
|
||||
<image class="serve-welfare-logo"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/home/serve_welfare_logo.png`" mode=""></image>
|
||||
<view class="flex justify-center align-center" style="width: 160rpx;" @click="navActivityListFn">
|
||||
<view class="f-28 c666">查看更多</view>
|
||||
<u-icon name="arrow-right" color="#999999" size="14"></u-icon>
|
||||
@@ -206,7 +217,7 @@
|
||||
limit: 3,
|
||||
page: 1,
|
||||
type: 2,
|
||||
isShowOver:false
|
||||
isShowOver: false
|
||||
},
|
||||
couponData3: {
|
||||
limit: 4,
|
||||
@@ -228,11 +239,11 @@
|
||||
//话题列表
|
||||
welfareList: [],
|
||||
//当前城市
|
||||
city:''
|
||||
city: ''
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.city = uni.getStorageSync('current_city');
|
||||
this.city = uni.getStorageSync('current_city');
|
||||
this.getBranner()
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
this.unreadNum = userInfo.unreadNum
|
||||
@@ -255,7 +266,7 @@
|
||||
this.branner = res.data.list
|
||||
})
|
||||
// 2秒杀 // isHot=>true 热销
|
||||
this.couponData2.city=this.city
|
||||
this.couponData2.city = this.city
|
||||
getCardProductListAPI(this.couponData2).then(res => {
|
||||
res.data.list.forEach(item => {
|
||||
const timestamp1 = new Date().getTime();
|
||||
@@ -266,7 +277,7 @@
|
||||
this.couponList2 = res.data.list
|
||||
})
|
||||
// 热销
|
||||
this.couponHot.city=this.city
|
||||
this.couponHot.city = this.city
|
||||
getCardProductListAPI(this.couponHot).then(res => {
|
||||
console.log('热销', res.data.list);
|
||||
this.couponHotList = res.data.list
|
||||
@@ -364,14 +375,14 @@
|
||||
},
|
||||
// 点击轮播图
|
||||
brannerClick(e) {
|
||||
if (this.branner[e].linkType == 0 || this.branner[e].linkType == 2 ||
|
||||
this.branner[e].linkType == 3) {
|
||||
if (this.branner[e].linkType == 0 || this.branner[e].linkType == 2 ||
|
||||
this.branner[e].linkType == 3) {
|
||||
let linkObj = this.branner[e].minLinkUrl
|
||||
uni.navigateTo({
|
||||
url: linkObj
|
||||
})
|
||||
}else if(this.branner[e].linkType == 1){
|
||||
let linkObj = this.branner[e].minLinkUrl
|
||||
} else if (this.branner[e].linkType == 1) {
|
||||
let linkObj = this.branner[e].minLinkUrl
|
||||
uni.navigateTo({
|
||||
url: `/pagesA/rebate/rebate_web?contract=${linkObj}`
|
||||
})
|
||||
@@ -385,6 +396,7 @@
|
||||
page {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.serve-hot-sales {
|
||||
width: 690rpx;
|
||||
height: 303rpx;
|
||||
@@ -394,25 +406,25 @@
|
||||
margin-top: 30rpx;
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
|
||||
|
||||
.to-hot-pages {
|
||||
position: absolute;
|
||||
left: 94rpx;
|
||||
bottom: 20rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
|
||||
.serve-hot-list {
|
||||
height: 303rpx;
|
||||
padding-left: 310rpx;
|
||||
|
||||
|
||||
.serve-hot-list-image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.serve-hot-list-name {
|
||||
width: 160rpx;
|
||||
margin: 8rpx 0;
|
||||
@@ -423,7 +435,7 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
.serve-hot-list-butt {
|
||||
width: 141rpx;
|
||||
height: 50rpx;
|
||||
@@ -437,7 +449,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.serve-welfare {
|
||||
width: 690rpx;
|
||||
@@ -539,21 +551,21 @@
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
height: 920rpx;
|
||||
|
||||
|
||||
.serve-seckill-hea {
|
||||
width: 690rpx;
|
||||
height: 113rpx;
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
|
||||
.serve-seckill-bj {
|
||||
width: 690rpx;
|
||||
height: 863rpx;
|
||||
position: absolute;
|
||||
top: 56rpx;
|
||||
padding: 83rpx 25rpx 8rpx 25rpx;
|
||||
|
||||
|
||||
.serve-seckill-list {
|
||||
background: #fff;
|
||||
padding: 20rpx 11rpx 20rpx 18rpx;
|
||||
@@ -561,12 +573,12 @@
|
||||
height: 240rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
|
||||
.serve-seckill-list-cont {
|
||||
width: 400rpx;
|
||||
height: 200rpx;
|
||||
margin-left: 20rpx;
|
||||
|
||||
|
||||
.serve-seckill-list-cont-name {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
@@ -578,7 +590,7 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
.serve-seckill-list-cont-describe {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
@@ -592,27 +604,27 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
|
||||
.serve-seckill-list-cont-time {
|
||||
width: 249rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
|
||||
|
||||
// .swiper-item-cont {
|
||||
// width: 34rpx;
|
||||
// height: 34rpx;
|
||||
// font-size: 24rpx;
|
||||
// text-align: center;
|
||||
// line-height: 34rpx;
|
||||
// color: #FF5400;
|
||||
// background: rgba(255, 129, 62, 0.3);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// .swiper-item-cont {
|
||||
// width: 34rpx;
|
||||
// height: 34rpx;
|
||||
// font-size: 24rpx;
|
||||
// text-align: center;
|
||||
// line-height: 34rpx;
|
||||
// color: #FF5400;
|
||||
// background: rgba(255, 129, 62, 0.3);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.serve-seckill-list-butt {
|
||||
width: 170rpx;
|
||||
height: 59rpx;
|
||||
@@ -623,7 +635,7 @@
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.serve-seckill-bj-img {
|
||||
position: absolute;
|
||||
width: 690rpx;
|
||||
@@ -633,7 +645,7 @@
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.serve-seckill-logo {
|
||||
width: 196rpx;
|
||||
height: 49rpx;
|
||||
@@ -642,7 +654,7 @@
|
||||
position: absolute;
|
||||
z-index: 199;
|
||||
}
|
||||
|
||||
|
||||
.up_r {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
@@ -650,7 +662,7 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
|
||||
.up_r_txt {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
@@ -659,7 +671,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.swiper-box {
|
||||
@@ -677,12 +689,14 @@
|
||||
bottom: 23rpx;
|
||||
width: 690rpx;
|
||||
}
|
||||
.swiper-line-box2{
|
||||
|
||||
.swiper-line-box2 {
|
||||
width: 32rpx;
|
||||
height: 6rpx;
|
||||
background: #FE781C;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
|
||||
.swiper-line-box {
|
||||
width: 128rpx;
|
||||
height: 6rpx;
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
priceId: -1,
|
||||
carAgeId: -1,
|
||||
tenancyId: -1,
|
||||
height: 0,
|
||||
height: 750,
|
||||
show: false,
|
||||
showNavImg: false,
|
||||
form: {
|
||||
|
||||
Reference in New Issue
Block a user