|
@@ -13,12 +13,12 @@
|
|
|
>
|
|
|
<view class="video-item">
|
|
|
<view>
|
|
|
- <u-image :src="item.images" height="140px" width="100%"></u-image>
|
|
|
+ <u-image :src="item.imageSet[0]" height="140px" width="100%"></u-image>
|
|
|
<view class="back-price">返<text>¥15</text></view>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <view class="product-name">箭冠轮胎285/70R17LT RT-5900 坦克300、长城炮、牧马人 D</view>
|
|
|
- <view class="product-guige">285/70R17LT RT-5900</view>
|
|
|
+ <view class="product-name">{{item.name}}</view>
|
|
|
+ <view class="product-guige">{{item.origCode}}</view>
|
|
|
<view class="product-button">
|
|
|
<view class="price-txt">¥<text>{{item.price}}</text></view>
|
|
|
<view>
|
|
@@ -86,8 +86,8 @@
|
|
|
<view class="back-price">返<text>¥15</text></view>
|
|
|
</view>
|
|
|
<view class="choose-product-item-info">
|
|
|
- <view class="choose-product-item-left-info-name">箭冠轮胎285/70R17LT RT-5900 坦克300、长城炮、牧马人 D</view>
|
|
|
- <view class="choose-product-item-left-info-guige">285/70R17LT RT-5900</view>
|
|
|
+ <view class="choose-product-item-left-info-name">{{item.name}}</view>
|
|
|
+ <view class="choose-product-item-left-info-guige">{{item.origCode}}</view>
|
|
|
<view class="choose-product-item-left-info-price">
|
|
|
<view class="price-txt">¥<text>{{item.price}}</text></view>
|
|
|
<view>
|
|
@@ -111,7 +111,7 @@
|
|
|
mapState,
|
|
|
mapMutations,
|
|
|
} from 'vuex'
|
|
|
- import { promoTerminalList } from '@/api/video.js'
|
|
|
+ import { queryPromoProductByPage } from '@/api/video.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -139,7 +139,8 @@
|
|
|
showSwipeAction: false, // 已选弹框是否一打开
|
|
|
choosePageNo: 1, // 已选产品当前页
|
|
|
choosePageSize: 8, // 已选产品每页数
|
|
|
- chooseTotal: 0 // 已选产品总记录数
|
|
|
+ chooseTotal: 0 ,// 已选产品总记录数
|
|
|
+ promoActiveSn: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -156,6 +157,7 @@
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: opts.title||'促销活动产品'
|
|
|
})
|
|
|
+ this.promoActiveSn = opts.promoActiveSn
|
|
|
this.pageInit()
|
|
|
},
|
|
|
methods: {
|
|
@@ -165,18 +167,7 @@
|
|
|
this.total = 0
|
|
|
this.pageNo = 1
|
|
|
// 获取列表数据
|
|
|
- // this.getRow()
|
|
|
- for(let i=0;i<25;i++){
|
|
|
- this.list.push({
|
|
|
- id: this.$u.guid(),
|
|
|
- title: '长安回望绣成堆,山顶千门次第开,一骑红尘妃子笑,无人知是荔枝来',
|
|
|
- images: 'https://cdn.uviewui.com/uview/common/logo.png',
|
|
|
- price: Number(Math.random() * 100 + 50).toFixed(2),
|
|
|
- checked: false,
|
|
|
- show: false,
|
|
|
- qty: 1
|
|
|
- })
|
|
|
- }
|
|
|
+ this.getRow()
|
|
|
},
|
|
|
// 添加已选产品
|
|
|
chooseProduct(item){
|
|
@@ -186,7 +177,6 @@
|
|
|
item.show = false
|
|
|
this.chooseList.unshift(item)
|
|
|
}else{
|
|
|
- // item.qty = item.qty + 1
|
|
|
// 已添加,则增加数量
|
|
|
const row = this.chooseList.find(key => key.id == item.id)
|
|
|
if(row){row.qty = row.qty + 1}
|
|
@@ -253,7 +243,6 @@
|
|
|
const row = this.list.find(item => item.id == index)
|
|
|
if(row){row.checked = false}
|
|
|
const rindex = this.chooseProductList.findIndex(item => item.id == index)
|
|
|
- console.log(rindex)
|
|
|
this.chooseProductList.splice(rindex, 1);
|
|
|
this.chooseList.splice(rindex, 1);
|
|
|
this.$u.toast(`删除成功!`);
|
|
@@ -314,22 +303,14 @@
|
|
|
let params = {
|
|
|
pageNo: this.pageNo,
|
|
|
pageSize: this.pageSize,
|
|
|
- queryWord: this.queryWord
|
|
|
+ queryWord: this.queryWord,
|
|
|
+ promoActiveSn: this.promoActiveSn
|
|
|
}
|
|
|
- const storeShelf = this.$store.state.vuex_storeShelf
|
|
|
this.status = "loading"
|
|
|
- promoTerminalList({sn:storeShelf.dealerSn,contentType:'LINK'}).then(res => {
|
|
|
+ queryPromoProductByPage(params).then(res => {
|
|
|
if (res.code == 200 || res.status == 204 || res.status == 200) {
|
|
|
- // const list = res.data.list || []
|
|
|
- // if(_this.pageNo>1){
|
|
|
- // _this.list = _this.list.concat(list)
|
|
|
- // }else{
|
|
|
- // _this.list = list
|
|
|
- // }
|
|
|
- // _this.total = res.data.count || 0
|
|
|
-
|
|
|
- _this.list = res.data.filter(item => item.content.indexOf("pages/promo/index") >= 0)
|
|
|
- _this.total = _this.list.length
|
|
|
+ _this.list = _this.list.concat(res.data.list||[])
|
|
|
+ _this.total = res.data.count || 0
|
|
|
} else {
|
|
|
_this.list = []
|
|
|
_this.total = 0
|