jufubao-mall 2.0.92-beta2 → 2.0.92-beta3

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.
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 第三方库
5
+ * @param threePackagePath {String} 第三方库所在项目路径存放路径路
6
+ * @param packname {String} 包名字
7
+ * @returns {string|*}
8
+ */
9
+ const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
10
+ if(packname === 'gxd-commands-bussiness') {
11
+ return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-commands-bussiness/${threePackagePath}`;
12
+ }
13
+
14
+ if (packname === 'gxd-uni-library-editx') {
15
+ return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-uni-library-editx/${threePackagePath}`;
16
+ }
17
+
18
+ };
19
+
20
+ module.exports = {
21
+ getPackagePath
22
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-mall",
3
- "version": "2.0.92-beta2",
3
+ "version": "2.0.92-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -138,7 +138,9 @@
138
138
  @change="(num) => handleCartNumSet(num, prod, i)"
139
139
  ></xd-number>
140
140
  </view>
141
- <view v-if="prod.tip" :style="{color: activityPriceTextColor,fontSize:'24rpx',marginTop:'4rpx'}">{{ prod.tip }}</view>
141
+ <view v-if="showOrderSource==='Y'&&prod.tip" :style="{color: activityPriceTextColor,fontSize:'24rpx',marginTop:'4rpx'}">
142
+ <text v-html="prod.tip"></text>
143
+ </view>
142
144
  <view v-else-if="showActivityPrice==='Y'&&prod.is_activity==='Y'"
143
145
  :style="{color: activityPriceTextColor,fontSize:'24rpx',marginTop:'4rpx'}">活动价</view>
144
146
  </view>
@@ -276,6 +278,7 @@ export default {
276
278
  is_border_w: 0,
277
279
  is_border_c: "",
278
280
  showActivityPrice: 'N',
281
+ showOrderSource: 'N',
279
282
 
280
283
  listMargin: {},
281
284
  listItemBorder: "",
@@ -485,6 +488,7 @@ export default {
485
488
  // this.showActivityPrice = getContainerPropsValue(container, 'content.showActivityPrice', 'N');
486
489
  console.log(this.mainColor,'mainColor')
487
490
  this.showActivityPrice = gCPVal(container, 'showActivityPrice', 'N');
491
+ this.showOrderSource = gCPVal(container, 'showOrderSource', 'N');
488
492
  //下间距
489
493
  // this.padding = getContainerPropsValue(container, "content.padding", 0);
490
494
  this.padding = gCPVal(container,'padding', 0, {sKey:'paddingStatus',fields:['padding']});
@@ -144,6 +144,24 @@ export default (data, gValue, gColor, oldData) => {
144
144
  ele:'xd-line',
145
145
  groupKey:'content'
146
146
  },
147
+ {
148
+ label: '订单来源',
149
+ ele: 'xd-cus-switch',
150
+ valueKey: 'showOrderSource',
151
+ value: dataVal({data, key:'showOrderSource', dValue:"N", gValue}),
152
+ className: 'input100',
153
+ groupKey:'content',
154
+ labelInline:true,
155
+ cusStyle:{marginBottom: '10px'},
156
+ setting: {
157
+ tips:['显示','不显示'],
158
+ isBackType: 'string'
159
+ },
160
+ },
161
+ {
162
+ ele:'xd-line',
163
+ groupKey:'content'
164
+ },
147
165
  {
148
166
  label: '随便逛逛',
149
167
  ele: 'xd-cus-switch',
@@ -306,6 +306,8 @@
306
306
  is_plus_site: false,
307
307
  productKey: 'productKey',
308
308
  curParentIndex: 0,
309
+ pid: '',
310
+ cateId: '',
309
311
 
310
312
  // 排序功能
311
313
  sortType: 'default',
@@ -449,6 +451,9 @@
449
451
  selectNav: {
450
452
  deep: true,
451
453
  handler(n, o) {
454
+ // 切换分类时清空已选品牌,避免筛选条件残留到新分类
455
+ this.selectedBrandIds = [];
456
+ this.showBrandAll = false;
452
457
  this.page_token = '1';
453
458
  this.getProductList()
454
459
  // 获取品牌列表
@@ -466,6 +471,13 @@
466
471
  onJfbLoad(options) {
467
472
  this.setNameSpace(options);
468
473
  this.onLoadStatus = true;
474
+ // 路由参数:pid 一级分类、cateId 二级分类,用于定位对应分类
475
+ if (options.pid) {
476
+ this.pid = Number(options.pid);
477
+ }
478
+ if (options.cateId) {
479
+ this.cateId = Number(options.cateId);
480
+ }
469
481
  this.getType2Nav()
470
482
  },
471
483
  init(container) {
@@ -664,6 +676,10 @@
664
676
  return item;
665
677
  });
666
678
  this.allNavList = items;
679
+ // 路由带分类id时,定位到对应分类
680
+ if ((this.pid || this.cateId) && this.locateCategory(items)) {
681
+ return;
682
+ }
667
683
  // layoutStyle=2: 无顶部导航,左侧直接显示一级导航
668
684
  if (this.layoutStyle === '2') {
669
685
  this.navChildrenList = this.allNavList;
@@ -679,6 +695,41 @@
679
695
  })
680
696
  },
681
697
 
698
+ // 根据路由参数定位分类(pid 一级分类、cateId 二级分类),命中则选中对应分类并返回true
699
+ locateCategory(items) {
700
+ // 1. 定位一级分类 index:优先 pid 直接匹配,否则用 cateId 反查父级
701
+ let parentIndex = -1;
702
+ if (this.pid) {
703
+ parentIndex = items.findIndex(item => Number(item.category_id) === this.pid);
704
+ }
705
+ if (parentIndex === -1 && this.cateId) {
706
+ parentIndex = items.findIndex(item =>
707
+ (item.children || []).some(child => Number(child.category_id) === this.cateId)
708
+ );
709
+ }
710
+ if (parentIndex === -1) return false;
711
+
712
+ // 2. 定位二级分类 index:用 cateId 匹配父级下子分类,未命中或未传则选中第一个
713
+ let childIndex = 0;
714
+ if (this.cateId) {
715
+ const cIndex = (items[parentIndex].children || []).findIndex(child => Number(child.category_id) === this.cateId);
716
+ if (cIndex > -1) childIndex = cIndex;
717
+ }
718
+
719
+ this.curParentIndex = parentIndex;
720
+ if (this.layoutStyle === '2') {
721
+ // 无顶部导航:左侧保持一级列表并高亮一级分类;有 cateId 时选中二级分类
722
+ this.navChildrenList = this.allNavList;
723
+ this.selectNavIndex = parentIndex;
724
+ this.selectNav = this.cateId ? items[parentIndex].children[childIndex] : items[parentIndex];
725
+ } else {
726
+ this.navChildrenList = items[parentIndex].children;
727
+ this.selectNav = this.navChildrenList[childIndex];
728
+ this.selectNavIndex = childIndex;
729
+ }
730
+ return true;
731
+ },
732
+
682
733
  getContentStyle(type = 'cont') {
683
734
  let outerWidth = (uni.getSystemInfoSync().safeArea.width * this.$pxNum) - 180;
684
735
 
@@ -62,9 +62,6 @@
62
62
  :style="{color:priceTextColor,fontSize:'24rpx'}">活动价</view>
63
63
  </view>
64
64
  </view>
65
- <view v-if="showLogisticsTip === 'Y' &&
66
- logisticsTipType === 'prod' &&
67
- shop.deliveryPickValue === 'logistics'" class="postage_tip">{{ prod.postage_tip || logisticsTipText }}</view>
68
65
  <view v-if="prod.blessingKey" class="wish_comment">
69
66
  <input :maxlength="prod.blessingData.struct.maxlength||16" v-model="prod.blessing" :placeholder="prod.blessingData.value" />
70
67
  <view class="bless_tip"
@@ -110,8 +107,8 @@
110
107
  </template>
111
108
  </view>
112
109
  <!-- <xd-list-item v-if="shop.delivery_message" :label="shop.delivery_message" paddingLR="48rpx" size="large"></xd-list-item> -->
113
- <view v-if="showLogisticsTip === 'Y' && logisticsTipType === 'shop' && shop.deliveryPickValue === 'logistics'" class="logistics_tip">
114
- {{shop.postage_tip || logisticsTipText}}
110
+ <view v-if="showLogisticsTip === 'Y' && shop.deliveryPickValue === 'logistics'" class="logistics_tip">
111
+ {{logisticsTipText}}
115
112
  </view>
116
113
  <view v-if="shop.is_support_delivery == 'N'" :style="{background:bgColor,color:warningColor}" class="err_message">
117
114
  {{shop.message}}
@@ -583,7 +580,6 @@
583
580
  guidePay: "",
584
581
  showLogisticsTip: "Y",
585
582
  logisticsTipText: "",
586
- logisticsTipType: "", //shop:拆单, prod: 商品
587
583
  checkPayMethod: [],
588
584
  ticketPositionStatus: "N",
589
585
  openVipBtnBgImg: "",
@@ -946,7 +942,6 @@
946
942
  this.guidePay = getContainerPropsValue(container, "content.guidePay", "");
947
943
  this.showLogisticsTip = gCPVal(container, 'showLogisticsTip', "Y");
948
944
  this.logisticsTipText = gCPVal(container, 'logisticsTipText', '订单生成后72小时发货,如遇节假日发货顺延');
949
- this.logisticsTipType = gCPVal(container, 'logisticsTipType', "shop");
950
945
  this.ticketPositionStatus = gCPVal(container, 'ticketPositionStatus', "N")
951
946
  console.log("this.showLogisticsTip", this.showLogisticsTip);
952
947
  if(this.useMode === "market"){
@@ -1957,11 +1952,6 @@
1957
1952
  font-size: 24rpx;
1958
1953
  color: var(--g-theme-dangerColor);
1959
1954
  }
1960
- .shop_postage{
1961
- padding: 0 var(--cont-lr-padding) 24rpx;
1962
- font-size: 24rpx;
1963
- color: var(--g-theme-dangerColor);
1964
- }
1965
1955
  .err_message{
1966
1956
  padding: 20rpx var(--cont-lr-padding);
1967
1957
  font-size: 24rpx;
@@ -2037,12 +2027,6 @@
2037
2027
  justify-content: space-between;
2038
2028
  }
2039
2029
  }
2040
- .postage_tip{
2041
- color: rgb(229, 116, 112);
2042
- font-size: 24rpx;
2043
- padding: 0 var(--cont-lr-padding);
2044
- margin: 10px 0;
2045
- }
2046
2030
  .wish_comment{
2047
2031
  padding: 0 var(--cont-lr-padding);
2048
2032
  input{
@@ -163,7 +163,6 @@ module.exports = {
163
163
  group_id: "61527_3_1_1_1_0_YLYO6_3-vLG2sP8ytvmHF",
164
164
  is_support_delivery: "Y",
165
165
  message: "可以配送.",
166
- postage_tip: "订单将在活动结算后5个工作日内完成发货",
167
166
  user_logistics_amount_origin: "50",
168
167
  supplier_partner_id: 161,
169
168
  show_subscribe_time_list: [],
@@ -208,7 +207,6 @@ module.exports = {
208
207
  "https://sandbox-img.jufubao.cn/uploads/20230406/0b890cd5a947d9c5724b412d34cd4000.png",
209
208
  product_form_data:
210
209
  '[{"id":"blessing","type":"input","struct":{"title":"祝福语","explain":"请务必准确填写号码,号码错误将无法进行退还操作。","default":"","placeholder":"","required":true},"options":[],"value":"祝福语"}]',
211
- postage_tip: "订单生成后72小时发货",
212
210
  brand_id: 3,
213
211
  brand_name: "北京味多美蛋糕叔叔/HEYTEA/喜茶/凯蒂猫/Quange/全格",
214
212
  aftersale_service: ",refund,exchange",
@@ -339,19 +339,6 @@ export default function (data, gValue,gColor,oldData){
339
339
  notice:'仅针对配送方式为快递的商品展示',
340
340
  },
341
341
  {ele: 'group_start'},
342
- {
343
- label: "展示方式",
344
- ele: "xd-radio",
345
- valueKey: "logisticsTipType",
346
- value: dataVal({data, key:'logisticsTipType', dValue: 'shop', gValue}),
347
- groupKey:'content',
348
- list: [
349
- { label: "按拆单展示", value: "shop"},
350
- { label: "按商品展示", value: "prod"},
351
- ],
352
- hidden: data.showLogisticsTip === 'N',
353
- labelInline: true,
354
- },
355
342
  {
356
343
  label: "",
357
344
  ele: "el-input",
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(git checkout *)",
5
- "Bash(npx lessc *)",
6
- "Bash(python3 *)",
7
- "Bash(sips -g pixelWidth -g pixelHeight \"/Users/zxd/Workspaces/jufubao-mall/temp_screenshot.jpg\")",
8
- "Bash(identify \"/Users/zxd/Workspaces/jufubao-mall/temp_screenshot.jpg\")",
9
- "Bash(sips *)"
10
- ]
11
- }
12
- }