我的 优惠券和积分数据 积分列表 售后订单列表 售后订单详情 隐藏手机号绑定弹窗
parent
16a4fd21b1
commit
ef254d2d3c
|
|
@ -1,357 +1,355 @@
|
||||||
<!-- 售后详情 -->
|
<!-- 售后详情 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="售后详情" :navbar="!isEmpty(state.info) && state.loading ? 'inner' : 'normal'">
|
<s-layout title="售后详情" :navbar="!isEmpty(state.info) && state.loading ? 'inner' : 'normal'">
|
||||||
<view class="content_box" v-if="!isEmpty(state.info) && state.loading">
|
<view class="content_box" v-if="!isEmpty(state.info) && state.loading">
|
||||||
<!-- 步骤条 -->
|
<!-- 步骤条 -->
|
||||||
<view
|
<!-- 这个没找到替换方案 -->
|
||||||
class="steps-box ss-flex"
|
<view class="steps-box ss-flex" :style="[
|
||||||
:style="[
|
|
||||||
{
|
{
|
||||||
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
||||||
paddingTop: Number(statusBarHeight + 88) + 'rpx',
|
paddingTop: Number(statusBarHeight + 88) + 'rpx',
|
||||||
},
|
},
|
||||||
]"
|
]">
|
||||||
>
|
<!-- <uni-steps :options="state.list" :active="state.active" active-color="#fff" /> -->
|
||||||
<!-- <uni-steps :options="state.list" :active="state.active" active-color="#fff" /> -->
|
<view class="ss-flex">
|
||||||
<view class="ss-flex">
|
<view class="steps-item" v-for="(item, index) in state.list" :key="index">
|
||||||
<view class="steps-item" v-for="(item, index) in state.list" :key="index">
|
<view class="ss-flex">
|
||||||
<view class="ss-flex">
|
<text class="sicon-circleclose" v-if="
|
||||||
<text
|
|
||||||
class="sicon-circleclose"
|
|
||||||
v-if="
|
|
||||||
(state.list.length - 1 == index && state.info.aftersale_status === -2) ||
|
(state.list.length - 1 == index && state.info.aftersale_status === -2) ||
|
||||||
(state.list.length - 1 == index && state.info.aftersale_status === -1)
|
(state.list.length - 1 == index && state.info.aftersale_status === -1)
|
||||||
"
|
"></text>
|
||||||
></text>
|
<text class="sicon-circlecheck" v-else
|
||||||
<text
|
:class="state.active >= index ? 'activity-color' : 'info-color'"></text>
|
||||||
class="sicon-circlecheck"
|
|
||||||
v-else
|
|
||||||
:class="state.active >= index ? 'activity-color' : 'info-color'"
|
|
||||||
></text>
|
|
||||||
|
|
||||||
<view
|
<view v-if="state.list.length - 1 != index" class="line"
|
||||||
v-if="state.list.length - 1 != index"
|
:class="state.active >= index ? 'activity-bg' : 'info-bg'"></view>
|
||||||
class="line"
|
</view>
|
||||||
:class="state.active >= index ? 'activity-bg' : 'info-bg'"
|
<view class="steps-item-title" :class="state.active >= index ? 'activity-color' : 'info-color'">
|
||||||
></view>
|
{{ item.title }}
|
||||||
</view>
|
</view>
|
||||||
<view
|
</view>
|
||||||
class="steps-item-title"
|
</view>
|
||||||
:class="state.active >= index ? 'activity-color' : 'info-color'"
|
</view>
|
||||||
>{{ item.title }}</view
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 服务状态 -->
|
<!-- 服务状态 -->
|
||||||
<view
|
<!-- <view class="status-box ss-flex ss-col-center ss-row-between ss-m-x-20"
|
||||||
class="status-box ss-flex ss-col-center ss-row-between ss-m-x-20"
|
@tap="sheep.$router.go('/pages/order/aftersale/log', { id: state.aftersaleId })">
|
||||||
@tap="sheep.$router.go('/pages/order/aftersale/log', { id: state.aftersaleId })"
|
<view class="">
|
||||||
>
|
<view class="status-text">{{ state.info.aftersale_status_desc }}</view>
|
||||||
<view class="">
|
<view class="status-time">{{ state.info.update_time }}</view>
|
||||||
<view class="status-text">{{ state.info.aftersale_status_desc }}</view>
|
</view>
|
||||||
<view class="status-time">{{ state.info.update_time }}</view>
|
<text class="ss-iconfont _icon-forward" style="color: #666"></text>
|
||||||
</view>
|
</view> -->
|
||||||
<text class="ss-iconfont _icon-forward" style="color: #666"></text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 退款金额 -->
|
<!-- 退款金额 -->
|
||||||
<view class="aftersale-money ss-flex ss-col-center ss-row-between">
|
<view class="aftersale-money ss-flex ss-col-center ss-row-between">
|
||||||
<view class="aftersale-money--title">退款总额</view>
|
<view class="aftersale-money--title">退款总额</view>
|
||||||
<view class="aftersale-money--num">¥{{ state.info.refund_fee }}</view>
|
<view class="aftersale-money--num">¥{{ state.info.refundPrice/100 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 服务商品 -->
|
<!-- 服务商品 -->
|
||||||
<view class="order-shop">
|
<view class="order-shop">
|
||||||
<s-goods-item
|
<!-- <s-goods-item :title="state.info.goods_title" :price="state.info.goods_price"
|
||||||
:title="state.info.goods_title"
|
:img="state.info.goods_image" priceColor="#333333" :titleWidth="480"
|
||||||
:price="state.info.goods_price"
|
:skuText="state.info.goods_sku_text" :num="state.info.goods_num"></s-goods-item> -->
|
||||||
:img="state.info.goods_image"
|
<s-goods-item :img=" state.info.picUrl" :title=" state.info.spuName" priceColor="#333333"
|
||||||
priceColor="#333333"
|
:titleWidth="480" :skuText=" state.info.properties.reduce((a,b)=>a+b.valueName+' ','')"
|
||||||
:titleWidth="480"
|
:price=" state.info.refundPrice/100" :num=" state.info.count"></s-goods-item>
|
||||||
:skuText="state.info.goods_sku_text"
|
</view>
|
||||||
:num="state.info.goods_num"
|
|
||||||
></s-goods-item>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 服务内容 -->
|
<!-- 服务内容 -->
|
||||||
<view class="aftersale-content">
|
<view class="aftersale-content">
|
||||||
<view class="aftersale-item ss-flex ss-col-center">
|
<view class="aftersale-item ss-flex ss-col-center">
|
||||||
<view class="item-title">服务单号:</view>
|
<view class="item-title">服务单号:</view>
|
||||||
<view class="item-content ss-m-r-16">{{ state.info.aftersale_sn }}</view>
|
<view class="item-content ss-m-r-16">{{ state.info.no }}</view>
|
||||||
<button class="ss-reset-button copy-btn" @tap="onCopy">复制</button>
|
<button class="ss-reset-button copy-btn" @tap="onCopy">复制</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="aftersale-item ss-flex ss-col-center">
|
<view class="aftersale-item ss-flex ss-col-center">
|
||||||
<view class="item-title">申请时间:</view>
|
<view class="item-title">申请时间:</view>
|
||||||
<view class="item-content">{{ state.info.create_time }}</view>
|
<view class="item-content">
|
||||||
</view>
|
{{ sheep.$helper.timeFormat(state.info.createTime, 'yyyy-mm-dd hh:MM:ss') }}
|
||||||
<view class="aftersale-item ss-flex ss-col-center">
|
</view>
|
||||||
<view class="item-title">售后类型:</view>
|
</view>
|
||||||
<view class="item-content">{{ state.info.type_text }}</view>
|
<view class="aftersale-item ss-flex ss-col-center">
|
||||||
</view>
|
<view class="item-title">售后类型:</view>
|
||||||
<view class="aftersale-item ss-flex ss-col-center">
|
<view class="item-content">{{ status2[state.info.way] }}</view>
|
||||||
<view class="item-title">申请原因:</view>
|
</view>
|
||||||
<view class="item-content">{{ state.info.reason }}</view>
|
<view class="aftersale-item ss-flex ss-col-center">
|
||||||
</view>
|
<view class="item-title">申请原因:</view>
|
||||||
<view class="aftersale-item ss-flex ss-col-center">
|
<view class="item-content">{{ state.info.applyReason }}</view>
|
||||||
<view class="item-title">相关描述:</view>
|
</view>
|
||||||
<view class="item-content">{{ state.info.content }}</view>
|
<view class="aftersale-item ss-flex ss-col-center">
|
||||||
</view>
|
<view class="item-title">相关描述:</view>
|
||||||
</view>
|
<view class="item-content">{{ state.info.applyDescription }}</view>
|
||||||
</view>
|
</view>
|
||||||
<s-empty
|
</view>
|
||||||
v-if="isEmpty(state.info) && state.loading"
|
</view>
|
||||||
icon="/static/order-empty.png"
|
<s-empty v-if="isEmpty(state.info) && state.loading" icon="/static/order-empty.png" text="暂无该订单售后详情" />
|
||||||
text="暂无该订单售后详情"
|
<!-- <su-fixed bottom placeholder bg="bg-white" v-if="!isEmpty(state.info)">
|
||||||
/>
|
<view class="foot_box">
|
||||||
<su-fixed bottom placeholder bg="bg-white" v-if="!isEmpty(state.info)">
|
<button class="ss-reset-button btn" v-if="state.info.btns?.includes('cancel')"
|
||||||
<view class="foot_box">
|
@tap="onApply(state.info.id)">取消申请</button>
|
||||||
<button
|
<button class="ss-reset-button btn" v-if="state.info.btns?.includes('delete')"
|
||||||
class="ss-reset-button btn"
|
@tap="onDelete(state.info.id)">删除</button>
|
||||||
v-if="state.info.btns?.includes('cancel')"
|
<button class="ss-reset-button contcat-btn btn"
|
||||||
@tap="onApply(state.info.id)"
|
@tap="sheep.$router.go('/pages/chat/index')">联系客服</button>
|
||||||
>取消申请</button
|
</view>
|
||||||
>
|
</su-fixed> -->
|
||||||
<!-- <button
|
</s-layout>
|
||||||
class="ss-reset-button btn"
|
|
||||||
v-if="state.info.btns?.includes('delete')"
|
|
||||||
@tap="onDelete(state.info.id)"
|
|
||||||
>删除</button
|
|
||||||
> -->
|
|
||||||
<button class="ss-reset-button contcat-btn btn" @tap="sheep.$router.go('/pages/chat/index')"
|
|
||||||
>联系客服</button
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</su-fixed>
|
|
||||||
</s-layout>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import {
|
||||||
import { reactive } from 'vue';
|
onLoad
|
||||||
import { isEmpty } from 'lodash';
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
isEmpty
|
||||||
|
} from 'lodash';
|
||||||
|
|
||||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||||
const headerBg = sheep.$url.css('/static/img/shop/order/order_bg.png');
|
const headerBg = sheep.$url.css('/static/img/shop/order/order_bg.png');
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
active: 0,
|
active: 0,
|
||||||
aftersaleId: 0,
|
aftersaleId: 0,
|
||||||
info: {},
|
info: {},
|
||||||
list: [
|
list: [{
|
||||||
{
|
title: '提交申请',
|
||||||
title: '提交申请',
|
},
|
||||||
},
|
{
|
||||||
{
|
title: '处理中',
|
||||||
title: '处理中',
|
},
|
||||||
},
|
],
|
||||||
],
|
loading: false,
|
||||||
loading: false,
|
});
|
||||||
});
|
|
||||||
|
|
||||||
function onApply(orderId) {
|
const status2 = {
|
||||||
uni.showModal({
|
10: '仅退款',
|
||||||
title: '提示',
|
20: '退货退款'
|
||||||
content: '确定要取消此申请吗?',
|
}
|
||||||
success: async function (res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
const { error } = await sheep.$api.order.aftersale.cancel(orderId);
|
|
||||||
if (error === 0) {
|
|
||||||
getDetail(state.aftersaleId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function onDelete(orderId) {
|
function onApply(orderId) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定要删除吗?',
|
content: '确定要取消此申请吗?',
|
||||||
success: async function (res) {
|
success: async function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
const { error } = await sheep.$api.order.aftersale.delete(orderId);
|
const {
|
||||||
if (error === 0) {
|
error
|
||||||
sheep.$router.back();
|
} = await sheep.$api.order.aftersale.cancel(orderId);
|
||||||
}
|
if (error === 0) {
|
||||||
}
|
getDetail(state.aftersaleId);
|
||||||
},
|
}
|
||||||
});
|
}
|
||||||
}
|
},
|
||||||
const onCopy = () => {
|
});
|
||||||
sheep.$helper.copyText(state.info.aftersale_sn);
|
}
|
||||||
};
|
|
||||||
async function getDetail(id) {
|
function onDelete(orderId) {
|
||||||
const { error, data } = await sheep.$api.order.aftersale.detail(id);
|
uni.showModal({
|
||||||
state.loading = true;
|
title: '提示',
|
||||||
if (error === 0) {
|
content: '确定要删除吗?',
|
||||||
state.info = data;
|
success: async function(res) {
|
||||||
if (state.info.aftersale_status === -2 || state.info.aftersale_status === -1) {
|
if (res.confirm) {
|
||||||
state.list.push({ title: state.info.aftersale_status_text });
|
const {
|
||||||
state.active = 2;
|
error
|
||||||
} else {
|
} = await sheep.$api.order.aftersale.delete(orderId);
|
||||||
state.list.push({ title: '完成' });
|
if (error === 0) {
|
||||||
state.active = state.info.aftersale_status;
|
sheep.$router.back();
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
state.info = null;
|
},
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
onLoad((options) => {
|
const onCopy = () => {
|
||||||
state.aftersaleId = options.id;
|
sheep.$helper.copyText(state.info.aftersale_sn);
|
||||||
getDetail(options.id);
|
};
|
||||||
});
|
async function getDetail(id) {
|
||||||
|
const {
|
||||||
|
code,
|
||||||
|
data
|
||||||
|
} = await sheep.$api.order.aftersale.detail(id);
|
||||||
|
state.loading = true;
|
||||||
|
if (code === 0) {
|
||||||
|
state.info = data;
|
||||||
|
if (state.info.aftersale_status === -2 || state.info.aftersale_status === -1) {
|
||||||
|
state.list.push({
|
||||||
|
title: state.info.aftersale_status_text
|
||||||
|
});
|
||||||
|
state.active = 2;
|
||||||
|
} else {
|
||||||
|
state.list.push({
|
||||||
|
title: '完成'
|
||||||
|
});
|
||||||
|
state.active = state.info.aftersale_status;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
state.info = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onLoad((options) => {
|
||||||
|
state.aftersaleId = options.id;
|
||||||
|
getDetail(options.id);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 步骤条
|
// 步骤条
|
||||||
.steps-box {
|
.steps-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 190rpx;
|
height: 190rpx;
|
||||||
background: v-bind(headerBg) no-repeat,
|
background: v-bind(headerBg) no-repeat,
|
||||||
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
|
||||||
background-size: 750rpx 100%;
|
background-size: 750rpx 100%;
|
||||||
padding-left: 72rpx;
|
padding-left: 72rpx;
|
||||||
|
|
||||||
.steps-item {
|
.steps-item {
|
||||||
.sicon-circleclose {
|
.sicon-circleclose {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.sicon-circlecheck {
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
.steps-item-title {
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-weight: 400;
|
|
||||||
margin-top: 16rpx;
|
|
||||||
margin-left: -36rpx;
|
|
||||||
width: 100rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.activity-color {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.info-color {
|
|
||||||
color: rgba(#fff, 0.4);
|
|
||||||
}
|
|
||||||
.activity-bg {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.info-bg {
|
|
||||||
background: rgba(#fff, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.line {
|
.sicon-circlecheck {
|
||||||
width: 270rpx;
|
font-size: 24rpx;
|
||||||
height: 4rpx;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 服务状态
|
.steps-item-title {
|
||||||
.status-box {
|
font-size: 24rpx;
|
||||||
position: relative;
|
font-weight: 400;
|
||||||
z-index: 3;
|
margin-top: 16rpx;
|
||||||
background-color: #fff;
|
margin-left: -36rpx;
|
||||||
border-radius: 20rpx 20rpx 0px 0px;
|
width: 100rpx;
|
||||||
padding: 20rpx;
|
text-align: center;
|
||||||
margin-top: -20rpx;
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.status-text {
|
.activity-color {
|
||||||
font-size: 28rpx;
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
font-weight: 500;
|
.info-color {
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(#fff, 0.4);
|
||||||
margin-bottom: 20rpx;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.status-time {
|
.activity-bg {
|
||||||
font-size: 24rpx;
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
font-weight: 400;
|
.info-bg {
|
||||||
color: rgba(153, 153, 153, 1);
|
background: rgba(#fff, 0.4);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 退款金额
|
.line {
|
||||||
.aftersale-money {
|
width: 270rpx;
|
||||||
background-color: #fff;
|
height: 4rpx;
|
||||||
height: 98rpx;
|
}
|
||||||
padding: 0 20rpx;
|
|
||||||
margin: 20rpx;
|
|
||||||
|
|
||||||
.aftersale-money--title {
|
// 服务状态
|
||||||
font-size: 28rpx;
|
.status-box {
|
||||||
|
position: relative;
|
||||||
|
z-index: 3;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 20rpx 20rpx 0px 0px;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-top: -20rpx;
|
||||||
|
|
||||||
font-weight: 500;
|
.status-text {
|
||||||
color: rgba(51, 51, 51, 1);
|
font-size: 28rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.aftersale-money--num {
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
color: rgba(51, 51, 51, 1);
|
||||||
font-family: OPPOSANS;
|
margin-bottom: 20rpx;
|
||||||
font-weight: 500;
|
}
|
||||||
color: #ff3000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// order-shop
|
.status-time {
|
||||||
.order-shop {
|
font-size: 24rpx;
|
||||||
padding: 20rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
margin: 0 20rpx 20rpx 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 服务内容
|
font-weight: 400;
|
||||||
.aftersale-content {
|
color: rgba(153, 153, 153, 1);
|
||||||
background-color: #fff;
|
}
|
||||||
padding: 20rpx;
|
}
|
||||||
margin: 0 20rpx;
|
|
||||||
|
|
||||||
.aftersale-item {
|
// 退款金额
|
||||||
height: 60rpx;
|
.aftersale-money {
|
||||||
|
background-color: #fff;
|
||||||
|
height: 98rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin: 20rpx;
|
||||||
|
|
||||||
.copy-btn {
|
.aftersale-money--title {
|
||||||
background: #eeeeee;
|
font-size: 28rpx;
|
||||||
color: #333;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
width: 75rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
font-size: 22rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-title {
|
font-weight: 500;
|
||||||
color: #999;
|
color: rgba(51, 51, 51, 1);
|
||||||
font-size: 28rpx;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.item-content {
|
.aftersale-money--num {
|
||||||
color: #333;
|
font-size: 28rpx;
|
||||||
font-size: 28rpx;
|
font-family: OPPOSANS;
|
||||||
}
|
font-weight: 500;
|
||||||
}
|
color: #ff3000;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 底部功能
|
// order-shop
|
||||||
.foot_box {
|
.order-shop {
|
||||||
height: 100rpx;
|
padding: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
margin: 0 20rpx 20rpx 20rpx;
|
||||||
align-items: center;
|
}
|
||||||
justify-content: flex-end;
|
|
||||||
|
|
||||||
.btn {
|
// 服务内容
|
||||||
width: 160rpx;
|
.aftersale-content {
|
||||||
line-height: 60rpx;
|
background-color: #fff;
|
||||||
background: rgba(238, 238, 238, 1);
|
padding: 20rpx;
|
||||||
border-radius: 30rpx;
|
margin: 0 20rpx;
|
||||||
padding: 0;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
|
|
||||||
font-weight: 400;
|
.aftersale-item {
|
||||||
color: rgba(51, 51, 51, 1);
|
height: 60rpx;
|
||||||
}
|
|
||||||
}
|
.copy-btn {
|
||||||
|
background: #eeeeee;
|
||||||
|
color: #333;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
width: 75rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-title {
|
||||||
|
color: #999;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-content {
|
||||||
|
color: #333;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 底部功能
|
||||||
|
.foot_box {
|
||||||
|
height: 100rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 160rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
background: rgba(238, 238, 238, 1);
|
||||||
|
border-radius: 30rpx;
|
||||||
|
padding: 0;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
|
||||||
|
font-weight: 400;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,235 +1,238 @@
|
||||||
<!-- 售后列表 -->
|
<!-- 售后列表 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="售后列表">
|
<s-layout title="售后列表">
|
||||||
<!-- tab -->
|
<!-- tab -->
|
||||||
<su-sticky bgColor="#fff">
|
<su-sticky bgColor="#fff">
|
||||||
<su-tabs
|
<su-tabs :list="tabMaps" :scrollable="false" @change="onTabsChange" :current="state.currentTab"></su-tabs>
|
||||||
:list="tabMaps"
|
</su-sticky>
|
||||||
:scrollable="false"
|
<s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无数据">
|
||||||
@change="onTabsChange"
|
</s-empty>
|
||||||
:current="state.currentTab"
|
<!-- 列表 -->
|
||||||
></su-tabs>
|
<view v-if="state.pagination.total > 0">
|
||||||
</su-sticky>
|
<view class="list-box ss-m-y-20" v-for="order in state.pagination.data" :key="order.id"
|
||||||
<s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无数据">
|
@tap="sheep.$router.go('/pages/order/aftersale/detail', { id: order.id })">
|
||||||
</s-empty>
|
<view class="order-head ss-flex ss-col-center ss-row-between">
|
||||||
<!-- 列表 -->
|
<text class="no">服务单号:{{ order.no }}</text>
|
||||||
<view v-if="state.pagination.total > 0">
|
<text class="state">{{ status[order.status] }}</text>
|
||||||
<view
|
</view>
|
||||||
class="list-box ss-m-y-20"
|
<s-goods-item :img="order.picUrl" :title="order.spuName"
|
||||||
v-for="order in state.pagination.data"
|
:skuText="order.properties.reduce((a,b)=>a+b.valueName+' ','')" :price="order.refundPrice/100"
|
||||||
:key="order.id"
|
:num="order.count"></s-goods-item>
|
||||||
@tap="sheep.$router.go('/pages/order/aftersale/detail', { id: order.id })"
|
<view class="apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20">
|
||||||
>
|
<view class="ss-flex ss-col-center">
|
||||||
<view class="order-head ss-flex ss-col-center ss-row-between">
|
<!-- 此处需修改 -->
|
||||||
<text class="no">服务单号:{{ order.aftersale_sn }}</text>
|
<view class="title ss-m-r-20">{{ status2[order.way] }}</view>
|
||||||
<text class="state">{{ order.aftersale_status_text }}</text>
|
<!-- <view class="value">{{ order.aftersale_status_desc }}</view> -->
|
||||||
</view>
|
<view class="value">{{ order.applyReason }}</view>
|
||||||
<s-goods-item
|
</view>
|
||||||
:img="order.goods_image"
|
<text class="_icon-forward"></text>
|
||||||
:title="order.goods_title"
|
</view>
|
||||||
:skuText="order.goods_sku_text"
|
<!-- <view class="tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20">
|
||||||
:price="order.goods_price"
|
<view>
|
||||||
:num="order.goods_num"
|
<button class="ss-reset-button tool-btn" @tap.stop="onApply(order.id)"
|
||||||
></s-goods-item>
|
v-if="order.btns.includes('cancel')">取消申请</button>
|
||||||
<view class="apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20">
|
</view>
|
||||||
<view class="ss-flex ss-col-center">
|
<view>
|
||||||
<view class="title ss-m-r-20">{{ order.type_text }}</view>
|
<button class="ss-reset-button tool-btn" @tap.stop="onDelete(order.id)"
|
||||||
<view class="value">{{ order.aftersale_status_desc }}</view>
|
v-if="order.btns.includes('delete')">删除</button>
|
||||||
</view>
|
</view>
|
||||||
<text class="_icon-forward"></text>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20">
|
</view>
|
||||||
<view>
|
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
|
||||||
<button
|
|
||||||
class="ss-reset-button tool-btn"
|
|
||||||
@tap.stop="onApply(order.id)"
|
|
||||||
v-if="order.btns.includes('cancel')"
|
|
||||||
>取消申请</button
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<button
|
|
||||||
class="ss-reset-button tool-btn"
|
|
||||||
@tap.stop="onDelete(order.id)"
|
|
||||||
v-if="order.btns.includes('delete')"
|
|
||||||
>删除</button
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<uni-load-more
|
|
||||||
v-if="state.pagination.total > 0"
|
|
||||||
:status="state.loadStatus"
|
|
||||||
:content-text="{
|
|
||||||
contentdown: '上拉加载更多',
|
contentdown: '上拉加载更多',
|
||||||
}"
|
}" @tap="loadmore" />
|
||||||
@tap="loadmore"
|
</s-layout>
|
||||||
/>
|
|
||||||
</s-layout>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import {
|
||||||
import { computed, reactive } from 'vue';
|
onLoad,
|
||||||
import _ from 'lodash';
|
onReachBottom
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
computed,
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
data: [],
|
data: [],
|
||||||
current_page: 1,
|
current_page: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
last_page: 1,
|
last_page: 1,
|
||||||
};
|
};
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
currentTab: 0,
|
currentTab: 0,
|
||||||
showApply: false,
|
showApply: false,
|
||||||
pagination: {
|
pagination: {
|
||||||
data: [],
|
data: [],
|
||||||
current_page: 1,
|
current_page: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
last_page: 1,
|
last_page: 1,
|
||||||
},
|
},
|
||||||
loadStatus: '',
|
loadStatus: '',
|
||||||
});
|
});
|
||||||
|
// 字典需要登录 尚未接入 先用固定值代替
|
||||||
|
const status = {
|
||||||
|
10: '申请售后',
|
||||||
|
20: '商品待退货',
|
||||||
|
30: '商家待收货',
|
||||||
|
40: '等待退款',
|
||||||
|
50: '退款成功',
|
||||||
|
61: '买家取消',
|
||||||
|
62: '商家拒绝',
|
||||||
|
63: '商家拒收货'
|
||||||
|
}
|
||||||
|
const status2 = {
|
||||||
|
10: '仅退款',
|
||||||
|
20: '退货退款'
|
||||||
|
}
|
||||||
|
const tabMaps = [{
|
||||||
|
name: '全部',
|
||||||
|
value: 'all',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// name: '申请中',
|
||||||
|
// value: 'nooper',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: '处理中',
|
||||||
|
// value: 'ing',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: '已完成',
|
||||||
|
// value: 'completed',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: '已拒绝',
|
||||||
|
// value: 'refuse',
|
||||||
|
// },
|
||||||
|
];
|
||||||
|
// 切换选项卡
|
||||||
|
function onTabsChange(e) {
|
||||||
|
state.pagination = pagination
|
||||||
|
state.currentTab = e.index;
|
||||||
|
getOrderList();
|
||||||
|
}
|
||||||
|
|
||||||
const tabMaps = [
|
// 获取售后列表
|
||||||
{
|
async function getOrderList(page = 1, list_rows = 5) {
|
||||||
name: '全部',
|
pagination.current_page = page;
|
||||||
value: 'all',
|
state.loadStatus = 'loading';
|
||||||
},
|
let res = await sheep.$api.order.aftersale.list({
|
||||||
{
|
// type: tabMaps[state.currentTab].value,
|
||||||
name: '申请中',
|
pageSize: list_rows,
|
||||||
value: 'nooper',
|
pageNo: page,
|
||||||
},
|
});
|
||||||
{
|
console.log(res, '未处理前售后列表数据')
|
||||||
name: '处理中',
|
if (res.code === 0) {
|
||||||
value: 'ing',
|
let orderList = _.concat(state.pagination.data, res.data.list);
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '已完成',
|
|
||||||
value: 'completed',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '已拒绝',
|
|
||||||
value: 'refuse',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
// 切换选项卡
|
|
||||||
function onTabsChange(e) {
|
|
||||||
state.pagination = pagination
|
|
||||||
state.currentTab = e.index;
|
|
||||||
getOrderList();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取售后列表
|
state.pagination = {
|
||||||
async function getOrderList(page = 1, list_rows = 5) {
|
total: res.data.total,
|
||||||
state.loadStatus = 'loading';
|
...res.data,
|
||||||
let res = await sheep.$api.order.aftersale.list({
|
data: orderList,
|
||||||
type: tabMaps[state.currentTab].value,
|
};
|
||||||
list_rows,
|
console.log(state.pagination, '售后订单数据')
|
||||||
page,
|
// if (state.pagination.current_page < state.pagination.last_page) {
|
||||||
});
|
state.loadStatus = 'more';
|
||||||
if (res.error === 0) {
|
// } else {
|
||||||
let orderList = _.concat(state.pagination.data, res.data.data);
|
// state.loadStatus = 'noMore';
|
||||||
state.pagination = {
|
// }
|
||||||
...res.data,
|
}
|
||||||
data: orderList,
|
}
|
||||||
};
|
|
||||||
|
|
||||||
if (state.pagination.current_page < state.pagination.last_page) {
|
function onApply(orderId) {
|
||||||
state.loadStatus = 'more';
|
uni.showModal({
|
||||||
} else {
|
title: '提示',
|
||||||
state.loadStatus = 'noMore';
|
content: '确定要取消此申请吗?',
|
||||||
}
|
success: async function(res) {
|
||||||
}
|
if (res.confirm) {
|
||||||
}
|
const {
|
||||||
|
error
|
||||||
|
} = await sheep.$api.order.aftersale.cancel(orderId);
|
||||||
|
if (error === 0) {
|
||||||
|
state.pagination = pagination
|
||||||
|
getOrderList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function onApply(orderId) {
|
function onDelete(orderId) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定要取消此申请吗?',
|
content: '确定要删除吗?',
|
||||||
success: async function (res) {
|
success: async function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
const { error } = await sheep.$api.order.aftersale.cancel(orderId);
|
const {
|
||||||
if (error === 0) {
|
error
|
||||||
state.pagination = pagination
|
} = await sheep.$api.order.aftersale.delete(orderId);
|
||||||
getOrderList();
|
if (error === 0) {
|
||||||
}
|
state.pagination = pagination
|
||||||
}
|
getOrderList();
|
||||||
},
|
}
|
||||||
});
|
}
|
||||||
}
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function onDelete(orderId) {
|
onLoad(async (options) => {
|
||||||
uni.showModal({
|
if (options.type) {
|
||||||
title: '提示',
|
state.currentTab = options.type;
|
||||||
content: '确定要删除吗?',
|
}
|
||||||
success: async function (res) {
|
getOrderList();
|
||||||
if (res.confirm) {
|
});
|
||||||
const { error } = await sheep.$api.order.aftersale.delete(orderId);
|
|
||||||
if (error === 0) {
|
|
||||||
state.pagination = pagination
|
|
||||||
getOrderList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onLoad(async (options) => {
|
// 加载更多
|
||||||
if (options.type) {
|
function loadmore() {
|
||||||
state.currentTab = options.type;
|
// if (state.loadStatus !== 'noMore') {
|
||||||
}
|
getOrderList(pagination.current_page + 1);
|
||||||
getOrderList();
|
// }
|
||||||
});
|
}
|
||||||
|
|
||||||
// 加载更多
|
// 上拉加载更多
|
||||||
function loadmore() {
|
onReachBottom(() => {
|
||||||
if (state.loadStatus !== 'noMore') {
|
loadmore();
|
||||||
getOrderList(state.pagination.current_page + 1);
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 上拉加载更多
|
|
||||||
onReachBottom(() => {
|
|
||||||
loadmore();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.list-box {
|
.list-box {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.order-head {
|
.order-head {
|
||||||
padding: 0 25rpx;
|
padding: 0 25rpx;
|
||||||
height: 77rpx;
|
height: 77rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.apply-box {
|
.apply-box {
|
||||||
height: 82rpx;
|
height: 82rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: $dark-6;
|
color: $dark-6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-btn-box {
|
.tool-btn-box {
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
|
||||||
.tool-btn {
|
.tool-btn {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,281 +1,279 @@
|
||||||
<!-- 页面 -->
|
<!-- 页面 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout class="wallet-wrap" title="我的积分" navbar="inner">
|
<s-layout class="wallet-wrap" title="我的积分" navbar="inner">
|
||||||
<view
|
<view class="header-box ss-flex ss-flex-col ss-row-center ss-col-center" :style="[
|
||||||
class="header-box ss-flex ss-flex-col ss-row-center ss-col-center"
|
|
||||||
:style="[
|
|
||||||
{
|
{
|
||||||
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
||||||
paddingTop: Number(statusBarHeight + 88) + 'rpx',
|
paddingTop: Number(statusBarHeight + 88) + 'rpx',
|
||||||
},
|
},
|
||||||
]"
|
]">
|
||||||
>
|
<view class="header-bg">
|
||||||
<view class="header-bg"><view class="bg"></view></view>
|
<view class="bg"></view>
|
||||||
<view class="score-box ss-flex-col ss-row-center ss-col-center">
|
</view>
|
||||||
<view class="ss-m-b-30">
|
<view class="score-box ss-flex-col ss-row-center ss-col-center">
|
||||||
<text class="all-title ss-m-r-8">当前积分</text>
|
<view class="ss-m-b-30">
|
||||||
<!-- <text class="cicon-help-o"></text> -->
|
<text class="all-title ss-m-r-8">当前积分</text>
|
||||||
</view>
|
<!-- <text class="cicon-help-o"></text> -->
|
||||||
<text class="all-num">{{ userInfo.score || 0 }}</text>
|
</view>
|
||||||
</view>
|
<text class="all-num">{{ userInfo.point || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- tab -->
|
</view>
|
||||||
<su-sticky :customNavHeight="sys_navBar">
|
<!-- tab -->
|
||||||
<!-- 统计 -->
|
<su-sticky :customNavHeight="sys_navBar">
|
||||||
<view class="filter-box ss-p-x-30 ss-flex ss-col-center ss-row-between">
|
<!-- 统计 -->
|
||||||
<uni-datetime-picker v-model="state.data" type="daterange" @change="onChangeTime" :end="state.today">
|
<!-- <view class="filter-box ss-p-x-30 ss-flex ss-col-center ss-row-between">
|
||||||
<button class="ss-reset-button date-btn">
|
<uni-datetime-picker v-model="state.data" type="daterange" @change="onChangeTime" :end="state.today">
|
||||||
<text>{{ dateFilterText }}</text>
|
<button class="ss-reset-button date-btn">
|
||||||
<text class="cicon-drop-down ss-seldate-icon"></text>
|
<text>{{ dateFilterText }}</text>
|
||||||
</button>
|
<text class="cicon-drop-down ss-seldate-icon"></text>
|
||||||
</uni-datetime-picker>
|
</button>
|
||||||
|
</uni-datetime-picker>
|
||||||
|
|
||||||
<view class="total-box">
|
<view class="total-box">
|
||||||
<view class="ss-m-b-10">总收入¥{{ state.pagination.income }}</view>
|
<view class="ss-m-b-10">总收入¥{{ state.pagination.income }}</view>
|
||||||
<view>总支出¥{{ -state.pagination.expense }}</view>
|
<view>总支出¥{{ -state.pagination.expense }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<su-tabs
|
<su-tabs :list="tabMaps" @change="onChange" :scrollable="false" :current="state.currentTab"></su-tabs>
|
||||||
:list="tabMaps"
|
</su-sticky>
|
||||||
@change="onChange"
|
<!-- list -->
|
||||||
:scrollable="false"
|
<view class="list-box">
|
||||||
:current="state.currentTab"
|
<view v-if="state.pagination.total > 0">
|
||||||
></su-tabs>
|
<view class="list-item ss-flex ss-col-center ss-row-between" v-for="item in state.pagination.data"
|
||||||
</su-sticky>
|
:key="item.id">
|
||||||
<!-- list -->
|
<view class="ss-flex-col">
|
||||||
<view class="list-box">
|
<view class="name">{{ item.title }}{{ item.description ? '-' + item.description : '' }}</view>
|
||||||
<view v-if="state.pagination.total > 0">
|
<view class="time">{{ sheep.$helper.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
||||||
<view
|
</view>
|
||||||
class="list-item ss-flex ss-col-center ss-row-between"
|
<view class="add" v-if="item.point > 0">+{{ parseInt(item.point) }}</view>
|
||||||
v-for="item in state.pagination.data"
|
<view class="minus" v-else>{{ parseInt(item.point) }}</view>
|
||||||
:key="item.id"
|
</view>
|
||||||
>
|
</view>
|
||||||
<view class="ss-flex-col">
|
<s-empty v-else text="暂无数据" icon="/static/data-empty.png" />
|
||||||
<view class="name">{{ item.event_text }}{{ item.memo ? '-' + item.memo : '' }}</view>
|
</view>
|
||||||
<view class="time">{{ item.create_time }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="add" v-if="item.amount > 0">+{{ parseInt(item.amount) }}</view>
|
|
||||||
<view class="minus" v-else>{{ parseInt(item.amount) }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<s-empty v-else text="暂无数据" icon="/static/data-empty.png" />
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<uni-load-more
|
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
|
||||||
v-if="state.pagination.total > 0"
|
|
||||||
:status="state.loadStatus"
|
|
||||||
:content-text="{
|
|
||||||
contentdown: '上拉加载更多',
|
contentdown: '上拉加载更多',
|
||||||
}"
|
}" @tap="onLoadMore" />
|
||||||
@tap="onLoadMore"
|
</s-layout>
|
||||||
/>
|
|
||||||
</s-layout>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import {
|
||||||
import { computed, reactive } from 'vue';
|
onLoad,
|
||||||
import _ from 'lodash';
|
onReachBottom
|
||||||
import dayjs from 'dayjs';
|
} from '@dcloudio/uni-app';
|
||||||
import { onPageScroll } from '@dcloudio/uni-app';
|
import {
|
||||||
onPageScroll(() => {});
|
computed,
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
|
import _ from 'lodash';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import {
|
||||||
|
onPageScroll
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
onPageScroll(() => {});
|
||||||
|
|
||||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
const sys_navBar = sheep.$platform.navbar;
|
const sys_navBar = sheep.$platform.navbar;
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
data: [],
|
data: [],
|
||||||
current_page: 1,
|
current_page: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
last_page: 1,
|
last_page: 1,
|
||||||
expense: 0,
|
expense: 0,
|
||||||
income: 0,
|
income: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
currentTab: 0,
|
currentTab: 0,
|
||||||
pagination,
|
pagination,
|
||||||
loadStatus: '',
|
loadStatus: '',
|
||||||
date: [],
|
date: [],
|
||||||
today:'',
|
today: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
const tabMaps = [
|
const tabMaps = [{
|
||||||
{
|
name: '全部',
|
||||||
name: '全部',
|
value: 'all',
|
||||||
value: 'all',
|
},
|
||||||
},
|
|
||||||
|
|
||||||
{
|
// {
|
||||||
name: '收入',
|
// name: '收入',
|
||||||
value: 'income',
|
// value: 'income',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '支出',
|
// name: '支出',
|
||||||
value: 'expense',
|
// value: 'expense',
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
const dateFilterText = computed(() => {
|
const dateFilterText = computed(() => {
|
||||||
if (state.date[0] === state.date[1]) {
|
if (state.date[0] === state.date[1]) {
|
||||||
return state.date[0];
|
return state.date[0];
|
||||||
} else {
|
} else {
|
||||||
return state.date.join('~');
|
return state.date.join('~');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getLogList(page = 1, list_rows = 8) {
|
async function getLogList(page = 1, list_rows = 8) {
|
||||||
state.loadStatus = 'loading';
|
pagination.current_page = page;
|
||||||
let res = await sheep.$api.user.wallet.log({
|
state.loadStatus = 'loading';
|
||||||
type: 'score',
|
let res = await sheep.$api.user.wallet.log2({
|
||||||
list_rows,
|
// type: 'score',
|
||||||
page,
|
pageSize: list_rows,
|
||||||
tab: tabMaps[state.currentTab].value,
|
pageNo: page,
|
||||||
date: appendTimeHMS(state.date),
|
// tab: tabMaps[state.currentTab].value,
|
||||||
});
|
// date: appendTimeHMS(state.date),
|
||||||
if (res.error === 0) {
|
});
|
||||||
let list = _.concat(state.pagination.data, res.data.list.data);
|
console.log(res, '优惠券列表')
|
||||||
state.pagination = {
|
if (res.code === 0) {
|
||||||
...res.data.list,
|
let list = _.concat(state.pagination.data, res.data.list);
|
||||||
data: list,
|
console.log(list, '处理后数据')
|
||||||
income: res.data.income,
|
state.pagination = {
|
||||||
expense: res.data.expense,
|
total: res.data.total,
|
||||||
};
|
...res.data.list,
|
||||||
if (state.pagination.current_page < state.pagination.last_page) {
|
data: list,
|
||||||
state.loadStatus = 'more';
|
// income: res.data.income,
|
||||||
} else {
|
// expense: res.data.expense,
|
||||||
state.loadStatus = 'noMore';
|
};
|
||||||
}
|
// if (state.pagination.current_page < state.pagination.last_page) {
|
||||||
}
|
state.loadStatus = 'more';
|
||||||
}
|
// } else {
|
||||||
onLoad(async (options) => {
|
// state.loadStatus = 'noMore';
|
||||||
state.today = dayjs().format('YYYY-MM-DD');
|
// }
|
||||||
state.date = [state.today, state.today];
|
}
|
||||||
getLogList();
|
}
|
||||||
});
|
onLoad(async (options) => {
|
||||||
|
state.today = dayjs().format('YYYY-MM-DD');
|
||||||
|
state.date = [state.today, state.today];
|
||||||
|
getLogList();
|
||||||
|
});
|
||||||
|
|
||||||
function onChange(e) {
|
function onChange(e) {
|
||||||
state.pagination = pagination;
|
state.pagination = pagination;
|
||||||
state.currentTab = e.index;
|
state.currentTab = e.index;
|
||||||
getLogList();
|
getLogList();
|
||||||
}
|
}
|
||||||
function onChangeTime(e) {
|
|
||||||
state.date[0] = e[0];
|
|
||||||
state.date[1] = e[e.length - 1];
|
|
||||||
state.pagination = pagination;
|
|
||||||
getLogList();
|
|
||||||
}
|
|
||||||
|
|
||||||
function appendTimeHMS(arr) {
|
function onChangeTime(e) {
|
||||||
return [arr[0] + ' 00:00:00', arr[1] + ' 23:59:59'];
|
state.date[0] = e[0];
|
||||||
}
|
state.date[1] = e[e.length - 1];
|
||||||
|
state.pagination = pagination;
|
||||||
|
getLogList();
|
||||||
|
}
|
||||||
|
|
||||||
function onLoadMore() {
|
function appendTimeHMS(arr) {
|
||||||
if (state.loadStatus !== 'noMore') {
|
return [arr[0] + ' 00:00:00', arr[1] + ' 23:59:59'];
|
||||||
getLogList(state.pagination.current_page + 1);
|
}
|
||||||
}
|
|
||||||
}
|
function onLoadMore() {
|
||||||
onReachBottom(() => {
|
// if (state.loadStatus !== 'noMore') {
|
||||||
onLoadMore();
|
getLogList(pagination.current_page + 1);
|
||||||
});
|
// }
|
||||||
|
}
|
||||||
|
onReachBottom(() => {
|
||||||
|
onLoadMore();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.header-box {
|
.header-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%)
|
background: linear-gradient(180deg, var(--ui-BG-Main) 0%, var(--ui-BG-Main-gradient) 100%) no-repeat;
|
||||||
no-repeat;
|
background-size: 750rpx 100%;
|
||||||
background-size: 750rpx 100%;
|
padding: 0 0 120rpx 0;
|
||||||
padding: 0 0 120rpx 0;
|
box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.score-box {
|
.score-box {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.all-num {
|
.all-num {
|
||||||
font-size: 50rpx;
|
font-size: 50rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: OPPOSANS;
|
font-family: OPPOSANS;
|
||||||
}
|
}
|
||||||
|
|
||||||
.all-title {
|
.all-title {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cicon-help-o {
|
.cicon-help-o {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 筛选
|
|
||||||
.filter-box {
|
|
||||||
height: 114rpx;
|
|
||||||
background-color: $bg-page;
|
|
||||||
|
|
||||||
.total-box {
|
// 筛选
|
||||||
font-size: 24rpx;
|
.filter-box {
|
||||||
font-weight: 500;
|
height: 114rpx;
|
||||||
color: $dark-9;
|
background-color: $bg-page;
|
||||||
}
|
|
||||||
|
|
||||||
.date-btn {
|
.total-box {
|
||||||
background-color: $white;
|
font-size: 24rpx;
|
||||||
line-height: 54rpx;
|
font-weight: 500;
|
||||||
border-radius: 27rpx;
|
color: $dark-9;
|
||||||
padding: 0 20rpx;
|
}
|
||||||
font-size: 24rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: $dark-6;
|
|
||||||
|
|
||||||
.ss-seldate-icon {
|
.date-btn {
|
||||||
font-size: 50rpx;
|
background-color: $white;
|
||||||
color: $dark-9;
|
line-height: 54rpx;
|
||||||
}
|
border-radius: 27rpx;
|
||||||
}
|
padding: 0 20rpx;
|
||||||
}
|
font-size: 24rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: $dark-6;
|
||||||
|
|
||||||
.list-box {
|
.ss-seldate-icon {
|
||||||
.list-item {
|
font-size: 50rpx;
|
||||||
background: #fff;
|
color: $dark-9;
|
||||||
border-bottom: 1rpx solid #dfdfdf;
|
}
|
||||||
padding: 30rpx;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.name {
|
.list-box {
|
||||||
font-size: 28rpx;
|
.list-item {
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 1rpx solid #dfdfdf;
|
||||||
|
padding: 30rpx;
|
||||||
|
|
||||||
font-weight: 500;
|
.name {
|
||||||
color: rgba(102, 102, 102, 1);
|
font-size: 28rpx;
|
||||||
line-height: 28rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.time {
|
font-weight: 500;
|
||||||
font-size: 24rpx;
|
color: rgba(102, 102, 102, 1);
|
||||||
|
line-height: 28rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
font-weight: 500;
|
.time {
|
||||||
color: rgba(196, 196, 196, 1);
|
font-size: 24rpx;
|
||||||
line-height: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add {
|
font-weight: 500;
|
||||||
font-size: 30rpx;
|
color: rgba(196, 196, 196, 1);
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
font-weight: 500;
|
.add {
|
||||||
color: #e6b873;
|
font-size: 30rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.minus {
|
font-weight: 500;
|
||||||
font-size: 30rpx;
|
color: #e6b873;
|
||||||
|
}
|
||||||
|
|
||||||
font-weight: 500;
|
.minus {
|
||||||
color: $dark-3;
|
font-size: 30rpx;
|
||||||
}
|
|
||||||
}
|
font-weight: 500;
|
||||||
}
|
color: $dark-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -147,14 +147,23 @@ export default {
|
||||||
data,
|
data,
|
||||||
}),
|
}),
|
||||||
list: (params) =>
|
list: (params) =>
|
||||||
request({
|
request2({
|
||||||
url: 'order/aftersale',
|
url: 'trade/after-sale/page',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params,
|
params,
|
||||||
custom: {
|
custom: {
|
||||||
showLoading: false,
|
showLoading: false,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
// list: (params) =>
|
||||||
|
// request({
|
||||||
|
// url: 'order/aftersale',
|
||||||
|
// method: 'GET',
|
||||||
|
// params,
|
||||||
|
// custom: {
|
||||||
|
// showLoading: false,
|
||||||
|
// },
|
||||||
|
// }),
|
||||||
//取消售后
|
//取消售后
|
||||||
cancel: (id) =>
|
cancel: (id) =>
|
||||||
request({
|
request({
|
||||||
|
|
@ -169,8 +178,8 @@ export default {
|
||||||
}),
|
}),
|
||||||
// 售后详情
|
// 售后详情
|
||||||
detail: (id) =>
|
detail: (id) =>
|
||||||
request({
|
request2({
|
||||||
url: 'order/aftersale/' + id,
|
url: 'trade/after-sale/get?id=' + id,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,15 @@ import request2 from '@/sheep/request2';
|
||||||
import $platform from '@/sheep/platform';
|
import $platform from '@/sheep/platform';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
getUnused: () =>
|
||||||
|
request2({
|
||||||
|
url: 'promotion/coupon/get-unused-count',
|
||||||
|
method: 'GET',
|
||||||
|
custom: {
|
||||||
|
showLoading: false,
|
||||||
|
auth: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
profile: () =>
|
profile: () =>
|
||||||
request2({
|
request2({
|
||||||
url: 'member/user/get',
|
url: 'member/user/get',
|
||||||
|
|
@ -375,11 +384,20 @@ export default {
|
||||||
wallet: {
|
wallet: {
|
||||||
log: (params) =>
|
log: (params) =>
|
||||||
request2({
|
request2({
|
||||||
|
// url: 'member/point/record/page',
|
||||||
url: 'pay/wallet-transaction/page',
|
url: 'pay/wallet-transaction/page',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params,
|
params,
|
||||||
custom: {},
|
custom: {},
|
||||||
}),
|
}),
|
||||||
|
log2: (params) =>
|
||||||
|
request2({
|
||||||
|
url: 'member/point/record/page',
|
||||||
|
// url: 'pay/wallet-transaction/page',
|
||||||
|
method: 'GET',
|
||||||
|
params,
|
||||||
|
custom: {},
|
||||||
|
}),
|
||||||
// log: (params) =>
|
// log: (params) =>
|
||||||
// request({
|
// request({
|
||||||
// url: '/user/api/walletLog',
|
// url: '/user/api/walletLog',
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,31 @@
|
||||||
<!-- 页面 -->
|
<!-- 页面 -->
|
||||||
<template>
|
<template>
|
||||||
<view class="ss-user-info-wrap ss-p-t-50">
|
<view class="ss-user-info-wrap ss-p-t-50">
|
||||||
<view class="ss-flex ss-col-center ss-row-between ss-m-b-20">
|
<view class="ss-flex ss-col-center ss-row-between ss-m-b-20">
|
||||||
<view class="left-box ss-flex ss-col-center ss-m-l-36">
|
<view class="left-box ss-flex ss-col-center ss-m-l-36">
|
||||||
<view class="avatar-box ss-m-r-24">
|
<view class="avatar-box ss-m-r-24">
|
||||||
<image
|
<image class="avatar-img" :src="
|
||||||
class="avatar-img"
|
|
||||||
:src="
|
|
||||||
isLogin
|
isLogin
|
||||||
? sheep.$url.cdn(userInfo.avatar)
|
? sheep.$url.cdn(userInfo.avatar)
|
||||||
: sheep.$url.static('/static/img/shop/default_avatar.png')
|
: sheep.$url.static('/static/img/shop/default_avatar.png')
|
||||||
"
|
" mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image>
|
||||||
mode="aspectFill"
|
</view>
|
||||||
@tap="sheep.$router.go('/pages/user/info')"
|
<view>
|
||||||
></image>
|
<view class="nickname-box ss-flex ss-col-center">
|
||||||
</view>
|
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
|
||||||
<view>
|
</view>
|
||||||
<view class="nickname-box ss-flex ss-col-center">
|
</view>
|
||||||
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
|
</view>
|
||||||
</view>
|
<view class="right-box ss-m-r-52">
|
||||||
</view>
|
<button class="ss-reset-button" @tap="showShareModal">
|
||||||
</view>
|
<text class="sicon-qrcode"></text>
|
||||||
<view class="right-box ss-m-r-52">
|
</button>
|
||||||
<button class="ss-reset-button" @tap="showShareModal">
|
</view>
|
||||||
<text class="sicon-qrcode"></text>
|
</view>
|
||||||
</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view
|
|
||||||
|
<!-- 提示绑定手机号 先隐藏 yudao 需要再修改 -->
|
||||||
|
<!-- <view
|
||||||
class="bind-mobile-box ss-flex ss-row-between ss-col-center"
|
class="bind-mobile-box ss-flex ss-row-between ss-col-center"
|
||||||
v-if="isLogin && !userInfo.verification?.mobile"
|
v-if="isLogin && !userInfo.verification?.mobile"
|
||||||
>
|
>
|
||||||
|
|
@ -37,129 +34,135 @@
|
||||||
<view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view>
|
<view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view>
|
||||||
</view>
|
</view>
|
||||||
<button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button>
|
<button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 用户卡片
|
* 用户卡片
|
||||||
*
|
*
|
||||||
* @property {Number} leftSpace - 容器左间距
|
* @property {Number} leftSpace - 容器左间距
|
||||||
* @property {Number} rightSpace - 容器右间距
|
* @property {Number} rightSpace - 容器右间距
|
||||||
*
|
*
|
||||||
* @property {String} avatar - 头像
|
* @property {String} avatar - 头像
|
||||||
* @property {String} nickname - 昵称
|
* @property {String} nickname - 昵称
|
||||||
* @property {String} vip - 等级
|
* @property {String} vip - 等级
|
||||||
* @property {String} collectNum - 收藏数
|
* @property {String} collectNum - 收藏数
|
||||||
* @property {String} likeNum - 点赞数
|
* @property {String} likeNum - 点赞数
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import { computed, reactive } from 'vue';
|
import {
|
||||||
import sheep from '@/sheep';
|
computed,
|
||||||
import { showShareModal, showAuthModal } from '@/sheep/hooks/useModal';
|
reactive
|
||||||
|
} from 'vue';
|
||||||
|
import sheep from '@/sheep';
|
||||||
|
import {
|
||||||
|
showShareModal,
|
||||||
|
showAuthModal
|
||||||
|
} from '@/sheep/hooks/useModal';
|
||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
console.log('用户信息',userInfo)
|
console.log('用户信息', userInfo)
|
||||||
|
|
||||||
// 是否登录
|
// 是否登录
|
||||||
const isLogin = computed(() => sheep.$store('user').isLogin);
|
const isLogin = computed(() => sheep.$store('user').isLogin);
|
||||||
// 接收参数
|
// 接收参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
background: {
|
background: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
// 头像
|
// 头像
|
||||||
avatar: {
|
avatar: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
nickname: {
|
nickname: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '请先登录',
|
default: '请先登录',
|
||||||
},
|
},
|
||||||
vip: {
|
vip: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: '1',
|
default: '1',
|
||||||
},
|
},
|
||||||
collectNum: {
|
collectNum: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: '1',
|
default: '1',
|
||||||
},
|
},
|
||||||
likeNum: {
|
likeNum: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: '1',
|
default: '1',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function onBind() {
|
function onBind() {
|
||||||
showAuthModal('changeMobile');
|
showAuthModal('changeMobile');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.ss-user-info-wrap {
|
.ss-user-info-wrap {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.avatar-box {
|
.avatar-box {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.avatar-img {
|
.avatar-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.nick-name {
|
.nick-name {
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vip-img {
|
.vip-img {
|
||||||
width: 30rpx;
|
width: 30rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sicon-qrcode {
|
.sicon-qrcode {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bind-mobile-box {
|
.bind-mobile-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 84rpx;
|
height: 84rpx;
|
||||||
padding: 0 34rpx 0 44rpx;
|
padding: 0 34rpx 0 44rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0px -8rpx 9rpx 0px rgba(#e0e0e0, 0.3);
|
box-shadow: 0px -8rpx 9rpx 0px rgba(#e0e0e0, 0.3);
|
||||||
|
|
||||||
.cicon-mobile-o {
|
.cicon-mobile-o {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #ff690d;
|
color: #ff690d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile-title {
|
.mobile-title {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #ff690d;
|
color: #ff690d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bind-btn {
|
.bind-btn {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
background: #ff6100;
|
background: #ff6100;
|
||||||
border-radius: 25rpx;
|
border-radius: 25rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,16 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="ss-wallet-menu-wrap ss-flex ss-col-center">
|
<view class="ss-wallet-menu-wrap ss-flex ss-col-center">
|
||||||
<view
|
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||||
class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
@tap="sheep.$router.go('/pages/user/wallet/money')">
|
||||||
@tap="sheep.$router.go('/pages/user/wallet/money')"
|
<view class="value-box ss-flex ss-col-bottom">
|
||||||
>
|
<view class="value-text ss-line-1">{{ userInfo.money }}</view>
|
||||||
<view class="value-box ss-flex ss-col-bottom">
|
<view class="unit-text ss-m-l-6">元</view>
|
||||||
<view class="value-text ss-line-1">{{ userInfo.money }}</view>
|
</view>
|
||||||
<view class="unit-text ss-m-l-6">元</view>
|
<view class="menu-title ss-m-t-28">账户余额</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-title ss-m-t-28">账户余额</view>
|
<!-- <view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||||
</view>
|
|
||||||
<!-- <view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
|
||||||
@tap="sheep.$router.go('/pages/user/wallet/commission')">
|
@tap="sheep.$router.go('/pages/user/wallet/commission')">
|
||||||
<view class="value-box ss-flex ss-col-bottom">
|
<view class="value-box ss-flex ss-col-bottom">
|
||||||
<view class="value-text">{{ userInfo?.commission || '0.00' }}</view>
|
<view class="value-text">{{ userInfo?.commission || '0.00' }}</view>
|
||||||
|
|
@ -18,93 +16,86 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-title ss-m-t-28">佣金</view>
|
<view class="menu-title ss-m-t-28">佣金</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view
|
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||||
class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
@tap="sheep.$router.go('/pages/user/wallet/score')">
|
||||||
@tap="sheep.$router.go('/pages/user/wallet/score')"
|
<view class="value-box ss-flex ss-col-bottom">
|
||||||
>
|
<view class="value-text">{{ userInfo.point }}</view>
|
||||||
<view class="value-box ss-flex ss-col-bottom">
|
<view class="unit-text ss-m-l-6">个</view>
|
||||||
<view class="value-text">{{ userInfo.score }}</view>
|
</view>
|
||||||
<view class="unit-text ss-m-l-6">个</view>
|
<view class="menu-title ss-m-t-28">积分</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-title ss-m-t-28">积分</view>
|
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center" @tap="
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
|
||||||
@tap="
|
|
||||||
sheep.$router.go('/pages/coupon/list', {
|
sheep.$router.go('/pages/coupon/list', {
|
||||||
type: 'geted',
|
type: 'geted',
|
||||||
})
|
})
|
||||||
"
|
">
|
||||||
>
|
<view class="value-box ss-flex ss-col-bottom">
|
||||||
<view class="value-box ss-flex ss-col-bottom">
|
<view class="value-text">{{ numData.coupons_num }}</view>
|
||||||
<view class="value-text">{{ numData.coupons_num }}</view>
|
<view class="unit-text ss-m-l-6">张</view>
|
||||||
<view class="unit-text ss-m-l-6">张</view>
|
</view>
|
||||||
</view>
|
<view class="menu-title ss-m-t-28">优惠券</view>
|
||||||
<view class="menu-title ss-m-t-28">优惠券</view>
|
</view>
|
||||||
</view>
|
<view class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
|
||||||
<view
|
@tap="sheep.$router.go('/pages/user/wallet/money')">
|
||||||
class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
|
<image class="item-icon" :src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')" mode="aspectFit">
|
||||||
@tap="sheep.$router.go('/pages/user/wallet/money')"
|
</image>
|
||||||
>
|
<view class="menu-title ss-m-t-30">我的钱包</view>
|
||||||
<image
|
</view>
|
||||||
class="item-icon"
|
</view>
|
||||||
:src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')"
|
|
||||||
mode="aspectFit"
|
|
||||||
>
|
|
||||||
</image>
|
|
||||||
<view class="menu-title ss-m-t-30">我的钱包</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
/**
|
/**
|
||||||
* 装修组件 - 订单菜单组
|
* 装修组件 - 订单菜单组
|
||||||
*/
|
*/
|
||||||
import { computed, ref } from 'vue';
|
import {
|
||||||
import sheep from '@/sheep';
|
computed,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
|
import sheep from '@/sheep';
|
||||||
|
|
||||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
const numData = computed(() => sheep.$store('user').numData);
|
const numData = computed(() => sheep.$store('user').numData);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.ss-wallet-menu-wrap {
|
.ss-wallet-menu-wrap {
|
||||||
.menu-wallet {
|
.menu-wallet {
|
||||||
width: 144rpx;
|
width: 144rpx;
|
||||||
}
|
}
|
||||||
.menu-item {
|
|
||||||
height: 160rpx;
|
|
||||||
|
|
||||||
.menu-title {
|
.menu-item {
|
||||||
font-size: 24rpx;
|
height: 160rpx;
|
||||||
line-height: 24rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-icon {
|
.menu-title {
|
||||||
width: 44rpx;
|
font-size: 24rpx;
|
||||||
height: 44rpx;
|
line-height: 24rpx;
|
||||||
}
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
.value-box {
|
.item-icon {
|
||||||
height: 50rpx;
|
width: 44rpx;
|
||||||
text-align: center;
|
height: 44rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.value-text {
|
.value-box {
|
||||||
font-size: 28rpx;
|
height: 50rpx;
|
||||||
color: #000000;
|
text-align: center;
|
||||||
line-height: 28rpx;
|
|
||||||
vertical-align: text-bottom;
|
|
||||||
font-family: OPPOSANS;
|
|
||||||
}
|
|
||||||
|
|
||||||
.unit-text {
|
.value-text {
|
||||||
font-size: 24rpx;
|
font-size: 28rpx;
|
||||||
color: #343434;
|
color: #000000;
|
||||||
line-height: 24rpx;
|
line-height: 28rpx;
|
||||||
}
|
vertical-align: text-bottom;
|
||||||
}
|
font-family: OPPOSANS;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
.unit-text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #343434;
|
||||||
|
line-height: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -56,6 +56,7 @@ const user = defineStore({
|
||||||
code,
|
code,
|
||||||
data
|
data
|
||||||
} = await userApi.profile();
|
} = await userApi.profile();
|
||||||
|
|
||||||
// 为了兼容 获取用户余额 可能还会用到其他参数
|
// 为了兼容 获取用户余额 可能还会用到其他参数
|
||||||
// 优惠券数量,积分数量 应该在这里
|
// 优惠券数量,积分数量 应该在这里
|
||||||
const {
|
const {
|
||||||
|
|
@ -85,9 +86,12 @@ const user = defineStore({
|
||||||
data
|
data
|
||||||
} = await userApi.data();
|
} = await userApi.data();
|
||||||
const data2 = await userApi.data2();
|
const data2 = await userApi.data2();
|
||||||
|
let data3 = await userApi.getUnused();
|
||||||
|
console.log(data3.data, '优惠券')
|
||||||
if (code === 0 && data2.code === 0) {
|
if (code === 0 && data2.code === 0) {
|
||||||
console.log('订单数据', data);
|
console.log('订单数据', data);
|
||||||
this.numData = {
|
this.numData = {
|
||||||
|
coupons_num: data3.data,
|
||||||
order_num: {
|
order_num: {
|
||||||
noget: data.deliveredCount,
|
noget: data.deliveredCount,
|
||||||
unpaid: data.unpaidCount,
|
unpaid: data.unpaidCount,
|
||||||
|
|
@ -149,9 +153,9 @@ const user = defineStore({
|
||||||
// 登录后设置全局分享参数
|
// 登录后设置全局分享参数
|
||||||
$share.getShareInfo();
|
$share.getShareInfo();
|
||||||
// 提醒绑定手机号
|
// 提醒绑定手机号
|
||||||
if (app().platform.bind_mobile && !this.userInfo.verification?.mobile) {
|
// if (app().platform.bind_mobile && !this.userInfo.verification?.mobile) {
|
||||||
showAuthModal('changeMobile');
|
// showAuthModal('changeMobile');
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 添加分享记录
|
// 添加分享记录
|
||||||
const shareLog = uni.getStorageSync('shareLog');
|
const shareLog = uni.getStorageSync('shareLog');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue