jufubao-base 1.0.295-beta1 → 1.0.295

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.295-beta1",
3
+ "version": "1.0.295",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -74,6 +74,7 @@
74
74
  xnamespace: "",
75
75
 
76
76
  exchange_code: "",
77
+ createStatus: false,
77
78
  step: 1,
78
79
  vipInfo: {},
79
80
 
@@ -120,6 +121,7 @@
120
121
  this.vipSuccessPath = getContainerPropsValue(container, 'content.vipSuccessPath', {value: ""}).value;
121
122
  this.payPath = getContainerPropsValue(container, 'content.payPath', {value: ""}).value;
122
123
  },
124
+
123
125
  handlePrivacy(code){
124
126
  let params = `page_id=${this.pageAttr["page_id"]}`;
125
127
  params = `${params}&container_id=${this.containerId}${code}`;
@@ -146,6 +148,9 @@
146
148
  },
147
149
 
148
150
  createVipOrder(){
151
+ if(this.createStatus) return
152
+ this.createStatus = true;
153
+ this.$xdShowLoading({});
149
154
  jfbRootExec("createVipOrder", {
150
155
  vm: this,
151
156
  data: {
@@ -155,17 +160,25 @@
155
160
  need_pay_price: 0,
156
161
  selected_card_list_json: this.vipInfo.selected_card_list_json
157
162
  }
158
- }).then(res => {
159
- if(res.need_pay_price > 0){
160
- this.$xdUniHelper.redirectTo({
161
- url: this.payPath + `?order_id=${res.pay_order_id}&main_order_id=${res.main_order_id}`
162
- })
163
- }else{
164
- this.$xdUniHelper.redirectTo({
165
- url: this.vipSuccessPath + `?order_id=${res.main_order_id}`
166
- })
167
- }
168
163
  })
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
+ })
169
182
  },
170
183
  }
171
184
  }