jufubao-base 1.0.232-beta4 → 1.0.232-beta6

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 (46) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseBalance/Api.js +18 -30
  3. package/src/components/JfbBaseBalance/Attr.js +292 -24
  4. package/src/components/JfbBaseBalance/JfbBaseBalance.vue +250 -32
  5. package/src/components/JfbBaseCodeOpenVip/Api.js +17 -39
  6. package/src/components/JfbBaseCodeOpenVip/Attr.js +19 -0
  7. package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +54 -25
  8. package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +2 -2
  9. package/src/components/JfbBaseOpenVip/Api.js +11 -40
  10. package/src/components/JfbBaseOpenVip/Attr.js +4 -4
  11. package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +69 -26
  12. package/src/components/JfbBaseOpenVip/Mock.js +16 -9
  13. package/src/components/JfbBaseOpenVip/XdVipList.vue +44 -6
  14. package/src/components/JfbBaseOpenVipDetail/Api.js +17 -39
  15. package/src/components/JfbBaseOpenVipDetail/Attr.js +16 -27
  16. package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +110 -25
  17. package/src/components/JfbBasePersonalData/Api.js +9 -41
  18. package/src/components/JfbBasePersonalData/Attr.js +1 -37
  19. package/src/components/JfbBasePersonalData/JfbBasePersonalData.vue +119 -32
  20. package/src/components/JfbBasePointsCard/Api.js +4 -44
  21. package/src/components/JfbBasePointsCard/Attr.js +0 -48
  22. package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +24 -107
  23. package/src/components/JfbBasePointsCard/Mock.js +1 -9
  24. package/src/components/JfbBasePointsDetail/Api.js +25 -0
  25. package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +65 -20
  26. package/src/components/JfbBasePointsDetail/Mock.js +2 -8
  27. package/src/components/JfbBaseSavingDetail/Api.js +12 -29
  28. package/src/components/JfbBaseSavingDetail/Attr.js +44 -22
  29. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +593 -29
  30. package/src/components/JfbBaseSavingDetail/components/echarts.min.js +26 -0
  31. package/src/components/JfbBaseSavingDetail/components/echarts.vue +254 -0
  32. package/src/components/JfbBaseSavingDetail/components/wx-canvas.js +105 -0
  33. package/src/components/JfbBaseShare/Api.js +5 -43
  34. package/src/components/JfbBaseShare/JfbBaseShare.vue +14 -13
  35. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +1 -20
  36. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +5 -0
  37. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +6 -2
  38. package/src/components/JfbBaseWithDrawAgain/Api.js +13 -30
  39. package/src/components/JfbBaseWithDrawAgain/Attr.js +70 -26
  40. package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +255 -32
  41. package/src/components/JfbBaseWithDrawRecord/Api.js +4 -43
  42. package/src/components/JfbBaseWithDrawRecord/Attr.js +56 -25
  43. package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +151 -34
  44. package/src/components/JfbBaseWithdraw/Api.js +20 -30
  45. package/src/components/JfbBaseWithdraw/Attr.js +304 -24
  46. package/src/components/JfbBaseWithdraw/JfbBaseWithdraw.vue +166 -32
@@ -1,26 +1,35 @@
1
1
  <template>
2
- <view
3
- class="jfb-base-withdraw"
4
- @click="handleEditxSelect"
5
- :class="{ editx : isEditx && active }"
6
- >
2
+ <view class="jfb-base-withdraw" @click="handleEditxSelect" :class="{ editx : isEditx && active }">
7
3
  <!--#ifdef H5-->
8
- <view
9
- class="jfb-base-withdraw__edit"
10
- :class="{ editx : isEditx && active }"
11
- v-if="isEditx && active"
12
- >
4
+ <view class="jfb-base-withdraw__edit" :class="{ editx : isEditx && active }" v-if="isEditx && active">
13
5
  <view class="jfb-base-withdraw__edit-icon" @click="delEdit">删除</view>
14
6
  </view>
15
7
  <!-- #endif -->
16
- <view class="jfb-base-withdraw__body">
17
- <view>测试插件( {{containerId}} )</view>
8
+ <view class="jfb-base-withdraw__body" :style="{minHeight: layoutInfo.bodyMinHeight}">
9
+ <view :style="[bodyStyleComp]">
10
+ <view class="jfb-base-withdraw__body-title">
11
+ <view>提现金额</view>
12
+ <view @click="handleAllWithDraw">全部提现</view>
13
+ </view>
14
+ <input class="jfb-base-withdraw__body-amount" v-model="amount"></input>
15
+ <view class="jfb-base-withdraw__body-balance">可提现余额¥{{getAmout(balance)}}</view>
16
+ </view>
17
+ <view v-if="notice" :style="[bodyStyleComp]">
18
+ <XdContentXss v-html="notice"></XdContentXss>
19
+ </view>
20
+ <view class="fixe_bottom" :style="prod_bottom">
21
+ <XdButton v-if="amount>0" fontSize="32" type="primary" @click="handleWithDraw">提现</XdButton>
22
+ <XdButton v-else disabled fontSize="32" type="primary">提现</XdButton>
23
+ <view @click="handleToWithDrawRecord">提现记录</view>
24
+ </view>
18
25
  </view>
19
26
  </view>
20
27
  </template>
21
28
 
22
29
  <script>
23
30
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
31
+ import XdButton from "@/components/XdButton/XdButton";
32
+ import XdContentXss from '@/components/XdContentXss/XdContentXss';
24
33
  import { jfbRootExec } from "@/utils/xd.event";
25
34
  import JfbBaseWithdrawMixin from "./JfbBaseWithdrawMixin";
26
35
  import { getContainerPropsValue } from "@/utils/xd.base";
@@ -29,17 +38,44 @@
29
38
  export default {
30
39
  name: "JfbBaseWithdraw",
31
40
  components: {
32
- XdFontIcon
41
+ XdFontIcon,
42
+ XdButton,
43
+ XdContentXss,
33
44
  },
34
45
  mixins: [
35
46
  componentsMixins, extsMixins, JfbBaseWithdrawMixin
36
47
  ],
37
48
  data() {
38
49
  return {
39
-
40
- //todo
50
+ radius: 0,
51
+ margin: {},
52
+ padding: {},
53
+ bgColor: '',
54
+ bodyBorder: {},
55
+ notice: '',
56
+ withDrawRecordPath: '',
57
+ withDrawPath: '',
58
+ balance: 0,
59
+ amount: 0,
60
+ showSuccess: false,
61
+ method: '',
62
+ wallet_type: ''
41
63
  }
42
64
  },
65
+ computed: {
66
+ bodyStyleComp() {
67
+ return {
68
+ borderRadius: `${this.radius}rpx`,
69
+ margin: this.getMarginAndPadding(this.margin, 20),
70
+ padding: this.getMarginAndPadding(this.padding, 40),
71
+ background: this.bgColor,
72
+ border: this.bodyBorder,
73
+ }
74
+ },
75
+ prod_bottom() {
76
+ return this.fixedStyle({ height: 0, zIndex: 111, paddingBottom: 70 });
77
+ },
78
+ },
43
79
  watch: {
44
80
  container(value, oldValue) {
45
81
  if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
@@ -48,31 +84,86 @@
48
84
  },
49
85
  created() {
50
86
  this.init(this.container);
51
-
52
- //todo
53
87
  },
54
88
  methods: {
55
89
  onJfbLoad(options) {
56
-
57
- // jfbRootExec('baiduUserLogin', {
58
-
59
- // vm: this,// data: {
60
-
61
- // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
62
-
63
- // }
64
-
65
- // }).then().catch()
90
+ this.method = options.method
91
+ this.wallet_type = options.wallet_type
92
+ this.getContent()
93
+ this.getDetail()
66
94
  },
67
95
  /**
68
96
  * @description 监听事件变化
69
97
  * @param container {object} 业务组件对象自己
70
98
  */
71
99
  init(container) {
100
+ this.radius = getContainerPropsValue(container, 'content.radius', 20);
101
+ this.margin = getContainerPropsValue(container, 'content.bodyMargin', {});
102
+ this.padding = getContainerPropsValue(container, 'content.bodyPadding', {});
103
+ this.bgColor = getContainerPropsValue(container, 'content.bgColor', '#fff');
104
+ this.bodyBorder = this.getXdBorder({}, getContainerPropsValue(container, 'content.bodyBorder', {}))
105
+ this.withDrawRecordPath = getContainerPropsValue(container, 'content.withDrawRecordPath', { value: '' }).value;
106
+ this.withDrawPath = getContainerPropsValue(container, 'content.withDrawPath', { value: '' }).value;
107
+ },
108
+ getAmout(amount) {
109
+ return this.$xdUniHelper.divisionFloatNumber(amount, 100)
110
+ },
111
+ getDetail() {
112
+ jfbRootExec("getWithDrawDetail", {
113
+ vm: this,
114
+ data: {
115
+ method: this.method
116
+ },
117
+ }).then(res => {
118
+ this.balance = res.wallet_list.find(item => item.wallet_type === this.wallet_type).amount
119
+ }).catch(err => {
120
+ console.log(err, 'err');
72
121
 
73
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
74
-
75
- //this.height = getContainerPropsValue(container, 'content.height', 10);
122
+ })
123
+ },
124
+ getContent() {
125
+ jfbRootExec("getListBaseNewsContent", {
126
+ vm: this,
127
+ data: {
128
+ page_id: this.pageAttr["page_id"], //页面ID
129
+ container_id: this.containerId, //组件ID
130
+ limit: 1,
131
+ },
132
+ })
133
+ .then((res) => {
134
+ if (res.list.length > 0) {
135
+ if (res.list && res.list.length > 0) {
136
+ this.notice = this.$xdUniHelper.filterHtml(res.list[0].content);
137
+ }
138
+ this.noticeStatus = true;
139
+ }
140
+ })
141
+ .catch((error) => {
142
+ console.error(error);
143
+ });
144
+ },
145
+ handleAllWithDraw() {
146
+ this.amount = this.getAmout(this.balance);
147
+ },
148
+ handleWithDraw() {
149
+ console.log(this.projectAttr, 'this.projectAttr');
150
+ jfbRootExec("createWithdraw", {
151
+ vm: this,
152
+ data: {
153
+ wallet_type: this.wallet_type,
154
+ total_amount: this.amount * 100,
155
+ login_providers: this.projectAttr.login_providers.join(),
156
+ pay_channel_providers: this.projectAttr.pay_channels.join()
157
+ },
158
+ }).then(res => {
159
+ this.$xdUniHelper.navigateTo({ url: `${this.withDrawPath}?order_id=${res.order_id}` })
160
+ })
161
+ },
162
+ handleToWithDrawRecord() {
163
+ this.$xdUniHelper.navigateTo({ url: this.withDrawRecordPath })
164
+ },
165
+ handleWithDrawSuccess() {
166
+ this.showSuccess = false;
76
167
  },
77
168
  onJfbScroll(options) {
78
169
  console.log('event.onJfbScroll', options)
@@ -104,8 +195,51 @@
104
195
  @import "./JfbBaseWithdrawLess.less";
105
196
 
106
197
  .jfb-base-withdraw {
107
- &__body{
198
+ &__body {
199
+ &-title {
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: space-between;
203
+ font-size: 24rpx;
204
+
205
+ &>view:first-child {
206
+ color: #999999;
207
+ }
208
+
209
+ &>view:last-child {
210
+ color: #666666;
211
+ }
212
+ }
108
213
 
214
+ &-amount {
215
+ color: #333;
216
+ font-size: 64rpx;
217
+ font-weight: 500;
218
+ margin: 20rpx 0;
219
+ border-bottom: 0.5px solid #EEEEEE;
220
+ }
221
+
222
+ &-balance {
223
+ font-size: 28rpx;
224
+ color: #999999;
225
+ }
226
+
227
+ .fixe_bottom {
228
+ position: fixed;
229
+ left: 0;
230
+ right: 0;
231
+ bottom: 0;
232
+ z-index: 999;
233
+ background: #fff;
234
+ padding: unit(48, rpx) unit(70, rpx);
235
+
236
+ &>view {
237
+ text-align: center;
238
+ font-size: 28rpx;
239
+ color: #999;
240
+ margin-top: 48rpx;
241
+ }
242
+ }
109
243
  }
110
244
  }
111
- </style>
245
+ </style>