jufubao-base 1.0.63-beta5 → 1.0.63

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 (88) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAddress/JfbBaseAddressLess.less +1 -1
  3. package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetailLess.less +1 -1
  4. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListLess.less +1 -1
  5. package/src/components/JfbBaseBack/JfbBaseBackLess.less +1 -1
  6. package/src/components/JfbBaseBackground/Api.js +19 -0
  7. package/src/components/JfbBaseBackground/Attr.js +224 -0
  8. package/src/components/JfbBaseBackground/JfbBaseBackground.vue +111 -0
  9. package/src/components/JfbBaseBackground/JfbBaseBackgroundLess.less +80 -0
  10. package/src/components/JfbBaseBackground/JfbBaseBackgroundMixin.js +30 -0
  11. package/src/components/JfbBaseBlock/JfbBaseBlockLess.less +1 -1
  12. package/src/components/JfbBaseBottomNotice/JfbBaseBottomNoticeLess.less +1 -1
  13. package/src/components/JfbBaseCard/JfbBaseCard.vue +9 -6
  14. package/src/components/JfbBaseCard/JfbBaseCardLess.less +1 -1
  15. package/src/components/JfbBaseCardBind/JfbBaseCardBindLess.less +1 -1
  16. package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2Less.less +1 -1
  17. package/src/components/JfbBaseCardDetail/JfbBaseCardDetailLess.less +1 -1
  18. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntryLess.less +1 -1
  19. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabledLess.less +1 -1
  20. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntryLess.less +1 -1
  21. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +9 -9
  22. package/src/components/JfbBaseCardEntry/JfbBaseCardEntryLess.less +1 -1
  23. package/src/components/JfbBaseCardInfo/JfbBaseCardInfoLess.less +1 -1
  24. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntryLess.less +1 -1
  25. package/src/components/JfbBaseCardMerge/JfbBaseCardMergeLess.less +1 -1
  26. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryLess.less +1 -1
  27. package/src/components/JfbBaseCardShift/JfbBaseCardShiftLess.less +1 -1
  28. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryLess.less +1 -1
  29. package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfoLess.less +1 -1
  30. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +18 -9
  31. package/src/components/JfbBaseCardV2/JfbBaseCardV2Less.less +1 -1
  32. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +10 -1
  33. package/src/components/JfbBaseCardV3/JfbBaseCardV3Less.less +1 -1
  34. package/src/components/JfbBaseCity/JfbBaseCityLess.less +1 -1
  35. package/src/components/JfbBaseClear/JfbBaseClearLess.less +1 -1
  36. package/src/components/JfbBaseEntry/JfbBaseEntryLess.less +1 -1
  37. package/src/components/JfbBaseExpressDetail/JfbBaseExpressDetailLess.less +1 -1
  38. package/src/components/JfbBaseFastLink/JfbBaseFastLinkLess.less +1 -1
  39. package/src/components/JfbBaseFooter/JfbBaseFooterLess.less +1 -1
  40. package/src/components/JfbBaseHeader/JfbBaseHeaderLess.less +1 -1
  41. package/src/components/JfbBaseLine/JfbBaseLineLess.less +1 -1
  42. package/src/components/JfbBaseLogin/JfbBaseLoginLess.less +1 -1
  43. package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwdLess.less +1 -1
  44. package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwdLess.less +1 -1
  45. package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlayLess.less +1 -1
  46. package/src/components/JfbBaseMapSearch/JfbBaseMapSearchLess.less +1 -1
  47. package/src/components/JfbBaseMergeUserCard/JfbBaseMergeUserCardLess.less +1 -1
  48. package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpressLess.less +1 -1
  49. package/src/components/JfbBaseMy/JfbBaseMyLess.less +1 -1
  50. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +41 -26
  51. package/src/components/JfbBaseNotice/JfbBaseNoticeLess.less +1 -1
  52. package/src/components/JfbBaseNoticeBottom/JfbBaseNoticeBottomLess.less +1 -1
  53. package/src/components/JfbBaseNoticeTop/JfbBaseNoticeTopLess.less +1 -1
  54. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +45 -29
  55. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetailLess.less +1 -1
  56. package/src/components/JfbBaseOrderList/JfbBaseOrderListLess.less +1 -1
  57. package/src/components/JfbBasePay/JfbBasePayLess.less +1 -1
  58. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollectLess.less +1 -1
  59. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLoginLess.less +1 -1
  60. package/src/components/JfbBasePoster/JfbBasePosterLess.less +1 -1
  61. package/src/components/JfbBasePosterEntry/JfbBasePosterEntryLess.less +1 -1
  62. package/src/components/JfbBasePosterType/Attr.js +1 -1
  63. package/src/components/JfbBasePosterType/JfbBasePosterTypeLess.less +1 -1
  64. package/src/components/JfbBaseRecharge/JfbBaseRechargeLess.less +1 -1
  65. package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrderLess.less +1 -1
  66. package/src/components/JfbBaseRechargeOrderDetail/JfbBaseRechargeOrderDetailLess.less +1 -1
  67. package/src/components/JfbBaseRechargeSuccess/JfbBaseRechargeSuccessLess.less +1 -1
  68. package/src/components/JfbBaseSearch/JfbBaseSearchLess.less +1 -1
  69. package/src/components/JfbBaseSetPwd/JfbBaseSetPwdLess.less +1 -1
  70. package/src/components/JfbBaseSuccess/JfbBaseSuccessLess.less +1 -1
  71. package/src/components/JfbBaseTestApi/JfbBaseTestApiLess.less +1 -1
  72. package/src/components/JfbBaseTestBody/JfbBaseTestBodyLess.less +1 -1
  73. package/src/components/JfbBaseTestBottom/JfbBaseTestBottomLess.less +1 -1
  74. package/src/components/JfbBaseTestNotice/JfbBaseTestNoticeLess.less +1 -1
  75. package/src/components/JfbBaseTestTop/JfbBaseTestTopLess.less +1 -1
  76. package/src/components/JfbBaseUserCenter/JfbBaseUserCenterLess.less +1 -1
  77. package/src/components/JfbBaseUserInfo/JfbBaseUserInfoLess.less +1 -1
  78. package/src/components/JfbBaseUserOrder/JfbBaseUserOrderLess.less +1 -1
  79. package/src/components/JfbBaseVideo/Api.js +19 -0
  80. package/src/components/JfbBaseVideo/Attr.js +259 -0
  81. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +159 -0
  82. package/src/components/JfbBaseVideo/JfbBaseVideoLess.less +80 -0
  83. package/src/components/JfbBaseVideo/JfbBaseVideoMixin.js +30 -0
  84. package/src/components/JfbBaseVideo/Mock.js +3 -0
  85. package/src/components/JfbBaseVideo/XdVideo.vue +212 -0
  86. package/src/components/JfbBaseWebview/JfbBaseWebviewLess.less +1 -1
  87. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorizeLess.less +1 -1
  88. package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeErrorLess.less +1 -1
@@ -0,0 +1,159 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-video"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-video__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-video__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-video__body">
17
+ <view class="float"></view>
18
+ <view class="video" v-if="video !== null">
19
+ <xd-video
20
+ :margin="margin"
21
+ :poster="videoSetting"
22
+ :video="video"
23
+ :radius="radius"
24
+ :pack-this="$vm"
25
+ ></xd-video>
26
+ </view>
27
+ </view>
28
+ </view>
29
+ </template>
30
+
31
+ <script>
32
+ const color = require('color');
33
+ import { jfbRootExec } from "@/utils/xd.event";
34
+ import JfbBaseVideoMixin from "./JfbBaseVideoMixin";
35
+ import componentsMixins from "@/mixins/componentsMixins";
36
+ import extsMixins from "@/mixins/extsMixins"
37
+ import { getContainerPropsValue } from "@/utils/xd.base";
38
+ import XdVideo from "./XdVideo.vue";
39
+
40
+
41
+ export default {
42
+ name: "JfbBaseVideo",
43
+ components: {
44
+ XdVideo
45
+ },
46
+ mixins: [componentsMixins,extsMixins,JfbBaseVideoMixin],
47
+ data() {
48
+ return {
49
+ selfMask: true,
50
+ page_size: 1,
51
+ options:{},
52
+
53
+ //data
54
+ video: null,
55
+ videoSetting: null,
56
+ margin:{},
57
+ radius:0,
58
+ $vm: {}
59
+ }
60
+ },
61
+ computed: {
62
+ iconFont(){
63
+ if(this.autoplay === 'N') return 'iconplayright'
64
+ if(this.autoplay === 'E') return 'iconshibai';
65
+ if(this.autoplay === 'R') return 'iconplayreplay';
66
+ },
67
+ contentWidth(){
68
+ let border = 0;
69
+ if(this.isPreview) border = 2;
70
+ return 750 - (this.margin.left + this.margin.right + border);
71
+ },
72
+ contentHeight(){
73
+ let border = 0;
74
+ if(this.isPreview) border = 2;
75
+ let winWidth = 750 - ((this.margin.left||0) + (this.margin.right||0) + border);
76
+ return winWidth * this.height/this.width;
77
+ },
78
+
79
+ outMargin(){
80
+ let margin = `${this.margin.top !== null ? this.margin.top : 0}rpx`;
81
+ margin = `${margin} ${this.margin.right !== null ? this.margin.right : 0}rpx`;
82
+ margin = `${margin} ${this.margin.bottom !== null ? this.margin.bottom :0}rpx`;
83
+ margin = `${margin} ${this.margin.left !== null ? this.margin.left : 0}rpx`;
84
+ return margin;
85
+ }
86
+ },
87
+ watch: {
88
+ container(value) {
89
+ this.init(value);
90
+ if(this.timer) clearTimeout(this.timer);
91
+ this.timer = setTimeout(()=>{
92
+ if (this.$configProject['isPreview']) this.onJfbLoad(this.options)
93
+ }, 400)
94
+ }
95
+ },
96
+ created() {
97
+ this.$vm = this;
98
+ this.isPreview = this.$configProject.isPreview;
99
+ this.init(this.container);
100
+
101
+ },
102
+ methods: {
103
+
104
+ /**
105
+ * @description 监听事件变化
106
+ * @param container {object} 业务组件对象自己
107
+ */
108
+ init(container) {
109
+ this.videoSetting = getContainerPropsValue(container, 'content.video', {size:{width: 400, height: 300}, type: '1'});
110
+ this.margin = getContainerPropsValue(container, 'content.margin', {top:0, bottom:0, right:0, left: 0});
111
+ this.radius = getContainerPropsValue(container, 'content.radius', 0);
112
+ },
113
+
114
+ onJfbLoad(options) {
115
+ this.options = options;
116
+ jfbRootExec('getListVideoContent', {
117
+ vm: this,
118
+ data: {
119
+ page_id: this.pageAttr['page_id'], //页面ID
120
+ container_id: this.containerId, //组件ID
121
+ page_size: this.page_size //可以不传
122
+ },
123
+ })
124
+ .then(res => {
125
+ if(res && res.list && res.list.length > 0) {
126
+ this.video = res.list[0];
127
+ }
128
+ })
129
+ .catch(error => {
130
+ this.$xdLog.catch(error)
131
+ })
132
+ },
133
+
134
+ onJfbUpdate() {
135
+ this.onJfbLoad(this.options);
136
+ },
137
+
138
+ }
139
+ }
140
+
141
+ </script>
142
+
143
+ <style scoped lang="less">
144
+ @import "./JfbBaseVideoLess.less";
145
+
146
+ .jfb-base-video {
147
+ &__body{
148
+
149
+ }
150
+
151
+ }
152
+
153
+ .float {
154
+ height: 1px;
155
+ width: 100%;
156
+ overflow: hidden;
157
+ }
158
+
159
+ </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-video {
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-video {
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-video'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = {}
@@ -0,0 +1,212 @@
1
+ <template>
2
+ <view
3
+ class="video-box"
4
+ :style="{
5
+ width: contentWidth + 'rpx',
6
+ height:contentHeight + 'rpx',
7
+ margin: outMargin
8
+ }"
9
+ >
10
+ <view
11
+ class="thumb"
12
+ :class="{noImageUrl: !imageUrl}"
13
+ v-if="!playStatus"
14
+ :style="{borderRadius: radius + 'rpx'}"
15
+ >
16
+ <image :src="imageUrl" v-if="imageUrl" />
17
+ <view @click="handlePlay()">
18
+ <xd-font-icon
19
+ :icon="iconFont"
20
+ size="100"
21
+ color="#fff"
22
+ ></xd-font-icon>
23
+
24
+ </view>
25
+ </view>
26
+ <view
27
+ class="video"
28
+ :style="{borderRadius: radius + 'rpx'}"
29
+ v-else
30
+ >
31
+ <video
32
+ v-if="videoUrl"
33
+ :src="videoUrl"
34
+ :autoplay="autoplay === 'Y'"
35
+ @ended="handleEnd()"
36
+ @error="handleError"
37
+ ></video>
38
+ </view>
39
+ </view>
40
+ </template>
41
+
42
+ <script>
43
+ import getServiceUrl from '@/common/getServiceUrl'
44
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
45
+
46
+ export default {
47
+ name:'XdVideo',
48
+ components:{
49
+ XdFontIcon
50
+ },
51
+ props:{
52
+ margin:{
53
+ type: Object,
54
+ default(){
55
+ return {
56
+ top:0,
57
+ left:0,
58
+ right:0,
59
+ bottom:0
60
+ }
61
+ }
62
+ },
63
+ poster:{
64
+ type:Object,
65
+ required: true
66
+ },
67
+ radius:{
68
+ type: String|Number,
69
+ default: 0
70
+ },
71
+ packThis:{
72
+ type:Object,
73
+ required: true
74
+ },
75
+ video:{
76
+ type:Object,
77
+ required: true
78
+ },
79
+ },
80
+ data(){
81
+ return {
82
+ isPreview: false,
83
+
84
+ //css
85
+ width: 0,
86
+ height: 0,
87
+
88
+ //play
89
+ imageUrl: '',
90
+ videoUrl: '',
91
+ playStatus: false,
92
+ autoplay: 'N',
93
+ }
94
+ },
95
+ computed: {
96
+ iconFont(){
97
+ if(this.autoplay === 'N') return 'iconplayright'
98
+ if(this.autoplay === 'E') return 'iconshibai';
99
+ if(this.autoplay === 'R') return 'iconplayreplay';
100
+ },
101
+ contentWidth(){
102
+ let border = 0;
103
+ if(this.isPreview) border = 2;
104
+ return 750 - (this.margin.left + this.margin.right + border);
105
+ },
106
+ contentHeight(){
107
+ let border = 0;
108
+ if(this.isPreview) border = 2;
109
+ let winWidth = 750 - ((this.margin.left||0) + (this.margin.right||0) + border);
110
+ return winWidth * this.height/this.width;
111
+ },
112
+
113
+ outMargin(){
114
+ let margin = `${this.margin.top !== null ? this.margin.top : 0}rpx`;
115
+ margin = `${margin} ${this.margin.right !== null ? this.margin.right : 0}rpx`;
116
+ margin = `${margin} ${this.margin.bottom !== null ? this.margin.bottom :0}rpx`;
117
+ margin = `${margin} ${this.margin.left !== null ? this.margin.left : 0}rpx`;
118
+ return margin;
119
+ }
120
+ },
121
+ watch:{
122
+ poster(){
123
+ this.init();
124
+ }
125
+ },
126
+ created() {
127
+ this.isPreview = this.$configProject.isPreview;
128
+ this.init();
129
+ },
130
+ methods:{
131
+ init(){
132
+ if(this.poster.size) {
133
+ this.width = Number(this.poster.size.width);
134
+ this.height = Number(this.poster.size.height);
135
+ }
136
+
137
+ let {image_url, thumb} = this.video;
138
+ if(image_url) this.videoUrl = getServiceUrl(image_url);
139
+ if(thumb) this.imageUrl = getServiceUrl(thumb);
140
+ },
141
+ handlePlay(){
142
+ if(this.autoplay === 'E') return;
143
+ this.playStatus = !this.playStatus;
144
+ this.autoplay = "Y";
145
+ },
146
+
147
+ handleEnd(){
148
+ setTimeout(()=>{
149
+ this.playStatus = !this.playStatus;
150
+ this.autoplay = "R";
151
+ }, 1000)
152
+ },
153
+
154
+ handleError(){
155
+ this.$xdConfirm({
156
+ title: '温馨提示',
157
+ content:'当前视频资源无法播放',
158
+ cancel: false,
159
+ confirmText:'我知道了',
160
+ zIndex:10000,
161
+ success:()=>{
162
+ this.playStatus = !this.playStatus;
163
+ this.autoplay = "R";
164
+ }
165
+ })
166
+
167
+ }
168
+ }
169
+ }
170
+ </script>
171
+
172
+
173
+
174
+ <style scoped lang="less">
175
+ .video-box {
176
+ view.noImageUrl {
177
+ background: rgba(0,0,0,.6);
178
+ }
179
+ view.thumb {
180
+ height: 100%;
181
+ width: 100%;
182
+ position: relative;
183
+ overflow: hidden;
184
+
185
+ & > view {
186
+ width: 120rpx;
187
+ height: 120rpx;
188
+ position: absolute;
189
+ top: 50%;
190
+ left: 50%;
191
+ margin-top: -60rpx;
192
+ margin-left:-60rpx;
193
+ }
194
+
195
+ & > image {
196
+ height: 100%;
197
+ width: 100%;
198
+ }
199
+ }
200
+
201
+ view.video {
202
+ overflow: hidden;
203
+ height: 100%;
204
+ width: 100%;
205
+
206
+ & video {
207
+ height: 100%;
208
+ width: 100%;
209
+ }
210
+ }
211
+ }
212
+ </style>
@@ -15,7 +15,7 @@
15
15
  .jfb-base-webview {
16
16
  border: 1px dashed rgba(0, 0, 0, 0);
17
17
  box-sizing: border-box;
18
- min-height: unit(100, rpx);
18
+ min-height: unit(50, rpx);
19
19
 
20
20
  &__body{
21
21
  position: relative;
@@ -15,7 +15,7 @@
15
15
  .jfb-base-wx-authorize {
16
16
  border: 1px dashed rgba(0, 0, 0, 0);
17
17
  box-sizing: border-box;
18
- min-height: unit(100, rpx);
18
+ min-height: unit(50, rpx);
19
19
 
20
20
  &__body{
21
21
  position: relative;
@@ -15,7 +15,7 @@
15
15
  .jfb-base-wx-authorize-error {
16
16
  border: 1px dashed rgba(0, 0, 0, 0);
17
17
  box-sizing: border-box;
18
- min-height: unit(100, rpx);
18
+ min-height: unit(50, rpx);
19
19
 
20
20
  &__body{
21
21
  position: relative;