Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into zmr
This commit is contained in:
commit
687387861f
@ -172,6 +172,12 @@ export default {
|
||||
goods_id: id
|
||||
});
|
||||
},
|
||||
// 商品搜索
|
||||
ShopSearch({keyword,page = 1,order = 'goods_salenum'}){
|
||||
return vm.$u.post('ShopSearch/search',{
|
||||
keyword,page,order
|
||||
})
|
||||
},
|
||||
// 秒杀推荐
|
||||
recommendedSpike() {
|
||||
return vm.$u.post('Spike/recommendedSpike');
|
||||
|
@ -223,7 +223,7 @@ export default {
|
||||
article_id: this.item.article_id,
|
||||
member_id: this.item.member_id,
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
if(res.errCode == 0) {
|
||||
this.$emit("getArticlelist");
|
||||
}
|
||||
|
@ -25,14 +25,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="edit-btn" @click="confirmBtn">保存地址</view>
|
||||
<!-- <u-select v-model="show"
|
||||
<u-select v-model="show"
|
||||
mode="mutil-column-auto"
|
||||
:list="areaList"
|
||||
value-name="area_id"
|
||||
label-name="area_name"
|
||||
child-name="_child"
|
||||
@confirm="setArea">
|
||||
</u-select> -->
|
||||
</u-select>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
this.getAreaData();
|
||||
},
|
||||
created() {
|
||||
console.log(typeof this.info);
|
||||
// console.log(this.info);
|
||||
this.initAddressInfo();
|
||||
},
|
||||
methods: {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="c-coupon">
|
||||
<view :class="type == 1 && status != 0 ? 'coupon-unable' : 'coupon-usable'">
|
||||
<view class="info-type" :style="{ backgroundImage: 'url(' + (status == 0 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
||||
<view class="coupon-usable">
|
||||
<view class="info-type" :style="{ backgroundImage: 'url(' + '/static/image/mine/30.png' + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
||||
<div class="wrap_left_top"></div>
|
||||
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }}
|
||||
</view>
|
||||
@ -10,15 +10,12 @@
|
||||
<view class="price">¥<span>{{ couponInfo.vouchertemplate_price }}</span></view>
|
||||
<view class="condition">满{{ couponInfo.vouchertemplate_limit }}使用</view>
|
||||
</view>
|
||||
<view class="info-store u-line-1">仅限{{ couponInfo.vouchertemplate_storename }}鞋子商品使用</view>
|
||||
<view class="info-store u-line-1">仅限{{ couponInfo.vouchertemplate_storename }}商品使用</view>
|
||||
<view class="info-integral">兑换积分:{{ couponInfo.vouchertemplate_points }}积分</view>
|
||||
<view class="info-date">有效期{{ couponInfo.vouchertemplate_startdate }}-{{ couponInfo.vouchertemplate_enddate }}</view>
|
||||
</view>
|
||||
<view class="coupon-btn">
|
||||
<text v-if="type == 0 && status == 0" @click="exchangeCoupon">立即兑换</text>
|
||||
<text v-if="type == 1 && status == 0" @click="use">立即使用</text>
|
||||
<image v-if="type == 1 && status == 1" src="/static/image/mine/28.png"></image>
|
||||
<image v-if="type == 1 && status == 2" src="/static/image/mine/29.png"></image>
|
||||
<text @click="exchangeCoupon">立即兑换</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -27,10 +24,8 @@
|
||||
/**
|
||||
* coupon 优惠券
|
||||
* @description 优惠券组件
|
||||
* @property {Number} type 优惠券操作方式(可兑换的优惠券: 0 / 自己的优惠券: 1)
|
||||
* @property {Object} coupon-info 优惠券信息
|
||||
* @event {Function} exchange 兑换优惠券
|
||||
* @event {Function} use 使用优惠券
|
||||
*/
|
||||
export default {
|
||||
data() {
|
||||
@ -38,11 +33,10 @@ export default {
|
||||
},
|
||||
props: {
|
||||
status: Number,
|
||||
type: Number,
|
||||
couponInfo: Object,
|
||||
},
|
||||
created() {
|
||||
console.log(this.couponInfo);
|
||||
// console.log(this.couponInfo);
|
||||
},
|
||||
methods: {
|
||||
exchange() {
|
||||
@ -54,9 +48,6 @@ export default {
|
||||
if(res.errCode == 0) {}
|
||||
})
|
||||
},
|
||||
use() {
|
||||
this.$emit('use', this.couponInfo.vouchertemplate_id);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -123,6 +114,16 @@ export default {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(255,255,255,1);
|
||||
position: relative;
|
||||
// 增大按钮点击范围
|
||||
&::after {
|
||||
content:"";
|
||||
position: absolute;
|
||||
top: -30rpx;
|
||||
left: -40rpx;
|
||||
width: 200rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
> image {
|
||||
width: 122rpx;
|
||||
|
153
components/mine/coupon/mine.vue
Normal file
153
components/mine/coupon/mine.vue
Normal file
@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<view class="c-coupon" v-if="goodsClass.length">
|
||||
<view :class="couponInfo.voucher_state != 1 ? 'coupon-unable' : 'coupon-usable'">
|
||||
<view class="info-type" :style="{ backgroundImage: 'url(' + (couponInfo.voucher_state == 1 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
||||
<div class="wrap_left_top"></div>
|
||||
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }}
|
||||
</view>
|
||||
<view class="coupon-info">
|
||||
<view class="info-usable">
|
||||
<view class="price">¥<span>{{ couponInfo.voucher_price }}</span></view>
|
||||
<view class="condition">满{{ couponInfo.voucher_limit }}使用</view>
|
||||
</view>
|
||||
<view class="info-store u-line-1">仅限{{ couponInfo.type == 1 ? '平台' : couponInfo.store_name }}{{ couponInfo.gc_id | showClass(goodsClass) }}商品使用</view>
|
||||
<view class="info-integral">兑换积分:{{ couponInfo.voucher_points }}积分</view>
|
||||
<view class="info-date">有效期{{ couponInfo.voucher_startdate }}-{{ couponInfo.voucher_enddate }}</view>
|
||||
</view>
|
||||
<view class="coupon-btn">
|
||||
<text v-if="couponInfo.voucher_state == 1" @click="use">立即使用</text>
|
||||
<image v-if="couponInfo.voucher_state == 2" src="/static/image/mine/28.png"></image>
|
||||
<image v-if="couponInfo.voucher_state == 3" src="/static/image/mine/29.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
/**
|
||||
* coupon 领取的优惠券 自己的优惠券
|
||||
* @description 优惠券组件
|
||||
* @property {Number} type 优惠券操作方式(可兑换的优惠券: 0 / 自己的优惠券: 1)
|
||||
* @property {Object} coupon-info 优惠券信息
|
||||
* @event {Function} use 使用优惠券
|
||||
*/
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
status: Number,
|
||||
type: Number,
|
||||
couponInfo: Object,
|
||||
goodsClass: Array,
|
||||
},
|
||||
created() {
|
||||
// console.log(this.couponInfo);
|
||||
// this.getGoodsClass();
|
||||
},
|
||||
filters: {
|
||||
showClass(value, classList) {
|
||||
const ids = classList.filter(element => {
|
||||
return element.gc_id == value;
|
||||
});
|
||||
console.log(ids);
|
||||
return ids.length ? ids[0].gc_name : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
exchange() {
|
||||
this.$emit('exchange', this.couponInfo.vouchertemplate_id);
|
||||
},
|
||||
use() {
|
||||
this.$emit('use', this.couponInfo);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.c-coupon {
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
@mixin coupon-image($url) {
|
||||
width: 690rpx;
|
||||
height: 194rpx;
|
||||
background: url($url) no-repeat left top / contain;
|
||||
color: #FFFFFF;
|
||||
.info-type {
|
||||
width: 150rpx;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 20rpx;
|
||||
border-radius: 10rpx 0rpx 10rpx 0rpx;
|
||||
padding-left: 25rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
.coupon-info {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
top: 36rpx;
|
||||
left: 0;
|
||||
font-weight: 500;
|
||||
padding-left: 20rpx;
|
||||
width: 360rpx;
|
||||
.info-usable{
|
||||
margin-bottom: 6rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.price {
|
||||
margin-right: 16rpx;
|
||||
font-size: 40rpx;
|
||||
> span {
|
||||
font-size: 50rpx;
|
||||
}
|
||||
}
|
||||
.condition {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.info-store{
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.info-integral{
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.info-date{
|
||||
font-size: 20rpx;
|
||||
}
|
||||
}
|
||||
.coupon-btn {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
right: 60rpx;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
> text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(255,255,255,1);
|
||||
position: relative;
|
||||
// 增大按钮点击范围
|
||||
&::after {
|
||||
content:"";
|
||||
position: absolute;
|
||||
top: -30rpx;
|
||||
left: -40rpx;
|
||||
width: 200rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
> image {
|
||||
width: 122rpx;
|
||||
height: 122rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.coupon-usable {
|
||||
@include coupon-image('/static/image/mine/26.png');
|
||||
}
|
||||
.coupon-unable {
|
||||
@include coupon-image('/static/image/mine/27.png');
|
||||
}
|
||||
}
|
||||
</style>
|
@ -6,14 +6,13 @@
|
||||
</view>
|
||||
<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="88" ></u-tabs-swiper>
|
||||
<!-- :style="{ height: swiperHeight }" -->
|
||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish">
|
||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}">
|
||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||
<!-- <scroll-view scroll-y style="height: 100%;"> -->
|
||||
<view v-for="(coupon, index) in couponList.slice(0, 4)" :key="index" class="coupon-item">
|
||||
<Coupon :couponInfo="coupon" :status='0' :type="0"></Coupon>
|
||||
</view>
|
||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||
<!-- </scroll-view> -->
|
||||
<!-- 最多显示四个 -->
|
||||
<view v-for="(coupon, index) in couponList.slice(0, 4)" :key="index" class="coupon-item">
|
||||
<Coupon :couponInfo="coupon" :status='0' :type="0"></Coupon>
|
||||
</view>
|
||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
@ -40,7 +39,6 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setViewHeight();
|
||||
this.getGoodsClass();
|
||||
},
|
||||
methods: {
|
||||
@ -62,6 +60,8 @@ export default {
|
||||
} else {
|
||||
this.couponList = [];
|
||||
}
|
||||
// 设置 swiper 高度
|
||||
this.setViewHeight();
|
||||
})
|
||||
},
|
||||
couponTabsChange(index) {
|
||||
@ -73,9 +73,9 @@ export default {
|
||||
this.couponCurrent = current;
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
// this.swiperHeight = res.windowHeight - ((88 + 10 + 88) / 2) + 'px';
|
||||
this.swiperHeight = '450px';
|
||||
// 一个优惠券的高度 97px, 下距离 10px
|
||||
const num = this.couponList.length;
|
||||
this.swiperHeight = (97 + 10) * num - 10 + 'px';
|
||||
},
|
||||
toCouponPage() {
|
||||
this.$u.route({
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="shop">
|
||||
<image></image>
|
||||
<view class="shop" @click="tap">
|
||||
<image :src="image"></image>
|
||||
<view class="info">
|
||||
<text class="title">这是标题</text>
|
||||
<text class="profile u-line-2">这是简介</text>
|
||||
<text class="title">{{name}}</text>
|
||||
<text class="profile u-line-2">{{advword}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -14,6 +14,12 @@ export default {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
props:['name','advword','id','image'],
|
||||
methods:{
|
||||
tap(){
|
||||
this.$emit("tap",{id:this.id})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -10,10 +10,6 @@
|
||||
<scroll-view :scroll-y="true" style="height:100%">
|
||||
<view style="padding-top:30rpx">
|
||||
<shop></shop>
|
||||
<shop></shop>
|
||||
<shop></shop>
|
||||
<shop></shop>
|
||||
<shop></shop>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@ -25,17 +21,42 @@
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="select">
|
||||
<view @click="sx(1)" data-type="xl">销量</view>
|
||||
<view class="xz" @click="sx(2)">
|
||||
<text>价格</text>
|
||||
<view class="jiage">
|
||||
<view class="top"></view>
|
||||
<view class="bottom bottomxz"></view>
|
||||
<view v-else style=" display: flex;flex-direction: column;height: calc(100vh - 88rpx);">
|
||||
<view class="select">
|
||||
<view @click="sx(0)" data-type="xl">销量</view>
|
||||
<view class="xz" @click="sx(1)">
|
||||
<text>价格</text>
|
||||
<view class="jiage">
|
||||
<view class="top"></view>
|
||||
<view class="bottom bottomxz"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view data-type="hp" @click="sx(2)">好评</view>
|
||||
</view>
|
||||
<view data-type="hp" @click="sx(3)">好评</view>
|
||||
<swiper class="swiper" :current="swiperCurrent" @change="huadong">
|
||||
<swiper-item>
|
||||
<scroll-view :scroll-y="true" style="height:100%">
|
||||
<view style="padding-top:30rpx">
|
||||
<shop v-for="(i,j) in shoplist[0]" :key="j" :name="i.goods_name" :id="i.goods_id" :commonid="i.goods_commonid" :image="i.goods_image"></shop>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view :scroll-y="true" style="height:100%">
|
||||
<view class="list">
|
||||
<!-- <darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view :scroll-y="true" style="height:100%">
|
||||
D
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
@ -137,9 +158,11 @@ export default {
|
||||
current: 0,
|
||||
swiperCurrent: 0,
|
||||
keyword:"",
|
||||
type:""
|
||||
type:"",
|
||||
shoplist:[]
|
||||
}
|
||||
}, methods: {
|
||||
},
|
||||
methods: {
|
||||
tabsChange(index) {
|
||||
this.swiperCurrent = index;
|
||||
},
|
||||
@ -155,11 +178,21 @@ export default {
|
||||
},
|
||||
sx(type){
|
||||
console.log(type)
|
||||
|
||||
},
|
||||
huadong(e){
|
||||
console.log(e.detail.current)
|
||||
},
|
||||
search(){
|
||||
this.$u.api.ShopSearch({keyword:this.keyword}).then((res)=>{
|
||||
this.shoplist[0] = res.data.data
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(o){
|
||||
this.type = o.type
|
||||
this.keyword = o.value
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
</script>
|
@ -26,7 +26,6 @@
|
||||
<view class="name u-line-2">{{ goods.goods_name }}</view>
|
||||
<view class="cart-info">
|
||||
<view class="price">¥{{ goods.goods_price }}</view>
|
||||
<!-- <u-number-box :input-width="38" :input-height="39" :size="22" bg-color="#FFFFFF" color="#FF780F" :index="g_index" v-model="goods.goods_num" :disabled="true"></u-number-box> -->
|
||||
<view>×{{ goods.goods_num }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -34,10 +33,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-info">
|
||||
<view>
|
||||
<view @click="showCoupon({type: 2, store_id: item[index].store_id})">
|
||||
<view class="title">优惠券折扣</view>
|
||||
<view class="value">
|
||||
<view>{{ index }}</view>
|
||||
<view>¥{{ item.coupon_price ? item.coupon_price : '0.00' }}</view>
|
||||
<image src="../static/image/1.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
@ -45,17 +44,16 @@
|
||||
<view class="title">运费</view>
|
||||
<view class="value">
|
||||
<view v-if="freight">¥{{ freight | setFreight(index) }}</view>
|
||||
<!-- <image src="../static/image/1.png"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="common-active">
|
||||
<view>
|
||||
<view @click="showCoupon({type: 1})">
|
||||
<view class="title">平台优惠券</view>
|
||||
<view class="value">
|
||||
<view>-¥0.00</view>
|
||||
<view>-¥{{ choiceCoupon.vouchertemplate_id ? choiceCoupon.voucher_price : '0.00' }}</view>
|
||||
<image src="../static/image/1.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
@ -67,6 +65,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup v-model="couponStatus" mode="bottom">
|
||||
<scroll-view class="coupon-choose" style="height: 800rpx;">
|
||||
<view class="title">优惠券详情</view>
|
||||
<view class="text">使用优惠券</view>
|
||||
<Coupon :couponInfo="coupon" :status='0' :type="1" @use="useCoupon($event)" v-for="(coupon) in couponList" :key="coupon.vouchertemplate_id"></Coupon>
|
||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!couponList.length"></u-empty>
|
||||
</scroll-view>
|
||||
</u-popup>
|
||||
<view class="bottom">
|
||||
<view class="left">
|
||||
<view class="title">合计:</view>
|
||||
@ -81,6 +87,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import Coupon from "@/components/mine/coupon/index";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -101,8 +108,14 @@ export default {
|
||||
text: '快递',
|
||||
value: 'express',
|
||||
}, // 配送方式
|
||||
couponList: [],
|
||||
couponStatus: false,
|
||||
choiceCoupon: {}, // 使用的平台优惠券
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Coupon
|
||||
},
|
||||
filters: {
|
||||
setTotalNumber(data) {
|
||||
let num = 0;
|
||||
@ -172,6 +185,35 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
async getCoupon({ type, store_id, status }) {
|
||||
const res = await this.$u.api.getMemberCouponList({
|
||||
type: type,
|
||||
store_id: store_id,
|
||||
status: status,
|
||||
})
|
||||
return res;
|
||||
},
|
||||
showCoupon({ type, store_id }) {
|
||||
// this.getCoupon({
|
||||
// type: type, // 优惠券类型: 1平台券, 2店铺券
|
||||
// store_id: store_id,
|
||||
// status: 1, // 代金券状态 1:未用 2:已用 3:过期 4:收回
|
||||
// }).then(res => {
|
||||
// this.couponStatus = true;
|
||||
// })
|
||||
this.$u.api.getMemberCouponList({
|
||||
type: type, // 优惠券类型: 1平台券, 2店铺券
|
||||
store_id: store_id,
|
||||
status: 1, // 代金券状态 1:未用 2:已用 3:过期 4:收回
|
||||
}).then(res => {
|
||||
this.couponList = res.data;
|
||||
this.couponStatus = true;
|
||||
})
|
||||
},
|
||||
useCoupon(coupon) {
|
||||
this.choiceCoupon = coupon;
|
||||
this.couponStatus = false;
|
||||
},
|
||||
getFreight() {
|
||||
this.$u.api.getFreight({
|
||||
freight_hash: this.orderInfo.freight_hash,
|
||||
@ -403,6 +445,23 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.coupon-choose {
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
.title {
|
||||
padding-bottom: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(51,51,51,1);
|
||||
text-align: center;
|
||||
}
|
||||
.text {
|
||||
padding-bottom: 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(102,102,102,1);
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
padding: 35rpx 30rpx;
|
||||
position: fixed;
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="manicure-order">
|
||||
<view class="order-form">
|
||||
<!-- <view class="order-name">
|
||||
<view class="order-name">
|
||||
<view>美甲人:</view>
|
||||
<input type="text" v-model="name" />
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="order-date" @click="show=true">
|
||||
<view class="title">美甲时间:</view>
|
||||
<image src="../static/mine/21.png" v-if="!time"></image>
|
||||
|
@ -5,15 +5,16 @@
|
||||
<swiper-item class="swiper-item" v-for="(_, index) in list" :key="index">
|
||||
<scroll-view scroll-y class="scroll-coupon">
|
||||
<view class="coupon-item" v-for="(coupon, c_index) in couponList" :key="c_index">
|
||||
<Coupon :couponInfo="coupon" :status='index' :type="1" @use="useCoupon($event)"></Coupon>
|
||||
<Coupon :couponInfo="coupon" :status='index' :type="1" @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
|
||||
</view>
|
||||
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList.length"></u-empty>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import Coupon from "@/components/mine/coupon/index"
|
||||
import Coupon from "@/components/mine/coupon/mine"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -27,7 +28,8 @@ export default {
|
||||
current: Number,
|
||||
swiperCurrent: 0,
|
||||
swiperHeight: '',
|
||||
couponList: []
|
||||
couponList: [],
|
||||
goodsClass: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -35,6 +37,7 @@ export default {
|
||||
},
|
||||
onLoad() {
|
||||
this.setViewHeight();
|
||||
this.getGoodsClass();
|
||||
},
|
||||
onShow() {
|
||||
this.current = 0;
|
||||
@ -46,12 +49,19 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getGoodsClass() {
|
||||
this.$u.api.getGoodsClass().then(res => {
|
||||
this.goodsClass = res.data;
|
||||
})
|
||||
},
|
||||
getMemberCouponList(current) {
|
||||
this.$u.api.getMemberCouponList({
|
||||
status: current
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.couponList = res.data;
|
||||
} else {
|
||||
this.couponList = [];
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -2,6 +2,7 @@
|
||||
<view class="mine-history">
|
||||
<scroll-view scroll-y class="history-box" @scrolltolower="reachBottom">
|
||||
<view class="item-box">
|
||||
<!-- 需求:只显示最近五十条数据 后台未作限制 -->
|
||||
<view v-for="(item, index) in historyList.slice(0, 50)" :key="index" class="history-item">
|
||||
<view class="item-title">
|
||||
<image :src="item.store_avatar"></image>
|
||||
@ -13,9 +14,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
|
||||
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="historyList.length > 9"></u-loadmore>
|
||||
</scroll-view>
|
||||
<u-empty text="暂无足迹" mode="list" color="#000" margin-top="240" v-if="!historyList.length"></u-empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -23,107 +24,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
historyList: [
|
||||
{
|
||||
"goods_id": 13,
|
||||
"goodsbrowse_time": "2020-06-28 15:45:56",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092121142556524.jpg",//商品主图
|
||||
"goods_name": "变频风冷无霜 独立双循环 LED显示 对开门冰箱(白色)",//商品名称
|
||||
"store_id": 1,//店铺id
|
||||
"store_name": "官方自营店铺",//店铺名
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"//店铺头像
|
||||
},
|
||||
{
|
||||
"goods_id": 13,
|
||||
"goodsbrowse_time": "2020-06-28 15:45:56",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092121142556524.jpg",//商品主图
|
||||
"goods_name": "变频风冷无霜 独立双循环 LED显示 对开门冰箱(白色)",//商品名称
|
||||
"store_id": 1,//店铺id
|
||||
"store_name": "官方自营店铺",//店铺名
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"//店铺头像
|
||||
},
|
||||
{
|
||||
"goods_id": 13,
|
||||
"goodsbrowse_time": "2020-06-28 15:45:56",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092121142556524.jpg",//商品主图
|
||||
"goods_name": "变频风冷无霜 独立双循环 LED显示 对开门冰箱(白色)",//商品名称
|
||||
"store_id": 1,//店铺id
|
||||
"store_name": "官方自营店铺",//店铺名
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"//店铺头像
|
||||
},
|
||||
{
|
||||
"goods_id": 13,
|
||||
"goodsbrowse_time": "2020-06-28 15:45:56",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092121142556524.jpg",//商品主图
|
||||
"goods_name": "变频风冷无霜 独立双循环 LED显示 对开门冰箱(白色)",//商品名称
|
||||
"store_id": 1,//店铺id
|
||||
"store_name": "官方自营店铺",//店铺名
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"//店铺头像
|
||||
},
|
||||
{
|
||||
"goods_id": 13,
|
||||
"goodsbrowse_time": "2020-06-28 15:45:56",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092121142556524.jpg",//商品主图
|
||||
"goods_name": "变频风冷无霜 独立双循环 LED显示 对开门冰箱(白色)",//商品名称
|
||||
"store_id": 1,//店铺id
|
||||
"store_name": "官方自营店铺",//店铺名
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"//店铺头像
|
||||
},
|
||||
{
|
||||
"goods_id": 12,
|
||||
"goodsbrowse_time": "2020-06-28 15:44:41",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092121050988491.jpg",
|
||||
"goods_name": "扬子(YAIR) 小2匹 冷暖 自动清洗 定频空调柜机",
|
||||
"store_id": 1,
|
||||
"store_name": "官方自营店铺",
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"
|
||||
},
|
||||
{
|
||||
"goods_id": 11,
|
||||
"goodsbrowse_time": "2020-06-28 15:38:11",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092120564717575.jpg",
|
||||
"goods_name": "1.5匹 变频 智能 二级能效极速侠 空调挂机",
|
||||
"store_id": 1,
|
||||
"store_name": "官方自营店铺",
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"
|
||||
},
|
||||
{
|
||||
"goods_id": 9,
|
||||
"goodsbrowse_time": "2020-06-28 15:36:27",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092120480147477.jpg",
|
||||
"goods_name": "长虹(CHANGHONG)39M1 39英寸 窄边高清液晶电视(黑色)",
|
||||
"store_id": 1,
|
||||
"store_name": "官方自营店铺",
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"
|
||||
},
|
||||
{
|
||||
"goods_id": 8,
|
||||
"goodsbrowse_time": "2020-06-28 15:36:06",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092120445748551.jpg",
|
||||
"goods_name": "先锋(Pioneer)LED-39B700S 39英寸 高清 网络 智能 液晶电视",
|
||||
"store_id": 1,
|
||||
"store_name": "官方自营店铺",
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"
|
||||
},
|
||||
{
|
||||
"goods_id": 10,
|
||||
"goodsbrowse_time": "2020-06-24 16:14:29",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092120493430154.jpg",
|
||||
"goods_name": "39英寸64位24核安卓智能平板液晶电视(黑色)",
|
||||
"store_id": 1,
|
||||
"store_name": "官方自营店铺",
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"
|
||||
},
|
||||
{
|
||||
"goods_id": 28,
|
||||
"goodsbrowse_time": "2020-06-23 17:07:45",
|
||||
"goods_image": "http://deming.test/uploads/home/store/goods/1/1_2017092202022516767.jpg",
|
||||
"goods_name": "南极人(NanJiren)纯棉床单四件套全棉床上用品婚庆被套4件套",
|
||||
"store_id": 1,
|
||||
"store_name": "官方自营店铺",
|
||||
"store_avatar": "http://deming.test/uploads/home/store/1/1_2020062410413137159.png"
|
||||
}
|
||||
],
|
||||
historyList: [],
|
||||
page: 1, // 默认1
|
||||
loadStatus: 'loadmore',
|
||||
timer: true,
|
||||
@ -165,6 +66,7 @@ export default {
|
||||
min-height: calc(100vh - var(--window-top));
|
||||
background: #ECECEC;
|
||||
.history-box {
|
||||
box-sizing: border-box;
|
||||
height: calc(100vh - var(--window-top));
|
||||
padding: 20rpx 30rpx 0;
|
||||
.item-box {
|
||||
|
@ -30,17 +30,19 @@
|
||||
<text>上门取件</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="fenlei">
|
||||
<view class="fenlei">
|
||||
<shopitem v-for="item in 5" class="item"></shopitem>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="fenlei">
|
||||
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
|
||||
</view>
|
||||
<view class="hr" style="margin-top:80rpx"></view>
|
||||
<!-- 秒杀 -->
|
||||
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
|
||||
<view v-if="JSON.stringify(recommendedSpike) != '{}'" class="hr" style="margin-top:40rpx"></view>
|
||||
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
|
||||
<view v-if="spikeList.length" class="hr" style="margin-top:40rpx"></view>
|
||||
<!-- 拼团 -->
|
||||
<recommend v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush" type='group'></recommend>
|
||||
<view class="hr" style="margin-top:40rpx" v-if="JSON.stringify(pinTuanPush) != '{}'"></view>
|
||||
<group></group>
|
||||
|
Loading…
Reference in New Issue
Block a user