bxs-tools-ui 3.2.1 → 3.3.0
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/README.md +20 -20
- package/es/add-and-take/index.css +1 -1
- package/es/add-and-take/index.js +283 -64
- package/es/adjust-baoe/index.css +1 -1
- package/es/adjust-baoe/index.js +444 -195
- package/es/business-card/index.css +1 -1
- package/es/business-card/index.js +1 -0
- package/es/canvas-poster/index.css +1 -1
- package/es/canvas-poster/index.js +1 -0
- package/es/index.css +1 -1
- package/es/index.js +950 -839
- package/es/insure-calculate/index.css +1 -1
- package/es/insure-calculate/index.js +438 -265
- package/es/person-info/index.css +1 -1
- package/es/person-info/index.js +296 -1370
- package/es/product-info/index.css +1 -1
- package/es/product-info/index.js +644 -548
- package/es/share-sheet/index.css +1 -1
- package/es/share-sheet/index.js +321 -30
- package/es/utils/index.js +530 -429
- package/lib/add-and-take/index.css +1 -1
- package/lib/add-and-take/index.js +283 -64
- package/lib/adjust-baoe/index.css +1 -1
- package/lib/adjust-baoe/index.js +441 -194
- package/lib/business-card/index.css +1 -1
- package/lib/business-card/index.js +1 -0
- package/lib/canvas-poster/index.css +1 -1
- package/lib/canvas-poster/index.js +1 -0
- package/lib/index.css +1 -1
- package/lib/index.js +953 -841
- package/lib/insure-calculate/index.css +1 -1
- package/lib/insure-calculate/index.js +438 -268
- package/lib/person-info/index.css +1 -1
- package/lib/person-info/index.js +295 -1372
- package/lib/product-info/index.css +1 -1
- package/lib/product-info/index.js +645 -550
- package/lib/share-sheet/index.css +1 -1
- package/lib/share-sheet/index.js +321 -34
- package/lib/utils/index.js +531 -433
- package/package.json +9 -7
- package/packages/add-and-take/components/interest-form.less +144 -0
- package/packages/add-and-take/components/interest-form.vue +179 -179
- package/packages/add-and-take/components/interest-items.less +87 -0
- package/packages/add-and-take/components/interest-items.vue +67 -80
- package/packages/add-and-take/components/interest-table.less +111 -0
- package/packages/add-and-take/components/interest-table.vue +31 -31
- package/packages/add-and-take/constant.ts +2 -2
- package/packages/add-and-take/demo/index.vue +89 -86
- package/packages/add-and-take/handler.ts +52 -57
- package/packages/add-and-take/index.less +69 -0
- package/packages/add-and-take/index.vue +156 -156
- package/packages/add-and-take/readme.md +87 -98
- package/packages/adjust-baoe/demo/index.vue +37 -47
- package/packages/adjust-baoe/index.less +125 -0
- package/packages/adjust-baoe/index.vue +134 -147
- package/packages/adjust-baoe/readme.md +35 -45
- package/packages/business-card/demo/index.vue +7 -7
- package/packages/business-card/index.less +100 -0
- package/packages/business-card/index.vue +18 -21
- package/packages/business-card/readme.md +46 -53
- package/packages/bxs-utils/demo/index.vue +2 -2
- package/packages/bxs-utils/index.ts +5 -5
- package/packages/bxs-utils/planbook/common.ts +56 -92
- package/packages/bxs-utils/planbook/index.ts +4 -4
- package/packages/bxs-utils/planbook/insurance.ts +137 -127
- package/packages/bxs-utils/planbook/person.ts +143 -147
- package/packages/bxs-utils/planbook/product.ts +473 -509
- package/packages/bxs-utils/readme.md +94 -84
- package/packages/bxs-utils/trade/index.js +1 -1
- package/packages/bxs-utils/trade/insureCalculate.js +91 -204
- package/packages/canvas-poster/demo/index.vue +9 -13
- package/packages/canvas-poster/index.less +5 -0
- package/packages/canvas-poster/index.vue +68 -79
- package/packages/canvas-poster/readme.md +106 -109
- package/packages/index.ts +1 -1
- package/packages/insure-calculate/demo/index.vue +20 -20
- package/packages/insure-calculate/index.less +366 -0
- package/packages/insure-calculate/index.vue +305 -329
- package/packages/insure-calculate/readme.md +99 -106
- package/packages/person-info/crm-popup.vue +81 -80
- package/packages/person-info/demo/index.vue +25 -37
- package/packages/person-info/index-inline.less +11 -0
- package/packages/person-info/index.vue +53 -83
- package/packages/person-info/readme.md +109 -115
- package/packages/planbook-input/components/footer.less +54 -0
- package/packages/planbook-input/components/footer.vue +8 -64
- package/packages/planbook-input/components/handler.js +33 -44
- package/packages/planbook-input/components/product-table.less +235 -0
- package/packages/planbook-input/components/product-table.vue +114 -108
- package/packages/planbook-input/demo/index.vue +3 -3
- package/packages/planbook-input/helper.js +852 -465
- package/packages/planbook-input/index.less +30 -0
- package/packages/planbook-input/index.vue +86 -103
- package/packages/planbook-input/readme.md +72 -90
- package/packages/product-info/demo/constant.js +1 -1
- package/packages/product-info/demo/index.vue +31 -43
- package/packages/product-info/index.less +271 -0
- package/packages/product-info/index.vue +198 -210
- package/packages/product-info/readme.md +72 -75
- package/packages/share-sheet/constant.js +6 -11
- package/packages/share-sheet/demo/index.vue +24 -24
- package/packages/share-sheet/handler.js +14 -14
- package/packages/share-sheet/index.less +201 -0
- package/packages/share-sheet/index.vue +43 -43
- package/packages/share-sheet/readme.md +121 -127
- package/src/api/add-and-take.js +45 -0
- package/src/api/adjust-baoe.js +16 -0
- package/src/api/index.js +6 -0
- package/src/api/planbook.js +93 -0
- package/src/api/request.js +211 -0
- package/src/api/trade.js +56 -0
- package/src/api/user.js +18 -0
- package/src/components/common/common-age-birthday.less +66 -0
- package/src/components/common/common-age-birthday.vue +27 -95
- package/src/components/common/common-popup.less +81 -0
- package/src/components/common/common-popup.vue +12 -96
- package/src/components/common/common-radio.less +75 -0
- package/src/components/common/common-radio.vue +13 -91
- package/src/components/common/common-select.less +13 -0
- package/src/components/common/common-select.vue +21 -38
- package/src/components/common/common-title.less +115 -0
- package/src/components/common/common-title.vue +24 -24
- package/src/js/loading.js +6 -6
- package/src/js/md5Token.js +38 -44
- package/src/js/utils.js +45 -53
- package/src/js/variables.js +47 -25
- package/src/style/base.less +18 -0
- package/src/style/color.less +40 -0
- package/src/style/variables.less +21 -42
- package/packages/add-and-take/api.ts +0 -70
- package/packages/add-and-take/components/interest-form.css +0 -146
- package/packages/add-and-take/components/interest-items.css +0 -87
- package/packages/add-and-take/components/interest-table.css +0 -113
- package/packages/add-and-take/index.css +0 -70
- package/packages/adjust-baoe/index.css +0 -123
- package/packages/business-card/index.css +0 -101
- package/packages/canvas-poster/index.css +0 -5
- package/packages/insure-calculate/index.css +0 -368
- package/packages/planbook-input/api.js +0 -29
- package/packages/planbook-input/components/product-table.css +0 -236
- package/packages/planbook-input/index.css +0 -31
- package/packages/product-info/index.css +0 -264
- package/packages/share-sheet/index.css +0 -190
- package/src/components/common/common-title.css +0 -116
- package/src/js/request.js +0 -64
- package/src/style/apply.css +0 -25
- package/src/style/base.css +0 -36
- package/src/style/color.css +0 -74
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
</section>
|
|
37
37
|
<slot name="header"></slot>
|
|
38
38
|
<section v-if="shareOptions.length" class="bxt-share bxt-bottom-border">
|
|
39
|
-
<div class="bxt-share-wrapper">
|
|
39
|
+
<div class="bxt-share-wrapper" :class="[shareOptions.length > 4 ? 'more' : '']">
|
|
40
40
|
<figure v-for="o in shareOptions" :key="o.action" @click="onClickShare(o)">
|
|
41
41
|
<div class="bxt-empty-image">
|
|
42
42
|
<img v-if="o.actionIcon" :src="o.actionIcon" alt="icon" />
|
|
43
43
|
</div>
|
|
44
|
-
<figcaption>{{ textOverflowEllipsis(o.actionName,
|
|
44
|
+
<figcaption>{{ textOverflowEllipsis(o.actionName, 5) }}</figcaption>
|
|
45
45
|
</figure>
|
|
46
46
|
</div>
|
|
47
47
|
</section>
|
|
48
48
|
<section v-if="actionOptions.length" class="bxt-share bxt-bottom-border">
|
|
49
|
-
<div class="bxt-share-wrapper">
|
|
49
|
+
<div class="bxt-share-wrapper" :class="[actionOptions.length > 4 ? 'more' : '']">
|
|
50
50
|
<figure v-for="o in actionOptions" :key="o.action" @click="onClickAction(o)">
|
|
51
51
|
<div class="bxt-empty-image">
|
|
52
52
|
<img v-if="o.actionIcon" :src="o.actionIcon" alt="icon" />
|
|
53
53
|
</div>
|
|
54
|
-
<figcaption>{{ textOverflowEllipsis(o.actionName,
|
|
54
|
+
<figcaption>{{ textOverflowEllipsis(o.actionName, 5) }}</figcaption>
|
|
55
55
|
</figure>
|
|
56
56
|
</div>
|
|
57
57
|
</section>
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
</van-popup>
|
|
66
66
|
</template>
|
|
67
67
|
<script>
|
|
68
|
-
import { Popup, RadioGroup, Radio, Button } from 'vant'
|
|
69
|
-
import { get as _get, cloneDeep } from 'lodash'
|
|
70
|
-
import { textOverflowEllipsis } from 'packages/bxs-utils/planbook/index.ts'
|
|
71
|
-
import { EXPIRE_ENUM, ACTION_ENUM } from './constant'
|
|
72
|
-
import { getExpireTimestamp, shareHandler } from './handler'
|
|
73
|
-
import './index.
|
|
68
|
+
import { Popup, RadioGroup, Radio, Button } from 'vant'
|
|
69
|
+
import { get as _get, cloneDeep } from 'lodash'
|
|
70
|
+
import { textOverflowEllipsis } from 'packages/bxs-utils/planbook/index.ts'
|
|
71
|
+
import { EXPIRE_ENUM, ACTION_ENUM } from './constant'
|
|
72
|
+
import { getExpireTimestamp, shareHandler } from './handler'
|
|
73
|
+
import './index.less'
|
|
74
74
|
|
|
75
75
|
export default {
|
|
76
76
|
components: {
|
|
@@ -91,52 +91,52 @@ export default {
|
|
|
91
91
|
data() {
|
|
92
92
|
return {
|
|
93
93
|
expireValue: _get(this, 'expireData.value') || null
|
|
94
|
-
}
|
|
94
|
+
}
|
|
95
95
|
},
|
|
96
96
|
computed: {
|
|
97
97
|
visible: {
|
|
98
98
|
get() {
|
|
99
|
-
return this.value
|
|
99
|
+
return this.value
|
|
100
100
|
},
|
|
101
101
|
set(v) {
|
|
102
|
-
this.$emit('input', v)
|
|
102
|
+
this.$emit('input', v)
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
expireOptions() {
|
|
106
|
-
let options = cloneDeep(EXPIRE_ENUM)
|
|
106
|
+
let options = cloneDeep(EXPIRE_ENUM)
|
|
107
107
|
if (Array.isArray(_get(this, 'expireData.options'))) {
|
|
108
|
-
options = _get(this, 'expireData.options')
|
|
108
|
+
options = _get(this, 'expireData.options')
|
|
109
109
|
}
|
|
110
|
-
return options
|
|
110
|
+
return options
|
|
111
111
|
},
|
|
112
112
|
shareOptions() {
|
|
113
|
-
let options = []
|
|
113
|
+
let options = []
|
|
114
114
|
if (Array.isArray(this.shareActions)) {
|
|
115
115
|
options = this.shareActions.map(e => {
|
|
116
|
-
const defaultInfo = ACTION_ENUM.find(o => o.action === e.action)
|
|
117
|
-
e.actionName = e.actionName || _get(defaultInfo, 'actionName') || ''
|
|
118
|
-
e.actionIcon = e.actionIcon || _get(defaultInfo, 'actionIcon') || ''
|
|
119
|
-
return e
|
|
120
|
-
})
|
|
116
|
+
const defaultInfo = ACTION_ENUM.find(o => o.action === e.action)
|
|
117
|
+
e.actionName = e.actionName || _get(defaultInfo, 'actionName') || ''
|
|
118
|
+
e.actionIcon = e.actionIcon || _get(defaultInfo, 'actionIcon') || ''
|
|
119
|
+
return e
|
|
120
|
+
})
|
|
121
121
|
}
|
|
122
|
-
return options
|
|
122
|
+
return options
|
|
123
123
|
},
|
|
124
124
|
actionOptions() {
|
|
125
|
-
let options = []
|
|
125
|
+
let options = []
|
|
126
126
|
if (Array.isArray(this.featureActions)) {
|
|
127
127
|
options = this.featureActions.map(e => {
|
|
128
|
-
const defaultInfo = ACTION_ENUM.find(o => o.action === e.action)
|
|
129
|
-
e.actionName = e.actionName || _get(defaultInfo, 'actionName') || ''
|
|
130
|
-
e.actionIcon = e.actionIcon || _get(defaultInfo, 'actionIcon') || ''
|
|
131
|
-
return e
|
|
132
|
-
})
|
|
128
|
+
const defaultInfo = ACTION_ENUM.find(o => o.action === e.action)
|
|
129
|
+
e.actionName = e.actionName || _get(defaultInfo, 'actionName') || ''
|
|
130
|
+
e.actionIcon = e.actionIcon || _get(defaultInfo, 'actionIcon') || ''
|
|
131
|
+
return e
|
|
132
|
+
})
|
|
133
133
|
}
|
|
134
|
-
return options
|
|
134
|
+
return options
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
137
|
created() {
|
|
138
138
|
if (this.explainData) {
|
|
139
|
-
this.onClickCopy(this.explainData)
|
|
139
|
+
this.onClickCopy(this.explainData)
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
142
|
mounted() {},
|
|
@@ -144,35 +144,35 @@ export default {
|
|
|
144
144
|
textOverflowEllipsis,
|
|
145
145
|
onClickOverlay() {
|
|
146
146
|
if (this.closeOnClickOverlay) {
|
|
147
|
-
this.visible = false
|
|
147
|
+
this.visible = false
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
150
|
onClickAfterExpire() {
|
|
151
|
-
const url = _get(this, 'expireData.urlAfterExpire')
|
|
151
|
+
const url = _get(this, 'expireData.urlAfterExpire')
|
|
152
152
|
if (url) {
|
|
153
|
-
location.href = url
|
|
153
|
+
location.href = url
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
156
|
onClickExpire(o) {
|
|
157
|
-
this.$emit('expire', o)
|
|
157
|
+
this.$emit('expire', o)
|
|
158
158
|
},
|
|
159
159
|
onClickCopy(item) {
|
|
160
160
|
if (item.text && item.copy) {
|
|
161
|
-
appBridge.copyString(item.text)
|
|
161
|
+
appBridge.copyString(item.text)
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
164
|
onClickShare(item) {
|
|
165
|
-
const newItem = shareHandler(item, this.expireValue)
|
|
166
|
-
this.$emit('action', newItem)
|
|
165
|
+
const newItem = shareHandler(item, this.expireValue)
|
|
166
|
+
this.$emit('action', newItem)
|
|
167
167
|
},
|
|
168
168
|
onClickAction(item) {
|
|
169
|
-
const newItem = cloneDeep(item)
|
|
170
|
-
const expireTimestamp = getExpireTimestamp(this.expireValue)
|
|
169
|
+
const newItem = cloneDeep(item)
|
|
170
|
+
const expireTimestamp = getExpireTimestamp(this.expireValue)
|
|
171
171
|
if (expireTimestamp) {
|
|
172
|
-
newItem.expireTimestamp = expireTimestamp
|
|
172
|
+
newItem.expireTimestamp = expireTimestamp
|
|
173
173
|
}
|
|
174
|
-
this.$emit('action', newItem)
|
|
174
|
+
this.$emit('action', newItem)
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
}
|
|
177
|
+
}
|
|
178
178
|
</script>
|
|
@@ -49,72 +49,72 @@ export default {
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<script>
|
|
52
|
-
import { ShareSheet } from 'bxs-tools-ui';
|
|
53
|
-
|
|
54
|
-
export default {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
explainData: {
|
|
65
|
-
title: '分享说明',
|
|
66
|
-
text: '分享后推广费及奖励将不可见,请放心分享,用户投保成功,推广费及奖励可拿。',
|
|
67
|
-
copy: true
|
|
68
|
-
},
|
|
69
|
-
shareActions: [
|
|
70
|
-
{
|
|
71
|
-
action: 'wechat_friends',
|
|
72
|
-
actionName: '微信自定义名称',
|
|
73
|
-
actionIcon: 'https://img.winbaoxian.com/static/...png',
|
|
74
|
-
title: '分享面板',
|
|
75
|
-
content: '分享内容的详细描述',
|
|
76
|
-
imgUrl: 'https://img.winbaoxian.com/static/...png',
|
|
77
|
-
shareUrl: location.href
|
|
52
|
+
import { ShareSheet } from 'bxs-tools-ui';
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
components: { ShareSheet },
|
|
56
|
+
data() {
|
|
57
|
+
return {
|
|
58
|
+
visible: true,
|
|
59
|
+
introduceImage: 'https://media.winbaoxian.com/assets-uploader/...png',
|
|
60
|
+
expireData: {
|
|
61
|
+
value: 'NEVER',
|
|
62
|
+
urlAfterExpire: 'https://pbf.winbaoxian.cn/planBook/projectGroup/feedback/index.html'
|
|
78
63
|
},
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
webPageUrl: 'https://www.winbaoxian.com/',
|
|
84
|
-
userName: 'gh_db166d39960f',
|
|
85
|
-
path: '/pages/result/index?uuid=e21d73a0c20d4900a765237a4907a82b&theme=theme_pbhzczdlw&t=1',
|
|
86
|
-
title: '买保险优选服务',
|
|
87
|
-
description: '小程序消息描述信息',
|
|
88
|
-
imageUrl: 'https://img.winbaoxian.com/static/...png'
|
|
64
|
+
explainData: {
|
|
65
|
+
title: '分享说明',
|
|
66
|
+
text: '分享后推广费及奖励将不可见,请放心分享,用户投保成功,推广费及奖励可拿。',
|
|
67
|
+
copy: true
|
|
89
68
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
69
|
+
shareActions: [
|
|
70
|
+
{
|
|
71
|
+
action: 'wechat_friends',
|
|
72
|
+
actionName: '微信自定义名称',
|
|
73
|
+
actionIcon: 'https://img.winbaoxian.com/static/...png',
|
|
74
|
+
title: '分享面板',
|
|
75
|
+
content: '分享内容的详细描述',
|
|
76
|
+
imgUrl: 'https://img.winbaoxian.com/static/...png',
|
|
77
|
+
shareUrl: location.href
|
|
78
|
+
},
|
|
79
|
+
{ action: 'wechat_timeline', title: '分享面板', content: '分享内容的详细描述', imgUrl: 'https://img...', shareUrl: location.href },
|
|
80
|
+
{ action: 'qq_friends', title: '分享面板', content: '分享内容的详细描述', imgUrl: 'https://img...', shareUrl: location.href },
|
|
81
|
+
{
|
|
82
|
+
action: 'shareMiniProgram',
|
|
83
|
+
webPageUrl: 'https://www.winbaoxian.com/',
|
|
84
|
+
userName: 'gh_db166d39960f',
|
|
85
|
+
path: '/pages/result/index?uuid=e21d73a0c20d4900a765237a4907a82b&theme=theme_pbhzczdlw&t=1',
|
|
86
|
+
title: '买保险优选服务',
|
|
87
|
+
description: '小程序消息描述信息',
|
|
88
|
+
imageUrl: 'https://img.winbaoxian.com/static/...png'
|
|
89
|
+
},
|
|
90
|
+
{ action: 'system_share', title: '分享面板', content: '分享内容的详细描述', imgUrl: 'https://img...', shareUrl: location.href }
|
|
91
|
+
],
|
|
92
|
+
featureActions: [
|
|
93
|
+
{ action: 'collect' },
|
|
94
|
+
{ action: 'collectCancel' },
|
|
95
|
+
{ action: 'report' },
|
|
96
|
+
{ action: 'delete' },
|
|
97
|
+
{ action: 'claim' },
|
|
98
|
+
{ action: 'qr_scan' },
|
|
99
|
+
{ action: 'text_zoom' },
|
|
100
|
+
{ action: 'h5_mark_frequently_used' },
|
|
101
|
+
{ action: 'h5_cancel_frequently_used' },
|
|
102
|
+
{ action: 'h5_feedback' }
|
|
103
|
+
]
|
|
104
|
+
};
|
|
109
105
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
methods: {
|
|
107
|
+
onExpire(o) {
|
|
108
|
+
console.log(o);
|
|
109
|
+
},
|
|
110
|
+
onAction(item) {
|
|
111
|
+
if (item.customActionHandler) {
|
|
112
|
+
// 自定义行为(由调用方处理)
|
|
113
|
+
}
|
|
114
|
+
console.log(item);
|
|
113
115
|
}
|
|
114
|
-
console.log(item);
|
|
115
116
|
}
|
|
116
|
-
}
|
|
117
|
-
};
|
|
117
|
+
};
|
|
118
118
|
</script>
|
|
119
119
|
```
|
|
120
120
|
|
|
@@ -124,56 +124,52 @@ export default {
|
|
|
124
124
|
|
|
125
125
|
根级 props 控制弹窗与各区块是否出现;对象/数组的字段见下方分表。
|
|
126
126
|
|
|
127
|
-
|
|
128
127
|
#### 根级 props
|
|
129
128
|
|
|
130
|
-
| 参数
|
|
131
|
-
|
|
|
132
|
-
| `value` / `v-model`
|
|
129
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
130
|
+
| --------------------- | ------- | ------- | -------------------------------------------------- |
|
|
131
|
+
| `value` / `v-model` | Boolean | `false` | 弹窗显示/隐藏 |
|
|
133
132
|
| `closeOnClickOverlay` | Boolean | `false` | 是否允许通过点击遮罩层关闭(不包括说明图与内容区) |
|
|
134
|
-
| `introduceImage`
|
|
135
|
-
| `expireData`
|
|
136
|
-
| `explainData`
|
|
137
|
-
| `shareActions`
|
|
138
|
-
| `featureActions`
|
|
139
|
-
|
|
133
|
+
| `introduceImage` | String | — | 顶部说明图地址 |
|
|
134
|
+
| `expireData` | Object | — | 传入则展示「分享有效期」模块 |
|
|
135
|
+
| `explainData` | Object | — | `title` 或 `text` 有值则展示说明区 |
|
|
136
|
+
| `shareActions` | Array | `[]` | 分享渠道入口列表 |
|
|
137
|
+
| `featureActions` | Array | `[]` | 功能入口列表 |
|
|
140
138
|
|
|
141
139
|
#### expireData
|
|
142
140
|
|
|
143
|
-
| 参数
|
|
144
|
-
|
|
|
145
|
-
| `value`
|
|
146
|
-
| `options`
|
|
147
|
-
| `urlAfterExpire` | String | —
|
|
148
|
-
|
|
141
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
142
|
+
| ---------------- | ------ | ------ | --------------------------------------------------------------------------------------------- |
|
|
143
|
+
| `value` | String | — | 当前选中的有效期;参与 `expireTimestamp` 与 `shareUrl` 上的 `wy_expire`;`NEVER` 不生成时间戳 |
|
|
144
|
+
| `options` | Array | 有 | 可选,数组元素的 key,建议使用:NEVER、24h、72h、7d、15d、30d |
|
|
145
|
+
| `urlAfterExpire` | String | — | 「链接失效后客户看到什么?」的跳转地址 |
|
|
149
146
|
|
|
150
147
|
#### explainData
|
|
151
148
|
|
|
152
|
-
| 参数
|
|
153
|
-
|
|
|
154
|
-
| `title` | String
|
|
155
|
-
| `text`
|
|
156
|
-
| `copy`
|
|
157
|
-
|
|
149
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
150
|
+
| ------- | ------- | ------ | ------------------------------------------------------------------- |
|
|
151
|
+
| `title` | String | — | 说明区标题(带下边框样式) |
|
|
152
|
+
| `text` | String | — | 说明正文 |
|
|
153
|
+
| `copy` | Boolean | — | 为 `true` 且有 `text` 时,点击正文调用 `appBridge.copyString(text)` |
|
|
158
154
|
|
|
159
155
|
#### shareActions(单项)
|
|
160
156
|
|
|
161
157
|
若 `action` 属于 `SHARE_ENUM` 且未提供 `customActionHandler`,会尝试调用 `appBridge.share` 或 `appBridge.gotoNativeView`(小程序)。
|
|
162
158
|
|
|
163
|
-
| 参数
|
|
164
|
-
|
|
|
165
|
-
| `action`
|
|
166
|
-
| `actionName`
|
|
167
|
-
| `actionIcon`
|
|
168
|
-
| `customActionHandler` | Function | —
|
|
159
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
160
|
+
| --------------------- | -------- | ------ | --------------------------------------------------------------------------------------- |
|
|
161
|
+
| `action` | String | — | 必传,渠道类型;默认文案/图标来自 `ACTION_ENUM`;是否走内置原生分享由 `SHARE_ENUM` 决定 |
|
|
162
|
+
| `actionName` | String | — | 可选,覆盖展示文案 |
|
|
163
|
+
| `actionIcon` | String | — | 可选,覆盖展示图标 |
|
|
164
|
+
| `customActionHandler` | Function | — | 存在时执行 `customActionHandler(newItem)`,并跳过内置原生分享 |
|
|
169
165
|
|
|
170
166
|
**SHARE_ENUM**(内置原生分享):
|
|
171
|
-
* `wechat_friends`
|
|
172
|
-
* `wechat_timeline`
|
|
173
|
-
* `qq_friends`
|
|
174
|
-
* `shareMiniProgram`
|
|
175
|
-
* `system_share`。
|
|
176
167
|
|
|
168
|
+
- `wechat_friends`
|
|
169
|
+
- `wechat_timeline`
|
|
170
|
+
- `qq_friends`
|
|
171
|
+
- `shareMiniProgram`
|
|
172
|
+
- `system_share`。
|
|
177
173
|
|
|
178
174
|
**透传字段**(按渠道自行传入,组件透传给原生):
|
|
179
175
|
|
|
@@ -182,40 +178,38 @@ export default {
|
|
|
182
178
|
|
|
183
179
|
**链接过期**:当能算出 `expireTimestamp` 且该项有 `shareUrl` 时,会追加 `wy_expire=<expireTimestamp>`。
|
|
184
180
|
|
|
185
|
-
|
|
186
181
|
#### featureActions(单项)
|
|
187
182
|
|
|
188
|
-
| 参数
|
|
189
|
-
|
|
|
190
|
-
| `action`
|
|
191
|
-
| `actionName`
|
|
192
|
-
| `actionIcon`
|
|
193
|
-
| `customActionHandler` | Function | —
|
|
194
|
-
|
|
183
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
184
|
+
| --------------------- | -------- | ------ | ----------------------------------------------------- |
|
|
185
|
+
| `action` | String | — | 功能类型;默认文案/图标来自 `ACTION_ENUM` |
|
|
186
|
+
| `actionName` | String | — | 可选,覆盖展示文案 |
|
|
187
|
+
| `actionIcon` | String | — | 可选,覆盖展示图标 |
|
|
188
|
+
| `customActionHandler` | Function | — | 可选,原样透传;是否在业务里调用由 `@action` 自行处理 |
|
|
195
189
|
|
|
196
190
|
#### 内置 action 文案(ACTION_ENUM)
|
|
197
191
|
|
|
198
|
-
| `action`
|
|
199
|
-
|
|
|
200
|
-
| `wechat_friends`
|
|
201
|
-
| `wechat_timeline`
|
|
202
|
-
| `qq_friends`
|
|
203
|
-
| `shareMiniProgram`
|
|
204
|
-
| `system_share`
|
|
205
|
-
| `generatePoster`
|
|
206
|
-
| `download`
|
|
207
|
-
| `theme`
|
|
208
|
-
| `setting`
|
|
209
|
-
| `collect`
|
|
210
|
-
| `collectCancel`
|
|
211
|
-
| `report`
|
|
212
|
-
| `delete`
|
|
213
|
-
| `claim`
|
|
214
|
-
| `qr_scan`
|
|
215
|
-
| `text_zoom`
|
|
216
|
-
| `h5_mark_frequently_used`
|
|
192
|
+
| `action` | 默认文案 |
|
|
193
|
+
| --------------------------- | -------- |
|
|
194
|
+
| `wechat_friends` | 微信好友 |
|
|
195
|
+
| `wechat_timeline` | 朋友圈 |
|
|
196
|
+
| `qq_friends` | QQ |
|
|
197
|
+
| `shareMiniProgram` | 小程序 |
|
|
198
|
+
| `system_share` | 系统分享 |
|
|
199
|
+
| `generatePoster` | 生成海报 |
|
|
200
|
+
| `download` | 下载 |
|
|
201
|
+
| `theme` | 换肤 |
|
|
202
|
+
| `setting` | 设置 |
|
|
203
|
+
| `collect` | 收藏 |
|
|
204
|
+
| `collectCancel` | 取消收藏 |
|
|
205
|
+
| `report` | 举报 |
|
|
206
|
+
| `delete` | 删除 |
|
|
207
|
+
| `claim` | 理赔 |
|
|
208
|
+
| `qr_scan` | 扫一扫 |
|
|
209
|
+
| `text_zoom` | 文字缩放 |
|
|
210
|
+
| `h5_mark_frequently_used` | 设为常用 |
|
|
217
211
|
| `h5_cancel_frequently_used` | 取消常用 |
|
|
218
|
-
| `h5_feedback`
|
|
212
|
+
| `h5_feedback` | 反馈 |
|
|
219
213
|
|
|
220
214
|
---
|
|
221
215
|
|
|
@@ -227,11 +221,11 @@ export default {
|
|
|
227
221
|
|
|
228
222
|
### Events
|
|
229
223
|
|
|
230
|
-
| 事件名
|
|
231
|
-
|
|
|
232
|
-
| `input`
|
|
233
|
-
| `expire` | 切换有效期单选项
|
|
234
|
-
| `action` | 点击分享或功能入口 | Object
|
|
224
|
+
| 事件名 | 说明 | 参数 | 备注 |
|
|
225
|
+
| -------- | ------------------ | ------- | ------------------------------------------------------------------------ |
|
|
226
|
+
| `input` | `v-model` 同步 | Boolean | 弹窗显隐变化时触发 |
|
|
227
|
+
| `expire` | 切换有效期单选项 | Object | 含 `value`、`name`、`millisecond` 等 |
|
|
228
|
+
| `action` | 点击分享或功能入口 | Object | 分享项:经 `shareHandler` 处理;功能项:深拷贝,可能含 `expireTimestamp` |
|
|
235
229
|
|
|
236
230
|
---
|
|
237
231
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import request from './request'
|
|
2
|
+
|
|
3
|
+
export function initInsuranceInterest(reqParams, options = {}) {
|
|
4
|
+
const { scene } = options
|
|
5
|
+
const apis = {
|
|
6
|
+
init: '/planBook/interest/init',
|
|
7
|
+
init4: '/planBook/public/interest/product/init',
|
|
8
|
+
init5: '/planBook/insurance/compare/draw/init'
|
|
9
|
+
}
|
|
10
|
+
const api = apis[`init${[4, 5].includes(scene) ? scene : ''}`]
|
|
11
|
+
|
|
12
|
+
return request({
|
|
13
|
+
url: api,
|
|
14
|
+
method: 'post',
|
|
15
|
+
data: reqParams,
|
|
16
|
+
headers: {
|
|
17
|
+
Accept: 'application/json, text/plain, */*',
|
|
18
|
+
'Content-Type': 'application/json;'
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function getInsuranceInterestDetail(reqParams, options = {}) {
|
|
24
|
+
const { scene, isReduceBaof } = options
|
|
25
|
+
const apis = {
|
|
26
|
+
addAndTake: '/planBook/interest/addAndTake/detail',
|
|
27
|
+
addAndTake4: '/planBook/public/interest/addAndTake/detail',
|
|
28
|
+
addAndTake5: '/planBook/interest/addAndTake/detail',
|
|
29
|
+
draw: '/planBook/interest/draw/detail',
|
|
30
|
+
draw4: '/planBook/public/interest/draw/detail',
|
|
31
|
+
draw5: '/planBook/insurance/compare/draw/detail'
|
|
32
|
+
}
|
|
33
|
+
const type = isReduceBaof ? 'draw' : 'addAndTake'
|
|
34
|
+
const api = apis[`${type}${[4, 5].includes(scene) ? scene : ''}`]
|
|
35
|
+
|
|
36
|
+
return request({
|
|
37
|
+
url: api,
|
|
38
|
+
method: 'post',
|
|
39
|
+
data: reqParams,
|
|
40
|
+
headers: {
|
|
41
|
+
Accept: 'application/json, text/plain, */*',
|
|
42
|
+
'Content-Type': 'application/json;'
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import QS from 'qs'
|
|
2
|
+
import request from './request'
|
|
3
|
+
|
|
4
|
+
export function validateAdjustBaoe(params, options = {}) {
|
|
5
|
+
return request({
|
|
6
|
+
url: `/planBook/${options.publicPbUuid ? 'public' : 'V2'}/validateAccount/-1/low`,
|
|
7
|
+
method: 'post',
|
|
8
|
+
data: QS.stringify({
|
|
9
|
+
jd: JSON.stringify(params)
|
|
10
|
+
}),
|
|
11
|
+
headers: {
|
|
12
|
+
Accept: 'application/json, text/plain, */*',
|
|
13
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
}
|
package/src/api/index.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import QS from 'qs'
|
|
2
|
+
import request from './request'
|
|
3
|
+
import { APP_HOSTNAME } from '../js/variables.js'
|
|
4
|
+
|
|
5
|
+
export function getPlanbookInitData(params) {
|
|
6
|
+
return request({
|
|
7
|
+
url: '/planBook/V2/getInitData',
|
|
8
|
+
method: 'get',
|
|
9
|
+
params
|
|
10
|
+
})
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function getPublicPlanbookInitData(params) {
|
|
14
|
+
return request({
|
|
15
|
+
url: '/planBook/public/init',
|
|
16
|
+
method: 'post',
|
|
17
|
+
data: QS.stringify(params),
|
|
18
|
+
headers: {
|
|
19
|
+
Accept: 'application/json, text/plain, */*',
|
|
20
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function getPlanbookData(params) {
|
|
26
|
+
if (params && params.publicPbUuid) {
|
|
27
|
+
return getPublicPlanbookInitData(params)
|
|
28
|
+
}
|
|
29
|
+
return getPlanbookInitData(params)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function calcPlanbookProduct(params, options = {}) {
|
|
33
|
+
return request({
|
|
34
|
+
url: `/planBook/${options.publicPbUuid ? 'public' : 'V2'}/calculate`,
|
|
35
|
+
method: 'post',
|
|
36
|
+
data: params,
|
|
37
|
+
headers: {
|
|
38
|
+
Accept: 'application/json, text/plain, */*',
|
|
39
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
40
|
+
},
|
|
41
|
+
isIgnoreLoading: true,
|
|
42
|
+
returnFullResponse: true
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function uploadPlanBookResult(params, options = {}) {
|
|
47
|
+
return request({
|
|
48
|
+
url: `/planBook/${options.publicPbUuid ? 'public/createPb' : 'V2/uploadResult'}`,
|
|
49
|
+
method: 'post',
|
|
50
|
+
data: params,
|
|
51
|
+
headers: {
|
|
52
|
+
Accept: 'application/json, text/plain, */*',
|
|
53
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function getPlanbookRecommendData(params) {
|
|
59
|
+
return request({
|
|
60
|
+
url: '/planBook/input/calculate/recommend',
|
|
61
|
+
method: 'post',
|
|
62
|
+
data: params,
|
|
63
|
+
headers: {
|
|
64
|
+
Accept: 'application/json, text/plain, */*',
|
|
65
|
+
'Content-Type': 'application/json;'
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function getPlanbookInsuranceVerifyData(params) {
|
|
71
|
+
return request({
|
|
72
|
+
baseURL: APP_HOSTNAME,
|
|
73
|
+
url: '/planBook/input/insurance/verifyData',
|
|
74
|
+
method: 'post',
|
|
75
|
+
data: params,
|
|
76
|
+
headers: {
|
|
77
|
+
Accept: 'application/json, text/plain, */*',
|
|
78
|
+
'Content-Type': 'application/json;'
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function getUnderwriteEffectiveRules(insuranceIds) {
|
|
84
|
+
return request({
|
|
85
|
+
url: '/planBook/interest/underwrite/effective-rules',
|
|
86
|
+
method: 'post',
|
|
87
|
+
data: insuranceIds,
|
|
88
|
+
headers: {
|
|
89
|
+
Accept: 'application/json, text/plain, */*',
|
|
90
|
+
'Content-Type': 'application/json;'
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
}
|