init
This commit is contained in:
@@ -0,0 +1,661 @@
|
||||
<template>
|
||||
<s-pages title="我的收益">
|
||||
|
||||
<view class="pages">
|
||||
<!-- 1 -->
|
||||
<view class="section-1" :style="{ backgroundImage: 'url(' + $url + 'home/agency2.png' + ')' }">
|
||||
<view class="section1-content">
|
||||
<view class="date">{{ currentDate }}</view>
|
||||
<view class="title">今日收益(元)</view>
|
||||
<view class="num">{{ $fen2yuan(trendObj?.earnings || 0) }}</view>
|
||||
<view class="line" />
|
||||
<view class="flex align-center">
|
||||
<view class="title">未行权金额(元)</view>
|
||||
<view class="num2">{{ $fen2yuan(norelease || 0) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 2 -->
|
||||
<view class="section-2">
|
||||
<view class="title">收益趋势<text>(近7天)</text></view>
|
||||
<view class="wrap">
|
||||
<card_echart :options="chartOption" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 3 -->
|
||||
<view class="section-3">
|
||||
<view class="item" v-for="(item, i) in navList" :key="i">
|
||||
<view class="title" :class="navCur === i ? 'active' : ''" @click="changeNav(item, i)">{{ item.text
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 4 -->
|
||||
<view class="section-4">
|
||||
<view class="select-bar">
|
||||
<view class="left">
|
||||
<picker mode="date" fields="month" :value="date" @change="bindDateChange">
|
||||
<view class="selected-date">{{ currentMonth }} <text class="size18">▼</text></view>
|
||||
<view class="num">收益 ¥{{monthEarnings}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="bar" @click="select_show = !select_show" v-if="navCur === 2">
|
||||
{{ select_value }}
|
||||
<text class="size18">▼</text>
|
||||
</view>
|
||||
<view class="select-content" v-if="select_show">
|
||||
<view class="select-item" v-for="(item, index) in range" :key="index"
|
||||
@click="changeSelect(item, index)">
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="'540rpx'">
|
||||
<view class="item" v-for="(item, i) in infoArr" :key="i">
|
||||
<view class="left">
|
||||
<view class="title">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="date">{{ item.time }}</view>
|
||||
</view>
|
||||
<view class="right">{{ item.money }}</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
</view>
|
||||
</s-pages>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
getCurrentInstance,
|
||||
watch,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
import * as echarts from 'echarts';
|
||||
let {
|
||||
proxy
|
||||
} = getCurrentInstance();
|
||||
import * as api from '@/sheep/api/home/index';
|
||||
import * as api2 from '@/sheep/api/home/pay';
|
||||
import {
|
||||
formatDate,
|
||||
sourceTypeObj
|
||||
} from '@/sheep/helper/utils';
|
||||
import card_echart from '@/components/card_echart/card_echart.vue';
|
||||
import {
|
||||
fen2yuan
|
||||
} from '@/sheep/hooks/useGoods';
|
||||
let list = ref([]);
|
||||
let obj = ref({});
|
||||
let infoArr = ref([]);
|
||||
const chartRef = ref(null);
|
||||
const currentDate = ref('');
|
||||
const currentMonth = ref('');
|
||||
const currentMonth2 = ref('');
|
||||
let cardPages = ref(null);
|
||||
let height = ref('20rpx');
|
||||
const norelease = ref(0)
|
||||
const monthEarnings = ref(0)
|
||||
const date = ref()
|
||||
//navbar
|
||||
const navCur = ref(0)
|
||||
const navList = ref([{
|
||||
value: 1,
|
||||
text: "全部",
|
||||
url: api2.getWalletTransactionPage,
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
text: "佣金",
|
||||
url: api2.commissionDetailPage,
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
text: "收益",
|
||||
url: api2.agentEarningsDetailPage,
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
text: "分红",
|
||||
url: api2.dividendDetailPage,
|
||||
},
|
||||
])
|
||||
//
|
||||
const select_show = ref(false);
|
||||
const select_value = ref();
|
||||
const select_cur = ref(0);
|
||||
const range = ref([{
|
||||
value: 0,
|
||||
text: "全部"
|
||||
}, {
|
||||
value: 1,
|
||||
text: "店长收益"
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
text: "权益收益"
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
text: "代理收益"
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
text: "其他"
|
||||
},
|
||||
]);
|
||||
const chartOption = ref({
|
||||
// 添加grid配置,实现间距自适应
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
top: '0',
|
||||
height: 150,
|
||||
},
|
||||
// 简化全局坐标轴指示器配置
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
snap: true, // 吸附到最近的数据点
|
||||
crossStyle: {
|
||||
color: '#EE0A24',
|
||||
},
|
||||
// 修正lineStyle缩进
|
||||
lineStyle: {
|
||||
color: '#EE0A24',
|
||||
type: 'dashed',
|
||||
width: 1,
|
||||
},
|
||||
},
|
||||
// 调整tooltip配置,确保点击时显示数据框
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
triggerOn: 'click', // 只在点击时触发
|
||||
backgroundColor: 'rgba(255, 255, 255, 0.9)',
|
||||
borderColor: '#EE0A24',
|
||||
borderWidth: 1,
|
||||
padding: 8,
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
fontSize: 12,
|
||||
},
|
||||
formatter: function(params) {
|
||||
const data = params[0];
|
||||
return `日期: ${data.axisValue}<br/>收益: ${data.value.toFixed(2)}`;
|
||||
},
|
||||
extraCssText: 'border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);',
|
||||
// 修改position配置,使用默认位置
|
||||
position: 'top',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
crossStyle: {
|
||||
color: '#EE0A24',
|
||||
},
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: [],
|
||||
axisLabel: {
|
||||
color: '#BBBBBB',
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#D9D9D9',
|
||||
type: 'dashed',
|
||||
},
|
||||
},
|
||||
// x轴独立的axisPointer配置
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
snap: true,
|
||||
label: {
|
||||
show: true,
|
||||
backgroundColor: 'rgba(238, 10, 36, 0.8)',
|
||||
color: '#fff',
|
||||
padding: [3, 6],
|
||||
fontSize: 12,
|
||||
formatter: function(params) {
|
||||
return ``;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#D9D9D9',
|
||||
type: 'dashed',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#BBBBBB',
|
||||
},
|
||||
// y轴独立的axisPointer配置
|
||||
axisPointer: {
|
||||
type: 'line',
|
||||
snap: true,
|
||||
label: {
|
||||
show: true,
|
||||
backgroundColor: 'rgba(238, 10, 36, 0.8)',
|
||||
color: '#fff',
|
||||
padding: [3, 6],
|
||||
fontSize: 12,
|
||||
formatter: function(params) {
|
||||
return `收益: ${params.value.toFixed(2)}`;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [{
|
||||
data: [],
|
||||
smooth: true,
|
||||
type: 'line',
|
||||
symbol: 'none', // 不显示数据点
|
||||
lineStyle: {
|
||||
color: '#EE0A24',
|
||||
},
|
||||
triggerEvent: true, // 确保事件可以被触发
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: '#EE0A24'
|
||||
},
|
||||
{
|
||||
offset: 0.1,
|
||||
color: '#C1261F'
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: 'rgba(235,110,57,0)'
|
||||
},
|
||||
]),
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'series',
|
||||
itemStyle: {
|
||||
color: '#EE0A24',
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2,
|
||||
},
|
||||
showSymbol: true, // 点击时显示数据点
|
||||
symbolSize: 10, // 数据点大小
|
||||
},
|
||||
// 移除重复的showSymbol设置
|
||||
}, ],
|
||||
// 移动端优化配置
|
||||
animation: false, // 禁用动画以提高性能
|
||||
touchMoveThreshold: 10, // 增加触摸移动阈值,避免误触
|
||||
roam: false, // 禁止缩放和平移
|
||||
});
|
||||
let trendObj = ref({});
|
||||
|
||||
|
||||
//navbar选择
|
||||
function changeNav(e, i) {
|
||||
navCur.value = i
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
//收益下拉框选择
|
||||
function changeSelect(e, i) {
|
||||
// console.log(e);
|
||||
select_value.value = e.text
|
||||
select_cur.value = e.value
|
||||
select_show.value = !select_show.value
|
||||
if (cardPages.value && cardPages.value.mescrollTrigger) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
}
|
||||
//获取未行权收益
|
||||
function getRelease() {
|
||||
api2.agentEarningsTrendNew().then((res) => {
|
||||
if (res.code === 0) {
|
||||
// norelease.value = res.data.remainingEarningAll
|
||||
}
|
||||
});
|
||||
}
|
||||
// 七天收益
|
||||
const getData = () => {
|
||||
api2.agentEarningsTrendNew({}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
list.value = res.data.list || [];
|
||||
if (list.value.length) {
|
||||
trendObj.value = list.value[list.value.length - 1];
|
||||
|
||||
chartOption.value.xAxis.data = list.value.map((item) => {
|
||||
// 将日期从2023-09-01变为09/01格式
|
||||
item.date = item.date.split('-').slice(1).join('/');
|
||||
return item.date;
|
||||
});
|
||||
chartOption.value.series[0].data = list.value.map((item) => {
|
||||
return proxy.$fen2yuan(item.earnings);
|
||||
});
|
||||
}
|
||||
|
||||
norelease.value = res.data.remainingEarningAll
|
||||
}
|
||||
});
|
||||
};
|
||||
//列表
|
||||
const getList = (mescroll) => {
|
||||
const cfg = navList.value[navCur.value];
|
||||
if (!cfg || !cfg.url) {
|
||||
cardPages.value.getState(false);
|
||||
return;
|
||||
}
|
||||
const isAgentEarnings = navCur.value === 2;
|
||||
const params = {
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
createMonth: currentMonth2.value,
|
||||
...(navCur.value === 0 ? {
|
||||
type: 1
|
||||
} :
|
||||
isAgentEarnings ? {
|
||||
transactionType: select_cur.value
|
||||
} : {
|
||||
transactionType: 1
|
||||
}),
|
||||
};
|
||||
cfg.url(params).then((res) => {
|
||||
if (res.code === 0) {
|
||||
// console.log(res.data.sum);
|
||||
monthEarnings.value = fen2yuan(res.data.sum)
|
||||
let list = res.data.list || [];
|
||||
if (mescroll.num == 1) infoArr.value = [];
|
||||
const idx = navCur.value;
|
||||
list = list.map((item) => {
|
||||
if (idx === 0) {
|
||||
item.time = formatDate(item.createTime).slice(0, 10);
|
||||
// item.remark = item.title;
|
||||
item.money = fen2yuan(item.price);
|
||||
} else if (idx === 1) {
|
||||
item.title = item.remark
|
||||
item.time = item.createTime;
|
||||
item.money = fen2yuan(item.amount);
|
||||
} else if (idx === 2) {
|
||||
item.title = item.remark
|
||||
item.time = formatDate(item.createTime).slice(0, 10);
|
||||
item.money = fen2yuan(item.totalEarnings);
|
||||
} else if (idx === 3) {
|
||||
item.title = item.remark
|
||||
item.time = formatDate(item.createTime).slice(0, 10);
|
||||
item.money = fen2yuan(item.amount);
|
||||
}
|
||||
return item;
|
||||
});
|
||||
infoArr.value = infoArr.value.concat(list);
|
||||
height.value = infoArr.value.length > 0 ? infoArr.value.length * 150 + 'rpx' : '540rpx';
|
||||
cardPages.value.getState(true, list.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
//选择日期
|
||||
function bindDateChange(e) {
|
||||
date.value = e.detail.value;
|
||||
const arr = e.detail.value.split('-');
|
||||
currentMonth.value = arr[0] + '.' + arr[1];
|
||||
currentMonth2.value = arr[0] + '-' + arr[1];
|
||||
if (cardPages.value && cardPages.value.mescrollTrigger) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
}
|
||||
//获取当前日期
|
||||
function getCurrentDate() {
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
month = month < 10 ? '0' + month : month;
|
||||
day = day < 10 ? '0' + day : day;
|
||||
currentDate.value = year + '-' + month + '-' + day;
|
||||
currentMonth.value = year + '.' + month;
|
||||
currentMonth2.value = year + '-' + month;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
select_value.value = range.value[0].text
|
||||
select_cur.value = range.value[0].value
|
||||
getData();
|
||||
getCurrentDate()
|
||||
date.value = currentDate.value
|
||||
// getRelease()
|
||||
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.card {
|
||||
background-color: var(--color24);
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.pages {
|
||||
padding: 32rpx 40rpx 0;
|
||||
|
||||
.section-1 {
|
||||
border-radius: 16rpx;
|
||||
height: 285rpx;
|
||||
max-height: 285rpx;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
margin-bottom: 44rpx;
|
||||
|
||||
.section1-content {
|
||||
padding: 16rpx 28rpx;
|
||||
color: #fff;
|
||||
|
||||
.date {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.57);
|
||||
}
|
||||
|
||||
.num {
|
||||
font-weight: 700;
|
||||
font-size: 60rpx;
|
||||
line-height: 80rpx;
|
||||
margin: 8rpx 0;
|
||||
}
|
||||
|
||||
.num2 {
|
||||
font-size: 32rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 418rpx;
|
||||
height: 4rpx;
|
||||
background: rgba(255, 255, 255, 0.23);
|
||||
margin-bottom: 27rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section-2 {
|
||||
@extend .card;
|
||||
padding: 16rpx 28rpx;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.wrap {
|
||||
width: 100%;
|
||||
height: 350rpx;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.section-3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 34rpx;
|
||||
|
||||
.item {
|
||||
width: 146rpx;
|
||||
height: 62rpx;
|
||||
line-height: 62rpx;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
// color: #FFFFFF;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #FB4D32;
|
||||
background: #FFEFE5;
|
||||
}
|
||||
}
|
||||
|
||||
.section-4 {
|
||||
background-color: var(--color24);
|
||||
border-radius: 50rpx 50rpx 0 0;
|
||||
margin: 32rpx -40rpx 0;
|
||||
padding: 28rpx 40rpx;
|
||||
|
||||
.select-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
font-weight: 500;
|
||||
line-height: 44rpx;
|
||||
|
||||
.selected-date {
|
||||
font-size: 32rpx;
|
||||
// color: #FFFFFF;
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 28rpx;
|
||||
color: #969696;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
position: relative;
|
||||
|
||||
.bar {
|
||||
width: 146rpx;
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 50rpx;
|
||||
background: #F2F4F7;
|
||||
border-radius: 16rpx;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
// color: #FFFFFF;
|
||||
}
|
||||
|
||||
.select-content {
|
||||
width: 100%;
|
||||
border-radius: 10rpx;
|
||||
position: absolute;
|
||||
background: #F2F4F7;
|
||||
top: 60rpx;
|
||||
z-index: 10;
|
||||
|
||||
.select-item {
|
||||
padding: 0 10rpx;
|
||||
text-align: center;
|
||||
line-height: 70rpx;
|
||||
color: #000;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
// width: 100%;
|
||||
height: 144rpx;
|
||||
background: #F2F4F7;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 24rpx;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.left {
|
||||
font-weight: 400;
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
// color: #FFFFFF;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 34rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #EE0A24;
|
||||
// line-height: 46rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.select {
|
||||
width: 200rpx;
|
||||
|
||||
:deep(.uni-scroll-view-content) {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
:deep(.uni-stat-box) {
|
||||
background-color: transparent;
|
||||
|
||||
.uni-select__input-box .padding-top-bottom {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.uni-select {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.uni-icons {
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<view class="pages">
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
let url = ref('http://8.136.55.200:1080/#/pages/index/user_agreement');
|
||||
let title = ref('用户协议');
|
||||
// 显示原生导航栏
|
||||
onLoad(async (e) => {
|
||||
if (e.type == 1) {
|
||||
url.value = 'http://8.136.55.200:1080/#/pages/index/user_agreement';
|
||||
title.value = '用户协议';
|
||||
} else {
|
||||
url.value = 'http://8.136.55.200:1080/#/pages/index/privacy_agreement';
|
||||
title.value = '隐私政策';
|
||||
}
|
||||
uni.setNavigationBarTitle({ title: title.value });
|
||||
console.log(url.value);
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
margin-top: -100rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<view class="pages">
|
||||
<view v-html="content"></view>
|
||||
</view>
|
||||
<!-- <s-pages :title="title" class="c0">
|
||||
<view v-html="content"></view>
|
||||
</s-pages> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import * as api from '@/sheep/api/index/index';
|
||||
let title = ref('协议');
|
||||
let apiUrl = ref(api.getuseragreement);
|
||||
let content = ref();
|
||||
let id = ref(0);
|
||||
const getData = async () => {
|
||||
let res = await apiUrl.value({ id: id.value });
|
||||
if (res.code === 0) {
|
||||
content.value = res.data.content;
|
||||
title.value = res.data.title;
|
||||
uni.setNavigationBarTitle({ title: title.value });
|
||||
}
|
||||
};
|
||||
// 显示原生导航栏
|
||||
onLoad(async (e) => {
|
||||
console.log(e.type);
|
||||
id.value = e.type;
|
||||
switch (parseInt(e.type)) {
|
||||
case 1:
|
||||
apiUrl.value = api.getpolicy;
|
||||
break;
|
||||
case 2:
|
||||
apiUrl.value = api.getpolicy;
|
||||
break;
|
||||
case 4:
|
||||
apiUrl.value = api.getpolicy;
|
||||
break;
|
||||
}
|
||||
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<s-pages title="计算">
|
||||
<view class="p-x-32">
|
||||
<view class="flex-center m-b-20">
|
||||
<view class="w_150">利润:</view>
|
||||
<uni-easyinput class="flex1" v-model="num1" type="number" placeholder="利润" />
|
||||
</view>
|
||||
<view class="flex-center m-b-20">
|
||||
<view class="w_150">上架数:</view>
|
||||
<uni-easyinput class="flex1" v-model="num2" type="number" placeholder="上架数" />
|
||||
</view>
|
||||
<view class="m-b-20">25天的利润: {{ num3 }}</view>
|
||||
<view class="m-b-20">每天的利润: {{ num3 / 25 }}</view>
|
||||
<view class="m-b-20">每天的利润20%: {{ (num3 / 25) * 0.2 }}</view>
|
||||
<view class="m-b-20">每天的利润80%: {{ (num3 / 25) * 0.8 }}</view>
|
||||
<view @click="sub" class="ai-button">提交</view></view
|
||||
>
|
||||
</s-pages>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { proxy } = getCurrentInstance();
|
||||
let num1 = ref(0);
|
||||
let num2 = ref(0);
|
||||
let num3 = ref(0);
|
||||
const sub = () => {
|
||||
// num1 / num2 / 40 天 * (1.125)^40
|
||||
// 这个商品的每天利润总额 / 这个商品的当天AI店铺上架产品数 / 40 天 * (1.125)^40
|
||||
num3.value = (num1.value / num2.value / 40) * Math.pow(1.125, 40);
|
||||
console.log((2.78 / Math.pow(1.125, 40)) * 40 * 200);
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<view>
|
||||
<image
|
||||
v-if="qrCodeUrl"
|
||||
:src="qrCodeUrl"
|
||||
:style="{ width: size + 'rpx', height: size + 'rpx' }"
|
||||
@longpress="$emit('longpress')"
|
||||
/>
|
||||
<canvas
|
||||
v-else
|
||||
canvas-id="qrcode"
|
||||
:style="{ width: size + 'rpx', height: size + 'rpx' }"
|
||||
@longpress="$emit('longpress')"
|
||||
></canvas>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UQRCode from 'uqrcodejs';
|
||||
export default {
|
||||
props: {
|
||||
size: {
|
||||
type: Number,
|
||||
default: 100,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
qrCodeUrl: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
createQRcode(url) {
|
||||
var qr = new UQRCode();
|
||||
qr.data = url;
|
||||
const pxSize = uni.upx2px(this.size);
|
||||
qr.size = pxSize;
|
||||
qr.make();
|
||||
var canvasContext = uni.createCanvasContext('qrcode', this);
|
||||
canvasContext.setFillStyle('#FFFFFF');
|
||||
canvasContext.fillRect(0, 0, pxSize, pxSize);
|
||||
qr.canvasContext = canvasContext;
|
||||
qr.drawCanvas();
|
||||
setTimeout(() => {
|
||||
this.toImg(pxSize);
|
||||
}, 200);
|
||||
},
|
||||
toImg(pxSize) {
|
||||
const _this = this;
|
||||
uni.canvasToTempFilePath(
|
||||
{
|
||||
width: pxSize,
|
||||
height: pxSize,
|
||||
canvasId: 'qrcode',
|
||||
destWidth: pxSize,
|
||||
destHeight: pxSize,
|
||||
success: function (res) {
|
||||
_this.qrCodeUrl = res.tempFilePath;
|
||||
_this.$emit('generated', res.tempFilePath);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
},
|
||||
},
|
||||
this,
|
||||
);
|
||||
},
|
||||
savePhoto() {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: this.qrCodeUrl,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: 'success',
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: '保存失败',
|
||||
icon: 'none',
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss"></style>
|
||||
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<view class="pages">
|
||||
<s-layout :bgStyle="{ color: 'var(--color1)' }" title="意见反馈">
|
||||
<view class="input bg24">
|
||||
<uni-easyinput
|
||||
v-model="text"
|
||||
type="textarea"
|
||||
placeholder="请输入您的意见"
|
||||
@confirm="submit"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<su-fixed bottom placeholder>
|
||||
<view class="ss-p-x-20 ss-p-b-40">
|
||||
<button class="loginout-btn ss-reset-button ui-BG-Main btn_bg" @tap="submit">
|
||||
提交
|
||||
</button>
|
||||
</view>
|
||||
</su-fixed>
|
||||
</s-layout>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import * as api from '@/sheep/api/home/index';
|
||||
let { proxy } = getCurrentInstance();
|
||||
let text = ref('');
|
||||
const submit = () => {
|
||||
api
|
||||
.createfeedback({
|
||||
feedbackContent: text.value,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
text.value = '';
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({ delta: 1 });
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
.input {
|
||||
background-color: #fff;
|
||||
margin-top: 24rpx;
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.is-input-border) {
|
||||
border: none;
|
||||
}
|
||||
|
||||
:deep(.uni-easyinput__content-textarea) {
|
||||
padding-top: 0;
|
||||
// color: #ffffff;
|
||||
}
|
||||
|
||||
.loginout-btn {
|
||||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%), #4d88ff;
|
||||
height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,386 @@
|
||||
<template>
|
||||
<s-layout :title="dataObj.title" navbar="inner">
|
||||
<view class="pages h100">
|
||||
<image
|
||||
class="w100 bg"
|
||||
:src="$url + 'home/points_1.png'"
|
||||
mode="widthFix"
|
||||
:style="{ top: paddingTop + 'px' }"
|
||||
/>
|
||||
<view class="pages_con">
|
||||
<view class="page_bottom bg24">
|
||||
<view class="bottom_title center c0"> 待释放明细 </view>
|
||||
<view class="bottom_list flex-center al-flex-start ju-between" v-if="type == 5">
|
||||
<view class="flex-row">
|
||||
<view
|
||||
class="navItem"
|
||||
v-for="(v, i) in navList"
|
||||
:key="i"
|
||||
:class="{ activeNav: navIndex === i }"
|
||||
@click="navChange(i)"
|
||||
>
|
||||
<view class="size28">{{ v.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="flex-row">
|
||||
<view class="typeItem flex-center size24" v-for="(v, i) in typeArr" :key="i"
|
||||
:class="{ activeType: typeIndex === i }" @click="typeIndex = i">
|
||||
{{ v.name }}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view>
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height + 'px'">
|
||||
<view
|
||||
v-for="(v, i) in detailList"
|
||||
:key="i"
|
||||
class="flex-center ju-between p-b-34 p-t-32 border-bottom"
|
||||
>
|
||||
<view>
|
||||
<view class="size28 line40 m-b-10 c0">
|
||||
{{ sourceTypeObj[Number(v.sourceType) || 1] }}
|
||||
</view>
|
||||
<view class="size24 c_999 line34">{{ formatDate(v.createTime) }}</view>
|
||||
</view>
|
||||
<view>{{ dataObj.numValue }}</view>
|
||||
<view class="size32 c_EE0A24">
|
||||
{{ $fen2yuan(v.remainingEarning) }}
|
||||
</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="h_200"> </view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import sheep from '@/sheep';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import * as pointsApi from '@/sheep/api/home/points';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
|
||||
import { formatDate, sourceTypeObj } from '@/sheep/helper/utils';
|
||||
let { proxy } = getCurrentInstance();
|
||||
// 1-商场区域代理订单,2-AI店铺区域代理订单,3-AI店铺代理收益,4:AI店铺团队分红,5-营销活动随机奖励
|
||||
let typeObj = {
|
||||
1: '区域代理收益',
|
||||
2: '区域代理收益',
|
||||
3: '店长收益',
|
||||
4: '店长收益',
|
||||
5: '店长收益',
|
||||
6: '系统导入',
|
||||
};
|
||||
let dataObj = reactive({
|
||||
title: '待释放',
|
||||
name: '我的积分',
|
||||
num: 0,
|
||||
btn: '去提现',
|
||||
list: [],
|
||||
unit: '',
|
||||
url: '',
|
||||
numName: 'changeAmount',
|
||||
sourceName: 'bizType',
|
||||
listApi: pointsApi.integraldetai,
|
||||
titleName: 'remark',
|
||||
});
|
||||
let navList = ref([
|
||||
{
|
||||
name: '全部',
|
||||
url: api.getWalletTransactionPage,
|
||||
title: 'title',
|
||||
numName: 'price',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '佣金',
|
||||
url: api.commissionDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '代理收益',
|
||||
url: api.agentEarningsDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'totalEarnings',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '分红',
|
||||
url: api.dividendDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
]);
|
||||
let typeArr = ref([
|
||||
{
|
||||
name: '收入',
|
||||
transactionType: 1,
|
||||
},
|
||||
{
|
||||
name: '支出',
|
||||
transactionType: 2,
|
||||
},
|
||||
]);
|
||||
let navIndex = ref(0);
|
||||
let typeIndex = ref(0);
|
||||
let height = ref(0);
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
const windowHeight = sysInfo.windowHeight;
|
||||
let urlAPI = ref(api.getWallet);
|
||||
height.value =
|
||||
windowHeight - sysInfo.statusBarHeight - uni.upx2px(88) - uni.upx2px(110) - uni.upx2px(40);
|
||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
let paddingTop = ref();
|
||||
paddingTop.value = -(statusBarHeight + 44);
|
||||
|
||||
const getData = () => {
|
||||
urlAPI.value().then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
dataObj.num = proxy.$fen2yuan(res.data.balance);
|
||||
}
|
||||
});
|
||||
};
|
||||
let cardPages = ref(null);
|
||||
let detailList = ref([]);
|
||||
const getList = (mescroll) => {
|
||||
let obj = {
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
};
|
||||
api.getReleaseList(obj).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
let list = res.data.pageResult.list || [];
|
||||
|
||||
if (mescroll.num == 1) detailList.value = [];
|
||||
detailList.value = detailList.value.concat(list);
|
||||
cardPages.value.getState(true, list.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
let type = ref(1);
|
||||
const dataChange = async () => {
|
||||
let userInfo = await sheep.$store('user').getInfo();
|
||||
if (type.value) {
|
||||
type.value = Number(type.value);
|
||||
switch (Number(type.value)) {
|
||||
case 1:
|
||||
dataObj.title = '绿色积分';
|
||||
dataObj.name = '我的积分';
|
||||
dataObj.btn = '去兑换';
|
||||
dataObj.num = userInfo.point;
|
||||
dataObj.url = '/pages/home/pay/seed';
|
||||
dataObj.listApi = pointsApi.integraldetai;
|
||||
dataObj.numName = 'changeAmount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 2:
|
||||
dataObj.title = '佣金';
|
||||
dataObj.name = '我的佣金';
|
||||
dataObj.num = userInfo.commission;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.commission;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 3:
|
||||
dataObj.title = '代理收益';
|
||||
dataObj.name = '我的代理收益';
|
||||
dataObj.num = userInfo.agentEarning;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.agentearnings;
|
||||
dataObj.numName = 'totalEarnings';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 4:
|
||||
dataObj.title = '消费金';
|
||||
dataObj.name = '我的消费金';
|
||||
dataObj.btn = '去消费';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.consumptionGold);
|
||||
dataObj.unit = '';
|
||||
dataObj.url = '/pages/goods/list';
|
||||
dataObj.listApi = pointsApi.consumptiongold;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 5:
|
||||
navChange(0);
|
||||
dataObj.title = '钱包';
|
||||
dataObj.name = '可提现金额';
|
||||
dataObj.btn = '去提现';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.wallet);
|
||||
dataObj.unit = '元';
|
||||
dataObj.url = '/pages/home/pay/withdraw';
|
||||
getData();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// getList();
|
||||
}
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
};
|
||||
onLoad(async (e) => {
|
||||
type.value = e.type;
|
||||
});
|
||||
onShow(() => {
|
||||
dataChange();
|
||||
});
|
||||
watch(
|
||||
() => [navIndex.value, typeIndex.value],
|
||||
() => {
|
||||
cardPages.value.mescrollTrigger();
|
||||
},
|
||||
);
|
||||
onShow(() => {
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
if (type.value == 5) {
|
||||
getData();
|
||||
}
|
||||
});
|
||||
const goUrl = () => {
|
||||
// if (type.value == 5) {
|
||||
// uni.showToast({
|
||||
// title: '功能暂未开放',
|
||||
// icon: 'none',
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: dataObj.url,
|
||||
});
|
||||
};
|
||||
const go = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/home/noRelease',
|
||||
});
|
||||
};
|
||||
const navChange = (index) => {
|
||||
dataObj.numName = navList.value[index].numName;
|
||||
dataObj.sourceName = navList.value[index].sourceName;
|
||||
dataObj.titleName = navList.value[index].title;
|
||||
navIndex.value = index;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.money-box {
|
||||
//height: 344rpx;
|
||||
background: linear-gradient(to right, #75aff6 0%, #366dee 99%);
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 32rpx;
|
||||
padding: 40rpx 32rpx 16rpx;
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #366eee;
|
||||
border-radius: 50rpx;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.pages {
|
||||
position: relative;
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pages_con {
|
||||
position: relative;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
|
||||
.page_top {
|
||||
height: 204rpx;
|
||||
color: #1a1a1a;
|
||||
|
||||
.name {
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 68rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
|
||||
height: 52rpx;
|
||||
line-height: 52rpx;
|
||||
width: 112rpx;
|
||||
text-align: center;
|
||||
border-radius: 26rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.page_bottom {
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 0 16rpx;
|
||||
|
||||
.bottom_title {
|
||||
line-height: 110rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navItem {
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.activeNav {
|
||||
position: relative;
|
||||
color: var(--color32);
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(131deg, var(--color30) 0%, var(--color32) 100%), #fa7e31;
|
||||
border-radius: 4rpx;
|
||||
position: absolute;
|
||||
bottom: -14rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.typeItem {
|
||||
width: 76rpx;
|
||||
height: 40rpx;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 12rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.activeType {
|
||||
color: var(--color30);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<s-pages title="修改密码">
|
||||
<view class="pages flex-column ju-between">
|
||||
<card_list class="cardList bg24" :arr="listArr">
|
||||
<template #footer-2>
|
||||
<view class="flex-center">
|
||||
<uni-easyinput
|
||||
style="width: 200rpx"
|
||||
v-if="num > 0 && num < 60"
|
||||
:inputBorder="false"
|
||||
v-model="formData.code"
|
||||
type="number"
|
||||
placeholder="请输入验证码"
|
||||
></uni-easyinput>
|
||||
<view class="c_primary size28" @click="getCode">{{
|
||||
num > 0 && num < 60 ? num + 's后重新获取' : '获取验证码'
|
||||
}}</view>
|
||||
</view>
|
||||
</template>
|
||||
<template #footer-3>
|
||||
<uni-easyinput
|
||||
:inputBorder="false"
|
||||
v-model="formData.password"
|
||||
type="password"
|
||||
placeholder="请输入密码"
|
||||
></uni-easyinput>
|
||||
</template>
|
||||
<template #footer-4>
|
||||
<uni-easyinput
|
||||
:inputBorder="false"
|
||||
v-model="formData.password1"
|
||||
type="password"
|
||||
placeholder="请再次输入密码"
|
||||
></uni-easyinput>
|
||||
</template>
|
||||
</card_list>
|
||||
<view class="submit-btn m-t-20" @click="sub">确定</view>
|
||||
</view>
|
||||
</s-pages>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import sheep from '@/sheep';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import card_list from '@/components/card_list/card_list.vue';
|
||||
import UserApi from '@/sheep/api/member/user';
|
||||
import AuthUtil from '@/sheep/api/member/auth';
|
||||
let timer = ref(null);
|
||||
let { proxy } = getCurrentInstance();
|
||||
let listArr = ref([
|
||||
{
|
||||
id: '1',
|
||||
title: '手机号',
|
||||
rightText: '',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
title: '验证码',
|
||||
rightText: '',
|
||||
type: 'config',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
title: '新密码',
|
||||
rightText: '',
|
||||
type: 'input',
|
||||
typeObj: {
|
||||
type: 'password',
|
||||
placeholder: '请输入密码',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
title: '确认密码',
|
||||
rightText: '',
|
||||
type: 'input',
|
||||
typeObj: {
|
||||
type: 'password',
|
||||
placeholder: '请再次输入密码',
|
||||
},
|
||||
},
|
||||
]);
|
||||
let formData = ref({});
|
||||
let num = ref(0);
|
||||
const getCode = () => {
|
||||
if (num.value > 0) {
|
||||
return;
|
||||
}
|
||||
sendCode();
|
||||
};
|
||||
const sendCode = async () => {
|
||||
AuthUtil.sendSmsCode(formData.value.mobile, 3).then((res) => {
|
||||
if (res.code === 0) {
|
||||
num.value = 60;
|
||||
timer.value = setInterval(() => {
|
||||
num.value--;
|
||||
if (num.value <= 0) {
|
||||
clearInterval(timer.value);
|
||||
num.value = 60;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
};
|
||||
let dataInfo = ref({});
|
||||
const getData = () => {
|
||||
sheep
|
||||
.$store('user')
|
||||
.getInfo()
|
||||
.then((res) => {
|
||||
dataInfo.value = res;
|
||||
formData.value.mobile = res.mobile;
|
||||
listArr.value[0].rightText = res.mobile;
|
||||
});
|
||||
};
|
||||
getData();
|
||||
const sub = () => {
|
||||
if (!formData.value.code) {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (formData.value.password != formData.value.password1) {
|
||||
uni.showToast({
|
||||
title: '两次密码不一致',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
}
|
||||
UserApi.updateUserPassword(formData.value).then((res) => {
|
||||
if (res.code === 0) {
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({ url: '/pages/public/login' });
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(input) {
|
||||
text-align: right;
|
||||
}
|
||||
.pages {
|
||||
padding: 30rpx 40rpx;
|
||||
padding-bottom: 64rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
:deep(.uni-list-item__content-title) {
|
||||
white-space: nowrap;
|
||||
word-break: keep-all;
|
||||
}
|
||||
.cardList {
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
:deep(.uni-list-item__container) {
|
||||
align-items: center !important;
|
||||
}
|
||||
.submit-btn {
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,233 @@
|
||||
<template>
|
||||
<s-pages :bgStyle="{ color: 'var(--color1)' }" :title="dataObj.title">
|
||||
<view class="pages p-t-28 p-x-40">
|
||||
<view class="radius12 pagesTop p-y-30 p-x-28 bg24">
|
||||
<view class="c0">{{ dataObj.text0 }}</view>
|
||||
<view class="m-b-28 border-bottom"
|
||||
><uni-easyinput
|
||||
v-model="num"
|
||||
type="number"
|
||||
placeholder=""
|
||||
placeholder-style="font-size: 92rpx;"
|
||||
@confirm="submit"
|
||||
:inputBorder="false"
|
||||
:min="0"
|
||||
@blur="blur"
|
||||
:clearSize="50"
|
||||
/></view>
|
||||
<view class="m-b-12 line48" v-if="dataObj.text">
|
||||
{{ dataObj.text }}<span>{{ point }}</span
|
||||
>{{ dataObj.text1 }},
|
||||
<span class="c32" @click="num = point">全部{{ dataObj.title }}</span>
|
||||
</view>
|
||||
<view class="size24 infotext flex-center ju-flex-start c34">
|
||||
<uni-icons class="m-l-16 m-r-6" type="info" color="" />
|
||||
{{ dataObj.text2 }}
|
||||
</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="submit-btn m-t-66" @click="submit">{{ dataObj.title }}</view>
|
||||
</view>
|
||||
</s-pages>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||
import sheep from '@/sheep';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import * as incrementApi from '@/sheep/api/increment/index';
|
||||
import * as userApi from '@/sheep/api/member/user';
|
||||
const { proxy } = getCurrentInstance();
|
||||
let num = ref(0);
|
||||
let point = ref(0);
|
||||
let type = ref(0);
|
||||
let dataObj = ref({
|
||||
title: '兑换',
|
||||
text0: '金种子数量',
|
||||
text: '',
|
||||
text1: '金种子',
|
||||
text2: '兑换比例:100积分=1金种子',
|
||||
num: 'point',
|
||||
subUrl: api.exchangeGoldSeed,
|
||||
upName: 'goldSeedAmount',
|
||||
});
|
||||
const submit = () => {
|
||||
if (!num.value) {
|
||||
sheep.$helper.toast('请输入兑换数量');
|
||||
return;
|
||||
}
|
||||
let obj = {};
|
||||
let upName = dataObj.value.upName;
|
||||
// obj[upName] = num.value;
|
||||
switch (type.value) {
|
||||
case 0: //绿色积分兑换金种子
|
||||
obj[upName] = num.value;
|
||||
break;
|
||||
case 1: //交易所积分兑换金种子
|
||||
obj[upName] = num.value * 100;
|
||||
break;
|
||||
case 2: //配票 向上取整
|
||||
obj[upName] = Math.ceil(num.value / 0.85);
|
||||
break;
|
||||
case 3: //兑换原始积分
|
||||
obj[upName] = num.value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
dataObj.value.subUrl(obj).then((res) => {
|
||||
if (res.code === 0) {
|
||||
num.value = 0;
|
||||
getInfo();
|
||||
}
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const blur = () => {
|
||||
if (num.value < 0) {
|
||||
sheep.$helper.toast('兑换数量不能小于0');
|
||||
num.value = 0;
|
||||
return;
|
||||
}
|
||||
if (num.value > point.value) {
|
||||
sheep.$helper.toast('兑换数量不能大于可兑换数量');
|
||||
num.value = point.value;
|
||||
return;
|
||||
}
|
||||
};
|
||||
const getInfo = () => {
|
||||
dataObj.value.info().then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
let num = res.data[dataObj.value.num];
|
||||
// dataObj.value.text = `当前积分${num}, 可兑换`
|
||||
// point.value = type.value === 0 || type.value === 1 ? Math.floor(num / 100) : num;
|
||||
switch (type.value) {
|
||||
case 0: //绿色积分兑换金种子
|
||||
point.value = Math.floor(num / 100);
|
||||
break;
|
||||
case 1: //交易所积分兑换金种子
|
||||
point.value = Math.floor(num / 100);
|
||||
break;
|
||||
case 2: //配票 向下取整
|
||||
point.value = Math.floor(num * 0.85);
|
||||
break;
|
||||
case 3: //兑换原始积分
|
||||
point.value = num;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
onLoad((e) => {
|
||||
// type: 0 绿色积分 1增量积分
|
||||
type.value = parseInt(e.type) || 0;
|
||||
switch (type.value) {
|
||||
case 0: //绿色积分兑换金种子
|
||||
dataObj.value = {
|
||||
title: '兑换',
|
||||
text0: '金种子数量',
|
||||
text: '当前可兑换',
|
||||
text1: '金种子',
|
||||
text2: '兑换比例:100积分=1金种子',
|
||||
num: 'point',
|
||||
subUrl: api.exchangeGoldSeed,
|
||||
info: userApi.default.getUserInfo,
|
||||
upName: 'goldSeedAmount',
|
||||
};
|
||||
break;
|
||||
case 1: //交易所积分兑换金种子
|
||||
dataObj.value = {
|
||||
title: '兑换',
|
||||
text0: '金种子数量',
|
||||
text: '当前可兑换',
|
||||
text1: '金种子',
|
||||
text2: '兑换比例:100积分=1金种子',
|
||||
num: 'exchangePoint',
|
||||
subUrl: incrementApi.exPointChangeGoldSeed,
|
||||
info: incrementApi.getUserGroupInfo,
|
||||
upName: 'amount',
|
||||
};
|
||||
break;
|
||||
case 2: //配票
|
||||
dataObj.value = {
|
||||
title: '配票',
|
||||
text0: '增量积分',
|
||||
text: '当前可配票',
|
||||
text1: '积分',
|
||||
text2: '需要核销15%的积分',
|
||||
num: 'incrementPoint',
|
||||
subUrl: incrementApi.incrPointChangeIncPoint,
|
||||
info: incrementApi.getUserGroupInfo,
|
||||
upName: 'amount',
|
||||
};
|
||||
break;
|
||||
case 3: //兑换
|
||||
dataObj.value = {
|
||||
title: '兑换积分',
|
||||
text0: '增量积分',
|
||||
text: '当前可兑换',
|
||||
text1: '积分',
|
||||
text2: '兑换比例:1增量积分=1绿色积分',
|
||||
num: 'incrementPoint',
|
||||
subUrl: incrementApi.incrPointChangeExPoint,
|
||||
info: incrementApi.getUserGroupInfo,
|
||||
upName: 'amount',
|
||||
};
|
||||
break;
|
||||
}
|
||||
getInfo();
|
||||
});
|
||||
onShow(() => {
|
||||
// getInfo();
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.uni-icons) {
|
||||
font-size: 24rpx !important;
|
||||
}
|
||||
|
||||
:deep(.uni-easyinput__content) {
|
||||
height: 108rpx;
|
||||
font-size: 92rpx;
|
||||
border-color: #4c505b;
|
||||
}
|
||||
|
||||
:deep(.uni-easyinput__content-input) {
|
||||
height: 108rpx;
|
||||
font-size: 92rpx;
|
||||
}
|
||||
|
||||
:deep(.uni-easyinput__placeholder-class) {
|
||||
font-size: 92rpx;
|
||||
}
|
||||
|
||||
:deep(.uni-input-input) {
|
||||
// color: #ffffff;
|
||||
}
|
||||
|
||||
.pagesTop {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.infotext {
|
||||
height: 62rpx;
|
||||
background: #f2f2f2;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.c_FA7E31 {
|
||||
color: #fa7e31;
|
||||
}
|
||||
|
||||
:deep(.uniui-left) {
|
||||
font-size: 44rpx !important;
|
||||
}
|
||||
|
||||
:deep(.uni-icons) {
|
||||
font-size: 44rpx !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,463 @@
|
||||
<template>
|
||||
<s-pages title="提现">
|
||||
<view class="pages p-y-28 p-x-40 c0">
|
||||
<!-- <view class="m-b-20 tab-header">
|
||||
<text class="tab-item" :class="{ active: type === 'yougou' }" @click="changeType('yougou')">优购提现</text>
|
||||
<text class="tab-item m-l-20" :class="{ active: type === 'huamao' }"
|
||||
@click="changeType('huamao')">华贸提现</text>
|
||||
</view> -->
|
||||
<view v-if="type === 'yougou'">
|
||||
<view class="bg24 radius12 m-b-32 p-y-30 p-x-28">
|
||||
<view class="flex-center ju-between">
|
||||
<view class="title c0">收款人</view>
|
||||
<view class="c33 flex-center" @click="select"><span style="color: #333">选择</span>
|
||||
<uni-icons class="m-l-10" type="right" color="#333" size="16" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex-center border-bottom" style="height: 100rpx" v-for="(v, i) in list" :key="i">
|
||||
<view class="c0">{{ v.title }}</view>
|
||||
<uni-easyinput style="text-align: right" class="flex1" v-model="dataObj[v.value]"
|
||||
:type="v.type || 'text'" :placeholder="v.placeholder" :inputBorder="false"
|
||||
@input="(e) => inputChange(e, v)" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg24 radius12 p-y-30 p-x-28 card2 pay">
|
||||
<view class="weight500 c0">提现金额</view>
|
||||
<view class="m-b-26 flex-row border-bottom">
|
||||
<span class="size92 c0 m-r-32">¥</span>
|
||||
<uni-easyinput class="flex1" v-model="dataObj.price" type="number" placeholder=""
|
||||
placeholder-style="font-size: 92rpx;" @confirm="onSubmit" :inputBorder="false" :min="0"
|
||||
:clearSize="50" />
|
||||
<!-- @blur="blur" -->
|
||||
|
||||
</view>
|
||||
<view class="m-b-12 c0">
|
||||
当前可提现<span>{{ point }}</span>元, <span class="c3" @click="dataObj.price = point">全部提现</span>
|
||||
</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="size24 m-t-36 m-b-74 line46">
|
||||
<view class="c0">
|
||||
<view>
|
||||
<span class="c_FF2D2D">*</span>
|
||||
{{
|
||||
`提现费率为${config.brokerageWithdrawFeePercent}%,最低提现金额为${config.brokerageWithdrawMinPrice}元`
|
||||
}}
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<span class="c_FF2D2D">*</span>
|
||||
{{ `提现时间为${config.brokerageWithdrawTime}` }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-btn" @click="onSubmit">提现</view>
|
||||
<view class="c2 record"><span @click="goUrl">提现记录</span></view>
|
||||
|
||||
<uni-popup ref="popupRef" type="center" border-radius="12rpx" background-color="#fff">
|
||||
<view class="pop-bar">
|
||||
<view class="close" @click="popClose()"> × </view>
|
||||
<view class="img-box">
|
||||
<image :src="$ygUrl + 'realname_icon.png'" />
|
||||
</view>
|
||||
<view class="size40 line56"> 请您补全您的实名信息 </view>
|
||||
<view class="txt2 size32 line44 m-t-16">
|
||||
为了保障您的账户安全,请尽快 <br />
|
||||
补全您的实名身份信息
|
||||
</view>
|
||||
<view class="btn m-t-50" @click="goReal()"> 去认证 </view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</s-pages>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import TradeConfigApi from '@/sheep/api/trade/config';
|
||||
import sheep from '@/sheep';
|
||||
import popup from '@/uni_modules/uni-popup/components/uni-popup/popup';
|
||||
import UserApi from '@/sheep/api/member/user';
|
||||
let realStatus = ref(0); //是否已经实名认证
|
||||
const popupRef = ref();
|
||||
const type = ref('yougou');
|
||||
const goUrl = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/home/pay/withdrawRecord',
|
||||
});
|
||||
};
|
||||
const changeType = (t) => {
|
||||
type.value = t;
|
||||
};
|
||||
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance();
|
||||
let list = ref([{
|
||||
title: '姓名',
|
||||
value: 'userName',
|
||||
placeholder: '请输入姓名',
|
||||
},
|
||||
{
|
||||
title: '账号',
|
||||
value: 'userAccount',
|
||||
type: 'number',
|
||||
placeholder: '请输入银行账号',
|
||||
},
|
||||
{
|
||||
title: '银行',
|
||||
value: 'bankName',
|
||||
placeholder: '请输入银行名称',
|
||||
},
|
||||
{
|
||||
title: '支行',
|
||||
value: 'bankAddress',
|
||||
placeholder: '请输入支行名称',
|
||||
},
|
||||
]);
|
||||
let dataObj = ref({
|
||||
type: 1,
|
||||
transferChannelCode: 'wx_lite',
|
||||
price: 0,
|
||||
});
|
||||
|
||||
let point = ref(0);
|
||||
const getData = () => {
|
||||
UserApi.getUserInfo().then((res) => {
|
||||
realStatus.value = res.data.realStatus;
|
||||
// console.log(realStatus.value);
|
||||
});
|
||||
api.getWallet().then((res) => {
|
||||
if (res.code === 0) {
|
||||
point.value = proxy.$fen2yuan(res.data.withdrawAmount);
|
||||
}
|
||||
});
|
||||
};
|
||||
const goReal = () => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/public/realname?status=' + realStatus.value,
|
||||
// query: obj,
|
||||
});
|
||||
popupRef.value.close();
|
||||
};
|
||||
const popClose = () => {
|
||||
popupRef.value.close();
|
||||
};
|
||||
const onSubmit = () => {
|
||||
if (type.value === 'yougou') {
|
||||
submit();
|
||||
} else {
|
||||
submit2();
|
||||
}
|
||||
};
|
||||
// 提现
|
||||
const submit = () => {
|
||||
//未实名不能去提现
|
||||
if (realStatus.value === 0) {
|
||||
popupRef.value.open('center');
|
||||
return;
|
||||
}
|
||||
let monney = Number(dataObj.value.price);//输入框提现金额
|
||||
let minMoney = config.value.brokerageWithdrawMinPrice;// 提现最小金额
|
||||
// console.log(monney,minMoney);
|
||||
if (monney < minMoney) {
|
||||
sheep.$helper.toast(`提现金额不能小于${minMoney}元`);
|
||||
return;
|
||||
}
|
||||
if (monney > Number(point.value)) {
|
||||
sheep.$helper.toast('提现金额不能大于可提现金额');
|
||||
dataObj.value.price = point.value;
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.userName) {
|
||||
sheep.$helper.toast('请输入姓名');
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.userAccount) {
|
||||
sheep.$helper.toast('请输入账号账号');
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.bankName) {
|
||||
sheep.$helper.toast('请输入银行名称');
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.bankAddress) {
|
||||
sheep.$helper.toast('请输入支行名称');
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.price) {
|
||||
sheep.$helper.toast('请输入提现金额');
|
||||
return;
|
||||
}
|
||||
let obj = JSON.parse(JSON.stringify(dataObj.value));
|
||||
obj.price = obj.price * 100;
|
||||
api.createBrokerageWithdraw(obj).then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.value = {
|
||||
type: 2,
|
||||
transferChannelCode: 'wx_lite',
|
||||
price: 0,
|
||||
};
|
||||
getData();
|
||||
}
|
||||
// console.log(res);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
//huamao提现
|
||||
function submit2() {
|
||||
let monney = Number(dataObj.value.price);//输入框提现金额
|
||||
let minMoney = config.value.brokerageWithdrawMinPrice;// Huamao提现最小金额
|
||||
// console.log(monney,minMoney);
|
||||
if (monney < minMoney) {
|
||||
sheep.$helper.toast(`提现金额不能小于${minMoney}元`);
|
||||
return;
|
||||
}
|
||||
if (monney > Number(point.value)) {
|
||||
sheep.$helper.toast('提现金额不能大于可提现金额');
|
||||
dataObj.value.price = point.value;
|
||||
return;
|
||||
}
|
||||
api.hmPayExpenditure({
|
||||
price: monney * 100,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.value = {
|
||||
type: 2,
|
||||
transferChannelCode: 'wx_lite',
|
||||
price: 0,
|
||||
};
|
||||
getData();
|
||||
}
|
||||
// console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
const blur = () => {
|
||||
// console.log(config.value.brokerageWithdrawMinPrice);
|
||||
if (Number(dataObj.value.price) < 0) {
|
||||
sheep.$helper.toast('提现金额不能小于0');
|
||||
dataObj.value.price = 0;
|
||||
return;
|
||||
}
|
||||
if (Number(dataObj.value.price) < proxy.$fen2yuan(config.value.brokerageWithdrawMinPrice)) {
|
||||
sheep.$helper.toast(`提现金额不能小于${proxy.$fen2yuan(config.value.brokerageWithdrawMinPrice)}元`);
|
||||
return;
|
||||
}
|
||||
if (Number(dataObj.value.price) > Number(point.value)) {
|
||||
sheep.$helper.toast('提现金额不能大于可提现金额');
|
||||
dataObj.value.price = point.value;
|
||||
return;
|
||||
}
|
||||
};
|
||||
const inputChange = (e, v) => {
|
||||
let obj = {
|
||||
bankNo: e.detail.value,
|
||||
};
|
||||
if (v.value == 'userAccount') {
|
||||
api.getBank(obj).then((res) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res);
|
||||
dataObj.value.bankName = res.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
let bankList = ref([]);
|
||||
let bankText = ref([]);
|
||||
const getBankList = () => {
|
||||
api.getBankList({}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
res.data.forEach((item) => {
|
||||
// 取银行卡后四位
|
||||
item.text = `${item.bankName}(${item.cardNumber.slice(-4)})`;
|
||||
bankText.value.push(item.text);
|
||||
});
|
||||
bankList.value = res.data;
|
||||
|
||||
if (res?.data?.length) {
|
||||
let obj = res.data[0];
|
||||
dataObj.value = {
|
||||
...dataObj.value,
|
||||
userName: obj.trueName,
|
||||
userAccount: obj.cardNumber,
|
||||
bankName: obj.bankName,
|
||||
bankAddress: obj.bankAddress,
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const select = () => {
|
||||
uni.showActionSheet({
|
||||
itemList: bankText.value,
|
||||
success: ({
|
||||
tapIndex
|
||||
}) => {
|
||||
let obj = bankList.value[tapIndex];
|
||||
dataObj.value = {
|
||||
...dataObj.value,
|
||||
userName: obj.trueName,
|
||||
userAccount: obj.cardNumber,
|
||||
bankName: obj.bankName,
|
||||
};
|
||||
},
|
||||
fail: (error) => { },
|
||||
});
|
||||
};
|
||||
let config = ref({
|
||||
brokerageWithdrawMinPrice: 0,
|
||||
brokerageWithdrawFeePercent: 0,
|
||||
brokerageWithdrawTime: '',
|
||||
});
|
||||
onLoad(() => {
|
||||
getBankList();
|
||||
});
|
||||
onShow(async () => {
|
||||
getData();
|
||||
getBankList();
|
||||
let {
|
||||
code,
|
||||
data
|
||||
} = await TradeConfigApi.getTradeConfig();
|
||||
if (code === 0) {
|
||||
config.value.brokerageWithdrawMinPrice = Number(proxy.$fen2yuan(data.brokerageWithdrawMinPrice));
|
||||
config.value.brokerageWithdrawFeePercent = data.brokerageWithdrawFeePercent;
|
||||
config.value.brokerageWithdrawTime = data.brokerageWithdrawTime;
|
||||
console.log(config.value);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.pop-bar {
|
||||
padding: 46rpx 28rpx;
|
||||
position: relative;
|
||||
|
||||
.close {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
background: #dddddd;
|
||||
border-radius: 50%;
|
||||
color: #000;
|
||||
position: absolute;
|
||||
right: -24rpx;
|
||||
top: -24rpx;
|
||||
}
|
||||
|
||||
.img-box {
|
||||
width: 372rpx;
|
||||
height: 380rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.txt2 {
|
||||
color: #676767;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 608rpx;
|
||||
height: 82rpx;
|
||||
line-height: 82rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(130deg, #fa8735 0%, #fe3b48 100%);
|
||||
border-radius: 12rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.record {
|
||||
text-align: center;
|
||||
padding: 36rpx 0;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.bc_white {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
:deep(.uni-icons) {
|
||||
font-size: 24rpx !important;
|
||||
}
|
||||
|
||||
.pay {
|
||||
:deep(.uni-easyinput__content) {
|
||||
height: 108rpx;
|
||||
font-size: 92rpx;
|
||||
}
|
||||
|
||||
:deep(.uni-easyinput__content-input) {
|
||||
height: 108rpx;
|
||||
font-size: 92rpx;
|
||||
}
|
||||
|
||||
:deep(.uni-easyinput__placeholder-class) {
|
||||
font-size: 92rpx;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.uni-input-input) {
|
||||
// color: #ffffff;
|
||||
}
|
||||
|
||||
.infotext {
|
||||
height: 62rpx;
|
||||
background: #f2f2f2;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.c_FA7E31 {
|
||||
color: #fa7e31;
|
||||
}
|
||||
|
||||
.c_FF2D2D {
|
||||
color: #ff2d2d;
|
||||
}
|
||||
|
||||
.c_666 {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.size92 {
|
||||
font-size: 92rpx;
|
||||
}
|
||||
|
||||
:deep(.uniui-left) {
|
||||
font-size: 44rpx !important;
|
||||
}
|
||||
|
||||
:deep(.uni-icons) {
|
||||
font-size: 44rpx !important;
|
||||
}
|
||||
|
||||
.tab-header {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
font-size: 30rpx;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #ff5040;
|
||||
border-bottom: 4rpx solid #ff5040;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<s-layout :bgStyle="{ color: 'var(--color1)' }" title="提现">
|
||||
<view class="pages p-y-28 p-x-40 c0">
|
||||
<view class="bg24 radius12 m-b-32 p-y-30 p-x-28">
|
||||
<view class="title c0">收款人</view>
|
||||
<view
|
||||
class="flex-center border-bottom"
|
||||
style="height: 100rpx"
|
||||
v-for="(v, i) in list"
|
||||
:key="i"
|
||||
>
|
||||
<view class="c0">{{ v.title }}</view>
|
||||
<uni-easyinput
|
||||
style="text-align: right"
|
||||
class="flex1"
|
||||
v-model="dataObj[v.value]"
|
||||
:type="v.type || 'text'"
|
||||
:placeholder="v.placeholder"
|
||||
:inputBorder="false"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg24 radius12 p-y-30 p-x-28 card2 pay">
|
||||
<view class="weight500 c0">提现金额</view>
|
||||
<view class="m-b-26 flex-row border-bottom"
|
||||
><span class="size92 m-r-32">¥</span
|
||||
><uni-easyinput
|
||||
class="flex1"
|
||||
v-model="dataObj.price"
|
||||
type="number"
|
||||
placeholder=""
|
||||
placeholder-style="font-size: 92rpx;"
|
||||
@confirm="submit"
|
||||
:inputBorder="false"
|
||||
:min="0"
|
||||
@blur="blur"
|
||||
:clearSize="50"
|
||||
/></view>
|
||||
<view class="m-b-12 c0">
|
||||
当前可提现<span>{{ point }}</span
|
||||
>元, <span class="c3" @click="dataObj.price = point">全部提现</span>
|
||||
</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="size24 m-t-36 m-b-74">
|
||||
<view class="m-b-24"> <span class="c_FF2D2D">*</span>最低提现金额为0元 </view>
|
||||
<view class="c0">
|
||||
<span class="c_FF2D2D">*</span>提现费率为0%,最低收取0元,最高收取0元
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-btn" @click="submit">提现</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import sheep from '@/sheep';
|
||||
const { proxy } = getCurrentInstance();
|
||||
let list = ref([
|
||||
{
|
||||
title: '姓名',
|
||||
value: 'userName',
|
||||
placeholder: '请输入姓名',
|
||||
},
|
||||
{
|
||||
title: '账号',
|
||||
value: 'userAccount',
|
||||
type: 'number',
|
||||
placeholder: '请输入银行账号',
|
||||
},
|
||||
{
|
||||
title: '银行',
|
||||
value: 'bankName',
|
||||
placeholder: '请输入银行名称',
|
||||
},
|
||||
]);
|
||||
let dataObj = ref({
|
||||
type: 1,
|
||||
transferChannelCode: 'wx_lite',
|
||||
price: 0,
|
||||
});
|
||||
|
||||
let point = ref(0);
|
||||
const getData = () => {
|
||||
api.getWallet().then((res) => {
|
||||
if (res.code === 0) {
|
||||
point.value = proxy.$fen2yuan(res.data.balance);
|
||||
}
|
||||
});
|
||||
};
|
||||
const submit = () => {
|
||||
if (dataObj.value.price > point.value) {
|
||||
sheep.$helper.toast('提现金额不能大于可提现金额');
|
||||
dataObj.value.price = point.value;
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.userName) {
|
||||
sheep.$helper.toast('请输入姓名');
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.userAccount) {
|
||||
sheep.$helper.toast('请输入账号账号');
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.bankName) {
|
||||
sheep.$helper.toast('请输入银行名称');
|
||||
return;
|
||||
}
|
||||
if (!dataObj.value.price) {
|
||||
sheep.$helper.toast('请输入提现金额');
|
||||
return;
|
||||
}
|
||||
let obj = JSON.parse(JSON.stringify(dataObj.value));
|
||||
obj.price = obj.price * 100;
|
||||
api.createBrokerageWithdraw(obj).then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.value = {
|
||||
type: 2,
|
||||
transferChannelCode: 'wx_lite',
|
||||
price: 0,
|
||||
};
|
||||
getData();
|
||||
}
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const blur = () => {
|
||||
if (dataObj.value.price < 0) {
|
||||
sheep.$helper.toast('提现金额不能小于0');
|
||||
dataObj.value.price = 0;
|
||||
return;
|
||||
}
|
||||
if (dataObj.value.price > point.value) {
|
||||
sheep.$helper.toast('提现金额不能大于可提现金额');
|
||||
dataObj.value.price = point.value;
|
||||
return;
|
||||
}
|
||||
};
|
||||
onShow(() => {
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.bc_white {
|
||||
background-color: #fff;
|
||||
}
|
||||
:deep(.uni-icons) {
|
||||
font-size: 24rpx !important;
|
||||
}
|
||||
.pay {
|
||||
:deep(.uni-easyinput__content) {
|
||||
height: 108rpx;
|
||||
font-size: 92rpx;
|
||||
}
|
||||
:deep(.uni-easyinput__content-input) {
|
||||
height: 108rpx;
|
||||
font-size: 92rpx;
|
||||
}
|
||||
:deep(.uni-easyinput__placeholder-class) {
|
||||
font-size: 92rpx;
|
||||
}
|
||||
}
|
||||
:deep(.uni-input-input) {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.infotext {
|
||||
height: 62rpx;
|
||||
background: #f2f2f2;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.c_FA7E31 {
|
||||
color: #fa7e31;
|
||||
}
|
||||
.c_FF2D2D {
|
||||
color: #ff2d2d;
|
||||
}
|
||||
.c_666 {
|
||||
color: #666;
|
||||
}
|
||||
.size92 {
|
||||
font-size: 92rpx;
|
||||
}
|
||||
:deep(.uniui-left) {
|
||||
font-size: 44rpx !important;
|
||||
}
|
||||
:deep(.uni-icons) {
|
||||
font-size: 44rpx !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<s-pages title="提现记录">
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height">
|
||||
<view class="bg24 radius12 m-x-42 p-y-28 p-x-40" v-if="detailList.length">
|
||||
<view
|
||||
class="flex-between border-bottom"
|
||||
style="height: 150rpx"
|
||||
v-for="(v, i) in detailList"
|
||||
:key="i"
|
||||
>
|
||||
<view class="c0">
|
||||
<view class="size28"> {{ v.typeName }}-提现到银行卡 </view>
|
||||
<view class="c_999 size24 m-t-10">
|
||||
{{ sheep.$helper.timeFormat(v.createTime, 'yyyy-mm-dd hh:MM:ss') }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="c0">
|
||||
<view class="size28 price">
|
||||
{{ fen2yuan(v.price) }}
|
||||
</view>
|
||||
<view class="status size24 m-t-10">
|
||||
{{ v.statusName }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</s-pages>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import sheep from '@/sheep';
|
||||
import { ref } from 'vue';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||
let detailList = ref([]);
|
||||
let height = ref('100%');
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
height.value = sysInfo.windowHeight - sysInfo.statusBarHeight - uni.upx2px(88) + 'px';
|
||||
let cardPages = ref(null);
|
||||
const getList = async (mescroll) => {
|
||||
let res = await api.withdrawRecord({
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
});
|
||||
if (res.code === 0) {
|
||||
let data = res.data.list || [];
|
||||
if (mescroll.num == 1) detailList.value = [];
|
||||
detailList.value = detailList.value.concat(data);
|
||||
cardPages.value.getState(true, data.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
// api.withdrawRecord().then((e) => {
|
||||
// if (e.code === 0) {
|
||||
// detailList.value = e.data.list;
|
||||
// console.log(e.data.list);
|
||||
// list.value = e.data.list;
|
||||
// }
|
||||
// });
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.price {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.status {
|
||||
text-align: right;
|
||||
color: #366eee;
|
||||
}
|
||||
|
||||
.nomore {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<s-layout :bgStyle="{ color: 'var(--color1)' }" title="修改手机号">
|
||||
<view class="pages flex-column ju-between">
|
||||
<card_list class="cardList" :arr="listArr">
|
||||
<template #footer-2>
|
||||
<view class="flex-center">
|
||||
<uni-easyinput
|
||||
v-if="num > 0 && num < 60"
|
||||
:inputBorder="false"
|
||||
v-model="formData.oldCode"
|
||||
type="number"
|
||||
placeholder="请输入验证码"
|
||||
></uni-easyinput>
|
||||
<view class="c_primary size28" @click="getCode">{{
|
||||
num > 0 && num < 60 ? num + 's后重新获取' : '获取验证码'
|
||||
}}</view>
|
||||
</view>
|
||||
</template>
|
||||
<template #footer-3>
|
||||
<uni-easyinput
|
||||
:inputBorder="false"
|
||||
v-model="formData.mobile1"
|
||||
type="number"
|
||||
placeholder="请输入手机号"
|
||||
maxlength="11"
|
||||
minlength="11"
|
||||
></uni-easyinput>
|
||||
</template>
|
||||
<template #footer-4>
|
||||
<view class="flex-center">
|
||||
<uni-easyinput
|
||||
style="width: 200rpx"
|
||||
v-if="num1 > 0 && num1 < 60"
|
||||
:inputBorder="false"
|
||||
v-model="formData.code"
|
||||
type="number"
|
||||
placeholder="请输入验证码"
|
||||
maxlength="4"
|
||||
minlength="4"
|
||||
></uni-easyinput>
|
||||
<view class="c_primary size28" @click="getCode1">{{
|
||||
num1 > 0 && num1 < 60 ? num1 + 's后重新获取' : '获取验证码'
|
||||
}}</view>
|
||||
</view>
|
||||
</template>
|
||||
</card_list>
|
||||
<view class="absolute b130 l0 w100 p-x-40">
|
||||
<view class="submit-btn m-b-20" @click="sub">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import sheep from '@/sheep';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import card_list from '@/components/card_list/card_list.vue';
|
||||
import UserApi from '@/sheep/api/member/user';
|
||||
import AuthUtil from '@/sheep/api/member/auth';
|
||||
let timer = ref(null);
|
||||
let timer1 = ref(null);
|
||||
let { proxy } = getCurrentInstance();
|
||||
let listArr = ref([
|
||||
{
|
||||
id: '1',
|
||||
title: '原手机号',
|
||||
rightText: '',
|
||||
},
|
||||
// {
|
||||
// id: '2',
|
||||
// title: '原手机验证码',
|
||||
// rightText: '',
|
||||
// type: 'config',
|
||||
// },
|
||||
{
|
||||
id: '3',
|
||||
title: '新手机号',
|
||||
rightText: '',
|
||||
type: 'input',
|
||||
typeObj: {
|
||||
type: 'number',
|
||||
placeholder: '请输入手机号',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
title: '新手机验证码',
|
||||
rightText: '',
|
||||
type: 'config',
|
||||
},
|
||||
]);
|
||||
let formData = ref({});
|
||||
let num = ref(0);
|
||||
let num1 = ref(0);
|
||||
const getCode1 = () => {
|
||||
if (num1.value > 0) {
|
||||
return;
|
||||
}
|
||||
if (!formData.value.mobile1) {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
}
|
||||
sendCode1();
|
||||
};
|
||||
const getCode = () => {
|
||||
if (num.value > 0) {
|
||||
return;
|
||||
}
|
||||
sendCode();
|
||||
};
|
||||
const sendCode = async () => {
|
||||
AuthUtil.sendSmsCode(formData.value.mobile, 3).then((res) => {
|
||||
if (res.code === 0) {
|
||||
num.value = 60;
|
||||
timer.value = setInterval(() => {
|
||||
num.value--;
|
||||
if (num.value <= 0) {
|
||||
clearInterval(timer.value);
|
||||
num.value = 60;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
};
|
||||
const sendCode1 = async () => {
|
||||
AuthUtil.sendSmsCode(formData.value.mobile1, 3).then((res) => {
|
||||
if (res.code === 0) {
|
||||
num1.value = 60;
|
||||
timer1.value = setInterval(() => {
|
||||
num1.value--;
|
||||
if (num1.value <= 0) {
|
||||
clearInterval(timer1.value);
|
||||
num1.value = 60;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
};
|
||||
let dataInfo = ref({});
|
||||
const getData = () => {
|
||||
sheep
|
||||
.$store('user')
|
||||
.getInfo()
|
||||
.then((res) => {
|
||||
dataInfo.value = res;
|
||||
formData.value.mobile = res.mobile;
|
||||
listArr.value[0].rightText = res.mobile;
|
||||
});
|
||||
};
|
||||
getData();
|
||||
const sub = () => {
|
||||
if (!formData.value.code || formData.value.oldCode === '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!formData.value.mobile1) {
|
||||
uni.showToast({
|
||||
title: '请输入手机号',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
}
|
||||
UserApi.updateUserMobile({
|
||||
oldCode: formData.value.oldCode,
|
||||
mobile: formData.value.mobile1,
|
||||
code: formData.value.code,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
getData();
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(input) {
|
||||
text-align: right;
|
||||
}
|
||||
.pages {
|
||||
padding: 30rpx 40rpx;
|
||||
padding-bottom: 64rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.cardList {
|
||||
background-color: var(--color24);
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
:deep(.uni-list-item__container) {
|
||||
align-items: center !important;
|
||||
}
|
||||
:deep(.uni-input-input) {
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,380 @@
|
||||
<template>
|
||||
<s-layout :title="dataObj.title" navbar="inner">
|
||||
<view class="pages h100">
|
||||
<image
|
||||
class="w100 bg"
|
||||
:src="$url + 'home/points_1.png'"
|
||||
mode="widthFix"
|
||||
:style="{ top: paddingTop + 'px' }"
|
||||
/>
|
||||
<view class="pages_con">
|
||||
<!-- :style="{ marginTop: marginTop + 'px' }" -->
|
||||
<view class="page_top c0">
|
||||
<view class="size28 name">{{ dataObj.name }}</view>
|
||||
<view class="flex-row al-flex-end">
|
||||
<view class="num">{{ dataObj.num }}{{ dataObj.unit }}</view>
|
||||
<view class="btn size24 btn_bg" @click="goUrl">{{ dataObj.btn }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page_bottom bg24">
|
||||
<view class="bottom_title center c0"> 收支明细 </view>
|
||||
<view class="bottom_list flex-center al-flex-start ju-between" v-if="type == 5">
|
||||
<view class="flex-row">
|
||||
<view
|
||||
class="navItem"
|
||||
v-for="(v, i) in navList"
|
||||
:key="i"
|
||||
:class="{ activeNav: navIndex === i }"
|
||||
@click="navChange(i)"
|
||||
>
|
||||
<view class="size28">{{ v.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row">
|
||||
<view
|
||||
class="typeItem flex-center size24"
|
||||
v-for="(v, i) in typeArr"
|
||||
:key="i"
|
||||
:class="{ activeType: typeIndex === i }"
|
||||
@click="typeIndex = i"
|
||||
>
|
||||
{{ v.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height + 'px'">
|
||||
<view
|
||||
v-for="(v, i) in detailList"
|
||||
:key="i"
|
||||
class="flex-center ju-between p-b-34 p-t-32 border-bottom"
|
||||
>
|
||||
<view>
|
||||
<view class="size28 line40 m-b-10 c0">{{ v[dataObj.titleName] }}</view>
|
||||
<view class="size24 c_999 line34">{{ formatDate(v.createTime) }}</view>
|
||||
</view>
|
||||
<view>{{ dataObj.numValue }}</view>
|
||||
<view class="size32 c_EE0A24">{{
|
||||
dataObj.sourceName && v[dataObj?.sourceName] === 1
|
||||
? (dataObj.sourceName ? '+' : '') + v[dataObj.numName]
|
||||
: (dataObj.sourceName ? '-' : '') + v[dataObj.numName]
|
||||
}}</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import sheep from '@/sheep';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import * as pointsApi from '@/sheep/api/home/points';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
|
||||
import { formatDate } from '@/sheep/helper/utils';
|
||||
let { proxy } = getCurrentInstance();
|
||||
let dataObj = reactive({
|
||||
title: '我的积分',
|
||||
name: '我的积分',
|
||||
num: 0,
|
||||
btn: '去提现',
|
||||
list: [],
|
||||
unit: '',
|
||||
url: '',
|
||||
numName: 'changeAmount',
|
||||
sourceName: 'bizType',
|
||||
listApi: pointsApi.integraldetai,
|
||||
titleName: 'remark',
|
||||
});
|
||||
let navList = ref([
|
||||
{
|
||||
name: '全部',
|
||||
url: api.getWalletTransactionPage,
|
||||
title: 'title',
|
||||
numName: 'price',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '佣金',
|
||||
url: api.commissionDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '代理收益',
|
||||
url: api.agentEarningsDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'totalEarnings',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '分红',
|
||||
url: api.dividendDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
]);
|
||||
let typeArr = ref([
|
||||
{
|
||||
name: '收入',
|
||||
transactionType: 1,
|
||||
},
|
||||
{
|
||||
name: '支出',
|
||||
transactionType: 2,
|
||||
},
|
||||
]);
|
||||
let navIndex = ref(0);
|
||||
let typeIndex = ref(0);
|
||||
let marginTop = ref();
|
||||
let height = ref(0);
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
const windowHeight = sysInfo.windowHeight;
|
||||
marginTop.value = sysInfo.statusBarHeight + uni.upx2px(88) + uni.upx2px(54);
|
||||
let urlAPI = ref(api.getWallet);
|
||||
height.value =
|
||||
windowHeight -
|
||||
sysInfo.statusBarHeight -
|
||||
marginTop.value -
|
||||
uni.upx2px(204) -
|
||||
uni.upx2px(110) -
|
||||
uni.upx2px(48) -
|
||||
uni.upx2px(40);
|
||||
|
||||
const getData = () => {
|
||||
urlAPI.value().then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.num = proxy.$fen2yuan(res.data.balance);
|
||||
}
|
||||
});
|
||||
};
|
||||
let cardPages = ref(null);
|
||||
let detailList = ref([]);
|
||||
const getList = (mescroll) => {
|
||||
let urlApi = navList.value[navIndex.value].url;
|
||||
if (type.value == 5) {
|
||||
urlApi = navList.value[navIndex.value].url;
|
||||
} else {
|
||||
urlApi = dataObj.listApi;
|
||||
}
|
||||
let obj = {
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
transactionType: typeArr.value[typeIndex.value].transactionType,
|
||||
type: typeArr.value[typeIndex.value].transactionType,
|
||||
};
|
||||
if (type.value == 5 && navIndex.value == 0) {
|
||||
delete obj.transactionType;
|
||||
} else {
|
||||
delete obj.type;
|
||||
}
|
||||
urlApi(obj).then((res) => {
|
||||
if (res.code === 0) {
|
||||
let list = res.data.list || [];
|
||||
if (list.length && (type.value == 5 || type.value == 4)) {
|
||||
list.forEach((item) => {
|
||||
item[dataObj.numName || 'price'] = proxy.$fen2yuan(item[dataObj.numName || 'price']);
|
||||
});
|
||||
}
|
||||
if (mescroll.num == 1) detailList.value = [];
|
||||
detailList.value = detailList.value.concat(list);
|
||||
cardPages.value.getState(true, list.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
let type = ref(1);
|
||||
const dataChange = async () => {
|
||||
let userInfo = await sheep.$store('user').getInfo();
|
||||
if (type.value) {
|
||||
type.value = Number(type.value);
|
||||
switch (Number(type.value)) {
|
||||
case 1:
|
||||
dataObj.title = '绿色积分';
|
||||
dataObj.name = '我的积分';
|
||||
dataObj.btn = '去兑换';
|
||||
dataObj.num = userInfo.point;
|
||||
dataObj.url = '/pages/home/pay/seed';
|
||||
dataObj.listApi = pointsApi.integraldetai;
|
||||
dataObj.numName = 'changeAmount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 2:
|
||||
dataObj.title = '佣金';
|
||||
dataObj.name = '我的佣金';
|
||||
dataObj.num = userInfo.commission;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.commission;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 3:
|
||||
dataObj.title = '代理收益';
|
||||
dataObj.name = '我的代理收益';
|
||||
dataObj.num = userInfo.agentEarning;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.agentearnings;
|
||||
dataObj.numName = 'totalEarnings';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 4:
|
||||
dataObj.title = '消费金';
|
||||
dataObj.name = '我的消费金';
|
||||
dataObj.btn = '去消费';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.consumptionGold);
|
||||
dataObj.unit = '';
|
||||
dataObj.url = '/pages/goods/list';
|
||||
dataObj.listApi = pointsApi.consumptiongold;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 5:
|
||||
navChange(0);
|
||||
dataObj.title = '钱包';
|
||||
dataObj.name = '可提现金额';
|
||||
dataObj.btn = '去提现';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.wallet);
|
||||
dataObj.unit = '元';
|
||||
dataObj.url = '/pages/home/pay/withdraw';
|
||||
getData();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// getList();
|
||||
}
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
};
|
||||
onLoad(async (e) => {
|
||||
type.value = e.type;
|
||||
});
|
||||
onShow(() => {
|
||||
dataChange();
|
||||
});
|
||||
watch(
|
||||
() => [navIndex.value, typeIndex.value],
|
||||
() => {
|
||||
cardPages.value.mescrollTrigger();
|
||||
},
|
||||
);
|
||||
onShow(() => {
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
if (type.value == 5) {
|
||||
getData();
|
||||
}
|
||||
});
|
||||
const goUrl = () => {
|
||||
uni.navigateTo({
|
||||
url: dataObj.url,
|
||||
});
|
||||
};
|
||||
const navChange = (index) => {
|
||||
dataObj.numName = navList.value[index].numName;
|
||||
dataObj.sourceName = navList.value[index].sourceName;
|
||||
dataObj.titleName = navList.value[index].title;
|
||||
navIndex.value = index;
|
||||
};
|
||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
let paddingTop = ref();
|
||||
paddingTop.value = -(statusBarHeight + 44);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
position: relative;
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pages_con {
|
||||
position: relative;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
|
||||
.page_top {
|
||||
height: 204rpx;
|
||||
color: #1a1a1a;
|
||||
|
||||
.name {
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 68rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
|
||||
height: 52rpx;
|
||||
line-height: 52rpx;
|
||||
width: 112rpx;
|
||||
text-align: center;
|
||||
border-radius: 26rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.page_bottom {
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 0 16rpx;
|
||||
|
||||
.bottom_title {
|
||||
line-height: 110rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navItem {
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.activeNav {
|
||||
position: relative;
|
||||
color: var(--color32);
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(131deg, var(--color30) 0%, var(--color32) 100%), #fa7e31;
|
||||
border-radius: 4rpx;
|
||||
position: absolute;
|
||||
bottom: -14rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.typeItem {
|
||||
width: 76rpx;
|
||||
height: 40rpx;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 12rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.activeType {
|
||||
color: var(--color30);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<s-layout :bgStyle="{ color: 'var(--color1)' }" :title="dataObj.title">
|
||||
<view class="pages">
|
||||
<image class="w100 bg" :src="$url + 'home/points.png'" mode="widthFix" />
|
||||
<view class="pages_con">
|
||||
<view class="page_top c0" :style="{ marginTop: marginTop + 'px' }">
|
||||
<view class="size28 name">{{ dataObj.name }}</view>
|
||||
<view class="flex-row al-flex-end">
|
||||
<view class="num">{{ dataObj.num }}{{ dataObj.unit }}</view>
|
||||
<view class="btn size24 btn_bg" @click="goUrl">{{ dataObj.btn }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page_bottom bg24">
|
||||
<view class="bottom_title center c0"> 收支明细 </view>
|
||||
<view class="bottom_list flex-center al-flex-start ju-between" v-if="type == 5">
|
||||
<view class="flex-row">
|
||||
<view
|
||||
class="navItem"
|
||||
v-for="(v, i) in navList"
|
||||
:key="i"
|
||||
:class="{ activeNav: navIndex === i }"
|
||||
@click="navChange(i)"
|
||||
>
|
||||
<view class="size28">{{ v.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row">
|
||||
<view
|
||||
class="typeItem flex-center size24"
|
||||
v-for="(v, i) in typeArr"
|
||||
:key="i"
|
||||
:class="{ activeType: typeIndex === i }"
|
||||
@click="typeIndex = i"
|
||||
>
|
||||
{{ v.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height + 'px'">
|
||||
<view
|
||||
v-for="(v, i) in detailList"
|
||||
:key="i"
|
||||
class="flex-center ju-between p-b-34 p-t-32 border-bottom"
|
||||
>
|
||||
<view>
|
||||
<view class="size28 line40 m-b-10 c0">{{ v.remark }}</view>
|
||||
<view class="size24 c_999 line34">{{ formatDate(v.createTime) }}</view>
|
||||
</view>
|
||||
<view>{{ dataObj.numValue }}</view>
|
||||
<view class="size32 c_EE0A24">{{
|
||||
dataObj.sourceName && v[dataObj?.sourceName] === 1
|
||||
? (dataObj.sourceName ? '+' : '') + v[dataObj.numName]
|
||||
: (dataObj.sourceName ? '-' : '') + v[dataObj.numName]
|
||||
}}</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import sheep from '@/sheep';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import * as pointsApi from '@/sheep/api/home/points';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
|
||||
import { formatDate } from '@/sheep/helper/utils';
|
||||
let { proxy } = getCurrentInstance();
|
||||
let dataObj = reactive({
|
||||
title: '我的积分',
|
||||
name: '我的积分',
|
||||
num: 0,
|
||||
btn: '去提现',
|
||||
list: [],
|
||||
unit: '',
|
||||
url: '',
|
||||
numName: 'changeAmount',
|
||||
sourceName: 'bizType',
|
||||
listApi: pointsApi.integraldetai,
|
||||
});
|
||||
let navList = ref([
|
||||
{
|
||||
name: '全部',
|
||||
url: api.getWalletTransactionPage,
|
||||
numName: 'price',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '佣金',
|
||||
url: api.commissionDetailPage,
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '代理收益',
|
||||
url: api.agentEarningsDetailPage,
|
||||
numName: 'totalEarnings',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '分红',
|
||||
url: api.dividendDetailPage,
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
]);
|
||||
let typeArr = ref([
|
||||
{
|
||||
name: '收入',
|
||||
transactionType: 1,
|
||||
},
|
||||
{
|
||||
name: '支出',
|
||||
transactionType: 2,
|
||||
},
|
||||
]);
|
||||
let navIndex = ref(0);
|
||||
let typeIndex = ref(0);
|
||||
let marginTop = ref();
|
||||
let height = ref(0);
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
const windowHeight = sysInfo.windowHeight;
|
||||
marginTop.value = sysInfo.statusBarHeight + uni.upx2px(88) + uni.upx2px(54);
|
||||
let urlAPI = ref(api.getWallet);
|
||||
height.value =
|
||||
windowHeight -
|
||||
sysInfo.statusBarHeight -
|
||||
marginTop.value -
|
||||
uni.upx2px(204) -
|
||||
uni.upx2px(110) -
|
||||
uni.upx2px(48) -
|
||||
uni.upx2px(40);
|
||||
|
||||
const getData = () => {
|
||||
urlAPI.value().then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.num = proxy.$fen2yuan(res.data.balance);
|
||||
}
|
||||
});
|
||||
};
|
||||
let cardPages = ref(null);
|
||||
let detailList = ref([]);
|
||||
const getList = (mescroll) => {
|
||||
let urlApi = navList.value[navIndex.value].url;
|
||||
if (type.value == 5) {
|
||||
urlApi = navList.value[navIndex.value].url;
|
||||
} else {
|
||||
urlApi = dataObj.listApi;
|
||||
}
|
||||
let obj = {
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
transactionType: typeArr.value[typeIndex.value].transactionType,
|
||||
type: typeArr.value[typeIndex.value].transactionType,
|
||||
};
|
||||
if (type.value == 5 && navIndex.value == 0) {
|
||||
delete obj.transactionType;
|
||||
} else {
|
||||
delete obj.type;
|
||||
}
|
||||
urlApi(obj).then((res) => {
|
||||
if (res.code === 0) {
|
||||
let list = res.data.list || [];
|
||||
if (list.length && (type.value == 5 || type.value == 4)) {
|
||||
list.forEach((item) => {
|
||||
item[dataObj.numName || 'price'] = proxy.$fen2yuan(item[dataObj.numName || 'price']);
|
||||
});
|
||||
}
|
||||
if (mescroll.num == 1) detailList.value = [];
|
||||
detailList.value = detailList.value.concat(list);
|
||||
cardPages.value.getState(true, list.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
let type = ref(1);
|
||||
const dataChange = async () => {
|
||||
let userInfo = await sheep.$store('user').getInfo();
|
||||
if (type.value) {
|
||||
type.value = Number(type.value);
|
||||
switch (Number(type.value)) {
|
||||
case 1:
|
||||
dataObj.title = '绿色积分';
|
||||
dataObj.name = '我的积分';
|
||||
dataObj.btn = '去兑换';
|
||||
dataObj.num = userInfo.point;
|
||||
dataObj.url = '/pages/home/pay/seed';
|
||||
dataObj.listApi = pointsApi.integraldetai;
|
||||
dataObj.numName = 'changeAmount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 2:
|
||||
dataObj.title = '佣金';
|
||||
dataObj.name = '我的佣金';
|
||||
dataObj.num = userInfo.commission;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.commission;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 3:
|
||||
dataObj.title = '代理收益';
|
||||
dataObj.name = '我的代理收益';
|
||||
dataObj.num = userInfo.agentEarning;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.agentearnings;
|
||||
dataObj.numName = 'totalEarnings';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 4:
|
||||
dataObj.title = '消费金';
|
||||
dataObj.name = '我的消费金';
|
||||
dataObj.btn = '去消费';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.consumptionGold);
|
||||
dataObj.unit = '元';
|
||||
dataObj.url = '/pages/goods/list';
|
||||
dataObj.listApi = pointsApi.consumptiongold;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 5:
|
||||
navChange(0);
|
||||
dataObj.title = '钱包';
|
||||
dataObj.name = '可提现金额';
|
||||
dataObj.btn = '去提现';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.wallet);
|
||||
dataObj.unit = '元';
|
||||
dataObj.url = '/pages/home/pay/withdraw';
|
||||
getData();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// getList();
|
||||
}
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
};
|
||||
onLoad(async (e) => {
|
||||
type.value = e.type;
|
||||
});
|
||||
onShow(() => {
|
||||
dataChange();
|
||||
});
|
||||
watch(
|
||||
() => [navIndex.value, typeIndex.value],
|
||||
() => {
|
||||
cardPages.value.mescrollTrigger();
|
||||
},
|
||||
);
|
||||
onShow(() => {
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
if (type.value == 5) {
|
||||
getData();
|
||||
}
|
||||
});
|
||||
const goUrl = () => {
|
||||
uni.navigateTo({
|
||||
url: dataObj.url,
|
||||
});
|
||||
};
|
||||
const navChange = (index) => {
|
||||
dataObj.numName = navList.value[index].numName;
|
||||
dataObj.sourceName = navList.value[index].sourceName;
|
||||
navIndex.value = index;
|
||||
console.log(dataObj.numName);
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
position: relative;
|
||||
.bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
.pages_con {
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.page_top {
|
||||
height: 204rpx;
|
||||
color: #1a1a1a;
|
||||
|
||||
.name {
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 68rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
|
||||
height: 52rpx;
|
||||
line-height: 52rpx;
|
||||
width: 112rpx;
|
||||
text-align: center;
|
||||
border-radius: 26rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.page_bottom {
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 0 16rpx;
|
||||
|
||||
.bottom_title {
|
||||
line-height: 110rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.navItem {
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.activeNav {
|
||||
position: relative;
|
||||
color: var(--color32);
|
||||
&::before {
|
||||
content: '';
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(131deg, var(--color30) 0%, var(--color32) 100%), #fa7e31;
|
||||
border-radius: 4rpx;
|
||||
position: absolute;
|
||||
bottom: -14rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
.typeItem {
|
||||
width: 76rpx;
|
||||
height: 40rpx;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 12rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.activeType {
|
||||
color: var(--color30);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,487 @@
|
||||
<template>
|
||||
<s-layout :title="dataObj.title" navbar="inner">
|
||||
<view class="pages h100">
|
||||
<image
|
||||
class="w100 bg"
|
||||
:src="$url + 'home/points_1.png'"
|
||||
mode="widthFix"
|
||||
:style="{ top: paddingTop + 'px' }"
|
||||
/>
|
||||
<view class="pages_con">
|
||||
<!-- :style="{ marginTop: marginTop + 'px' }" -->
|
||||
<view class="page_top c0" v-if="type != 5">
|
||||
<view class="size28 name">{{ dataObj.name }}</view>
|
||||
<view class="flex-row al-flex-end">
|
||||
<view class="num">{{ dataObj.num }}{{ dataObj.unit }}</view>
|
||||
<view class="btn size24 btn_bg" @click="goUrl">{{ dataObj.btn }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money-box" v-if="type == 5">
|
||||
<view @click="go('/pages/home/rechargeRecord')">
|
||||
余额 <uni-icons type="right" color="#fff" />
|
||||
</view>
|
||||
<view class="size40 line92 m-t-2 flex-between">
|
||||
<text @click="goToast('充值', '/pages/home/recharge')">{{
|
||||
$fen2yuan(moneyObj.balance)
|
||||
}}</text>
|
||||
|
||||
<!-- <text class="btn size24 line52 p-x-20" @click="go('/pages/home/recharge')">去充值</text> -->
|
||||
</view>
|
||||
<view class="line m-t-30 m-b-26" />
|
||||
<view class="bottom flex ju-between">
|
||||
<view @click="goToast('提现', dataObj.url)">
|
||||
提现
|
||||
<view class="line54 m-t-12 size40 flex align-center">
|
||||
<text>{{ $fen2yuan(moneyObj.withdraw) }}</text>
|
||||
<!-- <text class="btn size20 line36 m-l-20 p-x-16" @click="goUrl">去提现</text> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="m-r-60" @click="go('/pages/home/noRelease')">
|
||||
未行权收益 <uni-icons type="right" color="#fff" />
|
||||
<view class="line54 m-t-12 size40">
|
||||
{{ $fen2yuan(moneyObj.norelease) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page_bottom bg24">
|
||||
<view class="bottom_title center c0"> 收支明细 </view>
|
||||
<view class="bottom_list flex-center al-flex-start ju-between" v-if="type == 5">
|
||||
<view class="flex-row">
|
||||
<view
|
||||
class="navItem"
|
||||
v-for="(v, i) in navList"
|
||||
:key="i"
|
||||
:class="{ activeNav: navIndex === i }"
|
||||
@click="navChange(i)"
|
||||
>
|
||||
<view class="size28">{{ v.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row">
|
||||
<view
|
||||
class="typeItem flex-center size24"
|
||||
v-for="(v, i) in typeArr"
|
||||
:key="i"
|
||||
:class="{ activeType: typeIndex === i }"
|
||||
@click="typeIndex = i"
|
||||
>
|
||||
{{ v.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height + 'px'">
|
||||
<view
|
||||
v-for="(v, i) in detailList"
|
||||
:key="i"
|
||||
class="flex-center ju-between p-b-34 p-t-32 border-bottom"
|
||||
>
|
||||
<view>
|
||||
<!-- <view v-if="navIndex === 2" class="size28 line40 m-b-10 c0">
|
||||
{{ sourceTypeObj[Number(v.sourceType) || 1] }}
|
||||
</view> -->
|
||||
<view class="size28 line40 m-b-10 c0">
|
||||
<!-- <text v-if="type === 4">{{ sourceTypeObj[Number(v.sourceType) || 1] }}</text>
|
||||
<text v-else>{{ v[dataObj.titleName] }}</text> -->
|
||||
<text>{{ v[dataObj.titleName] }}</text>
|
||||
</view>
|
||||
<view class="size24 c_999 line34">{{
|
||||
(formatDate(v.createTime) || '').slice(0, 10)
|
||||
}}</view>
|
||||
</view>
|
||||
<view>{{ dataObj.numValue }}</view>
|
||||
<view class="size32 c_EE0A24">
|
||||
{{
|
||||
dataObj.sourceName && v[dataObj?.sourceName] === 1
|
||||
? (dataObj.sourceName ? '+' : '') + v[dataObj.numName]
|
||||
: (dataObj.sourceName ? '-' : '') + v[dataObj.numName]
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import sheep from '@/sheep';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import * as pointsApi from '@/sheep/api/home/points';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
import { formatDate, sourceTypeObj } from '@/sheep/helper/utils';
|
||||
let { proxy } = getCurrentInstance();
|
||||
let moneyObj = ref({
|
||||
balance: 0,
|
||||
withdraw: 0,
|
||||
norelease: 0,
|
||||
});
|
||||
let dataObj = reactive({
|
||||
title: '钱包',
|
||||
name: '我的积分',
|
||||
num: 0,
|
||||
btn: '去提现',
|
||||
list: [],
|
||||
unit: '',
|
||||
url: '',
|
||||
numName: 'changeAmount',
|
||||
sourceName: 'bizType',
|
||||
listApi: pointsApi.integraldetai,
|
||||
titleName: 'remark',
|
||||
});
|
||||
|
||||
let navList = ref([
|
||||
{
|
||||
name: '全部',
|
||||
url: api.getWalletTransactionPage,
|
||||
title: 'title',
|
||||
numName: 'price',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '佣金',
|
||||
url: api.commissionDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '收益',
|
||||
url: api.agentEarningsDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'totalEarnings',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '分红',
|
||||
url: api.dividendDetailPage,
|
||||
title: 'remark',
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
]);
|
||||
let typeArr = ref([
|
||||
{
|
||||
name: '收入',
|
||||
transactionType: 1,
|
||||
},
|
||||
{
|
||||
name: '支出',
|
||||
transactionType: 2,
|
||||
},
|
||||
]);
|
||||
let navIndex = ref(0);
|
||||
let typeIndex = ref(0);
|
||||
let marginTop = ref();
|
||||
let height = ref(0);
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
const windowHeight = sysInfo.windowHeight;
|
||||
marginTop.value = sysInfo.statusBarHeight + uni.upx2px(88) + uni.upx2px(54);
|
||||
let urlAPI = ref(api.getWallet);
|
||||
let urlAPI2 = ref(api.getReleaseList);
|
||||
height.value =
|
||||
windowHeight -
|
||||
sysInfo.statusBarHeight -
|
||||
marginTop.value -
|
||||
uni.upx2px(204) -
|
||||
uni.upx2px(110) -
|
||||
uni.upx2px(48) -
|
||||
uni.upx2px(40);
|
||||
|
||||
const getData = () => {
|
||||
urlAPI.value().then((res) => {
|
||||
if (res.code === 0) {
|
||||
// dataObj.num = proxy.$fen2yuan(res.data.balance);
|
||||
dataObj = {
|
||||
...dataObj,
|
||||
...res.data,
|
||||
};
|
||||
moneyObj.value.balance = res.data.balance;
|
||||
moneyObj.value.withdraw = res.data.withdrawAmount;
|
||||
}
|
||||
});
|
||||
urlAPI2.value().then((res) => {
|
||||
if (res.code === 0) {
|
||||
moneyObj.value.norelease = res.data.remainingEarningAll;
|
||||
}
|
||||
});
|
||||
};
|
||||
let cardPages = ref(null);
|
||||
let detailList = ref([]);
|
||||
const getList = (mescroll) => {
|
||||
let urlApi = navList.value[navIndex.value].url;
|
||||
if (type.value == 5) {
|
||||
urlApi = navList.value[navIndex.value].url;
|
||||
} else {
|
||||
urlApi = dataObj.listApi;
|
||||
}
|
||||
let obj = {
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
transactionType: typeArr.value[typeIndex.value].transactionType,
|
||||
type: typeArr.value[typeIndex.value].transactionType,
|
||||
};
|
||||
if (type.value == 5 && navIndex.value == 0) {
|
||||
delete obj.transactionType;
|
||||
} else {
|
||||
delete obj.type;
|
||||
}
|
||||
urlApi(obj).then((res) => {
|
||||
if (res.code === 0) {
|
||||
let list = res.data.list || [];
|
||||
if (list.length && (type.value == 5 || type.value == 4)) {
|
||||
list.forEach((item) => {
|
||||
item[dataObj.numName || 'price'] = proxy.$fen2yuan(item[dataObj.numName || 'price']);
|
||||
});
|
||||
}
|
||||
if (mescroll.num == 1) detailList.value = [];
|
||||
detailList.value = detailList.value.concat(list);
|
||||
cardPages.value.getState(true, list.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
let type = ref(1);
|
||||
const dataChange = async () => {
|
||||
let userInfo = await sheep.$store('user').getInfo();
|
||||
if (type.value) {
|
||||
type.value = Number(type.value);
|
||||
switch (Number(type.value)) {
|
||||
case 1:
|
||||
dataObj.title = '绿色积分';
|
||||
dataObj.name = '我的积分';
|
||||
dataObj.btn = '去兑换';
|
||||
dataObj.num = userInfo.point;
|
||||
dataObj.url = '/pages/home/pay/seed';
|
||||
dataObj.listApi = pointsApi.integraldetai;
|
||||
dataObj.numName = 'changeAmount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 2:
|
||||
dataObj.title = '佣金';
|
||||
dataObj.name = '我的佣金';
|
||||
dataObj.num = userInfo.commission;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.commission;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 3:
|
||||
dataObj.title = '代理收益';
|
||||
dataObj.name = '我的代理收益';
|
||||
dataObj.num = userInfo.agentEarning;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.agentearnings;
|
||||
dataObj.numName = 'totalEarnings';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 4:
|
||||
dataObj.title = '消费金';
|
||||
dataObj.name = '我的消费金';
|
||||
dataObj.btn = '去消费';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.consumptionGold);
|
||||
dataObj.unit = '';
|
||||
dataObj.url = '/pages/goods/list';
|
||||
dataObj.listApi = pointsApi.consumptiongold;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 5:
|
||||
navChange(0);
|
||||
dataObj.title = '钱包';
|
||||
dataObj.name = '可提现金额';
|
||||
dataObj.btn = '去提现';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.wallet);
|
||||
dataObj.unit = '元';
|
||||
dataObj.url = '/pages/home/pay/withdraw';
|
||||
getData();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// getList();
|
||||
}
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
};
|
||||
onLoad(async (e) => {
|
||||
type.value = e.type;
|
||||
});
|
||||
onShow(() => {
|
||||
dataChange();
|
||||
});
|
||||
watch(
|
||||
() => [navIndex.value, typeIndex.value],
|
||||
() => {
|
||||
cardPages.value.mescrollTrigger();
|
||||
},
|
||||
);
|
||||
onShow(() => {
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
if (type.value == 5) {
|
||||
getData();
|
||||
}
|
||||
});
|
||||
const goUrl = () => {
|
||||
// if (type.value == 5) {
|
||||
// uni.showToast({
|
||||
// title: '功能暂未开放',
|
||||
// icon: 'none',
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: dataObj.url,
|
||||
});
|
||||
};
|
||||
const go = (url) => {
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
});
|
||||
};
|
||||
//充值体现弹框提示去跳转
|
||||
function goToast(typeTxt, url) {
|
||||
uni.showModal({
|
||||
// title: '',
|
||||
content: '是否去' + typeTxt,
|
||||
showCancel: true,
|
||||
success: (res) => {
|
||||
//用户点击确定
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
const navChange = (index) => {
|
||||
detailList.value = [];
|
||||
dataObj.numName = navList.value[index].numName;
|
||||
dataObj.sourceName = navList.value[index].sourceName;
|
||||
dataObj.titleName = navList.value[index].title;
|
||||
navIndex.value = index;
|
||||
};
|
||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
let paddingTop = ref();
|
||||
paddingTop.value = -(statusBarHeight + 44);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.money-box {
|
||||
//height: 344rpx;
|
||||
background: linear-gradient(to right, #fa8735 0%, #fe3b48 100%);
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 32rpx;
|
||||
padding: 40rpx 32rpx 16rpx;
|
||||
color: #fff;
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
background: rgba(216, 216, 216, 0.5);
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #366eee;
|
||||
border-radius: 50rpx;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.pages {
|
||||
position: relative;
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pages_con {
|
||||
position: relative;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
|
||||
.page_top {
|
||||
height: 204rpx;
|
||||
color: #1a1a1a;
|
||||
|
||||
.name {
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 68rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
|
||||
height: 52rpx;
|
||||
line-height: 52rpx;
|
||||
width: 112rpx;
|
||||
text-align: center;
|
||||
border-radius: 26rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.page_bottom {
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 0 16rpx;
|
||||
|
||||
.bottom_title {
|
||||
line-height: 110rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navItem {
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 32rpx;
|
||||
// color: #ffffff;
|
||||
}
|
||||
|
||||
.activeNav {
|
||||
position: relative;
|
||||
color: var(--color32);
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(131deg, var(--color30) 0%, var(--color32) 100%), #fa7e31;
|
||||
border-radius: 4rpx;
|
||||
position: absolute;
|
||||
bottom: -14rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.typeItem {
|
||||
width: 76rpx;
|
||||
height: 40rpx;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 12rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.activeType {
|
||||
color: var(--color30);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<s-layout title="充值" navbar="inner">
|
||||
<view class="pages">
|
||||
<image
|
||||
class="w100 bg_img"
|
||||
:src="$url + 'home/points_1.png'"
|
||||
mode="widthFix"
|
||||
:style="{ top: paddingTop + 'px' }"
|
||||
/>
|
||||
</view>
|
||||
<view class="relative m-t-28">
|
||||
<view class="head" :style="{ backgroundImage: `url(${$url + 'home/recharge_bg2.png'})` }">
|
||||
<view class="size28 line40 m-b-2"> 余额 </view>
|
||||
<view class="size68 line92">
|
||||
{{ $fen2yuan(balance) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="recharge-main">
|
||||
<view class="head-line"> 余额充值 </view>
|
||||
<view class="money-bar flex-wrap flex-between">
|
||||
<view
|
||||
class="item"
|
||||
:class="i === money_cur ? 'active' : 'item'"
|
||||
v-for="(v, i) in money_list"
|
||||
@click="changeMoney(v, i)"
|
||||
>
|
||||
¥{{ Number($fen2yuan(v.payPrice)) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="ipt-bar flex-between m-y-40 p-x-32">
|
||||
<text class="icon m-r-20">¥</text>
|
||||
<uni-easyinput
|
||||
v-model="money_value"
|
||||
type="number"
|
||||
:inputBorder="false"
|
||||
placeholder="请输入金额"
|
||||
@blur="iptBlur"
|
||||
/>
|
||||
</view>
|
||||
<view>
|
||||
<view class="size28 line38 m-b-20">充值说明</view>
|
||||
<view class="size24 line32 m-b-12"> 1、本次充值仅作为充值,无法提现。 </view>
|
||||
<view class="size24 line32"> 2、若遇到充值未到账,请联系客服。 </view>
|
||||
</view>
|
||||
<view class="btn m-t-248" @click="submit()"> 充值 </view>
|
||||
<view class="record size34 t-c m-y-36 line48"> </view>
|
||||
<!-- <view class="record size34 t-c m-y-36 line48" @click="go()">
|
||||
充值记录
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import sheep from '@/sheep';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import { fen2yuan } from '../../sheep/hooks/useGoods';
|
||||
import { SYSCONST } from '@/sheep/helper/const';
|
||||
import { toast } from '@/utils';
|
||||
const money_value = ref();
|
||||
const money_id = ref();
|
||||
const money_cur = ref(-1);
|
||||
const money_list = ref();
|
||||
let balance = ref(0);
|
||||
|
||||
let marginTop = ref();
|
||||
let height = ref(0);
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
const windowHeight = sysInfo.windowHeight;
|
||||
marginTop.value = sysInfo.statusBarHeight + uni.upx2px(88) + uni.upx2px(54);
|
||||
height.value =
|
||||
windowHeight -
|
||||
sysInfo.statusBarHeight -
|
||||
marginTop.value -
|
||||
uni.upx2px(204) -
|
||||
uni.upx2px(110) -
|
||||
uni.upx2px(48) -
|
||||
uni.upx2px(40);
|
||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
let paddingTop = ref();
|
||||
paddingTop.value = -(statusBarHeight + 44);
|
||||
|
||||
onShow(async () => {
|
||||
getList();
|
||||
getBalance();
|
||||
});
|
||||
let iptBlur = () => {
|
||||
money_id.value = '';
|
||||
};
|
||||
let getBalance = () => {
|
||||
api.getWallet().then((res) => {
|
||||
if (res.code === 0) {
|
||||
balance.value = res.data.balance;
|
||||
}
|
||||
});
|
||||
};
|
||||
let getList = () => {
|
||||
api.getWalletRechargeMoneyList({}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
money_list.value = res.data;
|
||||
}
|
||||
});
|
||||
};
|
||||
const changeMoney = (e, i) => {
|
||||
// console.log(e.id);
|
||||
money_cur.value = i;
|
||||
money_value.value = Number(fen2yuan(e.payPrice));
|
||||
money_id.value = e.id;
|
||||
};
|
||||
const submit = () => {
|
||||
if (!money_value.value) {
|
||||
uni.showToast({
|
||||
title: '请选择充值金额',
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
} else if (Number(money_value.value) < fen2yuan(money_list.value[0].payPrice)) {
|
||||
uni.showToast({
|
||||
title: '充值金额不能少于' + fen2yuan(money_list.value[0].payPrice),
|
||||
icon: 'none',
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
// console.log(Number(money_value.value));
|
||||
// console.log(money_id.value);
|
||||
let data = {};
|
||||
|
||||
if (money_id.value) {
|
||||
data.payPrice = Number(money_value.value);
|
||||
data.packageId = money_id.value;
|
||||
} else {
|
||||
data.payPrice = Number(money_value.value);
|
||||
}
|
||||
if (
|
||||
Number(money_value.value) > SYSCONST.MAX_PRICE / 100 ||
|
||||
Number(money_value.value) === SYSCONST.MAX_PRICE / 100
|
||||
) {
|
||||
toast('充值金额要小于' + SYSCONST.MAX_PRICE / 100);
|
||||
return;
|
||||
}
|
||||
|
||||
api.walletRechargeCreate(data).then((res) => {
|
||||
if (res.code === 0) {
|
||||
sheep.$router.redirect('/pages/pay/index', {
|
||||
id: res.data.payOrderId,
|
||||
type: 'recharge', // 充值
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
const go = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/home/rechargeRecord',
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pages {
|
||||
position: relative;
|
||||
|
||||
.bg_img {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
.head {
|
||||
min-height: 282rpx;
|
||||
// background: #366DEE url('/static/home/recharge_bg.png');
|
||||
background-size: 100% 282rpx;
|
||||
margin: 0 32rpx;
|
||||
border-radius: 12rpx;
|
||||
padding: 40rpx 32rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.recharge-main {
|
||||
background: #fff;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
padding: 46rpx 32rpx;
|
||||
margin-top: -120rpx;
|
||||
|
||||
.head-line {
|
||||
font-size: 28rpx;
|
||||
// color: #FFFFFF;
|
||||
line-height: 38rpx;
|
||||
border-left: 6rpx solid #fe3b48;
|
||||
padding-left: 18rpx;
|
||||
}
|
||||
|
||||
.money-bar {
|
||||
.item {
|
||||
width: 214rpx;
|
||||
height: 92rpx;
|
||||
line-height: 92rpx;
|
||||
text-align: center;
|
||||
background: #ffefe5;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 40rpx;
|
||||
color: #fb4d32;
|
||||
}
|
||||
|
||||
.active {
|
||||
background: #fb4d32;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.ipt-bar {
|
||||
height: 134rpx;
|
||||
background: #ffefe5;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.icon {
|
||||
color: #fe3b48;
|
||||
}
|
||||
|
||||
// ::v-deep .uni-input-input {
|
||||
// color: #fff;
|
||||
// }
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 100rpx;
|
||||
background: linear-gradient(to right, #fa8735 0%, #fe3b48 100%);
|
||||
border-radius: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.record {
|
||||
text-align: center;
|
||||
color: #366dee;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,412 @@
|
||||
<template>
|
||||
<s-layout title="充值消费记录" navbar="inner">
|
||||
<view class="pages h100">
|
||||
<!-- <image class="w100 bg" :src="$url + 'home/points.png'" mode="widthFix" :style="{top: paddingTop + 'px'}" /> -->
|
||||
<view class="pages_con">
|
||||
<view class="h_28" />
|
||||
<view class="page_bottom bg24">
|
||||
<!-- <view class="bottom_title center c0"> 待释放明细 </view> -->
|
||||
<view class="bottom_list flex-center al-flex-start ju-between">
|
||||
<view class="flex-row">
|
||||
<view
|
||||
class="navItem"
|
||||
v-for="(v, i) in navList"
|
||||
:key="i"
|
||||
:class="{ activeNav: navIndex === i }"
|
||||
@click="navChange(i)"
|
||||
>
|
||||
<view class="size28">{{ v.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="flex-row">
|
||||
<view class="typeItem flex-center size24" v-for="(v, i) in typeArr" :key="i"
|
||||
:class="{ activeType: typeIndex === i }" @click="typeIndex = i">
|
||||
{{ v.name }}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view>
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height + 'px'">
|
||||
<view
|
||||
v-for="(v, i) in detailList"
|
||||
:key="i"
|
||||
class="flex-center ju-between p-b-34 p-t-32 border-bottom"
|
||||
>
|
||||
<view>
|
||||
<view class="size28 line40 m-b-10 c0">{{ v.name }}</view>
|
||||
<view class="size24 c_999 line34">{{ formatDate(v.time) }}</view>
|
||||
</view>
|
||||
<view>{{ dataObj.numValue }}</view>
|
||||
<view class="size32 c_EE0A24">
|
||||
{{ $fen2yuan(v.price) }}
|
||||
</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import sheep from '@/sheep';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import * as pointsApi from '@/sheep/api/home/points';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
|
||||
import { formatDate } from '@/sheep/helper/utils';
|
||||
let { proxy } = getCurrentInstance();
|
||||
// 1-商场区域代理订单,2-AI店铺区域代理订单,3-AI店铺代理收益,4:AI店铺团队分红,5-营销活动随机奖励
|
||||
let typeObj = {
|
||||
1: '商场区域代理订单',
|
||||
2: 'AI店铺区域代理订单',
|
||||
3: 'AI店铺代理收益',
|
||||
4: 'AI店铺团队分红',
|
||||
5: '营销活动随机奖励',
|
||||
};
|
||||
let dataObj = reactive({
|
||||
title: '充值记录',
|
||||
name: '我的积分',
|
||||
num: 0,
|
||||
btn: '去提现',
|
||||
list: [],
|
||||
unit: '',
|
||||
url: '',
|
||||
numName: 'changeAmount',
|
||||
sourceName: 'bizType',
|
||||
listApi: pointsApi.integraldetai,
|
||||
titleName: 'remark',
|
||||
});
|
||||
let navList = ref([
|
||||
{
|
||||
name: '充值',
|
||||
url: api.getWalletTransactionPage,
|
||||
title: 'title',
|
||||
numName: 'price',
|
||||
sourceName: '',
|
||||
},
|
||||
{
|
||||
name: '消费',
|
||||
url: api.walletRransactionExpense,
|
||||
title: 'remark',
|
||||
numName: 'amount',
|
||||
sourceName: '',
|
||||
},
|
||||
// {
|
||||
// name: '代理收益',
|
||||
// url: api.agentEarningsDetailPage,
|
||||
// title: 'remark',
|
||||
// numName: 'totalEarnings',
|
||||
// sourceName: '',
|
||||
// },
|
||||
// {
|
||||
// name: '分红',
|
||||
// url: api.dividendDetailPage,
|
||||
// title: 'remark',
|
||||
// numName: 'amount',
|
||||
// sourceName: '',
|
||||
// },
|
||||
]);
|
||||
let typeArr = ref([
|
||||
{
|
||||
name: '收入',
|
||||
transactionType: 1,
|
||||
},
|
||||
{
|
||||
name: '支出',
|
||||
transactionType: 2,
|
||||
},
|
||||
]);
|
||||
let navIndex = ref(0);
|
||||
let typeIndex = ref(0);
|
||||
let marginTop = ref();
|
||||
let height = ref(0);
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
const windowHeight = sysInfo.windowHeight;
|
||||
marginTop.value = sysInfo.statusBarHeight + uni.upx2px(88) + uni.upx2px(54);
|
||||
let urlAPI = ref(api.getWallet);
|
||||
height.value =
|
||||
windowHeight -
|
||||
sysInfo.statusBarHeight -
|
||||
marginTop.value -
|
||||
uni.upx2px(204) -
|
||||
uni.upx2px(110) -
|
||||
uni.upx2px(48) -
|
||||
uni.upx2px(40);
|
||||
|
||||
const getData = () => {
|
||||
urlAPI.value().then((res) => {
|
||||
if (res.code === 0) {
|
||||
dataObj.num = proxy.$fen2yuan(res.data.balance);
|
||||
}
|
||||
});
|
||||
};
|
||||
let cardPages = ref(null);
|
||||
let detailList = ref([]);
|
||||
const getList = (mescroll) => {
|
||||
console.log(navIndex.value);
|
||||
let obj = {
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
};
|
||||
|
||||
if (navIndex.value === 0) {
|
||||
api.walletRechargePage(obj).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
let list = res.data.list || [];
|
||||
|
||||
if (mescroll.num == 1) detailList.value = [];
|
||||
detailList.value = detailList.value.concat(list);
|
||||
detailList.value.forEach((e) => {
|
||||
e.name = e.payChannelName;
|
||||
e.time = e.payTime;
|
||||
e.price = e.payPrice;
|
||||
});
|
||||
cardPages.value.getState(true, list.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
});
|
||||
} else if (navIndex.value === 1) {
|
||||
api.walletRransactionExpense(obj).then((res) => {
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
let list = res.data.list || [];
|
||||
|
||||
if (mescroll.num == 1) detailList.value = [];
|
||||
detailList.value = detailList.value.concat(list);
|
||||
detailList.value.forEach((e) => {
|
||||
e.name = e.title;
|
||||
e.time = e.createTime;
|
||||
e.price = e.price;
|
||||
});
|
||||
cardPages.value.getState(true, list.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
let type = ref(1);
|
||||
const dataChange = async () => {
|
||||
let userInfo = await sheep.$store('user').getInfo();
|
||||
if (type.value) {
|
||||
type.value = Number(type.value);
|
||||
switch (Number(type.value)) {
|
||||
case 1:
|
||||
dataObj.title = '绿色积分';
|
||||
dataObj.name = '我的积分';
|
||||
dataObj.btn = '去兑换';
|
||||
dataObj.num = userInfo.point;
|
||||
dataObj.url = '/pages/home/pay/seed';
|
||||
dataObj.listApi = pointsApi.integraldetai;
|
||||
dataObj.numName = 'changeAmount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 2:
|
||||
dataObj.title = '佣金';
|
||||
dataObj.name = '我的佣金';
|
||||
dataObj.num = userInfo.commission;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.commission;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 3:
|
||||
dataObj.title = '代理收益';
|
||||
dataObj.name = '我的代理收益';
|
||||
dataObj.num = userInfo.agentEarning;
|
||||
dataObj.unit = '元';
|
||||
dataObj.listApi = pointsApi.agentearnings;
|
||||
dataObj.numName = 'totalEarnings';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 4:
|
||||
dataObj.title = '消费金';
|
||||
dataObj.name = '我的消费金';
|
||||
dataObj.btn = '去消费';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.consumptionGold);
|
||||
dataObj.unit = '';
|
||||
dataObj.url = '/pages/goods/list';
|
||||
dataObj.listApi = pointsApi.consumptiongold;
|
||||
dataObj.numName = 'amount';
|
||||
dataObj.sourceName = '';
|
||||
break;
|
||||
case 5:
|
||||
navChange(0);
|
||||
dataObj.title = '钱包';
|
||||
dataObj.name = '可提现金额';
|
||||
dataObj.btn = '去提现';
|
||||
dataObj.num = proxy.$fen2yuan(userInfo.wallet);
|
||||
dataObj.unit = '元';
|
||||
dataObj.url = '/pages/home/pay/withdraw';
|
||||
getData();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// getList();
|
||||
}
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
};
|
||||
onLoad(async (e) => {
|
||||
type.value = e.type;
|
||||
});
|
||||
onShow(() => {
|
||||
dataChange();
|
||||
});
|
||||
watch(
|
||||
() => [navIndex.value, typeIndex.value],
|
||||
() => {
|
||||
cardPages.value.mescrollTrigger();
|
||||
},
|
||||
);
|
||||
onShow(() => {
|
||||
if (cardPages.value) {
|
||||
cardPages.value.mescrollTrigger();
|
||||
}
|
||||
if (type.value == 5) {
|
||||
getData();
|
||||
}
|
||||
});
|
||||
const goUrl = () => {
|
||||
// if (type.value == 5) {
|
||||
// uni.showToast({
|
||||
// title: '功能暂未开放',
|
||||
// icon: 'none',
|
||||
// })
|
||||
// return;
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: dataObj.url,
|
||||
});
|
||||
};
|
||||
const go = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/home/noRelease',
|
||||
});
|
||||
};
|
||||
const navChange = (index) => {
|
||||
dataObj.numName = navList.value[index].numName;
|
||||
dataObj.sourceName = navList.value[index].sourceName;
|
||||
dataObj.titleName = navList.value[index].title;
|
||||
navIndex.value = index;
|
||||
};
|
||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
let paddingTop = ref();
|
||||
paddingTop.value = -(statusBarHeight + 44);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.money-box {
|
||||
//height: 344rpx;
|
||||
background: linear-gradient(to right, #75aff6 0%, #366dee 99%);
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 32rpx;
|
||||
padding: 40rpx 32rpx 16rpx;
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #366eee;
|
||||
border-radius: 50rpx;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.pages {
|
||||
position: relative;
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pages_con {
|
||||
position: relative;
|
||||
padding: 0 40rpx;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
|
||||
.page_top {
|
||||
height: 204rpx;
|
||||
color: #1a1a1a;
|
||||
|
||||
.name {
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 68rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: linear-gradient(131deg, #f7772e 0%, #ee0a24 100%);
|
||||
height: 52rpx;
|
||||
line-height: 52rpx;
|
||||
width: 112rpx;
|
||||
text-align: center;
|
||||
border-radius: 26rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.page_bottom {
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 16rpx;
|
||||
|
||||
.bottom_title {
|
||||
line-height: 110rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navItem {
|
||||
margin-bottom: 20rpx;
|
||||
margin-right: 32rpx;
|
||||
// color: #ffffff;
|
||||
}
|
||||
|
||||
.activeNav {
|
||||
position: relative;
|
||||
color: var(--color32);
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(131deg, var(--color30) 0%, var(--color32) 100%), #fa7e31;
|
||||
border-radius: 4rpx;
|
||||
position: absolute;
|
||||
bottom: -14rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.typeItem {
|
||||
width: 76rpx;
|
||||
height: 40rpx;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 12rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.activeType {
|
||||
color: var(--color30);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,322 @@
|
||||
<template>
|
||||
<s-layout :navbar="navBar" title="金种子">
|
||||
<view class="pages w100" :style="{ marginTop: -height + 'px' }">
|
||||
<view class="w100">
|
||||
<image class="w100" :src="$url + 'home/seed_1.png'" mode="widthFix" />
|
||||
</view>
|
||||
<view class="content" :style="{ marginTop: -top + 'px' }">
|
||||
<view class="con">
|
||||
<view class="conBox" v-if="load">
|
||||
<view class="conBg"> </view>
|
||||
<view class="p-x-20 p-y-40">
|
||||
<view class="size32"> 我的金种子 </view>
|
||||
<view class="flex ju-between al-flex-end m-b-44">
|
||||
<view class="c_primary size80 weight_900">{{ dataObj.myCount || 0 }}</view>
|
||||
<view class="flex-center">
|
||||
<view class="fang"></view>
|
||||
<view class="size28"
|
||||
><span class="m-r-4">当日价格</span>{{ dataObj.todayPrice || 0 }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row m-b-30" style="flex-wrap: wrap">
|
||||
<view
|
||||
class="m-b-34 flex-row al-flex-end"
|
||||
style="width: 50%"
|
||||
v-for="(v, i) in arr"
|
||||
:key="i"
|
||||
>
|
||||
<view class="flex-center ju-flex-start">
|
||||
<view class="icon m-r-8">
|
||||
<image class="w100" :src="$url + v.icon" mode="widthFix" />
|
||||
</view>
|
||||
<view>
|
||||
<view class="size24 c32">{{ v.title }}</view>
|
||||
<view class="size36">{{ dataObj[v.value] || 0 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="w_96 h_44 c32 size24 flex-center radius22"
|
||||
v-if="v.url"
|
||||
@click="utils.go(v.url)"
|
||||
style="background-color: #ffe8e5"
|
||||
>去兑换</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-b-50" v-if="dataObj?.premiumList?.length">
|
||||
<view class="title c32 f500 m-b-40 size32">金种子溢价表</view>
|
||||
<view class="wrap">
|
||||
<card_echart :options="chartOption" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="dataObj?.dividendPool?.length">
|
||||
<view class="title c32 f500 m-b-40 size32">生态分红池</view>
|
||||
<view class="wrap">
|
||||
<card_echart :options="chartOption1" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import card_echart from '@/components/card_echart/card_echart.vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import * as echarts from 'echarts';
|
||||
import * as api from '@/sheep/api/home/index.js';
|
||||
import { onPageScroll } from '@dcloudio/uni-app';
|
||||
let navBar = ref('inner');
|
||||
let scrollTop = ref(0);
|
||||
onPageScroll((e) => {
|
||||
//console.log(e)
|
||||
scrollTop.value = e.scrollTop;
|
||||
if (e.scrollTop > 20) {
|
||||
navBar.value = 'normal';
|
||||
} else {
|
||||
navBar.value = 'inner';
|
||||
}
|
||||
});
|
||||
let { proxy } = getCurrentInstance();
|
||||
let dataObj = reactive({});
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
let top = ref(0);
|
||||
top.value = `${sysInfo.statusBarHeight + 44 + uni.upx2px(295)}`;
|
||||
// sysInfo.statusBarHeight
|
||||
let arr = ref([
|
||||
{
|
||||
icon: 'home/seed1_1.png',
|
||||
title: '核销数量',
|
||||
value: 'writeOffCount',
|
||||
},
|
||||
{
|
||||
icon: 'home/seed2_1.png',
|
||||
title: '绿色积分',
|
||||
value: 'exchangeCount',
|
||||
url: '/pages/home/pay/seed',
|
||||
},
|
||||
{
|
||||
icon: 'home/seed3_1.png',
|
||||
title: '分红',
|
||||
value: 'dividendCount',
|
||||
},
|
||||
{
|
||||
icon: 'home/seed5_1.png',
|
||||
title: '增量积分',
|
||||
value: 'incrementPoint',
|
||||
url: '/pages/home/pay/seed?type=1',
|
||||
},
|
||||
]);
|
||||
const chartOption = reactive({
|
||||
// 添加grid配置,实现间距自适应
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
top: '0',
|
||||
height: 150,
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
axisLabel: {
|
||||
color: '#BBBBBB',
|
||||
interval: 0,
|
||||
fontSize: 10,
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#D9D9D9',
|
||||
type: 'dashed',
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#D9D9D9',
|
||||
type: 'dashed',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#BBBBBB',
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [820, 932, 901, 934, 1290, 1330, 1320],
|
||||
smooth: true,
|
||||
type: 'line',
|
||||
symbol: 'none', // 不显示数据点
|
||||
lineStyle: {
|
||||
color: '#FA7E31',
|
||||
},
|
||||
triggerEvent: true, // 确保事件可以被触发
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#FF2B2B' },
|
||||
{ offset: 1, color: '#FFFFFF' },
|
||||
]),
|
||||
},
|
||||
},
|
||||
],
|
||||
// 移动端优化配置
|
||||
animation: false, // 禁用动画以提高性能
|
||||
touchMoveThreshold: 10, // 增加触摸移动阈值,避免误触
|
||||
roam: false, // 禁止缩放和平移
|
||||
});
|
||||
|
||||
const chartOption1 = reactive({
|
||||
// 添加grid配置,实现间距自适应
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '6%',
|
||||
top: '0',
|
||||
height: 150,
|
||||
},
|
||||
xAxis: {
|
||||
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
axisTick: { show: false },
|
||||
axisLine: { show: false },
|
||||
axisLabel: {
|
||||
color: '#BBBBBB',
|
||||
interval: 0,
|
||||
fontSize: 10,
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#D9D9D9',
|
||||
type: 'dashed',
|
||||
},
|
||||
},
|
||||
axisTick: { show: false },
|
||||
axisLine: { show: false },
|
||||
axisLabel: { show: false },
|
||||
},
|
||||
color: ['#e54035'],
|
||||
series: [
|
||||
{
|
||||
name: 'hill',
|
||||
type: 'pictorialBar',
|
||||
barCategoryGap: '0%',
|
||||
// symbol: 'path://M0,10 L10,10 L5,0 L0,10 z',
|
||||
symbol: 'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z',
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
|
||||
{ offset: 0, color: '#F7772E' },
|
||||
{ offset: 1, color: '#EE0A24' },
|
||||
]),
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
opacity: 1,
|
||||
},
|
||||
},
|
||||
data: [123, 60, 25, 18, 12, 123, 60, 25],
|
||||
z: 10,
|
||||
},
|
||||
],
|
||||
});
|
||||
let load = ref(false);
|
||||
const getData = () => {
|
||||
api.goldSeedIndex().then((res) => {
|
||||
load.value = true;
|
||||
if (res.code === 0) {
|
||||
dataObj = res.data;
|
||||
let arr = dataObj.premiumList.map((item) => item.month);
|
||||
let arr1 = dataObj.premiumList.map((item) => item.data);
|
||||
let arr2 = dataObj.dividendPool.map((item) => item.month);
|
||||
let arr3 = dataObj.dividendPool.map((item) => item.data);
|
||||
chartOption.xAxis.data = arr;
|
||||
chartOption.series[0].data = arr1;
|
||||
chartOption1.xAxis.data = arr2;
|
||||
chartOption1.series[0].data = arr3;
|
||||
}
|
||||
});
|
||||
};
|
||||
onShow(() => {
|
||||
getData();
|
||||
});
|
||||
let height = ref(0);
|
||||
height.value = sysInfo.statusBarHeight + uni.upx2px(88);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
// position: relative;
|
||||
|
||||
.content {
|
||||
// position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
.con {
|
||||
padding: 0 40rpx;
|
||||
padding-bottom: 100rpx;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.conBox {
|
||||
background: #ffffff;
|
||||
backdrop-filter: blur(32px);
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
// height: 100%;
|
||||
.conBg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -1;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.icon {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
}
|
||||
.wrap {
|
||||
height: 350rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.color_585654 {
|
||||
color: #585654;
|
||||
}
|
||||
.weight_900 {
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.fang {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background: linear-gradient(127deg, #f7772e 18%, #ee0a24 122%);
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
.title {
|
||||
position: relative;
|
||||
padding-left: 16rpx;
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
left: 0;
|
||||
width: 4rpx;
|
||||
height: 70%;
|
||||
background: linear-gradient(270deg, #f7772e 0%, #ee0a24 99%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<s-layout title="邀请好友">
|
||||
<view class="pages c34">
|
||||
<view class="con w100" id="conId">
|
||||
<view class="w100 conBg radius-8 hidden">
|
||||
<image
|
||||
class="w100"
|
||||
:src="$url + 'home/invite1.png'"
|
||||
mode="widthFix"
|
||||
@longpress="saveImg"
|
||||
/>
|
||||
</view>
|
||||
<view class="con_center w100 radius-8">
|
||||
<view class="flex-center ju-flex-start">
|
||||
<view class="head">
|
||||
<image v-if="dataInfo?.avatar" :src="dataInfo?.avatar" mode="scaleToFill" />
|
||||
<image v-else :src="`${$url}home/head.png`" mode="scaleToFill" />
|
||||
</view>
|
||||
<view>
|
||||
<view class="con_name size32 f700 c0"
|
||||
>{{ dataInfo?.nickname || '昵称' }},邀请您加入优购商城</view
|
||||
>
|
||||
<view class="size28 c0">财富未来 全新出发</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-center f700 size48 m-t-68 m-b-28 c0">
|
||||
<view>邀请码</view>
|
||||
<view>|</view>
|
||||
<view>{{ inviteinfo?.inviteCode }}</view>
|
||||
</view>
|
||||
<view class="flex-center">
|
||||
<view class="img m-b-22">
|
||||
<Qrcode
|
||||
ref="qrcodeRef"
|
||||
:size="300"
|
||||
@generated="onQrGenerated"
|
||||
@longpress="saveServiceQrcode"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="center size20 c_999">扫描二维码, 注册并登录APP</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-btn m-t-68" @click="saveImg">保存到相册</view>
|
||||
</view>
|
||||
</s-layout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Qrcode from './components/Qrcode';
|
||||
import sheep from '@/sheep';
|
||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, watch, nextTick } from 'vue';
|
||||
import * as api from '@/sheep/api/home/index';
|
||||
let { proxy } = getCurrentInstance();
|
||||
let dataInfo = ref({});
|
||||
let inviteinfo = ref({});
|
||||
let qrCodeUrl = ref(); //二维码地址
|
||||
let qrcodeRef = ref();
|
||||
|
||||
onLoad(() => {});
|
||||
//获取二维码
|
||||
function generateQRCode(text) {
|
||||
nextTick(() => {
|
||||
qrcodeRef.value.createQRcode(text);
|
||||
});
|
||||
}
|
||||
const getData = () => {
|
||||
sheep
|
||||
.$store('user')
|
||||
.getInfo()
|
||||
.then((res) => {
|
||||
dataInfo.value = res;
|
||||
});
|
||||
};
|
||||
const getinviteinfo = () => {
|
||||
api.inviteinfo().then((res) => {
|
||||
inviteinfo.value = res.data;
|
||||
generateQRCode(res.data.inviteUrl);
|
||||
// generateQRCode('http://mall.suwizihe.org.cn:5010/h5/#/?code=' + inviteinfo.value.inviteCode);
|
||||
});
|
||||
};
|
||||
getinviteinfo();
|
||||
getData();
|
||||
let conRef = ref();
|
||||
const saveServiceQrcode = () => {
|
||||
qrcodeRef.value.savePhoto();
|
||||
};
|
||||
const saveImg = async () => {
|
||||
// uni.saveImageToPhotosAlbum({
|
||||
// filePath: 'http://mall.suwizihe.org.cn:5010/h5/#/?code=' + inviteinfo.value.inviteCode,//qrcodeUrl.value
|
||||
// success: () => {
|
||||
// uni.showToast({
|
||||
// title: '保存成功!',
|
||||
// });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log(err);
|
||||
// uni.showToast({ title: '保存失败', icon: 'none' });
|
||||
// },
|
||||
// });
|
||||
qrcodeRef.value.savePhoto();
|
||||
// if (qrcodeUrl.value) {
|
||||
|
||||
// return;
|
||||
// }
|
||||
// if (qrcodeRef.value?.savePhoto) {
|
||||
// qrcodeRef.value.savePhoto();
|
||||
// } else {
|
||||
// uni.showToast({ title: '二维码未生成', icon: 'none' });
|
||||
// }
|
||||
};
|
||||
const onQrGenerated = (path) => {
|
||||
qrCodeUrl.value = path;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
height: 100vh;
|
||||
padding: 32rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.con {
|
||||
position: relative;
|
||||
|
||||
.conBg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.con_center {
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
position: relative;
|
||||
padding: 56rpx 28rpx;
|
||||
box-sizing: border-box;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.head {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.img {
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.con_name {
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,344 @@
|
||||
<template>
|
||||
<s-pages title="我的社员">
|
||||
<!-- 头部 -->
|
||||
<view class="header" :style="{ backgroundImage: 'url(' + $url + 'home/staff2.png' + ')' }">
|
||||
<view class="header-content">
|
||||
<view class="title"> 我的社员 </view>
|
||||
<view class="sum">
|
||||
<template v-for="(item, i) in sum_list" :key="i">
|
||||
<view class="sum-item">
|
||||
<view class="num">
|
||||
{{ item.value }}
|
||||
</view>
|
||||
<view class="text">
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="sum-divider" v-if="i < sum_list.length - 1" />
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="m-t-16 m-x-40">
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height">
|
||||
<view class="list-item" v-for="(item, i) in list" :key="i">
|
||||
<view class="avatar">
|
||||
<image v-if="item.memberAvatar" :src="item.memberAvatar" />
|
||||
<image v-else :src="`${$url}home/avatar.png`" />
|
||||
<!-- v-if="item.type !== 0" -->
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="section-1 flex-between">
|
||||
<view class="left flex-center">
|
||||
<view class="name">
|
||||
<text v-if="item.realStatus === 0">{{ item.memberPhone }}</text>
|
||||
<text v-if="item.realStatus === 1">{{ item.memberNickname }}</text>
|
||||
<text>(ID:{{ item.memberUserId }})</text>
|
||||
</view>
|
||||
<view class="tag flex-center" v-if="item.levelId > 0">
|
||||
<image :src="`${$url}home/${item.levelType}.svg`" class="w_24 h_22 m-r-6" />
|
||||
<text :style="{ color: item.levelColor }">{{ item.levelText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right"> 创收 </view>
|
||||
</view>
|
||||
<view class="section-2 flex-between">
|
||||
<view class="time">
|
||||
{{ item.joinTime.join('-') }}
|
||||
</view>
|
||||
<view class="money">
|
||||
{{ $fen2yuan(item.totalRevenue) }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line" />
|
||||
</view>
|
||||
</view>
|
||||
</card_mescroll>
|
||||
</view>
|
||||
</s-pages>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
getCurrentInstance,
|
||||
watch,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
import card_mescroll from '@/components/card_pages/card_mescroll.vue';
|
||||
import * as api from '@/sheep/api/home/index';
|
||||
import {
|
||||
type
|
||||
} from '@/uni_modules/uni-forms/components/uni-forms/utils';
|
||||
import {
|
||||
color
|
||||
} from 'echarts';
|
||||
let {
|
||||
proxy
|
||||
} = getCurrentInstance();
|
||||
let list = ref([]);
|
||||
let cardPages = ref(null);
|
||||
let height = ref('100%');
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
height.value = sysInfo.windowHeight - sysInfo.statusBarHeight - uni.upx2px(88) + 'px';
|
||||
const sum_list = ref([{
|
||||
text: '总人数',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
text: '推荐人数',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
text: '新增人数',
|
||||
value: 0,
|
||||
},
|
||||
]);
|
||||
|
||||
const leave_obj = ref([{
|
||||
type: 1,
|
||||
text: '达人店长',
|
||||
color: '#E1C37A',
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
text: '明星店长',
|
||||
color: '#B49DF4',
|
||||
},
|
||||
{
|
||||
type: 3,
|
||||
text: '超级店长',
|
||||
color: '#43D787',
|
||||
},
|
||||
{
|
||||
type: 4,
|
||||
text: '店长',
|
||||
color: '#FB8ED5',
|
||||
},
|
||||
// {
|
||||
// type: 5,
|
||||
// text: '',
|
||||
// color: '#3EA4F9',
|
||||
// }
|
||||
]);
|
||||
// 等级配置安全获取
|
||||
const getLevelCfg = (id) => {
|
||||
const num = Number(id);
|
||||
const byType = leave_obj.value.find((e) => e.type === num);
|
||||
const byIndex = leave_obj.value[(num || 1) - 1];
|
||||
return (
|
||||
byType ||
|
||||
byIndex ||
|
||||
leave_obj.value[0] || {
|
||||
type: 1,
|
||||
text: '店长',
|
||||
color: '#FFFFFF',
|
||||
}
|
||||
);
|
||||
};
|
||||
onLoad(() => {
|
||||
getTeamStats();
|
||||
});
|
||||
//获取人数统计
|
||||
function getTeamStats() {
|
||||
api.getTeamStats({}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
let data = res.data;
|
||||
if (!data) return;
|
||||
sum_list.value[0].value = data.totalCount || 0;
|
||||
sum_list.value[1].value = data.recommendCount || 0;
|
||||
sum_list.value[2].value = data.newCount || 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
const getList = async (mescroll) => {
|
||||
let res = await api.teamPage({
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
});
|
||||
// console.log(res);
|
||||
if (res.code === 0) {
|
||||
let data = res.data.list || [];
|
||||
if (mescroll.num == 1) list.value = [];
|
||||
data.forEach((item) => {
|
||||
const cfg = getLevelCfg(item.levelId)
|
||||
Object.assign(item, {
|
||||
levelType: cfg.type,
|
||||
levelText: cfg.text,
|
||||
levelColor: cfg.color,
|
||||
memberNickname: maskName(item.memberNickname),
|
||||
registerTime: item.joinTime.join('-')
|
||||
})
|
||||
const phone = typeof item.memberPhone === 'string' ? item.memberPhone : ''
|
||||
item.memberPhone = judjeRegisteTime(item) ? phone : (phone ? phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : '')
|
||||
});
|
||||
// console.log(data);
|
||||
list.value = list.value.concat(data);
|
||||
|
||||
cardPages.value.getState(true, data.length);
|
||||
} else {
|
||||
cardPages.value.getState(false);
|
||||
}
|
||||
};
|
||||
//判断注册时间是否小于三天
|
||||
function judjeRegisteTime(item) {
|
||||
const jt = item.joinTime;
|
||||
let d = null;
|
||||
if (Array.isArray(jt) && jt.length) {
|
||||
const y = Number(jt[0]) || 0;
|
||||
const m = (Number(jt[1]) || 1) - 1;
|
||||
const day = Number(jt[2]) || 1;
|
||||
const h = Number(jt[3]) || 0;
|
||||
const min = Number(jt[4]) || 0;
|
||||
const s = Number(jt[5]) || 0;
|
||||
d = new Date(y, m, day, h, min, s);
|
||||
} else {
|
||||
d = new Date(item.registerTime);
|
||||
}
|
||||
const threeDaysMs = 3 * 24 * 60 * 60 * 1000;
|
||||
return d instanceof Date && !isNaN(d.getTime()) && (Date.now() - d.getTime() < threeDaysMs);
|
||||
}
|
||||
//名字带*
|
||||
const maskName = (s) => {
|
||||
if (!s) return s
|
||||
const len = s.length
|
||||
if (len <= 1) return s
|
||||
if (len === 2) return s[0] + '*'
|
||||
return s[0] + '*'.repeat(Math.min(3, len - 2)) + s[len - 1]
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.header {
|
||||
height: 248rpx;
|
||||
// background: linear-gradient(270deg, #75AFF6 0%, #366DEE 98.57%);
|
||||
border-radius: 12rpx;
|
||||
margin: 32rpx;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
|
||||
.header-content {
|
||||
padding: 28rpx 36rpx;
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.sum {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 38rpx;
|
||||
|
||||
.sum-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.num {
|
||||
font-size: 36rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
line-height: 48rpx;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sum-divider {
|
||||
width: 2rpx;
|
||||
height: 60rpx;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
margin: 0 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
margin-bottom: 28rpx;
|
||||
|
||||
.avatar {
|
||||
width: 76rpx;
|
||||
min-width: 76rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
background: #edf3fe;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 100%;
|
||||
margin-left: 20rpx;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
|
||||
.section-1 {
|
||||
margin-bottom: 10rpx;
|
||||
color: #000;
|
||||
|
||||
.left {
|
||||
.name {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.tag {
|
||||
line-height: 24rpx;
|
||||
background: linear-gradient(90deg, #50504e 0%, #292b28 100%);
|
||||
border-radius: 40rpx;
|
||||
font-size: 20rpx;
|
||||
line-height: 36rpx;
|
||||
padding: 0 10rpx;
|
||||
margin-left: 10rpx;
|
||||
// position: absolute;
|
||||
// top: -10rpx;
|
||||
// left: 0;
|
||||
// white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.right {}
|
||||
}
|
||||
|
||||
.section-2 {
|
||||
.time {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.money {
|
||||
color: #ee0a24;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
background: #d6d1d1;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<s-pages title="钱包">
|
||||
<!-- 头部 -->
|
||||
<view class="header" :style="{ backgroundImage: 'url(' + $url + 'home/wallet2.png' + ')' }">
|
||||
<view class="header-content">
|
||||
<view class="title" @click="jumpPage('充值', '/pages/home/recharge')">
|
||||
钱包余额 <uni-icons type="right" color="#fff" size="28rpx" />
|
||||
</view>
|
||||
<view class="num size68 m-y-8" @click="jumpPage('充值', '/pages/home/recharge')">
|
||||
{{ $fen2yuan(money_obj?.balance || 0) }}
|
||||
</view>
|
||||
<view class="line" />
|
||||
<view class="flex m-t-22">
|
||||
<view class="title"> 可提现金额 </view>
|
||||
<view class="num m-l-34" @click="jumpPage('提现', '/pages/home/pay/withdraw')">
|
||||
{{ $fen2yuan(money_obj?.withdrawAmount || 0) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 标题 -->
|
||||
<view class="list-content">
|
||||
<view class="title-left" />
|
||||
<view class="title"> 好物推荐 </view>
|
||||
<view class="title-right" />
|
||||
</view>
|
||||
<!-- 商品 -->
|
||||
<su-sticky top="100rpx">
|
||||
<view class="goodsIndex">
|
||||
<goods :list="tagList" v-if="tagList?.length"></goods>
|
||||
</view>
|
||||
</su-sticky>
|
||||
</s-pages>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import * as api from '@/sheep/api/home/pay';
|
||||
import * as apiIndex from '@/sheep/api/index/index';
|
||||
import goods from '@/components/goods/goods.vue';
|
||||
|
||||
const money_obj = ref();
|
||||
const tagList = ref([]);
|
||||
|
||||
//获取钱包
|
||||
function getData() {
|
||||
api.getWallet().then((res) => {
|
||||
if (res.code === 0) {
|
||||
money_obj.value = res.data;
|
||||
}
|
||||
});
|
||||
// 标签列表
|
||||
apiIndex
|
||||
.getproducttaglist({
|
||||
categoryId: 1,
|
||||
})
|
||||
.then((res) => {
|
||||
tagList.value = res.data || [];
|
||||
});
|
||||
}
|
||||
onLoad(() => {
|
||||
getData();
|
||||
});
|
||||
//充值提现弹框提示去跳转
|
||||
function jumpPage(typeTxt, url) {
|
||||
uni.showModal({
|
||||
// title: '',
|
||||
content: '是否去' + typeTxt,
|
||||
showCancel: true,
|
||||
success: (res) => {
|
||||
//用户点击确定
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.header {
|
||||
height: 318rpx;
|
||||
// background: linear-gradient(270deg, #75AFF6 0%, #366DEE 98.57%);
|
||||
margin: 32rpx;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
overflow: hidden;
|
||||
|
||||
.header-content {
|
||||
padding: 80rpx 32rpx 24rpx;
|
||||
|
||||
.title {
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.num {
|
||||
font-family: Avenir, Avenir;
|
||||
font-weight: 900;
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 394rpx;
|
||||
height: 4rpx;
|
||||
background: linear-gradient(
|
||||
117deg,
|
||||
rgba(255, 255, 255, 0.41) 0%,
|
||||
rgba(255, 255, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.title {
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #000;
|
||||
margin: 0 16rpx;
|
||||
}
|
||||
|
||||
.title-left {
|
||||
width: 42rpx;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 7.14%, #f25353 100%);
|
||||
}
|
||||
|
||||
.title-right {
|
||||
width: 42rpx;
|
||||
height: 6rpx;
|
||||
background: linear-gradient(-90deg, rgba(255, 255, 255, 0) 7.14%, #f25353 100%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user