jufubao-base 1.0.116-beta7 → 1.0.116-beta8
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/JfbBaseCardEntry/JfbBaseCardEntry.vue +1 -1
- package/src/components/JfbBaseCardInfo/Attr.js +21 -0
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +40 -4
- package/src/components/JfbBaseCardInfoEntry/Attr.js +11 -0
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +33 -4
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +10 -10
- package/src/components/JfbBaseConList/JfbBaseConList.vue +1 -1
- package/src/components/JfbBaseMySetting/Api.js +43 -0
- package/src/components/JfbBaseMySetting/Attr.js +23 -0
- package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +198 -0
- package/src/components/JfbBaseMySetting/JfbBaseMySettingLess.less +80 -0
- package/src/components/JfbBaseMySetting/JfbBaseMySettingMixin.js +30 -0
- package/src/components/JfbBaseMySetting/Mock.js +5 -0
- package/src/components/JfbBaseMySetting/XdListItem.vue +136 -0
package/package.json
CHANGED
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
<text>券号:</text>
|
|
178
178
|
<text>{{item.card_number}}</text>
|
|
179
179
|
</view>
|
|
180
|
-
<view @click.stop="toDetail(item)"
|
|
180
|
+
<view @click.stop="toDetail(item)">
|
|
181
181
|
<view>
|
|
182
182
|
<xd-font-icon icon="iconerweima" width="56" height="56" size="50" color="#fff"></xd-font-icon>
|
|
183
183
|
</view>
|
|
@@ -15,6 +15,17 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
inline: false,
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
label: '我的票券跳转地址:', //label
|
|
20
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
21
|
+
valueKey: 'my_card_url', //form[valueKey]
|
|
22
|
+
placeholder: '请选择我的票券跳转地址',
|
|
23
|
+
value: null,
|
|
24
|
+
setting: {
|
|
25
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
26
|
+
},
|
|
27
|
+
inline: false,
|
|
28
|
+
},
|
|
18
29
|
{
|
|
19
30
|
label: '券号框自定义文案:',
|
|
20
31
|
ele: 'el-input',
|
|
@@ -33,5 +44,15 @@ export default {
|
|
|
33
44
|
placeholder: '请输入密码框自定义文案',
|
|
34
45
|
className: 'input80'
|
|
35
46
|
},
|
|
47
|
+
{
|
|
48
|
+
label: "票券过期是否展示余额",
|
|
49
|
+
ele: "xd-radio",
|
|
50
|
+
valueKey: "is_show_balance",
|
|
51
|
+
value: "N",
|
|
52
|
+
list: [
|
|
53
|
+
{label: "是", value: "Y"},
|
|
54
|
+
{label: "否", value: "N"},
|
|
55
|
+
]
|
|
56
|
+
}
|
|
36
57
|
],
|
|
37
58
|
};
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
info[item.key]
|
|
64
64
|
}}</view>
|
|
65
65
|
</view>
|
|
66
|
-
<view class="jfb-base-card-info__body-residue">
|
|
66
|
+
<view v-if="isShowBalance" class="jfb-base-card-info__body-residue">
|
|
67
67
|
<view class="jfb-base-card-info__body-residue-wrap">
|
|
68
68
|
<view class="jfb-base-card-info__body-residue-label">
|
|
69
69
|
<view :style="{ color: '#242424', fontSize: '28rpx' }"
|
|
@@ -166,12 +166,20 @@ export default {
|
|
|
166
166
|
|
|
167
167
|
//页面跳转地址
|
|
168
168
|
backUrl: "",
|
|
169
|
+
is_show_balance: "N", //是否显示余额
|
|
170
|
+
my_card_url: "", //我的票券跳转地址
|
|
169
171
|
};
|
|
170
172
|
},
|
|
171
173
|
computed: {
|
|
172
174
|
prod_bottom() {
|
|
173
175
|
return this.fixedStyle({ height: 0, zIndex: 111 });
|
|
174
176
|
},
|
|
177
|
+
isShowBalance(){
|
|
178
|
+
if(this.info.is_expired === "Y"){
|
|
179
|
+
return this.is_show_balance === "Y";
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
175
183
|
},
|
|
176
184
|
created() {},
|
|
177
185
|
methods: {
|
|
@@ -187,10 +195,11 @@ export default {
|
|
|
187
195
|
vm: this,
|
|
188
196
|
data: {
|
|
189
197
|
card_qrcode: this.qrcode,
|
|
198
|
+
is_show_pop: "Y"
|
|
190
199
|
},
|
|
191
200
|
})
|
|
192
201
|
.then((res) => {
|
|
193
|
-
this.handlerAfterBindCard();
|
|
202
|
+
this.handlerAfterBindCard(res);
|
|
194
203
|
})
|
|
195
204
|
.catch();
|
|
196
205
|
} else {
|
|
@@ -199,15 +208,21 @@ export default {
|
|
|
199
208
|
data: {
|
|
200
209
|
card_password: this.card_password,
|
|
201
210
|
card_number: this.card_number + "",
|
|
211
|
+
is_show_pop: "Y"
|
|
202
212
|
},
|
|
203
213
|
})
|
|
204
214
|
.then((res) => {
|
|
205
|
-
this.handlerAfterBindCard();
|
|
215
|
+
this.handlerAfterBindCard(res);
|
|
206
216
|
})
|
|
207
217
|
.catch();
|
|
208
218
|
}
|
|
209
219
|
},
|
|
210
|
-
handlerAfterBindCard(){
|
|
220
|
+
handlerAfterBindCard(res){
|
|
221
|
+
if(res.pop_info && res.pop_info.pop_code === '1001'){
|
|
222
|
+
this.handleBindConfirm();
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
211
226
|
if(this.hasCon){
|
|
212
227
|
this.toShowCouponDialog();
|
|
213
228
|
this.$bus.$on("onCloseConDialog",(container_id) => {
|
|
@@ -228,6 +243,25 @@ export default {
|
|
|
228
243
|
});
|
|
229
244
|
}
|
|
230
245
|
},
|
|
246
|
+
//卡券已被自己绑定时的弹框
|
|
247
|
+
handleBindConfirm(){
|
|
248
|
+
this.$xdConfirm({
|
|
249
|
+
$vm: this,
|
|
250
|
+
width: '90%',
|
|
251
|
+
content: '您已绑定该票券,无需再次绑定',
|
|
252
|
+
confirmText: '我的票券',
|
|
253
|
+
cancelText: '返回',
|
|
254
|
+
showClose: false,
|
|
255
|
+
success: (res) => {
|
|
256
|
+
if (res.confirm) {
|
|
257
|
+
this.$xdUniHelper.redirectTo({
|
|
258
|
+
url: this.my_card_url || this.backUrl,
|
|
259
|
+
});
|
|
260
|
+
}else{
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
},
|
|
231
265
|
init() {
|
|
232
266
|
this.backUrl = getContainerPropsValue(
|
|
233
267
|
this.container,
|
|
@@ -244,6 +278,8 @@ export default {
|
|
|
244
278
|
"content.card_pwd_placeholder",
|
|
245
279
|
"请输入密码"
|
|
246
280
|
);
|
|
281
|
+
this.is_show_balance = getContainerPropsValue(this.container, 'content.is_show_balance', "N");
|
|
282
|
+
this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
|
|
247
283
|
},
|
|
248
284
|
onJfbLoad(options) {
|
|
249
285
|
this.init();
|
|
@@ -15,6 +15,17 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
inline: false,
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
label: '我的票券跳转地址:', //label
|
|
20
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
21
|
+
valueKey: 'my_card_url', //form[valueKey]
|
|
22
|
+
placeholder: '请选择我的票券跳转地址',
|
|
23
|
+
value: null,
|
|
24
|
+
setting: {
|
|
25
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
26
|
+
},
|
|
27
|
+
inline: false,
|
|
28
|
+
},
|
|
18
29
|
{
|
|
19
30
|
label: '券号框自定义文案:',
|
|
20
31
|
ele: 'el-input',
|
|
@@ -162,6 +162,7 @@ export default {
|
|
|
162
162
|
//页面跳转地址
|
|
163
163
|
backUrl: "",
|
|
164
164
|
headerBg: {},
|
|
165
|
+
my_card_url: "", //我的票券跳转地址
|
|
165
166
|
};
|
|
166
167
|
},
|
|
167
168
|
watch: {
|
|
@@ -204,10 +205,11 @@ export default {
|
|
|
204
205
|
vm: this,
|
|
205
206
|
data: {
|
|
206
207
|
card_qrcode: this.qrcode,
|
|
208
|
+
is_show_pop: "Y",
|
|
207
209
|
},
|
|
208
210
|
})
|
|
209
211
|
.then((res) => {
|
|
210
|
-
this.handlerAfterBindCard();
|
|
212
|
+
this.handlerAfterBindCard(res);
|
|
211
213
|
})
|
|
212
214
|
.catch();
|
|
213
215
|
} else {
|
|
@@ -216,17 +218,24 @@ export default {
|
|
|
216
218
|
data: {
|
|
217
219
|
card_password: this.card_password,
|
|
218
220
|
card_number: this.card_number + "",
|
|
219
|
-
is_show_entry_settings: "Y"
|
|
221
|
+
is_show_entry_settings: "Y",
|
|
222
|
+
is_show_pop: "Y",
|
|
220
223
|
},
|
|
221
224
|
})
|
|
222
225
|
.then((res) => {
|
|
223
226
|
console.log(this.$xdAlert, "this.$xdAlertfsdfs");
|
|
224
|
-
this.handlerAfterBindCard();
|
|
227
|
+
this.handlerAfterBindCard(res);
|
|
225
228
|
})
|
|
226
229
|
.catch();
|
|
227
230
|
}
|
|
228
231
|
},
|
|
229
|
-
handlerAfterBindCard(){
|
|
232
|
+
handlerAfterBindCard(res){
|
|
233
|
+
|
|
234
|
+
if(res.pop_info && res.pop_info.pop_code === '1001'){
|
|
235
|
+
this.handleBindConfirm();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
|
|
230
239
|
if(this.hasCon){
|
|
231
240
|
this.toShowCouponDialog();
|
|
232
241
|
this.$bus.$on("onCloseConDialog",(container_id) => {
|
|
@@ -247,6 +256,25 @@ export default {
|
|
|
247
256
|
});
|
|
248
257
|
}
|
|
249
258
|
},
|
|
259
|
+
//卡券已被自己绑定时的弹框
|
|
260
|
+
handleBindConfirm(){
|
|
261
|
+
this.$xdConfirm({
|
|
262
|
+
$vm: this,
|
|
263
|
+
width: '90%',
|
|
264
|
+
content: '您已绑定该票券,无需再次绑定',
|
|
265
|
+
confirmText: '我的票券',
|
|
266
|
+
cancelText: '返回',
|
|
267
|
+
showClose: false,
|
|
268
|
+
success: (res) => {
|
|
269
|
+
if (res.confirm) {
|
|
270
|
+
this.$xdUniHelper.redirectTo({
|
|
271
|
+
url: this.my_card_url || this.backUrl,
|
|
272
|
+
});
|
|
273
|
+
}else{
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
})
|
|
277
|
+
},
|
|
250
278
|
init() {
|
|
251
279
|
this.backUrl = getContainerPropsValue(
|
|
252
280
|
this.container,
|
|
@@ -263,6 +291,7 @@ export default {
|
|
|
263
291
|
"content.card_pwd_placeholder",
|
|
264
292
|
"请输入密码"
|
|
265
293
|
);
|
|
294
|
+
this.my_card_url = getContainerPropsValue(this.container, 'content.my_card_url', { value: "" }).value;
|
|
266
295
|
},
|
|
267
296
|
onJfbLoad(options) {
|
|
268
297
|
this.init();
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</view>
|
|
63
63
|
</view>
|
|
64
64
|
</view>
|
|
65
|
-
<view class="code">
|
|
65
|
+
<view class="code" v-if="0">
|
|
66
66
|
<view>验证码:</view>
|
|
67
67
|
<view>
|
|
68
68
|
<input v-model="valid_code" class="uni-input" placeholder="请输入验证码"/>
|
|
@@ -248,13 +248,13 @@ export default {
|
|
|
248
248
|
},
|
|
249
249
|
|
|
250
250
|
handleToSubmit() {
|
|
251
|
-
if (!this.valid_code) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
251
|
+
// if (!this.valid_code) {
|
|
252
|
+
// uni.showToast({
|
|
253
|
+
// title: "验证码不能为空!",
|
|
254
|
+
// icon: "none",
|
|
255
|
+
// });
|
|
256
|
+
// return;
|
|
257
|
+
// }
|
|
258
258
|
|
|
259
259
|
let outPrice = this.$xdUniHelper.divisionFloatNumber(this.fromSelect.card_point, 100);
|
|
260
260
|
let outHtml = `${this.fromSelect.value}(剩余:${outPrice})`;
|
|
@@ -269,8 +269,8 @@ export default {
|
|
|
269
269
|
let params = {
|
|
270
270
|
from_card_number: this.fromSelect.value,
|
|
271
271
|
to_card_number: this.toSelect.value,
|
|
272
|
-
valid_code: this.valid_code,
|
|
273
|
-
valid_token: this.valid_token
|
|
272
|
+
// valid_code: this.valid_code,
|
|
273
|
+
// valid_token: this.valid_token
|
|
274
274
|
};
|
|
275
275
|
|
|
276
276
|
if (action.confirm) {
|
|
@@ -0,0 +1,43 @@
|
|
|
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: 'getUserInfo',
|
|
16
|
+
title: '获取用户信息',
|
|
17
|
+
path: '/passport/v1/user/get',
|
|
18
|
+
params: {},
|
|
19
|
+
isRule: false,
|
|
20
|
+
isConsole: true,
|
|
21
|
+
disabled: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
mapFnName: 'getCardUserSetting',
|
|
25
|
+
title: '获取用户卡券配置',
|
|
26
|
+
path: '/card/v1/card-bind/get-card-user-setting',
|
|
27
|
+
params: {},
|
|
28
|
+
isRule: false,
|
|
29
|
+
isConsole: true,
|
|
30
|
+
disabled: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
mapFnName: 'setCardUserSetting',
|
|
34
|
+
title: '设置用户卡券配置',
|
|
35
|
+
path: '/card/v1/card-bind/set-card-user-setting',
|
|
36
|
+
data: {
|
|
37
|
+
is_entity_card_invalid: ['已绑卡实体卡是否失效', 'String Y N', '必选']
|
|
38
|
+
},
|
|
39
|
+
isRule: false,
|
|
40
|
+
isConsole: true,
|
|
41
|
+
disabled: true,
|
|
42
|
+
}
|
|
43
|
+
];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
style: [],
|
|
8
|
+
content: (data) => {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
label: '绑定手机号地址:', //label
|
|
12
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
13
|
+
valueKey: 'bind_phone_url', //form[valueKey]
|
|
14
|
+
value: data['select-pages-path'] || {},
|
|
15
|
+
setting: {
|
|
16
|
+
router: XdBus.getParentApi('getPagesTree')
|
|
17
|
+
},
|
|
18
|
+
inline: false,
|
|
19
|
+
},
|
|
20
|
+
].filter(i=>i)
|
|
21
|
+
},
|
|
22
|
+
advanced: [],
|
|
23
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-my-setting"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-my-setting__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-my-setting__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view class="jfb-base-my-setting__body" :style="{
|
|
17
|
+
minHeight: layoutInfo.bodyMinHeightRpx + 'rpx'
|
|
18
|
+
}">
|
|
19
|
+
<view class="setting_list">
|
|
20
|
+
<xd-list-item label="已绑实体卡是否失效" listIcon="icongongxiang" paddingLR="50rpx" paddingTB="32rpx">
|
|
21
|
+
<xd-switch :checked="cardChecked" size="small" @change="handleCardChecked"></xd-switch>
|
|
22
|
+
</xd-list-item>
|
|
23
|
+
<xd-list-item :showRight="!phone_number" label="绑定手机号" listIcon="iconshouji01"
|
|
24
|
+
paddingLR="50rpx" paddingTB="32rpx"
|
|
25
|
+
@click="handleToBind"
|
|
26
|
+
>
|
|
27
|
+
{{phone_number ? phone_number : "去绑定"}}
|
|
28
|
+
</xd-list-item>
|
|
29
|
+
</view>
|
|
30
|
+
<view class="fixed_bottom">
|
|
31
|
+
<xd-button type="primary" @click="handleLogout">退出登录</xd-button>
|
|
32
|
+
</view>
|
|
33
|
+
</view>
|
|
34
|
+
</view>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
39
|
+
import XdListItem from "./XdListItem.vue";
|
|
40
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
41
|
+
import XdSwitch from "@/components/XdSwitch/XdSwitch"
|
|
42
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
43
|
+
import JfbBaseMySettingMixin from "./JfbBaseMySettingMixin";
|
|
44
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
45
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
46
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
47
|
+
import {mapState} from 'vuex';
|
|
48
|
+
import store from "@/store";
|
|
49
|
+
export default {
|
|
50
|
+
name: "JfbBaseMySetting",
|
|
51
|
+
components: {
|
|
52
|
+
XdFontIcon,
|
|
53
|
+
XdButton,
|
|
54
|
+
XdListItem,
|
|
55
|
+
XdSwitch
|
|
56
|
+
},
|
|
57
|
+
mixins: [
|
|
58
|
+
componentsMixins, extsMixins, JfbBaseMySettingMixin
|
|
59
|
+
],
|
|
60
|
+
computed: {
|
|
61
|
+
...mapState(['jfbAuthorize']),
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
cardChecked: false,
|
|
66
|
+
phone_number: "",
|
|
67
|
+
|
|
68
|
+
//面板
|
|
69
|
+
bind_phone_url: "", //绑定手机号跳转地址
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
watch: {
|
|
73
|
+
container(value) {
|
|
74
|
+
this.init(value)
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
created() {
|
|
78
|
+
this.init(this.container);
|
|
79
|
+
|
|
80
|
+
//todo
|
|
81
|
+
},
|
|
82
|
+
methods: {
|
|
83
|
+
onJfbLoad(options) {
|
|
84
|
+
this.p_getUserInfo();
|
|
85
|
+
this.getCardConfig();
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* @description 监听事件变化
|
|
89
|
+
* @param container {object} 业务组件对象自己
|
|
90
|
+
*/
|
|
91
|
+
init(container) {
|
|
92
|
+
this.bind_phone_url = getContainerPropsValue(container, 'content.bind_phone_url', {value: ""}).value;
|
|
93
|
+
},
|
|
94
|
+
handleToBind(){
|
|
95
|
+
if(!this.phone_number){
|
|
96
|
+
this.$xdUniHelper.navigateTo({
|
|
97
|
+
url: this.bind_phone_url + `?callback_url=${encodeURIComponent(location.href)}`,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
handleCardChecked(flag){
|
|
102
|
+
jfbRootExec("setCardUserSetting", {
|
|
103
|
+
vm: this,
|
|
104
|
+
data: {
|
|
105
|
+
is_entity_card_invalid: flag ? "Y" : "N"
|
|
106
|
+
}
|
|
107
|
+
}).then(res => {
|
|
108
|
+
|
|
109
|
+
})
|
|
110
|
+
},
|
|
111
|
+
p_getUserInfo(){
|
|
112
|
+
jfbRootExec("getUserInfo", {
|
|
113
|
+
vm: this,
|
|
114
|
+
data: {
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
}).then(res => {
|
|
118
|
+
let phone_number = res.phone_number;
|
|
119
|
+
this.phone_number = phone_number;
|
|
120
|
+
})
|
|
121
|
+
},
|
|
122
|
+
getCardConfig(){
|
|
123
|
+
jfbRootExec("getCardUserSetting", {
|
|
124
|
+
vm: this,
|
|
125
|
+
data: {
|
|
126
|
+
|
|
127
|
+
}
|
|
128
|
+
}).then(res => {
|
|
129
|
+
let is_entity_card_invalid = res.is_entity_card_invalid; //Y失效 N: 有效
|
|
130
|
+
this.cardChecked = is_entity_card_invalid === "Y";
|
|
131
|
+
})
|
|
132
|
+
},
|
|
133
|
+
async handleLogout(){
|
|
134
|
+
// #ifdef H5
|
|
135
|
+
if (this.$configProject.isPreview) return;
|
|
136
|
+
// #endif
|
|
137
|
+
|
|
138
|
+
if (this.jfbAuthorize !== null) {
|
|
139
|
+
this.$xdShowLoading({});
|
|
140
|
+
store.dispatch('logout').then(res=>{
|
|
141
|
+
this.$xdHideLoading();
|
|
142
|
+
this.jfbAuthorize.removeToken('card');
|
|
143
|
+
this.jfbAuthorize.jumpToUserLogin(this, false);
|
|
144
|
+
}).catch(err=>{
|
|
145
|
+
console.error(err);
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
onJfbScroll(options) {
|
|
150
|
+
console.log('event.onJfbScroll', options)
|
|
151
|
+
},
|
|
152
|
+
onJfbReachBottom(options) {
|
|
153
|
+
console.log('event.onJfbReachBottom', options)
|
|
154
|
+
},
|
|
155
|
+
onJfbShow(options) {
|
|
156
|
+
console.log('event.onJfbShow', options)
|
|
157
|
+
},
|
|
158
|
+
onJfbHide(options) {
|
|
159
|
+
console.log('event.onJfbHide', options)
|
|
160
|
+
},
|
|
161
|
+
onJfbBack(options) {
|
|
162
|
+
console.log('event.onJfbBack', options)
|
|
163
|
+
},
|
|
164
|
+
onJfbUpdate(...data) {
|
|
165
|
+
console.log('event.onJfbUpdate', data)
|
|
166
|
+
},
|
|
167
|
+
onJfbCustomEvent(options) {
|
|
168
|
+
console.log('event.onJfbReachBottom', options)
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
</script>
|
|
174
|
+
|
|
175
|
+
<style scoped lang="less">
|
|
176
|
+
@import "./JfbBaseMySettingLess.less";
|
|
177
|
+
|
|
178
|
+
.jfb-base-my-setting {
|
|
179
|
+
&__body{
|
|
180
|
+
background: #DDD;
|
|
181
|
+
.setting_list{
|
|
182
|
+
padding: 20rpx 0;
|
|
183
|
+
/deep/ .xd-my-list-item{
|
|
184
|
+
background: #FFFFFF;
|
|
185
|
+
margin: 24rpx 20rpx;
|
|
186
|
+
border-radius: 20rpx;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
.fixed_bottom{
|
|
190
|
+
position: absolute;
|
|
191
|
+
width: 600rpx;
|
|
192
|
+
bottom: 100rpx;
|
|
193
|
+
left: 50%;
|
|
194
|
+
transform: translateX(-50%);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
</style>
|
|
@@ -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-my-setting {
|
|
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-my-setting {
|
|
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-my-setting'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="xd-my-list-item"
|
|
3
|
+
:class="'size_'+size"
|
|
4
|
+
:style="{
|
|
5
|
+
borderTop: showBottom ? '1px solid #eee':'none',
|
|
6
|
+
marginTop: showBottom? paddingTB: 0,
|
|
7
|
+
paddingLeft: paddingLR,
|
|
8
|
+
paddingRight: paddingLR,
|
|
9
|
+
paddingTop: paddingTB,
|
|
10
|
+
paddingBottom: paddingTB,
|
|
11
|
+
}"
|
|
12
|
+
@click="$emit('click')">
|
|
13
|
+
<view v-if="listIcon" class="my-list_icon">
|
|
14
|
+
<!-- <image mode="widthFix" :src="listIcon" /> -->
|
|
15
|
+
<xd-font-icon :icon="listIcon"></xd-font-icon>
|
|
16
|
+
</view>
|
|
17
|
+
<view class="my-list_label" v-html="label"></view>
|
|
18
|
+
<view class="my-list_value">
|
|
19
|
+
<slot></slot>
|
|
20
|
+
<xd-font-icon
|
|
21
|
+
v-if="showRight"
|
|
22
|
+
:style="{
|
|
23
|
+
marginLeft: '10rpx',
|
|
24
|
+
color: '#B1B1B1'
|
|
25
|
+
}"
|
|
26
|
+
size="24"
|
|
27
|
+
icon="iconxiangyou_xian"
|
|
28
|
+
></xd-font-icon>
|
|
29
|
+
</view>
|
|
30
|
+
|
|
31
|
+
</view>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
36
|
+
export default {
|
|
37
|
+
components: {
|
|
38
|
+
XdFontIcon
|
|
39
|
+
},
|
|
40
|
+
data(){
|
|
41
|
+
return {
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
props: {
|
|
46
|
+
size: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "default"
|
|
49
|
+
},
|
|
50
|
+
paddingTB:{
|
|
51
|
+
type: String,
|
|
52
|
+
default: "24rpx"
|
|
53
|
+
},
|
|
54
|
+
paddingLR: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "0rpx"
|
|
57
|
+
},
|
|
58
|
+
//是否显示border-bottom
|
|
59
|
+
showBottom: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
//是否显示右箭头
|
|
64
|
+
showRight: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
//是否显示图标
|
|
69
|
+
listIcon: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: ''
|
|
72
|
+
},
|
|
73
|
+
//label
|
|
74
|
+
label: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: ''
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<style lang="less" scoped>
|
|
84
|
+
.xd-my-list-item{
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
padding: 30rpx 0;
|
|
88
|
+
font-size: 28rpx;
|
|
89
|
+
background: #FFFFFF;
|
|
90
|
+
color: #666666;
|
|
91
|
+
|
|
92
|
+
&.size_large{
|
|
93
|
+
.my-list_value,
|
|
94
|
+
.my-list_label{
|
|
95
|
+
font-size: 28rpx;
|
|
96
|
+
font-weight: 400;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
&.size_default{
|
|
100
|
+
.my-list_value,
|
|
101
|
+
.my-list_label{
|
|
102
|
+
font-size: 28rpx;
|
|
103
|
+
font-weight: 400;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
&.size_small{
|
|
107
|
+
.my-list_value,
|
|
108
|
+
.my-list_label{
|
|
109
|
+
font-size: 24rpx;
|
|
110
|
+
font-weight: 400;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.my-list_icon{
|
|
115
|
+
width: 32rpx;
|
|
116
|
+
margin-right: 24rpx;
|
|
117
|
+
|
|
118
|
+
image{
|
|
119
|
+
width: 32rpx;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.my-list_label{
|
|
124
|
+
// flex: 1;
|
|
125
|
+
}
|
|
126
|
+
.my-list_value{
|
|
127
|
+
flex: 1;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: flex-end;
|
|
131
|
+
}
|
|
132
|
+
.arrow_right{
|
|
133
|
+
width: 44rpx;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
</style>
|