jufubao-base 1.0.117 → 1.0.119-beta10
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 +4 -3
- package/src/components/JfbBaseCard/Attr.js +380 -287
- package/src/components/JfbBaseCard/JfbBaseCard.vue +51 -2
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +95 -18
- 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/JfbBaseCardMerge/JfbBaseCardMerge.vue +10 -9
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +10 -10
- package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +6 -1
- package/src/components/JfbBaseConList/JfbBaseConList.vue +4 -2
- package/src/components/JfbBaseConPhone/Api.js +70 -0
- package/src/components/JfbBaseConPhone/Attr.js +10 -0
- package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +495 -0
- package/src/components/JfbBaseConPhone/JfbBaseConPhoneLess.less +80 -0
- package/src/components/JfbBaseConPhone/JfbBaseConPhoneMixin.js +30 -0
- package/src/components/JfbBaseConPhone/Mock.js +26 -0
- package/src/components/JfbBaseMySetting/Api.js +43 -0
- package/src/components/JfbBaseMySetting/Attr.js +23 -0
- package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +236 -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 +135 -0
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +33 -8
- package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +1 -1
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +34 -8
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
getCouponPhoneList: {
|
|
5
|
+
"list":[
|
|
6
|
+
{"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55},
|
|
7
|
+
{"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55},
|
|
8
|
+
{"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55}
|
|
9
|
+
],
|
|
10
|
+
"background":"//sandbox-img.jufubao.cn/uploads/20231204/96b801e0dc27422c183dc90d905dd2ed.jpg",
|
|
11
|
+
"used_up_url": "",
|
|
12
|
+
"has_times": "Y",
|
|
13
|
+
"can_take":"Y",
|
|
14
|
+
"message":"",
|
|
15
|
+
"app_coupon_url":"//sandbox-img.jufubao.cn/uploads/20231205/fee9b644b83495c9ba8a4db277600b54.jpg",
|
|
16
|
+
"app_activity_button":"//sandbox-img.jufubao.cn/uploads/20231207/35f3065b2b2bc3fc2dda73d7b5b9eae8.jpg",
|
|
17
|
+
"app_coupon_button_bg_url":"//sandbox-img.jufubao.cn/uploads/20231212/026a3ea901f87f51b531d06c24604676.png",
|
|
18
|
+
"app_coupon_button_see_url": "//sandbox-img.jufubao.cn/uploads/20231212/026a3ea901f87f51b531d06c24604676.png",
|
|
19
|
+
"app_coupon_invalid_url":"//sandbox-img.jufubao.cn/uploads/20231208/8b153ce4870686a37295c16fbc992235.jpg",
|
|
20
|
+
"rule":"<p>打发·</p>",
|
|
21
|
+
"request_id":"a2603f2a480485f4"
|
|
22
|
+
},
|
|
23
|
+
getAllCouponPhone: {
|
|
24
|
+
"request_id": "5987aa28c709d4ef"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -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,236 @@
|
|
|
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="已绑实体票券是否失效" :showRight="!showSwitch"
|
|
21
|
+
paddingLR="50rpx" paddingTB="32rpx"
|
|
22
|
+
style="margin-bottom: 8rpx;"
|
|
23
|
+
@click="handleToShowSwitch"
|
|
24
|
+
>
|
|
25
|
+
<view v-if="!showSwitch">去配置</view>
|
|
26
|
+
<view v-else class="switch_wrap">
|
|
27
|
+
<view :style="{
|
|
28
|
+
color: cardChecked ? mainColor : '#666666'
|
|
29
|
+
}">{{ cardChecked ? "开启" : "关闭" }}</view>
|
|
30
|
+
<xd-switch :checked="cardChecked" size="small" @change="handleCardChecked"></xd-switch>
|
|
31
|
+
</view>
|
|
32
|
+
</xd-list-item>
|
|
33
|
+
<view class="switch_tip">
|
|
34
|
+
<xd-font-icon size="24" icon="iconmingchengtubiao" style="margin-right: 8rpx;"></xd-font-icon>
|
|
35
|
+
<view>当票券被绑定后,实体票券的密码与二维码都失效</view>
|
|
36
|
+
</view>
|
|
37
|
+
<xd-list-item :showRight="!phone_number" label="绑定手机号"
|
|
38
|
+
paddingLR="50rpx" paddingTB="32rpx"
|
|
39
|
+
@click="handleToBind"
|
|
40
|
+
>
|
|
41
|
+
{{phone_number ? phone_number : "去绑定"}}
|
|
42
|
+
</xd-list-item>
|
|
43
|
+
</view>
|
|
44
|
+
<view class="fixed_bottom">
|
|
45
|
+
<xd-button type="primary" @click="handleLogout">退出登录</xd-button>
|
|
46
|
+
</view>
|
|
47
|
+
</view>
|
|
48
|
+
</view>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
53
|
+
import XdListItem from "./XdListItem.vue";
|
|
54
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
55
|
+
import XdSwitch from "@/components/XdSwitch/XdSwitch"
|
|
56
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
57
|
+
import JfbBaseMySettingMixin from "./JfbBaseMySettingMixin";
|
|
58
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
59
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
60
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
61
|
+
import {mapState} from 'vuex';
|
|
62
|
+
import store from "@/store";
|
|
63
|
+
export default {
|
|
64
|
+
name: "JfbBaseMySetting",
|
|
65
|
+
components: {
|
|
66
|
+
XdFontIcon,
|
|
67
|
+
XdButton,
|
|
68
|
+
XdListItem,
|
|
69
|
+
XdSwitch
|
|
70
|
+
},
|
|
71
|
+
mixins: [
|
|
72
|
+
componentsMixins, extsMixins, JfbBaseMySettingMixin
|
|
73
|
+
],
|
|
74
|
+
computed: {
|
|
75
|
+
...mapState(['jfbAuthorize']),
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
cardChecked: false,
|
|
80
|
+
phone_number: "",
|
|
81
|
+
showSwitch: true,
|
|
82
|
+
|
|
83
|
+
//面板
|
|
84
|
+
bind_phone_url: "", //绑定手机号跳转地址
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
watch: {
|
|
88
|
+
container(value) {
|
|
89
|
+
this.init(value)
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
created() {
|
|
93
|
+
this.init(this.container);
|
|
94
|
+
|
|
95
|
+
//todo
|
|
96
|
+
},
|
|
97
|
+
methods: {
|
|
98
|
+
onJfbLoad(options) {
|
|
99
|
+
this.p_getUserInfo();
|
|
100
|
+
this.getCardConfig();
|
|
101
|
+
},
|
|
102
|
+
/**
|
|
103
|
+
* @description 监听事件变化
|
|
104
|
+
* @param container {object} 业务组件对象自己
|
|
105
|
+
*/
|
|
106
|
+
init(container) {
|
|
107
|
+
this.bind_phone_url = getContainerPropsValue(container, 'content.bind_phone_url', {value: ""}).value;
|
|
108
|
+
},
|
|
109
|
+
handleToBind(){
|
|
110
|
+
if(!this.phone_number){
|
|
111
|
+
this.$xdUniHelper.navigateTo({
|
|
112
|
+
url: this.bind_phone_url + `?callback_url=${encodeURIComponent(location.href)}`,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
handleToShowSwitch(){
|
|
117
|
+
if(!this.showSwitch){
|
|
118
|
+
this.showSwitch = true;
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
handleCardChecked(flag){
|
|
122
|
+
jfbRootExec("setCardUserSetting", {
|
|
123
|
+
vm: this,
|
|
124
|
+
data: {
|
|
125
|
+
is_entity_card_invalid: flag ? "Y" : "N"
|
|
126
|
+
}
|
|
127
|
+
}).then(res => {
|
|
128
|
+
this.cardChecked = flag;
|
|
129
|
+
}).catch(err => {
|
|
130
|
+
this.cardChecked = !flag;
|
|
131
|
+
})
|
|
132
|
+
},
|
|
133
|
+
p_getUserInfo(){
|
|
134
|
+
jfbRootExec("getUserInfo", {
|
|
135
|
+
vm: this,
|
|
136
|
+
data: {
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
}).then(res => {
|
|
140
|
+
let phone_number = res.phone_number;
|
|
141
|
+
//手机号脱敏
|
|
142
|
+
if(phone_number){
|
|
143
|
+
phone_number = phone_number.substr(0, 3) + "****" + phone_number.substr(7, 11);
|
|
144
|
+
}
|
|
145
|
+
this.phone_number = phone_number;
|
|
146
|
+
})
|
|
147
|
+
},
|
|
148
|
+
getCardConfig(){
|
|
149
|
+
jfbRootExec("getCardUserSetting", {
|
|
150
|
+
vm: this,
|
|
151
|
+
data: {}
|
|
152
|
+
}).then(res => {
|
|
153
|
+
let is_entity_card_invalid = res.is_entity_card_invalid; //Y失效 N: 有效
|
|
154
|
+
if(is_entity_card_invalid === ""){
|
|
155
|
+
this.showSwitch = false;
|
|
156
|
+
}
|
|
157
|
+
this.cardChecked = is_entity_card_invalid === "Y";
|
|
158
|
+
})
|
|
159
|
+
},
|
|
160
|
+
async handleLogout(){
|
|
161
|
+
// #ifdef H5
|
|
162
|
+
if (this.$configProject.isPreview) return;
|
|
163
|
+
// #endif
|
|
164
|
+
|
|
165
|
+
if (this.jfbAuthorize !== null) {
|
|
166
|
+
this.$xdShowLoading({});
|
|
167
|
+
store.dispatch('logout').then(res=>{
|
|
168
|
+
this.$xdHideLoading();
|
|
169
|
+
this.jfbAuthorize.removeToken('card');
|
|
170
|
+
this.jfbAuthorize.jumpToUserLogin(this, false);
|
|
171
|
+
}).catch(err=>{
|
|
172
|
+
console.error(err);
|
|
173
|
+
})
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
onJfbScroll(options) {
|
|
177
|
+
console.log('event.onJfbScroll', options)
|
|
178
|
+
},
|
|
179
|
+
onJfbReachBottom(options) {
|
|
180
|
+
console.log('event.onJfbReachBottom', options)
|
|
181
|
+
},
|
|
182
|
+
onJfbShow(options) {
|
|
183
|
+
console.log('event.onJfbShow', options)
|
|
184
|
+
},
|
|
185
|
+
onJfbHide(options) {
|
|
186
|
+
console.log('event.onJfbHide', options)
|
|
187
|
+
},
|
|
188
|
+
onJfbBack(options) {
|
|
189
|
+
console.log('event.onJfbBack', options)
|
|
190
|
+
},
|
|
191
|
+
onJfbUpdate(...data) {
|
|
192
|
+
console.log('event.onJfbUpdate', data)
|
|
193
|
+
},
|
|
194
|
+
onJfbCustomEvent(options) {
|
|
195
|
+
console.log('event.onJfbReachBottom', options)
|
|
196
|
+
},
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
</script>
|
|
201
|
+
|
|
202
|
+
<style scoped lang="less">
|
|
203
|
+
@import "./JfbBaseMySettingLess.less";
|
|
204
|
+
|
|
205
|
+
.jfb-base-my-setting {
|
|
206
|
+
&__body{
|
|
207
|
+
background: #FAFAFA;
|
|
208
|
+
.setting_list{
|
|
209
|
+
padding: 20rpx 0;
|
|
210
|
+
/deep/ .xd-my-list-item{
|
|
211
|
+
background: #FFFFFF;
|
|
212
|
+
margin: 24rpx 20rpx;
|
|
213
|
+
border-radius: 20rpx;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
.switch_wrap{
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
}
|
|
220
|
+
.switch_tip{
|
|
221
|
+
display: flex;
|
|
222
|
+
font-size: 24rpx;
|
|
223
|
+
color: #BBBBBB;
|
|
224
|
+
align-items: center;
|
|
225
|
+
padding-left: 80rpx;
|
|
226
|
+
}
|
|
227
|
+
.fixed_bottom{
|
|
228
|
+
position: absolute;
|
|
229
|
+
width: 600rpx;
|
|
230
|
+
bottom: 100rpx;
|
|
231
|
+
left: 50%;
|
|
232
|
+
transform: translateX(-50%);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
</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,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="xd-my-list-item"
|
|
3
|
+
:class="'size_'+size"
|
|
4
|
+
:style="{
|
|
5
|
+
borderTop: showBottom ? '1px solid #eee':'none',
|
|
6
|
+
paddingLeft: paddingLR,
|
|
7
|
+
paddingRight: paddingLR,
|
|
8
|
+
paddingTop: paddingTB,
|
|
9
|
+
paddingBottom: paddingTB,
|
|
10
|
+
}"
|
|
11
|
+
@click="$emit('click')">
|
|
12
|
+
<view v-if="listIcon" class="my-list_icon">
|
|
13
|
+
<!-- <image mode="widthFix" :src="listIcon" /> -->
|
|
14
|
+
<xd-font-icon :icon="listIcon"></xd-font-icon>
|
|
15
|
+
</view>
|
|
16
|
+
<view class="my-list_label" v-html="label"></view>
|
|
17
|
+
<view class="my-list_value">
|
|
18
|
+
<slot></slot>
|
|
19
|
+
<xd-font-icon
|
|
20
|
+
v-if="showRight"
|
|
21
|
+
:style="{
|
|
22
|
+
marginLeft: '10rpx',
|
|
23
|
+
color: '#B1B1B1'
|
|
24
|
+
}"
|
|
25
|
+
size="24"
|
|
26
|
+
icon="iconxiangyou_xian"
|
|
27
|
+
></xd-font-icon>
|
|
28
|
+
</view>
|
|
29
|
+
|
|
30
|
+
</view>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
35
|
+
export default {
|
|
36
|
+
components: {
|
|
37
|
+
XdFontIcon
|
|
38
|
+
},
|
|
39
|
+
data(){
|
|
40
|
+
return {
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
props: {
|
|
45
|
+
size: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "default"
|
|
48
|
+
},
|
|
49
|
+
paddingTB:{
|
|
50
|
+
type: String,
|
|
51
|
+
default: "24rpx"
|
|
52
|
+
},
|
|
53
|
+
paddingLR: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "0rpx"
|
|
56
|
+
},
|
|
57
|
+
//是否显示border-bottom
|
|
58
|
+
showBottom: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
//是否显示右箭头
|
|
63
|
+
showRight: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
//是否显示图标
|
|
68
|
+
listIcon: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: ''
|
|
71
|
+
},
|
|
72
|
+
//label
|
|
73
|
+
label: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: ''
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<style lang="less" scoped>
|
|
83
|
+
.xd-my-list-item{
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
padding: 30rpx 0;
|
|
87
|
+
font-size: 28rpx;
|
|
88
|
+
background: #FFFFFF;
|
|
89
|
+
color: #666666;
|
|
90
|
+
|
|
91
|
+
&.size_large{
|
|
92
|
+
.my-list_value,
|
|
93
|
+
.my-list_label{
|
|
94
|
+
font-size: 28rpx;
|
|
95
|
+
font-weight: 400;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
&.size_default{
|
|
99
|
+
.my-list_value,
|
|
100
|
+
.my-list_label{
|
|
101
|
+
font-size: 28rpx;
|
|
102
|
+
font-weight: 400;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
&.size_small{
|
|
106
|
+
.my-list_value,
|
|
107
|
+
.my-list_label{
|
|
108
|
+
font-size: 24rpx;
|
|
109
|
+
font-weight: 400;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.my-list_icon{
|
|
114
|
+
width: 32rpx;
|
|
115
|
+
margin-right: 24rpx;
|
|
116
|
+
|
|
117
|
+
image{
|
|
118
|
+
width: 32rpx;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.my-list_label{
|
|
123
|
+
// flex: 1;
|
|
124
|
+
}
|
|
125
|
+
.my-list_value{
|
|
126
|
+
flex: 1;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: flex-end;
|
|
130
|
+
}
|
|
131
|
+
.arrow_right{
|
|
132
|
+
width: 44rpx;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
@@ -284,13 +284,16 @@
|
|
|
284
284
|
class="jfb-base-order-detail__body-card jfb-base-order-detail__body-cashier"
|
|
285
285
|
>
|
|
286
286
|
<view class="jfb-base-order-detail__body-cashier-text">{{info.codes[0].show_type === "qrcode" ? "二维码" : "条形码" }}</view>
|
|
287
|
-
<
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
287
|
+
<view style="position: relative">
|
|
288
|
+
<image
|
|
289
|
+
:style="{
|
|
290
|
+
height: info.codes[0].show_type === 'qrcode' ? '50vw' : '25vw',
|
|
291
|
+
width: info.codes[0].show_type === 'qrcode' ? '50vw' : '85vw',
|
|
292
|
+
}"
|
|
293
|
+
:src="info.codes[0].code_url"
|
|
294
|
+
></image>
|
|
295
|
+
<image v-if="info.codes[0].logo&&info.codes[0].show_type === 'qrcode'" class="logo-icon" :src="info.codes[0].logo"></image>
|
|
296
|
+
</view>
|
|
294
297
|
<view class="jfb-base-order-detail__body-cashier-text">
|
|
295
298
|
{{ info.codes[0].can_read_code }}
|
|
296
299
|
</view>
|
|
@@ -751,7 +754,17 @@
|
|
|
751
754
|
height: showType === 'qrcode' ? '70vw' : '35vw',
|
|
752
755
|
}"
|
|
753
756
|
>
|
|
754
|
-
|
|
757
|
+
<view style="position: relative">
|
|
758
|
+
<image :src="codeSrc" mode="aspectFit"></image>
|
|
759
|
+
<image v-if="logo&&showType === 'qrcode'" :src="logo" style="
|
|
760
|
+
width: 100rpx;
|
|
761
|
+
height: 100rpx;
|
|
762
|
+
position: absolute;
|
|
763
|
+
top: 50%;
|
|
764
|
+
left: 50%;
|
|
765
|
+
transform: translate(-50rpx, -50rpx);">
|
|
766
|
+
</image>
|
|
767
|
+
</view>
|
|
755
768
|
</view>
|
|
756
769
|
</xd-dailog>
|
|
757
770
|
</view>
|
|
@@ -828,6 +841,7 @@ export default {
|
|
|
828
841
|
bottom: 0,
|
|
829
842
|
},
|
|
830
843
|
is_hot: "Y",
|
|
844
|
+
logo: ""
|
|
831
845
|
};
|
|
832
846
|
},
|
|
833
847
|
watch: {
|
|
@@ -980,6 +994,9 @@ export default {
|
|
|
980
994
|
res.codes =
|
|
981
995
|
res.codes &&
|
|
982
996
|
res.codes.map((item) => {
|
|
997
|
+
if(item.logo) {
|
|
998
|
+
item.logo = getServiceUrl(item.logo)
|
|
999
|
+
}
|
|
983
1000
|
if (item.show_type === "qrcode" || item.show_type === "barcode") {
|
|
984
1001
|
let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
|
|
985
1002
|
item.code_url = reg.test(item.code_url)? item.code_url:`${this.brandInfo['api_host']}${item.code_url}`
|
|
@@ -1125,6 +1142,7 @@ export default {
|
|
|
1125
1142
|
handleShowCode(item) {
|
|
1126
1143
|
this.codeSrc = item.code_url;
|
|
1127
1144
|
this.showType = item.show_type;
|
|
1145
|
+
this.logo = item.logo;
|
|
1128
1146
|
console.log(this.codeSrc, "this.codeSrc");
|
|
1129
1147
|
this.showCode = true;
|
|
1130
1148
|
},
|
|
@@ -1257,6 +1275,13 @@ export default {
|
|
|
1257
1275
|
.jfb-base-order-detail {
|
|
1258
1276
|
&__body {
|
|
1259
1277
|
color: #333;
|
|
1278
|
+
.logo-icon {
|
|
1279
|
+
width: unit(100, rpx) !important;
|
|
1280
|
+
height: unit(100, rpx) !important;
|
|
1281
|
+
position: absolute;
|
|
1282
|
+
top: 50%;
|
|
1283
|
+
transform: translate(-50rpx, -50rpx);
|
|
1284
|
+
}
|
|
1260
1285
|
&-show {
|
|
1261
1286
|
display: flex;
|
|
1262
1287
|
justify-content: center;
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
<script>
|
|
94
94
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
95
95
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
96
|
-
import JfbBasePhoneCollectMixin from "./JfbBasePhoneCollectMixin";
|
|
97
96
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
98
97
|
import extsMixins from "@/mixins/extsMixins";
|
|
99
98
|
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
@@ -102,6 +101,7 @@ import XdForm from "@/components/XdForm/XdForm";
|
|
|
102
101
|
import XdFormInput from "@/components/XdFormInput/XdFormInput";
|
|
103
102
|
import XdButton from "@/components/XdButton/XdButton";
|
|
104
103
|
import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox";
|
|
104
|
+
import JfbBasePhoneCollectMixin from "./JfbBasePhoneCollectMixin";
|
|
105
105
|
|
|
106
106
|
export default {
|
|
107
107
|
name: "JfbBasePhoneCollect",
|