Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
csssp-xcx-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
劳广强
csssp-xcx-h5
Commits
04732ccb
提交
04732ccb
authored
12月 30, 2022
作者:
劳广强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 提现记录 添加 订单编号和复制订单编号
上级
63a9fbe0
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
29 行增加
和
1 行删除
+29
-1
index.scss
pages/mine-integral-withdrawal/index.scss
+1
-0
index.vue
pages/mine-integral-withdrawal/index.vue
+14
-1
util.js
utils/util.js
+14
-0
没有找到文件。
pages/mine-integral-withdrawal/index.scss
浏览文件 @
04732ccb
...
...
@@ -23,6 +23,7 @@
padding
:
0
8rpx
;
border
:
2rpx
solid
#fe9731
;
border-radius
:
8rpx
;
margin-left
:
8rpx
;
}
.subtltle_arrival
{
color
:
#8171fc
;
...
...
pages/mine-integral-withdrawal/index.vue
浏览文件 @
04732ccb
...
...
@@ -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
>
...
...
utils/util.js
浏览文件 @
04732ccb
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论