提交 04732ccb authored 作者: 劳广强's avatar 劳广强

feat: 提现记录 添加 订单编号和复制订单编号

上级 63a9fbe0
......@@ -23,6 +23,7 @@
padding: 0 8rpx;
border: 2rpx solid #fe9731;
border-radius: 8rpx;
margin-left: 8rpx;
}
.subtltle_arrival {
color: #8171fc;
......
......@@ -6,8 +6,16 @@
<view class="left">
<view class="title">
积分提现
<span class="subtltle" :class="[item.is_success ? 'subtltle_arrival' : '']">{{ item.is_success ? '已到账' : '提现失败' }}</span>
<span class="subtltle" :class="[item.is_success ? 'subtltle_arrival' : '']">{{ item.is_success ? '已通过' : '待审核' }}</span>
</view>
<view class="date"
>订单编号 {{ item.order_num }}
<span
@click="onCopy(item, index)"
style="margin-left: 8rpx; padding: 0 12rpx; background: #ececec; border-radius: 20rpx; font-size: 22rpx; text-align: center; color: #666666; line-height: 32rpx"
>复制</span
></view
>
<view class="date">{{ item.created }}</view>
</view>
<view class="right">
......@@ -28,6 +36,7 @@
<script>
import { createList, getList } from '@/utils/list';
import LoadMore from '@/components/LoadMore';
import { myCopy } from '@/utils/util';
export default {
components: { LoadMore },
......@@ -57,6 +66,10 @@ export default {
async fetchList() {
await getList(this, 'list', ['/api/withdrawal_record/list', {}]);
},
onCopy(item, index) {
myCopy(item.order_num);
},
},
};
</script>
......
......@@ -49,6 +49,20 @@ export const myRequest = (options) => {
export const getPrice = (value = 0) => Number(value ?? 0) / 100;
// 复制
export const myCopy = (txt = '') => {
const input = document.createElement('input'); // 创建一个新input标签
input.setAttribute('readonly', 'readonly'); // 设置input标签只读属性
input.setAttribute('value', txt); // 设置input value值为需要复制的内容
document.body.appendChild(input); // 添加input标签到页面
input.select(); // 选中input内容
input.setSelectionRange(0, 9999); // 设置选中input内容范围
document.execCommand('copy'); // 复制
document.body.removeChild(input); // 删除新创建的input标签
//此处可以设置一个弹窗提示
uni.$u.toast('复制成功');
};
// 图片水印
const base64_encode = (str) => {
// 下面是64个基本的编码
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论