pull/12/head
xiaozhiyong 1 year ago
parent 8ca91bc9e6
commit 587632c97b
  1. 93
      pages/tabbar/home/home.vue

@ -181,18 +181,18 @@
}, },
data() { data() {
return { return {
swiperArray: [ swiperArray: [{
{
src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2etc.png', src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2etc.png',
link: 'https://h5.51etr.com/pro/onlineApply/?type=20220831103626200101811' link: 'https://h5.51etr.com/pro/onlineApply/?type=20220831103626200101811'
}, },
// {
//
// src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png',
// link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473'
// },
{ {
src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/WMP-IMG/banner-2dwk.png', src: 'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/bannerindexs.png',
link: 'https://tengxun.hkzj168.com/?ChannelId=20220831152210221048473' JumpPage: 'Financial'
},
{
src:'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/bannerindexs.png',
JumpPage:'Financial'
}, },
// { // {
// src:'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/banner_baichuan.png', // src:'https://xoil-public.oss-cn-beijing.aliyuncs.com/baichuan_MP/banner_baichuan.png',
@ -322,9 +322,9 @@
] ]
}; };
}, },
watch:{ watch: {
showAuthFrror(n,o){ showAuthFrror(n, o) {
console.log(n,o,'=================') console.log(n, o, '=================')
} }
}, },
created() {}, created() {},
@ -383,16 +383,16 @@
} }
// console.log(' ++') // console.log(' ++')
this.reverseGeocoder(this.location); this.reverseGeocoder(this.location);
setTimeout(()=>{ setTimeout(() => {
let startParamsData = uni.getStorageSync('isJump')||null; let startParamsData = uni.getStorageSync('isJump') || null;
if(startParamsData){ if (startParamsData) {
this.shadoumeiyou(6) this.shadoumeiyou(6)
if(startParamsData?.disposable){ if (startParamsData?.disposable) {
uni.removeStorageSync('isJump'); uni.removeStorageSync('isJump');
} }
} }
},500) }, 500)
}, },
onPullDownRefresh() { onPullDownRefresh() {
@ -427,36 +427,35 @@
// url:'/BagStation/pages/makeOrder/payResult?status=success' // url:'/BagStation/pages/makeOrder/payResult?status=success'
this.getSiteList(); this.getSiteList();
}, },
mounted() { mounted() {},
},
beforeCreate() {}, beforeCreate() {},
onReady() { onReady() {
// this.getSiteList() // this.getSiteList()
}, },
methods: { methods: {
swiperClick(item,index) { swiperClick(item, index) {
if(item?.JumpPage){ if (item?.JumpPage) {
switch(item.JumpPage){ switch (item.JumpPage) {
case "Financial": case "Financial":
this.shadoumeiyou(6) this.shadoumeiyou(6)
break; break;
case "Activity": case "Activity":
uni.navigateTo({ uni.navigateTo({
url:'/Activity/pages/index/index' url: '/Activity/pages/index/index'
}) })
console.log('Activity') console.log('Activity')
break; break;
} }
}else if(item?.link){ } else if (item?.link) {
switch (Number(index)) { switch (Number(index)) {
default: default:
console.log('item.link') console.log('item.link')
uni.navigateTo({ uni.navigateTo({
url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link)) url: '/pages/tabbar/home/link?url=' + encodeURIComponent(JSON.stringify(item.link))
}) })
} }
} }
}, },
gotoMap() { gotoMap() {
uni.navigateTo({ uni.navigateTo({
@ -564,7 +563,7 @@
true true
} }
} }
}) })
}, },
goCall() { goCall() {
uni.makePhoneCall({ uni.makePhoneCall({
@ -657,29 +656,31 @@
// url:'../../../BagStation/pages/newRoutePlanning/newRoutePlanning' // url:'../../../BagStation/pages/newRoutePlanning/newRoutePlanning'
url: '../../../BagStation/pages/overviewMap/overviewMap', url: '../../../BagStation/pages/overviewMap/overviewMap',
}) })
} else if(index == 6){ } else if (index == 6) {
const user = uni.getStorageSync('user'); const user = uni.getStorageSync('user');
if(user){ if (user) {
Financial.findHomePageReport({customerId:user.id}).then(res=>{ Financial.findHomePageReport({
if(res.data){ customerId: user.id
}).then(res => {
if (res.data) {
uni.navigateTo({ uni.navigateTo({
url:`../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}` url: `../../../Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:'../../../Financial/pages/index?guide=1' url: '../../../Financial/pages/index?guide=1'
}) })
} }
}); });
}else{ } else {
uni.showToast({ uni.showToast({
title: '请先登录!', title: '请先登录!',
icon: 'none' icon: 'none'
}) })
} }
} else if (index == 7) { } else if (index == 7) {
this.swiperClick(this.swiperArray[0],1) this.swiperClick(this.swiperArray[0], 1)
} else { } else {
uni.showToast({ uni.showToast({
title: '功能暂无', title: '功能暂无',

Loading…
Cancel
Save