feat(fsgx): 完成全部24项开发任务 Phase1-7
Phase1 后端核心:
- 新增 fsgx_v1.sql 迁移脚本(is_queue_goods/frozen_points/available_points/no_assess)
- SystemConfigServices 返佣设置扩展(周期人数/分档比例/范围/时机)
- StoreOrderCreateServices 周期循环佣金计算
- StoreOrderTakeServices 佣金发放后同步冻结积分
- StoreProductServices/StoreProduct 保存 is_queue_goods
Phase2 后端接口:
- GET /api/hjf/brokerage/progress 佣金周期进度
- GET /api/hjf/assets/overview 资产总览
- HjfPointsServices 每日 frozen_points 0.4‰ 释放定时任务
- PUT /adminapi/hjf/member/{uid}/no_assess 不考核接口
- GET /adminapi/hjf/points/release_log 积分日志接口
Phase3 前端清理:
- hjfCustom.js 路由精简(仅保留 points/log)
- hjfQueue.js/hjfMember.js API 清理/重定向至 CRMEB 原生接口
- pages.json 公排→推荐佣金/佣金记录/佣金规则
Phase4-5 前端改造:
- queue/status.vue 推荐佣金进度页整体重写
- 商品详情/订单确认/支付结果页文案与逻辑改造
- 个人中心/资产页/引导页/规则页文案改造
- HjfQueueProgress/HjfRefundNotice/HjfAssetCard 组件改造
- 推广中心嵌入佣金进度摘要
- hjfMockData.js 全量更新(公排字段→佣金字段)
Phase6 Admin 增强:
- 用户列表新增 frozen_points/available_points 列及不考核操作按钮
- hjfPoints.js USE_MOCK=false 对接真实积分日志接口
Phase7 配置文档:
- docs/fsgx-phase7-config-checklist.md 后台配置与全链路验收清单
Made-with: Cursor
This commit is contained in:
437
pro_v3.5.1_副本/view/uniapp/pages/activity/goods_seckill/index.vue
Normal file
437
pro_v3.5.1_副本/view/uniapp/pages/activity/goods_seckill/index.vue
Normal file
@@ -0,0 +1,437 @@
|
||||
<template>
|
||||
<!-- 限时秒杀模块 -->
|
||||
<view :style="colorStyle">
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="w-full bg-top h-604 relative" :style="{backgroundImage:headerBg}">
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef H5 -->
|
||||
<view class="w-full bg-top relative" :style="{backgroundImage:headerBg,height: (sysHeight + 262) * 2 + 'rpx'}">
|
||||
<!-- #endif -->
|
||||
<view class="fixed-lt w-full z-20"
|
||||
:class="pageScrollStatus ? 'sticky' : ''"
|
||||
:style="{'padding-top': sysHeight + 'px','background': pageScrollStatus ? '#e93323' : 'transparent'}">
|
||||
<view class="w-full px-20 pl-20 h-80 flex-between-center">
|
||||
<text class="iconfont icon-ic_leftarrow fs-40 text--w111-fff" @click="goPage(3)"></text>
|
||||
<text class="fs-34 fw-500 text--w111-fff">{{pageScrollStatus ? '限时秒杀' : ''}}</text>
|
||||
<text></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative w-full content">
|
||||
<view class="_box h-106 flex-y-center"
|
||||
:class="pageScrollStatus ? '' : 'rd-t-24rpx'"
|
||||
:style="{'top': 50 + sysHeight + 'px'}">
|
||||
<scroll-view scroll-x="true" scroll-with-animation class="white-nowrap vertical-middle w-full relative z-10"
|
||||
:class="{'sel1':active == 0,'sel-last': timeList.length > 4 && active == timeList.length - 1}"
|
||||
show-scrollbar="false">
|
||||
<view class="scroll-item"
|
||||
v-for="(item,index) in timeList" :key='index'
|
||||
:class="active == index ? 'active-card' : ''"
|
||||
:style="{'background-image': active == index ? navActiveBg : ''}"
|
||||
@tap='settimeList(item,index)'>
|
||||
<view class="flex-col flex-center z-10 relative t-22">
|
||||
<text class="SemiBold fs-40 lh-40rpx"
|
||||
:class="active == index ? 'text--w111-333':'text--w111-fff'">{{item.time}}</text>
|
||||
<text class="inline-block h-36 lh-34rpx fs-24"
|
||||
:class="active == index ? 'red-tag':'text--w111-fff'">{{item.state}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="abs-lb w-full"
|
||||
:style="{'background': pageScrollStatus ? '#e93323' : 'rgba(245,245,245,0.2)','height': pageScrollStatus ? '130rpx' : '96rpx'}"></view>
|
||||
</view>
|
||||
<view class="bg--w111-f5f5f5 pt-32 pl-20 pr-20 relative" >
|
||||
<view class="card w-full bg--w111-fff rd-24rpx p-20 flex" v-for="(item,index) in seckillList" :key="index"
|
||||
@tap='goDetails(item)'>
|
||||
<view class="w-240 h-240">
|
||||
<easy-loadimage
|
||||
mode="aspectFit"
|
||||
:image-src="item.image"
|
||||
:border-src="item.activity_image"
|
||||
width="240rpx"
|
||||
height="240rpx"
|
||||
borderRadius="20rpx"></easy-loadimage>
|
||||
</view>
|
||||
<view class="flex-1 pl-20 flex-col justify-between">
|
||||
<view class="w-full">
|
||||
<view class="w-410 fs-28 lh-40rpx line2">
|
||||
<text v-if="item.brand_name" class="brand-tag">{{ item.brand_name }}</text>
|
||||
{{item.title}}</view>
|
||||
<view class="w-410 flex items-end flex-wrap mt-12" v-if="item.store_label.length">
|
||||
<BaseTag
|
||||
:text="label.label_name"
|
||||
:color="label.color"
|
||||
:background="label.bg_color"
|
||||
:borderColor="label.border_color"
|
||||
:circle="label.border_color ? true : false"
|
||||
:imgSrc="label.icon"
|
||||
v-for="(label, idx) in item.store_label" :key="idx"></BaseTag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-baseline">
|
||||
<text class="fs-22 lh-30rpx text-primary pr-8">秒杀价:</text>
|
||||
<baseMoney :money="item.price" symbolSize="24" integerSize="40" decimalSize="24" color="#E93323" weight></baseMoney>
|
||||
<text class="fs-22 lh-30rpx text--w111-999 pl-16 text-line">¥{{item.ot_price}}</text>
|
||||
</view>
|
||||
<view class="w-full progress-box flex-between-center" v-if="status == 1">
|
||||
<view class="flex-y-center">
|
||||
<view class="progress ml-16">
|
||||
<view class="active" :style="'width:'+item.percent+'%;'"></view>
|
||||
</view>
|
||||
<text class="fs-22 text-primary pl-8">已抢{{item.percent}}%</text>
|
||||
</view>
|
||||
<view class="qiang"></view>
|
||||
</view>
|
||||
<view class="w-full yuyue-box flex-between-center" v-else-if="status == 2">
|
||||
<view class="flex-y-center fs-22 pl-16">活动即将开始</view>
|
||||
<view class="yuyue"></view>
|
||||
</view>
|
||||
<view class="w-full over-box flex-between-center" v-else>
|
||||
<view class="flex-y-center fs-22 pl-16">活动已结束</view>
|
||||
<view class="over"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="abs-lt cir" v-show="active > 0"></view>
|
||||
</view>
|
||||
<view class="bg--w111-f5f5f5 p-20" v-if="!seckillList.length && !pageloading">
|
||||
<emptyPage title="暂无秒杀商品,去看看其他商品吧~" src="/statics/images/noActivity.gif"></emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let sysHeight = uni.getWindowInfo().statusBarHeight;
|
||||
import { getSeckillIndexTime, getSeckillList } from '@/api/activity.js';
|
||||
import colors from '@/mixins/color.js'
|
||||
import {HTTP_REQUEST_URL} from '@/config/app';
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
export default {
|
||||
components: {
|
||||
emptyPage
|
||||
},
|
||||
mixins:[colors],
|
||||
data() {
|
||||
return {
|
||||
sysHeight:sysHeight,
|
||||
topImage: '',
|
||||
seckillList: [],
|
||||
timeList: [],
|
||||
active: 5,
|
||||
scrollLeft: 0,
|
||||
interval: 0,
|
||||
status: 1,
|
||||
countDownHour: "00",
|
||||
countDownMinute: "00",
|
||||
countDownSecond: "00",
|
||||
page: 1,
|
||||
limit: 8,
|
||||
loading: false,
|
||||
loadend: false,
|
||||
pageloading: false,
|
||||
intoindex:'',
|
||||
imgHost:HTTP_REQUEST_URL,
|
||||
pageScrollStatus: false
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
headerBg(){
|
||||
return 'url('+this.imgHost+'/statics/images/product/seckill_header.png'+')'
|
||||
},
|
||||
navActiveLeft(){
|
||||
if(this.active == 0){
|
||||
return 0
|
||||
} else if(this.active == 1){
|
||||
return '134rpx'
|
||||
} else {
|
||||
return 154 * this.active + 'rpx'
|
||||
}
|
||||
},
|
||||
navActiveBg(){
|
||||
if(this.active == 0){
|
||||
return 'url('+this.imgHost+'/statics/images/product/seckill_header_icon1.png'+')'
|
||||
}else{
|
||||
return 'url('+this.imgHost+'/statics/images/product/seckill_header_icon2.png'+')'
|
||||
}
|
||||
}
|
||||
},
|
||||
onPageScroll(object) {
|
||||
if (object.scrollTop > 200) {
|
||||
this.pageScrollStatus = true;
|
||||
} else if (object.scrollTop < 200) {
|
||||
this.pageScrollStatus = false;
|
||||
}
|
||||
uni.$emit('scroll');
|
||||
},
|
||||
onLoad() {
|
||||
this.getSeckillConfig();
|
||||
},
|
||||
onShow(){
|
||||
uni.removeStorageSync('form_type_cart');
|
||||
},
|
||||
methods: {
|
||||
getSeckillConfig: function() {
|
||||
let that = this;
|
||||
getSeckillIndexTime().then(res => {
|
||||
that.topImage = res.data.lovely;
|
||||
that.timeList = res.data.seckillTime;
|
||||
that.active = res.data.seckillTimeIndex > -1 ? res.data.seckillTimeIndex : 0 ;
|
||||
that.$nextTick(()=>{
|
||||
that.intoindex = 'sort'+res.data.seckillTimeIndex > -1 ? res.data.seckillTimeIndex : 0
|
||||
})
|
||||
if (that.timeList.length) {
|
||||
that.scrollLeft = (that.active - 1.37) * 100
|
||||
setTimeout(function() {
|
||||
that.loading = true
|
||||
}, 2000);
|
||||
that.seckillList = [],
|
||||
that.page = 1
|
||||
that.status = that.timeList[that.active].status
|
||||
that.getSeckillList();
|
||||
}
|
||||
});
|
||||
},
|
||||
getSeckillList: function() {
|
||||
var that = this;
|
||||
var data = {
|
||||
page: that.page,
|
||||
limit: that.limit
|
||||
};
|
||||
if (that.loadend) return;
|
||||
if (that.pageloading) return;
|
||||
this.pageloading = true
|
||||
getSeckillList(that.timeList[that.active].id, data).then(res => {
|
||||
var seckillList = res.data;
|
||||
var loadend = seckillList.length < that.limit;
|
||||
that.page++;
|
||||
that.seckillList = that.seckillList.concat(seckillList),
|
||||
that.page = that.page;
|
||||
that.pageloading = false;
|
||||
that.loadend = loadend;
|
||||
}).catch(err => {
|
||||
that.pageloading = false
|
||||
});
|
||||
},
|
||||
settimeList: function(item, index) {
|
||||
var that = this;
|
||||
this.active = index
|
||||
if (that.interval) {
|
||||
clearInterval(that.interval);
|
||||
that.interval = null
|
||||
}
|
||||
that.interval = 0,
|
||||
that.countDownHour = "00";
|
||||
that.countDownMinute = "00";
|
||||
that.countDownSecond = "00";
|
||||
that.status = that.timeList[that.active].status;
|
||||
that.loadend = false;
|
||||
that.page = 1;
|
||||
that.seckillList = [];
|
||||
// wxh.time(e.currentTarget.dataset.stop, that);
|
||||
that.getSeckillList();
|
||||
},
|
||||
goDetails(item){
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/goods_details/index?id=' + item.id + '&type=1&time_id=' + this.timeList[this.active].id
|
||||
})
|
||||
},
|
||||
goPage(type, url){
|
||||
if(type == 1){
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}else if(type == 2){
|
||||
uni.switchTab({
|
||||
url
|
||||
})
|
||||
}else if(type == 3){
|
||||
uni.navigateBack();
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function() {
|
||||
this.getSeckillList();
|
||||
},
|
||||
//#ifdef MP
|
||||
onShareAppMessage() {
|
||||
let that = this;
|
||||
return {
|
||||
title: '秒杀列表',
|
||||
path: '/pages/activity/goods_seckill/index?spid=' + that.$store.state.app.uid,
|
||||
imageUrl: HTTP_REQUEST_URL+'/statics/images/product/seckill_header.png',
|
||||
// desc: ''
|
||||
};
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline: function() {
|
||||
let that = this;
|
||||
return {
|
||||
title: '秒杀列表',
|
||||
path: '/pages/activity/goods_seckill/index?spid=' + + that.$store.state.app.uid,
|
||||
imageUrl: HTTP_REQUEST_URL+'/statics/images/product/seckill_header.png',
|
||||
// desc: ''
|
||||
};
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.bg-top{
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.sticky{
|
||||
&:after{
|
||||
content:'';
|
||||
width:100%;
|
||||
height: 20px;
|
||||
background-color: #E93323;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -20rpx;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
top: -114rpx;
|
||||
}
|
||||
._box{
|
||||
position: sticky;
|
||||
z-index: 99;
|
||||
}
|
||||
.card ~ .card{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.w-21-p111-{
|
||||
width: 21%;
|
||||
}
|
||||
.max-w-96{
|
||||
max-width: 96rpx;
|
||||
}
|
||||
.fq{
|
||||
background-color: #E93323;
|
||||
color: #fff;
|
||||
}
|
||||
.text-primary{
|
||||
color: #E93323;;
|
||||
}
|
||||
.text-line{
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.progress-box{
|
||||
height: 64rpx;
|
||||
background-color: rgba(233, 51, 35, 0.05);
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.progress{
|
||||
width:160rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: rgba(233, 51, 35, 0.2);
|
||||
.active{
|
||||
height: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
background: linear-gradient(90deg, #FF7931 0%, #E93323 100%);
|
||||
}
|
||||
}
|
||||
.qiang{
|
||||
width:112rpx;
|
||||
height: 64rpx;
|
||||
background-image: url('../static/qiang.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.yuyue-box{
|
||||
height: 64rpx;
|
||||
background-color: #FFF1E5;
|
||||
border-radius: 16rpx;
|
||||
color: #FF7D00;
|
||||
}
|
||||
.yuyue{
|
||||
width:140rpx;
|
||||
height: 64rpx;
|
||||
background-image: url('../static/yuyue.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.over-box{
|
||||
height: 64rpx;
|
||||
background-color: rgba(233, 51, 35, 0.05);
|
||||
border-radius: 16rpx;
|
||||
color: rgba(233, 51, 35, 0.60);
|
||||
}
|
||||
.over{
|
||||
width:140rpx;
|
||||
height: 64rpx;
|
||||
background-image: url('../static/over.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.sel1 .scroll-item{
|
||||
right: 30rpx;
|
||||
}
|
||||
.sel-last {
|
||||
/deep/.uni-scroll-view{
|
||||
|
||||
margin-right: -10rpx;
|
||||
}
|
||||
.scroll-item{
|
||||
// left: 40rpx;
|
||||
// left: 32rpx;
|
||||
}
|
||||
.active-card{
|
||||
width: 180rpx;
|
||||
padding-left: 10px;
|
||||
.relative{
|
||||
width: 160rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scroll-item{
|
||||
display: inline-block;
|
||||
height: 96rpx;
|
||||
width: 21%;
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
}
|
||||
.active-card{
|
||||
width:234rpx;
|
||||
height: 106rpx;
|
||||
background-size: cover;
|
||||
z-index: 99;
|
||||
}
|
||||
.t-22{
|
||||
top: 22rpx;
|
||||
}
|
||||
.red-tag{
|
||||
display: inline-block;
|
||||
padding: 0 12rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
background-color: #E93323;
|
||||
font-size: 22rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.cir{
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background-color: #ED593E;
|
||||
&:after{
|
||||
content: '';
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-top-left-radius: 100%; /* 左上角为半径大小的弧形 */
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
.brand-tag{
|
||||
background-color: #e93323 !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user