jufubao-base 1.0.184-beta2 → 1.0.184

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.
@@ -14,29 +14,21 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-wallet__body">
17
- <view class="x-line"></view>
18
17
  <template v-if="showContent">
19
- <view :style="[{
20
- margin:marginComp,
21
- padding:paddingComp,
22
- backgroundColor:bodyBgColor,
23
- borderRadius:bodyRadius+'rpx'
24
- }]">
25
- <view class="jfb-base-wallet__body-title" :style="[titleStyleComp]">{{accountName}}</view>
26
- <view class="jfb-base-wallet__body-type" :style="[contStyleComp]" v-if="showType.length > 0">
27
- <view
28
- :style="[itemStyleComp]"
29
- v-for="(item, index) in showType"
30
- @click="handleJumpTo(item)"
31
- :key="index"
32
- class="jfb-base-wallet__body-type-item"
33
- >
34
- <XdFontIcon :icon="item.icon"></XdFontIcon>
35
- <view>{{ item.label }}</view>
36
- </view>
18
+ <view class="jfb-base-wallet__body-title">我的账户</view>
19
+ <view class="jfb-base-wallet__body-type" v-if="showType.length > 0">
20
+ <view
21
+ :style="{marginRight: index === showType.length - 1 ? '0' : '36rpx',}"
22
+ v-for="(item, index) in showType"
23
+ @click="handleJumpTo(item)"
24
+ :key="index"
25
+ class="jfb-base-wallet__body-type-item"
26
+ >
27
+ <XdFontIcon :icon="item.icon"></XdFontIcon>
28
+ <view>{{ item.label }}</view>
37
29
  </view>
38
- <view v-else class="jfb-base-wallet__body-type notice" :style="{backgroundColor:backgroundColor, color:warningColor}">我的账户无配置数据,在正式环境将不显示改模块</view>
39
30
  </view>
31
+ <view v-else class="jfb-base-wallet__body-type notice" :style="{backgroundColor:backgroundColor, color:warningColor}">我的账户无配置数据,在正式环境将不显示改模块</view>
40
32
  </template>
41
33
  </view>
42
34
  </view>
@@ -80,35 +72,6 @@ export default {
80
72
  isCard: "Y",
81
73
  isYuanbao: "Y",
82
74
  isIntegral: "Y",
83
- accountName:'我的账户',
84
-
85
- //标题
86
- titleStyle:{},
87
-
88
- //轮廓
89
- bodyRadius:'0',
90
- bodyMargin:{},
91
- bodyPadding:{},
92
- rowSpacing:10,
93
- columnSpacing:20,
94
- bodyBgColor:'rgba(0,0,0,0)',
95
-
96
- //content
97
- contPadding:{},
98
- contBgColor:'rgba(0,0,0,0)',
99
- contRadius:'10',
100
- contShadow:'0 0 0 rgba(0,0,0,0)',
101
- contBorder:{},
102
-
103
- //item
104
- itemPadding:{},
105
- itemBgColor:'rgba(0,0,0,0)',
106
- itemRadius:'10',
107
- itemShadow: '0 0 0 rgba(0,0,0,0)',
108
- itemBorder:{},
109
-
110
-
111
- //高级
112
75
  cardPath: "",
113
76
  yuanbaoPath: "",
114
77
  integralPath: "",
@@ -214,86 +177,7 @@ export default {
214
177
  showContent(){
215
178
  if(this.$configProject.isPreview) return true;
216
179
  return this.showType.length > 0;
217
- },
218
-
219
- titleStyleComp(){
220
- return {
221
- fontSize: this.titleStyle.fontSize || '28rpx',
222
- color: `${this.titleStyle.color || '#333'}`,
223
- fontWeight: `${this.titleStyle.fontWeight || 'normal'}`,
224
- marginBottom: `${this.rowSpacing}rpx`,
225
- }
226
- },
227
-
228
- marginComp() {
229
- let str = `${this.checkValue(this.bodyMargin.top, 0)}rpx`;
230
- str = `${str} ${this.checkValue(this.bodyMargin.right, 0)}rpx`;
231
- str = `${str} ${this.checkValue(this.bodyMargin.bottom, 0)}rpx`;
232
- str = `${str} ${this.checkValue(this.bodyMargin.left, 0)}rpx`;
233
- return str
234
- },
235
-
236
- paddingComp() {
237
- let str = `${this.checkValue(this.bodyPadding.top, 20)}rpx`;
238
- str = `${str} ${this.checkValue(this.bodyPadding.right, 20)}rpx`;
239
- str = `${str} ${this.checkValue(this.bodyPadding.bottom, 20)}rpx`;
240
- str = `${str} ${this.checkValue(this.bodyPadding.left, 20)}rpx`;
241
- return str
242
- },
243
-
244
- contStyleComp(){
245
- let str = `${this.checkValue(this.contPadding.top, 20)}rpx`;
246
- str = `${str} ${this.checkValue(this.contPadding.right, 20)}rpx`;
247
- str = `${str} ${this.checkValue(this.contPadding.bottom, 20)}rpx`;
248
- str = `${str} ${this.checkValue(this.contPadding.left, 20)}rpx`;
249
- let border = {
250
- borderWidth: '2rpx',
251
- borderStyle: 'solid',
252
- borderColor: '#eee',
253
- }
254
- if(this.contBorder && this.contBorder.type === 'Y') {
255
- let value = this.contBorder.value || {};
256
- if(value.color) border.borderColor = value.color;
257
- if(value.style) border.borderStyle = value.style;
258
- if(value.width) border.borderWidth = value.width + 'rpx';
259
- }
260
-
261
- return {
262
- padding: str,
263
- backgroundColor: this.contBgColor,
264
- borderRadius: this.contRadius + 'rpx',
265
- boxShadow: this.contShadow,
266
- ...border,
267
- }
268
- },
269
-
270
- itemStyleComp(){
271
- let str = `${this.checkValue(this.itemPadding.top, 30)}rpx`;
272
- str = `${str} ${this.checkValue(this.itemPadding.right, 0)}rpx`;
273
- str = `${str} ${this.checkValue(this.itemPadding.bottom, 30)}rpx`;
274
- str = `${str} ${this.checkValue(this.itemPadding.left, 0)}rpx`;
275
-
276
- let border = {
277
- borderWidth: '2rpx',
278
- borderStyle: 'solid',
279
- borderColor: '#eee',
280
- }
281
- if(this.itemBorder && this.itemBorder.type === 'Y') {
282
- let value = this.itemBorder.value || {};
283
- if(value.color) border.borderColor = value.color;
284
- if(value.style) border.borderStyle = value.style;
285
- if(value.width) border.borderWidth = value.width + 'rpx';
286
- }
287
-
288
- return {
289
- padding: str,
290
- backgroundColor: this.itemBgColor,
291
- borderRadius: this.itemRadius + 'rpx',
292
- marginRight: this.columnSpacing + 'rpx',
293
- boxShadow: this.itemShadow,
294
- ...border
295
- }
296
- },
180
+ }
297
181
  },
298
182
  created() {
299
183
  this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
@@ -312,41 +196,34 @@ export default {
312
196
  init(container) {
313
197
  this.newLabel = getContainerPropsValue(container, "content.newLabel", []);
314
198
  this.isCard = getContainerPropsValue(container, "content.isCard", "Y");
315
- this.isYuanbao = getContainerPropsValue(container, "content.isYuanbao", "Y");
316
- this.isIntegral = getContainerPropsValue(container, "content.isIntegral", "Y");
317
- this.accountName = getContainerPropsValue(container, "content.accountName", "我的账户");
318
- this.rowSpacing = Number(getContainerPropsValue(container, "content.rowSpacing", 10));
319
- this.columnSpacing = Number(getContainerPropsValue(container, "content.columnSpacing", 20));
320
- this.bodyBgColor = getContainerPropsValue(container, "content.bodyBgColor", 'rgba(0,0,0,0)');
321
- this.bodyPadding = getContainerPropsValue(container, "content.bodyPadding", {});
322
- this.bodyMargin = getContainerPropsValue(container, "content.bodyMargin", {});
323
- this.bodyRadius = getContainerPropsValue(container, "content.bodyRadius", '0');
324
-
325
- //标题
326
- this.titleStyle = getContainerPropsValue(container, 'content.titleStyle', {});
327
-
328
- //content
329
- this.contPadding = getContainerPropsValue(container, "content.contPadding", {});
330
- this.contBgColor = getContainerPropsValue(container, "content.contBgColor", 'rgba(0,0,0,0)');
331
- this.contRadius = getContainerPropsValue(container, "content.contRadius", '10');
332
- this.contBorder = getContainerPropsValue(container, "content.contBorder", {});
333
- this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,.3)'},getContainerPropsValue(container, 'content.contShadow', {}))
334
-
335
-
336
- //item
337
- this.itemPadding = getContainerPropsValue(container, 'content.itemPadding', {});
338
- this.itemBgColor = getContainerPropsValue(container, 'content.itemBgColor', 'rgba(0,0,0,0)');
339
- this.itemRadius = getContainerPropsValue(container, 'content.itemRadius', '10');
340
- this.itemShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,.3)'},getContainerPropsValue(container, 'content.itemShadow', {}))
341
- this.itemBorder = getContainerPropsValue(container, "content.itemBorder", {});
342
-
343
- //高级
344
- this.cardPath = getContainerPropsValue(container, "content.cardPath", {value: "",}).value;
345
- this.yuanbaoPath = getContainerPropsValue(container, "content.yuanbaoPath", { value: "" }).value;
346
- this.integralPath = getContainerPropsValue(container, "content.integralPath", { value: "" }).value;
199
+ this.isYuanbao = getContainerPropsValue(
200
+ container,
201
+ "content.isYuanbao",
202
+ "Y"
203
+ );
204
+ this.isIntegral = getContainerPropsValue(
205
+ container,
206
+ "content.isIntegral",
207
+ "Y"
208
+ );
209
+ this.cardPath = getContainerPropsValue(container, "content.cardPath", {
210
+ value: "",
211
+ }).value;
212
+
213
+ this.yuanbaoPath = getContainerPropsValue(
214
+ container,
215
+ "content.yuanbaoPath",
216
+ { value: "" }
217
+ ).value;
218
+
219
+ this.integralPath = getContainerPropsValue(
220
+ container,
221
+ "content.integralPath",
222
+ { value: "" }
223
+ ).value;
347
224
  },
348
225
  handleJumpTo(item) {
349
- if(this.$configProject.isPreview) return;
226
+ console.log(item, "ppppp");
350
227
  switch (item.value) {
351
228
  case "card":
352
229
  this.$xdUniHelper.navigateTo({
@@ -380,20 +257,22 @@ export default {
380
257
  .jfb-base-wallet {
381
258
  &__body {
382
259
  &-title {
383
- min-height: 64rpx;
384
- line-height: 64rpx;
260
+ padding: 20rpx;
385
261
  }
386
262
  &-type {
387
263
  display: flex;
388
264
  border-radius: 20rpx;
389
265
  background: rgba(255, 255, 255, 1);
390
266
  border: 1rpx solid rgba(238, 238, 238, 1);
267
+ padding: 32rpx 48rpx 32rpx 48rpx;
268
+ margin: 0 20rpx 0;
391
269
 
392
270
  &.notice {
393
271
  font-size: 26rpx;
394
272
  }
395
273
 
396
274
  &-item {
275
+ color: #999999;
397
276
  flex: 1;
398
277
  display: flex;
399
278
  flex-direction: column;
@@ -401,9 +280,12 @@ export default {
401
280
  justify-content: center;
402
281
  font-size: 24rpx;
403
282
  border: 2rpx solid #eeeeee;
404
-
405
- &:last-child{
406
- margin-right: 0!important;
283
+ border-radius: 16rpx;
284
+ background: #ffffff;
285
+ padding: 16rpx 0;
286
+ margin-right: 36rpx;
287
+ & > view:nth-child(2) {
288
+ margin-top: 12rpx;
407
289
  }
408
290
  }
409
291
  }
@@ -1,117 +0,0 @@
1
- <template>
2
- <view class="xd-tfk-item" @click="handleSelectAddress">
3
- <view class="item_top">
4
- <view class="user_info">
5
- {{ item.name }} <text style="margin-left: 20rpx;">{{ item.phone }}</text>
6
- <view v-if="item.is_valid === 'N'"
7
- style="position: absolute; right: 40rpx;top: 0;"
8
- >
9
- <xd-font-icon
10
- size="32"
11
- :color="dangerColor"
12
- icon="iconmingchengtubiao"
13
- ></xd-font-icon>
14
- </view>
15
- </view>
16
- <view class="user_adr">{{item.province_name}}{{item.city_name}}{{item.area_name}}{{item.street_name}}{{ item.address_detail }} {{ item.house_number }}</view>
17
- </view>
18
- <view class="item_bottom">
19
- <view class="is_default" @click.native.stop="setDefault">
20
- <xd-radio :value="item.is_default === 'Y'" :width="52" :height="52" :iconSize="20"></xd-radio>
21
- <view v-if="item.is_default === 'Y'">默认地址</view>
22
- <view v-else>设为默认</view>
23
- </view>
24
- <view class="item_opera">
25
- <view class="o_i" style="margin-right: 30rpx;" @click.native.stop="handleEdit">
26
- <xd-font-icon class="icon" :icon="edit_icon" :size="26"></xd-font-icon> 编辑
27
- </view>
28
- <view class="o_i" @click.native.stop="handleDel">
29
- <xd-font-icon class="icon" :icon="delete_icon" :size="26"></xd-font-icon> 删除
30
- </view>
31
- </view>
32
- </view>
33
- </view>
34
- </template>
35
- <script>
36
- import XdRadio from "@/components/XdRadio/XdRadio"
37
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon"
38
- export default{
39
- name:"XdTfkItem",
40
- components: {
41
- XdRadio,
42
- XdFontIcon,
43
- },
44
- props:{
45
- edit_icon: String,
46
- delete_icon: String,
47
- item: Object,
48
- dangerColor: String,
49
- },
50
- data(){
51
- return{
52
- }
53
- },
54
- created(){
55
- },
56
- methods:{
57
- handleSelectAddress(){
58
- this.$emit("selectAddress")
59
- },
60
- handleEdit(){
61
- this.$emit("editAddress", this.item)
62
- },
63
- handleDel(){
64
- this.$emit("delAddress", this.item)
65
- },
66
- setDefault(){
67
- this.$emit("setDefault", this.item)
68
- }
69
- },
70
- }
71
- </script>
72
- <style lang="less" scoped>
73
- .xd-tfk-item{
74
- .item_top{
75
- padding: 30rpx;
76
- }
77
- .user_info{
78
- color: #191a1b;
79
- font-size: 30rpx;
80
- position: relative;
81
- }
82
- .user_adr{
83
- color: #797d82;
84
- font-size: 26rpx;
85
- margin-top: 6rpx;
86
- overflow: hidden;
87
- text-overflow: ellipsis;
88
- white-space: nowrap;
89
- }
90
- .item_bottom{
91
- display: flex;
92
- justify-content: space-between;
93
- padding: 20rpx;
94
- border-top: 1px solid #ededed;
95
- }
96
- .item_opera{
97
- display: flex;
98
- color: #797d82;
99
- align-items: center;
100
- .o_i{
101
- display: flex;
102
- align-items: center;
103
- font-size: 26rpx;
104
-
105
- .icon{
106
- margin-right: 10rpx;
107
- }
108
- }
109
- }
110
- .is_default{
111
- display: flex;
112
- align-items: center;
113
- font-size: 26rpx;
114
- color: #797d82;
115
- }
116
- }
117
- </style>
@@ -1,246 +0,0 @@
1
- <template>
2
- <view class="xd-tfk-order-item">
3
- <view class="o_header">
4
- <view class="h_l">
5
- <xd-font-icon
6
- v-if="item.biz_code_icon"
7
- :icon="item.biz_code_icon"
8
- :size="item['biz_code_icon_size']"
9
- ></xd-font-icon>
10
- <view :class="{ marginLeft: item.biz_code_icon }" style="margin-left: 20rpx;">{{item.biz_code_name }}</view>
11
- </view>
12
- <view v-if="isShowOrderNo==='N'" class="o_status" :style="{
13
- color:item.status.status_type !== 'error' ? mainColor : '#999999',
14
- }">{{ item.status.status_name }}</view>
15
- </view>
16
- <view class="o_title" v-if="isShowOrderNo==='Y'">
17
- <view class="o_number">订单编号:{{ item.main_order_id }}</view>
18
- <view class="o_status" :style="{
19
- color:item.status.status_type !== 'error' ? mainColor : '#999999',
20
- }">{{ item.status.status_name }}</view>
21
- </view>
22
- <view class="prod_list">
23
- <!-- 单个商品展示商品信息 -->
24
- <template v-if="item.products.length == 1">
25
- <view class="one_prod" v-for="Sitem in item.products" :key="Sitem.key">
26
- <view class="prod_img">
27
- <image :src="Sitem.product_thumb" style="background: #ffffff" mode="aspectFill"></image>
28
- </view>
29
- <view class="prod_info">
30
- <view class="prod_name">{{ Sitem.product_name }}</view>
31
- <view v-if="Sitem.brand_name" class="prod_brand" :style="{color: brandTextColor}">{{ Sitem.brand_name }}</view>
32
- <view v-if="Sitem.product_sku_name" class="prod_sku">规格:{{ Sitem.product_sku_name }}</view>
33
- <view class="prod_price">
34
- <view>¥448</view>
35
- <view class="info-price">
36
- <text>x</text>
37
- <text>{{ Sitem.product_num }}</text>
38
- </view>
39
- </view>
40
- </view>
41
- </view>
42
- </template>
43
-
44
- <!-- 多个商品展示更多商品信息 -->
45
- <view v-if="item.products.length > 1" class="more_prod">
46
- <view class="img_list">
47
- <view class="prod_img" v-for="prod in item.products" :key="prod.key">
48
- <image :src="prod.product_thumb" style="background: #ffffff" mode="aspectFit"></image>
49
- </view>
50
- </view>
51
- <view class="right_arrow">
52
- <xd-font-icon icon='iconxiangyou_xian' :size="26" color="#bdc0c5"></xd-font-icon>
53
- </view>
54
- </view>
55
- </view>
56
- <view class="prod_total">
57
- <view></view>
58
- <view style="display: flex;align-items: center;">
59
- 共{{item.products.length}}件商品 实付
60
- <xd-unit
61
- :isOld="false"
62
- :price="item.total_amount"
63
- :color="mainColor"
64
- :fontSize="28"></xd-unit>
65
- </view>
66
- </view>
67
- <view v-if="item.buttons.length" class="prod_footer">
68
- <view style="flex: 1;"></view>
69
- <view class="btn"
70
- v-for="(btn,index) in item.buttons" :key="btn.key"
71
- @click="handleBtnEvent(btn.action, item)"
72
- >{{btn.text}}</view>
73
- </view>
74
- </view>
75
- </template>
76
-
77
- <script>
78
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon"
79
- import XdUnit from "@/components/XdUnit/XdUnit"
80
- export default{
81
- name:"XdTfkOrderItem",
82
- components: {
83
- XdFontIcon,
84
- XdUnit,
85
- },
86
- props:{
87
- item: Object,
88
- mainColor: String,
89
- isShowOrderNo: {
90
- type: String,
91
- },
92
- brandTextColor: String
93
- },
94
- data(){
95
- return{
96
- }
97
- },
98
- methods:{
99
- handleBtnEvent(action){
100
- this.$emit('handleBtnEvent', action)
101
- },
102
- }
103
- }
104
- </script>
105
-
106
- <style lang="less" scoped>
107
- .xd-tfk-order-item{
108
- padding-left: 30rpx;
109
- overflow: hidden;
110
- .o_header{
111
- height: 90rpx;
112
- display: flex;
113
- align-items: center;
114
- justify-content: space-between;
115
- border-bottom: 1px solid #EDEDED;
116
- padding-right: 30rpx;
117
- color: #333333;
118
- font-size: 28rpx;
119
-
120
- .h_l{
121
- display: flex;
122
- align-items: center;
123
- }
124
- }
125
- .o_title{
126
- height: 80rpx;
127
- display: flex;
128
- align-items: center;
129
- justify-content: space-between;
130
- padding-right: 30rpx;
131
- color: #333333;
132
- font-size: 24rpx;
133
- border-bottom: 1px solid #EDEDED;
134
- }
135
- .one_prod{
136
- display: flex;
137
- align-items: center;
138
- width: 100%;
139
- padding: 30rpx 30rpx 30rpx 0;
140
- box-sizing: border-box;
141
- .prod_img{
142
- width: 140rpx;
143
- height: 140rpx;
144
- background-color: #f5f5f9;
145
- image{
146
- width: 100%;
147
- height: 100%;
148
- }
149
- }
150
- .prod_info{
151
- flex: 1;
152
- padding-left: 30rpx;
153
- .prod_name{
154
- color: #2e2f30;
155
- font-size: 30rpx;
156
- }
157
- .prod_brand{
158
- font-size: 24rpx;
159
- margin-top: 8rpx;
160
- }
161
- .prod_sku{
162
- color: #797d82;
163
- font-size: 24rpx;
164
- margin-top: 8rpx;
165
- }
166
- }
167
- .prod_price{
168
- display: flex;
169
- justify-content: space-between;
170
- align-items: center;
171
- color: rgb(46, 47, 48);
172
- font-size: 30rpx;
173
- margin-top: 12rpx;
174
- .info-price{
175
- display: flex;
176
- color: #bdc0c5;
177
- font-size: 26rpx;
178
- }
179
- }
180
- }
181
- .prod_list{
182
- position: relative;
183
- .right_arrow{
184
- position: absolute;
185
- right: 0px;
186
- height: 100%;
187
- width: 60rpx;
188
- top: 0;
189
- background: #FFF;
190
- display: flex;
191
- align-items: center;
192
- justify-content: center;
193
- }
194
- }
195
- .more_prod{
196
- display: flex;
197
- flex-wrap: nowrap;
198
- overflow: auto;
199
- padding: 30rpx 30rpx 30rpx 0;
200
- width: 100%;
201
- .img_list{
202
- display: flex;
203
- flex-wrap: nowrap;
204
- padding-right: 60rpx;
205
- }
206
- .prod_img{
207
- width: 140rpx;
208
- height: 140rpx;
209
- display: flex;
210
- align-items: center;
211
- justify-content: center;
212
- image{
213
- width: 100%;
214
- height: 100%;
215
- }
216
- }
217
- }
218
- .prod_total{
219
- height: 80rpx;
220
- display: flex;
221
- align-items: center;
222
- justify-content: space-between;
223
- padding-right: 30rpx;
224
- border-top: 1px solid #EDEDED;
225
- color: #2e2f30;
226
- font-size: 26rpx;
227
- }
228
- .prod_footer{
229
- padding: 16rpx 30rpx 16rpx 0;
230
- display: flex;
231
- align-items: center;
232
- border-top: 1px solid #EDEDED;
233
- .btn{
234
- width: 170rpx;
235
- height: 66rpx;
236
- border: 1px solid #EDEDED;
237
- display: flex;
238
- align-items: center;
239
- justify-content: center;
240
- margin-left: 20rpx;
241
- color: #2e2f30;
242
- font-size: 24rpx;
243
- }
244
- }
245
- }
246
- </style>