提交 087e67d5 authored 作者: 劳广强's avatar 劳广强

feat: 提现功能 接入接口

上级 b68103c1
......@@ -88,6 +88,9 @@
"serviceHost" : ""
}
}
},
"router" : {
"base" : "/index/"
}
}
}
......@@ -77,6 +77,27 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/mine-integral/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/mine-integral-bonus/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/mine-integral-withdrawal/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
}
],
"tabBar": {
......
.container {
padding: 0 30rpx 150rpx 30rpx;
}
.record {
padding: 26rpx 0 24rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #f6f6f6;
}
.title {
font-size: 36rpx;
font-weight: 500;
color: #060606;
}
.subtltle {
font-size: 22rpx;
font-weight: 500;
color: #fe9731;
padding: 0 8rpx;
border: 2rpx solid #fe9731;
border-radius: 8rpx;
}
.subtltle_arrival {
color: #8171fc;
border-color: #8171fc;
}
.date {
margin-top: 12rpx;
font-weight: Book;
color: #a4a4a4;
}
.right {
display: flex;
justify-content: flex-start;
align-items: center;
width: 180rpx;
}
.icon {
width: 48rpx;
height: 48rpx;
}
.number {
font-size: 34rpx;
font-weight: 700;
color: #8171fc;
margin-left: 20rpx;
}
.bottom {
font-size: 28rpx;
font-weight: 400;
color: #bfbfbf;
margin-top: 64rpx 0 140rpx 0;
text-align: center;
}
.data_none {
//margin-top: 288rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.data_img {
width: 266rpx;
height: 164rpx;
}
.data_title {
margin-top: 38rpx;
font-size: 28rpx;
font-weight: 400;
text-align: center;
color: #333333;
}
.step_box {
width: 100%;
position: fixed;
bottom: 30rpx;
}
.btn {
width: 314rpx;
height: 92rpx;
background: linear-gradient(270deg, #8171fc, #a471fc);
border-radius: 46rpx;
color: #fff !important;
font-size: 32rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
.rule-content {
width: 650rpx;
height: 732rpx;
opacity: 1;
background: #ffffff;
box-shadow: 0rpx 2rpx 0rpx 0rpx #e5e5e5;
position: relative;
}
.rule-title {
display: flex;
justify-content: center;
padding: 30rpx 0;
font-size: 32rpx;
font-weight: 600;
color: #000000;
}
.content {
padding: 0 88rpx;
font-size: 28rpx;
font-weight: 500;
color: #000000;
line-height: 46rpx;
}
.rule-btn {
width: 100%;
display: flex;
justify-content: center;
padding: 30rpx 0;
border-top: 2rpx solid #f6f6f6;
position: absolute;
bottom: 0;
font-size: 32rpx;
font-weight: 600;
color: #000000;
}
<template>
<view>
<view class="container">
<view v-if="list.status !== 'empty'">
<view class="record" v-for="(item, index) in list.data" :key="item.id">
<view class="left">
<view class="title">{{ titleMap[item.points_type] }}</view>
<view class="date">{{ item.created }}</view>
</view>
<view class="right">
<image mode="aspectFill" class="icon" src="/static/icon/ic_jifen1@2x.png" />
<view class="number" v-if="item.status === 1">+ {{ item.original_trans_amount }}</view>
<view class="number" v-if="item.status === 2">- {{ item.original_trans_amount }}</view>
</view>
</view>
<LoadMore :status="list.status" />
</view>
<view v-if="list.status === 'empty'" class="data_none">
<view style="height: 228rpx" />
<image mode="aspectFill" class="data_img" src="/static/pic_wushuju@2x.png" />
<view class="data_title">暂无数据</view>
</view>
</view>
</view>
</template>
<script>
import { createList, getList } from '@/utils/list';
import { titleMap, record } from '@/pages/mine-integral-bonus/mock';
import LoadMore from '@/components/LoadMore';
export default {
components: { LoadMore },
data() {
return {
record: [],
titleMap,
show: false,
list: createList(),
};
},
onLoad(query) {
// this.record = record;
this.fetchList();
},
async onPullDownRefresh() {
this.list = createList();
await this.fetchList();
uni.stopPullDownRefresh();
},
onReachBottom() {
this.fetchList();
},
methods: {
async fetchList() {
await getList(this, 'list', ['/api/app/pointsrecord/list', {}]);
console.log(this.list);
},
},
};
</script>
<style scoped lang="scss">
@import 'index.scss';
</style>
export const titleMap = {
1: '新人礼包',
2: '每日签到',
3: '邀请好友',
4: '做任务',
5: '随手拍',
6: '每日签到补签',
7: '提现',
};
export const record = [
{
object_name: 'pointsrecord',
status: 2,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1172,
points: 1000,
user: null,
created: '2021-08-19 15:09:22',
points_type: 7,
},
{
object_name: 'pointsrecord',
status: 2,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1171,
points: 1000,
user: null,
created: '2021-08-19 15:07:24',
points_type: 7,
},
{
object_name: 'pointsrecord',
status: 2,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1170,
points: 1000,
user: null,
created: '2021-08-19 15:06:24',
points_type: 7,
},
{
object_name: 'pointsrecord',
status: 2,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1143,
points: 100,
user: null,
created: '2021-07-12 14:34:33',
points_type: 5,
},
{
object_name: 'pointsrecord',
status: 1,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1135,
points: 40,
user: null,
created: '2021-07-06 15:38:46',
points_type: 4,
},
{
object_name: 'pointsrecord',
status: 1,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1119,
points: 100,
user: null,
created: '2021-06-29 17:23:08',
points_type: 5,
},
{
object_name: 'pointsrecord',
status: 1,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1117,
points: 0,
user: null,
created: '2021-06-28 17:26:15',
points_type: 4,
},
{
object_name: 'pointsrecord',
status: 2,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1073,
points: 0,
user: null,
created: '2021-06-09 10:11:54',
points_type: 4,
},
{
object_name: 'pointsrecord',
status: 1,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1072,
points: 0,
user: null,
created: '2021-06-09 10:11:27',
points_type: 4,
},
{
object_name: 'pointsrecord',
status: 2,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1044,
points: 100,
user: null,
created: '2021-06-04 17:08:48',
points_type: 4,
},
{
object_name: 'pointsrecord',
status: 1,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 1043,
points: 100,
user: null,
created: '2021-06-04 17:08:39',
points_type: 4,
},
{
object_name: 'pointsrecord',
status: 1,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 928,
points: 10,
user: null,
created: '2021-05-15 22:20:58',
points_type: 2,
},
{
object_name: 'pointsrecord',
status: 1,
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
id: 880,
points: 200,
user: null,
created: '2021-05-07 10:24:46',
points_type: 1,
},
];
.container {
padding: 0 30rpx 150rpx 30rpx;
}
.record {
padding: 26rpx 0 24rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #f6f6f6;
}
.title {
font-size: 36rpx;
font-weight: 500;
color: #060606;
}
.subtltle {
font-size: 22rpx;
font-weight: 500;
color: #fe9731;
padding: 0 8rpx;
border: 2rpx solid #fe9731;
border-radius: 8rpx;
}
.subtltle_arrival {
color: #8171fc;
border-color: #8171fc;
}
.date {
margin-top: 12rpx;
font-weight: Book;
color: #a4a4a4;
}
.right {
display: flex;
justify-content: flex-end;
align-items: center;
width: 180rpx;
}
.icon {
width: 48rpx;
height: 48rpx;
}
.number {
font-size: 34rpx;
font-weight: 700;
color: #8171fc;
margin-left: 20rpx;
}
.bottom {
font-size: 28rpx;
font-weight: 400;
color: #bfbfbf;
margin-top: 64rpx 0 140rpx 0;
text-align: center;
}
.data_none {
margin-top: 288rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.data_img {
width: 266rpx;
height: 164rpx;
}
.data_title {
margin-top: 38rpx;
font-size: 28rpx;
font-weight: 400;
text-align: center;
color: #333333;
}
.step_box {
width: 100%;
position: fixed;
bottom: 30rpx;
}
.btn {
width: 314rpx;
height: 92rpx;
background: linear-gradient(270deg, #8171fc, #a471fc);
border-radius: 46rpx;
color: #fff !important;
font-size: 32rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
.rule-content {
width: 650rpx;
height: 732rpx;
opacity: 1;
background: #ffffff;
box-shadow: 0rpx 2rpx 0rpx 0rpx #e5e5e5;
position: relative;
}
.rule-title {
display: flex;
justify-content: center;
padding: 30rpx 0;
font-size: 32rpx;
font-weight: 600;
color: #000000;
}
.content {
padding: 0 88rpx;
font-size: 28rpx;
font-weight: 500;
color: #000000;
line-height: 46rpx;
}
.rule-btn {
width: 100%;
display: flex;
justify-content: center;
padding: 30rpx 0;
border-top: 2rpx solid #f6f6f6;
position: absolute;
bottom: 0;
font-size: 32rpx;
font-weight: 600;
color: #000000;
}
<template>
<view>
<view class="container">
<view v-if="list.status !== 'empty'">
<view class="record" v-for="(item, index) in list.data" :key="item.id">
<view class="left">
<view class="title">
积分提现
<span class="subtltle" :class="[item.is_success ? 'subtltle_arrival' : '']">{{ item.is_success ? '已到账' : '提现失败' }}</span>
</view>
<view class="date">{{ item.created }}</view>
</view>
<view class="right">
<view class="number">{{ item.amount }}.00</view>
</view>
</view>
<LoadMore :status="list.status" />
</view>
<view v-if="list.status === 'empty'" class="data_none">
<image mode="aspectFill" class="data_img" src="/static/pic_wushuju@2x.png" />
<view class="data_title">暂无数据</view>
</view>
</view>
</view>
</template>
<script>
import { createList, getList } from '@/utils/list';
import LoadMore from '@/components/LoadMore';
export default {
components: { LoadMore },
data() {
return {
record: [],
list: createList(),
};
},
onLoad(query) {
this.fetchList();
},
async onPullDownRefresh() {
this.list = createList();
await this.fetchList();
uni.stopPullDownRefresh();
},
onReachBottom() {
this.fetchList();
},
methods: {
async fetchList() {
await getList(this, 'list', ['/api/withdrawal_record/list', {}]);
},
},
};
</script>
<style scoped lang="scss">
@import 'index.scss';
</style>
export const record = [
{
object_name: 'withdrawalrecord',
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
amount: 1000,
id: 6,
is_success: true,
order_num: '16293569602036',
created: '2021-08-19 15:09:20',
},
{
object_name: 'withdrawalrecord',
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
amount: 1000,
id: 5,
is_success: true,
order_num: '16293568439048',
created: '2021-08-19 15:07:23',
},
{
object_name: 'withdrawalrecord',
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
amount: 1000,
id: 4,
is_success: true,
order_num: '16293567837147',
created: '2021-08-19 15:06:23',
},
{
object_name: 'withdrawalrecord',
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
amount: 1000,
id: 3,
is_success: false,
order_num: '16293562327982',
created: '2021-08-19 14:57:12',
},
{
object_name: 'withdrawalrecord',
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
amount: 1000,
id: 2,
is_success: false,
order_num: '16293555993628',
created: '2021-08-19 14:46:39',
},
{
object_name: 'withdrawalrecord',
wx_user: {
object_name: 'wxuser',
nickName: '\u5f3a',
openId: 'ofKlR5aXjsvCXrdG1U1DAyl1f5tU',
object_type: 'default',
avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/KbsMOauZmxL64AVsAUp51XPacVMDQCtBd8uMzQyBKzrFTvKicicWJRPNTKXNgMyL9PEJGHibtGFEr8uliateTKAFAQ/132',
id: 533,
integral: 5198314,
created: '2021-05-07 10:24:27',
is_receive: true,
tag_name: '',
},
object_type: 'default',
amount: 1000,
id: 1,
is_success: false,
order_num: '<function generate_num at 0x7fded13e31e0>',
created: '2021-08-19 14:41:56',
},
];
.integral {
&-icon {
$size: 88rpx;
width: $size;
height: $size;
display: block;
margin: 0 auto;
}
&-text {
font-size: 72rpx;
font-weight: bold;
text-align: center;
color: #000000;
line-height: 78rpx;
}
&-btn {
width: 180rpx;
height: 70rpx;
border: 2rpx solid #8171fc;
border-radius: 46rpx;
overflow: hidden;
font-size: 28rpx;
font-weight: bold;
color: #000000;
}
&-submit {
width: 240rpx;
height: 92rpx;
background: linear-gradient(270deg, #8171fc, #a471fc);
border-radius: 46rpx;
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
}
}
<template>
<view>
<view style="height: 56rpx" />
<image class="integral-icon" src="/static/icon/ic_jifen@2x.png" />
<view style="height: 36rpx" />
<view class="integral-text">{{ userInfo.integral }}</view>
<view style="height: 54rpx" />
<u-button class="integral-submit" @click="onSubmitClick">提现</u-button>
<view style="height: 82rpx" />
<view style="display: flex">
<u-button class="integral-btn" @click="$u.route({ url: 'pages/mine-integral-bonus/index' })">奖金记录</u-button>
<u-button class="integral-btn" @click="$u.route({ url: 'pages/mine-integral-withdrawal/index' })">提现记录</u-button>
</view>
<u-modal :show="submitShow" :title="submitTitle" :showCancelButton="submitShowCancel" @cancel="onSubmitCancel" @confirm="onSubmitConfirm">
<view>
<view style="text-align: center">{{ submitContent }}</view>
<view style="height: 16rpx" />
<view>
<u--input
v-model="submitValue"
placeholder="请输入需要提现的金额"
placeholderStyle="font-size: 28rpx;text-align: center;color: #c6c6c6;"
inputAlign="center"
type="number"
clearable
style="background: #f5f5f5; border-radius: 16rpx; border: none"
/>
</view>
</view>
</u-modal>
<u-modal :show="successShow" title="提交成功" @confirm="successShow = false">
<view style="text-align: center">{{ '可在“我的奖金-提现记录”查看' }}</view>
</u-modal>
<u-modal :show="warnShow" title="提示" @confirm="warnShow = false">
<view style="text-align: center">{{ '支持星期一到星期五上午8:30到18:00,每天不能超过5次提现,每月不能大于150次' }}</view>
</u-modal>
</view>
</template>
<script>
export default {
data() {
return {
submitShow: false,
submitShowCancel: false,
submitTitle: '',
submitContent: '',
submitValue: '',
successShow: false,
warnShow: false,
userInfo: {},
};
},
onLoad(query) {
this.fetchUserInfo();
},
methods: {
onSubmitClick() {
this.submitTitle = '提现';
this.submitContent = '目前奖金 ' + this.userInfo.integral;
this.submitShowCancel = true;
this.submitShow = true;
},
async onSubmitConfirm() {
if (!this.submitValue) return uni.$u.toast('请输入金额');
try {
uni.showLoading({});
await this.fetchSubmit();
this.onSubmitCancel();
uni.hideLoading();
this.successShow = true;
} catch (e) {
this.onSubmitCancel();
} finally {
}
},
async fetchSubmit() {
await uni.$u.http.post('/api/withdrawal', { amount: this.submitValue });
},
async fetchUserInfo() {
const { detail } = await uni.$u.http.get('/api/user_center/detail');
this.userInfo = detail;
},
onSubmitCancel() {
this.submitValue = '';
this.submitShow = false;
},
},
};
</script>
<style scoped lang="scss">
@import 'index.scss';
</style>
......@@ -135,7 +135,7 @@ export default {
async fetchExamineList() {
const status = this.ExamineIdx + 1;
await getList(this, 'list', ['api/app/phototask/list', { status }], {
await getList(this, 'list', ['/api/app/phototask/list', { status }], {
transform: (list) => list.map((value) => ({ ...value })),
abandon: () => status !== this.ExamineIdx + 1,
});
......
......@@ -10,9 +10,9 @@
<image mode="aspectFill" class="head_img" :src="userDetail.avatarUrl" />
</view>
<view class="name">{{ userDetail.nickName }}</view>
<view class="integral_msg" bindtap="myIntegral">
<view class="integral_msg" @click="myIntegral">
<view class="msg_left">
<image mode="aspectFill" class="integral_icon" src="/static/icon/ic_jifen1@2x.png" />
<image mode="aspectFill" class="integral_icon" src="/static/icon/ic_jifen@2x.png" />
<view class="number">{{ userDetail.integral }}</view>
</view>
<view class="msg_right">
......@@ -103,6 +103,10 @@ export default {
} finally {
}
},
myIntegral() {
uni.$u.route({ url: 'pages/mine-integral/index' });
},
},
};
</script>
......
......@@ -583,7 +583,6 @@ export default {
.filter(({ type }) => type === 'video')
.map(({ url }) => url)
.join(),
content: this.content,
is_real: this.checked,
name: this.realForm.name,
phone: this.realForm.phone,
......@@ -594,6 +593,7 @@ export default {
position: this.address,
...this.IllegalForm,
content: this.IllegalShow ? this.IllegalForm.content : this.content,
illegal_time: uni.$u.timeFormat(this.IllegalForm.illegal_time, 'yyyy-mm-dd hh:MM'),
});
......
......@@ -4,8 +4,8 @@
<image mode="aspectFill" class="img" src="/static/pic_ytj@2x.png" />
<view class="title">已提交审核</view>
<view class="tip">{{ path }}</view>
<view class="submit_btn_box" @click="backIndex">
<button type="default" class="btn">返回首页</button>
<view class="submit_btn_box">
<button type="default" class="btn" @click="backIndex">返回首页</button>
</view>
</view>
</view>
......@@ -22,9 +22,8 @@ export default {
methods: {
async backIndex() {
if (this.backType === 0) {
uni.$u.route({
url: 'pages/index/index',
type: 'switchTab',
uni.reLaunch({
url: '/',
});
}
},
......
......@@ -24,7 +24,15 @@ module.exports = (vm) => {
(response) => {
const data = response.data;
if (data.errcode) uni.$u.toast(data.msg);
if (data.errcode) {
if (data.errcode === 302) {
uni.$u.toast(data.msg);
window.location.href = data.data.location;
return Promise.reject(response);
}
uni.$u.toast(data.msg);
return Promise.reject(response);
}
return data.data === undefined ? {} : data.data;
},
(response) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论