|
@@ -122,6 +122,7 @@
|
|
|
import { findCurrentRewardRule } from '@/api/rewardRule.js'
|
|
|
import { listLookUp, getLookUpDatas, getCurrUserInfo } from '@/api/data.js';
|
|
|
import { scanVinLogQueryRoll, getScanVinLogList, getScanGetMaxQty }from '@/api/car.js'
|
|
|
+ import { promoTerminalList } from '@/api/video.js'
|
|
|
import { getRewardRollList } from '@/api/rewardRule.js'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -151,6 +152,7 @@
|
|
|
fontSize: 32
|
|
|
}
|
|
|
],
|
|
|
+ carouselList: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -169,15 +171,20 @@
|
|
|
return rule&&rule.ruleStatus == 'release'
|
|
|
},
|
|
|
imgList(){
|
|
|
+ let list = [
|
|
|
+ {
|
|
|
+ image: '/static/banner1.png',
|
|
|
+ activeType: ''
|
|
|
+ }
|
|
|
+ ]
|
|
|
if(this.hasRedPacket&&this.hasShelf){
|
|
|
- return [{
|
|
|
- image: '/static/banner2.png'
|
|
|
- }]
|
|
|
- }else{
|
|
|
- return [{
|
|
|
- image: '/static/banner1.png'
|
|
|
- }]
|
|
|
+ list.push(
|
|
|
+ {
|
|
|
+ image: '/static/banner2.png',
|
|
|
+ activeType: 'redPacket'
|
|
|
+ })
|
|
|
}
|
|
|
+ return list.concat(this.carouselList)
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
@@ -252,6 +259,25 @@
|
|
|
return true
|
|
|
}
|
|
|
},
|
|
|
+ // 轮播图片
|
|
|
+ getCarousel(){
|
|
|
+ this.carouselList = []
|
|
|
+ const storeShelf = this.$store.state.vuex_storeShelf
|
|
|
+ promoTerminalList({sn:storeShelf.dealerSn}).then(res => {
|
|
|
+ if(res.status == 200){
|
|
|
+ res.data&&res.data.map(item => {
|
|
|
+ this.carouselList.push({
|
|
|
+ image: item.images,
|
|
|
+ title: item.title,
|
|
|
+ contentType: item.contentType,
|
|
|
+ id: item.id,
|
|
|
+ name: item.name,
|
|
|
+ promoActiveSn: item.promoActiveSn
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
pageInit(){
|
|
|
if(this.hasLogin){
|
|
|
// 获取扫描记录
|
|
@@ -378,6 +404,8 @@
|
|
|
this.getShelfBWPayRecord()
|
|
|
// 获取订单信息
|
|
|
this.shelfGetTotalWaitQty()
|
|
|
+ // 获取轮播数据
|
|
|
+ this.getCarousel()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -420,9 +448,18 @@
|
|
|
},
|
|
|
// 单击banner
|
|
|
clickBanner(index){
|
|
|
- if(index == 0 && this.hasRedPacket){
|
|
|
+ const row = this.imgList[index]
|
|
|
+ if(row.activeType == 'redPacket'){
|
|
|
uni.navigateTo({url:"/pages/morePage/redPacket"})
|
|
|
}
|
|
|
+ // 图文
|
|
|
+ if(row.contentType == 'IMAGE_CONTENT'){
|
|
|
+ uni.navigateTo({url:"/pagesA/activeDetail/index?sn="+row.promoActiveSn})
|
|
|
+ }
|
|
|
+ // 视频
|
|
|
+ if(row.activeType == 'VIDEO_CONTENT'){
|
|
|
+ uni.navigateTo({url:"/pagesA/videos/detail?sn="+row.promoActiveSn})
|
|
|
+ }
|
|
|
},
|
|
|
// 选择取货方式
|
|
|
clickAction(index){
|