Commit ef11b4cc by songbingqi

修改特惠标签

parent 9a2d8da5
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
</view> </view>
<view @click="cart(item, category)" class="info"> <view @click="cart(item, category)" class="info">
<view class="goods-name">{{ item.name }}</view> <view class="goods-name">{{ item.name }}</view>
<view class="tags" v-if="item.tags||item.recommendTag"> <view class="tags" v-if="item.tags||item.recommendTagList">
<view v-for="(tag,index) in getTags(item)" :key="tag" :class="index===0&&item.recommendTag?'tag-item-recommend':'tag-item'">{{ <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 tag
}}</view> }}</view>
</view> </view>
...@@ -221,11 +221,11 @@ export default { ...@@ -221,11 +221,11 @@ export default {
}, },
methods: { methods: {
getTags(item) { getTags(item) {
if(item.recommendTag) { if(item.recommendTagList&&item.recommendTagList.length!=0) {
if(item.tags.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{ }else{
return [item.recommendTag] return item.recommendTagList
} }
} else { } else {
return item.tags 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 @@ ...@@ -47,6 +47,14 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "pages/myWebview/myWebview",
"style": {
"navigationBarTitleText": "轮播信息",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
} }
] ]
}, },
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<u-swiper <u-swiper
v-if="swiperList.length!=0" v-if="swiperList.length!=0"
:list="swiperList" :list="swiperList"
keyName="image"
:interval="5000" :interval="5000"
circular circular
:height="200" :height="200"
...@@ -206,7 +207,7 @@ export default { ...@@ -206,7 +207,7 @@ export default {
}, },
onLoad: async function (option) { onLoad: async function (option) {
qqmapsdk = new QQMapWX({ qqmapsdk = new QQMapWX({
key: 'WC5BZ-3UBE3-3OJ3S-Y3O7N-WV4S5-HCBZ4' key: 'FR2BZ-V4EYJ-5OMFB-FOVIJ-TIP45-HRBMU'
}); });
// 通过扫码进入 // 通过扫码进入
const { q } = option; const { q } = option;
...@@ -400,8 +401,8 @@ export default { ...@@ -400,8 +401,8 @@ export default {
if(data.code===200) { if(data.code===200) {
const {home = [],mine = []} = data?.data const {home = [],mine = []} = data?.data
const sendData = { const sendData = {
home:home?home.map(item=>{return item.image}):[], home:home||[],
mine:mine?mine.map(item=>{return item.image}):[], mine:mine||[],
} }
this.$store.commit("setSwiperList", sendData); this.$store.commit("setSwiperList", sendData);
} }
......
...@@ -81,15 +81,7 @@ ...@@ -81,15 +81,7 @@
</view> </view>
</view> </view>
<view class="swiper">
<u-swiper
v-if="swiperList.length!=0"
:list="swiperList"
:interval="5000"
circular
:height="100"
></u-swiper>
</view>
<view <view
class="contents" class="contents"
...@@ -156,6 +148,17 @@ ...@@ -156,6 +148,17 @@
</button> </button>
</view> </view>
</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 v-if="userms" class="function">
<view class="title">常用功能</view> <view class="title">常用功能</view>
<view class="function_item"> <view class="function_item">
...@@ -240,6 +243,14 @@ export default { ...@@ -240,6 +243,14 @@ export default {
} }
}, },
methods: { 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) { getShareData(type) {
let title = "随手一杯好咖啡"; let title = "随手一杯好咖啡";
let path = `/pages/menu/menu`; 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