|
|
|
@ -7,8 +7,9 @@ |
|
|
|
<uni-swiper-dot class="uni-swiper-dot-box" field="content"> |
|
|
|
<swiper class="swiper" indicator-dots indicator-color="rgba(255, 255, 255, 0.50)" |
|
|
|
indicator-active-color="#ffffff" autoplay interval="5000"> |
|
|
|
<swiper-item v-for="(item,i) in bannerList" :key="i"> |
|
|
|
<image :src="item&&item.dictValue" style="width: 100%;" mode="widthFix" /> |
|
|
|
<swiper-item v-for="(item,i) in bannerList" :key="i" @click="towebview(item)"> |
|
|
|
<image :src="item&&item.image" style="width: 100%;" mode="widthFix" /> |
|
|
|
<!-- <image :src="item&&item.dictValue" style="width: 100%;" mode="widthFix" /> --> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
</uni-swiper-dot> |
|
|
|
@ -312,6 +313,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { bindCode } from '@/api/order/order.js' |
|
|
|
import { listAppletBanner } from '@/api/order/AppletOrderBanner.js' |
|
|
|
import { |
|
|
|
getStaffList, |
|
|
|
getProductList, |
|
|
|
@ -414,6 +416,20 @@ import { bindCode } from '@/api/order/order.js' |
|
|
|
|
|
|
|
// }, |
|
|
|
methods: { |
|
|
|
towebview(item){ |
|
|
|
if(!item.url){ |
|
|
|
return |
|
|
|
} |
|
|
|
if(item.url.indexOf('https://') === 0 || item.url.indexOf('http://') === 0){ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages_order/webview/webview?url=' + encodeURIComponent(item.url) |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
uni.navigateTo({ |
|
|
|
url: item.url |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeNewUserPopup() { |
|
|
|
this.isNewUser = false; |
|
|
|
}, |
|
|
|
@ -755,13 +771,23 @@ import { bindCode } from '@/api/order/order.js' |
|
|
|
}, |
|
|
|
redirectuser() {}, |
|
|
|
getBanner() { |
|
|
|
getBannerList().then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.bannerList = res.data |
|
|
|
} else { |
|
|
|
this.$modal.showToast('获取Banner失败') |
|
|
|
} |
|
|
|
}) |
|
|
|
// getBannerList().then(res => { |
|
|
|
// if (res.code == 200) { |
|
|
|
// this.bannerList = res.data |
|
|
|
// } else { |
|
|
|
// this.$modal.showToast('获取Banner失败') |
|
|
|
// } |
|
|
|
// }) |
|
|
|
listAppletBanner({ |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 9999999, |
|
|
|
}).then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.bannerList = res.data.records |
|
|
|
} else { |
|
|
|
this.$modal.showToast('获取Banner失败') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeSwiper(e) { |
|
|
|
this.current = e.detail.current |
|
|
|
|