Browse Source

Merge branch 'master' into dev_delivery

dev_delivery
jiazhipeng 1 week ago
parent
commit
5621718fb3
  1. 44
      pages/index/index.vue
  2. 112
      pages/index/startIndex.vue
  3. 2
      subPackages/order/cartOrder.vue
  4. 8
      subPackages/user/commentList.vue

44
pages/index/index.vue

@ -86,6 +86,18 @@
</view>
</view>
<uni-popup ref="alertAdv" type="center">
<view class="alertAdv">
<swiper class="alertAdv-banner" :circular="true" :interval="6000" style="margin-top: 27rpx;"
:duration="800" :indicator-dots="false" :autoplay="true" v-if="alertAdv && alertAdv.length > 0">
<swiper-item class="alertAdv-item" v-for="(item, index) in alertAdv" :key="index" @click.stop="gotoBannerDetail(item)">
<image class="alertAdv-img" :src="showImg(item.head_img)" mode="widthFix" lazy-load="true"></image>
</swiper-item>
</swiper>
</view>
</uni-popup>
</view>
</template>
@ -128,6 +140,7 @@
SHFlag: true,
alertAdv: [],
}
},
onLoad() {
@ -144,6 +157,7 @@
this.initRectInfo()
this.sendRequest()
this.getHeadImg(2378).then(res => {this.CKMap = res})
this.getAlertAdv()
},
methods: {
initSHFlag () {
@ -311,6 +325,18 @@
},
getAlertAdv () {
this.Post({position: 3,type_id: 3},"/api/adv/getAdv",).then(res => {
if (res.data.length > 0) {
this.alertAdv = res.data || []
if (this.alertAdv.length>0) {
this.$refs.alertAdv.open()
}
}
})
},
},
onReachBottom() {
setTimeout(() => {
@ -505,4 +531,22 @@
}
}
}
.alertAdv-banner{
width: 700rpx;
height: 1000rpx;
margin: 0 auto;
.alertAdv-item{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.alertAdv-img{
width: 100%;
height: auto;
}
}
</style>

112
pages/index/startIndex.vue

@ -0,0 +1,112 @@
<template>
<view class="bg" @click="goIndex()">
<image :src="showImg(screenPng)"></image>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
topBanner: [],
screenPng: null,
}
},
onLoad() {
this.getAlertAdv()
},
onUnload() {
//
},
onReady() {
},
methods: {
// 广
gotoBannerDetail(item) {
if (this.SHFlag) { return }
// 1 2 3 4
switch (item.jump_type){
case 1:
this.gotoDetailByType(item.product_model)
break;
case 2:
this.gotoPath(item.front_model.inside)
break;
case 3:
this.gotoWebUrl(item.tdata.url)
break;
case 4:
// #ifdef MP-WEIXIN
uni.navigateToMiniProgram({
shortLink: item.tdata.url
})
// #endif
break;
default:
break;
}
},
getAlertAdv () {
this.Post({position: 2,type_id: 3},"/api/adv/getAdv",).then(res => {
if (res.data.length > 0) {
this.topBanner = res.data || []
if (this.topBanner.length<=0) {
uni.switchTab({
url:"/pages/index/index"
})
} else {
let num = Math.floor(Math.random() * length);
this.screenPng =this.topBanner[num].head_img
}
}
})
},
goIndex () {
uni.switchTab({
url:"/pages/index/index"
})
},
},
}
</script>
<style lang="scss" scoped>
.bg {
width: 100%;
height: 100vh;
}
image {
display: block;
}
</style>

2
subPackages/order/cartOrder.vue

@ -91,7 +91,7 @@
<view class="other-info">
<view class="flex-between">
<view>运费:</view>
<view>{{item.post}}</view>
<view>{{item.post/100}}</view>
</view>
<!-- <view class="flex-between" style="align-items: flex-start;">
<view class="flex-shrink-0">收货人信息:</view>

8
subPackages/user/commentList.vue

@ -28,7 +28,11 @@
<!-- <view v-if="item.img_list.length>1" class="more-img">+{{item.img_list.length}}</view> -->
</view>
</view>
<view class="no-data-zhanwei" v-if="reviews.length<=0">
<image src="https://static.ticket.sz-trip.com/uploads/20250618/0c2a469b4216f8cd570822b642d0a0fe.png"></image>
<view style="padding:50rpx 0 67rpx">暂无数据</view>
</view>
</view>
</template>
@ -135,7 +139,7 @@
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.imgs:nth-of-type(3) {
.imgs:nth-of-type(3n) {
margin-right: 0;
}
}

Loading…
Cancel
Save