|
@@ -714,6 +714,49 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<uMessage ref="uMessage" :stationId="chargingGun.stationId" :deviceNo="chargingGun.deviceNo" :channelNo="chargingGun.channelNo" ></uMessage>
|
|
|
+ <view class="slogan-5 " v-show="bannerListTop.length"
|
|
|
+ @click="showTop=true,getBannerInfoTopBl=true">
|
|
|
+
|
|
|
+ <u-icon :class="{
|
|
|
+ imageshake :true
|
|
|
+ }" size="45" name="gift"></u-icon>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <u-modal v-model="showTop" v-if="getBannerInfoTopBl" class="showOss showOssK" :show-title="false"
|
|
|
+ :show-confirm-button="false">
|
|
|
+ <view class="slot-content">
|
|
|
+ <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="2500"
|
|
|
+ :duration="500">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <swiper-item class="swiperitem" v-for="(item,i) in bannerListTop" :key="i">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <u-image width="500" height="500" bgColor="#ff000000"
|
|
|
+ style="margin: auto;min-height: 250px;" mode="widthFix" @click="clickBannerTopI(i)"
|
|
|
+ :src="item.picUrl">
|
|
|
+ <view slot="loading" style="height: 200px;">
|
|
|
+ <u-loading mode="flower" size="186">
|
|
|
+
|
|
|
+ </u-loading>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </u-image>
|
|
|
+
|
|
|
+ </swiper-item>
|
|
|
+ </swiper>
|
|
|
+
|
|
|
+
|
|
|
+ <u-image width="36px" style="margin: auto; margin-top: 10px;" mode="widthFix" @click="showTop=false"
|
|
|
+ src="@/assets/img/if-close-line-circled.png"></u-image>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
@@ -735,10 +778,13 @@
|
|
|
|
|
|
import lottery from '@/components/lottery/index.vue';
|
|
|
|
|
|
+
|
|
|
import {
|
|
|
newDate,
|
|
|
secondsDistance,
|
|
|
hourDistanceArr,
|
|
|
+ currentTimeStamp,
|
|
|
+ parseUnixTime,
|
|
|
daysDistance,minuteConversion
|
|
|
} from '@/utils'
|
|
|
export default {
|
|
@@ -756,6 +802,7 @@
|
|
|
bannerListJNT: [],
|
|
|
bannerListJNTend: [],
|
|
|
bannerListYXJ: [],
|
|
|
+ bannerListTop:[],
|
|
|
tabList: [
|
|
|
{
|
|
|
name: '软件使用',
|
|
@@ -861,8 +908,14 @@
|
|
|
img: '', // 展示图片
|
|
|
color: "#fff" ,// 轮盘区域底色
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
],
|
|
|
+
|
|
|
+ getBannerInfoTopBl:true,
|
|
|
+ showTop:false,
|
|
|
+ showTopImg:"",
|
|
|
+ showTopIndex: 0,
|
|
|
}
|
|
|
},
|
|
|
onLoad(op) {
|
|
@@ -890,7 +943,9 @@
|
|
|
if (consumerPhone) {
|
|
|
this.consumerPhone = consumerPhone
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
this.getBannerInfo("JNT-charging", "bannerListJNT");
|
|
|
this.getBannerInfo("JNT-charging-end", "bannerListJNTend");
|
|
|
this.getBannerInfo("YXJ-charging-end", "bannerListYXJ");
|
|
@@ -949,11 +1004,62 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getBannerInfoTop(code) {
|
|
|
+ if(!this.carhelp.getOpenId()){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
|
|
|
+
|
|
|
+ var time = this.carhelp.get("bannerListTop");
|
|
|
+ if ((time && nowtime == time)) {
|
|
|
+ this.getBannerInfoTopBl = false;
|
|
|
+ }
|
|
|
+ //特殊活动不考虑
|
|
|
+ //this.getBannerInfoTopBl = true;
|
|
|
+ // uni.showLoading({
|
|
|
+ // title: "加载中",
|
|
|
+ // mask: true,
|
|
|
+ // })
|
|
|
+
|
|
|
+ newsApi.getBannerInfo(code).then((res) => {
|
|
|
+
|
|
|
+
|
|
|
+ this.bannerListTop = res.data;
|
|
|
+
|
|
|
+
|
|
|
+ if (this.bannerListTop.length) {
|
|
|
+ this.showTop = true;
|
|
|
+ this.showTopImg = this.bannerListTop[0].picUrl;
|
|
|
+ this.showTopIndex = 0;
|
|
|
+
|
|
|
+ }
|
|
|
+ this.carhelp.set("bannerListTop", nowtime);
|
|
|
+ //this.test()
|
|
|
+ var userInfo = this.carhelp.getPersonInfo();
|
|
|
+
|
|
|
+ if (userInfo && userInfo.id) {
|
|
|
+ //this.getf5surprised()
|
|
|
+ } else {}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //uni.hideLoading()
|
|
|
+ //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
uMessageShow(){
|
|
|
if(this.chargingRecord.updateBy=='cfyxz'){
|
|
|
this.$refs.uMessage.bShow()
|
|
|
}
|
|
|
|
|
|
+ this.getBannerInfoTop("charge-end-top");
|
|
|
+
|
|
|
},
|
|
|
getWinnerFn() {
|
|
|
// 自定义抽奖结果 ,返回值为 options 奖品列表下标,若返回 -1,则会进行随机抽奖
|
|
@@ -1072,6 +1178,57 @@
|
|
|
|
|
|
this.myChart.setOption(option);
|
|
|
|
|
|
+ },
|
|
|
+ clickBannerTopI(i) {
|
|
|
+ var mod = this.bannerListTop[i];
|
|
|
+ //this.showTop = false;
|
|
|
+ this.clickBanner(0, true, mod)
|
|
|
+ },
|
|
|
+ clickBannerTop() {
|
|
|
+ var mod = this.bannerListTop[this.showTopIndex];
|
|
|
+ this.showTop = false;
|
|
|
+ this.clickBanner(0, true, mod)
|
|
|
+ },
|
|
|
+ clickBanner(index, bl, modout) {
|
|
|
+ var uurl = "";
|
|
|
+ var mod = {}
|
|
|
+ if (modout) {
|
|
|
+ mod = modout;
|
|
|
+ }else{
|
|
|
+ mod =this.bannerList[index]
|
|
|
+ }
|
|
|
+ mod.clickUrl = mod.linkUrl
|
|
|
+
|
|
|
+ if (mod.linkPicUrl && !bl) {
|
|
|
+
|
|
|
+ this.showOss = true;
|
|
|
+ this.showOssImg = mod.linkPicUrl;
|
|
|
+ this.showOssIndex = index;
|
|
|
+
|
|
|
+ } else if (mod.clickUrl == null) {
|
|
|
+
|
|
|
+ } else if (mod.clickUrl.indexOf('http') == 0) {
|
|
|
+
|
|
|
+ window.location = mod.clickUrl + uurl;
|
|
|
+ } else if (mod.clickUrl.slice(-5) == 'login' && this.userId) {
|
|
|
+
|
|
|
+ } else if (mod.clickUrl.indexOf('#/') == 0) {
|
|
|
+ if (mod.clickUrl.indexOf("?") == -1) {
|
|
|
+ mod.clickUrl += '?';
|
|
|
+ }
|
|
|
+ var url = mod.clickUrl.split("#")[1]
|
|
|
+ //window.location = mod.clickUrl;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: url + uurl
|
|
|
+ })
|
|
|
+ } else if (mod.clickUrl == '#' || mod.clickUrl == '') {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: mod.clickUrl + uurl
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
getBannerInfo(code, list) {
|
|
|
|
|
@@ -2544,4 +2701,65 @@
|
|
|
background-color:unset;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .slogan-5 {
|
|
|
+ z-index: 2;
|
|
|
+ margin-top: 10px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ /* text-decoration: underline; */
|
|
|
+
|
|
|
+
|
|
|
+ text-align: center;
|
|
|
+ position: fixed;
|
|
|
+ /* top: 40px; */
|
|
|
+ bottom: 180px;
|
|
|
+ right: 20px;
|
|
|
+ height: 80rpx;
|
|
|
+ width: 80rpx;
|
|
|
+ line-height: 20px;
|
|
|
+ font-size: 16px;
|
|
|
+ background: linear-gradient(95deg, #FF9800, #FF5722);
|
|
|
+ box-shadow: 0 4rpx 24rpx 0 #FF5722;
|
|
|
+ //padding-top: 8px;
|
|
|
+ color: #fff;
|
|
|
+ border-radius: 25px;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .swiper {
|
|
|
+ height: 700rpx;
|
|
|
+
|
|
|
+ .swiperitem {
|
|
|
+ height: 700rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .showOssK {
|
|
|
+
|
|
|
+ ::v-deep .u-model,
|
|
|
+ ::v-deep .u-mode-center-box {
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ @keyframes shake {
|
|
|
+ 0% {
|
|
|
+ transform: rotate(0deg);
|
|
|
+ }
|
|
|
+
|
|
|
+ 25% {
|
|
|
+ transform: rotate(8deg);
|
|
|
+ }
|
|
|
+
|
|
|
+ 50% {
|
|
|
+ transform: rotate(0deg);
|
|
|
+ }
|
|
|
+
|
|
|
+ 75% {
|
|
|
+ transform: rotate(-8deg);
|
|
|
+ }
|
|
|
+
|
|
|
+ 100% {
|
|
|
+ transform: rotate(0deg);
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|