jufubao-base 1.0.56 → 1.0.61-beta1002
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 +2 -2
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +19 -1
- package/src/components/JfbBaseCardDetailEntry/Api.js +58 -0
- package/src/components/JfbBaseCardDetailEntry/Attr.js +30 -0
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +920 -0
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntryLess.less +80 -0
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntryMixin.js +30 -0
- package/src/components/JfbBaseCardDetailEntry/Mock.js +106 -0
- package/src/components/JfbBaseCardDetailEntry/XdEditPwd.vue +299 -0
- package/src/components/JfbBaseCardDetailEntry/XdPwPay.vue +214 -0
- package/src/components/JfbBaseCardDisabledEntry/Api.js +12 -7
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +39 -12
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +37 -1
- package/src/components/JfbBaseCardInfoEntry/Api.js +71 -0
- package/src/components/JfbBaseCardInfoEntry/Attr.js +37 -0
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +768 -0
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntryLess.less +80 -0
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntryMixin.js +30 -0
- package/src/components/JfbBaseCardInfoEntry/Mock.js +122 -0
- package/src/components/JfbBaseCardMergeEntry/Api.js +61 -0
- package/src/components/JfbBaseCardMergeEntry/Attr.js +237 -0
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +443 -0
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryLess.less +80 -0
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryMixin.js +30 -0
- package/src/components/JfbBaseCardMergeEntry/Mock.js +32 -0
- package/src/components/JfbBaseCardShiftEntry/Api.js +51 -0
- package/src/components/JfbBaseCardShiftEntry/Attr.js +237 -0
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +593 -0
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryLess.less +80 -0
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryMixin.js +30 -0
- package/src/components/JfbBaseCardShiftEntry/Mock.js +5 -0
- package/src/mixins/colorCardMixins.js +1 -1
|
@@ -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-card-detail-entry {
|
|
16
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
min-height: unit(100, 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-card-detail-entry {
|
|
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-card-detail-entry'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
getCardYueEntry: {},
|
|
5
|
+
getBaseByIdCardDetailEntry: {
|
|
6
|
+
"site_entry_settings": [{
|
|
7
|
+
"id": 57,
|
|
8
|
+
"business_code": "movie",
|
|
9
|
+
"entry_name": "在线选座",
|
|
10
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/74fcb8bf1bf617249eee5f1416533766.png",
|
|
11
|
+
"redirect_data": "{\"path\":\"https:\\\/\\\/website-01.jufubao.cn\\\/base\\\/system\\\/zhrk\\\/zkrk\"}",
|
|
12
|
+
"redirect_type": "URL"
|
|
13
|
+
}, {
|
|
14
|
+
"id": 10,
|
|
15
|
+
"business_code": "gift",
|
|
16
|
+
"entry_name": "礼包",
|
|
17
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/f1c8a447209eb04d77c2095a13cdadf4.png",
|
|
18
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/gift\\\/type\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/gift\\\/type\",\"frontPath\":\"\\\/apply\\\/main\\\/gift\\\/type\",\"fixed_business_code\":\"\"}",
|
|
19
|
+
"redirect_type": "INN"
|
|
20
|
+
}, {
|
|
21
|
+
"id": 7,
|
|
22
|
+
"business_code": "movie",
|
|
23
|
+
"entry_name": "在线选座",
|
|
24
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/61b3302ec80009964e0a4b7b2336e5cf.png",
|
|
25
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/movie\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/movie\\\/index\",\"frontPath\":\"\\\/apply\\\/main\\\/movie\\\/index\",\"fixed_business_code\":\"\"}",
|
|
26
|
+
"redirect_type": "INN"
|
|
27
|
+
}, {
|
|
28
|
+
"id": 9,
|
|
29
|
+
"business_code": "cake",
|
|
30
|
+
"entry_name": "蛋糕",
|
|
31
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/e582dc796bdb703a10860bcbbbb378f3.png",
|
|
32
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/cake\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/cake\\\/index\",\"frontPath\":\"\\\/apply\\\/main\\\/cake\\\/index\",\"fixed_business_code\":\"\"}",
|
|
33
|
+
"redirect_type": "INN"
|
|
34
|
+
}, {
|
|
35
|
+
"id": 18,
|
|
36
|
+
"business_code": "book",
|
|
37
|
+
"entry_name": "图书",
|
|
38
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/9edcdc737c48cdbf9364e321e8199a93.png",
|
|
39
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/book\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/book\\\/index\",\"frontPath\":\"\\\/apply\\\/main\\\/book\\\/index\",\"fixed_business_code\":\"\"}",
|
|
40
|
+
"redirect_type": "INN"
|
|
41
|
+
}, {
|
|
42
|
+
"id": 8,
|
|
43
|
+
"business_code": "market",
|
|
44
|
+
"entry_name": "百货",
|
|
45
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/920c4bd80f0a995e245aedbfaf1181d5.png",
|
|
46
|
+
"redirect_data": "{\"dir\":\"apply02\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/mall\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply02\\\/main\\\/mall\\\/index\",\"frontPath\":\"\\\/apply02\\\/main\\\/mall\\\/index\",\"fixed_business_code\":\"\"}",
|
|
47
|
+
"redirect_type": "INN"
|
|
48
|
+
}, {
|
|
49
|
+
"id": 17,
|
|
50
|
+
"business_code": "video",
|
|
51
|
+
"entry_name": "网络视听",
|
|
52
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/1ca9647b7ddd9937054792412d3c2367.png",
|
|
53
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/video\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/video\\\/index\",\"frontPath\":\"\\\/apply\\\/main\\\/video\\\/index\",\"fixed_business_code\":\"\"}",
|
|
54
|
+
"redirect_type": "INN"
|
|
55
|
+
}, {
|
|
56
|
+
"id": 35,
|
|
57
|
+
"business_code": "v-RcA8Mv-Gpd96_Y_mjIf",
|
|
58
|
+
"entry_name": "全福券",
|
|
59
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/53191864826b864b8b6fd4f1eb397a93.png",
|
|
60
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/system\\\/card\\\/card\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/system\\\/card\\\/card\",\"frontPath\":\"\\\/apply\\\/system\\\/card\\\/card\",\"fixed_business_code\":\"\"}",
|
|
61
|
+
"redirect_type": "INN"
|
|
62
|
+
}, {
|
|
63
|
+
"id": 40,
|
|
64
|
+
"business_code": "93028be3",
|
|
65
|
+
"entry_name": "专区",
|
|
66
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/84d23a8c7af7a63842eb696c00068b3d.png",
|
|
67
|
+
"redirect_data": "{\"dir\":\"apply05\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/mall\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply05\\\/main\\\/mall\\\/index\",\"frontPath\":\"\\\/apply05\\\/main\\\/mall\\\/index\",\"fixed_business_code\":\"-y8t4cmogeFvi8fmuxFSK\"}",
|
|
68
|
+
"redirect_type": "INN"
|
|
69
|
+
}, {
|
|
70
|
+
"id": 34,
|
|
71
|
+
"business_code": "food",
|
|
72
|
+
"entry_name": "餐饮",
|
|
73
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/97728bf3ef2a6361c0a1771549d2d435.png",
|
|
74
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/food\\\/rkym\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/food\\\/rkym\",\"frontPath\":\"\\\/apply\\\/main\\\/food\\\/rkym\",\"fixed_business_code\":\"\"}",
|
|
75
|
+
"redirect_type": "INN"
|
|
76
|
+
}, {
|
|
77
|
+
"id": 55,
|
|
78
|
+
"business_code": "cake",
|
|
79
|
+
"entry_name": "蛋糕内部",
|
|
80
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/2e549739768758dde7968ff7cb98c6d8.png",
|
|
81
|
+
"redirect_data": "{\"dir\":\"apply03\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/cake\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply03\\\/main\\\/cake\\\/index\",\"frontPath\":\"\\\/apply03\\\/main\\\/cake\\\/index\",\"fixed_business_code\":\"cake\"}",
|
|
82
|
+
"redirect_type": "INN"
|
|
83
|
+
}, {
|
|
84
|
+
"id": 54,
|
|
85
|
+
"business_code": "health",
|
|
86
|
+
"entry_name": "体检",
|
|
87
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/e06b058a2104025ffecee960b3b9321d.png",
|
|
88
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/health\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/health\\\/index\",\"frontPath\":\"\\\/apply\\\/main\\\/health\\\/index\",\"fixed_business_code\":\"\"}",
|
|
89
|
+
"redirect_type": "INN"
|
|
90
|
+
}, {
|
|
91
|
+
"id": 30,
|
|
92
|
+
"business_code": "travel",
|
|
93
|
+
"entry_name": "旅游",
|
|
94
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/09ceefe2d1776a399b567c7acdf2c9db.png",
|
|
95
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/travel\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/travel\\\/index\",\"frontPath\":\"\\\/apply\\\/main\\\/travel\\\/index\",\"fixed_business_code\":\"\"}",
|
|
96
|
+
"redirect_type": "INN"
|
|
97
|
+
}, {
|
|
98
|
+
"id": 16,
|
|
99
|
+
"business_code": "play",
|
|
100
|
+
"entry_name": "演出",
|
|
101
|
+
"image_url": "https:\/\/sandbox-img.jufubao.cn\/uploads\/20230927\/07e1d76f1850fbadc9a12d7ff2d7689c.png",
|
|
102
|
+
"redirect_data": "{\"dir\":\"apply\",\"host\":\"sandbox-website-05.jufubao.cn\",\"path\":\"\\\/main\\\/play\\\/index\",\"site_id\":\"17928cc37788be02\",\"site_url\":\"https:\\\/\\\/sandbox-website-05.jufubao.cn\\\/apply\\\/main\\\/play\\\/index\",\"frontPath\":\"\\\/apply\\\/main\\\/play\\\/index\",\"fixed_business_code\":\"\"}",
|
|
103
|
+
"redirect_type": "INN"
|
|
104
|
+
}], "is_show_qrcode_logo": 'Y', "card_number": "101001000008076", "card_point": 20367, "card_type_name": "多余额福卡", "end_time": "2025-04-30 23:59:59", "card_status": "Y", "card_status_name": "开启", "card_qrcode": "\/\/sandbox-apis.jufubao.cn\/common\/v1\/image\/qrcode?code_content=h.161.ktrd9ie2jnbkdb8", "barcode": "\/\/sandbox-apis.jufubao.cn\/common\/v1\/image\/barcode?code_content=h.161.ktrd9ie2jnbkdb8", "card_qrcode_expire": 600, "unit": "点", "main_business_code_name": "蛋糕(勿改)", "other_card_point": 4073, "is_exchange": "N", "exchange_card_type_name": "福券", "exchange_card_point": 18330, "card_point_type": 2, "request_id": "ce26274fa52c8412"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view>
|
|
3
|
+
<xd-dailog
|
|
4
|
+
:show.sync="uiShow"
|
|
5
|
+
width="90%"
|
|
6
|
+
title="设置支付密码"
|
|
7
|
+
:cancel="false"
|
|
8
|
+
:confirm="false"
|
|
9
|
+
:zIndex="1100"
|
|
10
|
+
:showClose="showClose"
|
|
11
|
+
@close="handleClose"
|
|
12
|
+
>
|
|
13
|
+
<view class="pwd">
|
|
14
|
+
<view class="pwd__title" v-if="title">
|
|
15
|
+
<view>
|
|
16
|
+
{{title}}
|
|
17
|
+
</view>
|
|
18
|
+
</view>
|
|
19
|
+
<view class="pwd__form">
|
|
20
|
+
<view class="pwd__form-item">
|
|
21
|
+
<view>
|
|
22
|
+
手机号:
|
|
23
|
+
</view>
|
|
24
|
+
<view>
|
|
25
|
+
<input
|
|
26
|
+
:disabled="editPhone!==''"
|
|
27
|
+
:style="{width:370+'rpx'}"
|
|
28
|
+
type="number"
|
|
29
|
+
placeholder="请输入手机号"
|
|
30
|
+
:adjust-position="false"
|
|
31
|
+
v-model="form.phone"
|
|
32
|
+
/>
|
|
33
|
+
</view>
|
|
34
|
+
</view>
|
|
35
|
+
|
|
36
|
+
<view class="pwd__form-item">
|
|
37
|
+
<view style="display: flex;align-items: center;flex: 1;
|
|
38
|
+
width: 0;">
|
|
39
|
+
<view>验证码:</view>
|
|
40
|
+
<view>
|
|
41
|
+
<input
|
|
42
|
+
:style="{width:160+'rpx',marginRight:30+'rpx'}"
|
|
43
|
+
type="text"
|
|
44
|
+
placeholder="请输入验证码"
|
|
45
|
+
:adjust-position="false"
|
|
46
|
+
v-model="form.sms_code"/>
|
|
47
|
+
</view>
|
|
48
|
+
</view>
|
|
49
|
+
<view style="flex-shrink: 0;">
|
|
50
|
+
<xd-button
|
|
51
|
+
size="mini"
|
|
52
|
+
type="default"
|
|
53
|
+
@click="getSmsCodeHandle"
|
|
54
|
+
:disabled="!form.phone || status"
|
|
55
|
+
:style="{width:codeWidth+'rpx'}"
|
|
56
|
+
>
|
|
57
|
+
{{statusMsg}}
|
|
58
|
+
</xd-button>
|
|
59
|
+
</view>
|
|
60
|
+
</view>
|
|
61
|
+
|
|
62
|
+
<view class="pwd__form-item">
|
|
63
|
+
<view>设置支付密码:</view>
|
|
64
|
+
<view>
|
|
65
|
+
<input
|
|
66
|
+
type="password"
|
|
67
|
+
placeholder="请输入六位纯数字密码"
|
|
68
|
+
:adjust-position="false"
|
|
69
|
+
v-model="form.password"
|
|
70
|
+
maxlength="6"
|
|
71
|
+
/>
|
|
72
|
+
</view>
|
|
73
|
+
</view>
|
|
74
|
+
|
|
75
|
+
<view class="pwd__form-item">
|
|
76
|
+
<view>确认支付密码:</view>
|
|
77
|
+
<view>
|
|
78
|
+
<input
|
|
79
|
+
type="password"
|
|
80
|
+
placeholder="请输入确认密码"
|
|
81
|
+
:adjust-position="false"
|
|
82
|
+
v-model="form.confirmPwd"
|
|
83
|
+
maxlength="6"
|
|
84
|
+
/>
|
|
85
|
+
</view>
|
|
86
|
+
</view>
|
|
87
|
+
</view>
|
|
88
|
+
|
|
89
|
+
<view>
|
|
90
|
+
<xd-button
|
|
91
|
+
type="primary"
|
|
92
|
+
size="mini"
|
|
93
|
+
:disabled="!form.phone || !form.sms_code || !form.password || !form.confirmPwd"
|
|
94
|
+
@click="submit"
|
|
95
|
+
>确定</xd-button>
|
|
96
|
+
</view>
|
|
97
|
+
</view>
|
|
98
|
+
</xd-dailog>
|
|
99
|
+
</view>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<script>
|
|
103
|
+
import XdDailog from "@/components/XdDailog/XdDailog";
|
|
104
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
105
|
+
|
|
106
|
+
export default {
|
|
107
|
+
name: "SetPassword",
|
|
108
|
+
props: {
|
|
109
|
+
show: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: false
|
|
112
|
+
},
|
|
113
|
+
title: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: ''
|
|
116
|
+
},
|
|
117
|
+
editPhone: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: ''
|
|
120
|
+
},
|
|
121
|
+
showClose: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: true
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
components: {
|
|
127
|
+
XdDailog,
|
|
128
|
+
XdButton
|
|
129
|
+
},
|
|
130
|
+
data() {
|
|
131
|
+
return {
|
|
132
|
+
form: {
|
|
133
|
+
sms_code: '',
|
|
134
|
+
phone: '', //手机号
|
|
135
|
+
password: '',
|
|
136
|
+
confirmPwd: '',
|
|
137
|
+
},
|
|
138
|
+
status: false,
|
|
139
|
+
second: 0,
|
|
140
|
+
statusMsg: '获取验证码',
|
|
141
|
+
codeWidth: '200',
|
|
142
|
+
confirm: true,
|
|
143
|
+
uiShow: false
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
created() {
|
|
147
|
+
if (this.editPhone) {
|
|
148
|
+
this.form.phone = this.editPhone
|
|
149
|
+
}
|
|
150
|
+
this.uiShow = this.show;
|
|
151
|
+
},
|
|
152
|
+
computed: {},
|
|
153
|
+
watch: {
|
|
154
|
+
'form.password': {
|
|
155
|
+
handler: function (val, oldval) {
|
|
156
|
+
let num = val.charAt(val.length - 1);
|
|
157
|
+
let reg = new RegExp("^[0-9]*$");
|
|
158
|
+
if (!reg.test(num)) {
|
|
159
|
+
setTimeout(() => {
|
|
160
|
+
this.form.password = val.slice(0, -1);
|
|
161
|
+
}, 0);
|
|
162
|
+
} else {
|
|
163
|
+
setTimeout(() => {
|
|
164
|
+
this.form.password = val;
|
|
165
|
+
}, 0);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
'form.confirmPwd': {
|
|
172
|
+
handler: function (val, oldval) {
|
|
173
|
+
let num = val.charAt(val.length - 1);
|
|
174
|
+
let reg = new RegExp("^[0-9]*$");
|
|
175
|
+
if (!reg.test(num)) {
|
|
176
|
+
setTimeout(() => {
|
|
177
|
+
this.form.confirmPwd = val.slice(0, -1);
|
|
178
|
+
}, 0);
|
|
179
|
+
} else {
|
|
180
|
+
setTimeout(() => {
|
|
181
|
+
this.form.confirmPwd = val;
|
|
182
|
+
}, 0);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
show(newVal) {
|
|
189
|
+
this.uiShow = newVal;
|
|
190
|
+
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
uiShow(value) {
|
|
194
|
+
this.$emit('update:show', value);
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
methods: {
|
|
198
|
+
getSmsCodeHandle() {
|
|
199
|
+
//无手机号
|
|
200
|
+
if (!this.form.phone) {
|
|
201
|
+
this.$xdAlert({
|
|
202
|
+
content: '请输入手机号!',
|
|
203
|
+
time: 1500,
|
|
204
|
+
isClose: false,
|
|
205
|
+
zIndex: 5000
|
|
206
|
+
});
|
|
207
|
+
return
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (this.status) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
this.$emit('onGetCode', this.form.phone, () => {
|
|
214
|
+
this.sendSmsSuccess()
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
sendSmsSuccess() {
|
|
220
|
+
this.status = true;
|
|
221
|
+
this.second = 119;
|
|
222
|
+
this.codeWidth = '300';
|
|
223
|
+
this.statusMsg = `短信已发送:${this.second}s`;
|
|
224
|
+
let time = setInterval(() => {
|
|
225
|
+
this.statusMsg = `短信已发送:${this.second}s`;
|
|
226
|
+
this.second--;
|
|
227
|
+
if (this.second === 0) {
|
|
228
|
+
clearInterval(time);
|
|
229
|
+
this.status = false;
|
|
230
|
+
this.second = 0;
|
|
231
|
+
this.codeWidth = '200';
|
|
232
|
+
this.statusMsg = '获取验证码';
|
|
233
|
+
}
|
|
234
|
+
}, 1000)
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
submit() {
|
|
238
|
+
|
|
239
|
+
if (this.form.password.length < 6 || this.form.confirmPwd.length < 6) {
|
|
240
|
+
this.$xdAlert({
|
|
241
|
+
content: '密码长度不能少于六位!',
|
|
242
|
+
time: 1500,
|
|
243
|
+
isClose: false,
|
|
244
|
+
zIndex: 5000
|
|
245
|
+
});
|
|
246
|
+
return
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (this.form.password !== this.form.confirmPwd) {
|
|
250
|
+
this.$xdAlert({
|
|
251
|
+
content: '确认密码和密码不一致!',
|
|
252
|
+
time: 1500,
|
|
253
|
+
isClose: false,
|
|
254
|
+
zIndex: 5000
|
|
255
|
+
});
|
|
256
|
+
return
|
|
257
|
+
}
|
|
258
|
+
this.$emit('onSubmit', this.form)
|
|
259
|
+
},
|
|
260
|
+
|
|
261
|
+
handleClose() {
|
|
262
|
+
this.$emit('onClose')
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
</script>
|
|
267
|
+
|
|
268
|
+
<style lang="less">
|
|
269
|
+
.pwd {
|
|
270
|
+
font-size: @xd-font-size-base;
|
|
271
|
+
|
|
272
|
+
&__title {
|
|
273
|
+
border: 1px solid #ccc;
|
|
274
|
+
padding: unit(20, rpx);
|
|
275
|
+
text-align: center;
|
|
276
|
+
font-size: @xd-font-size-base + 4;
|
|
277
|
+
margin-bottom: unit(20, rpx);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
&__form {
|
|
281
|
+
margin-bottom: unit(27, rpx);
|
|
282
|
+
|
|
283
|
+
&-item {
|
|
284
|
+
display: flex;
|
|
285
|
+
align-items: center;
|
|
286
|
+
padding: unit(10, rpx) 0;
|
|
287
|
+
|
|
288
|
+
input {
|
|
289
|
+
font-size: @xd-font-size-base;
|
|
290
|
+
border-bottom: 1px solid #ccc;
|
|
291
|
+
text-align: left;
|
|
292
|
+
padding: unit(10, rpx);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
</style>
|
|
299
|
+
|