我的 优惠券和积分数据 积分列表 售后订单列表 售后订单详情 隐藏手机号绑定弹窗
This commit is contained in:
+13
-4
@@ -147,14 +147,23 @@ export default {
|
||||
data,
|
||||
}),
|
||||
list: (params) =>
|
||||
request({
|
||||
url: 'order/aftersale',
|
||||
request2({
|
||||
url: 'trade/after-sale/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
// list: (params) =>
|
||||
// request({
|
||||
// url: 'order/aftersale',
|
||||
// method: 'GET',
|
||||
// params,
|
||||
// custom: {
|
||||
// showLoading: false,
|
||||
// },
|
||||
// }),
|
||||
//取消售后
|
||||
cancel: (id) =>
|
||||
request({
|
||||
@@ -169,8 +178,8 @@ export default {
|
||||
}),
|
||||
// 售后详情
|
||||
detail: (id) =>
|
||||
request({
|
||||
url: 'order/aftersale/' + id,
|
||||
request2({
|
||||
url: 'trade/after-sale/get?id=' + id,
|
||||
method: 'GET',
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -3,6 +3,15 @@ import request2 from '@/sheep/request2';
|
||||
import $platform from '@/sheep/platform';
|
||||
|
||||
export default {
|
||||
getUnused: () =>
|
||||
request2({
|
||||
url: 'promotion/coupon/get-unused-count',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showLoading: false,
|
||||
auth: true,
|
||||
},
|
||||
}),
|
||||
profile: () =>
|
||||
request2({
|
||||
url: 'member/user/get',
|
||||
@@ -375,11 +384,20 @@ export default {
|
||||
wallet: {
|
||||
log: (params) =>
|
||||
request2({
|
||||
// url: 'member/point/record/page',
|
||||
url: 'pay/wallet-transaction/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {},
|
||||
}),
|
||||
log2: (params) =>
|
||||
request2({
|
||||
url: 'member/point/record/page',
|
||||
// url: 'pay/wallet-transaction/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {},
|
||||
}),
|
||||
// log: (params) =>
|
||||
// request({
|
||||
// url: '/user/api/walletLog',
|
||||
|
||||
@@ -1,34 +1,31 @@
|
||||
<!-- 页面 -->
|
||||
<template>
|
||||
<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="left-box ss-flex ss-col-center ss-m-l-36">
|
||||
<view class="avatar-box ss-m-r-24">
|
||||
<image
|
||||
class="avatar-img"
|
||||
:src="
|
||||
<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="left-box ss-flex ss-col-center ss-m-l-36">
|
||||
<view class="avatar-box ss-m-r-24">
|
||||
<image class="avatar-img" :src="
|
||||
isLogin
|
||||
? sheep.$url.cdn(userInfo.avatar)
|
||||
: sheep.$url.static('/static/img/shop/default_avatar.png')
|
||||
"
|
||||
mode="aspectFill"
|
||||
@tap="sheep.$router.go('/pages/user/info')"
|
||||
></image>
|
||||
</view>
|
||||
<view>
|
||||
<view class="nickname-box ss-flex ss-col-center">
|
||||
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-box ss-m-r-52">
|
||||
<button class="ss-reset-button" @tap="showShareModal">
|
||||
<text class="sicon-qrcode"></text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
" mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image>
|
||||
</view>
|
||||
<view>
|
||||
<view class="nickname-box ss-flex ss-col-center">
|
||||
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-box ss-m-r-52">
|
||||
<button class="ss-reset-button" @tap="showShareModal">
|
||||
<text class="sicon-qrcode"></text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
|
||||
<!-- 提示绑定手机号 先隐藏 yudao 需要再修改 -->
|
||||
<!-- <view
|
||||
class="bind-mobile-box ss-flex ss-row-between ss-col-center"
|
||||
v-if="isLogin && !userInfo.verification?.mobile"
|
||||
>
|
||||
@@ -37,129 +34,135 @@
|
||||
<view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view>
|
||||
</view>
|
||||
<button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
/**
|
||||
* 用户卡片
|
||||
*
|
||||
* @property {Number} leftSpace - 容器左间距
|
||||
* @property {Number} rightSpace - 容器右间距
|
||||
*
|
||||
* @property {String} avatar - 头像
|
||||
* @property {String} nickname - 昵称
|
||||
* @property {String} vip - 等级
|
||||
* @property {String} collectNum - 收藏数
|
||||
* @property {String} likeNum - 点赞数
|
||||
*
|
||||
*
|
||||
*/
|
||||
import { computed, reactive } from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
import { showShareModal, showAuthModal } from '@/sheep/hooks/useModal';
|
||||
/**
|
||||
* 用户卡片
|
||||
*
|
||||
* @property {Number} leftSpace - 容器左间距
|
||||
* @property {Number} rightSpace - 容器右间距
|
||||
*
|
||||
* @property {String} avatar - 头像
|
||||
* @property {String} nickname - 昵称
|
||||
* @property {String} vip - 等级
|
||||
* @property {String} collectNum - 收藏数
|
||||
* @property {String} likeNum - 点赞数
|
||||
*
|
||||
*
|
||||
*/
|
||||
import {
|
||||
computed,
|
||||
reactive
|
||||
} from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
import {
|
||||
showShareModal,
|
||||
showAuthModal
|
||||
} from '@/sheep/hooks/useModal';
|
||||
|
||||
// 用户信息
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
console.log('用户信息',userInfo)
|
||||
// 用户信息
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
console.log('用户信息', userInfo)
|
||||
|
||||
// 是否登录
|
||||
const isLogin = computed(() => sheep.$store('user').isLogin);
|
||||
// 接收参数
|
||||
const props = defineProps({
|
||||
background: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
// 头像
|
||||
avatar: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
nickname: {
|
||||
type: String,
|
||||
default: '请先登录',
|
||||
},
|
||||
vip: {
|
||||
type: [String, Number],
|
||||
default: '1',
|
||||
},
|
||||
collectNum: {
|
||||
type: [String, Number],
|
||||
default: '1',
|
||||
},
|
||||
likeNum: {
|
||||
type: [String, Number],
|
||||
default: '1',
|
||||
},
|
||||
});
|
||||
// 是否登录
|
||||
const isLogin = computed(() => sheep.$store('user').isLogin);
|
||||
// 接收参数
|
||||
const props = defineProps({
|
||||
background: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
// 头像
|
||||
avatar: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
nickname: {
|
||||
type: String,
|
||||
default: '请先登录',
|
||||
},
|
||||
vip: {
|
||||
type: [String, Number],
|
||||
default: '1',
|
||||
},
|
||||
collectNum: {
|
||||
type: [String, Number],
|
||||
default: '1',
|
||||
},
|
||||
likeNum: {
|
||||
type: [String, Number],
|
||||
default: '1',
|
||||
},
|
||||
});
|
||||
|
||||
function onBind() {
|
||||
showAuthModal('changeMobile');
|
||||
}
|
||||
function onBind() {
|
||||
showAuthModal('changeMobile');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ss-user-info-wrap {
|
||||
box-sizing: border-box;
|
||||
.ss-user-info-wrap {
|
||||
box-sizing: border-box;
|
||||
|
||||
.avatar-box {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
.avatar-box {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
|
||||
.avatar-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.avatar-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.nick-name {
|
||||
font-size: 34rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: normal;
|
||||
}
|
||||
.nick-name {
|
||||
font-size: 34rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.vip-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
.vip-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.sicon-qrcode {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
}
|
||||
.sicon-qrcode {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bind-mobile-box {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
padding: 0 34rpx 0 44rpx;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px -8rpx 9rpx 0px rgba(#e0e0e0, 0.3);
|
||||
.bind-mobile-box {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
padding: 0 34rpx 0 44rpx;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px -8rpx 9rpx 0px rgba(#e0e0e0, 0.3);
|
||||
|
||||
.cicon-mobile-o {
|
||||
font-size: 30rpx;
|
||||
color: #ff690d;
|
||||
}
|
||||
.cicon-mobile-o {
|
||||
font-size: 30rpx;
|
||||
color: #ff690d;
|
||||
}
|
||||
|
||||
.mobile-title {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #ff690d;
|
||||
}
|
||||
.mobile-title {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #ff690d;
|
||||
}
|
||||
|
||||
.bind-btn {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
background: #ff6100;
|
||||
border-radius: 25rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.bind-btn {
|
||||
width: 100rpx;
|
||||
height: 50rpx;
|
||||
background: #ff6100;
|
||||
border-radius: 25rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,16 +1,14 @@
|
||||
<template>
|
||||
<view class="ss-wallet-menu-wrap ss-flex ss-col-center">
|
||||
<view
|
||||
class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||
@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="unit-text ss-m-l-6">元</view>
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">账户余额</view>
|
||||
</view>
|
||||
<!-- <view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||
<view class="ss-wallet-menu-wrap ss-flex ss-col-center">
|
||||
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||
@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="unit-text ss-m-l-6">元</view>
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">账户余额</view>
|
||||
</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')">
|
||||
<view class="value-box ss-flex ss-col-bottom">
|
||||
<view class="value-text">{{ userInfo?.commission || '0.00' }}</view>
|
||||
@@ -18,93 +16,86 @@
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">佣金</view>
|
||||
</view> -->
|
||||
<view
|
||||
class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||
@tap="sheep.$router.go('/pages/user/wallet/score')"
|
||||
>
|
||||
<view class="value-box ss-flex ss-col-bottom">
|
||||
<view class="value-text">{{ userInfo.score }}</view>
|
||||
<view class="unit-text ss-m-l-6">个</view>
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">积分</view>
|
||||
</view>
|
||||
<view
|
||||
class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||
@tap="
|
||||
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center"
|
||||
@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="unit-text ss-m-l-6">个</view>
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">积分</view>
|
||||
</view>
|
||||
<view class="menu-item ss-flex-1 ss-flex-col ss-row-center ss-col-center" @tap="
|
||||
sheep.$router.go('/pages/coupon/list', {
|
||||
type: 'geted',
|
||||
})
|
||||
"
|
||||
>
|
||||
<view class="value-box ss-flex ss-col-bottom">
|
||||
<view class="value-text">{{ numData.coupons_num }}</view>
|
||||
<view class="unit-text ss-m-l-6">张</view>
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">优惠券</view>
|
||||
</view>
|
||||
<view
|
||||
class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
|
||||
@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>
|
||||
<view class="menu-title ss-m-t-30">我的钱包</view>
|
||||
</view>
|
||||
</view>
|
||||
">
|
||||
<view class="value-box ss-flex ss-col-bottom">
|
||||
<view class="value-text">{{ numData.coupons_num }}</view>
|
||||
<view class="unit-text ss-m-l-6">张</view>
|
||||
</view>
|
||||
<view class="menu-title ss-m-t-28">优惠券</view>
|
||||
</view>
|
||||
<view class="menu-item ss-flex-col ss-row-center ss-col-center menu-wallet"
|
||||
@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>
|
||||
<view class="menu-title ss-m-t-30">我的钱包</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
/**
|
||||
* 装修组件 - 订单菜单组
|
||||
*/
|
||||
import { computed, ref } from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
/**
|
||||
* 装修组件 - 订单菜单组
|
||||
*/
|
||||
import {
|
||||
computed,
|
||||
ref
|
||||
} from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const numData = computed(() => sheep.$store('user').numData);
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
const numData = computed(() => sheep.$store('user').numData);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ss-wallet-menu-wrap {
|
||||
.menu-wallet {
|
||||
width: 144rpx;
|
||||
}
|
||||
.menu-item {
|
||||
height: 160rpx;
|
||||
.ss-wallet-menu-wrap {
|
||||
.menu-wallet {
|
||||
width: 144rpx;
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.menu-item {
|
||||
height: 160rpx;
|
||||
|
||||
.item-icon {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
}
|
||||
.menu-title {
|
||||
font-size: 24rpx;
|
||||
line-height: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.value-box {
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
.item-icon {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
}
|
||||
|
||||
.value-text {
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
line-height: 28rpx;
|
||||
vertical-align: text-bottom;
|
||||
font-family: OPPOSANS;
|
||||
}
|
||||
.value-box {
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
|
||||
.unit-text {
|
||||
font-size: 24rpx;
|
||||
color: #343434;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.value-text {
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
line-height: 28rpx;
|
||||
vertical-align: text-bottom;
|
||||
font-family: OPPOSANS;
|
||||
}
|
||||
|
||||
.unit-text {
|
||||
font-size: 24rpx;
|
||||
color: #343434;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+8
-4
@@ -56,8 +56,9 @@ const user = defineStore({
|
||||
code,
|
||||
data
|
||||
} = await userApi.profile();
|
||||
|
||||
// 为了兼容 获取用户余额 可能还会用到其他参数
|
||||
// 优惠券数量,积分数量 应该在这里
|
||||
// 优惠券数量,积分数量 应该在这里
|
||||
const {
|
||||
code: code2,
|
||||
data: data2
|
||||
@@ -85,9 +86,12 @@ const user = defineStore({
|
||||
data
|
||||
} = await userApi.data();
|
||||
const data2 = await userApi.data2();
|
||||
let data3 = await userApi.getUnused();
|
||||
console.log(data3.data, '优惠券')
|
||||
if (code === 0 && data2.code === 0) {
|
||||
console.log('订单数据', data);
|
||||
this.numData = {
|
||||
coupons_num: data3.data,
|
||||
order_num: {
|
||||
noget: data.deliveredCount,
|
||||
unpaid: data.unpaidCount,
|
||||
@@ -149,9 +153,9 @@ const user = defineStore({
|
||||
// 登录后设置全局分享参数
|
||||
$share.getShareInfo();
|
||||
// 提醒绑定手机号
|
||||
if (app().platform.bind_mobile && !this.userInfo.verification?.mobile) {
|
||||
showAuthModal('changeMobile');
|
||||
}
|
||||
// if (app().platform.bind_mobile && !this.userInfo.verification?.mobile) {
|
||||
// showAuthModal('changeMobile');
|
||||
// }
|
||||
|
||||
// 添加分享记录
|
||||
const shareLog = uni.getStorageSync('shareLog');
|
||||
|
||||
Reference in New Issue
Block a user