parent
70fe080f57
commit
987e90f80a
|
@ -1,26 +1,18 @@
|
||||||
import request from "@/utils/request.js";
|
import request from "@/utils/request.js";
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 所有活动接口 包括:拼团,砍价,秒杀
|
* 所有活动接口 包括:拼团,砍价,秒杀
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼团列表
|
* 拼团列表
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getCombinationList(data) {
|
export function getCombinationList(data) {
|
||||||
return request.get('combination/list', data,{noAuth:true});
|
return request.get('combination/list', data,{noAuth:true});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团详情
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export function getCombinationDetail(id) {
|
|
||||||
return request.get('combination/detail/'+id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼团 开团
|
* 拼团 开团
|
||||||
*/
|
*/
|
||||||
|
@ -35,13 +27,6 @@ export function postCombinationRemove(data) {
|
||||||
return request.post("combination/remove",data);
|
return request.post("combination/remove",data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团 更多拼团
|
|
||||||
*/
|
|
||||||
export function getCombinationMore(data) {
|
|
||||||
return request.get("combination/more",data,{noAuth:true});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 砍价列表
|
* 砍价列表
|
||||||
*/
|
*/
|
||||||
|
@ -50,7 +35,7 @@ export function getBargainList(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 砍价列表(已参与)
|
* 砍价列表(已参与)
|
||||||
* @param object data
|
* @param object data
|
||||||
*/
|
*/
|
||||||
|
@ -60,7 +45,7 @@ export function getBargainUserList(data){
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 取消砍价
|
* 取消砍价
|
||||||
* @param int bargainId
|
* @param int bargainId
|
||||||
*/
|
*/
|
||||||
|
@ -105,7 +90,7 @@ export function postBargainHelpPrice(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 砍价 砍价帮
|
* 砍价 砍价帮
|
||||||
*/
|
*/
|
||||||
export function postBargainHelpList(params,data) {
|
export function postBargainHelpList(params,data) {
|
||||||
return request.get("bargain/help/list?limit="+params.limit+"&page="+params.page, data,{});
|
return request.get("bargain/help/list?limit="+params.limit+"&page="+params.page, data,{});
|
||||||
|
@ -113,7 +98,7 @@ export function postBargainHelpList(params,data) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 秒杀产品时间区间
|
* 秒杀产品时间区间
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getSeckillIndexTime(){
|
export function getSeckillIndexTime(){
|
||||||
return request.get('seckill/index',{},{noAuth:true});
|
return request.get('seckill/index',{},{noAuth:true});
|
||||||
|
@ -139,7 +124,7 @@ export function getSeckillDetail(id){
|
||||||
/**
|
/**
|
||||||
* 砍价海报
|
* 砍价海报
|
||||||
* @param object data
|
* @param object data
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getBargainPoster(data){
|
export function getBargainPoster(data){
|
||||||
return request.post('bargain/poster',data)
|
return request.post('bargain/poster',data)
|
||||||
|
@ -148,7 +133,7 @@ export function getBargainPoster(data){
|
||||||
/**
|
/**
|
||||||
* 拼团海报
|
* 拼团海报
|
||||||
* @param object data
|
* @param object data
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function getCombinationPoster(data){
|
export function getCombinationPoster(data){
|
||||||
return request.post('combination/poster',data)
|
return request.post('combination/poster',data)
|
||||||
|
@ -217,4 +202,4 @@ export function bargainHeaderApi(){
|
||||||
*/
|
*/
|
||||||
export function combinationHeaderApi(){
|
export function combinationHeaderApi(){
|
||||||
return request.get('combination/header');
|
return request.get('combination/header');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
import request from "@/utils/request.js";
|
import request from "@/utils/request.js";
|
||||||
|
|
||||||
|
// 获得拼团活动列表
|
||||||
|
export function getCombinationActivityList(count) {
|
||||||
|
return request.get("app-api/promotion/combination-activity/list", {
|
||||||
|
count
|
||||||
|
}, {
|
||||||
|
noAuth: true // TODO 芋艿:后续要做调整
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 获得拼团活动分页
|
// 获得拼团活动分页
|
||||||
export function getCombinationActivityPage(data) {
|
export function getCombinationActivityPage(data) {
|
||||||
return request.get("app-api/promotion/combination-activity/page", data, {
|
return request.get("app-api/promotion/combination-activity/page", data, {
|
||||||
|
@ -17,8 +26,9 @@ export function getCombinationActivity(id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得最近 n 条拼团记录(团长发起的)
|
// 获得最近 n 条拼团记录(团长发起的)
|
||||||
export function getHeadCombinationRecordList(status, count) {
|
export function getHeadCombinationRecordList(activityId, status, count) {
|
||||||
return request.get("app-api/promotion/combination-record/get-head-list", {
|
return request.get("app-api/promotion/combination-record/get-head-list", {
|
||||||
|
activityId,
|
||||||
status,
|
status,
|
||||||
count
|
count
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -473,10 +473,10 @@
|
||||||
this.status = 0;
|
this.status = 0;
|
||||||
}
|
}
|
||||||
// 参团记录
|
// 参团记录
|
||||||
CombinationApi.getHeadCombinationRecordList(1).then(res => {
|
CombinationApi.getHeadCombinationRecordList(this.id, 1).then(res => {
|
||||||
this.runningRecords = res.data;
|
this.runningRecords = res.data;
|
||||||
})
|
})
|
||||||
CombinationApi.getHeadCombinationRecordList(2).then(res => {
|
CombinationApi.getHeadCombinationRecordList(this.id, 2).then(res => {
|
||||||
this.successRecords = res.data;
|
this.successRecords = res.data;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -527,7 +527,7 @@
|
||||||
* 更多拼团
|
* 更多拼团
|
||||||
*/
|
*/
|
||||||
combinationMore: function() {
|
combinationMore: function() {
|
||||||
CombinationApi.getHeadCombinationRecordList(1, 9).then(res => {
|
CombinationApi.getHeadCombinationRecordList(undefined, 1, 9).then(res => {
|
||||||
this.storeCombinationHost = res.data;
|
this.storeCombinationHost = res.data;
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
this.$util.Tips({
|
this.$util.Tips({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view :class="{borderShow:isBorader}">
|
<view :class="{borderShow: false}">
|
||||||
<view class="combination" v-if="combinationList.length">
|
<view class="combination" v-if="combinationList.length">
|
||||||
<view class="title acea-row row-between">
|
<view class="title acea-row row-between">
|
||||||
<view class="spike-bd">
|
<view class="spike-bd">
|
||||||
|
@ -11,11 +11,13 @@
|
||||||
<i>···</i>
|
<i>···</i>
|
||||||
</span>
|
</span>
|
||||||
</view>
|
</view>
|
||||||
<text class="pic_count">{{assistUserCount}}人参与</text>
|
<text class="pic_count">{{ assistUserCount }}人参与</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<navigator url="/pages/activity/goods_combination/index" hover-class="none"
|
<navigator url="/pages/activity/goods_combination/index" hover-class="none"
|
||||||
class="more acea-row row-center-wrapper">GO<text class="iconfont icon-xiangyou"></text></navigator>
|
class="more acea-row row-center-wrapper">
|
||||||
|
GO<text class="iconfont icon-xiangyou"></text>
|
||||||
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
<view class="conter acea-row">
|
<view class="conter acea-row">
|
||||||
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;"
|
<scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;"
|
||||||
|
@ -23,68 +25,63 @@
|
||||||
<view class="itemCon" v-for="(item, index) in combinationList" :key="index" @click="goDetail(item)">
|
<view class="itemCon" v-for="(item, index) in combinationList" :key="index" @click="goDetail(item)">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="item.image"></image>
|
<image :src="item.picUrl" />
|
||||||
</view>
|
</view>
|
||||||
<view class="text lines1">
|
<view class="text lines1">
|
||||||
<view class="name line1">{{item.title}}</view>
|
<view class="name line1">{{ item.name }}</view>
|
||||||
<view class="money">¥<text class="num">{{item.price}}</text></view>
|
<view class="money">¥<text class="num">{{ fen2yuan(item.combinationPrice) }}</text></view>
|
||||||
<view class="y_money">¥{{item.otPrice}}</view>
|
<view class="y_money">¥{{ fen2yuan(item.marketPrice) }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <navigator :url="`/pages/activity/goods_combination_details/index?id=${item.id}`" hover-class="none" class="item" v-for="(item, index) in combinationList" :key="index">
|
|
||||||
<view class="pictrue">
|
|
||||||
<image :src="item.image"></image>
|
|
||||||
</view>
|
|
||||||
<view class="text lines1">
|
|
||||||
<text class="money">¥<text class="num">{{item.price}}</text></text>
|
|
||||||
<text class="y_money">¥{{item.otPrice}}</text>
|
|
||||||
</view>
|
|
||||||
</navigator> -->
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let app = getApp();
|
let app = getApp();
|
||||||
import {
|
import * as CombinationApi from '@/api/promotion/combination.js';
|
||||||
getCombinationIndexApi
|
import * as Util from '@/utils/util.js';
|
||||||
} from '@/api/activity.js';
|
export default {
|
||||||
export default {
|
|
||||||
name: 'b_combination',
|
name: 'b_combination',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
combinationList: [],
|
combinationList: [], // 拼团列表(由团长发起的)
|
||||||
isBorader: false,
|
assistUserList: [], // 拼团用户头像列表
|
||||||
assistUserList: [],
|
assistUserCount: 0 // 拼团用户数量
|
||||||
assistUserCount: 0
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCombinationList();
|
// 获得拼团列表
|
||||||
|
CombinationApi.getCombinationActivityList(6).then((res) => {
|
||||||
|
this.combinationList = res.data;
|
||||||
|
}).catch((res) => {
|
||||||
|
return this.$util.Tips({
|
||||||
|
title: res
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获得拼团概要
|
||||||
|
CombinationApi.getCombinationSummary().then((res) => {
|
||||||
|
this.assistUserList = res.data.avatars;
|
||||||
|
this.assistUserCount = res.data.userCount;
|
||||||
|
}).catch((res) => {
|
||||||
|
return this.$util.Tips({
|
||||||
|
title: res
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mounted() {},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 拼团列表
|
|
||||||
getCombinationList: function() {
|
|
||||||
let that = this;
|
|
||||||
getCombinationIndexApi().then(function(res) {
|
|
||||||
that.combinationList = res.data.productList;
|
|
||||||
that.assistUserList = res.data.avatarList;
|
|
||||||
that.assistUserCount = res.data.totalPeople;
|
|
||||||
}).catch((res) => {
|
|
||||||
return that.$util.Tips({
|
|
||||||
title: res
|
|
||||||
});
|
|
||||||
})
|
|
||||||
},
|
|
||||||
goDetail(item) {
|
goDetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/activity/goods_combination_details/index?id=${item.id}`
|
url: `/pages/activity/goods_combination_details/index?id=${item.id}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
|
||||||
|
fen2yuan(price) {
|
||||||
|
return Util.fen2yuan(price)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue