msb_beta
ch 3 years ago
parent 56d9cf558a
commit 68c11b79a9

@ -0,0 +1,25 @@
/*
* @Author: ch
* @Date: 2022-04-12 13:56:24
* @LastEditors: ch
* @LastEditTime: 2022-04-12 16:06:34
* @Description: file content
*/
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
const BASE_URL = '/mall/marketing';
export const ApiGetHomeSeckill = () =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/activity/home`));
/**
* 获取当天秒杀时段
*/
export const ApiGetSeckillTimes = () =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/activity/time`));
/**
* 获取当天秒杀时段
*/
export const ApiGetSeckillGoods = (params) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/activity/product`, params));

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
* @LastEditTime: 2022-04-12 09:19:05
* @LastEditTime: 2022-04-12 09:28:17
* @Description: 项目接口请求统一处理器返回一个需要token和不需要token的请求封装方法
*/
@ -11,8 +11,8 @@ import $store from '@/common/store';
const ENV = 'test';
const BASE_URL = {
// 'test' : 'http://39.103.236.147/api',
'test' : 'http://k8s-horse-gateway.mashibing.cn',
// 'test' : 'http://k8s-horse-gateway.mashibing.cn',
'test' : '',
'release' : '',
'prod' : ''
};

@ -2,13 +2,13 @@
* @Author: ch
* @Date: 2022-03-20 16:45:27
* @LastEditors: ch
* @LastEditTime: 2022-04-08 09:59:33
* @LastEditTime: 2022-04-12 16:47:49
* @Description: file content
-->
<template>
<view>
<UiGoodsGroup :listData="listData"></UiGoodsGroup>
<u-loadmore :status="loadingStatus" />
<u-loadmore :status="loadingStatus" nomoreText="我也是有底线的啦~"/>
</view>
</template>
<script>

@ -0,0 +1,88 @@
<!--
* @Author: ch
* @Date: 2022-04-12 10:37:24
* @LastEditors: ch
* @LastEditTime: 2022-04-12 13:37:57
* @Description: file content
-->
<template>
<u-popup :show="show" @close="close" round="16rpx" closeable>
<view class="ui-select--title" v-if="title">{{title}}</view>
<radio-group class="ui-select--cell" @change="change">
<UiCell :title="item.label" v-for="item in options" :key="item.value">
<radio slot="right-icon" class="ui-select--radio" color="#FF875B"
:value="item.value" :checked="item.value === selected.value"/>
</UiCell>
</radio-group>
<view class="ui-select--footer">
<UiButton type="gradual" size="max" @click="confirm"></UiButton>
</view>
</u-popup>
</template>
<script>
import UiCell from '@/components/UiCell.vue';
import UiButton from '@/components/UiButton.vue';
export default {
components: { UiButton, UiCell },
props : {
options : {
type : Array,
default : []
},
title : {
type : String,
default : ''
},
value : {
type : [Object, String, Number],
default (){
return {}
}
},
show : {
type : Boolean,
default : false
}
},
data(){
return {
selected : {}
}
},
mounted(){
},
methods:{
change(val){
this.selected = this.options.find(item => val.detail.value === item.value);
},
confirm(){
this.close();
this.$emit('input', this.selected);
},
close(){
this.$emit('update:show', false);
}
}
}
</script>
<style lang="scss" scoped>
.ui-select{
&--title{
text-align: center;
font-size: 34rpx;
margin: 40rpx 0 30rpx;
}
&--cell{
padding: 0 40rpx;
}
&--radio{
transform: scale(60%);
}
&--footer{
padding: 68rpx 40rpx;
display: flex;
justify-content: space-between;
}
}
</style>

@ -78,16 +78,7 @@
"/uc/" : {
"target" : "http://192.168.10.52:8090/"
},
"/mall/trade/" : {
"target" : "http://192.168.10.52:8090/"
},
"/mall/base/" : {
"target" : "http://192.168.10.52:8090/"
},
"/pay/" : {
"target" : "http://192.168.10.52:8090/"
},
"/mall/product/" : {
"/mall/" : {
"target" : "http://192.168.10.52:8090/"
}
}

@ -18,8 +18,8 @@
}
},
{
"path": "pages/sekill",
"aliasPath" : "/sekill",
"path": "pages/seckill",
"aliasPath" : "/seckill",
"style": {
"navigationStyle" : "custom",
"navigationBarTitleText": "uni-app"

@ -0,0 +1,109 @@
<!--
* @Author: ch
* @Date: 2022-04-12 17:33:42
* @LastEditors: ch
* @LastEditTime: 2022-04-12 18:12:45
* @Description: file content
-->
<template>
<view class="seckill">
<view class="seckill--price-box">
<text class="seckill--price-icon"></text>
<text class="seckill--price">9.9</text>
<text class="seckill--price-org">29</text>
</view>
<view class="seckill--timer">
<view>00</view>
<text>:</text>
<view>00</view>
<text>:</text>
<view>00</view>
</view>
</view>
</template>
<script>
export default {
props : {
data : {
type : Object,
default : () => ({})
}
},
data(){
return {
secondNum : 0
}
},
computed:{
hours(){
let hours = parseInt(this.secondNum / 3600);
return hours > 9 ? hours : `0${hours}`;
},
minute(){
let minute = parseInt((this.secondNum - hours * 3600) / 60);
return minute > 9 ? hours : `0${minute}`;
},
second(){
let second = parseInt(this.secondNum % 60);
return second > 9 ? second : `0${second}`;
}
}
}
</script>
<style lang="scss" scoped>
.seckill{
height: 100rpx;
width: 690rpx;
margin: 20rpx auto;
background:linear-gradient(180deg, #FFF3EF 0%, #FFFFFF 100%);
border-radius: 16rpx;
position: relative;
display: flex;
justify-content: space-between;
padding: 0 20rpx 0 234rpx;
&::after{
position: absolute;
left: 0;
top: 0;
display: block;
content: '';
width: 266rpx;
height: 100rpx;
background: url('@/static/goods/seckill.png') no-repeat -8rpx -16rpx;
background-size: 290rpx;
}
&--price-box{
padding-top: 30rpx;
}
&--price-icon{
color: $color-yellow4;
}
&--price{
color: $color-yellow4;
font-size: 52rpx;
}
&--price-org{
color: $color-grey4;
text-decoration: line-through;
}
&--timer{
display: flex;
align-items: center;
view{
background: #000;
width: 48rpx;
height: 48rpx;
line-height: 48rpx;
color: #fff;
text-align: center;
border-radius: 8rpx;
font-size: 24rpx;
}
text{
margin: 0 5rpx;
}
}
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 17:27:21
* @LastEditors: ch
* @LastEditTime: 2022-04-11 10:22:17
* @LastEditTime: 2022-04-12 17:35:22
* @Description: file content
-->
<template>
@ -11,6 +11,7 @@
<image class="back--icon" src="@/static/goods/back.png"/>
</view>
<SlideImage :images="goods.pictureList"></SlideImage>
<view class="goods-info">
<view class="pirce">
<text></text>

@ -2,14 +2,14 @@
* @Author: ch
* @Date: 2022-03-21 10:31:54
* @LastEditors: ch
* @LastEditTime: 2022-04-09 15:02:38
* @LastEditTime: 2022-04-12 10:28:58
* @Description: file content
-->
<template>
<view>
<view class="header">
<UiPageHeader>
<u--input slot="custom" class="search--input" prefixIconStyle="font-size:48rpx;color:$color-grey3"
<u--input slot="custom" class="search--input" prefixIconStyle="font-size:48rpx;color:#ccc"
prefixIcon="search" placeholderClass="search--input__placeholder" clearable
placeholder="请输入您想要搜索的商品名称" :value="$Route.query.search"
@focus="$Router.push('/search')"/>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-21 11:29:38
* @LastEditors: ch
* @LastEditTime: 2022-04-09 15:03:44
* @LastEditTime: 2022-04-12 10:28:28
* @Description: file content
-->
<template>
@ -11,7 +11,7 @@
<UiPageHeader>
<view slot="custom" class="search">
<u--input class="search--input" focus placeholder="请输入您想搜索的商品名称"
prefixIcon="search" ref="search" clearable prefixIconStyle="font-size:48rpx;color:$color-grey3"
prefixIcon="search" ref="search" clearable prefixIconStyle="font-size:48rpx;color:#ccc"
v-model="searchValue" placeholderClass="search--input__placeholder"></u--input>
<text class="search--btn" @click="onSearch"></text>
</view>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 10:31:12
* @LastEditors: ch
* @LastEditTime: 2022-04-09 15:35:25
* @LastEditTime: 2022-04-12 10:09:44
* @Description: file content
-->
<template>
@ -48,10 +48,11 @@ export default {
<style lang="scss" scoped>
.banner{
height: 298rpx;
height: 388rpx;
position: relative;
padding: 40rpx 30rpx 0;
margin-bottom: 50rpx;
// margin-bottom: 50rpx;
overflow: hidden;
&::before{
display: block;
content: '';

@ -2,43 +2,43 @@
* @Author: ch
* @Date: 2022-03-23 10:29:07
* @LastEditors: ch
* @LastEditTime: 2022-04-09 17:18:09
* @LastEditTime: 2022-04-12 18:54:58
* @Description: file content
-->
<template>
<view class="pick">
<view class="max">
<view class="title">{{data[0].name}}</view>
<view class="desc">{{data[0].name}}</view>
<view class="max" @click="$Router.push(`/goodsDetail?id=${max.id}`)">
<view class="title">{{max.name}}</view>
<view class="desc">{{max.name}}</view>
<!-- <view class="tag"></view> -->
<view class="price">{{data[0].startingPrice}}</view>
<view class="price">{{max.startingPrice}}</view>
<view class="img-box">
<image class="img" :src="data[0].mainPicture"/>
<image class="img" :src="max.mainPicture"/>
</view>
</view>
<view class="min">
<view class="title">{{data[1].name}}</view>
<view class="min" @click="$Router.push(`/goodsDetail?id=${minOne.id}`)">
<view class="title">{{minOne.name}}</view>
<view class="min--info-box">
<view class="min--info-box-right">
<view class="desc">{{data[1].name}}</view>
<view class="desc">{{minOne.name}}</view>
<!-- <view class="tag"></view> -->
<view class="price">{{data[1].startingPrice}}</view>
<view class="price">{{minOne.startingPrice}}</view>
</view>
<view class="img-box">
<image class="img" :src="data[1].mainPicture"/>
<image class="img" :src="minOne.mainPicture"/>
</view>
</view>
</view>
<view class="min">
<view class="title">{{data[2].name}}</view>
<view class="min" @click="$Router.push(`/goodsDetail?id=${minTwo.id}`)">
<view class="title">{{minTwo.name}}</view>
<view class="min--info-box">
<view class="min--info-box-right">
<view class="desc">{{data[2].name}}</view>
<view class="desc">{{minTwo.name}}</view>
<view class="tag"></view>
<view class="price">{{data[2].startingPrice}}</view>
<view class="price">{{minTwo.startingPrice}}</view>
</view>
<view class="img-box">
<image class="img" :src="data[2].mainPicture"/>
<image class="img" :src="minTwo.mainPicture"/>
</view>
</view>
</view>
@ -53,7 +53,18 @@ export default {
props:{
data : {
type : Array,
default : []
default : () => ([])
}
},
computed:{
max (){
return this.data[0] || {}
},
minOne (){
return this.data[1] || {}
},
minTwo (){
return this.data[2] || {}
}
}
}

@ -0,0 +1,234 @@
<!--
* @Author: ch
* @Date: 2022-03-23 10:07:48
* @LastEditors: ch
* @LastEditTime: 2022-04-12 18:55:54
* @Description: file content
-->
<template>
<view class="seckill" @click="$Router.push('/seckill')">
<view class="seckill-title">
<view class="seckill-title--left">
<text class="seckill-title--text">限时秒杀</text>
<view class="seckill-title--time">
<text class="seckill-title--time-name">{{activityTimeVO.timeName}}</text>
<image class="seckill-title--time-icon" src="@/static/index/time.png"></image>
<text class="seckill-title--time-time">{{timerStr}}</text>
</view>
</view>
<view class="seckill-title--more">
<text>查看更多</text>
<image class="seckill-title--more-icon" src="@/static/common/arrow.png"></image>
</view>
</view>
<view class="seckill--group">
<view v-for="item in data.activityProductListVO" :key="item.activityProductId">
<image class="seckill--item-img" :src="item.productMainPicture"></image>
<view class="seckill--item-pirce-box">
<text class="seckill--item-pirce-title">秒杀价</text>
<text class="seckill--item-pirce">{{item.activityPrice}}</text>
</view>
<!-- <text class="seckill--item-original-pirce">50</text> -->
</view>
</view>
</view>
</template>
<script>
export default {
props : {
data : {
type : Object,
default: () => ({
activityTimeVO : {
timeName : 'xx'
}
})
}
},
data(){
return {
timerStr : '00:00:00',
secondNum : 0
}
},
computed:{
activityTimeVO (){
return this.data.activityTimeVO || {}
}
},
watch:{
/**
* 监听数据变化后做倒计时
*/
data(nVal){
const {isStartActivity, activityTimeVO:{startTime, endTime }} = nVal;
if(endTime){
let curTime = (new Date('2022-4-12 12:00:50')).getTime(),
expireTime = 0;
if(isStartActivity){
//
// expireTime = (new Date(endTime)).getTime()
expireTime = (new Date('2022-4-12 15:00:00')).getTime();
}else{
//
expireTime = (new Date('2022-4-12 17:00:00')).getTime()
expireTime = (new Date(startTime)).getTime()
}
const second = Math.floor((expireTime - curTime) / 1000);
this.secondNum = second > 0 ? second : 0;
this.timer();
}
}
},
methods:{
timer(){
if(this.secondNum == 0){
this.timerStr = this.data.isStartActivity ? '已结束' : '已开始';
return;
}
this.secondNum--;
let hours = parseInt(this.secondNum / 3600)
let minute = parseInt((this.secondNum - hours * 3600) / 60);
let second = parseInt(this.secondNum % 60);
hours = hours > 9 ? hours : `0${hours}`;
minute = minute > 9 ? minute : `0${minute}`;
second = second > 9 ? second : `0${second}`;
this.timerStr = `${hours}:${minute}:${second}`;
setTimeout(()=>this.timer(),1000)
}
}
}
</script>
<style lang="scss" scoped>
.seckill{
height: 424rpx;
width: 690rpx;
margin: 0 auto;
padding: 30rpx;
background: #fff;
border-radius: 20rpx;
&-title{
height: 36rpx;
display: flex;
justify-content: space-between;
align-items: center;
&--text{
font-size: 36rpx;
}
&--left{
display: flex;
}
&--time{
display: flex;
height: 38rpx;
line-height: 36rpx;
border-radius: 18rpx;
margin-left: 36rpx;
background: #FFEDE9;
overflow: hidden;
align-items: center;
}
&--time-name{
height: 100%;
padding: 0 22rpx 0 15rpx;
background: #FF512B;
font-size: 22rpx;
color: #fff;
position: relative;
&::after{
display: block;
content: '';
width: 16rpx;
height: 36rpx;
background: #FF512B;
transform: rotate(40deg);
position: absolute;
right: -10rpx;
top: -12rpx;
}
}
&--time-time{
margin-right: 15rpx;
font-size: 22rpx;
color: #FF512B;
position: relative;
&::before{
display: block;
content: '';
width: 14rpx;
height: 36rpx;
background: #FFEDE9;
transform: rotate(40deg);
position: absolute;
left: -52rpx;
top: 8rpx;
z-index: 0;
}
}
&--time-icon{
width: 22rpx;
height: 22rpx;
padding-left: 20rpx;
margin-right: 8rpx;
}
&--more{
display: inline-block;
text{
font-size: $font-size-sm;
color: $color-grey5;
}
}
&--more-icon{
width: 10rpx;
height: 20rpx;
margin-left: 10rpx;
}
}
&--group{
display: flex;
justify-content: space-between;
margin-top: 30rpx;
}
&--item{
&-img{
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
background: #F8F8F8;
}
&-pirce-box{
width: 180rpx;
height: 44rpx;
line-height: 44rpx;
background: linear-gradient(90deg, #FFE7DE 0%, #FFFFFF 100%);
border-radius: 20rpx;
padding-left:20rpx;
margin: 20rpx 0 10rpx 0;
}
&-pirce-title{
font-size: 22rpx;
color: $color-grey5;
}
&-pirce{
color: #FF512B;
font-size: 32rpx;
}
&-original-pirce{
display: block;
font-size: 22rpx;
color: #999;
text-decoration: line-through;
text-align: center;
}
}
}
</style>

@ -1,190 +0,0 @@
<!--
* @Author: ch
* @Date: 2022-03-23 10:07:48
* @LastEditors: ch
* @LastEditTime: 2022-04-09 17:46:32
* @Description: file content
-->
<template>
<view class="sekill">
<view class="sekill-title">
<view class="sekill-title--left">
<text class="sekill-title--text">限时秒杀</text>
<view class="sekill-title--time">
<text class="sekill-title--time-name">14点场</text>
<image class="sekill-title--time-icon" src="@/static/index/time.png"></image>
<text class="sekill-title--time-time">14:20:30</text>
</view>
</view>
<view class="sekill-title--more" @click="$Router.push('/pages/sekill/index')">
<text>查看更多</text>
<image class="sekill-title--more-icon" src="@/static/common/arrow.png"></image>
</view>
</view>
<view class="sekill--group">
<view>
<image class="sekill--item-img"></image>
<view class="sekill--item-pirce-box">
<text class="sekill--item-pirce-title">秒杀价</text>
<text class="sekill--item-pirce">29</text>
</view>
<text class="sekill--item-original-pirce">50</text>
</view>
<view>
<image class="sekill--item-img"></image>
<view class="sekill--item-pirce-box">
<text class="sekill--item-pirce-title">秒杀价</text>
<text class="sekill--item-pirce">29</text>
</view>
<text class="sekill--item-original-pirce">50</text>
</view>
<view>
<image class="sekill--item-img"></image>
<view class="sekill--item-pirce-box">
<text class="sekill--item-pirce-title">秒杀价</text>
<text class="sekill--item-pirce">29</text>
</view>
<text class="sekill--item-original-pirce">50</text>
</view>
</view>
</view>
</template>
<script>
export default {
props : {
data : {
type : Array,
default : []
}
},
computed:{}
}
</script>
<style lang="scss" scoped>
.sekill{
height: 424rpx;
width: 690rpx;
margin: 0 auto;
padding: 30rpx;
background: #fff;
border-radius: 20rpx;
&-title{
height: 36rpx;
display: flex;
justify-content: space-between;
align-items: center;
&--text{
font-size: 36rpx;
}
&--left{
display: flex;
}
&--time{
display: flex;
height: 38rpx;
line-height: 36rpx;
border-radius: 18rpx;
margin-left: 36rpx;
background: #FFEDE9;
overflow: hidden;
align-items: center;
}
&--time-name{
height: 100%;
padding: 0 22rpx 0 15rpx;
background: #FF512B;
font-size: 22rpx;
color: #fff;
position: relative;
&::after{
display: block;
content: '';
width: 16rpx;
height: 36rpx;
background: #FF512B;
transform: rotate(40deg);
position: absolute;
right: -10rpx;
top: -12rpx;
}
}
&--time-time{
margin-right: 15rpx;
font-size: 22rpx;
color: #FF512B;
position: relative;
&::before{
display: block;
content: '';
width: 14rpx;
height: 36rpx;
background: #FFEDE9;
transform: rotate(40deg);
position: absolute;
left: -52rpx;
top: 8rpx;
z-index: 0;
}
}
&--time-icon{
width: 22rpx;
height: 22rpx;
padding-left: 20rpx;
margin-right: 8rpx;
}
&--more{
display: inline-block;
font-size: 24rpx;
color: #999;
}
&--more-icon{
width: 10rpx;
height: 20rpx;
margin-left: 10rpx;
}
}
&--group{
display: flex;
justify-content: space-between;
margin-top: 30rpx;
}
&--item{
&-img{
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
background: #F8F8F8;
}
&-pirce-box{
width: 180rpx;
height: 44rpx;
line-height: 44rpx;
background: linear-gradient(90deg, #FFE7DE 0%, #FFFFFF 100%);
border-radius: 20rpx;
padding-left:20rpx;
margin: 20rpx 0 10rpx 0;
}
&-pirce-title{
font-size: 22rpx;
color: $color-grey5;
}
&-pirce{
color: #FF512B;
font-size: 32rpx;
}
&-original-pirce{
display: block;
font-size: 22rpx;
color: #999;
text-decoration: line-through;
text-align: center;
}
}
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-04-09 17:02:23
* @LastEditTime: 2022-04-12 18:55:04
* @Description: file content
-->
<template>
@ -30,7 +30,7 @@
<text class="category--title">{{item.name}}</text>
</view>
</view>
<Sekill></Sekill>
<Seckill :data="seckillData"></Seckill>
<view class="title">甄选推荐</view>
<Pick :data="recommendedGoodsList"></Pick>
@ -41,13 +41,14 @@
</template>
<script>
import BsChoiceGoods from '@/components/BsChoiceGoods';
import Sekill from './components/Sekill';
import Seckill from './components/Seckill';
import Pick from './components/Pick';
import Banner from './components/Banner';
import {ApiGetBannerData} from '@/common/api/index.js';
import {ApiGetHomeSeckill} from '@/common/api/seckill.js';
import {ApiGetCategoryNav, ApiGetRecommendedGoodsList} from '@/common/api/goods.js';
export default {
components : {BsChoiceGoods, Pick, Banner, Sekill},
components : {BsChoiceGoods, Pick, Banner, Seckill},
data(){
return {
scrollTop : 0,
@ -57,23 +58,19 @@ export default {
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
],
categoryList : [
{ url : 'bz2.png', title : '数码周边'},
{ url : 'bz1.png', title : '数码周边'},
{ url : 'bz3.png', title : '数码周边'},
{ url : 'bz4.png', title : '数码周边'},
{ url : 'bz5.png', title : '数码周边'},
{ url : 'bz6.png', title : '数码周边'},
],
recommendedGoodsList : []
recommendedGoodsList : [],
seckillData : {activityTimeVO:{}}
}
},
onLoad(){
this.getCategoryList();
this.getRecommendedGoodsList();
this.getSeckillList();
},
onReachBottom(){
this.$refs.goodsGroup.next()
this.$refs.goodsGroup.next();
},
onShow(){
uni.pageScrollTo({
@ -98,7 +95,6 @@ export default {
},
async getRecommendedGoodsList(){
console.log('-right');
const {error, result} = await ApiGetRecommendedGoodsList({
pageIndex : 1,
length : 3
@ -107,6 +103,12 @@ export default {
this.recommendedGoodsList = result.records
}
},
async getSeckillList(){
const {error, result} = await ApiGetHomeSeckill();
if(result){
this.seckillData = result
}
}
}
}

@ -2,15 +2,21 @@
* @Author: ch
* @Date: 2022-04-11 13:51:10
* @LastEditors: ch
* @LastEditTime: 2022-04-11 17:23:00
* @LastEditTime: 2022-04-12 13:52:58
* @Description: file content
-->
<template>
<view>
<view class="box">
<UiCell title="货物状态"></UiCell>
<UiCell title="退款原因"></UiCell>
<UiCell title="退款金额"></UiCell>
<UiCell title="货物状态" @click="receiveShow = true">
<input class="input" slot="value" disabled placeholder="请选择" :value="receiveSelected.label"/>
</UiCell>
<UiCell title="退款原因" @click="refundShow=true">
<input class="input" slot="value" disabled placeholder="请选择" :value="refundSelected.label"/>
</UiCell>
<UiCell title="退款金额" :rightIcon="false">
<text class="price" slot="value">36.3</text>
</UiCell>
<UiCell title="问题描述"></UiCell>
</view>
<view class="box">
@ -25,13 +31,18 @@
></u-upload>
</view>
<UiButton size="max" type="gradual">提交申请</UiButton>
<UiRadioPicker title="退款原因" :show.sync="refundShow"
:options="refundReasonData" v-model="refundSelected"></UiRadioPicker>
<UiRadioPicker title="货物状态" :show.sync="receiveShow"
:options="receiveStatusData" v-model="receiveSelected"></UiRadioPicker>
</view>
</template>
<script>
import UiButton from '../../../components/UiButton.vue';
import UiCell from "../../../components/UiCell.vue";
import UiRadioPicker from '../../../components/UiRadioPicker.vue';
export default {
components: { UiCell, UiButton },
components: { UiCell, UiButton, UiRadioPicker },
data() {
return {
fileList3: [
@ -39,6 +50,29 @@ export default {
url: "https://cdn.uviewui.com/uview/swiper/1.jpg",
},
],
params : {
receiveStatus : '',
refundReason : '',
refundType : '',
orderProductId : '',
problemDescribe : '',
evidenceImages : ''
},
refundShow : false,
refundSelected : {},
refundReasonData : [
{label : '7天无理由退款', value: '1'},
{label : '不喜欢/效果不满意', value: '2'},
{label : '商品不符合描述', value: '3'},
{label : '其它原因', value: '4'},
],
receiveSelected : {},
receiveShow : false,
receiveStatusData : [
{label : '未收到货', value: '1'},
{label : '已收到货', value: '2'}
]
};
},
};
@ -54,4 +88,12 @@ page{
margin: 20rpx 0;
background: $color-grey0;
}
.input{
font-size: $font-size-base;
text-align: right;
flex: 1;
}
.price{
color: $color-yellow4;
}
</style>

@ -2,56 +2,112 @@
* @Author: ch
* @Date: 2022-03-21 18:08:07
* @LastEditors: ch
* @LastEditTime: 2022-04-09 15:10:41
* @LastEditTime: 2022-04-12 16:47:35
* @Description: file content
-->
<template>
<view>
<image class="banner" src="@/static/sekill/banner.png"/>
<image class="banner" src="@/static/seckill/banner.png"/>
<view class="tab">
<view class="tab--item">
<text class="tab--time">16:00</text>
<text>已开抢</text>
</view>
<view class="tab--item tab--item__active">
<text class="tab--time">18:00</text>
<text>已结束</text>
</view>
<view class="tab--item">
<text class="tab--time">20:00</text>
<text>即将开抢</text>
</view>
<view class="tab--item">
<text class="tab--time">20:00</text>
<text>即将开抢</text>
</view>
<view class="tab--item">
<text class="tab--time">20:00</text>
<text>即将开抢</text>
<view class="tab--item" :class="{'tab--item__active' : item.id === activityTime.id}"
v-for="item in timeList" :key="item.id" @click="changeTime(item)">
<text class="tab--time">{{item.timeName}}</text>
<text>{{item.isInProgress ? '已开抢' : '即将开抢'}}</text>
</view>
</view>
<view class="goods">
<view class="goodsItem" v-for="item in 3" :key="item">
<image class="goodsItem--image" src="@/static/testImg/2.png"/>
<view class="goodsItem" v-for="item in goodsList" :key="item.productId">
<image class="goodsItem--image" :src="item.productMainPicture"/>
<view class="goodsItem--con">
<text>马士兵教育马士兵教育</text>
<text>{{item.productName}}</text>
<view class="goodsItem--progBox">
<u-line-progress class="goodsItem--prog" :percentage="30" :showText="false" height="11rpx" activeColor="#FE0A16" inactiveColor="#FF8E8F" />
<text>仅剩0</text>
<text>仅剩{{item.stock}}</text>
</view>
<view class="goodsItem--operation">
<view>
<view class="goodsItem--price">9.9</view>
<text class="goodsItem--orgPrice">19.00</text>
<view class="goodsItem--price">{{item.activityPrice}}</view>
<text class="goodsItem--orgPrice">{{item.originalPrice}}</text>
</view>
<button v-if="item % 2 == 0" class="goodsItem--btn"></button>
<button v-else class="goodsItem--btn goodsItem--btn__disable">已售罄</button>
<template v-if="activityTime.isInProgress">
<button v-if="item.stock > 0" class="goodsItem--btn"
@click="$Router.push(`/goodsDetail?id=${item.productId}`)">立即抢购
</button>
<button v-else class="goodsItem--btn goodsItem--btn__disable"
@click="$Router.push(`/goodsDetail?id=${item.productId}`)">已售罄
</button>
</template>
<button v-else class="goodsItem--btn"
@click="$Router.push(`/goodsDetail?id=${item.productId}`)">即将开抢
</button>
</view>
</view>
</view>
<u-loadmore :status="loadingStatus" color="#fff" iconColor="#fff" nomoreText="我也是有底线的啦~"/>
</view>
</view>
</template>
<script>
import { ApiGetSeckillTimes, ApiGetSeckillGoods } from '@/common/api/seckill.js';
export default {
data(){
return {
timeList : [],
goodsList : [],
pageIndex : 1,
length : 10,
activityTime : {},
loadingStatus : 'loading',
isLast : false
}
},
mounted(){
this.getTimeList();
},
onReachBottom(){
if(this.loadingStatus === 'nomore'){
return false;
}
this.pageIndex++;
this.getGoodsList();
},
methods:{
async getTimeList(){
const {error, result} = await ApiGetSeckillTimes();
if(error){
uni.$u.toast(error.message);
return false
}
this.timeList = result;
this.activityTime = result[0];
this.getGoodsList()
},
async getGoodsList(){
this.loadingStatus = 'loading';
const {error, result} = await ApiGetSeckillGoods({
pageIndex : this.pageIndex,
length : this.length,
activityTimeId : this.activityTime.id
});
if(error){
uni.$u.toast(error.message);
return false;
}
this.goodsList = this.goodsList.concat(result.records);
if(result.records.length < this.length){
this.loadingStatus = 'nomore';
}
},
changeTime(item){
this.activityTime = item;
this.pageIndex = 1;
this.goodsList = [];
this.getGoodsList();
}
}
}
</script>
<style lang="scss" scoped>
page{
background: #F53739;
@ -75,7 +131,7 @@ page{
content: '';
width: 24rpx;
height: 164rpx;
background: url('@/static/sekill/jz.png') no-repeat;
background: url('@/static/seckill/jz.png') no-repeat;
transform: rotate(180deg);
background-size: 24rpx;
position: absolute;
@ -89,8 +145,10 @@ page{
&--item{
font-size: $font-size-sm;
line-height: 45rpx;
color: #EF6817;
&__active{
text{
color: #EF6817;
}
&__active text{
color: #F53739;
}
}
@ -176,7 +234,7 @@ page{
width: 166rpx;
height: 62rpx;
line-height: 62rpx;
background: url('@/static/sekill/btn.png');
background: url('@/static/seckill/btn.png');
background-size: 166rpx;
font-size: $font-size-base;
font-weight: bold;
@ -188,7 +246,7 @@ page{
display: none;
}
&__disable{
background: url('@/static/sekill/btn2.png');
background: url('@/static/seckill/btn2.png');
background-size: 166rpx;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 284 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 410 B

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 435 B

Loading…
Cancel
Save