upgrade 9.4 #112
@ -93,7 +93,8 @@ export default {
 | 
			
		||||
		},
 | 
			
		||||
		setSwiperHeight() {
 | 
			
		||||
			// 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';
 | 
			
		||||
		},
 | 
			
		||||
		// tabs通知swiper切换
 | 
			
		||||
		tabsChange(index) {
 | 
			
		||||
 | 
			
		||||
@ -2,8 +2,8 @@
 | 
			
		||||
    <view class="item" @click="toDetailsPage">
 | 
			
		||||
        <image :src="info.goods_image" mode="aspectFill" class="img"></image>
 | 
			
		||||
        <view class="info">
 | 
			
		||||
            <text class="title u-line-1">{{ info.goods_name }}</text>
 | 
			
		||||
            <text class="jianjie u-line-2">{{ info.goods_advword }}</text>
 | 
			
		||||
            <text class="title u-line-2">{{ info.goods_name }}</text>
 | 
			
		||||
            <text class="jianjie u-line-1">{{ info.goods_advword }}</text>
 | 
			
		||||
            <text class="price">¥{{ info.goods_price }}</text>
 | 
			
		||||
        </view>
 | 
			
		||||
    </view>
 | 
			
		||||
@ -61,6 +61,7 @@ export default {
 | 
			
		||||
        flex-direction: column;
 | 
			
		||||
        justify-content: space-around;
 | 
			
		||||
        .title{
 | 
			
		||||
			line-height: 34rpx;
 | 
			
		||||
            font-size: 30rpx;
 | 
			
		||||
            color: #333;
 | 
			
		||||
			margin-bottom: 13rpx;
 | 
			
		||||
 | 
			
		||||
@ -241,7 +241,7 @@ export default {
 | 
			
		||||
			let img = [];
 | 
			
		||||
			list.forEach(item => {
 | 
			
		||||
				let temp = {
 | 
			
		||||
					image: item
 | 
			
		||||
					image: item[1]
 | 
			
		||||
				}
 | 
			
		||||
				img.push(temp);
 | 
			
		||||
			})
 | 
			
		||||
@ -311,7 +311,7 @@ export default {
 | 
			
		||||
				if (res.errCode == 0) {
 | 
			
		||||
					this.evaluate = res.data.goods_evaluate_info;
 | 
			
		||||
					this.goodsInfo = res.data.goods;
 | 
			
		||||
					this.setSwiperList(res.data.goods_image[0]);
 | 
			
		||||
					this.setSwiperList(res.data.goods_image);
 | 
			
		||||
					this.glist = res.data.spec_list;
 | 
			
		||||
					// console.log(this.goodsInfo.mobile_body);
 | 
			
		||||
				}
 | 
			
		||||
@ -325,7 +325,7 @@ export default {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					this.evaluate = res.data.data.goods_evaluate_info;
 | 
			
		||||
					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.user_suc = res.data.data.user_suc;
 | 
			
		||||
					this.groupUser =res.data.data.user;
 | 
			
		||||
@ -341,7 +341,7 @@ export default {
 | 
			
		||||
					this.groupbuyInfo = res.data.groupbuyInfo;
 | 
			
		||||
					this.evaluate = res.data.goodsInfo.goods_evaluate_info;
 | 
			
		||||
					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);
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,7 @@
 | 
			
		||||
			<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<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>
 | 
			
		||||
				<view class="right">
 | 
			
		||||
					<view class="name u-line-1">{{ goods.goods_name }}</view>
 | 
			
		||||
@ -112,6 +112,12 @@ export default {
 | 
			
		||||
			uni.setNavigationBarTitle({
 | 
			
		||||
				title: title
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		toDetailsPage(id) {
 | 
			
		||||
			this.$u.route('/pageB/sdetails/index', {
 | 
			
		||||
				id: id,
 | 
			
		||||
				type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -49,6 +49,12 @@
 | 
			
		||||
		onReady() {
 | 
			
		||||
			this.getMenuItemTop()
 | 
			
		||||
		},
 | 
			
		||||
		onNavigationBarButtonTap(e) {
 | 
			
		||||
			if(e.index == 0) this.$u.route('/pageB/search/index');
 | 
			
		||||
		},
 | 
			
		||||
		onNavigationBarSearchInputClicked() {
 | 
			
		||||
			this.$u.route('/pageB/search/index');
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
			toSearchPage() {
 | 
			
		||||
				this.$u.route({
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
		<view class="status" v-if="orderstate">
 | 
			
		||||
			<view class="text">
 | 
			
		||||
				<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>
 | 
			
		||||
			<image :src="s_object[orderstate].image"></image>
 | 
			
		||||
		</view>
 | 
			
		||||
@ -175,7 +175,7 @@ export default {
 | 
			
		||||
				// console.log(spikeTime);
 | 
			
		||||
				if(spikeTime <= 0) {
 | 
			
		||||
					this.isSpike = true;
 | 
			
		||||
					this.spikeTime = '00:00:00'
 | 
			
		||||
					this.countdown = '00:00:00'
 | 
			
		||||
					clearInterval(this.timer);
 | 
			
		||||
					return false;
 | 
			
		||||
				};
 | 
			
		||||
@ -204,9 +204,10 @@ export default {
 | 
			
		||||
			}).then(res => {
 | 
			
		||||
				if(res.errCode == 0) {
 | 
			
		||||
					this.orderInfo = res.data;
 | 
			
		||||
					this.setSpikeTime(res.data.end_time);
 | 
			
		||||
					this.viewState(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(); // 结束刷新
 | 
			
		||||
			})
 | 
			
		||||
 | 
			
		||||
@ -570,7 +570,7 @@
 | 
			
		||||
								"buttons": [
 | 
			
		||||
									{  
 | 
			
		||||
										"type":"none",
 | 
			
		||||
										"text":"写意见",
 | 
			
		||||
										"text":"投诉",
 | 
			
		||||
										"float":"right",
 | 
			
		||||
										"fontSize":"14"
 | 
			
		||||
									}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user