jufubao-base 1.0.232-beta3 → 1.0.232-beta5

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 (41) 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/JfbBasePersonalData/JfbBasePersonalData.vue +98 -33
  19. package/src/components/JfbBasePointsCard/Attr.js +199 -24
  20. package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +209 -29
  21. package/src/components/JfbBasePointsDetail/Api.js +8 -43
  22. package/src/components/JfbBasePointsDetail/Attr.js +282 -26
  23. package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +139 -29
  24. package/src/components/JfbBaseRechargeOrder/Api.js +3 -13
  25. package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +16 -34
  26. package/src/components/JfbBaseShare/JfbBaseShare.vue +108 -2
  27. package/src/components/JfbBaseTfkSearch/Attr.js +8 -82
  28. package/src/components/JfbBaseUserInfo/Attr.js +102 -10
  29. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +301 -114
  30. package/src/components/JfbBaseWithDrawAgain/Api.js +58 -0
  31. package/src/components/JfbBaseWithDrawAgain/Attr.js +48 -0
  32. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +111 -0
  33. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +79 -0
  34. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +30 -0
  35. package/src/components/JfbBaseWithDrawAgain/Mock.js +13 -0
  36. package/src/components/JfbBaseWithDrawRecord/Api.js +58 -0
  37. package/src/components/JfbBaseWithDrawRecord/Attr.js +48 -0
  38. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +111 -0
  39. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +79 -0
  40. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +30 -0
  41. package/src/components/JfbBaseWithDrawRecord/Mock.js +13 -0
@@ -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: 'PLUS会员开通成功跳转路径:',
237
+ ele: 'xd-select-pages-path',
238
+ valueKey: 'vipSuccessPath',
41
239
  groupKey:'advanced',
42
- ele: 'slot', //package 名称
43
- slot: 'is_reference',
240
+ placeholder: '请选择PLUS会员开通成功跳转路径',
241
+ value: data['vipSuccessPath'] || null,
242
+ setting: {
243
+ router: XdBus.getParentApi('getPagesTree'),
244
+ },
245
+ inline: false,
44
246
  },
45
247
  ].filter(i=>i)
46
248
  },
@@ -13,14 +13,42 @@
13
13
  <view class="jfb-base-code-open-vip__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view class="jfb-base-code-open-vip__body">
17
- <view>测试插件( {{containerId}} )</view>
16
+ <view class="jfb-base-code-open-vip__body" :style="[bodyStyle]">
17
+ <view v-if="0" class="vip_panel">
18
+ <view class="combo_section">
19
+ <view class="code_input_wrap">
20
+ <input class="code_input" placeholder="请输入兑换码"></input>
21
+ </view>
22
+ </view>
23
+ <view class="combo_section">
24
+ <view class="desc_tit">文案描述</view>
25
+ <view class="desc_cont">文案内容</view>
26
+ </view>
27
+ <view class="fixed_bottom" :style="[fixed_bottom]">
28
+ <xd-button type="primary" width="600rpx">查询</xd-button>
29
+ <view class="plus_privacy">开通视为同意 <text @click.stop="handlePrivacy('privacy_service')"></text>《共享PLUS会员用户协议》</view>
30
+ </view>
31
+ </view>
32
+ <view v-else class="vip_panel">
33
+ <view class="combo_section">
34
+ <view class="combo_section-title">兑换码:12312983719283711</view>
35
+ <xd-list-item label="套餐名称" paddingLR="40rpx">¥125.00</xd-list-item>
36
+ <xd-list-item label="套餐期限" paddingLR="40rpx">30天</xd-list-item>
37
+ <xd-list-item label="套餐金额" paddingLR="40rpx">¥125.00</xd-list-item>
38
+ </view>
39
+ <view class="fixed_bottom" :style="[fixed_bottom]">
40
+ <xd-button type="primary" width="600rpx">立即兑换</xd-button>
41
+ <view class="plus_privacy">开通视为同意 <text @click.stop="handlePrivacy('privacy_service')"></text>《共享PLUS会员用户协议》</view>
42
+ </view>
43
+ </view>
18
44
  </view>
19
45
  </view>
20
46
  </template>
21
47
 
22
48
  <script>
23
49
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
50
+ import XdListItem from "@/components/CusListItem/CusListItem"
51
+ import XdButton from "@/components/XdButton/XdButton";
24
52
  import { jfbRootExec } from "@/utils/xd.event";
25
53
  import JfbBaseCodeOpenVipMixin from "./JfbBaseCodeOpenVipMixin";
26
54
  import { getContainerPropsValue } from "@/utils/xd.base";
@@ -29,17 +57,31 @@
29
57
  export default {
30
58
  name: "JfbBaseCodeOpenVip",
31
59
  components: {
32
- XdFontIcon
60
+ XdFontIcon,
61
+ XdListItem,
62
+ XdButton
33
63
  },
34
64
  mixins: [
35
65
  componentsMixins, extsMixins, JfbBaseCodeOpenVipMixin
36
66
  ],
37
67
  data() {
38
68
  return {
39
-
69
+ closeMask: true,
40
70
  //todo
71
+ vipSuccessPath: "",
41
72
  }
42
73
  },
74
+ computed: {
75
+ bodyStyle(){
76
+ return {
77
+ minHeight: this.layoutInfo.bodyMinHeightRpx + 'rpx',
78
+ '--main-color': this.mainColor,
79
+ }
80
+ },
81
+ fixed_bottom() {
82
+ return this.fixedStyle({paddingBottom: 36, zIndex: 111})
83
+ },
84
+ },
43
85
  watch: {
44
86
  container(value, oldValue) {
45
87
  if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
@@ -69,10 +111,14 @@
69
111
  * @param container {object} 业务组件对象自己
70
112
  */
71
113
  init(container) {
72
-
73
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
74
-
75
- //this.height = getContainerPropsValue(container, 'content.height', 10);
114
+ this.vipSuccessPath = getContainerPropsValue(container, 'content.vipSuccessPath', {value: ""}).value;
115
+ },
116
+ handlePrivacy(code){
117
+ let params = `page_id=${this.pageAttr["page_id"]}`;
118
+ params = `${params}&container_id=${this.containerId}${code}`;
119
+ this.$xdUniHelper.navigateTo({
120
+ url: `/pages/content/content?${params}`
121
+ })
76
122
  },
77
123
  onJfbScroll(options) {
78
124
  console.log('event.onJfbScroll', options)
@@ -105,7 +151,63 @@
105
151
 
106
152
  .jfb-base-code-open-vip {
107
153
  &__body{
108
-
154
+ .combo_section{
155
+ border-radius: 24rpx;
156
+ overflow: hidden;
157
+ margin: 20rpx;
158
+ background-color: #FFFFFF;
159
+ &-title{
160
+ height: 72rpx;
161
+ line-height: 72rpx;
162
+ text-align: center;
163
+ background: linear-gradient(90deg, #FCD083 0%, #FFDEAD 100%);
164
+ font-size: 28rpx;
165
+ color: #915714;
166
+ font-weight: 500;
167
+ }
168
+ ::v-deep .my-list_value{
169
+ color: #999999;
170
+ }
171
+ .desc_tit{
172
+ height: 72rpx;
173
+ line-height: 72rpx;
174
+ text-align: center;
175
+ }
176
+ .desc_cont{
177
+ height: 100rpx;
178
+ padding: 24rpx;
179
+ }
180
+ .code_input_wrap{
181
+ width: 100%;
182
+ padding: 36rpx;
183
+ box-sizing: border-box;
184
+ }
185
+ .code_input{
186
+ width: 100%;
187
+ height: 90rpx;
188
+ background-color: #FAFAFA;
189
+ box-sizing: border-box;
190
+ padding: 0 36rpx;
191
+ border-radius: 16rpx;
192
+ }
193
+ }
194
+ .fixed_bottom{
195
+ position: fixed;
196
+ bottom: 0;
197
+ left: 0;
198
+ width: 100%;
199
+ padding: 36rpx;
200
+ box-sizing: border-box;
201
+ background-color: #FFFFFF;
202
+ display: flex;
203
+ flex-direction: column;
204
+ align-items: center;
205
+ .plus_privacy{
206
+ font-size: 22rpx;
207
+ color: #999;
208
+ margin-top: 16rpx;
209
+ }
210
+ }
109
211
  }
110
212
  }
111
213
  </style>
@@ -8,39 +8,39 @@ 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: '请输入占位框背景颜色',
16
- groupKey:'content',
11
+ label: '开通路径:',
12
+ groupKey:'advanced',
13
+ className: 'input100',
14
+ ele: 'xd-select-pages-path',
15
+ valueKey: 'openPath',
16
+ value: data['openPath'] || null,
17
+ setting: {
18
+ router: XdBus.getParentApi('getPagesTree')
19
+ },
17
20
  },
18
21
  {
19
- label: '选中路径:',
22
+ label: '切换门店路径:',
20
23
  groupKey:'advanced',
21
24
  className: 'input100',
22
25
  ele: 'xd-select-pages-path',
23
- valueKey: 'select-pages-path',
24
- value: data['select-pages-path'] || null,
26
+ valueKey: 'shopPath',
27
+ value: data['shopPath'] || null,
25
28
  setting: {
26
29
  router: XdBus.getParentApi('getPagesTree')
27
30
  },
28
31
  },
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',
38
- },
39
32
  {
40
- label: '', //label
33
+ label: '支付成功跳转路径:',
34
+ ele: 'xd-select-pages-path',
35
+ valueKey: 'successPath',
36
+ value: data.successPath || null,
37
+ placeholder: '请选择支付成功跳转路径',
38
+ className: 'input100',
41
39
  groupKey:'advanced',
42
- ele: 'slot', //package 名称
43
- slot: 'is_reference',
40
+ setting: {
41
+ router: XdBus.getParentApi('getPagesTree')
42
+ },
43
+ inline: false,
44
44
  },
45
45
  ].filter(i=>i)
46
46
  },