1.对接新版2.0页面 首页

yj-dev
杨杰 2 years ago
parent eb7fa3ab96
commit fb445b4b4f
  1. 2
      pages/goods/coupon-details/coupon-details.vue
  2. 78
      pages/tabBar/home/home.vue
  3. 2
      pages/user/order_list/order_list.vue

@ -346,7 +346,7 @@
} }
} }
}) })
clearInterval(that.Timer); // clearInterval(that.Timer);
return; return;
} }
holdTime--; holdTime--;

@ -33,7 +33,7 @@
</view> </view>
<!-- 顶部菜单 --> <!-- 顶部菜单 -->
<view v-for="(item,index) in homeCateList" :key="index"> <view v-for="(item,index) in homeCateList" :key="index">
<view class="height90 backcorltop mart50" v-if="item.type == 1"> <view class="height90 backcorltop mart50" v-if="item.type == 1">
<view class="category-list"> <view class="category-list">
<view class="category" style="width: 25%;" v-for="(row, index) in item.childCategory" :key="index" <view class="category" style="width: 25%;" v-for="(row, index) in item.childCategory" :key="index"
@tap="toCategory(row)"> @tap="toCategory(row)">
@ -48,7 +48,7 @@
<image class="width100" mode="widthFix" :src="imagewxUrl+imgadres" v-if="item.type == 8"></image> <image class="width100" mode="widthFix" :src="imagewxUrl+imgadres" v-if="item.type == 8"></image>
<!-- 顶部菜单 --> <!-- 顶部菜单 -->
<view class="category-list backcorfff" style="margin-top: -5px;" v-if="item.type == 7"> <view class="category-list backcorfff" style="margin-top: -5px;" v-if="item.type == 7">
<view class="category" style="width: 20%;" v-for="(row, index) in item.childCategory" :key="index" <view class="category" style="width: 20%;" v-for="(row, index) in item.childCategory" :key="index"
@tap="toCategory(row)"> @tap="toCategory(row)">
<view class="img"> <view class="img">
@ -58,7 +58,7 @@
</view> </view>
</view> </view>
<!-- 消息 --> <!-- 消息 -->
<view class="height120 backcorfff" v-if="item.type == 3"> <view class="height120 backcorfff" v-if="item.type == 3">
<view class="height20 width100"></view> <view class="height20 width100"></view>
<view class="width92 message alijus"> <view class="width92 message alijus">
<swiper circular="true" autoplay="true" display-multiple-items="2" :vertical="true"> <swiper circular="true" autoplay="true" display-multiple-items="2" :vertical="true">
@ -79,40 +79,38 @@
</view> </view>
<!-- 轮播图 --> <!-- 轮播图 -->
<view class="swiper mart20" v-if="item.type == 2"> <view class="swiper mart20" v-if="item.type == 2">
<view class="swiper-box"> <view class="swiper-box">
<swiper circular="true" autoplay="true" @change="swiperChange"> <swiper circular="true" autoplay="true" @change="swiperChange">
<swiper-item v-for="swiper in swiperList" :key="swiper.id"> <swiper-item v-for="swiper in item.childCategory" :key="swiper.id">
<image :src="imageUrl+swiper.imgData" @click="jumplottery(swiper)"></image> <image :src="imageUrl+swiper.imgData" @click="jumplottery(swiper)"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
</view> </view>
<!-- 加油专区 --> <!-- 加油专区 ,天天好券-->
<view class="width90 mart20 alijusstart" v-if="item.type == 6" @click="goGoodsList(2)"> <view class="width90 mart20 alijusstart" v-if="item.type == 6 || item.type == 9" @click="goGoodsList(item.jumpUrl)">
<view class="width70 font18 fcor333"> <view class="width70 font18 fcor333">
{{item.name}} {{item.name}}
</view> </view>
<view class="width30 font14 fotrt fcor666">更多</view> <view class="width30 font14 fotrt fcor666">更多</view>
</view> </view>
<view class="width94 alijus mart20" v-if="item.type == 6"> <view class="width94 alijus mart20" v-if="item.type == 6 ">
<view class="backcorfff spcarea"> <view class="backcorfff spcarea" v-for="(goods,index) in item.childDate" :key="index">
<image mode="widthFix" class="width100" src="../../../static/img/home/home3.png"></image> <image mode="widthFix" class="width100" :src="imageUrl+goods.couponImg"></image>
<view class="width96 fcor333 font15 fontwig6">ETC加油券</view> <view class="width96 fcor333 font15 fontwig6">{{goods.couponName}}</view>
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view> <view class="width96 fcor999 font11">{{goods.salesEndTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}
<view class="width94 fcoreb5 font15 fontwig6">¥240</view> </view>
</view> <view class="width94 fcoreb5 font15 fontwig6">¥{{goods.salesPrice}}</view>
<view class="backcorfff spcarea">
<image mode="widthFix" class="width100" src="../../../static/img/home/home3.png"></image>
<view class="width96 fcor333 font15 fontwig6">ETC加油券</view>
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view>
<view class="width94 fcoreb5 font15 fontwig6">¥240</view>
</view> </view>
<view class="backcorfff spcarea"> </view>
<image mode="widthFix" class="width100" src="../../../static/img/home/home3.png"></image> <view class="width94 alijus mart20" v-if="item.type == 9 ">
<view class="width96 fcor333 font15 fontwig6">ETC加油券</view> <view class="backcorfff spcarea" v-for="(goods,index) in item.childDate" :key="index">
<view class="width96 fcor999 font11">2020.09.21-2202.10.12</view> <image mode="widthFix" class="width100" :src="imageUrl+goods.listImg"></image>
<view class="width94 fcoreb5 font15 fontwig6">¥240</view> <view class="width96 fcor333 font15 fontwig6">{{goods.title}}</view>
<view class="width96 fcor999 font11" v-if="goods.effectiveTiem">{{goods.effectiveTiem | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
<view class="width94 fcoreb5 font15 fontwig6">¥{{goods.price}}</view>
</view> </view>
</view> </view>
<!-- 惠享生活 --> <!-- 惠享生活 -->
@ -121,14 +119,15 @@
惠享生活 惠享生活
</view> </view>
</view> </view>
<image class="width90 mart10" mode="widthFix" v-if="item.type == 5" :src="imagewxUrl+imgadres1"></image> <image class="width90 mart10" mode="widthFix" v-if="item.type == 5"
:src="imageUrl+item.childCategory[0].imgData" @click="goGoodsList(imageUrl+item.childCategory[0].jumpUrl)"></image>
<view class="width90 alijusstart mart10" v-if="item.type == 5"> <view class="width90 alijusstart mart10" v-if="item.type == 5">
<image src="../../../static/img/home/home6.png" mode="widthFix" class="width31"></image> <image :src="imageUrl+item.childCategory[1].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[1].jumpUrl)"></image>
<image src="../../../static/img/home/home7.png" mode="widthFix" class="width31"></image> <image :src="imageUrl+item.childCategory[2].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[2].jumpUrl)"></image>
<image src="../../../static/img/home/home5.png" mode="widthFix" class="width31"></image> <image :src="imageUrl+item.childCategory[3].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[3].jumpUrl)"></image>
</view> </view>
<!-- 天天好券 --> <!-- 天天好券 -->
<!-- <view class="width90 mart20 alijusstart" v-if="item.type == 6"> <!-- <view class="width90 mart20 alijusstart" v-if="item.type == 6">
<view class="width70 font18 fcor333"> <view class="width70 font18 fcor333">
{{item.name}} {{item.name}}
</view> </view>
@ -506,20 +505,20 @@
uni.hideLoading(); uni.hideLoading();
that.findByLatAndLng(res.longitude, res.latitude); that.findByLatAndLng(res.longitude, res.latitude);
}, },
fail: (err) => { fail: (err) => {
uni.hideLoading(); uni.hideLoading();
if (err.errCode == 2) { if (err.errCode == 2) {
uni.showToast({ uni.showToast({
title: '请开启系统定位', title: '请开启系统定位',
duration: 3000, duration: 3000,
icon: 'none' icon: 'none'
}) })
}else{ } else {
uni.showToast({ uni.showToast({
title: '定位失败,请重新进入小程序', title: '定位失败,请重新进入小程序',
duration: 3000, duration: 3000,
icon: 'none' icon: 'none'
}) })
} }
} }
}) })
@ -839,7 +838,7 @@
// //
toCategory(item) { toCategory(item) {
uni.navigateTo({ uni.navigateTo({
url: item.ext1 url: item.jumpUrl
}) })
}, },
// //
@ -860,7 +859,8 @@
// //
goGoodsList(item) { goGoodsList(item) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/goods/goods-list/goods-list?id=' + item url: item
// '/pages/goods/goods-list/goods-list?id=' + item
}) })
}, },
// //

@ -42,7 +42,7 @@
</view> </view>
</view> </view>
<view class="width96 height25 mart10"> <view class="width96 height40p mart10">
<view class="width70 flleft fotlt "> <view class="width70 flleft fotlt ">
<view class="font16 fontwig6 text1 fcor333 alijusstart"> <view class="font16 fontwig6 text1 fcor333 alijusstart">
<image src="../../../static/img/order5.png" class="marglerig" <image src="../../../static/img/order5.png" class="marglerig"

Loading…
Cancel
Save