jufubao-base 1.0.197-beta5 → 1.0.197-beta7

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.
Files changed (31) hide show
  1. package/commands.js +1 -1
  2. package/package.json +1 -1
  3. package/src/ICONS.js +1128 -0
  4. package/src/components/JfbBaseAddress/Attr.js +109 -1
  5. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +164 -80
  6. package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
  7. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +41 -13
  8. package/src/components/JfbBaseFastLink/Attr.js +24 -8
  9. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +37 -21
  10. package/src/components/JfbBaseFooter/Attr.js +141 -75
  11. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
  12. package/src/components/JfbBaseHeader/Attr.js +8 -1
  13. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +8 -5
  14. package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +12 -3
  15. package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
  16. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +97 -47
  17. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  18. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  19. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  20. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  21. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +27 -29
  22. package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +13 -9
  23. package/src/components/JfbBaseUserCenter/Attr.js +297 -52
  24. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +135 -44
  25. package/src/components/JfbBaseUserInfo/Attr.js +227 -85
  26. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +106 -86
  27. package/src/components/JfbBaseUserOrder/Attr.js +332 -30
  28. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +183 -55
  29. package/src/components/JfbBaseWallet/Attr.js +376 -8
  30. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
  31. package/src/mixins/componentsMixins.js +210 -35
@@ -0,0 +1,267 @@
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>
58
+ <view class="serve_fee" style="color:#999" v-if="item['main_user_server_amount'] !== undefined && item['main_user_server_amount'] > 0">
59
+ <text>(平台服务费:</text>
60
+ <xd-unit
61
+ :isOld="false"
62
+ :price="item['main_user_server_amount']"
63
+ :fontSize="24"
64
+ :is-gray="true"
65
+ color="#999"
66
+ :icon-size=".25"
67
+ ></xd-unit>
68
+ <text>)</text>
69
+ </view>
70
+ </view>
71
+ <view style="display: flex;align-items: center;">
72
+ 共{{item.products.length}}件商品
73
+ <template v-if="item.biz_code !== 'gift' && item.is_not_show_price !== 'Y'">
74
+ 实付
75
+ <xd-unit
76
+ :isOld="false"
77
+ :price="item.total_amount"
78
+ :color="mainColor"
79
+ :fontSize="28"></xd-unit>
80
+ </template>
81
+
82
+ </view>
83
+ </view>
84
+ <view v-if="item.buttons.length" class="prod_footer">
85
+ <view style="flex: 1;"></view>
86
+ <view class="btn"
87
+ v-for="(btn,index) in item.buttons" :key="btn.key"
88
+ @click="handleBtnEvent(btn.action, item)"
89
+ >{{btn.text}}</view>
90
+ </view>
91
+ </view>
92
+ </template>
93
+
94
+ <script>
95
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon"
96
+ import XdUnit from "@/components/XdUnit/XdUnit"
97
+ export default{
98
+ name:"XdTfkOrderItem",
99
+ components: {
100
+ XdFontIcon,
101
+ XdUnit,
102
+ },
103
+ props:{
104
+ item: Object,
105
+ mainColor: String,
106
+ isShowOrderNo: {
107
+ type: String,
108
+ },
109
+ brandTextColor: String
110
+ },
111
+ data(){
112
+ return{
113
+ }
114
+ },
115
+ methods:{
116
+ handleBtnEvent(action){
117
+ this.$emit('handleBtnEvent', action)
118
+ },
119
+ }
120
+ }
121
+ </script>
122
+
123
+ <style lang="less" scoped>
124
+ .xd-tfk-order-item{
125
+ padding-left: 30rpx;
126
+ overflow: hidden;
127
+ .o_header{
128
+ height: 90rpx;
129
+ display: flex;
130
+ align-items: center;
131
+ justify-content: space-between;
132
+ border-bottom: 1px solid #EDEDED;
133
+ padding-right: 30rpx;
134
+ color: #333333;
135
+ font-size: 28rpx;
136
+
137
+ .h_l{
138
+ display: flex;
139
+ align-items: center;
140
+ }
141
+ }
142
+ .o_title{
143
+ height: 80rpx;
144
+ display: flex;
145
+ align-items: center;
146
+ justify-content: space-between;
147
+ padding-right: 30rpx;
148
+ color: #333333;
149
+ font-size: 24rpx;
150
+ border-bottom: 1px solid #EDEDED;
151
+ }
152
+ .one_prod{
153
+ display: flex;
154
+ align-items: center;
155
+ width: 100%;
156
+ padding: 30rpx 30rpx 30rpx 0;
157
+ box-sizing: border-box;
158
+ .prod_img{
159
+ width: 140rpx;
160
+ height: 140rpx;
161
+ background-color: #f5f5f9;
162
+ image{
163
+ width: 100%;
164
+ height: 100%;
165
+ }
166
+ }
167
+ .prod_info{
168
+ flex: 1;
169
+ padding-left: 30rpx;
170
+ .prod_name{
171
+ color: #2e2f30;
172
+ font-size: 30rpx;
173
+ }
174
+ .prod_brand{
175
+ font-size: 24rpx;
176
+ margin-top: 8rpx;
177
+ }
178
+ .prod_sku{
179
+ color: #797d82;
180
+ font-size: 24rpx;
181
+ margin-top: 8rpx;
182
+ }
183
+ }
184
+ .prod_price{
185
+ display: flex;
186
+ justify-content: space-between;
187
+ align-items: center;
188
+ color: rgb(46, 47, 48);
189
+ font-size: 30rpx;
190
+ margin-top: 12rpx;
191
+ .info-price{
192
+ display: flex;
193
+ color: #bdc0c5;
194
+ font-size: 26rpx;
195
+ }
196
+ }
197
+ }
198
+ .prod_list{
199
+ position: relative;
200
+ .right_arrow{
201
+ position: absolute;
202
+ right: 0px;
203
+ height: 100%;
204
+ width: 60rpx;
205
+ top: 0;
206
+ background: #FFF;
207
+ display: flex;
208
+ align-items: center;
209
+ justify-content: center;
210
+ }
211
+ }
212
+ .more_prod{
213
+ display: flex;
214
+ flex-wrap: nowrap;
215
+ overflow: auto;
216
+ padding: 30rpx 30rpx 30rpx 0;
217
+ width: 100%;
218
+ .img_list{
219
+ display: flex;
220
+ flex-wrap: nowrap;
221
+ padding-right: 60rpx;
222
+ }
223
+ .prod_img{
224
+ width: 140rpx;
225
+ height: 140rpx;
226
+ display: flex;
227
+ align-items: center;
228
+ justify-content: center;
229
+ image{
230
+ width: 100%;
231
+ height: 100%;
232
+ }
233
+ }
234
+ }
235
+ .prod_total{
236
+ height: 80rpx;
237
+ display: flex;
238
+ align-items: center;
239
+ justify-content: space-between;
240
+ padding-right: 30rpx;
241
+ border-top: 1px solid #EDEDED;
242
+ color: #2e2f30;
243
+ font-size: 26rpx;
244
+ .serve_fee{
245
+ display: flex;
246
+ align-items: center;
247
+ }
248
+ }
249
+ .prod_footer{
250
+ padding: 16rpx 30rpx 16rpx 0;
251
+ display: flex;
252
+ align-items: center;
253
+ border-top: 1px solid #EDEDED;
254
+ .btn{
255
+ width: 170rpx;
256
+ height: 66rpx;
257
+ border: 1px solid #EDEDED;
258
+ display: flex;
259
+ align-items: center;
260
+ justify-content: center;
261
+ margin-left: 20rpx;
262
+ color: #2e2f30;
263
+ font-size: 24rpx;
264
+ }
265
+ }
266
+ }
267
+ </style>
@@ -1,4 +1,4 @@
1
- <script src="JfbBasePosterBigSmallMixin.js"></script>
1
+
2
2
  <template>
3
3
  <view
4
4
  class="jfb-base-poster-big-small"
@@ -17,14 +17,12 @@
17
17
  <view class="jfb-base-poster-big-small__body">
18
18
  <view
19
19
  class="jfb-base-poster-big-small__body-wrap"
20
- :style="{
21
- margin: margin,
22
- flexDirection: position === 1 ? 'row' : 'row-reverse',
23
- }"
20
+ :style="{margin: margin,flexDirection: position === 1 ? 'row' : 'row-reverse'}"
24
21
  v-if="isShowAd"
25
22
  >
23
+ <!--大图-->
26
24
  <view
27
- v-if="isCarousel === 1"
25
+ v-if="isCarousel === 1 && bigList.length > 0"
28
26
  :style="{
29
27
  margin: msMarginComputed,
30
28
  width: bigWidth + 'rpx',
@@ -40,7 +38,7 @@
40
38
  borderRadius: radius + 'rpx',
41
39
  }"
42
40
  :src="bigList[0].image_url"
43
- mode="aspectFill"
41
+ mode="scaleToFill"
44
42
  ></image>
45
43
  </view>
46
44
  </view>
@@ -75,7 +73,7 @@
75
73
  <image
76
74
  :style="{borderRadius: radius + 'rpx',width: bigWidth + 'rpx',height: bigHeight + 'rpx',}"
77
75
  :src="item['image_url']"
78
- mode="aspectFill"></image>
76
+ mode="scaleToFill"></image>
79
77
  </swiper-item>
80
78
  </swiper>
81
79
  <!--#endif-->
@@ -91,13 +89,15 @@
91
89
  @animationfinish="handleBigAnimationfinish"
92
90
  >
93
91
  <template slot-scope="{ item, index }">
94
- <image :style="{borderRadius: radius + 'rpx',}" :src="item['image_url']" mode="aspectFill"></image>
92
+ <image :style="{borderRadius: radius + 'rpx',}" :src="item['image_url']" mode="scaleToFill"></image>
95
93
  </template>
96
94
  </xd-swiper>
97
95
  <!--#endif-->
98
96
  </xd-swiper-dot>
99
97
  <view v-if="isPreview" class="carousel-mask"></view>
100
98
  </view>
99
+ <!--大图-->
100
+ <!--小图-->
101
101
  <view
102
102
  :style="{
103
103
  width: bigWidth + 'rpx',
@@ -112,7 +112,7 @@
112
112
  }"
113
113
  >
114
114
  <view
115
- v-if="topIsCarousel === 1"
115
+ v-if="topIsCarousel === 1 && topList.lenght > 0"
116
116
  :style="{
117
117
  width: bigWidth + 'rpx',
118
118
  height: smallHeight + 'rpx',
@@ -126,7 +126,7 @@
126
126
  borderRadius: topRadius + 'rpx',
127
127
  }"
128
128
  :src="topList[0].image_url"
129
- mode="aspectFill"
129
+ mode="scaleToFill"
130
130
  ></image></view
131
131
  ></view>
132
132
  <view
@@ -159,7 +159,7 @@
159
159
  <image
160
160
  :style="{borderRadius: radius + 'rpx',width: bigWidth + 'rpx',height: smallHeight + 'rpx',}"
161
161
  :src="item['image_url']"
162
- mode="aspectFill"></image>
162
+ mode="scaleToFill"></image>
163
163
  </swiper-item>
164
164
  </swiper>
165
165
  <!--#endif-->
@@ -175,7 +175,7 @@
175
175
  @animationfinish="handleTopAnimationfinish"
176
176
  >
177
177
  <template slot-scope="{ item, index }">
178
- <image :style="{borderRadius: topRadius + 'rpx',}" :src="item['image_url']" mode="aspectFill"></image>
178
+ <image :style="{borderRadius: topRadius + 'rpx',}" :src="item['image_url']" mode="scaleToFill"></image>
179
179
  </template>
180
180
  </xd-swiper>
181
181
  <!--#endif-->
@@ -190,7 +190,7 @@
190
190
  }"
191
191
  >
192
192
  <view
193
- v-if="bottomIsCarousel === 1"
193
+ v-if="bottomIsCarousel === 1 && bottomList.lenght > 0"
194
194
  :style="{
195
195
  width: bigWidth + 'rpx',
196
196
  height: smallHeight + 'rpx',
@@ -204,7 +204,7 @@
204
204
  borderRadius: bottomRadius + 'rpx',
205
205
  }"
206
206
  :src="bottomList[0].image_url"
207
- mode="aspectFill"
207
+ mode="scaleToFill"
208
208
  ></image> </view
209
209
  ></view>
210
210
  <view
@@ -237,7 +237,7 @@
237
237
  <image
238
238
  :style="{borderRadius: radius + 'rpx',width: bigWidth + 'rpx',height: smallHeight + 'rpx',}"
239
239
  :src="item['image_url']"
240
- mode="aspectFill"></image>
240
+ mode="scaleToFill"></image>
241
241
  </swiper-item>
242
242
  </swiper>
243
243
  <!--#endif-->
@@ -258,7 +258,7 @@
258
258
  borderRadius: bottomRadius + 'rpx',
259
259
  }"
260
260
  :src="item['image_url']"
261
- mode="aspectFill"
261
+ mode="scaleToFill"
262
262
  ></image>
263
263
  </template>
264
264
  </xd-swiper>
@@ -268,6 +268,7 @@
268
268
  </view>
269
269
  </view>
270
270
  </view>
271
+ <!--小图-->
271
272
  </view>
272
273
  </view>
273
274
  </view>
@@ -297,12 +298,7 @@ export default {
297
298
  return {
298
299
  params:{},
299
300
  height: 0, //组件高度
300
- mS: {
301
- top: 0,
302
- bottom: 0,
303
- left: 0,
304
- right: 0,
305
- }, //间距
301
+ mS: {}, //间距
306
302
  isPreview: false, //是否预览
307
303
  test: {
308
304
  content_id: "KpBbUKdj4aBejwe7Fh1ki",
@@ -364,9 +360,7 @@ export default {
364
360
  },
365
361
  computed: {
366
362
  margin() {
367
- return `${this.mS.top || 0}rpx ${this.mS.right || 0}rpx ${
368
- this.mS.bottom || 0
369
- }rpx ${this.mS.left || 0}rpx`;
363
+ return this.getMarginAndPadding(this.mS, 0);
370
364
  },
371
365
  msMarginComputed() {
372
366
  if (this.position === 1) {
@@ -793,10 +787,11 @@ export default {
793
787
  // 获取大小图之间间距,如果没有则设置默认值
794
788
  this.msMargin = getContainerPropsValue(container, "content.msMargin", 10);
795
789
  // 获取安全区域宽度,减去margin的值,再除以2,获取大图宽度
796
- this.bigWidth = getWidthHeight(this.height,this.mS,this.msMargin).bigWidth;
797
- this.bigHeight = getWidthHeight(this.height,this.mS,this.msMargin).bigHeight;
790
+ this.bigWidth = getWidthHeight(this.height,this.mS,this.msMargin , this).bigWidth;
791
+ this.bigHeight = getWidthHeight(this.height,this.mS,this.msMargin, this).bigHeight;
798
792
  // 获取容器高度,减去margin的值,再除以2,获取小图高度
799
- this.smallHeight = getWidthHeight(this.height,this.mS,this.msMargin).smallHeight;
793
+ this.smallHeight = getWidthHeight(this.height, this.mS, this.msMargin, this).smallHeight;
794
+
800
795
  // 获取大图数据
801
796
  this.isCarousel = getContainerPropsValue(
802
797
  container,
@@ -882,6 +877,9 @@ export default {
882
877
  &__body {
883
878
  &-wrap {
884
879
  display: flex;
880
+ justify-content: space-between;
881
+ align-items: flex-start;
882
+ overflow: hidden;
885
883
  }
886
884
  }
887
885
  }
@@ -1,12 +1,16 @@
1
- function getWidthHeight(height, mS= {}, msMargin={}) {
2
- let bigWidth =
3
- uni.getSystemInfoSync().safeArea.width -
4
- (mS.left + mS.right + Number(msMargin)) / 2;
5
- let bigHeight = height - (mS.top + mS.bottom);
1
+
2
+ function checkValue(value, dValue = 0){
3
+ if(value === undefined || value === '' || value === null) return dValue;
4
+ return Number(value || 0);
5
+ }
6
+
7
+ export default (height, mS= {}, msMargin={}, $vm) =>{
8
+ let marginRL = checkValue(mS.left, 0) + checkValue(mS.right, 0);
9
+ let marginTB = checkValue(mS.top, 0) + checkValue(mS.bottom, 0);
10
+ let bigWidth = (750 - (marginRL + Number(msMargin)))/2;
11
+ let bigHeight = height - marginTB;
6
12
  // 获取容器高度,减去margin的值,再除以2,获取小图高度
7
- let smallHeight =
8
- (height - (mS.top + mS.bottom + Number(msMargin))) /
9
- 2;
13
+ let smallHeight = (height - (marginTB + Number(msMargin)))/2;
10
14
  return { bigWidth, bigHeight, smallHeight };
11
15
  }
12
- export default getWidthHeight;
16
+