jufubao-base 1.0.232-beta3 → 1.0.232-beta4

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 (40) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseBalance/Api.js +58 -0
  3. package/src/components/JfbBaseBalance/Attr.js +48 -0
  4. package/src/components/JfbBaseBalance/JfbBaseBalance.vue +111 -0
  5. package/src/components/JfbBaseBalance/JfbBaseBalanceLess.less +79 -0
  6. package/src/components/JfbBaseBalance/JfbBaseBalanceMixin.js +30 -0
  7. package/src/components/JfbBaseBalance/Mock.js +13 -0
  8. package/src/components/JfbBaseCardDelay/JfbBaseCardDelay.vue +30 -29
  9. package/src/components/JfbBaseCodeOpenVip/Attr.js +229 -27
  10. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +111 -9
  11. package/src/components/JfbBaseConsumpCode/Attr.js +22 -22
  12. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +580 -34
  13. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +16 -7
  14. package/src/components/JfbBaseOpenVip/Attr.js +229 -27
  15. package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +259 -7
  16. package/src/components/JfbBaseOpenVip/XdVipList.vue +81 -0
  17. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +33 -4
  18. package/src/components/JfbBasePointsCard/Attr.js +199 -24
  19. package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +209 -29
  20. package/src/components/JfbBasePointsDetail/Api.js +8 -43
  21. package/src/components/JfbBasePointsDetail/Attr.js +282 -26
  22. package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +139 -29
  23. package/src/components/JfbBaseRechargeOrder/Api.js +3 -13
  24. package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +16 -34
  25. package/src/components/JfbBaseShare/JfbBaseShare.vue +108 -2
  26. package/src/components/JfbBaseTfkSearch/Attr.js +8 -82
  27. package/src/components/JfbBaseUserInfo/Attr.js +102 -10
  28. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +301 -114
  29. package/src/components/JfbBaseWithDrawAgain/Api.js +58 -0
  30. package/src/components/JfbBaseWithDrawAgain/Attr.js +48 -0
  31. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +111 -0
  32. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +79 -0
  33. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +30 -0
  34. package/src/components/JfbBaseWithDrawAgain/Mock.js +13 -0
  35. package/src/components/JfbBaseWithDrawRecord/Api.js +58 -0
  36. package/src/components/JfbBaseWithDrawRecord/Attr.js +48 -0
  37. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +111 -0
  38. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +79 -0
  39. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +30 -0
  40. package/src/components/JfbBaseWithDrawRecord/Mock.js +13 -0
@@ -17,7 +17,8 @@
17
17
  </view>
18
18
  <!-- #endif -->
19
19
  <view class="jfb-base-login__body" :style="{
20
- '--agreement-align': agreementAlign
20
+ '--agreement-align': agreementAlign,
21
+ '--main-color': mainColor,
21
22
  }">
22
23
 
23
24
  <view v-if="showLogo === 'Y'" class="logo-wrap" :style="{
@@ -108,15 +109,13 @@
108
109
  class="_item"
109
110
  :class="{ active: accountLoginType === 'phone' }"
110
111
  @click="setAccountLoginType('phone')"
111
- >验证码登录<text :style="{ background: mainColor }"></text
112
- ></view>
112
+ >验证码登录</view>
113
113
  <view
114
114
  v-if="pwdLogin"
115
115
  class="_item"
116
116
  :class="{ active: accountLoginType === 'pwd' }"
117
117
  @click="setAccountLoginType('pwd')"
118
- >密码登录<text :style="{ background: mainColor }"></text
119
- ></view>
118
+ >密码登录</view>
120
119
  </view>
121
120
  <view :style="loginFormStyle">
122
121
  <xd-form
@@ -1269,11 +1268,21 @@ export default {
1269
1268
  color: #383838;
1270
1269
  font-size: 36rpx;
1271
1270
 
1272
- text {
1271
+ // text {
1272
+ // position: absolute;
1273
+ // height: 6rpx;
1274
+ // width: 90rpx;
1275
+ // border-radius: 6rpx;
1276
+ // left: 50%;
1277
+ // bottom: 0;
1278
+ // transform: translateX(-50%);
1279
+ // }
1280
+ &::after {
1281
+ content: ' ';
1273
1282
  position: absolute;
1274
1283
  height: 6rpx;
1275
1284
  width: 90rpx;
1276
- border-radius: 6rpx;
1285
+ background-color: var(--main-color);
1277
1286
  left: 50%;
1278
1287
  bottom: 0;
1279
1288
  transform: translateX(-50%);
@@ -8,39 +8,241 @@ export default {
8
8
  content: (data) => {
9
9
  return [
10
10
  {
11
- label: '背景颜色:',
12
- ele: 'xd-color',
13
- valueKey: 'bgColor',
14
- value: data.bgColor || '',
15
- placeholder: '请输入占位框背景颜色',
11
+ label: '共享PLUS会员用户协议:',
12
+ ele: 'xd-site-news',
13
+ valueKey: 'notices',
16
14
  groupKey:'content',
17
- },
18
- {
19
- label: '选中路径:',
20
- groupKey:'advanced',
21
- className: 'input100',
22
- ele: 'xd-select-pages-path',
23
- valueKey: 'select-pages-path',
24
- value: data['select-pages-path'] || null,
15
+ value: data.notices || {type: 'privacy'},
16
+ className: 'input70',
25
17
  setting: {
26
- router: XdBus.getParentApi('getPagesTree')
18
+ config: {
19
+ sort: true,
20
+ maxlen: 100,
21
+ action: 'aliyun',
22
+ size: 5,
23
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
24
+ uploadType: 'aliyun',
25
+ type: ['jpg', 'png', 'jpeg']
26
+ },
27
27
  },
28
- },
29
- data.bgColor && {
30
- label: '高度:',
31
- ele: 'el-input',
32
- groupKey:'style',
33
- type: 'number',
34
- valueKey: 'height',
35
- value: data.height || 100,
36
- placeholder: '请输入占位框高度,单位像素,默认:10px',
37
- className: 'input60',
28
+ handleCustom({action, data}) {
29
+ if (data && data.params) {
30
+ //当一个插件中出现多个内容分类时候需要设置code值,在页面引用时候(容器id + code)进行拼接获取数据列表
31
+ data.params = Object.assign({}, data.params, {code: 'privacy_service'});
32
+ }
33
+
34
+ //获取返回参数(场景类型名称为必填)
35
+ let loading = { close(){}}
36
+
37
+ //获取显示内容
38
+ if (action === 'screen') {
39
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
40
+ .then(res => {
41
+ loading.close();
42
+ data.cb(res['list'])
43
+ })
44
+ .catch(error => {
45
+ console.error(error);
46
+ loading.close();
47
+ });
48
+
49
+ }
50
+
51
+ //获取返回参数(广告位高度必选项)
52
+ if (action === 'getNewsInfo') {
53
+ XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
54
+ .then(res => {
55
+ loading.close()
56
+ data.cb({list: res.list, selectId: res.selected})
57
+ })
58
+ .catch(error => {
59
+ loading.close()
60
+ console.error(error);
61
+ });
62
+ }
63
+
64
+ //获取产品业务线列表
65
+ if (action === 'namespace') {
66
+ XdBus.getParentApi('getOptionsNamespaces')({})
67
+ .then(res => {
68
+ loading.close()
69
+ data.cb(res['list'])
70
+ })
71
+ .catch(error => {
72
+ loading.close()
73
+ console.error(error);
74
+ });
75
+ }
76
+
77
+ //使用内容分类
78
+ if (action === 'cmsPublishEditxContent') {
79
+ loading = XdBus.getParentApi('loading')({});
80
+ XdBus.getParentApi('cmsPublishEditxContent')(data.params)
81
+ .then(res => {
82
+ console.log('cmsPublishEditxContent', res)
83
+ loading.close();
84
+ data.cb(res)
85
+ })
86
+ .catch(error => {
87
+ loading.close();
88
+ console.error(error);
89
+ });
90
+ }
91
+
92
+ //位置列表
93
+ if (action === 'getListPostion') {
94
+ loading = XdBus.getParentApi('loading')({});
95
+ XdBus.getParentApi('getListNewsPosition')(data.params)
96
+ .then(res => {
97
+ loading.close();
98
+ data.cb(res)
99
+ })
100
+ .catch(error => {
101
+ loading.close();
102
+ console.error(error);
103
+ });
104
+ }
105
+
106
+ //位置创建
107
+ if (action === 'addPostion') {
108
+ loading = XdBus.getParentApi('loading')({});
109
+ XdBus.getParentApi('addNewsPosition')(data.params)
110
+ .then(res => {
111
+ loading.close();
112
+ data.cb(true)
113
+ })
114
+ .catch(error => {
115
+ console.error(error);
116
+ loading.close();
117
+ data.cb(false)
118
+ });
119
+ }
120
+
121
+ //位置编辑
122
+ if (action === 'editPostion') {
123
+ loading = XdBus.getParentApi('loading')({});
124
+ XdBus.getParentApi('updateNewsPosition')(data.params)
125
+ .then(res => {
126
+ loading.close();
127
+ data.cb(true)
128
+ })
129
+ .catch(error => {
130
+ console.error(error);
131
+ loading.close();
132
+ data.cb(false)
133
+ });
134
+ }
135
+
136
+ //位置删除
137
+ if (action === 'deleltePostion') {
138
+ loading = XdBus.getParentApi('loading')({});
139
+ XdBus.getParentApi('deleteNewsPosition')(data.params)
140
+ .then(res => {
141
+ loading.close();
142
+ data.cb(true)
143
+ })
144
+ .catch(error => {
145
+ console.error(error);
146
+ loading.close();
147
+ data.cb(false)
148
+ });
149
+ }
150
+
151
+ //获取广告位内容列表
152
+ if (action === 'getListContent') {
153
+ loading = XdBus.getParentApi('loading')({});
154
+ XdBus.getParentApi('getListNewsContent')(data.params)
155
+ .then(res => {
156
+ loading.close();
157
+ data.cb(res)
158
+ })
159
+ .catch(error => {
160
+ loading.close();
161
+ console.error(error);
162
+ });
163
+ }
164
+
165
+ //广告内容创建
166
+ if (action === 'addContent') {
167
+ loading = XdBus.getParentApi('loading')({});
168
+ XdBus.getParentApi('addNewsContent')(data.params)
169
+ .then(res => {
170
+ loading.close();
171
+ data.cb(true)
172
+ })
173
+ .catch(error => {
174
+ console.error(error);
175
+ loading.close();
176
+ data.cb(false)
177
+ });
178
+ }
179
+
180
+ //广告内容编辑
181
+ if (action === 'editContent') {
182
+ loading = XdBus.getParentApi('loading')({});
183
+ XdBus.getParentApi('updateNewsContent')(data.params)
184
+ .then(res => {
185
+ loading.close();
186
+ data.cb(true)
187
+ })
188
+ .catch(error => {
189
+ console.error(error);
190
+ loading.close();
191
+ data.cb(false)
192
+ });
193
+ }
194
+
195
+ //广告内容删除
196
+ if (action === 'deleteContent') {
197
+ loading = XdBus.getParentApi('loading')({});
198
+ XdBus.getParentApi('deleteNewsContent')(data.params)
199
+ .then(res => {
200
+ loading.close();
201
+ data.cb(true)
202
+ })
203
+ .catch(error => {
204
+ console.error(error);
205
+ loading.close();
206
+ data.cb(false)
207
+ });
208
+ }
209
+
210
+ //内容发布
211
+ if (action === 'publish') {
212
+ loading = XdBus.getParentApi('loading')({});
213
+ console.log('publish', data.params)
214
+ XdBus.getParentApi('cmsPublishContent')(data.params)
215
+ .then(res => {
216
+ loading.close();
217
+ data.cb(res)
218
+ })
219
+ .catch(error => {
220
+ loading.close();
221
+ console.error(error);
222
+ });
223
+ }
224
+
225
+ //通知页面进行刷新
226
+ if (action === 'update') {
227
+ loading = XdBus.getParentApi('loading')({});
228
+ XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
229
+ loading.close()
230
+ }
231
+ },
232
+ inline: false,
233
+ notice: '',
38
234
  },
39
235
  {
40
- label: '', //label
236
+ label: '支付跳转路径:',
237
+ ele: 'xd-select-pages-path',
238
+ valueKey: 'payPath',
41
239
  groupKey:'advanced',
42
- ele: 'slot', //package 名称
43
- slot: 'is_reference',
240
+ placeholder: '请选择支付跳转路径',
241
+ value: data['payPath'] || null,
242
+ setting: {
243
+ router: XdBus.getParentApi('getPagesTree'),
244
+ },
245
+ inline: false,
44
246
  },
45
247
  ].filter(i=>i)
46
248
  },
@@ -13,31 +13,103 @@
13
13
  <view class="jfb-base-open-vip__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view class="jfb-base-open-vip__body">
17
- <view>测试插件( {{containerId}} )</view>
16
+ <view class="jfb-base-open-vip__body" :style="[bodyStyle]">
17
+ <!-- 用户信息 -->
18
+ <view class="u_header">
19
+ <view class="u_avatar"></view>
20
+ <view class="u_info">
21
+ <view class="u_info-top">
22
+ <view class="vip_name">黑白灰</view>
23
+ <view v-if="0" class="vip_level">普通用户</view>
24
+ <view v-else class="vip_level plus">PLUS会员</view>
25
+ </view>
26
+ <view class="u_sub">
27
+ <view>138****7353</view>
28
+ </view>
29
+ </view>
30
+ <view class="buy_btn" @click="showDrawer=true">立即续费</view>
31
+ </view>
32
+
33
+ <!-- plus会员权益 -->
34
+ <view class="vip_info">
35
+ <view class="vip_box">
36
+ <view class="vip_box-left">
37
+ <view class="vip_box-title">PLUS会员</view>
38
+ <view>开通享受更多权益</view>
39
+ </view>
40
+ <view class="vip_logo"></view>
41
+ </view>
42
+ <view class="vip_banner">
43
+ <view class="banner_item" v-for="i in 4" :key="i">
44
+ <view class="banner_img"></view>
45
+ <view class="banner_text">生日祝福</view>
46
+ </view>
47
+ </view>
48
+ <view class="vip_good">
49
+ <view class="vip_good-title">
50
+ <text class="_text">4大特权</text>
51
+ <view class="line"></view>
52
+ </view>
53
+ <view class="good_list">
54
+ <view class="good_item" v-for="i in 4" :key="i">
55
+ <view class="good_title">
56
+ <view class="good_title-tag">特权福利1</view>
57
+ <view>生日祝福</view>
58
+ </view>
59
+ <view class="good_cont">平台会在生日当天为用户发放专属的生日祝福</view>
60
+ </view>
61
+ </view>
62
+ </view>
63
+ </view>
64
+
65
+ <xd-vip-list @handlePrivacy="handlePrivacy"></xd-vip-list>
66
+
67
+ <xd-down-drawer :show.sync="showDrawer" height="480rpx">
68
+ <view class="drawer_title">立即续费</view>
69
+ <xd-vip-list @handlePrivacy="handlePrivacy"></xd-vip-list>
70
+ </xd-down-drawer>
71
+
18
72
  </view>
19
73
  </view>
20
74
  </template>
21
75
 
22
76
  <script>
23
77
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
78
+ import XdButton from "@/components/XdButton/XdButton";
79
+ import XdVipList from "./XdVipList.vue";
80
+ import XdDownDrawer from "@/components/XdDownDrawer/XdDownDrawer.vue"
24
81
  import { jfbRootExec } from "@/utils/xd.event";
25
82
  import JfbBaseOpenVipMixin from "./JfbBaseOpenVipMixin";
26
83
  import { getContainerPropsValue } from "@/utils/xd.base";
27
84
  import componentsMixins from "@/mixins/componentsMixins";
28
85
  import extsMixins from "@/mixins/extsMixins";
86
+
29
87
  export default {
30
88
  name: "JfbBaseOpenVip",
31
89
  components: {
32
- XdFontIcon
90
+ XdFontIcon,
91
+ XdButton,
92
+ XdVipList,
93
+ XdDownDrawer
33
94
  },
34
95
  mixins: [
35
96
  componentsMixins, extsMixins, JfbBaseOpenVipMixin
36
97
  ],
37
98
  data() {
38
99
  return {
100
+ //hideMask: true,
39
101
 
102
+ showDrawer: false,
40
103
  //todo
104
+ payPath: "",
105
+ }
106
+ },
107
+ computed: {
108
+ bodyStyle(){
109
+ return {
110
+ minHeight: this.layoutInfo.bodyMinHeightRpx + "rpx",
111
+ '--main-color': this.mainColor
112
+ }
41
113
  }
42
114
  },
43
115
  watch: {
@@ -69,10 +141,14 @@
69
141
  * @param container {object} 业务组件对象自己
70
142
  */
71
143
  init(container) {
72
-
73
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
74
-
75
- //this.height = getContainerPropsValue(container, 'content.height', 10);
144
+ this.payPath = getContainerPropsValue(container, 'content.payPath', {value: ""}).value;
145
+ },
146
+ handlePrivacy(code){
147
+ let params = `page_id=${this.pageAttr["page_id"]}`;
148
+ params = `${params}&container_id=${this.containerId}${code}`;
149
+ this.$xdUniHelper.navigateTo({
150
+ url: `/pages/content/content?${params}`
151
+ })
76
152
  },
77
153
  onJfbScroll(options) {
78
154
  console.log('event.onJfbScroll', options)
@@ -105,7 +181,183 @@
105
181
 
106
182
  .jfb-base-open-vip {
107
183
  &__body{
184
+ .u_header{
185
+ display: flex;
186
+ align-items: center;
187
+ padding: 24rpx 40rpx;
188
+ margin: 20rpx;
189
+
190
+ .u_avatar{
191
+ width: 120rpx;
192
+ height: 120rpx;
193
+ background-color: #f00;
194
+ border-radius: 120rpx;
195
+ margin-right: 24rpx;
196
+ }
197
+ .u_info{
198
+ flex:1;
199
+ &-top{
200
+ display: flex;
201
+ align-items: center;
202
+ .vip_name{
203
+ font-size: 28rpx;
204
+ color: #333333;
205
+ }
206
+ .vip_level{
207
+ padding: 4rpx 16rpx;
208
+ border-radius: 24rpx;
209
+ font-size: 24rpx;
210
+ background-color: #FFE6C4;
211
+ color: #615850;
212
+ margin-left: 8rpx;
213
+ &.plus{
214
+ background: linear-gradient(180deg, #615243 0%, #2D2824 100%);
215
+ color: #FFEFD7;
216
+ }
217
+ }
218
+ }
219
+ .u_sub{
220
+ margin-top: 24rpx;
221
+ }
222
+ }
223
+ .buy_btn{
224
+ width: 146rpx;
225
+ height: 60rpx;
226
+ background-color: var(--main-color);
227
+ color: #fff;
228
+ border-radius: 60rpx;
229
+ line-height: 60rpx;
230
+ text-align: center;
231
+ font-size: 24rpx;
232
+ }
233
+ }
234
+
235
+ .vip_info{
236
+ padding: 20rpx;
237
+ .vip_box{
238
+ width: 100%;
239
+ height: 184rpx;
240
+ border-radius: 24rpx;
241
+ background: linear-gradient(90deg, #E8A841 0%, #FAD48E 100%);
242
+ display: flex;
243
+ align-items: center;
244
+ justify-content: space-between;
245
+ padding: 40rpx;
246
+ box-sizing: border-box;
247
+
248
+ &-left{
249
+ font-size: 24rpx;
250
+ font-weight: 400;
251
+ color: #FFFFFF;
252
+ display: flex;
253
+ align-self: stretch;
254
+ flex-direction: column;
255
+ justify-content: space-between;
256
+ }
257
+ &-title{
258
+ font-size: 32rpx;
259
+ font-weight: bold;
260
+ }
261
+ .vip_logo{
262
+ width: 104rpx;
263
+ height: 104rpx;
264
+ background-color: #E8A841;
265
+ }
266
+ }
108
267
 
268
+ .vip_banner{
269
+ display: flex;
270
+ padding: 16rpx;
271
+ margin: 20rpx 0;
272
+ justify-content: space-around;
273
+ .banner_item{
274
+ display: flex;
275
+ align-items: center;
276
+ flex-direction: column;
277
+ .banner_img{
278
+ width: 108rpx;
279
+ height: 108rpx;
280
+ border-radius: 108rpx;
281
+ background-color: #EBB963;
282
+ }
283
+ .banner_text{
284
+ color: #333333;
285
+ font-size: 24rpx;
286
+ font-weight: 500;
287
+ margin-top: 16rpx;
288
+ }
289
+ }
290
+ }
291
+
292
+ .vip_good{
293
+ background-color: #FFFFFF;
294
+ border-radius: 24rpx;
295
+ overflow: hidden;
296
+ &-title{
297
+ height: 110rpx;
298
+ line-height: 110rpx;
299
+ font-size: 36rpx;
300
+ font-weight: 500;
301
+ text-align: center;
302
+ color: #000000;
303
+ border-bottom: 1px solid #FAFAFA;
304
+ position: relative;
305
+ .line{
306
+ position: absolute;
307
+ left: 50%;
308
+ top: 50%;
309
+ transform: translate(-50%, -50%);
310
+ width: 280rpx;
311
+ height: 1px;
312
+ background-color: #000000;
313
+ }
314
+ ._text{
315
+ position: relative;
316
+ z-index: 10;
317
+ background-color: #fff;
318
+ padding: 0 24rpx;
319
+ }
320
+ }
321
+ .good_item{
322
+ padding: 32rpx 46rpx;
323
+ border-bottom: 1px solid #FAFAFA;
324
+ &:last-child{
325
+ border-bottom: none;
326
+ }
327
+ .good_title{
328
+ display: flex;
329
+ align-items: center;
330
+ font-size: 28rpx;
331
+ font-weight: 500;
332
+ color: #666666;
333
+
334
+ &-tag{
335
+ padding: 8rpx 16rpx;
336
+ border-radius: 8rpx;
337
+ font-size: 22rpx;
338
+ line-height: 1;
339
+ background: linear-gradient(90deg, #FCD083 0%, #FFDEAD 100%);
340
+ color: #915714;
341
+ margin-right: 16rpx;
342
+ }
343
+ }
344
+ .good_cont{
345
+ font-size: 28rpx;
346
+ color: #BBBBBB;
347
+ font-size: 400;
348
+ margin-top: 16rpx;
349
+ }
350
+ }
351
+ }
352
+ }
353
+ .drawer_title{
354
+ height: 100rpx;
355
+ line-height: 100rpx;
356
+ text-align: center;
357
+ font-size: 28rpx;
358
+ color: #333333;
359
+ font-weight: 500;
360
+ }
109
361
  }
110
362
  }
111
363
  </style>