jufubao-base 1.0.294 → 1.0.295-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
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<xd-list-item label="套餐金额" paddingLR="40rpx">¥{{ $xdUniHelper.divisionFloatNumber(vipInfo.sale_price, 100) }}</xd-list-item>
|
|
40
40
|
</view>
|
|
41
41
|
<view class="fixed_bottom" :style="fixed_bottom">
|
|
42
|
-
<xd-button type="primary" width="600rpx" @click="
|
|
42
|
+
<xd-button type="primary" width="600rpx" @click="createVipOrder">立即兑换</xd-button>
|
|
43
43
|
<view class="plus_privacy">开通视为同意 <text @click.stop="handlePrivacy('privacy_service')">《共享PLUS会员用户协议》</text></view>
|
|
44
44
|
</view>
|
|
45
45
|
</view>
|
|
@@ -74,9 +74,10 @@
|
|
|
74
74
|
xnamespace: "",
|
|
75
75
|
|
|
76
76
|
exchange_code: "",
|
|
77
|
+
createStatus: false,
|
|
77
78
|
step: 1,
|
|
78
79
|
vipInfo: {},
|
|
79
|
-
|
|
80
|
+
|
|
80
81
|
description: "",
|
|
81
82
|
vipSuccessPath: "",
|
|
82
83
|
payPath: "",
|
|
@@ -102,11 +103,15 @@
|
|
|
102
103
|
created() {
|
|
103
104
|
this.init(this.container);
|
|
104
105
|
|
|
105
|
-
//todo
|
|
106
106
|
},
|
|
107
107
|
methods: {
|
|
108
108
|
onJfbLoad(options) {
|
|
109
|
+
if(options['ecode']) {
|
|
110
|
+
this.exchange_code = options['ecode'];
|
|
111
|
+
this.searchCode();
|
|
112
|
+
}
|
|
109
113
|
},
|
|
114
|
+
|
|
110
115
|
/**
|
|
111
116
|
* @description 监听事件变化
|
|
112
117
|
* @param container {object} 业务组件对象自己
|
|
@@ -116,6 +121,7 @@
|
|
|
116
121
|
this.vipSuccessPath = getContainerPropsValue(container, 'content.vipSuccessPath', {value: ""}).value;
|
|
117
122
|
this.payPath = getContainerPropsValue(container, 'content.payPath', {value: ""}).value;
|
|
118
123
|
},
|
|
124
|
+
|
|
119
125
|
handlePrivacy(code){
|
|
120
126
|
let params = `page_id=${this.pageAttr["page_id"]}`;
|
|
121
127
|
params = `${params}&container_id=${this.containerId}${code}`;
|
|
@@ -123,6 +129,7 @@
|
|
|
123
129
|
url: `/pages/content/content?${params}`
|
|
124
130
|
})
|
|
125
131
|
},
|
|
132
|
+
|
|
126
133
|
searchCode(){
|
|
127
134
|
if(!this.exchange_code) return;
|
|
128
135
|
this.$xdShowLoading({});
|
|
@@ -135,9 +142,15 @@
|
|
|
135
142
|
this.$xdHideLoading();
|
|
136
143
|
this.step = 2;
|
|
137
144
|
this.vipInfo = res;
|
|
145
|
+
}).catch(e=>{
|
|
146
|
+
this.$xdHideLoading();
|
|
138
147
|
})
|
|
139
148
|
},
|
|
140
|
-
|
|
149
|
+
|
|
150
|
+
createVipOrder(){
|
|
151
|
+
if(this.createStatus) return
|
|
152
|
+
this.createStatus = true;
|
|
153
|
+
this.$xdShowLoading({});
|
|
141
154
|
jfbRootExec("createVipOrder", {
|
|
142
155
|
vm: this,
|
|
143
156
|
data: {
|
|
@@ -147,38 +160,25 @@
|
|
|
147
160
|
need_pay_price: 0,
|
|
148
161
|
selected_card_list_json: this.vipInfo.selected_card_list_json
|
|
149
162
|
}
|
|
150
|
-
}).then(res => {
|
|
151
|
-
if(res.need_pay_price > 0){
|
|
152
|
-
this.$xdUniHelper.redirectTo({
|
|
153
|
-
url: this.payPath + `?order_id=${res.pay_order_id}&main_order_id=${res.main_order_id}`
|
|
154
|
-
})
|
|
155
|
-
}else{
|
|
156
|
-
this.$xdUniHelper.redirectTo({
|
|
157
|
-
url: this.vipSuccessPath + `?order_id=${res.main_order_id}`
|
|
158
|
-
})
|
|
159
|
-
}
|
|
160
163
|
})
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
onJfbCustomEvent(options) {
|
|
181
|
-
console.log('event.onJfbReachBottom', options)
|
|
164
|
+
.then(res => {
|
|
165
|
+
this.createStatus = false;
|
|
166
|
+
this.$xdHideLoading();
|
|
167
|
+
if(res.need_pay_price > 0){
|
|
168
|
+
this.$xdUniHelper.redirectTo({
|
|
169
|
+
url: this.payPath + `?order_id=${res.pay_order_id}&main_order_id=${res.main_order_id}`
|
|
170
|
+
})
|
|
171
|
+
}
|
|
172
|
+
else{
|
|
173
|
+
this.$xdUniHelper.redirectTo({
|
|
174
|
+
url: this.vipSuccessPath + `?order_id=${res.main_order_id}`
|
|
175
|
+
})
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
.catch(err=>{
|
|
179
|
+
this.createStatus = false;
|
|
180
|
+
this.$xdHideLoading();
|
|
181
|
+
})
|
|
182
182
|
},
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -154,6 +154,7 @@
|
|
|
154
154
|
},
|
|
155
155
|
tab(value, oldValue) {
|
|
156
156
|
//请求数据
|
|
157
|
+
this.option = null;
|
|
157
158
|
this.hasNext = true;
|
|
158
159
|
this.page_token = 1
|
|
159
160
|
if (value === 'month') {
|
|
@@ -350,7 +351,7 @@
|
|
|
350
351
|
},
|
|
351
352
|
angleAxis: {
|
|
352
353
|
max: max,
|
|
353
|
-
startAngle: 90, // 开始的角度
|
|
354
|
+
startAngle: 90, // 开始的角度
|
|
354
355
|
show: false,
|
|
355
356
|
},
|
|
356
357
|
radiusAxis: {
|
|
@@ -446,7 +447,7 @@
|
|
|
446
447
|
},
|
|
447
448
|
angleAxis: {
|
|
448
449
|
max: max,
|
|
449
|
-
startAngle: 90, // 开始的角度
|
|
450
|
+
startAngle: 90, // 开始的角度
|
|
450
451
|
show: false,
|
|
451
452
|
},
|
|
452
453
|
radiusAxis: {
|
|
@@ -534,10 +535,10 @@
|
|
|
534
535
|
// 提取年份和月份
|
|
535
536
|
const year = dateStr.match(/(\d{4})年/)[1];
|
|
536
537
|
const month = dateStr.match(/(\d+)月/)[1];
|
|
537
|
-
|
|
538
|
+
|
|
538
539
|
// 确保月份是两位数
|
|
539
540
|
const formattedMonth = month.padStart(2, '0');
|
|
540
|
-
|
|
541
|
+
|
|
541
542
|
// 组合成目标格式
|
|
542
543
|
return `${year}-${formattedMonth}-01`;
|
|
543
544
|
},
|
|
@@ -733,4 +734,4 @@
|
|
|
733
734
|
}
|
|
734
735
|
}
|
|
735
736
|
}
|
|
736
|
-
</style>
|
|
737
|
+
</style>
|