|
@@ -22,7 +22,12 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="userBanner">
|
|
|
- <u-image width="100%" height="80px" src="../../static/img/banner.jpg" border-radius="16"></u-image>
|
|
|
+<!-- <u-image width="100%" height="80px" src="../../static/img/banner.jpg" border-radius="16"></u-image>
|
|
|
+ --> <u-swiper bg-color="#fff"
|
|
|
+ :img-mode="'scaleToFill'" height="160"
|
|
|
+ :list="bannerList" @click="clickBanner" :name="'picUrl'" >
|
|
|
+ </u-swiper>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="userIcon">
|
|
|
<view class="userIcon-tit">
|
|
@@ -114,6 +119,7 @@
|
|
|
import * as loginApi from '@/apis/login.js'
|
|
|
import * as WxJsApi from '@/utils/wxJsApi.js'
|
|
|
import Tabbar from '@/components/Tabbar.vue'
|
|
|
+ import * as newsApi from '@/apis/news.js'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -132,6 +138,7 @@
|
|
|
title: '联系客服',
|
|
|
content: '400-8899-619',
|
|
|
confirmText: '拨打电话',
|
|
|
+ bannerList:[],
|
|
|
background:{
|
|
|
background: 'none'
|
|
|
},
|
|
@@ -163,8 +170,47 @@
|
|
|
if(consumerPhone){
|
|
|
this.content=consumerPhone
|
|
|
}
|
|
|
+ this.getBannerInfo("userinfo")
|
|
|
},
|
|
|
methods: {
|
|
|
+ clickBanner(index){
|
|
|
+ var mod= this.bannerList[index]
|
|
|
+
|
|
|
+ if(mod.linkUrl.indexOf('http')==0){
|
|
|
+ window.location=mod.linkUrl;
|
|
|
+ }
|
|
|
+ else if(mod.linkUrl.indexOf('#/')==0){
|
|
|
+ if(mod.linkUrl.indexOf("?")==-1){
|
|
|
+ mod.linkUrl+='?';
|
|
|
+ }
|
|
|
+ window.location=mod.linkUrl;
|
|
|
+ }
|
|
|
+ else if(mod.linkUrl=='#'||mod.linkUrl==''){
|
|
|
+
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ uni.navigateTo({
|
|
|
+ url:mod.linkUrl
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ getBannerInfo(code){
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ newsApi.getBannerInfo(code).then((res) => {
|
|
|
+ this.bannerList =res.data;
|
|
|
+
|
|
|
+ // document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+
|
|
|
+ title: error,icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
getCouponList() {
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|