Feat(页面):页面埋点配置
This commit is contained in:
@@ -584,6 +584,7 @@ export default {
|
|||||||
this.pageKeyId = `product_from_countyFamous_productId_${id}`
|
this.pageKeyId = `product_from_countyFamous_productId_${id}`
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
this.pageKeyId = `product_from_common_productId_${id}`
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -512,6 +512,7 @@ export default {
|
|||||||
this.pageKeyId = `product_from_countyFamous_productId_${id}`
|
this.pageKeyId = `product_from_countyFamous_productId_${id}`
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
this.pageKeyId = `hotel_from_common_hotelId_${id}`
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if (id) {
|
if (id) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<view class="story-box flex flex-col ai-center">
|
<view class="story-box flex flex-col ai-center">
|
||||||
<image class="story-title" :src="webUrl+'/20230313105024432472.png'" mode="scaleToFill"/>
|
<image class="story-title" :src="webUrl+'/20230313105024432472.png'" mode="scaleToFill"/>
|
||||||
<view class="story-content">
|
<view class="story-content">
|
||||||
<view v-html="story.content"></view>
|
<view v-html="story.content" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -25,7 +25,11 @@
|
|||||||
<view class="name more-t">{{ item.storeName }}</view>
|
<view class="name more-t">{{ item.storeName }}</view>
|
||||||
<!-- <view class="unit">100g/盒</view>-->
|
<!-- <view class="unit">100g/盒</view>-->
|
||||||
<view class="flex ai-center" style="margin-top: 12rpx" v-if="item.tags.length">
|
<view class="flex ai-center" style="margin-top: 12rpx" v-if="item.tags.length">
|
||||||
<view class="label flex jc-center ai-center" v-for="tag in item.tags">{{ tag }}</view>
|
<view
|
||||||
|
v-for="(tag, tagIndex) in item.tags"
|
||||||
|
:key="tagIndex"
|
||||||
|
class="label flex jc-center ai-center"
|
||||||
|
>{{ tag }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex jc-between ai-center">
|
<view class="flex jc-between ai-center">
|
||||||
|
|||||||
@@ -1,15 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="famous-story">
|
<view class="famous-story">
|
||||||
<image class="img" :src="item.image" mode="scaleToFill" v-for="item in list" @click="goHot(item)"/>
|
<image
|
||||||
|
v-for="(item, index) in list"
|
||||||
|
:key="index"
|
||||||
|
:src="item.image"
|
||||||
|
class="img"
|
||||||
|
mode="scaleToFill"
|
||||||
|
@click="goHot(item)"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getStoryList} from "@/api/product";
|
import {getStoryList} from '@/api/product'
|
||||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "famousStory",
|
name: 'FamousStory',
|
||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -2,63 +2,143 @@
|
|||||||
<view class="pkg-product-list">
|
<view class="pkg-product-list">
|
||||||
<view class="first-half">
|
<view class="first-half">
|
||||||
<view class="search-box flex jc-between ai-center">
|
<view class="search-box flex jc-between ai-center">
|
||||||
<input type="text" v-model="keyword" placeholder="搜索内容" placeholder-style="color:#949494" @confirm="search">
|
<input
|
||||||
<image class="icon" :src="webUrl+'/20220903142935869059.png'" mode="scaleToFill" @click="search"></image>
|
v-model="keyword"
|
||||||
|
type="text"
|
||||||
|
placeholder="搜索内容"
|
||||||
|
placeholder-style="color:#949494"
|
||||||
|
@confirm="search"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="webUrl+'/20220903142935869059.png'"
|
||||||
|
class="icon"
|
||||||
|
mode="scaleToFill"
|
||||||
|
@click="search"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<swiper
|
||||||
<swiper class="swiper-box" indicator-dots indicator-color="rgba(255,255,255,.3)" indicator-active-color="#fff"
|
v-if="bannerList.length > 0"
|
||||||
autoplay circular v-if="bannerList.length>0">
|
indicator-dots
|
||||||
<swiper-item v-for="(item,index) in bannerList" :key="index">
|
indicator-color="rgba(255,255,255,.3)"
|
||||||
<image :src="item.pic" mode="scaleToFill" @click="$global.commonJump(item.uniappUrl)"/>
|
indicator-active-color="#fff"
|
||||||
|
autoplay
|
||||||
|
circular
|
||||||
|
class="swiper-box"
|
||||||
|
>
|
||||||
|
<swiper-item
|
||||||
|
v-for="(item, index) in bannerList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="item.pic"
|
||||||
|
mode="scaleToFill"
|
||||||
|
@click="$global.commonJump(item.uniappUrl)"
|
||||||
|
/>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
<view
|
||||||
<view class="tab-box flex jc-center ai-center" v-show="tabIndex===0">
|
v-show="tabIndex === 0"
|
||||||
<image class="active" src="/static/images/v6/btn_active_left.png" @click="changeTab(0)"/>
|
class="tab-box flex jc-center ai-center"
|
||||||
<image class="inactive" src="/static/images/v6/btn_right.png" @click="changeTab(1)"/>
|
>
|
||||||
|
<image
|
||||||
|
src="/static/images/v6/btn_active_left.png"
|
||||||
|
class="active"
|
||||||
|
@click="changeTab(0)"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
src="/static/images/v6/btn_right.png"
|
||||||
|
class="inactive"
|
||||||
|
@click="changeTab(1)"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="tab-box flex jc-center ai-center" v-show="tabIndex===1">
|
<view
|
||||||
<image class="inactive" src="/static/images/v6/btn_left.png" @click="changeTab(0)"/>
|
v-show="tabIndex === 1"
|
||||||
<image class="active" src="/static/images/v6/btn_active_right.png" @click="changeTab(1)"/>
|
class="tab-box flex jc-center ai-center"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
src="/static/images/v6/btn_left.png"
|
||||||
|
class="inactive"
|
||||||
|
@click="changeTab(0)"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
src="/static/images/v6/btn_active_right.png"
|
||||||
|
class="active"
|
||||||
|
@click="changeTab(1)"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="body-box">
|
<view class="body-box">
|
||||||
<view class="aside-box flex-0">
|
<view class="aside-box flex-0">
|
||||||
<view class="item flex jc-center ai-center" :class="index === asideIndex ? 'active' : ''"
|
<view
|
||||||
v-for="(item, index) in asideList" :key="index" @click="asideTap(index)">
|
v-for="(item, index) in asideList"
|
||||||
|
:key="index"
|
||||||
|
:class="index === asideIndex ? 'active' : ''"
|
||||||
|
class="item flex jc-center ai-center"
|
||||||
|
@click="asideTap(index)"
|
||||||
|
>
|
||||||
<text class="one-t">{{ item.label }}</text>
|
<text class="one-t">{{ item.label }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="article-box">
|
<view class="article-box">
|
||||||
<scroll-view class="list flex flex-wrap" :style="{'height':listHeight}" :enable-flex="true"
|
<scroll-view
|
||||||
:scroll-anchoring="true"
|
v-if="dataList.length > 0"
|
||||||
:scroll-y="true"
|
:style="{'height':listHeight}"
|
||||||
:scroll-with-animation="true" :enable-back-to-top="true" @scrolltolower="onLower"
|
:enable-flex="true"
|
||||||
v-if="dataList.length>0">
|
:scroll-anchoring="true"
|
||||||
<view v-for="(item, index) in dataList" :key="index">
|
:scroll-y="true"
|
||||||
<view class="item item-store" @click="goStore(item.id)" v-if="tabIndex===0">
|
:scroll-with-animation="true"
|
||||||
<image class="cover" :src="item.cover" mode="scaleToFill"/>
|
:enable-back-to-top="true"
|
||||||
|
class="list flex flex-wrap"
|
||||||
|
@scrolltolower="onLower"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in dataList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-if="tabIndex === 0"
|
||||||
|
class="item item-store"
|
||||||
|
@click="goStore(item.id)"
|
||||||
|
>
|
||||||
|
<image
|
||||||
|
:src="item.cover"
|
||||||
|
class="cover"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
<view class="name one-t">{{ item.content }}</view>
|
<view class="name one-t">{{ item.content }}</view>
|
||||||
<view class="price store flex ai-center" style="width: 100%;">
|
<view class="price store flex ai-center" style="width: 100%;">
|
||||||
<image class="flex-0" :src="item.logo" mode="scaleToFill"/>
|
<image
|
||||||
|
:src="item.logo"
|
||||||
|
class="flex-0"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
<view class="one-t">{{ item.name }}</view>
|
<view class="one-t">{{ item.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item" @click="goGoods(item.id)" v-else>
|
<view class="item" @click="goGoods(item.id)" v-else>
|
||||||
<image class="cover" :src="item.image" mode="scaleToFill"/>
|
<image
|
||||||
|
:src="item.image"
|
||||||
|
class="cover"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
<view class="name more-t">{{ item.storeName }}</view>
|
<view class="name more-t">{{ item.storeName }}</view>
|
||||||
<view class="price">¥{{ item.price }}</view>
|
<view class="price">¥{{ item.price }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
<view class="tc" v-else>
|
<view class="tc" v-else>
|
||||||
<image class="img-nodata" :src="webUrl+'/20240106205121705480.png'" mode="scaleToFill"
|
<image
|
||||||
v-if="tabIndex===0"/>
|
v-if="tabIndex === 0"
|
||||||
<image class="img-nodata" :src="webUrl+'/20240219170514226953.png'" mode="scaleToFill" v-else/>
|
:src="webUrl+'/20240106205121705480.png'"
|
||||||
|
class="img-nodata"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
v-else
|
||||||
|
:src="webUrl+'/20240219170514226953.png'"
|
||||||
|
class="img-nodata"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -66,103 +146,105 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {fetchCity} from "@/api/wenwan";
|
// 康养食材
|
||||||
import {wellnessFood, wellnessPlaceList} from "@/api/product";
|
import { fetchCity } from '@/api/wenwan'
|
||||||
import {getProducts} from "@/api/store";
|
import { wellnessFood, wellnessPlaceList } from '@/api/product'
|
||||||
|
import { getProducts } from '@/api/store'
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
name: "healthList",
|
name: 'HealthList',
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
keyword: "",
|
keyword: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
listHeight: "auto",
|
listHeight: 'auto',
|
||||||
|
|
||||||
bannerList: [],
|
bannerList: [],
|
||||||
asideList: [],
|
asideList: [],
|
||||||
asideIndex: 0,
|
asideIndex: 0,
|
||||||
dataList: [], // 列表数据
|
dataList: [],
|
||||||
|
pageKeyId: Object.freeze('wellnessFoodIndex')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.init();
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
wellnessFood().then(({data}) => {
|
wellnessFood().then(({data}) => {
|
||||||
this.bannerList = data.banner
|
this.bannerList = data.banner
|
||||||
});
|
})
|
||||||
fetchCity(4).then(({data}) => {
|
fetchCity(4).then(({data}) => {
|
||||||
this.asideList = data.group;
|
this.asideList = data.group
|
||||||
this.search();
|
this.search()
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
changeTab(index) {
|
changeTab(index) {
|
||||||
if (this.asideList.length === 0) return;
|
if (this.asideList.length === 0) return
|
||||||
if (index === this.tabIndex) return;
|
if (index === this.tabIndex) return
|
||||||
this.page = 1;
|
this.page = 1
|
||||||
this.dataList = [];
|
this.dataList = []
|
||||||
this.tabIndex = index;
|
this.tabIndex = index
|
||||||
this.search();
|
this.search()
|
||||||
},
|
},
|
||||||
onLower() {
|
onLower() {
|
||||||
this.page++;
|
this.page++
|
||||||
this.search();
|
this.search()
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
let param = {
|
let param = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
keyword: this.keyword,
|
keyword: this.keyword,
|
||||||
provinceId: this.asideList.length > 0 ? this.asideList[this.asideIndex].provinceId : ""
|
provinceId: this.asideList.length > 0 ? this.asideList[this.asideIndex].provinceId : ''
|
||||||
}
|
}
|
||||||
if (this.tabIndex === 0) {
|
if (this.tabIndex === 0) {
|
||||||
wellnessPlaceList(param).then(({data}) => {
|
wellnessPlaceList(param).then(({data}) => {
|
||||||
this.handleData(data);
|
this.handleData(data)
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
param.isWellnessFood = 1;
|
param.isWellnessFood = 1
|
||||||
getProducts(param).then(({data}) => {
|
getProducts(param).then(({data}) => {
|
||||||
this.handleData(data);
|
this.handleData(data)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleData(data) {
|
handleData(data) {
|
||||||
let that = this;
|
const that = this
|
||||||
if (this.page === 1) {
|
if (this.page === 1) {
|
||||||
this.dataList = [];
|
this.dataList = []
|
||||||
}
|
}
|
||||||
this.dataList = this.dataList.concat(data);
|
this.dataList = this.dataList.concat(data)
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
let len = that.dataList.length;
|
const len = that.dataList.length
|
||||||
let {windowHeight} = res;
|
const {windowHeight} = res
|
||||||
that.listHeight = "auto";
|
that.listHeight = 'auto'
|
||||||
if (windowHeight > 600 && len > 4) {
|
if (windowHeight > 600 && len > 4) {
|
||||||
that.listHeight = "100%";
|
that.listHeight = '100%'
|
||||||
}
|
}
|
||||||
if (windowHeight <= 600 && len > 2) {
|
if (windowHeight <= 600 && len > 2) {
|
||||||
that.listHeight = "100%";
|
that.listHeight = '100%'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
asideTap(index) {
|
asideTap(index) {
|
||||||
this.asideIndex = index;
|
this.asideIndex = index
|
||||||
this.page = 1;
|
this.page = 1
|
||||||
this.dataList = [];
|
this.dataList = []
|
||||||
this.search();
|
this.search()
|
||||||
},
|
},
|
||||||
goStore(id) {
|
goStore(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesInn/inn/innHome?id=" + id
|
url: '/pagesInn/inn/innHome?id=' + id + '&from=wellness'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goGoods(id) {
|
goGoods(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/shop/GoodsCon/index?id=" + id
|
url: '/pages/shop/GoodsCon/index?id=' + id + '&from=wellness'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,9 +59,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// 特产-城市商品列表
|
||||||
import { fetchNormal, getCategory } from "@/api/store"
|
import { fetchNormal, getCategory } from "@/api/store"
|
||||||
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||||
export default {
|
export default {
|
||||||
name: 'NativeListPage',
|
name: 'NativeListPage',
|
||||||
|
mixins: [pageListenMixins],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||||
@@ -71,11 +74,14 @@ export default {
|
|||||||
cityName: '',
|
cityName: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
listHeight: 'auto',
|
listHeight: 'auto',
|
||||||
loading: false
|
loading: false,
|
||||||
|
pageKeyId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.cityId = option.cityId
|
const cityId = option.cityId
|
||||||
|
this.cityId = cityId
|
||||||
|
this.pageKeyId = `goodsProductList_cityId_${cityId}`
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user