Task:指引页
This commit is contained in:
@@ -1,14 +1,27 @@
|
||||
<template>
|
||||
<view v-if="show" class="guide-remark white">
|
||||
<view class="box" :style="[functionGuideData.position]">
|
||||
<!-- <view class="tips flex" :style="{top: functionGuideData.tipsPosition || '-110rpx'}">
|
||||
{{ functionGuideData.tips }}
|
||||
</view> -->
|
||||
<view class="btn-group flex_center" :style="{bottom: functionGuideData.btnGroupPosition || '-150rpx'}">
|
||||
<view class="guid-wrap">
|
||||
<image
|
||||
v-for="(img, index) in functionGuideData.imgs"
|
||||
:key="index"
|
||||
:style="[img.style]"
|
||||
:src="img.url"
|
||||
@click.stop="handleImg(img)"
|
||||
mode="aspectFit|aspectFill|widthFix"
|
||||
lazy-load="true" >
|
||||
</image>
|
||||
<view class="box" :style="[functionGuideData.position]">
|
||||
<!-- <view class="tips flex" :style="{top: functionGuideData.tipsPosition || '-110rpx'}">
|
||||
{{ functionGuideData.tips }}
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
<!-- <view class="btn-wrap flex_center" :style="[functionGuideData.btnGroupPosition]">
|
||||
<view class="btn flex_center" @click="jump">跳过</view>
|
||||
<view class="next-btn v12-primary flex_center" @click="next">{{ functionGuideData.step==maxStep ? '知道了' : '下一步' }}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -25,7 +38,7 @@
|
||||
type: Object,
|
||||
default: ()=> {
|
||||
return {
|
||||
step: 0,
|
||||
step: 2,
|
||||
tips: '', // 介绍
|
||||
tipsPosition: '', // 介绍 显示位置
|
||||
btnGroupPosition: '', // 按钮组显示位置
|
||||
@@ -50,6 +63,17 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleImg(img) {
|
||||
if(!img.isBtn) return
|
||||
if(img.isBtn === 'next') {
|
||||
this.next()
|
||||
return
|
||||
}
|
||||
if(img.isBtn === 'jump') {
|
||||
this.jump()
|
||||
return
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.show) return
|
||||
setTimeout(() => {
|
||||
@@ -97,6 +121,15 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.btn-wrap{
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
}
|
||||
.guid-wrap{
|
||||
position: relative;
|
||||
height: inherit;
|
||||
width: inherit;
|
||||
}
|
||||
.next-btn {
|
||||
color: #fff;
|
||||
padding: 2rpx 10rpx;
|
||||
@@ -162,9 +195,9 @@
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 32rpx;
|
||||
z-index: 2;
|
||||
z-index: 2;
|
||||
transition: bottom 0.3s ease;
|
||||
|
||||
|
||||
.btn {
|
||||
width: 240rpx;
|
||||
height: 84rpx;
|
||||
|
||||
@@ -2,9 +2,25 @@
|
||||
<view class="xdd-product-item" @click="viewHandle(item)">
|
||||
<view class="focus-img">
|
||||
<image
|
||||
v-if="!item.isFarmerShop"
|
||||
:src="item[imageKey]"
|
||||
class="img"
|
||||
/>
|
||||
<image
|
||||
:src="item.farmerShopCover"
|
||||
v-if="item.farmerShopCoverType === 1 && item.isFarmerShop"
|
||||
class="img"
|
||||
mode="heightFix|widthFix">
|
||||
</image>
|
||||
<video
|
||||
:src="item.farmerShopCover"
|
||||
v-if="item.farmerShopCoverType !== 1 && item.isFarmerShop"
|
||||
:show-center-play-btn="false"
|
||||
:show-fullscreen-btn="false"
|
||||
:show-play-btn="false"
|
||||
class="img"
|
||||
:poster="item.farmerShopCover + '?vframe/jpg/offset/1'">
|
||||
</video>
|
||||
<image
|
||||
v-if="item.isOldBrand"
|
||||
:src="webUrl + '/home/old-mark.png'"
|
||||
@@ -20,8 +36,14 @@
|
||||
:src="webUrl + '/home/qixian-mark.png'"
|
||||
class="mark-img"
|
||||
/>
|
||||
<image
|
||||
v-if="item.isFarmerShop"
|
||||
:src="webUrl + '/orderIcon/nm.png'"
|
||||
class="mark-img-nm"
|
||||
/>
|
||||
</view>
|
||||
<view class="info-wrap">
|
||||
<view v-if="item.isFarmerShop" class="more-t v12-pt-2 v12-font-bold v12-font-28 v12-px-2" >{{ item.farmerShopContent }}</view>
|
||||
<view class="info-wrap" v-if="!item.isFarmerShop">
|
||||
<view class="name more-t">
|
||||
{{ item[nameKey] }}
|
||||
</view>
|
||||
@@ -44,6 +66,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="item.isFarmerShop"
|
||||
class="v12-justify-start v12-align-center v12-pt-2 v12-px-2 v12-pb-2">
|
||||
<view class="btn v12-mr-2">
|
||||
<image :src="item.farmerShopLogo" class="nm-img-logo v12-radius-100"></image>
|
||||
</view>
|
||||
<view class="one-t v12-font-24 v12-dark1-text" style="width:230rpx">{{ item.farmerShopName }}/{{ item.farmerShopCityName || '-' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -89,6 +119,21 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.nm-img-logo {
|
||||
display: block;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.mark-img-nm{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0 25rpx 0 0;
|
||||
}
|
||||
.xdd-product-item {
|
||||
border-radius: 20rpx;
|
||||
background-color: #fff;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
v-for="(item, index) in tabbarItem"
|
||||
:key="index"
|
||||
:class="currIndex === item.index ? 'curr' : ''"
|
||||
:id="'icon' + index"
|
||||
class="item"
|
||||
@click="gotoPage(item.url, item.type, item.index)"
|
||||
>
|
||||
@@ -97,6 +98,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getElementData('#quweiIcon')
|
||||
this.getIconData('#icon1')
|
||||
},
|
||||
methods: {
|
||||
getElementData(el) {
|
||||
@@ -107,6 +109,14 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getIconData(el) {
|
||||
const query = uni.createSelectorQuery().in(this)
|
||||
query.select(el).boundingClientRect().exec((res)=> {
|
||||
if(res[0]) {
|
||||
this.$emit('getIcon', res[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转至目标页面
|
||||
* type: 1-tabbar页面,2-非tabbar页面
|
||||
|
||||
Reference in New Issue
Block a user