jufubao-base 1.0.121 → 1.0.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +5 -5
- package/src/components/JfbBasePay/JfbBasePay.vue +11 -5
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +268 -238
- package/src/components/JfbBaseWallet/Api.js +60 -0
- package/src/components/JfbBaseWallet/Attr.js +101 -0
- package/src/components/JfbBaseWallet/JfbBaseWallet.vue +306 -0
- package/src/components/JfbBaseWallet/JfbBaseWalletLess.less +80 -0
- package/src/components/JfbBaseWallet/JfbBaseWalletMixin.js +30 -0
- package/src/components/JfbBaseWallet/Mock.js +6 -0
- package/src/components/JfbBaseWalletDetail/Api.js +26 -0
- package/src/components/JfbBaseWalletDetail/Attr.js +16 -0
- package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetail.vue +175 -0
- package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetailLess.less +80 -0
- package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetailMixin.js +30 -0
- package/src/components/JfbBaseWalletDetail/Mock.js +6 -0
- package/src/components/JfbBaseWalletEffective/Api.js +27 -0
- package/src/components/JfbBaseWalletEffective/Attr.js +15 -0
- package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffective.vue +176 -0
- package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffectiveLess.less +80 -0
- package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffectiveMixin.js +30 -0
- package/src/components/JfbBaseWalletEffective/Mock.js +21 -0
- package/src/components/JfbBaseWalletIndex/Api.js +48 -0
- package/src/components/JfbBaseWalletIndex/Attr.js +33 -0
- package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +822 -0
- package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndexLess.less +80 -0
- package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndexMixin.js +30 -0
- package/src/components/JfbBaseWalletIndex/Mock.js +7 -0
- package/src/components/JfbBaseWalletItem/Api.js +37 -0
- package/src/components/JfbBaseWalletItem/Attr.js +33 -0
- package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +501 -0
- package/src/components/JfbBaseWalletItem/JfbBaseWalletItemLess.less +80 -0
- package/src/components/JfbBaseWalletItem/JfbBaseWalletItemMixin.js +30 -0
- package/src/components/JfbBaseWalletItem/Mock.js +7 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc 获取绝对路径完整地址
|
|
3
|
+
* @param @path
|
|
4
|
+
**/
|
|
5
|
+
//例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
|
|
6
|
+
@basePath: 'business/';
|
|
7
|
+
@doMain: '//sandbox-img.jufubao.cn/';
|
|
8
|
+
|
|
9
|
+
.getBusinessImageUrl(@path, @size: 'size8') {
|
|
10
|
+
@url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
|
|
11
|
+
background-image: url(@url);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//start
|
|
15
|
+
.jfb-base-wallet-index {
|
|
16
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
min-height: unit(50, rpx);
|
|
19
|
+
|
|
20
|
+
&__body{
|
|
21
|
+
position: relative;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
z-index: 2
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.editx {
|
|
27
|
+
position: relative;
|
|
28
|
+
border: 1px dashed blue;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
z-index: 3
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
border: 1px dashed blue;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.noBorder {
|
|
39
|
+
border-color: rgba(0,0,0,0);
|
|
40
|
+
border-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
&__edit {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
position: absolute;
|
|
47
|
+
right: unit(0, rpx);
|
|
48
|
+
top: unit(-52, rpx);
|
|
49
|
+
height: unit(50, rpx);
|
|
50
|
+
line-height: unit(50, rpx);
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
background: rgba(0, 0, 0, .6);
|
|
55
|
+
border-radius: unit(10, rpx);
|
|
56
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
57
|
+
color: #fff;
|
|
58
|
+
font-size: unit(22, rpx);
|
|
59
|
+
|
|
60
|
+
&-icon{
|
|
61
|
+
padding: 0 unit(20, rpx);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.editx {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**notPreview**/
|
|
74
|
+
.jfb-base-wallet-index {
|
|
75
|
+
&:before {
|
|
76
|
+
content: " ";
|
|
77
|
+
display: table;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-base-wallet-index'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
getWalletList: {"show_name":"元宝1","icon":"","total_amount":200000,"list":[{"wallet_type":"UB","wallet_name":"福利宝","wallet_virtual_number":"1000000000000244","amount":100000,"business_codes":"cake","business_codes_name":"蛋糕(勿改)","wallet_rule":"UB使用规则说明"},{"wallet_type":"UC","wallet_name":"综合元宝","wallet_virtual_number":"1000000000000245","amount":100000,"business_codes":"cake,movie","business_codes_name":"蛋糕(勿改),电影(勿改)","wallet_rule":"UC使用规则说明"}],"request_id":"3f16d65d03da3594"},
|
|
5
|
+
getWalletRecordList: {"next_page_token":"","total_size":0,"list":[{"trade_id":"8ICccHHNMFVyGvnetIkJU","partner_id":0,"site_id":"","amount":100000,"wallet_type":"UC","operate_type":"A","operate_type_name":"收入","trade_type":"recharge","trade_type_name":"充值","comment":"","created_time":1711421305},{"trade_id":"oxbU0hZYtaWZDnwn-ddtr","partner_id":0,"site_id":"","amount":100000,"wallet_type":"UB","operate_type":"A","operate_type_name":"收入","trade_type":"recharge","trade_type_name":"充值","comment":"","created_time":1711421282}],"request_id":"87730507cec25d22"},
|
|
6
|
+
getWalletQrcode: {"wallet":{"wallet_type":"UB","wallet_name":"福利宝","wallet_virtual_number":"1000000000000244","amount":100000,"business_codes":"cake","business_codes_name":"蛋糕(勿改)","wallet_rule":"UB使用规则说明"},"dynamic_qrcode":"\/\/sandbox-apis.jufubao.cn\/common\/v1\/image\/qrcode?code_content=h.161.wp2d1klggzfbjuc","dynamic_barcode":"\/\/sandbox-apis.jufubao.cn\/common\/v1\/image\/barcode?code_content=h.161.wp2d1klggzfbjuc","dynamic_qrcode_expired":600,"request_id":"de739096b3364eca"}
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description API模型
|
|
5
|
+
* 建议:Ffff=>模块 Xxxx=>自定义名字
|
|
6
|
+
* 获取单记录(getByIdFfffXxxx)
|
|
7
|
+
* 获取列表记录(getByListFfffXxxx)
|
|
8
|
+
* 添加列表记录(addFfffXxxxx)
|
|
9
|
+
* 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
|
|
10
|
+
* 更新列表记录(updateFfffXxxxx)
|
|
11
|
+
* @type {*[]}
|
|
12
|
+
*/
|
|
13
|
+
module.exports = [
|
|
14
|
+
{
|
|
15
|
+
mapFnName: 'getWalletDetail', //自定义方法名字(必选)
|
|
16
|
+
title: '获取钱包详情',
|
|
17
|
+
path: '/pay/v1/wallet/detail',
|
|
18
|
+
isRule: false,
|
|
19
|
+
params: {
|
|
20
|
+
wallet_type: ['钱包类型', 'String', '必选'],
|
|
21
|
+
},
|
|
22
|
+
isConsole: true,
|
|
23
|
+
disabled: true,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
mapFnName: 'getWalletRecordList', //自定义方法名字(必选)
|
|
27
|
+
title: '获取收支明细',
|
|
28
|
+
path: '/pay/v1/wallet/list-trade-record',
|
|
29
|
+
isRule: false,
|
|
30
|
+
params: {
|
|
31
|
+
support_method: ['元宝:wallet 积分: score', 'String', '必选'],
|
|
32
|
+
page_size: ['每页条数', 'String', '必选'],
|
|
33
|
+
},
|
|
34
|
+
isConsole: true,
|
|
35
|
+
disabled: true,
|
|
36
|
+
},
|
|
37
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
style: [],
|
|
8
|
+
content: (data) => {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
label: '账单详情跳转路径:',
|
|
12
|
+
ele: 'xd-select-pages-path',
|
|
13
|
+
valueKey: 'billDetailPath',
|
|
14
|
+
value: data['billDetailPath'] || {},
|
|
15
|
+
setting: {
|
|
16
|
+
router: XdBus.getParentApi('getPagesTree')
|
|
17
|
+
},
|
|
18
|
+
inline: false,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '有效期列表跳转路径:',
|
|
22
|
+
ele: 'xd-select-pages-path',
|
|
23
|
+
valueKey: 'effectivePath',
|
|
24
|
+
value: data['effectivePath'] || {},
|
|
25
|
+
setting: {
|
|
26
|
+
router: XdBus.getParentApi('getPagesTree')
|
|
27
|
+
},
|
|
28
|
+
inline: false,
|
|
29
|
+
},
|
|
30
|
+
].filter(i => i)
|
|
31
|
+
},
|
|
32
|
+
advanced: [],
|
|
33
|
+
};
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-wallet-item"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx: isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-wallet-item__edit"
|
|
10
|
+
:class="{ editx: isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-wallet-item__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view v-if="status" class="jfb-base-wallet-item__body">
|
|
17
|
+
<view class="jfb-base-wallet-item__body-id">
|
|
18
|
+
<text>账户ID:{{ walletInfo.wallet_virtual_number }}</text>
|
|
19
|
+
<XdFontIcon
|
|
20
|
+
@click="copyText(walletInfo.wallet_virtual_number)"
|
|
21
|
+
size="30"
|
|
22
|
+
icon="iconfuzhi"
|
|
23
|
+
></XdFontIcon>
|
|
24
|
+
</view>
|
|
25
|
+
<view
|
|
26
|
+
style="padding: 32rpx 40rpx"
|
|
27
|
+
class="jfb-base-wallet-item__body-wrap"
|
|
28
|
+
>
|
|
29
|
+
<view class="jfb-base-wallet-item__body-header">
|
|
30
|
+
<view class="jfb-base-wallet-item__body-header-total">
|
|
31
|
+
<view>
|
|
32
|
+
<XdFontIcon
|
|
33
|
+
:icon="type === 'wallet' ? 'iconyuanbao' : 'iconjifenjilu'"
|
|
34
|
+
></XdFontIcon>
|
|
35
|
+
<text>{{ walletInfo.wallet_name }}</text>
|
|
36
|
+
</view>
|
|
37
|
+
<view>{{ dividePrice(walletInfo.amount) }}</view>
|
|
38
|
+
</view>
|
|
39
|
+
<view style="align-items: flex-start" @click="showRule = true">
|
|
40
|
+
<view style="display: flex; font-size: 24rpx">
|
|
41
|
+
<text style="margin-right: 16rpx">使用规则</text>
|
|
42
|
+
<XdFontIcon
|
|
43
|
+
size="24"
|
|
44
|
+
color="#666"
|
|
45
|
+
icon="iconxiangyou_xian"
|
|
46
|
+
></XdFontIcon>
|
|
47
|
+
</view>
|
|
48
|
+
</view>
|
|
49
|
+
</view>
|
|
50
|
+
<view class="jfb-base-wallet-item__body-bussiness">
|
|
51
|
+
<view>使用范围</view>
|
|
52
|
+
<view>{{ walletInfo.business_codes_name }}</view>
|
|
53
|
+
<view @click="handleToEffective">
|
|
54
|
+
<view :style="{ color: mainColor }">有效期列表</view>
|
|
55
|
+
<XdFontIcon
|
|
56
|
+
:style="{ color: mainColor }"
|
|
57
|
+
size="20"
|
|
58
|
+
icon="iconxiangyou_xian"
|
|
59
|
+
></XdFontIcon>
|
|
60
|
+
</view>
|
|
61
|
+
</view>
|
|
62
|
+
</view>
|
|
63
|
+
<view class="jfb-base-wallet-item__body-title">收支明细</view>
|
|
64
|
+
<view class="jfb-base-wallet-item__body-wrap">
|
|
65
|
+
<view class="jfb-base-wallet-item__body-filter">
|
|
66
|
+
<picker
|
|
67
|
+
fields="month"
|
|
68
|
+
mode="date"
|
|
69
|
+
:value="date"
|
|
70
|
+
@change="bindDateChange"
|
|
71
|
+
>
|
|
72
|
+
<view class="jfb-base-wallet-item__body-filter-condition">
|
|
73
|
+
<text>{{ date }}</text>
|
|
74
|
+
<XdFontIcon size="24" icon="iconxia_down"></XdFontIcon>
|
|
75
|
+
</view>
|
|
76
|
+
</picker>
|
|
77
|
+
<picker
|
|
78
|
+
mode="selector"
|
|
79
|
+
range-key="label"
|
|
80
|
+
:value="operate_type"
|
|
81
|
+
:range="buySale"
|
|
82
|
+
@change="bindOperateChange"
|
|
83
|
+
>
|
|
84
|
+
<view class="jfb-base-wallet-item__body-filter-condition">
|
|
85
|
+
<text>{{
|
|
86
|
+
operate_type
|
|
87
|
+
? operate_type === "R"
|
|
88
|
+
? "全部支出"
|
|
89
|
+
: "全部收入"
|
|
90
|
+
: "全部收支"
|
|
91
|
+
}}</text>
|
|
92
|
+
<XdFontIcon size="24" icon="iconxia_down"></XdFontIcon>
|
|
93
|
+
</view>
|
|
94
|
+
</picker>
|
|
95
|
+
</view>
|
|
96
|
+
<view class="jfb-base-wallet-item__body-list">
|
|
97
|
+
<view v-if="detailList.length">
|
|
98
|
+
<view
|
|
99
|
+
v-for="(item, index) in detailList"
|
|
100
|
+
:key="index"
|
|
101
|
+
class="jfb-base-wallet-item__body-list-item"
|
|
102
|
+
@click="handleToBillDetail(item)"
|
|
103
|
+
>
|
|
104
|
+
<view>
|
|
105
|
+
<XdFontIcon
|
|
106
|
+
:icon="
|
|
107
|
+
item.operate_type === 'A' ? 'iconshouru' : 'iconzhichu'
|
|
108
|
+
"
|
|
109
|
+
></XdFontIcon>
|
|
110
|
+
<text style="margin-left: 10rpx">{{
|
|
111
|
+
item.trade_type_name
|
|
112
|
+
}}</text>
|
|
113
|
+
</view>
|
|
114
|
+
<view>
|
|
115
|
+
<view
|
|
116
|
+
>{{ item.operate_type === "A" ? "+" : "-" }}
|
|
117
|
+
{{ dividePrice(item.amount) }}</view
|
|
118
|
+
>
|
|
119
|
+
<view>{{ item.created_time }}</view>
|
|
120
|
+
</view>
|
|
121
|
+
</view></view
|
|
122
|
+
>
|
|
123
|
+
|
|
124
|
+
<view class="jfb-base-wallet-item__body-list-empty" v-else
|
|
125
|
+
>暂无数据</view
|
|
126
|
+
>
|
|
127
|
+
</view>
|
|
128
|
+
</view>
|
|
129
|
+
<XdDailog
|
|
130
|
+
@onBtn="handleConfirm"
|
|
131
|
+
confirmText="知道了"
|
|
132
|
+
:showClose="false"
|
|
133
|
+
:cancel="false"
|
|
134
|
+
:show.sync="showRule"
|
|
135
|
+
title="元宝使用原则"
|
|
136
|
+
>
|
|
137
|
+
<XdContentXss :html="walletInfo.wallet_rule"></XdContentXss>
|
|
138
|
+
</XdDailog>
|
|
139
|
+
</view>
|
|
140
|
+
</view>
|
|
141
|
+
</template>
|
|
142
|
+
|
|
143
|
+
<script>
|
|
144
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
145
|
+
import XdDailog from "@/components/XdDailog/XdDailog";
|
|
146
|
+
import XdContentXss from "@/components/XdContentXss/XdContentXss";
|
|
147
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
148
|
+
import JfbBaseWalletItemMixin from "./JfbBaseWalletItemMixin";
|
|
149
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
150
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
151
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
152
|
+
export default {
|
|
153
|
+
name: "JfbBaseWalletItem",
|
|
154
|
+
components: {
|
|
155
|
+
XdFontIcon,
|
|
156
|
+
XdDailog,
|
|
157
|
+
XdContentXss,
|
|
158
|
+
},
|
|
159
|
+
mixins: [componentsMixins, extsMixins, JfbBaseWalletItemMixin],
|
|
160
|
+
data() {
|
|
161
|
+
return {
|
|
162
|
+
billDetailPath: "",
|
|
163
|
+
effectivePath: "",
|
|
164
|
+
detailList: [],
|
|
165
|
+
hasNext: true,
|
|
166
|
+
next_page_token: "",
|
|
167
|
+
page_size: 10,
|
|
168
|
+
page_token: 1,
|
|
169
|
+
showRule: false,
|
|
170
|
+
rules: "",
|
|
171
|
+
type: "",
|
|
172
|
+
buySale: [
|
|
173
|
+
{
|
|
174
|
+
label: "全部",
|
|
175
|
+
value: "",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
label: "支出",
|
|
179
|
+
value: "R",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
label: "收入",
|
|
183
|
+
value: "A",
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
date: "",
|
|
187
|
+
operate_type: "",
|
|
188
|
+
wallet_type: "",
|
|
189
|
+
walletInfo: {},
|
|
190
|
+
status: false,
|
|
191
|
+
};
|
|
192
|
+
},
|
|
193
|
+
watch: {
|
|
194
|
+
container(value) {
|
|
195
|
+
this.init(value);
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
created() {
|
|
199
|
+
this.init(this.container);
|
|
200
|
+
|
|
201
|
+
//todo
|
|
202
|
+
},
|
|
203
|
+
methods: {
|
|
204
|
+
async onJfbLoad(options) {
|
|
205
|
+
this.type = options.type;
|
|
206
|
+
this.date = `${new Date().getFullYear()}-${String(
|
|
207
|
+
new Date().getMonth() + 1
|
|
208
|
+
).padStart(2, "0")}`;
|
|
209
|
+
this.wallet_type = options.wallet_type;
|
|
210
|
+
await jfbRootExec("getWalletDetail", {
|
|
211
|
+
vm: this,
|
|
212
|
+
data: {
|
|
213
|
+
wallet_type: this.wallet_type,
|
|
214
|
+
},
|
|
215
|
+
})
|
|
216
|
+
.then((res) => {
|
|
217
|
+
this.walletInfo = res.wallet;
|
|
218
|
+
if (this.walletInfo.business_codes_name) {
|
|
219
|
+
const codes = this.walletInfo.business_codes_name.split(",");
|
|
220
|
+
const newCodes = codes.map((code) => code.trim()).join("、");
|
|
221
|
+
this.walletInfo.business_codes_name = newCodes;
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
.catch(this.$xdLog.catch);
|
|
225
|
+
await this.getList();
|
|
226
|
+
this.status = true;
|
|
227
|
+
},
|
|
228
|
+
getList() {
|
|
229
|
+
jfbRootExec("getWalletRecordList", {
|
|
230
|
+
vm: this,
|
|
231
|
+
data: {
|
|
232
|
+
support_method: this.type,
|
|
233
|
+
month: this.date,
|
|
234
|
+
page_size: this.page_size,
|
|
235
|
+
page_token: this.page_token,
|
|
236
|
+
operate_type: this.operate_type,
|
|
237
|
+
wallet_type: this.wallet_type,
|
|
238
|
+
},
|
|
239
|
+
})
|
|
240
|
+
.then((res) => {
|
|
241
|
+
try {
|
|
242
|
+
let list = res.list.map((item) => {
|
|
243
|
+
const timestamp = item.created_time * 1000;
|
|
244
|
+
const date = new Date(timestamp);
|
|
245
|
+
const year = date.getFullYear();
|
|
246
|
+
const month = ("0" + (date.getMonth() + 1)).slice(-2);
|
|
247
|
+
const day = ("0" + date.getDate()).slice(-2);
|
|
248
|
+
const hours = ("0" + date.getHours()).slice(-2);
|
|
249
|
+
const minutes = ("0" + date.getMinutes()).slice(-2);
|
|
250
|
+
const seconds = ("0" + date.getSeconds()).slice(-2);
|
|
251
|
+
const formattedDate =
|
|
252
|
+
year +
|
|
253
|
+
"-" +
|
|
254
|
+
month +
|
|
255
|
+
"-" +
|
|
256
|
+
day +
|
|
257
|
+
" " +
|
|
258
|
+
hours +
|
|
259
|
+
":" +
|
|
260
|
+
minutes +
|
|
261
|
+
":" +
|
|
262
|
+
seconds;
|
|
263
|
+
item.created_time = formattedDate;
|
|
264
|
+
return item;
|
|
265
|
+
});
|
|
266
|
+
if (this.page_token === 1) {
|
|
267
|
+
this.detailList = list;
|
|
268
|
+
} else {
|
|
269
|
+
this.detailList = this.detailList.concat(list);
|
|
270
|
+
}
|
|
271
|
+
this.hasNext = res.next_page_token !== "";
|
|
272
|
+
this.next_page_token = res.next_page_token;
|
|
273
|
+
} catch (error) {
|
|
274
|
+
console.log(error, "alaakakakak");
|
|
275
|
+
}
|
|
276
|
+
})
|
|
277
|
+
.catch(this.$xdLog.catch);
|
|
278
|
+
},
|
|
279
|
+
dividePrice(num) {
|
|
280
|
+
return this.$xdUniHelper.divisionFloatNumber(num, 100);
|
|
281
|
+
},
|
|
282
|
+
bindDateChange(e) {
|
|
283
|
+
console.log(e, "mmmmmm");
|
|
284
|
+
|
|
285
|
+
//调用搜索
|
|
286
|
+
this.detailList = [];
|
|
287
|
+
this.page_token = 1;
|
|
288
|
+
this.hasNext = true;
|
|
289
|
+
this.date = e.detail.value;
|
|
290
|
+
this.getList();
|
|
291
|
+
},
|
|
292
|
+
bindOperateChange(e) {
|
|
293
|
+
//调用搜索
|
|
294
|
+
this.detailList = [];
|
|
295
|
+
this.page_token = 1;
|
|
296
|
+
this.hasNext = true;
|
|
297
|
+
this.operate_type = this.buySale[e.detail.value].value;
|
|
298
|
+
this.getList();
|
|
299
|
+
},
|
|
300
|
+
// 复制文案函数
|
|
301
|
+
copyText(text) {
|
|
302
|
+
// 设置剪贴板数据
|
|
303
|
+
uni.setClipboardData({
|
|
304
|
+
data: text,
|
|
305
|
+
success: function () {
|
|
306
|
+
// 复制成功,提示用户
|
|
307
|
+
uni.showToast({
|
|
308
|
+
title: "复制成功",
|
|
309
|
+
icon: "success",
|
|
310
|
+
});
|
|
311
|
+
},
|
|
312
|
+
fail: function () {
|
|
313
|
+
// 复制失败,提示用户
|
|
314
|
+
uni.showToast({
|
|
315
|
+
title: "复制失败",
|
|
316
|
+
icon: "none",
|
|
317
|
+
});
|
|
318
|
+
},
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
handleToBillDetail(item) {
|
|
322
|
+
this.$xdUniHelper.navigateTo({
|
|
323
|
+
url: `${this.billDetailPath}?trade_id=${item.trade_id}`,
|
|
324
|
+
});
|
|
325
|
+
},
|
|
326
|
+
handleConfirm(status) {
|
|
327
|
+
this.showRule = false;
|
|
328
|
+
},
|
|
329
|
+
handleToEffective(item) {
|
|
330
|
+
this.$xdUniHelper.navigateTo({
|
|
331
|
+
url: `${this.effectivePath}?wallet_type=${this.wallet_type}&type=${this.type}`,
|
|
332
|
+
});
|
|
333
|
+
},
|
|
334
|
+
/**
|
|
335
|
+
* @description 监听事件变化
|
|
336
|
+
* @param container {object} 业务组件对象自己
|
|
337
|
+
*/
|
|
338
|
+
init(container) {
|
|
339
|
+
this.billDetailPath = getContainerPropsValue(
|
|
340
|
+
container,
|
|
341
|
+
"content.billDetailPath",
|
|
342
|
+
{
|
|
343
|
+
value: "",
|
|
344
|
+
}
|
|
345
|
+
).value;
|
|
346
|
+
this.effectivePath = getContainerPropsValue(
|
|
347
|
+
container,
|
|
348
|
+
"content.effectivePath",
|
|
349
|
+
{
|
|
350
|
+
value: "",
|
|
351
|
+
}
|
|
352
|
+
).value;
|
|
353
|
+
},
|
|
354
|
+
onJfbScroll(options) {
|
|
355
|
+
console.log("event.onJfbScroll", options);
|
|
356
|
+
},
|
|
357
|
+
onJfbReachBottom(options) {
|
|
358
|
+
console.log("1111");
|
|
359
|
+
if (this.hasNext) {
|
|
360
|
+
this.page_token = this.next_page_token;
|
|
361
|
+
this.getList();
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
onJfbShow(options) {
|
|
365
|
+
console.log("event.onJfbShow", options);
|
|
366
|
+
},
|
|
367
|
+
onJfbHide(options) {
|
|
368
|
+
console.log("event.onJfbHide", options);
|
|
369
|
+
},
|
|
370
|
+
onJfbBack(options) {
|
|
371
|
+
console.log("event.onJfbBack", options);
|
|
372
|
+
},
|
|
373
|
+
onJfbUpdate(...data) {
|
|
374
|
+
console.log("event.onJfbUpdate", data);
|
|
375
|
+
},
|
|
376
|
+
onJfbCustomEvent(options) {
|
|
377
|
+
console.log("event.onJfbReachBottom", options);
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
};
|
|
381
|
+
</script>
|
|
382
|
+
|
|
383
|
+
<style scoped lang="less">
|
|
384
|
+
@import "./JfbBaseWalletItemLess.less";
|
|
385
|
+
|
|
386
|
+
.jfb-base-wallet-item {
|
|
387
|
+
&__body {
|
|
388
|
+
&-wrap {
|
|
389
|
+
border-radius: 20rpx;
|
|
390
|
+
background: #ffffff;
|
|
391
|
+
border: 1rpx solid #eeeeee;
|
|
392
|
+
margin: 20rpx 20rpx 0 20rpx;
|
|
393
|
+
}
|
|
394
|
+
&-header {
|
|
395
|
+
display: flex;
|
|
396
|
+
justify-content: space-between;
|
|
397
|
+
font-size: 28rpx;
|
|
398
|
+
color: #333333;
|
|
399
|
+
border-bottom: 1px solid #eee;
|
|
400
|
+
padding-bottom: 28rpx;
|
|
401
|
+
&-total {
|
|
402
|
+
& > view:first-child {
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
font-size: 24rpx;
|
|
406
|
+
& > text {
|
|
407
|
+
margin-left: 10rpx;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
& > view:last-child {
|
|
411
|
+
font-size: 64rpx;
|
|
412
|
+
color: #333;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
&-bussiness {
|
|
417
|
+
padding: 24rpx 0 0 0;
|
|
418
|
+
font-size: 24rpx;
|
|
419
|
+
& > view:first-child {
|
|
420
|
+
color: #666;
|
|
421
|
+
}
|
|
422
|
+
& > view:nth-child(2) {
|
|
423
|
+
color: #999;
|
|
424
|
+
font-size: 22rpx;
|
|
425
|
+
padding: 24rpx 0;
|
|
426
|
+
}
|
|
427
|
+
& > view:nth-child(3) {
|
|
428
|
+
display: flex;
|
|
429
|
+
justify-content: space-between;
|
|
430
|
+
align-items: center;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
&-id {
|
|
434
|
+
display: flex;
|
|
435
|
+
align-items: center;
|
|
436
|
+
padding: 40rpx 60rpx;
|
|
437
|
+
font-size: 28rpx;
|
|
438
|
+
color: #333;
|
|
439
|
+
& > text {
|
|
440
|
+
margin-right: 30rpx;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
&-title {
|
|
444
|
+
font-size: 28rpx;
|
|
445
|
+
padding: 40rpx 60rpx 20rpx 60rpx;
|
|
446
|
+
}
|
|
447
|
+
&-filter {
|
|
448
|
+
display: flex;
|
|
449
|
+
justify-content: space-around;
|
|
450
|
+
padding: 40rpx 0;
|
|
451
|
+
border-bottom: 2rpx solid #eee;
|
|
452
|
+
color: #666666;
|
|
453
|
+
font-size: 24rpx;
|
|
454
|
+
&-condition {
|
|
455
|
+
display: flex;
|
|
456
|
+
align-items: center;
|
|
457
|
+
font-size: 28rpx;
|
|
458
|
+
& > text {
|
|
459
|
+
margin-right: 10rpx;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
&-list {
|
|
464
|
+
padding: 40rpx 40rpx 0 40rpx;
|
|
465
|
+
color: #333;
|
|
466
|
+
&-empty {
|
|
467
|
+
display: flex;
|
|
468
|
+
justify-content: center;
|
|
469
|
+
align-items: center;
|
|
470
|
+
padding-bottom: 40rpx;
|
|
471
|
+
color: #999;
|
|
472
|
+
font-size: 28rpx;
|
|
473
|
+
}
|
|
474
|
+
&-item {
|
|
475
|
+
display: flex;
|
|
476
|
+
justify-content: space-between;
|
|
477
|
+
padding-bottom: 40rpx;
|
|
478
|
+
& > view:first-child {
|
|
479
|
+
display: flex;
|
|
480
|
+
align-items: center;
|
|
481
|
+
text-align: left;
|
|
482
|
+
font-size: 28rpx;
|
|
483
|
+
}
|
|
484
|
+
& > view:nth-child(2) {
|
|
485
|
+
& > view:first-child {
|
|
486
|
+
color: #666;
|
|
487
|
+
font-size: 32rpx;
|
|
488
|
+
font-weight: 700;
|
|
489
|
+
text-align: right;
|
|
490
|
+
}
|
|
491
|
+
& > view:nth-child(2) {
|
|
492
|
+
color: #999;
|
|
493
|
+
font-size: 22rpx;
|
|
494
|
+
margin-top: 24rpx;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
</style>
|