jufubao-base 1.0.204 → 1.0.205

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.204",
3
+ "version": "1.0.205",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -14,7 +14,11 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-background__body">
17
- <view :style="{background:backgroundColor,color:warningColor}" class="jfb-base-background__body-pop" v-if="isPreview">设置背景模式方便编辑(占位),在线上此模块不显</view>
17
+ <view
18
+ :style="{background:backgroundColor,color:warningColor}"
19
+ class="jfb-base-background__body-pop"
20
+ v-if="isPreview"
21
+ >设置背景模式方便编辑(占位),在线上此模块不显</view>
18
22
  </view>
19
23
  </view>
20
24
  </template>
@@ -95,7 +99,7 @@ export default {
95
99
 
96
100
  .jfb-base-background {
97
101
  &__body {
98
- min-height: 100rpx;
102
+
99
103
  &-pop {
100
104
  min-height: 100rpx;
101
105
  text-align: center;
@@ -154,7 +154,7 @@
154
154
  this.$xdHideLoading();
155
155
  let isH5FilterEntryList = [];
156
156
  let isMpFilterEntryList = [];
157
- this.entryList = res.list.filter(item=>{
157
+ let entryList = res.list.filter(item=>{
158
158
  //#ifdef H5
159
159
  //在H5平台应用中不可跳转到微信小程序应用
160
160
  if(item.redirect_data.appType === 'wxmp'){
@@ -172,59 +172,70 @@
172
172
  }
173
173
  return true
174
174
  //#endif
175
- }).map(item => {
176
- const {dir, path, host,appType} = item['redirect_data'];
177
- if(appType === undefined) item.redirect_data.appType = 'h5';
178
- item['image_url'] = getServiceUrl(item.image_url);
179
- item['image_url2'] = item.image_url2 ? getServiceUrl(item.image_url2) : "";
180
- item['image_url3'] = item.image_url3 ? getServiceUrl(item.image_url3) : "";
181
- let nsp = Base64.encodeURI(JSON.stringify({business_code: item['business_code']}));
175
+ })
176
+ .map(item => {
177
+ const {dir, path, host,appType} = item['redirect_data'];
178
+ if(appType === undefined) item.redirect_data.appType = 'h5';
179
+ item['image_url'] = getServiceUrl(item.image_url);
180
+ item['image_url2'] = item.image_url2 ? getServiceUrl(item.image_url2) : "";
181
+ item['image_url3'] = item.image_url3 ? getServiceUrl(item.image_url3) : "";
182
+ let nsp = Base64.encodeURI(JSON.stringify({business_code: item['business_code']}));
182
183
 
183
- //外站配置地址
184
- if(item.redirect_type === 'URL') {
185
- if(item['redirect_data']['path'].indexOf('?') === -1) {
186
- item['redirect_data']['path'] = `${item['redirect_data']['path']}?x-common=${nsp}&vs=${new Date().getTime()}`
184
+ //外站配置地址
185
+ if(item.redirect_type === 'URL') {
186
+ if(item['redirect_data']['path'].indexOf('?') === -1) {
187
+ item['redirect_data']['path'] = `${item['redirect_data']['path']}?x-common=${nsp}&vs=${new Date().getTime()}`
188
+ }
189
+ else item['redirect_data']['path'] = `${item['redirect_data']['path']}&x-common=${nsp}&vs=${new Date().getTime()}`;
190
+ return item;
187
191
  }
188
- else item['redirect_data']['path'] = `${item['redirect_data']['path']}&x-common=${nsp}&vs=${new Date().getTime()}`;
189
- return item;
190
- }
191
192
 
192
- let jumpUrl = path;
193
+ let jumpUrl = path;
193
194
 
194
- //域名相同并且应用路径不相同时候处理
195
- if(host === this.projectAttr.host && this.projectAttr['deploy_dir'] !== dir){
196
- jumpUrl = `//${host}/${dir}${path}`;
195
+ //域名相同并且应用路径不相同时候处理
196
+ if(host === this.projectAttr.host && this.projectAttr['deploy_dir'] !== dir){
197
+ jumpUrl = `//${host}/${dir}${path}`;
198
+ //#ifdef MP-WEIXIN
199
+ jumpUrl = `https:${jumpUrl}`;
200
+ //#endif
201
+ }
202
+
203
+ //获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
204
+ let cardPathStr = '';
197
205
  //#ifdef MP-WEIXIN
198
- jumpUrl = `https:${jumpUrl}`;
206
+ if(item.redirect_data.appType === 'h5') {
207
+ const custom_redirect_data = this.$xdUniHelper.checkVarType(item['custom_redirect_data']) === 'object'?item['custom_redirect_data']:{};
208
+ const cardPathObject = this.getCardPath(custom_redirect_data);
209
+ if(cardPathObject !== null) {
210
+ const {cardPath, cardSelf} =cardPathObject
211
+ if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
212
+ }
213
+ }
199
214
  //#endif
200
- }
215
+ item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
216
+ return item;
217
+ });
201
218
 
202
- //获取自定义卡券登录地址(微信小程序跳转到H5平台起作用)
203
- let cardPathStr = '';
204
- //#ifdef MP-WEIXIN
205
- if(item.redirect_data.appType === 'h5') {
206
- const custom_redirect_data = this.$xdUniHelper.checkVarType(item['custom_redirect_data']) === 'object'?item['custom_redirect_data']:{};
207
- const cardPathObject = this.getCardPath(custom_redirect_data);
208
- if(cardPathObject !== null) {
209
- const {cardPath, cardSelf} =cardPathObject
210
- if(cardPath) cardPathStr = `&card-login=${encodeURIComponent(cardPath)}&cardSelf=${cardSelf}`
211
- }
212
- }
213
- //#endif
214
- item['redirect_data']['path'] = `${jumpUrl}?x-common=${nsp}&vs=${new Date().getTime()}${cardPathStr}`
215
- return item;
216
- });
217
219
  //#ifdef MP-WEIXIN
218
220
  console.warn(`微信小程序端被过滤的入口列表:${JSON.stringify(isMpFilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
219
221
  //#endif
220
222
  //#ifdef H5
221
223
  console.warn(`H5端被过滤的入口列表:${JSON.stringify(isH5FilterEntryList.map(item=> `${item.redirect_data.appType}:${item.entry_name}:${item.redirect_data['frontPath']}`),null,2)}`)
222
224
  //#endif
223
- console.warn(`福利入口链接列表:${JSON.stringify(this.entryList.map(item=> `${item.redirect_data.appType}:${item.redirect_data['path']}`),null,2)}`);
224
- if(res.list.length === 1) this.toLink(this.entryList[0]);
225
+ console.warn(`福利入口链接列表:${JSON.stringify(entryList.map(item=> `${item.redirect_data.appType}:${item.redirect_data['path']}`),null,2)}`);
226
+
227
+ //一条数据直接跳转到入口
228
+ if(entryList.length === 1){
229
+ this.toLink(entryList[0]);
230
+ return
231
+ }
232
+ //无数据提示
225
233
  if(res.list.length === 0) {
226
234
  this.$xdAlert({content: '当前票券暂无支持服务'})
235
+ return;
227
236
  }
237
+ //复制
238
+ this.entryList = entryList;
228
239
  })
229
240
  },
230
241
  toLink(item){
@@ -242,18 +242,16 @@
242
242
 
243
243
  .jfb-base-fast-link {
244
244
  display: flex;
245
- min-height: unit(100, rpx);
246
245
 
247
246
  &__body{
248
247
  flex: 1;
249
248
 
250
249
  &-pop {
251
- min-height: 58rpx;
250
+ min-height: 100rpx;
252
251
  text-align: center;
253
- line-height: 58rpx;
252
+ line-height: 100rpx;
254
253
  color: #666;
255
254
  font-size: unit(24, rpx);
256
- padding:unit(20, rpx);
257
255
  }
258
256
  }
259
257
  }
@@ -678,7 +678,7 @@
678
678
  size="28"
679
679
  icon="iconxia_down"
680
680
  ></xd-font-icon>
681
- </view>
681
+ </view>
682
682
  </view>
683
683
  <view class="jfb-base-order-detail__body-html" v-if="showAllProductDetail">
684
684
  <view v-html="info.productDetail"></view>
@@ -967,7 +967,7 @@ export default {
967
967
  this.getCountDown();
968
968
  }
969
969
  },
970
- getOrderDetail() {
970
+ getOrderDetail() {
971
971
  jfbRootExec("getBaseOrderDetail", {
972
972
  vm: this,
973
973
  data: {
@@ -979,6 +979,13 @@ export default {
979
979
  },
980
980
  })
981
981
  .then((res) => {
982
+
983
+ //跳转到第三方订单
984
+ if(res['third_order_detail_url']) {
985
+ this.$xdUniHelper.redirectTo({url: res['third_order_detail_url']}, false, false);
986
+ return;
987
+ }
988
+
982
989
  this.biz_code = res.biz_code;
983
990
  this.is_not_show_price = res.is_not_show_price;
984
991
 
@@ -1135,9 +1142,9 @@ export default {
1135
1142
  });
1136
1143
  } catch (error) {
1137
1144
  console.log(error,'apapapa');
1138
-
1145
+
1139
1146
  }
1140
-
1147
+
1141
1148
  }
1142
1149
  else {
1143
1150
  this.info = res;