Commit ef11b4cc by songbingqi

修改特惠标签

parent 9a2d8da5
......@@ -71,8 +71,8 @@
</view>
<view @click="cart(item, category)" class="info">
<view class="goods-name">{{ item.name }}</view>
<view class="tags" v-if="item.tags||item.recommendTag">
<view v-for="(tag,index) in getTags(item)" :key="tag" :class="index===0&&item.recommendTag?'tag-item-recommend':'tag-item'">{{
<view class="tags" v-if="item.tags||item.recommendTagList">
<view v-for="(tag,index) in getTags(item)" :key="tag" :class="item.recommendTagList&&item.recommendTagList.length!=0&&index<item.recommendTagList.length?'tag-item-recommend':'tag-item'">{{
tag
}}</view>
</view>
......@@ -221,11 +221,11 @@ export default {
},
methods: {
getTags(item) {
if(item.recommendTag) {
if(item.recommendTagList&&item.recommendTagList.length!=0) {
if(item.tags.length!=0){
return item.tags.unshift(item.recommendTag).splice(0,3)
return item.recommendTagList.concat(item.tags).splice(0,3)
}else{
return [item.recommendTag]
return item.recommendTagList
}
} else {
return item.tags
......
<template>
<view>
<web-view src="https://www.baidu.com"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -47,6 +47,14 @@
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/myWebview/myWebview",
"style": {
"navigationBarTitleText": "轮播信息",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}
]
},
......
......@@ -6,6 +6,7 @@
<u-swiper
v-if="swiperList.length!=0"
:list="swiperList"
keyName="image"
:interval="5000"
circular
:height="200"
......@@ -206,7 +207,7 @@ export default {
},
onLoad: async function (option) {
qqmapsdk = new QQMapWX({
key: 'WC5BZ-3UBE3-3OJ3S-Y3O7N-WV4S5-HCBZ4'
key: 'FR2BZ-V4EYJ-5OMFB-FOVIJ-TIP45-HRBMU'
});
// 通过扫码进入
const { q } = option;
......@@ -400,8 +401,8 @@ export default {
if(data.code===200) {
const {home = [],mine = []} = data?.data
const sendData = {
home:home?home.map(item=>{return item.image}):[],
mine:mine?mine.map(item=>{return item.image}):[],
home:home||[],
mine:mine||[],
}
this.$store.commit("setSwiperList", sendData);
}
......
......@@ -81,15 +81,7 @@
</view>
</view>
<view class="swiper">
<u-swiper
v-if="swiperList.length!=0"
:list="swiperList"
:interval="5000"
circular
:height="100"
></u-swiper>
</view>
<view
class="contents"
......@@ -156,6 +148,17 @@
</button>
</view>
</view>
<view class="swiper">
<u-swiper
v-if="swiperList.length!=0"
:list="swiperList"
@click="clickBanner"
keyName="image"
:interval="5000"
circular
:height="100"
></u-swiper>
</view>
<view v-if="userms" class="function">
<view class="title">常用功能</view>
<view class="function_item">
......@@ -240,6 +243,14 @@ export default {
}
},
methods: {
clickBanner(index) {
console.log(this.swiperList[index].page)
if(this.swiperList[index].page) {
// Plus.runtime.openURL( this.swiperList[index].page );
uni.navigateTo({ url: "/menuSubPackage/pages/myWebview/myWebview" });
// window.location.href = 'http://www.baidu.com'
}
},
getShareData(type) {
let title = "随手一杯好咖啡";
let path = `/pages/menu/menu`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment