|
@@ -59,41 +59,21 @@
|
|
|
<view class="zero five">
|
|
|
<view class="five_pubu">
|
|
|
<view class="list" v-for="(item,index) in marketList" :key="index" @tap="toBuy(item)">
|
|
|
- <view v-if="market_type=='1'">
|
|
|
- <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
|
|
|
- </image>
|
|
|
- <view class="name textOver">
|
|
|
- {{item.name}}
|
|
|
- </view>
|
|
|
- <view class="other">
|
|
|
- <view class="money">
|
|
|
- <view class="money_1">
|
|
|
- <text>¥</text><text>{{item.sell_money||0}}</text>
|
|
|
- </view>
|
|
|
- <view class="money_2">
|
|
|
- <text>¥</text><text>{{item.flow_money||0}}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
|
|
|
+ </image>
|
|
|
+ <view class="name textOver">
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
|
- <view v-else-if="market_type=='2'">
|
|
|
- <image class="image" :src="item.goods.file&&item.goods.file.length?item.goods.file[0].url:''" mode="">
|
|
|
- </image>
|
|
|
- <view class="name textOver">
|
|
|
- <text>{{item.goods.name}}</text>
|
|
|
- </view>
|
|
|
- <view class="other">
|
|
|
- <view class="money">
|
|
|
- <view class="money_1">
|
|
|
- <text>¥</text><text>{{item.sell_money||0}}</text>
|
|
|
- </view>
|
|
|
- <view class="money_2">
|
|
|
- <text>¥</text><text>{{item.flow_money||0}}</text>
|
|
|
- </view>
|
|
|
+ <view class="other">
|
|
|
+ <view class="money">
|
|
|
+ <view class="money_1">
|
|
|
+ <text>¥</text><text>{{item.sell_money||0}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="money_2">
|
|
|
+ <text>¥</text><text>{{item.flow_money||0}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -121,8 +101,6 @@
|
|
|
],
|
|
|
platformactList: [ //平台活动
|
|
|
],
|
|
|
- market_type: '1',
|
|
|
- platformAct: '',
|
|
|
marketList: [ //商品列表
|
|
|
],
|
|
|
total: 0,
|
|
@@ -181,17 +159,10 @@
|
|
|
skip: that.skip,
|
|
|
limit: that.limit
|
|
|
};
|
|
|
- if (that.market_type == '1') {
|
|
|
- // 首页产品列表
|
|
|
- res = await that.$api(`/viewGoods/indexGoodsList`, `GET`, {
|
|
|
- ...info
|
|
|
- });
|
|
|
- } else if (that.market_type == '2') {
|
|
|
- info.platformAct = that.platformAct
|
|
|
- res = await that.$api(`/goodsJoinAct`, 'GET', {
|
|
|
- ...info,
|
|
|
- })
|
|
|
- }
|
|
|
+ // 首页产品列表
|
|
|
+ res = await that.$api(`/viewGoods/indexGoodsList`, `GET`, {
|
|
|
+ ...info
|
|
|
+ });
|
|
|
if (res.errcode == '0') {
|
|
|
let list = [...that.marketList, ...res.data];
|
|
|
that.$set(that, `marketList`, list);
|
|
@@ -235,12 +206,9 @@
|
|
|
toAct(e) {
|
|
|
const that = this;
|
|
|
that.clearPage();
|
|
|
- that.$set(that, `market_type`, '2');
|
|
|
- that.$set(that, `platformAct`, e._id);
|
|
|
- that.searchMarket();
|
|
|
- // uni.navigateTo({
|
|
|
- // url: `/pagesRest/activity/info?id=${e._id}`
|
|
|
- // })
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesRest/activity/info?id=${e._id}`
|
|
|
+ })
|
|
|
},
|
|
|
// 购买
|
|
|
toBuy(e) {
|