From e8d258576a34f35cfefbd6bfe07b7f22e72d87d4 Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期三, 11 九月 2024 10:42:57 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/v2' into v2 --- pages/home/home.vue | 71 ++++++++++++++++++++++------------- 1 files changed, 45 insertions(+), 26 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index 396d4e7..ec93edd 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -31,29 +31,29 @@ </view> <!-- banner --> - <uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="info" :current="currentBanner" - :mode="'dot'" :dots-styles="dotsStyles[0]" field="content"> - <swiper class="swiper-box" @change="changeBanner" :interval="10000" :circular="true" :current="0" - v-if="banners&&banners.length>0" :autoplay="true"> - <swiper-item v-for="(item, index) in banners" :key="index"> - <view class="swiper-item" :class="'swiper-item' + index"> - <!-- @click="previewImg(item.url||item.image)" --> - <image class="home-banner-image" mode="scaleToFill" @click="clickBanner(item)" - :src="item.url||item.image"> - </image> - </view> - </swiper-item> - </swiper> - <swiper class="swiper-box" @change="changeBanner" :current="0" v-if="!banners||banners.length==0"> - <swiper-item v-for="(item, index) in 1" :key="index"> - <view class="swiper-item" :class="'swiper-item' + index"> - <image class="home-banner-image" mode="scaleToFill" - src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/62/62ddac6297104e369aba646be704064dbanner@2x.png"> - </image> - </view> - </swiper-item> - </swiper> - </uni-swiper-dot> + <!-- <uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="info" :current="currentBanner" + :mode="'dot'" :dots-styles="dotsStyles[0]" field="content"> --> + <swiper class="swiper-box" @change="changeBanner" :interval="10000" :circular="true" :current="0" + v-if="banners&&banners.length>0" :autoplay="true"> + <swiper-item v-for="(item, index) in banners" :key="index"> + <view class="swiper-item" :class="'swiper-item' + index"> + <!-- @click="previewImg(item.url||item.image)" --> + <image class="home-banner-image" mode="scaleToFill" @click="clickBanner(item)" + :src="item.url||item.image"> + </image> + </view> + </swiper-item> + </swiper> + <swiper class="swiper-box" @change="changeBanner" :current="0" v-if="!banners||banners.length==0"> + <swiper-item v-for="(item, index) in 1" :key="index"> + <view class="swiper-item" :class="'swiper-item' + index"> + <image class="home-banner-image" mode="scaleToFill" + src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/62/62ddac6297104e369aba646be704064dbanner@2x.png"> + </image> + </view> + </swiper-item> + </swiper> + <!-- </uni-swiper-dot> --> <!-- tip --> <view class="m-t-12" @click="getNoticeMore"> <uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more show-icon @@ -69,11 +69,13 @@ <!-- 几个专区 --> <home-zones></home-zones> <!-- 置顶的花列表 --> - <home-top-flow></home-top-flow> + <home-top-flow ref="home_top_flow"></home-top-flow> <view style="min-height:140rpx"> </view> <common-footer flg="0"></common-footer> + + <uni-popup ref="coupon_home" type="bottom" border-radius="10px 10px 0 0">底部弹出 Popup 自定义圆角</uni-popup> </view> </template> @@ -188,7 +190,13 @@ path: url, } }, - + onReachBottom() { + console.log('onReachBottom') + if (this.$refs && this.$refs.home_top_flow) { + // console.log(this.$refs.home_top_flow) + this.$refs.home_top_flow.fun_GetMore() + } + }, onLoad(options) { // if(options.partnerUserId){ // //需要前往注册了 @@ -329,7 +337,18 @@ } }) - + // let tmp = this + // //首页优惠券 + // this.$http.request('get', '/api/v2/coupon/app' + `/home/list`).then(res => { + // if (res.code == 0) { + // var list = res.data || [] + // var dto = list.length >= 1 ? list[0] : undefined + // if (dto) { + // // 显示弹窗图片 + // tmp.$refs.coupon_home.open() + // } + // } + // }) }, methods: { clickBanner(item) { -- Gitblit v1.9.3