classify 8.4

This commit is contained in:
ghusermoon 2020-08-04 19:08:04 +08:00
parent 1e9f442b7b
commit 2fd62acb73
26 changed files with 563 additions and 186 deletions

View File

@ -81,6 +81,14 @@ export default {
getGoodsClassRecommend() {
return vm.$u.post('Goods/getGoodsClassRecommend');
},
// goodsListByClassId
goodsListByClassId({ gc_id, page, order }) {
return vm.$u.post('goods/goodsListByClassId', {
gc_id: gc_id,
page: page,
order: order,
});
},
// 商品推荐
getGoodsRecommend({page, gc_id}){
return vm.$u.post('Goods/getGoodsRecommend', {

View File

@ -25,7 +25,8 @@
</view>
</view>
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
<view class="cancel" v-if="order.view_type == 3 || order.view_type == 2" @click="applyRefund">申请退款</view>
<!-- @click="toOtherPage('RefundOrder')" -->
<view class="cancel" v-if="order.view_type == 3 || order.view_type == 2">申请退款</view>
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
@ -66,6 +67,18 @@ export default {
case 4:
state = '待评价';
break;
case 5:
state = '交易成功';
break;
case 6:
state = '待退款';
break;
case 7:
state = '已退款';
break;
case 9:
state = '拼团中';
break;
default:
break;
}
@ -81,19 +94,6 @@ export default {
this.$u.toast(res.message);
})
},
applyRefund() {
let params = {
order_id: this.order.order_id,
// goods_id: goods_id,
// refund_amount: refund_amount,
}
this.$u.api.refundOrder(params).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) {
}
})
},
confirmReceive() {
this.$u.api.confirmReceive({
order_id: this.order.order_id,

View File

@ -97,7 +97,11 @@ export default {
box-sizing: border-box;
padding: 0 30rpx;
display: flex;
justify-content: space-between;
&:not(:nth-child(3n)) {
> view {
margin-right: 20rpx;
}
}
}
}
</style>

View File

@ -20,7 +20,7 @@
<text>{{ info.goods_price }}</text>
</view>
</view>
<image class="img" :src="info.pintuan_image"></image>
<image class="img" :src="info.pintuan_image" @click="toDetailsPage"></image>
</view>
</view>
</template>

View File

@ -1,5 +1,5 @@
<template>
<view class="shop-item">
<view class="shop-item" @click="toClassifyPage">
<image :src="info.goodscn_pic"></image>
<text class="u-line-1">{{ info.gc_name }}</text>
</view>
@ -9,6 +9,14 @@ export default {
name:"shopItem",
props: {
info: Object,
},
methods: {
toClassifyPage() {
this.$u.route('pageC/classify/goods', {
cid: this.info.gc_id,
cname: this.info.gc_name,
});
}
}
}
</script>
@ -17,16 +25,19 @@ export default {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100rpx;
>image{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
>text{
width: 80rpx;
width: 100%;
font-size: 24rpx;
color: #333;
margin-top: 14rpx;
text-align: center;
}
}
</style>

View File

@ -16,7 +16,7 @@
<view v-for="(item, index) in orderInfo.store_cart_list" :key="index">
<view class="goods-info">
<view class="store">
<image class="avatar" :src="item[0].store_avatar"></image>
<image class="avatar" :src="orderInfo.store_list[index].store_avatar"></image>
<view>{{ item[0].store_name }}</view>
<image src="../static/image/1.png" class="right"></image>
</view>
@ -424,8 +424,8 @@ export default {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
border: 1rpx solid #000;
margin-right: 15rpx;
background-color: aquamarine;
}
> view {
font-size: 28rpx;

187
pageC/classify/goods.vue Normal file
View File

@ -0,0 +1,187 @@
<template>
<view class="classify-goods">
<view class="tab-container">
<view class="salenum" :class="{ 'current' : current == 0 }" @click="switchCurrent(0)">销量</view>
<view class="price" :class="{ 'current' : current == 1 }" @click="switchCurrent(1)">
<view class="text">价格</view>
<view class="icon">
<u-icon name="arrow-up-fill" :color="(current == 1 && priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
<u-icon name="arrow-down-fill" :color="(current == 1 && !priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
</view>
</view>
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view>
</view>
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-item">
<image :src="goods.goods_image"></image>
<view class="right">
<view class="name u-line-1">{{ goods.goods_name }}</view>
<view class="briefing u-line-2">{{ goods.goods_advword }}</view>
</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
pageSize: 12,
cid: '',
page: 1,
current: 0,
priceOrderAsc: true, //
goodsList: [],
scrollHeight: '',
loadStatus: 'loadmore',
timer: true, //
}
},
watch: {
current(value) {
this.page = 1;
this.goodsListByClassId({ laod: 'reload' });
},
priceOrderAsc(value) {
this.page = 1;
this.goodsListByClassId({ laod: 'reload' });
}
},
onLoad(option) {
this.cid = option.cid;
this.goodsListByClassId({ load: 'reload' });
this.setViewHeight();
this.setTitle(option.cname);
},
methods: {
setOrderSort() {
let sort = '';
if(this.current == 0) {
sort = 'goods_salenum';
} else if (this.current == 1) {
if(this.priceOrderAsc) sort = 'goods_price_asc';
else sort = 'goods_price_desc';
} else if (this.current == 2) {
sort = 'evaluation_count';
}
return sort;
},
// goods_salenum evaluation_count goods_price_asc goods_price_desc
async goodsListByClassId({ load = 'reload' } = {}) {
const sort = this.setOrderSort();
const res = await this.$u.api.goodsListByClassId({
gc_id: this.cid,
page: this.page,
order: sort,
})
this.timer = true;
if(res.errCode == 0) {
if(load == 'reload') this.goodsList = res.data.data;
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
}
return res.data.data.length;
},
loadMore() {
if(this.goodsList.length < this.pageSize) return false;
if(!this.timer) return false;
this.loadStatus = "loading";
this.page++;
this.goodsListByClassId({ load: 'loadmore' }).then(length => {
if(length == 0) {
this.page--;
this.loadStatus = 'nomore';
} else {
this.loadStatus = 'loading';
}
}).catch(() => {
this.loadStatus = "nomore";
this.page--;
})
},
switchCurrent(current) {
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
this.current = current;
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.scrollHeight = res.windowHeight - (90 / 2) + 'px';
},
setTitle(title) {
uni.setNavigationBarTitle({
title: title
});
}
}
};
</script>
<style lang="scss" scoped>
.classify-goods {
.tab-container {
box-sizing: border-box;
padding: 30rpx 40rpx;
display: flex;
margin-bottom: 30rpx;
> view {
height: 30rpx;
line-height: 30rpx;
flex: 1;
font-size: 32rpx;
color: rgba(51,51,51,1);
}
.salenum {
text-align: left;
}
.price {
display: flex;
align-items: center;
justify-content: center;
.text {
margin-right: 5rpx;
}
.icon {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
}
.evaluation {
text-align: right;
}
.current {
color: rgba(255,120,15,1);
}
}
.goods-container {
.goods-item {
margin: 0 auto;
width: 690rpx;
display: flex;
background-color: #F5F5F5;
margin-bottom: 30rpx;
align-items: center;
> image {
width: 220rpx;
height: 170rpx;
flex-shrink: 0;
margin-right: 30rpx;
}
.right {
width: 418rpx;
.name {
font-size: 30rpx;
color: rgba(51,51,51,1);
margin-bottom: 20rpx;
}
.briefing {
font-size: 28rpx;
color: rgba(102,102,102,1);
line-height: 36rpx;
}
}
}
}
}
</style>

View File

@ -15,7 +15,7 @@
<text>{{item.gc_name}}</text>
</view>
<view class="item-container">
<view class="thumb-box" v-for="(item1, index1) in item._child" :key="index1">
<view class="thumb-box" v-for="(item1, index1) in item._child" :key="index1" @click="toClassifyPage(item1.gc_id, item1.gc_name)">
<image class="item-menu-image" :src="item1.img" mode=""></image>
<view class="item-menu-name">{{item1.gc_name}}</view>
</view>
@ -50,6 +50,11 @@
this.getMenuItemTop()
},
methods: {
toSearchPage() {
this.$u.route({
url: "pageB/search/index"
})
},
//
getClassifyList() {
this.$u.api.getGoodsClassifyList().then(res => {
@ -161,6 +166,12 @@
}
}
}, 10)
},
toClassifyPage(id, name) {
this.$u.route('pageC/classify/goods', {
cid: id,
cname: name,
});
}
}
}

View File

@ -28,6 +28,7 @@
</view>
</view>
</view>
<u-empty mode="list" v-if="!articleList.length" color="#000" img-width="200" font-size="30" style="margin: 20vh auto 0;"></u-empty>
</view>
</template>
<script>

View File

@ -19,7 +19,7 @@ import Coupon from "@/components/mine/coupon/index";
export default {
data() {
return {
pageSize: 1,
pageSize: 12,
swiperHeight: '',
couponCurrent: 0,
swiperCouponCurrent: 0,

View File

@ -10,7 +10,7 @@
<view class="guanzhu action" @click="changeType(info.friend_frommid)" v-else>未关注</view>
</view>
</view>
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" style="margin: 20vh auto 0;"></u-empty>
</view>
</view>
</template>
@ -43,7 +43,9 @@ export default {
padding: 30rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
&:not(:nth-child(3n)) {
margin-right: 20rpx;
}
.daren-item{
width: 215rpx;
height: 282rpx;

View File

@ -5,74 +5,38 @@
<view class="rank-value">lv{{ memberInfo.member_level }}</view>
<view class="line-box">
<u-line-progress :percent="percent" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30" :striped="true" :striped-active="true"></u-line-progress>
<text>{{ memberInfo.member_exppoints | percentExp(rank[memberInfo.member_level - 1])}}</text>
<text>{{ memberInfo.member_exppoints }}</text>
</view>
<view class="rank-value">lv{{ memberInfo.member_level + 1 }}</view>
</view>
<view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view>
<view class="distance">距离下一级还需要{{ memberInfo.member_exppoints | residualExp(rank[memberInfo.member_level - 1]) }}经验值</view>
<!-- <view class="distance">距离下一级还需要{{ memberInfo.next_grade_exppoints_diff }}经验值</view> -->
<view class="distance">距离下一级还需要{{ memberInfo.next_grade_exppoints_diff }}经验值</view>
</view>
<view class="body">
<view class="title">
<image src="/static/image/mine/34.png"></image>
<text>等级定义</text>
</view>
<view class="rank-list">
<!-- <view class="rank-list">
<view v-for="(rank, index) in rank" :key="index" class="list-item">
<view class="rank-value">lv{{ rank.level }}</view>
<view class="rank-interval"><span>经验值:</span>{{ rank.max == '--' ? rank.min + '及以上' : rank.min + '~' + rank.max }}</view>
</view>
</view> -->
<view class="rich">
<rich-text :nodes="nodes"></rich-text>
</view>
</view>
<!-- <view class="body">
<u-parse :html="memberInfo.grade_rule"></u-parse>
</view> -->
</view>
</template>
<script>
import common from '@/static/js/common.js';
export default {
data() {
return {
rank: [
{
level: 1,
min: 50,
max: 99,
},
{
level: 2,
min: 100,
max: 199,
},
{
level: 3,
min: 200,
max: 399,
},
{
level: 4,
min: 400,
max: 999,
},
{
level: 5,
min: 1000,
max: 1999,
},
{
level: 6,
min: 2000,
max: 4999,
},
{
level: 7,
min: 5000,
max: '--',
}
],
percent: 0,
memberInfo: {},
nodes: '',
}
},
filters: {
@ -82,11 +46,6 @@ export default {
if(rank) result = value + '/' + rank.max;
return result;
},
residualExp(value, rank) {
let result = 0;
if(rank) result = rank.max - value;
return result;
}
},
onShow() {
this.getMemberPointsStat();
@ -96,7 +55,7 @@ export default {
this.$u.api.getMemberPointsStat().then((res)=>{
if (res.errCode == 0) {
this.memberInfo = res.data;
this.percent = (this.memberInfo.member_exppoints / this.rank[this.memberInfo.member_level - 1].max) * 100;
this.nodes = common.unescapeHTML(res.data.points_rule);
// console.log(this.percent);
}
})
@ -159,6 +118,7 @@ export default {
}
}
.body {
margin-top: 60rpx;
.title {
height: 88rpx;
display: flex;
@ -167,39 +127,43 @@ export default {
font-size: 30rpx;
font-weight: 500;
color: rgba(51,51,51,1);
border-bottom: #ECECEC 1rpx solid;
// border-bottom: #ECECEC 1rpx solid;
margin-bottom: 30rpx;
> image {
width: 29rpx;
height: 36rpx;
margin-right: 20rpx;
}
}
.rank-list {
padding: 30rpx;
.list-item {
margin-bottom: 40rpx;
display: flex;
align-items: center;
.rank-value {
color: #FFF;
height: 30rpx;
line-height: 30rpx;
box-sizing: content-box;
background:rgba(255,213,101,1);
border-radius: 6rpx;
padding: 0 10rpx;
margin-right: 15rpx;
}
.rank-interval {
font-size: 28rpx;
color: #999999;
> span {
margin-right: 10rpx;
color: rgba(51,51,51,1);
}
}
}
.rich {
padding: 0 60rpx;
}
// .rank-list {
// padding: 30rpx;
// .list-item {
// margin-bottom: 40rpx;
// display: flex;
// align-items: center;
// .rank-value {
// color: #FFF;
// height: 30rpx;
// line-height: 30rpx;
// box-sizing: content-box;
// background:rgba(255,213,101,1);
// border-radius: 6rpx;
// padding: 0 10rpx;
// margin-right: 15rpx;
// }
// .rank-interval {
// font-size: 28rpx;
// color: #999999;
// > span {
// margin-right: 10rpx;
// color: rgba(51,51,51,1);
// }
// }
// }
// }
}
}
</style>

View File

@ -1,11 +1,11 @@
<template>
<view class="details" v-if="orderInfo.extend_store">
<view class="status" v-if="state">
<view class="status" v-if="orderstate">
<view class="text">
<view class="status-text">{{ s_object[state].text }}</view>
<view class="status-text">{{ s_object[orderstate].text }}</view>
<view class="time" v-if="orderInfo.view_type == 1">距离结束{{ countdown }}</view>
</view>
<image :src="s_object[state].image"></image>
<image :src="s_object[orderstate].image"></image>
</view>
<view class="info">
<view class="info-address">
@ -67,15 +67,16 @@
<view>创建时间{{ orderInfo.add_time | date}}</view>
</view>
</view>
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(state) >= 0">
<view class="cancel" v-if="state == '4' || state == '1'" @click="applyRefund">申请退款</view>
<view class="cancel" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="state == '1'" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="state == '6'" @click="cancelOrder">取消支付</view>
<view class="payment" v-if="state == '6'" @click="payNow">立即支付</view>
<view class="service" v-if="state == '7'">联系官方客服</view>
<view class="submit" v-if="state == '7'">提交官方审核</view>
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(orderstate) >= 0">
<!-- @click="toOtherPage('RefundOrder')" -->
<view class="cancel" v-if="orderstate == '4' || orderstate == '1'">申请退款</view>
<view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
<view class="payment" v-if="orderstate == '6'" @click="payNow">立即支付</view>
<view class="service" v-if="orderstate == '7'">联系官方客服</view>
<view class="submit" v-if="orderstate == '7'">提交官方审核</view>
</view>
</view>
</template>
@ -83,7 +84,7 @@
export default {
data() {
return {
state: '', // 1: 2: 3: 4: 5: 退 6: 7: 退 8: 退
orderstate: '', // 1: 2: 3: 4: 5: 退 6: 7: 退 8: 退
s_object: {
'1': {
text: '待收货',
@ -113,6 +114,10 @@ export default {
text: '待退款',
image: '../static/mine/34.png',
},
'8': {
text: '拼团中',
image: '../static/mine/37.png',
},
},
orderInfo: {},
oid: '',
@ -155,10 +160,13 @@ export default {
case 7:
state = '5';
break;
case 9:
state = '8';
break;
default:
break;
}
this.state = state;
this.orderstate = state;
},
setSpikeTime(time) {
// console.log(time);

View File

@ -1,7 +1,7 @@
<template>
<view class="order">
<view>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper>
<u-tabs-swiper ref="tabs" :list="list" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
@ -35,13 +35,15 @@ export default {
name: '待收货'
}, {
name: '试穿试送'
},{
name: '拼团中'
}, {
name: '售后'
}, {
name: '待评价'
}],
orderList: [],
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
page: 0,
current: Number,
swiperCurrent: 0,
@ -94,9 +96,12 @@ export default {
type = -1; // 穿
break;
case 5:
type = 8; //
type = 9; //
break;
case 6:
type = 8; //
break;
case 7:
type = 4; //
break;
default:

142
pageE/order/RefundOrder.vue Normal file
View File

@ -0,0 +1,142 @@
<template>
<view class="refund">
<view class="radios-container">
<u-radio-group v-model="value" @change="radioChange">
<label class="radio-view" v-for="(item, index) in goodsList" :key="index">
<view class="radio">
<u-radio color="#F0AD4E" :name="item.goods_id" active-color="#FF780F" icon-size="34" shape="circle"></u-radio>
</view>
<view class="store_info">
<view class="info_img">
<image :src="item.goods_image" mode="">
</view>
<view class="info_txt">
<view class="content u-line-2">
{{ item.goods_name }}
</view>
<view class="much">
<text>{{ item.goods_pay_price }}</text>
<text>x{{ item.goods_num }}</text>
</view>
</view>
</view>
</label>
</u-radio-group>
</view>
<view class="refund-details">
<view class="goods-number">
<view>选择数量</view>
<view></view>
</view>
<view class="refund-price">
<view>
<view>退款金额</view>
<view>99.00</view>
</view>
<view>若退款成功将退还给您99.00</view>
</view>
<view class="refund-text">
<view>申请说明</view>
<u-input v-model="refundText" type="textarea" />
</view>
</view>
<view class="submit-btn">提交申请</view>
</view>
</template>
<script>
export default {
data() {
return {
goodsList: [],
value: '',
}
},
onLoad(option) {
this.getOrderInfo(option.oid);
},
methods: {
radioChange(e){
console.log(e)
},
getOrderInfo(id) {
this.$u.api.getOrderInfo({
order_id: id,
}).then(res => {
if(res.errCode == 0) {
// this.orderInfo = res.data;
this.goodsList = res.data.extend_order_goods;
console.log(this.goodsList);
}
// uni.stopPullDownRefresh(); //
})
},
applyRefund() {
let params = {
order_id: this.order.order_id,
// goods_id: goods_id,
// refund_amount: refund_amount,
}
this.$u.api.refundOrder(params).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) {
}
})
},
}
};
</script>
<style lang="scss" scoped>
.refund {
min-height: calc(100vh - var(--window-top));
background-color: #EDEDED;
.radios-container {
margin-bottom: 20rpx;
.radio-view {
background-color: #FFFFFF;
padding: 26rpx;
display: flex;
align-items: center;
margin-bottom: 1rpx;
.radio {
margin-right: 20rpx;
}
.store_info {
display: flex;
flex-wrap: nowrap;
width: 100%;
.info_img{
>image{
width: 180rpx;
height: 160rpx;
background-color: aqua;
border-radius: 10rpx;
}
}
.info_txt{
padding-left: 30rpx;
padding-right: 30rpx;
display: flex;
flex-wrap: wrap;
width: 100%;
.content{
height: 74rpx;
line-height: 37rpx;
font-size: 30rpx;
color:rgba(51,51,51,1);
}
.much{
display: flex;
justify-content: space-between;
width: 100%;
}
}
}
}
}
.refund-details {
background-color: #FFFFFF;
.goods-number {}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

BIN
pageE/static/mine/37.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,9 +1,9 @@
<template>
<view class="manicure">
<view>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-item">
<scroll-view scroll-y class="order-list" @scrolltolower="reachBottom">
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
@ -14,7 +14,7 @@
<view class="order-status">{{ item.status }}</view>
</view>
<view class="order-name">美甲人姓名{{ item.manicure_name }}</view>
<view class="order-date">时间{{ item.manicure_time | dateFormat }}</view>
<view class="order-date">时间{{ item.manicure_time | date }}</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length>=pageSize"></u-loadmore>
</view>
@ -44,26 +44,20 @@ export default {
orderList: [],
loadStatus: 'loadmore',
timer: true,
swiperHeight: '',
}
},
onPullDownRefresh() {
this.getManicureList({ load: 'reload' });
},
onLoad() {
this.setViewHeight();
},
onShow() {
this.current = 0;
this.swiperCurrent = 0;
this.getManicureList({ load: 'reload' });
},
filters: {
dateFormat(value) {
let date = new Date(value * 1000);
let year, month, day;
year = date.getFullYear();
month = date.getMonth() + 1;
day = date.getDate();
return year + "-" + month + "-" + day;
}
},
methods: {
async getManicureList({ load }) {
const res = await this.$u.api.getManicureList({
@ -94,6 +88,10 @@ export default {
this.page--;
})
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
},
tabsChange(index) {
this.swiperCurrent = index;
// this.toApplyPage(index);

View File

@ -65,14 +65,11 @@ export default {
time: new Date(this.time)
}).then((res)=>{
if(res.errCode == 0) {
uni.redirectTo({
url: '/pageE/tool/Manicure'
});
// this.$refs.uToast.show({
// title: res.message,
// type: 'success',
// url: '/pageE/tool/Manicure'
// })
this.$refs.uToast.show({
title: res.message,
type: 'success',
back: true,
})
} else {
this.showToast(res.message, 'error');
}

View File

@ -3,8 +3,16 @@
<view class="title">
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
<u-icon name="arrow-down-fill" :color="current == 0 ? '#FF780F' : '#333333'" size="17" class="order-icon" :style="{ left: list[0].name == '平台历史订单' ? '236rpx' : '252rpx' }"></u-icon>
<view class="popup" v-if="showPopup" @click="onTap">
<view class="popup_cont" @click="replaces(1)">
实体店历史订单
</view>
<view class="popup_cont" @click="replaces(2)">
平台历史订单
</view>
</view>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-item">
<scroll-view scroll-y class="order-list" @scrolltolower="loadmore">
<view v-for="(item, index) in orderList" :key="index" class="order-item">
@ -13,10 +21,10 @@
<view class="order-status">{{ item.order_status | viewStatus }}</view>
</view>
<view class="order-info">
<image src="../static/mine/23.png"></image>
<image :src="item.goods_image"></image>
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
<view>骑手名字{{ item.takeawayer_name || '' }}</view>
<view>联系方式{{ item.member_phone || '' }}</view>
<view>联系方式{{ item.takeawayer_mobile || '' }}</view>
<view>所属公司{{ item.company || '' }}</view>
</view>
<view v-if="item.order_status == 0">
@ -56,14 +64,6 @@
</scroll-view>
</swiper-item>
</swiper>
<view class="popup" v-if="showPopup" @click="onTap">
<view class="popup_cont" @click="replaces(1)">
实体店历史订单
</view>
<view class="popup_cont" @click="replaces(2)">
平台历史订单
</view>
</view>
</view>
</template>
<script>
@ -86,6 +86,7 @@ export default {
orderList: [],
timer: true,
commentList: [],
swiperHeight: '',
}
},
components: {
@ -133,6 +134,9 @@ export default {
this.sendLaundryOrderList();
this.sendCommentList();
},
onLoad() {
this.setViewHeight();
},
methods: {
async sendLaundryOrderList({ load = 'reload' } = {}) {
let type = this.list[0].name == '平台历史订单' ? 1 : 2;
@ -186,6 +190,10 @@ export default {
}
})
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
},
toComment(id) {
this.$u.route('/pageE/tool/washComment', {
id: id
@ -235,6 +243,34 @@ export default {
transform: translate(0, -50%);
z-index: 9;
}
.popup{
width: 100%;
height: calc(calc(100vh - 88rpx) - var(--window-top));
position: absolute;
top: 88rpx;
left: 0;
z-index: 9;
background-color: rgba(0, 0, 0, 0.4);
transform: scale(1);
display: flex;
flex-direction: column;
justify-content: top;
align-items: center;
transition-duration: 0.3s;
.popup_cont{
border-top: 1px solid RGBA(239, 236, 240, 1);
background-color: #fff;
width: 100%;
height: 80rpx;
line-height: 80rpx;
font-size:28rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(102,102,102,1);
padding-left: 41rpx;
position: relative;
}
}
}
.swiper-item {
padding-top: 20rpx;
@ -309,35 +345,5 @@ export default {
}
}
}
.popup{
width: 100%;
height: 100%;
position: fixed;
bottom: 0;
top: 88px;
left: 0;
right: 0;
z-index: 2;
background-color: rgba(0, 0, 0, 0.4);
transform: scale(1);
display: flex;
flex-direction: column;
justify-content: top;
align-items: center;
transition-duration: 0.3s;
.popup_cont{
border-top: 1px solid RGBA(239, 236, 240, 1);
background-color: #fff;
width: 100%;
height: 80rpx;
line-height: 80rpx;
font-size:28rpx;
font-family:PingFang SC;
font-weight:400;
color:rgba(102,102,102,1);
padding-left: 41rpx;
position: relative;
}
}
}
</style>

View File

@ -3,7 +3,7 @@
<view>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ minHeight: swiperHeight }">
<swiper-item class="swiper-item">
<scroll-view scroll-y="true" style="height: 100%;">
<view class="order-info">
@ -175,7 +175,7 @@
<view class="checkd">
<label class="radio-view" v-for="(item, index) in items.extend_order_goods" :key="index">
<view class="radio">
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="34"></u-radio>
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="34" shape="circle"></u-radio>
</view>
<view class="store_info">
<view class="info_img">
@ -375,8 +375,13 @@ export default {
this.$u.api.sendLaundrySave(params).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) {
this.$refs.uToast.show({
title: res.message,
type: 'success',
back: true,
})
} else {
this.$u.toast(res.message);
this.debounce = true;
}
})

View File

@ -250,7 +250,18 @@
}
}
}
},
{
"path": "classify/goods",
"style": {
"navigationBarTitleText": "分类商品列表",
"app-plus": {
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "cart/index",
@ -921,6 +932,19 @@
}
}
}
},
{
"path": "order/RefundOrder",
"style": {
"navigationBarTitleText": "申请退款",
"app-plus": {
"titleSize": "36px",
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
}
]
}

View File

@ -42,7 +42,7 @@
},
{
id: 0,
url: '../../static/pageD/info(6).png',
url: '../../static/pageD/info(13).png',
text: '活动消息'
},
{

View File

@ -68,10 +68,14 @@
<view>试穿试送</view>
</view>
<view @click="toOtherPage('/order/Index?current=5')">
<image src="/static/image/mine/37.png"></image>
<view>拼团中</view>
</view>
<view @click="toOtherPage('/order/Index?current=6')">
<image src="/static/image/mine/9.png"></image>
<view>售后</view>
</view>
<view @click="toOtherPage('/order/Index?current=6')">
<view @click="toOtherPage('/order/Index?current=7')">
<image src="/static/image/mine/3.png"></image>
<view>待评价</view>
</view>

View File

@ -309,7 +309,7 @@
margin-bottom: 30rpx;
&:not(:nth-child(5n)) {
margin-right: 70rpx;
margin-right: 42rpx;
}
}
}

BIN
static/image/mine/37.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB