jufubao-base 1.0.208 → 1.0.209-beta2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.208",
3
+ "version": "1.0.209-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -198,11 +198,11 @@ export default {
198
198
  },
199
199
  methods: {
200
200
  handleLabel(el){
201
- this.card_password_focus = false;
202
- this.card_number_focus = false;
203
- setTimeout(()=>{
204
- this[`${el}_focus`] = true;
205
- },50)
201
+ // this.card_password_focus = false;
202
+ // this.card_number_focus = false;
203
+ // setTimeout(()=>{
204
+ // this[`${el}_focus`] = true;
205
+ // },50)
206
206
  },
207
207
  handleIcon(){
208
208
  this.isPassword = !this.isPassword
@@ -280,7 +280,8 @@ export default {
280
280
  btn_txt: "",
281
281
  btn_style: {},
282
282
  btnTextSize: '',
283
- is_blank_page: 'Y'
283
+ is_blank_page: 'Y',
284
+ foreign_id: null
284
285
  };
285
286
  },
286
287
  computed: {
@@ -533,6 +534,7 @@ export default {
533
534
  namespace: this.pageBusinessCode,
534
535
  activity_id: this.activity_id,
535
536
  prize_id: item.prize_id,
537
+ foreign_id: this.foreign_id
536
538
  },
537
539
  })
538
540
  .then((res) => {
@@ -566,6 +568,7 @@ export default {
566
568
  distribution_method: this.method,
567
569
  namespace: this.pageBusinessCode,
568
570
  activity_id: this.activity_id,
571
+ foreign_id: this.foreign_id
569
572
  },
570
573
  })
571
574
  .then((res) => {
@@ -660,6 +663,7 @@ export default {
660
663
  console.log(this.pageBusinessCode, "pageNamespace");
661
664
  this.options = options;
662
665
  this.activity_id = options.activity_id;
666
+ this.foreign_id = options.foreign_id;
663
667
  this.method = options.distribution_method
664
668
  ? options.distribution_method
665
669
  : "entry";
@@ -291,7 +291,6 @@ export default {
291
291
  groupKey:'content',
292
292
  value: data['btnConfirmBgColor'] || '',
293
293
  placeholder: '请选择按钮背景颜色',
294
- groupKey: "content",
295
294
  },
296
295
  {
297
296
  label: "按钮文字颜色:",
@@ -50,4 +50,25 @@ module.exports = [
50
50
  isConsole: true,
51
51
  disabled: true,
52
52
  },
53
+ {
54
+ mapFnName: "cardRechargeNew",
55
+ title: "获取卡券套餐列表",
56
+ path: "/card/v1/new-card-recharge/create-order",
57
+ isRule: false,
58
+ data: {
59
+ package_id: ['套餐ID', "String", "必填"]
60
+ },
61
+ isConsole: true,
62
+ disabled: true
63
+ },
64
+ {
65
+ mapFnName: "cardRechargeList",
66
+ title: "卡券充值下单",
67
+ path: "/card/v1/new-card-recharge/list",
68
+ isRule: false,
69
+ params: {},
70
+ isConsole: true,
71
+ disabled: true
72
+ },
73
+
53
74
  ];
@@ -27,7 +27,6 @@ export default {
27
27
  placeholder: '请输入票券充值点数自定义文案',
28
28
  className: 'input80'
29
29
  },
30
-
31
30
  {
32
31
  label: '注意事项:',
33
32
  ele: 'xd-site-news',
@@ -14,43 +14,47 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-recharge__body">
17
- <view class="jfb-base-recharge__body-card">
18
- <view>
19
- <view class="jfb-base-recharge__body-form">
20
- <input v-model="cardNumber" :placeholder="card_num_placeholder" />
17
+ <view class="recharge">
18
+ <view class="recharge-list">
19
+ <view class="recharge-item">
20
+ <view class="jfb-base-recharge__body-card">
21
+ <view>
22
+ <view class="jfb-base-recharge__body-form">
23
+ <input v-model="cardNumber" :placeholder="card_num_placeholder" />
24
+ </view>
25
+ <view class="jfb-base-recharge__body-form">
26
+ <input v-model="card_point" :placeholder="point_placeholder" />
27
+ </view>
28
+ <view
29
+ v-if="amount && card_point"
30
+ :style="{
31
+ color: mainColor,
32
+ fontSize: '24rpx',
33
+ paddingBottom: '32rpx',
34
+ }"
35
+ >支付金额:{{ amount }} 元</view>
36
+ <xd-button
37
+ size="medium"
38
+ type="primary"
39
+ :bgColor="mainColor"
40
+ @click="handleToRecharge"
41
+ :disabled="!amount || !card_point || !cardNumber"
42
+ >提交</xd-button>
43
+ </view>
44
+ </view>
21
45
  </view>
22
- <view class="jfb-base-recharge__body-form">
23
- <input v-model="card_point" :placeholder="point_placeholder" />
24
- </view>
25
- <view
26
- v-if="amount&&card_point"
27
- :style="{
28
- color: mainColor,
29
- fontSize: '24rpx',
30
- paddingBottom: '32rpx',
31
- }"
32
- >
33
- 支付金额:{{ amount }} 元
34
- </view>
35
- <xd-button
36
- size="medium"
37
- type="primary"
38
- :bgColor="mainColor"
39
- @click="handleToRecharge"
40
- :disabled="!amount || !card_point || !cardNumber"
41
- >提交</xd-button>
42
46
  </view>
47
+ <view class="xd-notice-content" v-if="content">
48
+ <view>注意事项:</view>
49
+ <view v-html="content" class="prod_info"></view>
50
+ </view>
51
+ <view
52
+ v-if="isPreview && statusContent === true && content === '' "
53
+ class="xd-notice"
54
+ :style="{ color: dangerColor,fontSize: 24 + 'rpx',backgroundColor:noticeBgc }"
55
+ >注意事项未配置数据,因此改模块在正式环境将不显示</view>
56
+ <view class="bottom_btn-mask"></view>
43
57
  </view>
44
- <view class="xd-notice-content" v-if="content">
45
- <view>注意事项:</view>
46
- <view v-html="content" class="prod_info"></view>
47
- </view>
48
- <view
49
- v-if="isPreview && statusContent === true && content === '' "
50
- class="xd-notice"
51
- :style="{ color: dangerColor,fontSize: 24 + 'rpx',backgroundColor:noticeBgc }"
52
- >注意事项未配置数据,因此改模块在正式环境将不显示</view>
53
- <view class="bottom_btn-mask"></view>
54
58
  </view>
55
59
  </view>
56
60
  </template>
@@ -58,24 +62,27 @@
58
62
  <script>
59
63
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
60
64
  import XdButton from "@/components/XdButton/XdButton";
65
+ import XdUnit from "@/components/XdUnit/XdUnit.vue";
61
66
  import { jfbRootExec } from "@/utils/xd.event";
62
67
  import JfbBaseRechargeMixin from "./JfbBaseRechargeMixin";
63
68
  import { getContainerPropsValue } from "@/utils/xd.base";
64
69
  import componentsMixins from "@/mixins/componentsMixins";
65
70
  import extsMixins from "@/mixins/extsMixins";
66
71
  import Color from "color";
72
+ import getServiceUrl from "@/common/getServiceUrl";
67
73
  export default {
68
74
  name: "JfbBaseRecharge",
69
75
  components: {
70
76
  XdFontIcon,
71
77
  XdButton,
78
+ XdUnit
72
79
  },
73
80
  mixins: [componentsMixins, extsMixins, JfbBaseRechargeMixin],
74
81
  data() {
75
82
  return {
83
+ closeMask: true,
76
84
  card_num_placeholder: "",
77
85
  point_placeholder: "",
78
-
79
86
  cardNumber: "",
80
87
  card_point: "",
81
88
  payPath: "",
@@ -117,20 +124,12 @@ export default {
117
124
  * @param container {object} 业务组件对象自己
118
125
  */
119
126
  init(container) {
120
- this.card_num_placeholder = getContainerPropsValue(
121
- this.container,
122
- "content.card_num_placeholder",
123
- "输入券号"
124
- );
125
- this.point_placeholder = getContainerPropsValue(
126
- this.container,
127
- "content.point_placeholder",
128
- "充值点数"
129
- );
130
- this.payPath = getContainerPropsValue(container, "content.payPath", {
131
- value: "",
132
- }).value;
127
+ this.card_num_placeholder = getContainerPropsValue(this.container, "content.card_num_placeholder", "输入券号");
128
+ this.point_placeholder = getContainerPropsValue(this.container, "content.point_placeholder", "充值点数");
129
+ this.payPath = getContainerPropsValue(container, "content.payPath", {value: "",}).value;
133
130
  },
131
+
132
+
134
133
  getContent() {
135
134
  jfbRootExec("getListRechargeNewsContent", {
136
135
  vm: this,
@@ -149,6 +148,13 @@ export default {
149
148
  console.error(error);
150
149
  });
151
150
  },
151
+
152
+ toLink(pay_order_id, order_id){
153
+ this.$xdUniHelper.redirectTo({
154
+ url: `${this.payPath}?order_id=${pay_order_id}&main_order_id=${order_id}&type=recharge`,
155
+ }, false, true);
156
+ },
157
+
152
158
  handleToRecharge() {
153
159
  if (!this.cardNumber) {
154
160
  this.$xdAlert({ content: "请输入卡券号" });
@@ -158,7 +164,12 @@ export default {
158
164
  this.$xdAlert({ content: "请输入充值点数" });
159
165
  return;
160
166
  }
161
- // this.$xdShowLoading({})
167
+
168
+ if( this.$configProject.isPreview) {
169
+ return;
170
+ }
171
+
172
+ this.$xdShowLoading({});
162
173
  jfbRootExec("cardRecharge", {
163
174
  vm: this,
164
175
  data: {
@@ -168,41 +179,47 @@ export default {
168
179
  })
169
180
  .then((res) => {
170
181
  this.$xdHideLoading();
171
- this.$xdUniHelper.navigateTo({
172
- url: `${this.payPath}?order_id=${res.pay_order_id}&main_order_id=${res.order_id}&type=recharge`,
173
- });
182
+ this.toLink(res.pay_order_id, res.order_id)
174
183
  })
175
184
  .catch((err) => {
176
185
  this.$xdHideLoading();
177
186
  console.log(err, "err");
178
187
  });
179
188
  },
189
+
180
190
  handleGetPrice(e) {
191
+ //未填写值
181
192
  if (!this.cardNumber || !this.card_point) {
182
193
  return;
183
194
  }
184
- this.$xdShowLoading({});
195
+
196
+ //预览模式
197
+ if( this.$configProject.isPreview) {
198
+ this.amount = this.card_point;
199
+ return;
200
+ }
201
+
185
202
  jfbRootExec("getRechargeAmount", {
186
203
  vm: this,
187
204
  data: {
188
205
  card_number: this.cardNumber, //页面ID
189
- card_point: this.card_point * 100, //组件ID
206
+ card_point: this.$xdUniHelper.multiplyFloatNumber(Number(this.card_point),100), //组件ID
190
207
  },
191
208
  })
192
209
  .then((res) => {
193
- this.$xdHideLoading();
194
- this.amount = res.amount / 100;
210
+ this.amount = this.$xdUniHelper.divisionFloatNumber(res.amount ,100);
195
211
  })
196
212
  .catch((err) => {
197
- this.$xdHideLoading();
198
213
  });
199
214
  },
215
+
200
216
  onJfbUpdate(data) {
201
- this.getContent();
202
- },
203
- onJfbScroll(options) {
204
- console.log("event.onJfbScroll", options);
217
+ if( this.$configProject.isPreview) {
218
+ this.getContent();
219
+ }
220
+
205
221
  },
222
+
206
223
  onJfbShow(options) {
207
224
  this.onJfbLoad(options);
208
225
  },
@@ -219,17 +236,16 @@ export default {
219
236
  .jfb-base-recharge {
220
237
  &__body {
221
238
  &-card {
222
- box-shadow: 0px unit(16, rpx) unit(60, rpx) 0px rgba(227, 227, 227, 0.37);
223
- background: #ffffff;
224
- padding: unit(48, rpx);
225
- margin: unit(40, rpx);
239
+ box-shadow: 0 unit(16, rpx) unit(60, rpx) 0 rgba(227, 227, 227, 0.37);
226
240
  border-radius: unit(20, rpx);
241
+ background: #fff;
242
+ padding: 30rpx;
227
243
  }
228
244
  &-form {
229
245
  input {
230
246
  background: #eeeeee;
231
247
  border-radius: unit(16, rpx);
232
- padding: unit(30, rpx) unit(40, rpx);
248
+ padding: unit(30, rpx);
233
249
  margin-bottom: unit(30, rpx);
234
250
  }
235
251
  }
@@ -258,10 +274,96 @@ export default {
258
274
  }
259
275
  }
260
276
  .xd-notice {
261
- margin-top: unit(20, rpx);
277
+ margin-top: unit(40, rpx);
262
278
  padding: unit(40, rpx);
263
279
  border-radius: unit(15, rpx)
264
280
  }
265
281
  }
266
282
  }
283
+
284
+ .recharge {
285
+ padding: 30rpx;
286
+
287
+ &-tab {
288
+ height: 100rpx;
289
+ margin-bottom: 15rpx;
290
+ display:flex;
291
+ justify-content: flex-start;
292
+ align-items: center;
293
+ & > view {
294
+ margin: 0 50rpx 0 0;
295
+ font-size: 32rpx;
296
+ position: relative;
297
+ height: 100%;
298
+ line-height: 100rpx;
299
+ cursor: pointer;
300
+ }
301
+
302
+ &-index {
303
+ height: 6rpx;
304
+ overflow: hidden;
305
+ border-radius: 4rpx;
306
+ position: absolute;
307
+ left: 0;
308
+ right: 0;
309
+ bottom: 16rpx;
310
+ }
311
+ }
312
+
313
+ .recharge-pack {
314
+ height: 330rpx;
315
+ background-position: top left;
316
+ background-size: 100% 100%;
317
+ background-repeat: no-repeat;
318
+ color: #fff;
319
+ padding: 30rpx;
320
+ box-sizing: border-box;
321
+ border-radius: 16rpx;
322
+ margin-bottom: 30rpx;
323
+ &:last-child {
324
+ margin-bottom: 0;
325
+ }
326
+
327
+ & .name {
328
+ font-size: 32rpx;
329
+ font-weight: 500;
330
+ }
331
+
332
+ & .price {
333
+ font-size: 28rpx;
334
+ font-weight: 400;
335
+ padding: 20rpx 0 10rpx;
336
+ }
337
+
338
+ & .time {
339
+ font-size: 28rpx;
340
+ font-weight: 400;
341
+ }
342
+
343
+ & .line {
344
+ margin: 20rpx 0;
345
+ height: 2rpx;
346
+ background: rgba(255,255,255,.2);
347
+ }
348
+
349
+ & .buy {
350
+ display: flex;
351
+ justify-content: space-between;
352
+ align-items: center;
353
+
354
+ & > view:nth-child(2) {
355
+ height: 60rpx;
356
+ min-width: 120rpx;
357
+ text-align: center;
358
+ border-radius: 40rpx;
359
+ line-height: 60rpx;
360
+ border: 4rpx solid #fff;
361
+ padding: 0 25rpx;
362
+ font-size: 28rpx;
363
+
364
+ }
365
+ }
366
+
367
+ }
368
+ }
267
369
  </style>
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description API模型
5
+ * 建议:Ffff=>模块 Xxxx=>自定义名字
6
+ * 获取单记录(getByIdFfffXxxx)
7
+ * 获取列表记录(getByListFfffXxxx)
8
+ * 添加列表记录(addFfffXxxxx)
9
+ * 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
10
+ * 更新列表记录(updateFfffXxxxx)
11
+ * @type {*[]}
12
+ */
13
+ module.exports = [
14
+ {
15
+ mapFnName: "cardRechargeNew",
16
+ title: "获取卡券套餐列表",
17
+ path: "/card/v1/new-card-recharge/create-order",
18
+ isRule: false,
19
+ data: {
20
+ package_id: ['套餐ID', "String", "必填"]
21
+ },
22
+ isConsole: true,
23
+ disabled: true
24
+ },
25
+ {
26
+ mapFnName: "cardRechargeList",
27
+ title: "卡券充值下单",
28
+ path: "/card/v1/new-card-recharge/list",
29
+ isRule: false,
30
+ params: {},
31
+ isConsole: true,
32
+ disabled: true
33
+ },
34
+
35
+ ];
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: (data) => {
9
+ return [
10
+ 0&&{
11
+ label: '立即购买自定义文案:',
12
+ ele: 'el-input',
13
+ type: 'text',
14
+ valueKey: 'buyBtnName',
15
+ groupKey:'content',
16
+ value: data.buyBtnName || '',
17
+ placeholder: '请输入立即购买自定义文案',
18
+ className: 'input80'
19
+ },
20
+ {
21
+ label: '票券支付路径:',
22
+ ele: 'xd-select-pages-path',
23
+ valueKey: 'payPath',
24
+ groupKey:'advanced',
25
+ placeholder: '请选择票券支付路径',
26
+ value: data['payPath'] || {},
27
+ setting: {
28
+ router: XdBus.getParentApi('getPagesTree'),
29
+ },
30
+ inline: false,
31
+ },
32
+ ].filter(i=>i)
33
+ },
34
+ advanced: [ ],
35
+ };
@@ -0,0 +1,285 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-recharge-new"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx: isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-recharge-new__edit"
10
+ :class="{ editx: isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-recharge-new__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-recharge-new__body">
17
+ <view class="recharge">
18
+ <view class="recharge-list">
19
+ <view class="recharge-item">
20
+ <view
21
+ class="recharge-pack"
22
+ v-for="item in newCardList"
23
+ :key="item.package_id"
24
+ :style="{
25
+ backgroundImage: 'url('+ item['package_image'] +')',
26
+ color: item['package_color'] ? item['package_color']:'#fff'
27
+ }"
28
+ >
29
+ <view class="name">{{item.package_name}}</view>
30
+ <view class="price">面值:{{item.card_point}}</view>
31
+ <view class="time">有效期:{{item['valid_date']}}</view>
32
+ <view class="line"></view>
33
+ <view class="buy">
34
+ <view>
35
+ <xd-unit
36
+ :is-old="false"
37
+ :price="item.card_amount"
38
+ :color-new="item['package_color'] ? item['package_color']:'#fff'"
39
+ :font-size="40"
40
+ :icon-size=".3"
41
+ ></xd-unit>
42
+ </view>
43
+ <view @click="handleNewBuy(item)">{{buyBtnName}}</view>
44
+ </view>
45
+ </view>
46
+ </view>
47
+ </view>
48
+ </view>
49
+ </view>
50
+ </view>
51
+ </template>
52
+
53
+ <script>
54
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
55
+ import XdButton from "@/components/XdButton/XdButton";
56
+ import XdUnit from "@/components/XdUnit/XdUnit.vue";
57
+ import { jfbRootExec } from "@/utils/xd.event";
58
+ import JfbBaseRechargeNewMixin from "./JfbBaseRechargeNewMixin";
59
+ import { getContainerPropsValue } from "@/utils/xd.base";
60
+ import componentsMixins from "@/mixins/componentsMixins";
61
+ import extsMixins from "@/mixins/extsMixins";
62
+ import Color from "color";
63
+ import getServiceUrl from "@/common/getServiceUrl";
64
+ export default {
65
+ name: "JfbBaseRechargeNew",
66
+ components: {
67
+ XdFontIcon,
68
+ XdButton,
69
+ XdUnit
70
+ },
71
+ mixins: [componentsMixins, extsMixins, JfbBaseRechargeNewMixin],
72
+ data() {
73
+ return {
74
+ closeMask: true,
75
+ isPreview: false,
76
+ buyBtnName: '立即购买' ,
77
+ newCardList:[],
78
+ };
79
+ },
80
+ watch: {
81
+ container(value,oldValue) {
82
+ if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
83
+ if (this.$configProject['isPreview']) this.init(value)
84
+ },
85
+ },
86
+ created() {
87
+ this.isPreview = this.$configProject.isPreview;
88
+ this.init(this.container);
89
+ },
90
+ methods: {
91
+ onJfbLoad(options) {
92
+ this.getNewCardList();
93
+ },
94
+ /**
95
+ * @description 监听事件变化
96
+ * @param container {object} 业务组件对象自己
97
+ */
98
+ init(container) {
99
+ this.payPath = getContainerPropsValue(container, "content.payPath", {value: "",}).value;
100
+ this.buyBtnName = getContainerPropsValue(container, 'content.buyBtnName', '立即购买')
101
+ },
102
+
103
+ //==套餐购买=============
104
+ /**
105
+ * @description 获取套餐列表
106
+ */
107
+ getNewCardList(){
108
+ jfbRootExec("cardRechargeList", {
109
+ vm: this,
110
+ data: {},
111
+ })
112
+ .then((res) => {
113
+ this.newCardList = (res.list || []).map(item=>{
114
+ item['package_image'] = getServiceUrl(item['package_image']);
115
+ item['card_point'] = `${this.$xdUniHelper.divisionFloatNumber(item['card_point'],100)}`
116
+ if(item['card_unit']){
117
+ item['card_point'] = `${item['card_point']} ${item['card_unit']}`
118
+ }
119
+ return item;
120
+ });
121
+ })
122
+ .catch((error) => {
123
+ console.error(error);
124
+ });
125
+ },
126
+
127
+ handleNewBuy(item){
128
+ this.$xdShowLoading({});
129
+ jfbRootExec("cardRechargeNew", {
130
+ vm: this,
131
+ data: {
132
+ package_id: item.package_id,
133
+ },
134
+ })
135
+ .then((res) => {
136
+ this.$xdHideLoading();
137
+ this.toLink(res.pay_order_id, res.order_id)
138
+ })
139
+ .catch((err) => {
140
+ this.$xdHideLoading();
141
+ console.log(err, "err");
142
+ });
143
+
144
+ },
145
+ //==套餐购买=============
146
+
147
+ getContent() {
148
+ jfbRootExec("getListRechargeNewsContent", {
149
+ vm: this,
150
+ data: {
151
+ page_id: this.pageAttr["page_id"], //页面ID
152
+ container_id: this.containerId, //组件ID
153
+ },
154
+ })
155
+ .then((res) => {
156
+ if(res && res.list && res.list.length > 0) {
157
+ this.content = res.list[0].content;
158
+ }
159
+ this.statusContent = true;
160
+ })
161
+ .catch((error) => {
162
+ console.error(error);
163
+ });
164
+ },
165
+
166
+ toLink(pay_order_id, order_id){
167
+ if(!this.payPath) {
168
+ this.$xdAlert({
169
+ time: 3000,
170
+ content: '支付路径未设置,清检查配置',
171
+ type: 'error',
172
+ isClose: false
173
+ })
174
+ return;
175
+ }
176
+ this.$xdUniHelper.redirectTo({
177
+ url: `${this.payPath}?order_id=${pay_order_id}&main_order_id=${order_id}&type=recharge`,
178
+ }, false, true);
179
+ },
180
+
181
+ onJfbShow(options) {
182
+ this.onJfbLoad(options);
183
+ },
184
+ onJfbCustomEvent(options) {
185
+ console.log("event.onJfbReachBottom", options);
186
+ },
187
+ },
188
+ };
189
+ </script>
190
+
191
+ <style scoped lang="less">
192
+ @import "./JfbBaseRechargeNewLess.less";
193
+
194
+ .jfb-base-recharge-new {
195
+ &__body {
196
+ .recharge {
197
+ padding: 30rpx;
198
+
199
+ &-tab {
200
+ height: 100rpx;
201
+ margin-bottom: 15rpx;
202
+ display:flex;
203
+ justify-content: flex-start;
204
+ align-items: center;
205
+ & > view {
206
+ margin: 0 50rpx 0 0;
207
+ font-size: 32rpx;
208
+ position: relative;
209
+ height: 100%;
210
+ line-height: 100rpx;
211
+ cursor: pointer;
212
+ }
213
+
214
+ &-index {
215
+ height: 6rpx;
216
+ overflow: hidden;
217
+ border-radius: 4rpx;
218
+ position: absolute;
219
+ left: 0;
220
+ right: 0;
221
+ bottom: 16rpx;
222
+ }
223
+ }
224
+
225
+ .recharge-pack {
226
+ height: 330rpx;
227
+ background-position: top left;
228
+ background-size: 100% 100%;
229
+ background-repeat: no-repeat;
230
+ color: #fff;
231
+ padding: 30rpx;
232
+ box-sizing: border-box;
233
+ border-radius: 16rpx;
234
+ margin-bottom: 30rpx;
235
+ &:last-child {
236
+ margin-bottom: 0;
237
+ }
238
+
239
+ & .name {
240
+ font-size: 32rpx;
241
+ font-weight: 500;
242
+ }
243
+
244
+ & .price {
245
+ font-size: 28rpx;
246
+ font-weight: 400;
247
+ padding: 20rpx 0 10rpx;
248
+ }
249
+
250
+ & .time {
251
+ font-size: 28rpx;
252
+ font-weight: 400;
253
+ }
254
+
255
+ & .line {
256
+ margin: 20rpx 0;
257
+ height: 2rpx;
258
+ background: rgba(255,255,255,.2);
259
+ }
260
+
261
+ & .buy {
262
+ display: flex;
263
+ justify-content: space-between;
264
+ align-items: center;
265
+
266
+ & > view:nth-child(2) {
267
+ height: 60rpx;
268
+ min-width: 120rpx;
269
+ text-align: center;
270
+ border-radius: 40rpx;
271
+ line-height: 60rpx;
272
+ border: 4rpx solid #fff;
273
+ padding: 0 25rpx;
274
+ font-size: 28rpx;
275
+
276
+ }
277
+ }
278
+
279
+ }
280
+ }
281
+ }
282
+ }
283
+
284
+
285
+ </style>
@@ -0,0 +1,79 @@
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-recharge-new {
16
+ box-sizing: border-box;
17
+
18
+ &__body{
19
+ position: relative;
20
+ overflow: hidden;
21
+ z-index: 2
22
+ }
23
+
24
+ &.editx,&.editx:hover {
25
+ position: relative;
26
+ min-height: unit(100, rpx);
27
+ z-index: 3;
28
+ &::after {
29
+ border: 2rpx dashed blue;
30
+ content: " ";
31
+ position: absolute;
32
+ top:0;
33
+ left:0;
34
+ bottom:0;
35
+ right:0;
36
+ z-index: 4;
37
+ cursor: pointer;
38
+ }
39
+
40
+ }
41
+
42
+
43
+ &__edit {
44
+ cursor: pointer;
45
+ position: absolute;
46
+ right: unit(0, rpx);
47
+ top: unit(-52, rpx);
48
+ height: unit(50, rpx);
49
+ line-height: unit(50, rpx);
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background: rgba(0, 0, 0, .6);
54
+ border-radius: unit(10, rpx);
55
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
56
+ color: #fff;
57
+ font-size: unit(22, rpx);
58
+
59
+ &-icon{
60
+ padding: 0 unit(20, rpx);
61
+ }
62
+
63
+ &.editx {
64
+ box-sizing: border-box;
65
+
66
+ }
67
+ }
68
+ }
69
+ //end
70
+
71
+
72
+ /**notPreview**/
73
+ .jfb-base-recharge-new {
74
+ //&:before {
75
+ //content: " ";
76
+ //display: table;
77
+ //}
78
+ }
79
+ /**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-recharge-new'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ cardRecharge: {"amount":10000,"request_id":"1d4ab6e96e7fd54d"}
5
+ }