yangsai@163.com 7 months ago
parent f519b14b79
commit ed67e7f78d
  1. 45
      pages/goods/detail.vue
  2. 11
      pages/goods/list.vue
  3. 12
      pages/index/index.vue

@ -33,11 +33,11 @@
<text class="sellLeft"></text>{{goods.line_price_min?Number(goods.line_price_min):0}}
</view>
</view>
<view class="right">
<view class="right" >
<view class="rightPrice" v-if="goods.is_check==1">
<image :src="$picUrl+'/static/detail/shenhe.png'" style="width: 44rpx;height: 42rpx;"></image>
</view>
<view class="rightBox">
<view class="rightBox" v-if="!isSeckill">
<image :src="$picUrl+'/static/detail/ben.png'" v-if="userInfo.user_type==40"
style="width: 44rpx;height: 42rpx;"></image>
<image :src="$picUrl+'/static/detail/zhuan.png'" v-if="userInfo.user_type==30"
@ -48,6 +48,26 @@
<text class="span"
v-else>{{(goods.line_price_min>0&&goods.goods_price_min>0)?Number((Number(goods.line_price_min)-Number(goods.goods_price_min)).toFixed(2)):0}}</text>
</view>
<view class="rightBox" v-if="isSeckill" style="background:unset;padding:unset;">
<text class="span" style="color: #ffffff;font-size: 45rpx;font-family: STXinwei;"
>限时抢购</text>
</view>
<view class="rest" v-if="isSeckill" style="display: inline-flex;color:#ffffff;font-size: 30rpx;margin-top: 5rpx;float: right;width: 300rpx;">
<text style="margin-right: 20rpx;font-family: STXinwei;">距活动{{seckillText}}</text>
<u-count-down :timestamp="isBuy" format="HH:mm:ss" autoStart
@change="onChangeSeckillCutDownTime">
<view class="date-time" style="font-family: STXinwei;">
<text
class="time">{{timeData.hours>=10?timeData.hours:"0"+Number(timeData.hours)}}</text>
<text class="da">:</text>
<text
class="time">{{timeData.minutes>=10?timeData.minutes:"0"+Number(timeData.minutes)}}</text>
<text class="da">:</text>
<text
class="time">{{timeData.seconds>=10?timeData.seconds:"0"+Number(timeData.seconds)}}</text>
</view>
</u-count-down>
</view>
</view>
</view>
<view class="pro" v-if="userInfo.user_type==10">
@ -285,7 +305,7 @@
<template v-if="!isPre">
<template v-if="isSeckill">
<template v-if="isBuy">
<template v-if="seckillText=='距离'">
<template v-if="seckillText=='距离'||seckillText=='结束'">
<view class="addCar"
:style="{'background': stockValue=='有货'?'#FF9E2B':'#cecece' }"
@click="stockValue=='有货'?choseSku(2):''">
@ -294,7 +314,7 @@
<view class="buyNow"
:style="{'background': stockValue=='有货'?'linear-gradient(102deg, #FE5E06 0%, #F3221A 100%)':'#cecece' }"
@click="stockValue=='有货'?choseSku(3):''">
立即购
立即
</view>
</template>
<template v-else>
@ -445,6 +465,7 @@
},
data() {
return {
timestamp: new Date().getTime(),
goods_sku_no: "",
isTodo: false,
result: {},
@ -498,6 +519,7 @@
multiArray: [],
multiData: [],
stockValue: '有货',
timeData: {},
addressResult: {
province: '江苏省',
city: '南京市',
@ -517,7 +539,8 @@
// this.goodsId = options.goodsId ? options.goodsId : null
this.pre_id = options.pre_id ? options.pre_id : null;
this.isSeckill = options.isSeckill ? options.isSeckill : null;
this.isBuy = options.isBuy ? decodeURIComponent(options.isBuy) : null;
this.isBuy = options.isBuy ? Number(options.isBuy) : null;
console.log(this.isBuy);
this.seckillText = options.seckillText ? decodeURIComponent(options.seckillText) : null;
this.getSuggestGoods()
this.getServeList()
@ -550,6 +573,7 @@
this.isLogin = false;
this.userInfo = {}
}
console.log(this.userInfo)
},
onPageScroll(e) {
if (e.scrollTop <= 200) { // true
@ -601,6 +625,9 @@
]
}
},
onChangeSeckillCutDownTime(e) {
this.timeData = e
},
//
multiChange: function(e) {
this.multiIndex = e.detail.value;
@ -1323,9 +1350,10 @@
}
.right {
display: flex;
//display: flex;
align-items: center;
margin-right: 40rpx;
flex-flow: column;
.rightPrice {
overflow: hidden;
@ -1350,7 +1378,7 @@
}
.rightBox {
// min-width: 195rpx;
min-width: 120rpx;
padding: 0 20rpx;
height: 64rpx;
background: #FFFFFF;
@ -1358,7 +1386,8 @@
display: flex;
align-items: center;
justify-content: center;
width: 40%;
float:right;
image {
width: 38rpx;
height: 38rpx;

@ -256,7 +256,8 @@
sortType: 'all', //
sortPrice: '', // (true false)
options: {}, //
list: getEmptyPaginateObj(), //
list: [], //
// list: getEmptyPaginateObj(), //
//
upOption: {
@ -316,7 +317,8 @@
//
this.$refs.uWaterfall1.clear();
this.list.data = []
this.list = getEmptyPaginateObj()
this.list = []
//this.list = getEmptyPaginateObj()
this.mescroll.resetUpScroll()
},
getGoodsTypeList(category_id) {
@ -329,6 +331,8 @@
.then(res => {
if (res.data.list.length > 0) {
that.tabbar = res.data.list;
that.isBanrdActive = 0
that.list= [];
that.onChage(that.tabbar[0], 1,0)
// res.data.list.forEach(item => {
// item.children.forEach(item_1 => {
@ -433,6 +437,7 @@
let arr = getMoreListData(newList, app.list, pageNo);
app.list.data = app.arrayUnique(arr, 'goods_id')
app.total = result.data.list.total;
console.log(app.list)
resolve(newList)
})
.catch(reject)
@ -449,7 +454,7 @@
app.sortPrice = newSortPrice
app.$refs.uWaterfall1.clear();
app.list.data = []
app.list = getEmptyPaginateObj()
app.list = []
app.mescroll.resetUpScroll()
}
},

@ -175,7 +175,7 @@
</view>
</view>
<view class="linePrice">
<text></text>{{item.seckill_price_max}}
<text></text>{{item.original_price}}
</view>
</view>
</view>
@ -190,7 +190,7 @@
<view class="right">
<!-- <view class="rightContent"> -->
<view class="rightItem1" v-if="wxAppSetting.new_product">
<view style="margin-bottom: 10rpx;">
<view style="">
<image :src="$picUrl+'/static/index/xinpin.png'" mode="widthFix" @click="goNewGoods"
class="title"></image>
<view class="more" @click="goNewGoods">查看更多<u-icon name="arrow-right"></u-icon>
@ -827,8 +827,10 @@
GoodsApi.chartsGoodsJing().then(result => {
let arr = result.data;
let finalArr = arr.filter(item => {
console.log(val)
return item.category_id == val
})
console.log(finalArr)
if (finalArr.length > 0) {
let arr = finalArr[0].goods_list
if (arr && arr.length > 0) {
@ -840,6 +842,7 @@
})
}
this.paihangList = arr
console.log(this.paihangList)
}
})
},
@ -853,6 +856,7 @@
let count_down_time = result.data.tabbar[0].count_down_time.replace(/-/g, '/');
this.seckillCutDownTime = Math.ceil((new Date(count_down_time).getTime() - new Date()
.getTime()));
console.log(this.seckillCutDownTime)
} else {
this.seckillCutDownTime = 0
}
@ -1829,7 +1833,7 @@
&>image {
width: 90rpx;
height: 90rpx;
height: 100rpx;
}
.priceBox {
@ -1837,7 +1841,7 @@
height: 34rpx;
width: 134rpx;
left: 0;
top: 70rpx;
top: 80rpx;
z-index: 2;
image {

Loading…
Cancel
Save