jufubao-base 1.0.116-beta7 → 1.0.116-beta9
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/JfbBaseConFlashHome/Api.js +60 -0
- package/src/components/JfbBaseConFlashHome/Attr.js +106 -0
- package/src/components/JfbBaseConFlashHome/JfbBaseConFlashHome.vue +110 -0
- package/src/components/JfbBaseConFlashHome/JfbBaseConFlashHomeLess.less +80 -0
- package/src/components/JfbBaseConFlashHome/JfbBaseConFlashHomeMixin.js +30 -0
- package/src/components/JfbBaseConFlashHome/Mock.js +5 -0
- package/src/components/JfbBaseConFlashList/Api.js +60 -0
- package/src/components/JfbBaseConFlashList/Attr.js +106 -0
- package/src/components/JfbBaseConFlashList/JfbBaseConFlashList.vue +110 -0
- package/src/components/JfbBaseConFlashList/JfbBaseConFlashListLess.less +80 -0
- package/src/components/JfbBaseConFlashList/JfbBaseConFlashListMixin.js +30 -0
- package/src/components/JfbBaseConFlashList/Mock.js +5 -0
- 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 +202 -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
|
@@ -0,0 +1,60 @@
|
|
|
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: 'getByIdFilmSquate', //自定义方法名字(必选)
|
|
16
|
+
title: '获取电影广场列表',
|
|
17
|
+
path: '/api/account/film/list-film-square',
|
|
18
|
+
isRule: false,
|
|
19
|
+
params: {
|
|
20
|
+
last_key: ['当前页', 'Number', '必选'],
|
|
21
|
+
page_size: ['每页数量', 'Number', '必选'],
|
|
22
|
+
},
|
|
23
|
+
isConsole: true,
|
|
24
|
+
disabled: true,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
mapFnName: 'updateFilmPaiqiDate', //自定义方法名字(必选)
|
|
28
|
+
title: '更新排期',
|
|
29
|
+
path: '/api/account/film/paiqi-date',
|
|
30
|
+
isRule: false,
|
|
31
|
+
params: {
|
|
32
|
+
film_id: ['电影id', 'Number', '必选'],
|
|
33
|
+
cinema_id: ['影院id', 'Number', '必选'],
|
|
34
|
+
},
|
|
35
|
+
isConsole: true,
|
|
36
|
+
disabled: true,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
mapFnName: 'removeFilmAddress', //自定义方法名字(必选)
|
|
40
|
+
title: '删除我的配送地址',
|
|
41
|
+
path: '/api/account/film/paiqi-date',
|
|
42
|
+
isRule: false,
|
|
43
|
+
params: {
|
|
44
|
+
film_id: ['电影id', 'Number', '必选'],
|
|
45
|
+
},
|
|
46
|
+
isConsole: true,
|
|
47
|
+
disabled: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
mapFnName: 'addFilmcart', //自定义方法名字(必选)
|
|
51
|
+
title: '添加购物车',
|
|
52
|
+
path: '/api/account/film/paiqi-date',
|
|
53
|
+
isRule: false,
|
|
54
|
+
params: {
|
|
55
|
+
film_id: ['电影id', 'Number', '必选'],
|
|
56
|
+
},
|
|
57
|
+
isConsole: true,
|
|
58
|
+
disabled: true,
|
|
59
|
+
},
|
|
60
|
+
];
|
|
@@ -0,0 +1,106 @@
|
|
|
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-color', //package 名称
|
|
13
|
+
valueKey: 'bgcolor', //form[valueKey]
|
|
14
|
+
value: data.bgcolor || '', //v-model
|
|
15
|
+
placeholder: '请输入占位框背景颜色',
|
|
16
|
+
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
17
|
+
rules: [
|
|
18
|
+
{
|
|
19
|
+
required: true,
|
|
20
|
+
message: '请输入占位框背景颜色',
|
|
21
|
+
trigger: 'blur'
|
|
22
|
+
},
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: '选中路径:', //label
|
|
27
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
28
|
+
valueKey: 'select-pages-path', //form[valueKey]
|
|
29
|
+
value: data['select-pages-path'] || {},
|
|
30
|
+
setting: {
|
|
31
|
+
router: XdBus.getParentApi('getPagesTree')
|
|
32
|
+
},
|
|
33
|
+
inline: false,
|
|
34
|
+
},
|
|
35
|
+
data.bgcolor && {
|
|
36
|
+
label: '高度:', //label
|
|
37
|
+
ele: 'el-input', //package 名称
|
|
38
|
+
type: 'number',
|
|
39
|
+
valueKey: 'height', //form[valueKey]
|
|
40
|
+
value: data.height || 100, //v-model
|
|
41
|
+
placeholder: '请输入占位框高度,单位像素,默认:10px',
|
|
42
|
+
className: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
43
|
+
rules: [
|
|
44
|
+
{
|
|
45
|
+
required: true,
|
|
46
|
+
message: '请输入占位框高度',
|
|
47
|
+
trigger: 'blur'
|
|
48
|
+
},
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: '', //label
|
|
53
|
+
ele: 'slot', //package 名称
|
|
54
|
+
slot: 'is_reference',
|
|
55
|
+
},
|
|
56
|
+
].filter(i=>i)
|
|
57
|
+
},
|
|
58
|
+
advanced: [
|
|
59
|
+
{
|
|
60
|
+
label: '背景颜色:', //label
|
|
61
|
+
ele: 'xd-color', //package 名称
|
|
62
|
+
valueKey: 'bgcolor', //form[valueKey]
|
|
63
|
+
value: '', //v-model
|
|
64
|
+
placeholder: '请输入占位框背景颜色',
|
|
65
|
+
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
66
|
+
rules: [
|
|
67
|
+
{
|
|
68
|
+
required: true,
|
|
69
|
+
message: '请输入占位框背景颜色',
|
|
70
|
+
trigger: 'blur'
|
|
71
|
+
},
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: '选中路径:', //label
|
|
76
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
77
|
+
valueKey: 'select-pages-path', //form[valueKey]
|
|
78
|
+
value: null,
|
|
79
|
+
setting: {
|
|
80
|
+
router: XdBus.getParentApi('getPagesTree')
|
|
81
|
+
},
|
|
82
|
+
inline: false,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: '高度:', //label
|
|
86
|
+
ele: 'el-input', //package 名称
|
|
87
|
+
type: 'number',
|
|
88
|
+
valueKey: 'height', //form[valueKey]
|
|
89
|
+
value: null, //v-model
|
|
90
|
+
placeholder: '请输入占位框高度,单位像素,默认:10px',
|
|
91
|
+
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
92
|
+
rules: [
|
|
93
|
+
{
|
|
94
|
+
required: true,
|
|
95
|
+
message: '请输入占位框高度',
|
|
96
|
+
trigger: 'blur'
|
|
97
|
+
},
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: '', //label
|
|
102
|
+
ele: 'slot', //package 名称
|
|
103
|
+
slot: 'is_reference',
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-con-flash-list"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-con-flash-list__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-con-flash-list__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view class="jfb-base-con-flash-list__body">
|
|
17
|
+
<view>测试插件( {{containerId}} )</view>
|
|
18
|
+
</view>
|
|
19
|
+
</view>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
24
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
25
|
+
import JfbBaseConFlashListMixin from "./JfbBaseConFlashListMixin";
|
|
26
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
27
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
28
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
29
|
+
export default {
|
|
30
|
+
name: "JfbBaseConFlashList",
|
|
31
|
+
components: {
|
|
32
|
+
XdFontIcon
|
|
33
|
+
},
|
|
34
|
+
mixins: [
|
|
35
|
+
componentsMixins, extsMixins, JfbBaseConFlashListMixin
|
|
36
|
+
],
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
|
|
40
|
+
//todo
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
container(value) {
|
|
45
|
+
this.init(value)
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
created() {
|
|
49
|
+
this.init(this.container);
|
|
50
|
+
|
|
51
|
+
//todo
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
onJfbLoad(options) {
|
|
55
|
+
|
|
56
|
+
// jfbRootExec('baiduUserLogin', {
|
|
57
|
+
|
|
58
|
+
// vm: this,// data: {
|
|
59
|
+
|
|
60
|
+
// account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
|
|
61
|
+
|
|
62
|
+
// }
|
|
63
|
+
|
|
64
|
+
// }).then().catch()
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* @description 监听事件变化
|
|
68
|
+
* @param container {object} 业务组件对象自己
|
|
69
|
+
*/
|
|
70
|
+
init(container) {
|
|
71
|
+
|
|
72
|
+
//this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
|
|
73
|
+
|
|
74
|
+
//this.height = getContainerPropsValue(container, 'content.height', 10);
|
|
75
|
+
},
|
|
76
|
+
onJfbScroll(options) {
|
|
77
|
+
console.log('event.onJfbScroll', options)
|
|
78
|
+
},
|
|
79
|
+
onJfbReachBottom(options) {
|
|
80
|
+
console.log('event.onJfbReachBottom', options)
|
|
81
|
+
},
|
|
82
|
+
onJfbShow(options) {
|
|
83
|
+
console.log('event.onJfbShow', options)
|
|
84
|
+
},
|
|
85
|
+
onJfbHide(options) {
|
|
86
|
+
console.log('event.onJfbHide', options)
|
|
87
|
+
},
|
|
88
|
+
onJfbBack(options) {
|
|
89
|
+
console.log('event.onJfbBack', options)
|
|
90
|
+
},
|
|
91
|
+
onJfbUpdate(...data) {
|
|
92
|
+
console.log('event.onJfbUpdate', data)
|
|
93
|
+
},
|
|
94
|
+
onJfbCustomEvent(options) {
|
|
95
|
+
console.log('event.onJfbReachBottom', options)
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<style scoped lang="less">
|
|
103
|
+
@import "./JfbBaseConFlashListLess.less";
|
|
104
|
+
|
|
105
|
+
.jfb-base-con-flash-list {
|
|
106
|
+
&__body{
|
|
107
|
+
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
</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-con-flash-list {
|
|
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-con-flash-list {
|
|
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-con-flash-list'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -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['bind_phone_url'] || {},
|
|
15
|
+
setting: {
|
|
16
|
+
router: XdBus.getParentApi('getPagesTree')
|
|
17
|
+
},
|
|
18
|
+
inline: false,
|
|
19
|
+
},
|
|
20
|
+
].filter(i=>i)
|
|
21
|
+
},
|
|
22
|
+
advanced: [],
|
|
23
|
+
};
|
|
@@ -0,0 +1,202 @@
|
|
|
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
|
+
//手机号脱敏
|
|
120
|
+
if(phone_number){
|
|
121
|
+
phone_number = phone_number.substr(0, 3) + "****" + phone_number.substr(7, 11);
|
|
122
|
+
}
|
|
123
|
+
this.phone_number = phone_number;
|
|
124
|
+
})
|
|
125
|
+
},
|
|
126
|
+
getCardConfig(){
|
|
127
|
+
jfbRootExec("getCardUserSetting", {
|
|
128
|
+
vm: this,
|
|
129
|
+
data: {
|
|
130
|
+
|
|
131
|
+
}
|
|
132
|
+
}).then(res => {
|
|
133
|
+
let is_entity_card_invalid = res.is_entity_card_invalid; //Y失效 N: 有效
|
|
134
|
+
this.cardChecked = is_entity_card_invalid === "Y";
|
|
135
|
+
})
|
|
136
|
+
},
|
|
137
|
+
async handleLogout(){
|
|
138
|
+
// #ifdef H5
|
|
139
|
+
if (this.$configProject.isPreview) return;
|
|
140
|
+
// #endif
|
|
141
|
+
|
|
142
|
+
if (this.jfbAuthorize !== null) {
|
|
143
|
+
this.$xdShowLoading({});
|
|
144
|
+
store.dispatch('logout').then(res=>{
|
|
145
|
+
this.$xdHideLoading();
|
|
146
|
+
this.jfbAuthorize.removeToken('card');
|
|
147
|
+
this.jfbAuthorize.jumpToUserLogin(this, false);
|
|
148
|
+
}).catch(err=>{
|
|
149
|
+
console.error(err);
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
onJfbScroll(options) {
|
|
154
|
+
console.log('event.onJfbScroll', options)
|
|
155
|
+
},
|
|
156
|
+
onJfbReachBottom(options) {
|
|
157
|
+
console.log('event.onJfbReachBottom', options)
|
|
158
|
+
},
|
|
159
|
+
onJfbShow(options) {
|
|
160
|
+
console.log('event.onJfbShow', options)
|
|
161
|
+
},
|
|
162
|
+
onJfbHide(options) {
|
|
163
|
+
console.log('event.onJfbHide', options)
|
|
164
|
+
},
|
|
165
|
+
onJfbBack(options) {
|
|
166
|
+
console.log('event.onJfbBack', options)
|
|
167
|
+
},
|
|
168
|
+
onJfbUpdate(...data) {
|
|
169
|
+
console.log('event.onJfbUpdate', data)
|
|
170
|
+
},
|
|
171
|
+
onJfbCustomEvent(options) {
|
|
172
|
+
console.log('event.onJfbReachBottom', options)
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
</script>
|
|
178
|
+
|
|
179
|
+
<style scoped lang="less">
|
|
180
|
+
@import "./JfbBaseMySettingLess.less";
|
|
181
|
+
|
|
182
|
+
.jfb-base-my-setting {
|
|
183
|
+
&__body{
|
|
184
|
+
background: #FAFAFA;
|
|
185
|
+
.setting_list{
|
|
186
|
+
padding: 20rpx 0;
|
|
187
|
+
/deep/ .xd-my-list-item{
|
|
188
|
+
background: #FFFFFF;
|
|
189
|
+
margin: 24rpx 20rpx;
|
|
190
|
+
border-radius: 20rpx;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
.fixed_bottom{
|
|
194
|
+
position: absolute;
|
|
195
|
+
width: 600rpx;
|
|
196
|
+
bottom: 100rpx;
|
|
197
|
+
left: 50%;
|
|
198
|
+
transform: translateX(-50%);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
</style>
|