我的 优惠券和积分数据 积分列表 售后订单列表 售后订单详情 隐藏手机号绑定弹窗
parent
16a4fd21b1
commit
ef254d2d3c
|
|
@ -3,134 +3,111 @@
|
||||||
<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
|
<text class="sicon-circleclose" v-if="
|
||||||
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
|
|
||||||
class="steps-item-title"
|
|
||||||
:class="state.active >= index ? 'activity-color' : 'info-color'"
|
|
||||||
>{{ item.title }}</view
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</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="">
|
||||||
<view class="status-text">{{ state.info.aftersale_status_desc }}</view>
|
<view class="status-text">{{ state.info.aftersale_status_desc }}</view>
|
||||||
<view class="status-time">{{ state.info.update_time }}</view>
|
<view class="status-time">{{ state.info.update_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="ss-iconfont _icon-forward" style="color: #666"></text>
|
<text class="ss-iconfont _icon-forward" style="color: #666"></text>
|
||||||
</view>
|
</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"
|
|
||||||
:num="state.info.goods_num"
|
|
||||||
></s-goods-item>
|
|
||||||
</view>
|
</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">
|
||||||
|
{{ sheep.$helper.timeFormat(state.info.createTime, 'yyyy-mm-dd hh:MM:ss') }}
|
||||||
|
</view>
|
||||||
</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.type_text }}</view>
|
<view class="item-content">{{ status2[state.info.way] }}</view>
|
||||||
</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.reason }}</view>
|
<view class="item-content">{{ state.info.applyReason }}</view>
|
||||||
</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.content }}</view>
|
<view class="item-content">{{ state.info.applyDescription }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<s-empty
|
<s-empty v-if="isEmpty(state.info) && state.loading" icon="/static/order-empty.png" text="暂无该订单售后详情" />
|
||||||
v-if="isEmpty(state.info) && state.loading"
|
<!-- <su-fixed bottom placeholder bg="bg-white" v-if="!isEmpty(state.info)">
|
||||||
icon="/static/order-empty.png"
|
|
||||||
text="暂无该订单售后详情"
|
|
||||||
/>
|
|
||||||
<su-fixed bottom placeholder bg="bg-white" v-if="!isEmpty(state.info)">
|
|
||||||
<view class="foot_box">
|
<view class="foot_box">
|
||||||
<button
|
<button class="ss-reset-button btn" v-if="state.info.btns?.includes('cancel')"
|
||||||
class="ss-reset-button btn"
|
@tap="onApply(state.info.id)">取消申请</button>
|
||||||
v-if="state.info.btns?.includes('cancel')"
|
<button class="ss-reset-button btn" v-if="state.info.btns?.includes('delete')"
|
||||||
@tap="onApply(state.info.id)"
|
@tap="onDelete(state.info.id)">删除</button>
|
||||||
>取消申请</button
|
<button class="ss-reset-button contcat-btn btn"
|
||||||
>
|
@tap="sheep.$router.go('/pages/chat/index')">联系客服</button>
|
||||||
<!-- <button
|
|
||||||
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>
|
</view>
|
||||||
</su-fixed>
|
</su-fixed> -->
|
||||||
</s-layout>
|
</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');
|
||||||
|
|
@ -138,8 +115,7 @@
|
||||||
active: 0,
|
active: 0,
|
||||||
aftersaleId: 0,
|
aftersaleId: 0,
|
||||||
info: {},
|
info: {},
|
||||||
list: [
|
list: [{
|
||||||
{
|
|
||||||
title: '提交申请',
|
title: '提交申请',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -149,13 +125,20 @@
|
||||||
loading: false,
|
loading: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const status2 = {
|
||||||
|
10: '仅退款',
|
||||||
|
20: '退货退款'
|
||||||
|
}
|
||||||
|
|
||||||
function onApply(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.cancel(orderId);
|
const {
|
||||||
|
error
|
||||||
|
} = await sheep.$api.order.aftersale.cancel(orderId);
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
getDetail(state.aftersaleId);
|
getDetail(state.aftersaleId);
|
||||||
}
|
}
|
||||||
|
|
@ -168,9 +151,11 @@
|
||||||
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 {
|
||||||
|
error
|
||||||
|
} = await sheep.$api.order.aftersale.delete(orderId);
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
sheep.$router.back();
|
sheep.$router.back();
|
||||||
}
|
}
|
||||||
|
|
@ -182,15 +167,22 @@
|
||||||
sheep.$helper.copyText(state.info.aftersale_sn);
|
sheep.$helper.copyText(state.info.aftersale_sn);
|
||||||
};
|
};
|
||||||
async function getDetail(id) {
|
async function getDetail(id) {
|
||||||
const { error, data } = await sheep.$api.order.aftersale.detail(id);
|
const {
|
||||||
|
code,
|
||||||
|
data
|
||||||
|
} = await sheep.$api.order.aftersale.detail(id);
|
||||||
state.loading = true;
|
state.loading = true;
|
||||||
if (error === 0) {
|
if (code === 0) {
|
||||||
state.info = data;
|
state.info = data;
|
||||||
if (state.info.aftersale_status === -2 || state.info.aftersale_status === -1) {
|
if (state.info.aftersale_status === -2 || state.info.aftersale_status === -1) {
|
||||||
state.list.push({ title: state.info.aftersale_status_text });
|
state.list.push({
|
||||||
|
title: state.info.aftersale_status_text
|
||||||
|
});
|
||||||
state.active = 2;
|
state.active = 2;
|
||||||
} else {
|
} else {
|
||||||
state.list.push({ title: '完成' });
|
state.list.push({
|
||||||
|
title: '完成'
|
||||||
|
});
|
||||||
state.active = state.info.aftersale_status;
|
state.active = state.info.aftersale_status;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -218,9 +210,11 @@
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sicon-circlecheck {
|
.sicon-circlecheck {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.steps-item-title {
|
.steps-item-title {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
@ -231,15 +225,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-color {
|
.activity-color {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-color {
|
.info-color {
|
||||||
color: rgba(#fff, 0.4);
|
color: rgba(#fff, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-bg {
|
.activity-bg {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-bg {
|
.info-bg {
|
||||||
background: rgba(#fff, 0.4);
|
background: rgba(#fff, 0.4);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,76 +3,58 @@
|
||||||
<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"
|
|
||||||
:scrollable="false"
|
|
||||||
@change="onTabsChange"
|
|
||||||
:current="state.currentTab"
|
|
||||||
></su-tabs>
|
|
||||||
</su-sticky>
|
</su-sticky>
|
||||||
<s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无数据">
|
<s-empty v-if="state.pagination.total === 0" icon="/static/data-empty.png" text="暂无数据">
|
||||||
</s-empty>
|
</s-empty>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<view v-if="state.pagination.total > 0">
|
<view v-if="state.pagination.total > 0">
|
||||||
<view
|
<view class="list-box ss-m-y-20" v-for="order in state.pagination.data" :key="order.id"
|
||||||
class="list-box ss-m-y-20"
|
@tap="sheep.$router.go('/pages/order/aftersale/detail', { id: order.id })">
|
||||||
v-for="order in state.pagination.data"
|
|
||||||
:key="order.id"
|
|
||||||
@tap="sheep.$router.go('/pages/order/aftersale/detail', { id: order.id })"
|
|
||||||
>
|
|
||||||
<view class="order-head ss-flex ss-col-center ss-row-between">
|
<view class="order-head ss-flex ss-col-center ss-row-between">
|
||||||
<text class="no">服务单号:{{ order.aftersale_sn }}</text>
|
<text class="no">服务单号:{{ order.no }}</text>
|
||||||
<text class="state">{{ order.aftersale_status_text }}</text>
|
<text class="state">{{ status[order.status] }}</text>
|
||||||
</view>
|
</view>
|
||||||
<s-goods-item
|
<s-goods-item :img="order.picUrl" :title="order.spuName"
|
||||||
:img="order.goods_image"
|
:skuText="order.properties.reduce((a,b)=>a+b.valueName+' ','')" :price="order.refundPrice/100"
|
||||||
:title="order.goods_title"
|
:num="order.count"></s-goods-item>
|
||||||
:skuText="order.goods_sku_text"
|
|
||||||
:price="order.goods_price"
|
|
||||||
:num="order.goods_num"
|
|
||||||
></s-goods-item>
|
|
||||||
<view class="apply-box ss-flex ss-col-center ss-row-between border-bottom ss-p-x-20">
|
<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="ss-flex ss-col-center">
|
||||||
<view class="title ss-m-r-20">{{ order.type_text }}</view>
|
<!-- 此处需修改 -->
|
||||||
<view class="value">{{ order.aftersale_status_desc }}</view>
|
<view class="title ss-m-r-20">{{ status2[order.way] }}</view>
|
||||||
|
<!-- <view class="value">{{ order.aftersale_status_desc }}</view> -->
|
||||||
|
<view class="value">{{ order.applyReason }}</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="_icon-forward"></text>
|
<text class="_icon-forward"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20">
|
<!-- <view class="tool-btn-box ss-flex ss-col-center ss-row-right ss-p-r-20">
|
||||||
<view>
|
<view>
|
||||||
<button
|
<button class="ss-reset-button tool-btn" @tap.stop="onApply(order.id)"
|
||||||
class="ss-reset-button tool-btn"
|
v-if="order.btns.includes('cancel')">取消申请</button>
|
||||||
@tap.stop="onApply(order.id)"
|
|
||||||
v-if="order.btns.includes('cancel')"
|
|
||||||
>取消申请</button
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<button
|
<button class="ss-reset-button tool-btn" @tap.stop="onDelete(order.id)"
|
||||||
class="ss-reset-button tool-btn"
|
v-if="order.btns.includes('delete')">删除</button>
|
||||||
@tap.stop="onDelete(order.id)"
|
</view>
|
||||||
v-if="order.btns.includes('delete')"
|
</view> -->
|
||||||
>删除</button
|
|
||||||
>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
|
||||||
</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,
|
||||||
|
onReachBottom
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
computed,
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
|
|
@ -92,28 +74,41 @@
|
||||||
},
|
},
|
||||||
loadStatus: '',
|
loadStatus: '',
|
||||||
});
|
});
|
||||||
|
// 字典需要登录 尚未接入 先用固定值代替
|
||||||
const tabMaps = [
|
const status = {
|
||||||
{
|
10: '申请售后',
|
||||||
|
20: '商品待退货',
|
||||||
|
30: '商家待收货',
|
||||||
|
40: '等待退款',
|
||||||
|
50: '退款成功',
|
||||||
|
61: '买家取消',
|
||||||
|
62: '商家拒绝',
|
||||||
|
63: '商家拒收货'
|
||||||
|
}
|
||||||
|
const status2 = {
|
||||||
|
10: '仅退款',
|
||||||
|
20: '退货退款'
|
||||||
|
}
|
||||||
|
const tabMaps = [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
value: 'all',
|
value: 'all',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: '申请中',
|
// name: '申请中',
|
||||||
value: 'nooper',
|
// value: 'nooper',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '处理中',
|
// name: '处理中',
|
||||||
value: 'ing',
|
// value: 'ing',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '已完成',
|
// name: '已完成',
|
||||||
value: 'completed',
|
// value: 'completed',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '已拒绝',
|
// name: '已拒绝',
|
||||||
value: 'refuse',
|
// value: 'refuse',
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
// 切换选项卡
|
// 切换选项卡
|
||||||
function onTabsChange(e) {
|
function onTabsChange(e) {
|
||||||
|
|
@ -124,24 +119,28 @@
|
||||||
|
|
||||||
// 获取售后列表
|
// 获取售后列表
|
||||||
async function getOrderList(page = 1, list_rows = 5) {
|
async function getOrderList(page = 1, list_rows = 5) {
|
||||||
|
pagination.current_page = page;
|
||||||
state.loadStatus = 'loading';
|
state.loadStatus = 'loading';
|
||||||
let res = await sheep.$api.order.aftersale.list({
|
let res = await sheep.$api.order.aftersale.list({
|
||||||
type: tabMaps[state.currentTab].value,
|
// type: tabMaps[state.currentTab].value,
|
||||||
list_rows,
|
pageSize: list_rows,
|
||||||
page,
|
pageNo: page,
|
||||||
});
|
});
|
||||||
if (res.error === 0) {
|
console.log(res, '未处理前售后列表数据')
|
||||||
let orderList = _.concat(state.pagination.data, res.data.data);
|
if (res.code === 0) {
|
||||||
|
let orderList = _.concat(state.pagination.data, res.data.list);
|
||||||
|
|
||||||
state.pagination = {
|
state.pagination = {
|
||||||
|
total: res.data.total,
|
||||||
...res.data,
|
...res.data,
|
||||||
data: orderList,
|
data: orderList,
|
||||||
};
|
};
|
||||||
|
console.log(state.pagination, '售后订单数据')
|
||||||
if (state.pagination.current_page < state.pagination.last_page) {
|
// if (state.pagination.current_page < state.pagination.last_page) {
|
||||||
state.loadStatus = 'more';
|
state.loadStatus = 'more';
|
||||||
} else {
|
// } else {
|
||||||
state.loadStatus = 'noMore';
|
// state.loadStatus = 'noMore';
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -149,9 +148,11 @@
|
||||||
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 {
|
||||||
|
error
|
||||||
|
} = await sheep.$api.order.aftersale.cancel(orderId);
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
state.pagination = pagination
|
state.pagination = pagination
|
||||||
getOrderList();
|
getOrderList();
|
||||||
|
|
@ -165,9 +166,11 @@
|
||||||
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 {
|
||||||
|
error
|
||||||
|
} = await sheep.$api.order.aftersale.delete(orderId);
|
||||||
if (error === 0) {
|
if (error === 0) {
|
||||||
state.pagination = pagination
|
state.pagination = pagination
|
||||||
getOrderList();
|
getOrderList();
|
||||||
|
|
@ -186,9 +189,9 @@
|
||||||
|
|
||||||
// 加载更多
|
// 加载更多
|
||||||
function loadmore() {
|
function loadmore() {
|
||||||
if (state.loadStatus !== 'noMore') {
|
// if (state.loadStatus !== 'noMore') {
|
||||||
getOrderList(state.pagination.current_page + 1);
|
getOrderList(pagination.current_page + 1);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上拉加载更多
|
// 上拉加载更多
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,27 @@
|
||||||
<!-- 页面 -->
|
<!-- 页面 -->
|
||||||
<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>
|
||||||
<view class="score-box ss-flex-col ss-row-center ss-col-center">
|
<view class="score-box ss-flex-col ss-row-center ss-col-center">
|
||||||
<view class="ss-m-b-30">
|
<view class="ss-m-b-30">
|
||||||
<text class="all-title ss-m-r-8">当前积分</text>
|
<text class="all-title ss-m-r-8">当前积分</text>
|
||||||
<!-- <text class="cicon-help-o"></text> -->
|
<!-- <text class="cicon-help-o"></text> -->
|
||||||
</view>
|
</view>
|
||||||
<text class="all-num">{{ userInfo.score || 0 }}</text>
|
<text class="all-num">{{ userInfo.point || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- tab -->
|
<!-- tab -->
|
||||||
<su-sticky :customNavHeight="sys_navBar">
|
<su-sticky :customNavHeight="sys_navBar">
|
||||||
<!-- 统计 -->
|
<!-- 统计 -->
|
||||||
<view class="filter-box ss-p-x-30 ss-flex ss-col-center ss-row-between">
|
<!-- <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">
|
<uni-datetime-picker v-model="state.data" type="daterange" @change="onChangeTime" :end="state.today">
|
||||||
<button class="ss-reset-button date-btn">
|
<button class="ss-reset-button date-btn">
|
||||||
<text>{{ dateFilterText }}</text>
|
<text>{{ dateFilterText }}</text>
|
||||||
|
|
@ -34,51 +33,46 @@
|
||||||
<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"
|
|
||||||
@change="onChange"
|
|
||||||
:scrollable="false"
|
|
||||||
:current="state.currentTab"
|
|
||||||
></su-tabs>
|
|
||||||
</su-sticky>
|
</su-sticky>
|
||||||
<!-- list -->
|
<!-- list -->
|
||||||
<view class="list-box">
|
<view class="list-box">
|
||||||
<view v-if="state.pagination.total > 0">
|
<view v-if="state.pagination.total > 0">
|
||||||
<view
|
<view class="list-item ss-flex ss-col-center ss-row-between" v-for="item in state.pagination.data"
|
||||||
class="list-item ss-flex ss-col-center ss-row-between"
|
:key="item.id">
|
||||||
v-for="item in state.pagination.data"
|
|
||||||
:key="item.id"
|
|
||||||
>
|
|
||||||
<view class="ss-flex-col">
|
<view class="ss-flex-col">
|
||||||
<view class="name">{{ item.event_text }}{{ item.memo ? '-' + item.memo : '' }}</view>
|
<view class="name">{{ item.title }}{{ item.description ? '-' + item.description : '' }}</view>
|
||||||
<view class="time">{{ item.create_time }}</view>
|
<view class="time">{{ sheep.$helper.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="add" v-if="item.amount > 0">+{{ parseInt(item.amount) }}</view>
|
<view class="add" v-if="item.point > 0">+{{ parseInt(item.point) }}</view>
|
||||||
<view class="minus" v-else>{{ parseInt(item.amount) }}</view>
|
<view class="minus" v-else>{{ parseInt(item.point) }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<s-empty v-else text="暂无数据" icon="/static/data-empty.png" />
|
<s-empty v-else text="暂无数据" icon="/static/data-empty.png" />
|
||||||
</view>
|
</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,
|
||||||
|
onReachBottom
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import {
|
||||||
|
computed,
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { onPageScroll } from '@dcloudio/uni-app';
|
import {
|
||||||
|
onPageScroll
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
onPageScroll(() => {});
|
onPageScroll(() => {});
|
||||||
|
|
||||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||||
|
|
@ -99,23 +93,22 @@
|
||||||
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(() => {
|
||||||
|
|
@ -127,27 +120,31 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getLogList(page = 1, list_rows = 8) {
|
async function getLogList(page = 1, list_rows = 8) {
|
||||||
|
pagination.current_page = page;
|
||||||
state.loadStatus = 'loading';
|
state.loadStatus = 'loading';
|
||||||
let res = await sheep.$api.user.wallet.log({
|
let res = await sheep.$api.user.wallet.log2({
|
||||||
type: 'score',
|
// type: 'score',
|
||||||
list_rows,
|
pageSize: list_rows,
|
||||||
page,
|
pageNo: page,
|
||||||
tab: tabMaps[state.currentTab].value,
|
// tab: tabMaps[state.currentTab].value,
|
||||||
date: appendTimeHMS(state.date),
|
// date: appendTimeHMS(state.date),
|
||||||
});
|
});
|
||||||
if (res.error === 0) {
|
console.log(res, '优惠券列表')
|
||||||
let list = _.concat(state.pagination.data, res.data.list.data);
|
if (res.code === 0) {
|
||||||
|
let list = _.concat(state.pagination.data, res.data.list);
|
||||||
|
console.log(list, '处理后数据')
|
||||||
state.pagination = {
|
state.pagination = {
|
||||||
|
total: res.data.total,
|
||||||
...res.data.list,
|
...res.data.list,
|
||||||
data: list,
|
data: list,
|
||||||
income: res.data.income,
|
// income: res.data.income,
|
||||||
expense: res.data.expense,
|
// expense: res.data.expense,
|
||||||
};
|
};
|
||||||
if (state.pagination.current_page < state.pagination.last_page) {
|
// if (state.pagination.current_page < state.pagination.last_page) {
|
||||||
state.loadStatus = 'more';
|
state.loadStatus = 'more';
|
||||||
} else {
|
// } else {
|
||||||
state.loadStatus = 'noMore';
|
// state.loadStatus = 'noMore';
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onLoad(async (options) => {
|
onLoad(async (options) => {
|
||||||
|
|
@ -161,6 +158,7 @@
|
||||||
state.currentTab = e.index;
|
state.currentTab = e.index;
|
||||||
getLogList();
|
getLogList();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onChangeTime(e) {
|
function onChangeTime(e) {
|
||||||
state.date[0] = e[0];
|
state.date[0] = e[0];
|
||||||
state.date[1] = e[e.length - 1];
|
state.date[1] = e[e.length - 1];
|
||||||
|
|
@ -173,9 +171,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function onLoadMore() {
|
function onLoadMore() {
|
||||||
if (state.loadStatus !== 'noMore') {
|
// if (state.loadStatus !== 'noMore') {
|
||||||
getLogList(state.pagination.current_page + 1);
|
getLogList(pagination.current_page + 1);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
onLoadMore();
|
onLoadMore();
|
||||||
|
|
@ -185,8 +183,7 @@
|
||||||
<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;
|
||||||
|
|
@ -213,6 +210,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 筛选
|
// 筛选
|
||||||
.filter-box {
|
.filter-box {
|
||||||
height: 114rpx;
|
height: 114rpx;
|
||||||
|
|
|
||||||
|
|
@ -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',
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,11 @@
|
||||||
<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"
|
|
||||||
@tap="sheep.$router.go('/pages/user/info')"
|
|
||||||
></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="nickname-box ss-flex ss-col-center">
|
<view class="nickname-box ss-flex ss-col-center">
|
||||||
|
|
@ -28,7 +23,9 @@
|
||||||
</view>
|
</view>
|
||||||
</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,7 +34,7 @@
|
||||||
<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>
|
||||||
|
|
||||||
|
|
@ -56,13 +53,19 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import { computed, reactive } from 'vue';
|
import {
|
||||||
|
computed,
|
||||||
|
reactive
|
||||||
|
} from 'vue';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { showShareModal, showAuthModal } from '@/sheep/hooks/useModal';
|
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);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
<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-box ss-flex ss-col-bottom">
|
||||||
<view class="value-text ss-line-1">{{ userInfo.money }}</view>
|
<view class="value-text ss-line-1">{{ userInfo.money }}</view>
|
||||||
<view class="unit-text ss-m-l-6">元</view>
|
<view class="unit-text ss-m-l-6">元</view>
|
||||||
|
|
@ -18,39 +16,28 @@
|
||||||
</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-box ss-flex ss-col-bottom">
|
||||||
<view class="value-text">{{ userInfo.score }}</view>
|
<view class="value-text">{{ userInfo.point }}</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
|
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center" @tap="
|
||||||
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
|
<view class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
|
||||||
class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
|
@tap="sheep.$router.go('/pages/user/wallet/money')">
|
||||||
@tap="sheep.$router.go('/pages/user/wallet/money')"
|
<image class="item-icon" :src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')" mode="aspectFit">
|
||||||
>
|
|
||||||
<image
|
|
||||||
class="item-icon"
|
|
||||||
:src="sheep.$url.static('/static/img/shop/user/wallet_icon.png')"
|
|
||||||
mode="aspectFit"
|
|
||||||
>
|
|
||||||
</image>
|
</image>
|
||||||
<view class="menu-title ss-m-t-30">我的钱包</view>
|
<view class="menu-title ss-m-t-30">我的钱包</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -61,7 +48,10 @@
|
||||||
/**
|
/**
|
||||||
* 装修组件 - 订单菜单组
|
* 装修组件 - 订单菜单组
|
||||||
*/
|
*/
|
||||||
import { computed, ref } from 'vue';
|
import {
|
||||||
|
computed,
|
||||||
|
ref
|
||||||
|
} from 'vue';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
|
|
||||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||||
|
|
@ -73,6 +63,7 @@
|
||||||
.menu-wallet {
|
.menu-wallet {
|
||||||
width: 144rpx;
|
width: 144rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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