jufubao-base 1.0.237-beta16 → 1.0.237-beta18

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.237-beta16",
3
+ "version": "1.0.237-beta18",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -54,7 +54,7 @@
54
54
  import componentsMixins from "@/mixins/componentsMixins";
55
55
  import extsMixins from "@/mixins/extsMixins";
56
56
  import getServiceUrl from "@/common/getServiceUrl";
57
- import { mapState } from "vuex";
57
+ import { mapState, mapMutations } from "vuex";
58
58
  export default {
59
59
  name: "JfbBaseShare",
60
60
  components: {
@@ -74,6 +74,7 @@
74
74
  },
75
75
  computed: {
76
76
  ...mapState(["shareInfo"]),
77
+ ...mapMutations(["setShareInfo"]),
77
78
  showShare(){
78
79
  if(this.isPreview) return true;
79
80
  // #ifdef MP-WEIXIN
@@ -20,7 +20,8 @@
20
20
  提现至{{channel_name}}
21
21
  </view>
22
22
  <view v-if="info.status==='N'" class="fixe_bottom" :style="prod_bottom">
23
- <XdButton fontSize="32" type="primary" @click="handleWithDraw">确认提现</XdButton>
23
+ <XdButton v-if="showDisabled" disabled fontSize="32" type="primary">确认提现</XdButton>
24
+ <XdButton v-else fontSize="32" type="primary" @click="handleWithDraw">确认提现</XdButton>
24
25
  <view @click="handleCancelWithDraw">取消提现</view>
25
26
  </view>
26
27
  <XdDailog :radius="30" :showClose="false" :show.sync="showSuccess">
@@ -77,7 +78,8 @@
77
78
  channel_name: '',
78
79
  logo: '',
79
80
  withDrawSuccessPath: '',
80
- jwxSDK: null
81
+ jwxSDK: null,
82
+ showDisabled: false
81
83
  }
82
84
  },
83
85
  computed: {
@@ -101,6 +103,8 @@
101
103
  },
102
104
  },
103
105
  created() {
106
+ console.log(this.$configProject,this.settings.index,'apapapa');
107
+
104
108
  this.init(this.container);
105
109
  },
106
110
  methods: {
@@ -157,6 +161,7 @@
157
161
  this.withDrawSuccessPath = getContainerPropsValue(container, 'content.withDrawSuccessPath', { value: '' }).value;
158
162
  },
159
163
  handleWithDraw() {
164
+ this.showDisabled = true
160
165
  jfbRootExec("getWithdrawThirdPlaceOrderList", {
161
166
  vm: this,
162
167
  data: {
@@ -168,18 +173,24 @@
168
173
  //#ifdef MP-WEIXIN
169
174
  if (wx.canIUse('requestMerchantTransfer')) {
170
175
  wx.requestMerchantTransfer({
171
- mchId: mch_id,
172
- appId: app_id,
173
- package: channel_data,
176
+ mchId: res.mch_id,
177
+ appId: res.app_id,
178
+ package: res.channel_data,
174
179
  success: (request) => {
175
180
  console.log('success:', request);
176
- that.$xdUniHelper.navigateTo({ url: that.withDrawSuccessPath })
181
+ if(that.withDrawSuccessPath){
182
+ that.$xdUniHelper.navigateTo({ url: that.withDrawSuccessPath })
183
+ } else {
184
+ that.$xdUniHelper.navigateTo({ url: that.settings.index })
185
+ }
177
186
  },
178
187
  fail: (request) => {
188
+ this.showDisabled = false
179
189
  console.log('fail:', request);
180
190
  },
181
191
  });
182
192
  } else {
193
+ this.showDisabled = false
183
194
  wx.showModal({
184
195
  content: '你的微信版本过低,请更新至最新版本。',
185
196
  showCancel: false,
@@ -199,16 +210,23 @@
199
210
  function (request) {
200
211
  if (request.err_msg === 'requestMerchantTransfer:ok') {
201
212
  console.log(request,that.withDrawSuccessPath,'requestrequestrequest');
202
- that.$xdUniHelper.navigateTo({ url: that.withDrawSuccessPath })
213
+ if(that.withDrawSuccessPath){
214
+ that.$xdUniHelper.navigateTo({ url: that.withDrawSuccessPath })
215
+ } else {
216
+ that.$xdUniHelper.navigateTo({ url: that.settings.index })
217
+ }
203
218
  }
204
219
  }
205
220
  );
206
221
  } else {
222
+ this.showDisabled = false
207
223
  alert('你的微信版本过低,请更新至最新版本。');
208
224
  }
209
225
  }
210
226
  })
211
227
  //#endif
228
+ }).catch(err=>{
229
+ this.showDisabled = false
212
230
  })
213
231
  },
214
232
  handleCancelWithDraw() {