upgrade 9.4 #112

Merged
hansu merged 4 commits from zhy into master 2020-08-04 12:11:58 +00:00
8 changed files with 28 additions and 13 deletions

View File

@ -93,7 +93,8 @@ export default {
}, },
setSwiperHeight() { setSwiperHeight() {
// height: 230px, margin-bottom: 13 // height: 230px, margin-bottom: 13
this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (230 + 13) + 'px'; const height = Math.ceil(this.goodsList.length / 2) * (230 + 13);
this.swiperHeight = height == 0 ? '230px' : height + 'px';
}, },
// tabsswiper // tabsswiper
tabsChange(index) { tabsChange(index) {

View File

@ -2,8 +2,8 @@
<view class="item" @click="toDetailsPage"> <view class="item" @click="toDetailsPage">
<image :src="info.goods_image" mode="aspectFill" class="img"></image> <image :src="info.goods_image" mode="aspectFill" class="img"></image>
<view class="info"> <view class="info">
<text class="title u-line-1">{{ info.goods_name }}</text> <text class="title u-line-2">{{ info.goods_name }}</text>
<text class="jianjie u-line-2">{{ info.goods_advword }}</text> <text class="jianjie u-line-1">{{ info.goods_advword }}</text>
<text class="price">{{ info.goods_price }}</text> <text class="price">{{ info.goods_price }}</text>
</view> </view>
</view> </view>
@ -61,6 +61,7 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
.title{ .title{
line-height: 34rpx;
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
margin-bottom: 13rpx; margin-bottom: 13rpx;

View File

@ -241,7 +241,7 @@ export default {
let img = []; let img = [];
list.forEach(item => { list.forEach(item => {
let temp = { let temp = {
image: item image: item[1]
} }
img.push(temp); img.push(temp);
}) })
@ -311,7 +311,7 @@ export default {
if (res.errCode == 0) { if (res.errCode == 0) {
this.evaluate = res.data.goods_evaluate_info; this.evaluate = res.data.goods_evaluate_info;
this.goodsInfo = res.data.goods; this.goodsInfo = res.data.goods;
this.setSwiperList(res.data.goods_image[0]); this.setSwiperList(res.data.goods_image);
this.glist = res.data.spec_list; this.glist = res.data.spec_list;
// console.log(this.goodsInfo.mobile_body); // console.log(this.goodsInfo.mobile_body);
} }
@ -325,7 +325,7 @@ export default {
if(res.errCode == 0) { if(res.errCode == 0) {
this.evaluate = res.data.data.goods_evaluate_info; this.evaluate = res.data.data.goods_evaluate_info;
this.goodsInfo = res.data.data.goods; this.goodsInfo = res.data.data.goods;
this.setSwiperList(res.data.data.goods_image[0]); this.setSwiperList(res.data.data.goods_image);
this.glist = res.data.data.spec_list; this.glist = res.data.data.spec_list;
this.user_suc = res.data.data.user_suc; this.user_suc = res.data.data.user_suc;
this.groupUser =res.data.data.user; this.groupUser =res.data.data.user;
@ -341,7 +341,7 @@ export default {
this.groupbuyInfo = res.data.groupbuyInfo; this.groupbuyInfo = res.data.groupbuyInfo;
this.evaluate = res.data.goodsInfo.goods_evaluate_info; this.evaluate = res.data.goodsInfo.goods_evaluate_info;
this.goodsInfo = res.data.goodsInfo.goods; this.goodsInfo = res.data.goodsInfo.goods;
this.setSwiperList(res.data.goodsInfo.goods_image[0]); this.setSwiperList(res.data.goodsInfo.goods_image);
this.setSpikeTime(res.data.groupbuyInfo.groupbuy_endtime); this.setSpikeTime(res.data.groupbuyInfo.groupbuy_endtime);
} }
}) })

View File

@ -12,7 +12,7 @@
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view> <view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view>
</view> </view>
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore"> <scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-item"> <view v-for="goods in goodsList" :key="goods.goods_id" class="goods-item" @click="toDetailsPage(goods.goods_id)">
<image :src="goods.goods_image"></image> <image :src="goods.goods_image"></image>
<view class="right"> <view class="right">
<view class="name u-line-1">{{ goods.goods_name }}</view> <view class="name u-line-1">{{ goods.goods_name }}</view>
@ -112,6 +112,12 @@ export default {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: title title: title
}); });
},
toDetailsPage(id) {
this.$u.route('/pageB/sdetails/index', {
id: id,
type: 1 // 1 2 3 4
});
} }
} }
}; };

View File

@ -49,6 +49,12 @@
onReady() { onReady() {
this.getMenuItemTop() this.getMenuItemTop()
}, },
onNavigationBarButtonTap(e) {
if(e.index == 0) this.$u.route('/pageB/search/index');
},
onNavigationBarSearchInputClicked() {
this.$u.route('/pageB/search/index');
},
methods: { methods: {
toSearchPage() { toSearchPage() {
this.$u.route({ this.$u.route({

View File

@ -3,7 +3,7 @@
<view class="status" v-if="orderstate"> <view class="status" v-if="orderstate">
<view class="text"> <view class="text">
<view class="status-text">{{ s_object[orderstate].text }}</view> <view class="status-text">{{ s_object[orderstate].text }}</view>
<view class="time" v-if="orderInfo.view_type == 1">距离结束{{ countdown }}</view> <view class="time" v-if="orderInfo.view_type == 1 || orderInfo.view_type == 9">距离结束{{ countdown }}</view>
</view> </view>
<image :src="s_object[orderstate].image"></image> <image :src="s_object[orderstate].image"></image>
</view> </view>
@ -175,7 +175,7 @@ export default {
// console.log(spikeTime); // console.log(spikeTime);
if(spikeTime <= 0) { if(spikeTime <= 0) {
this.isSpike = true; this.isSpike = true;
this.spikeTime = '00:00:00' this.countdown = '00:00:00'
clearInterval(this.timer); clearInterval(this.timer);
return false; return false;
}; };
@ -204,9 +204,10 @@ export default {
}).then(res => { }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.orderInfo = res.data; this.orderInfo = res.data;
this.setSpikeTime(res.data.end_time);
this.viewState(this.orderInfo.view_type); this.viewState(this.orderInfo.view_type);
this.setTitle(this.orderInfo.view_type); this.setTitle(this.orderInfo.view_type);
if(res.data.view_type == 1) this.setSpikeTime(res.data.end_time);
else if(res.data.view_type == 9) this.setSpikeTime(res.data.pintuangroup_endtime);
} }
uni.stopPullDownRefresh(); // uni.stopPullDownRefresh(); //
}) })

View File

@ -570,7 +570,7 @@
"buttons": [ "buttons": [
{ {
"type":"none", "type":"none",
"text":"写意见", "text":"投诉",
"float":"right", "float":"right",
"fontSize":"14" "fontSize":"14"
} }