Ver código fonte

促销活动套餐

xiaohaizhao 11 meses atrás
pai
commit
5d4ad9ee05

+ 2 - 1
app.json

@@ -56,7 +56,8 @@
         "dispatchBill/sentandback",
         "activity/selectProduct/cart/index",
         "target/index",
-        "favorites/index"
+        "favorites/index",
+        "activity/bindingProduct/index"
       ]
     },
     {

+ 321 - 0
packageA/activity/bindingProduct/index.js

@@ -0,0 +1,321 @@
+import currency from "../../../utils/currency";
+const _Http = getApp().globalData.http,
+  file = require("../../../utils/FormatTheAttachment"),
+  {
+    getItem
+  } = require("../selectProduct/calculatePrice");
+import {
+  getCustomText
+} from "../../../utils/customItemType";
+
+Page({
+  data: {
+    loading: true,
+    params: {}, //请求体
+    result: [], //返回结果
+    idname: "itemid", //idkey
+    showName: "itemname",
+    newPrice: "price",
+    oldPrice: "oldprice",
+    resultList: [],
+    sa_brandid: null,
+    privacyFieldC: [],
+    packageList: [],
+    condition: "",
+    searchList: [],
+    dialogShow: false,
+    submitQty: 1,
+  },
+  onLoad(options) {
+    if (options.params) {
+      let params = JSON.parse(options.params);
+      if (!params.content.pageNumber || !params.content.pageTotal) {
+        params.content.pageNumber = 1;
+        params.content.pageTotal = 1;
+      }
+      _Http.basic({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "typename": "package"
+        }
+      }).then(res => {
+        console.log('套餐分类', res)
+        if (res.msg != '成功') return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        })
+        let packageList = []
+        try {
+          packageList = res.data.find(v => v.value == params.content.packagetype).subvalues
+        } catch (error) {}
+        if (packageList.length) params.content.where.packagetypemx = packageList[0];
+        this.setData({
+          params,
+          butText: options.butText || '生成订单',
+          packageList
+        });
+        this.getList()
+        this.selectComponent("#ListBox").setHeight(".search", this);
+      })
+      this.setData({
+        params,
+        butText: options.butText || '生成订单'
+      });
+    };
+    try {
+      let privacyFieldC = wx.getStorageSync('auth').wdiscounts.forms.wdiscounts.formcols.map(v => v.title);
+      this.setData({
+        privacyFieldC
+      })
+    } catch (error) {
+      console.error(error)
+    }
+    this.setData({
+      idname: options.idname || this.data.idname
+    });
+  },
+  customization(e) {
+    let {
+      item
+    } = e.target.dataset;
+    this.bindChangeFun();
+    if (item) this.selectComponent("#Custom").onClick(item)
+  },
+  bindChangeFun() {
+    getApp().globalData.customizedProduct = function (item, custom) {
+      item = getItem(getItem(Object.assign(item, custom)), 'newOldPrice', 'oldprice');
+      item.customText = getCustomText(item);
+      return new Promise((resolve) => {
+        let index = this.data.list.findIndex(v => v.itemid == item.itemid),
+          i = this.data.searchList.findIndex(v => v.itemid == item.itemid);
+        item.CompleteCustomization = true;
+        if (index != -1) this.setData({
+          [`list[${index}]`]: item
+        })
+        if (i != -1) this.setData({
+          [`searchList[${i}]`]: item,
+        })
+        resolve(true)
+      })
+    }.bind(this)
+  },
+  getList(init = false) {
+    //init 用于初始化分页
+    if (init.detail != undefined) init = init.detail;
+    let params = this.data.params;
+    if (init) params.content.pageNumber = 1
+    params.content.pageSize = 9999;
+    if (params.content.pageNumber > params.content.pageTotal) return;
+    _Http.basic(params).then(res => {
+      console.log("选择产品列表", res)
+      this.selectComponent('#ListBox').RefreshToComplete();
+      this.selectComponent("#ListBox").setHeight(".search", this);
+      if (res.msg != '成功') return wx.showToast({
+        title: res.msg,
+        icon: "none"
+      })
+      const CNY = num => currency(num, {
+        symbol: "¥",
+        precision: 2
+      }).format();
+      let newPrice = this.data.newPrice,
+        oldPrice = this.data.oldPrice;
+      res.data = res.data.map(value => {
+        if (value.attinfos.length != 0) {
+          value.attinfos = file.fileList(value.attinfos)
+          let image = value.attinfos.find(v => v.fileType == "image");
+          if (image) {
+            try {
+              value.cover = image.subfiles.find(v => v.type == "thumbnail").url;
+            } catch (error) {
+              value.cover = image.url;
+            }
+          }
+        }
+        if (value.islimit == 0) value.groupqty = 0;
+        if (newPrice) value.newPrice = CNY(value[newPrice] || 0);
+        if (oldPrice) value.oldPrice = CNY(value[oldPrice] || 0);
+        //value.orderminqty = value.packageqty || value.orderminqty; 起订量优先取包装数量
+        if (!value.saledqty) value.saledqty = 0;
+        value.maxQty = value.groupqty == 0 ? "" : value.groupqty - value.saledqty; //有限购 设置最高可订购数量
+        value.qty = value.orderminqty;
+        if (value.iscustomsize) {
+          value.customText = getCustomText(value);
+        }
+        return value;
+      })
+      this.setData({
+        'params.content.pageNumber': res.pageNumber + 1,
+        'params.content.pageTotal': res.pageTotal,
+        'params.content.total': res.total,
+        list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+        loading: false
+      })
+      this.handleSearch()
+    })
+  },
+  tabsChange(e) {
+    this.setData({
+      "params.content.where.packagetypemx": e.detail.name
+    })
+    this.getList(true)
+  },
+  changeQtySte({
+    detail
+  }) {
+    if (detail == '-' || detail <= 0) detail = 1;
+    this.setData({
+      submitQty: detail
+    })
+  },
+  /* 提交 */
+  submit() {
+    let itemname = '';
+
+    let list = this.data.list.map(v => {
+      v.qty = v.qty * this.data.submitQty;
+      if (v.iscustomsize && itemname == '' && !v.CompleteCustomization) {
+        itemname = v.itemname
+      };
+      return v
+    })
+
+    if (itemname) {
+      let that = this;
+      return wx.showModal({
+        title: '提示',
+        content: `请先完成"${itemname}"产品的定制化信息`,
+        // confirmText: "查看产品",
+        showCancel: false,
+        complete: ({
+          confirm
+        }) => {
+          if (confirm) {
+            /* that.setData({
+              condition: itemname
+            })
+            that.handleSearch() */
+          }
+        }
+      })
+    }
+    this.setData({
+      dialogShow: true
+    })
+    this.selectComponent("#Dialog").data.beforeClose = (action) => new Promise((resolve) => {
+      if (action == 'cancel') {
+        resolve()
+        this.setData({
+          dialogShow: false
+        })
+        return;
+      }
+      getApp().globalData.handleSelect && getApp().globalData.handleSelect({
+        list
+      }).then(res => {
+        resolve()
+        this.setData({
+          dialogShow: false
+        })
+      })
+    });
+  },
+  /* 预览图片 */
+  viewImage(e) {
+    const {
+      file
+    } = e.currentTarget.dataset;
+    if (file.length) wx.previewMedia({
+      sources: file.filter(value => ['image', 'vadio'].includes(value.fileType)).map(v => {
+        return {
+          url: v.url,
+          type: v.fileType
+        }
+      }),
+      current: 0,
+      showmenu: true
+    })
+  },
+  /* 开始搜索 */
+  startSearch({
+    detail
+  }) {
+    this.data.condition = detail;
+    this.handleSearch()
+  },
+  /* 取消搜索 */
+  onClear() {
+    this.data.condition = '';
+    this.handleSearch()
+  },
+  handleSearch() {
+    let searchList = this.data.list;
+    if (this.data.condition.length) searchList = searchList.filter(v => {
+      return ['itemname', 'itemno', 'standards', 'model', 'spec'].some(s => {
+        try {
+          return v[s].includes(this.data.condition)
+        } catch (error) {
+          return false
+        }
+      })
+    })
+    this.setData({
+      searchList
+    })
+  },
+  onReady() {
+    this.selectComponent("#ListBox").setHeight(".search", this);
+  },
+  /* 步进器输入框失去焦点 */
+  inputBlur(e) {
+    const {
+      index
+    } = e.currentTarget.dataset;
+    let item = this.data.list[index];
+    let qty = 0;
+    if (item.orderminqty > e.detail.value) {
+      wx.showToast({
+        title: '输入数量低于最低起订量!',
+        icon: "none"
+      })
+      qty = item.orderminqty;
+    } else if (item.orderminqty < e.detail.value) {
+      var currencyRounding = value => currency(value, {
+        increment: item.orderaddqty
+      });
+      qty = currency(currencyRounding(currency(e.detail.value).subtract(item.orderminqty)).format()).add(item.orderminqty).value;
+
+    } else {
+      qty = e.detail.value;
+    }
+    this.setData({
+      [`list[${index}].qty`]: 0
+    });
+    this.setData({
+      [`list[${index}].qty`]: qty
+    });
+    let i = this.data.resultList.findIndex(v => v.itemid == item.itemid);
+    if (i !== -1) this.data.resultList[i].qty = qty;
+  },
+  stepperChange(e) {
+    const {
+      index
+    } = e.currentTarget.dataset;
+    let item = this.data.list[index];
+    if (e.type == 'plus') {
+      item.qty += (item.orderaddqty) - 0
+    } else {
+      item.qty -= item.orderaddqty
+    }
+    this.setData({
+      [`list[${index}]`]: item
+    })
+    let i = this.data.resultList.findIndex(v => v.itemid == item.itemid);
+    if (i !== -1) this.data.resultList[i] = item;
+  },
+  onUnload() {
+    //回收数据
+    getApp().globalData.handleSelect = null;
+  }
+})

+ 9 - 0
packageA/activity/bindingProduct/index.json

@@ -0,0 +1,9 @@
+{
+  "usingComponents": {
+    "van-checkbox": "@vant/weapp/checkbox/index",
+    "van-stepper": "@vant/weapp/stepper/index",
+    "list": "../modules/list/index",
+    "custom": "../../../pages/index/collect/modules/custom",
+    "van-dialog": "@vant/weapp/dialog/index"
+  }
+}

+ 150 - 0
packageA/activity/bindingProduct/index.scss

@@ -0,0 +1,150 @@
+page {
+	height: 100vh;
+	overflow: hidden;
+}
+
+.total {
+	height: 60rpx;
+	line-height: 60rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	color: #666666;
+	padding-left: 30rpx;
+}
+
+.item-box {
+	position: relative;
+	width: 100vw;
+	background-color: #fff;
+	margin-bottom: 20rpx;
+	padding-bottom: 20rpx;
+	box-sizing: border-box;
+
+	.top {
+		display: flex;
+		padding: 20rpx 30rpx 10rpx;
+		box-sizing: border-box;
+
+		.image {
+			width: 128rpx;
+			height: 128rpx;
+			border-radius: 16rpx;
+			overflow: hidden;
+			margin-right: 20rpx;
+			flex-shrink: 0;
+		}
+
+		.content {
+			flex: 1;
+
+			.title {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				height: 40rpx;
+
+				.line-1 {
+					display: block;
+					width: 500rpx;
+					font-size: 28rpx;
+					font-family: PingFang SC-Semibold, PingFang SC;
+					font-weight: 600;
+					color: #333333;
+				}
+
+				.iconfont {
+					position: absolute;
+					right: 0;
+					top: 20rpx;
+					flex-shrink: 0;
+				}
+			}
+
+			.exp {
+				line-height: 34rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #999999;
+				margin-top: 8rpx;
+			}
+
+		}
+
+	}
+
+	.bottom {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		height: 58rpx;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+		margin-top: 12rpx;
+
+		.check {
+			display: flex;
+			align-items: center;
+			height: 100%;
+			width: 380rpx;
+
+			.label-class {
+				font-size: 24rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #999999;
+				margin-left: -6rpx;
+			}
+		}
+
+		.input-class {
+			width: 120rpx;
+		}
+	}
+}
+
+.footer {
+	width: 100vw;
+	min-height: 130rpx;
+	position: fixed;
+	bottom: 0;
+	z-index: 9 !important;
+	display: flex;
+	justify-content: space-between;
+	padding: 0 30rpx;
+	box-sizing: border-box;
+	background-color: #fff;
+	box-shadow: rgba(0, 0, 0, 0.15) 0px 5rpx 15rpx 0px;
+
+	.left {
+		flex: 1;
+		color: #333333;
+		font-size: 28rpx;
+		line-height: 106rpx;
+	}
+
+	.but {
+		width: 230rpx;
+		height: 90rpx;
+		background: #3874F6;
+		border-radius: 16rpx;
+		font-size: 28rpx;
+		font-weight: 600;
+		color: #FFFFFF;
+		margin-top: 10rpx;
+	}
+}
+
+.qty-box {
+	.title {
+		font-weight: bold;
+		text-align: center;
+		padding: 30rpx 20rpx 0;
+	}
+
+	.change-qty-box {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 30rpx;
+		box-sizing: border-box;
+	}
+}

+ 70 - 0
packageA/activity/bindingProduct/index.wxml

@@ -0,0 +1,70 @@
+<van-search class="search" value="{{ condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
+<van-tabs wx:if="{{packageList.length>1}}" active="{{ params.content.where.packagetypemx }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
+	<van-tab wx:for="{{packageList}}" wx:key="index" title="{{item}}" name='{{item}}' />
+</van-tabs>
+<custom id="Custom" isOldPrice='{{true}}' />
+<view style="height: 20rpx;" />
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<view wx:for="{{searchList}}" wx:key="itemid" class="item-box">
+		<view class="top" data-id="{{item[idname]}}" data-item="{{item}}">
+			<view class="image">
+				<van-image width="100%" height="100%" fit="cover" src="{{item.attinfos[0].subfiles[0].url||item.attinfos[0].url||item.cover||123123}}" use-loading-slot use-error-slot lazy-load>
+					<van-loading slot="loading" type="spinner" size="20" vertical />
+					<text slot="error">暂无图片</text>
+				</van-image>
+			</view>
+			<view class="content">
+				<view class="title line-1">
+					{{item.itemname}}
+				</view>
+				<view class="exp">编号:{{item.itemno}}</view>
+				<view class="exp">规格:{{item.standards ||" --"}}</view>
+				<view class="exp">型号:{{item.model ||" --"}}</view>
+				<view class="exp"><text style="font-size: 24rpx;font-weight: 600;color: #FF3B30;">{{handleHide.verify(item.showPrice||item.newPrice,'列表金额',privacyFieldC)}}</text><text style="font-size: 20rpx; text-decoration:line-through; margin-left: 6rpx;">{{handleHide.verify(item.newOldPrice||item.oldPrice,'列表金额',privacyFieldC)}}</text></view>
+				<view wx:if="{{item.iscustomsize}}" class="exp" data-item="{{item}}" catch:tap="customization" style="color:#085CDF;">
+					{{item.customText}}
+					<van-icon name="arrow-down" />
+				</view>
+				<view class="exp">特征码:{{item.signaturecode ||" --"}}</view>
+				<view class="exp">
+					包装数量:{{item.packageqty}} ({{item.unitname}})
+				</view>
+				<view class="exp">可购数量:{{item.groupqty==0?'不限购':(item.groupqty-item.saledqty)<=0?'已售罄':item.maxQty}} </view>
+				</view>
+			</view>
+
+			<view class="bottom">
+				<view class="check" bindtap="changeResults" data-item="{{item}}">
+					<view class="label-class" style="font-size: 26rpx;">
+						数量:
+					</view>
+				</view>
+				<van-stepper value="{{ item.orderminqty }}" min="{{item.orderminqty}}" max="{{item.maxQty||'99999999'}}" disabled="true" step="{{item.orderaddqty||1}}" input-class='input-class' data-index="{{index}}" data-iscatch="catch" catch:minus='stepperChange' catch:plus='stepperChange' catch:blur='inputBlur' />
+			</view>
+		</view>
+		<view style="height: 200rpx;" />
+		<Yl_Empty wx:if="{{searchList.length==0}}" />
+</Yl_ListBox>
+
+<van-dialog id="Dialog" use-slot show="{{ dialogShow }}" asyncClose confirm-button-color='#085CDF' show-cancel-button>
+	<view class="qty-box">
+		<view class="title">
+			{{params.content.where.packagetypemx}}
+		</view>
+		<view class="change-qty-box">
+			购买套数:
+			<van-stepper custom-class='stepper' value="{{ submitQty }}" integer min="1" max="99999999999" step="1" input-width='50px' button-size='30px' bind:change='changeQtySte' />
+		</view>
+	</view>
+</van-dialog>
+
+<!-- 底部 -->
+<view style="height: 130rpx;" />
+<view class="footer">
+	<view class="left">
+		选择:{{params.content.where.packagetypemx}}
+	</view>
+	<van-button custom-class='but' disabled="{{!list.length}}" bind:click="submit">{{butText}}</van-button>
+</view>
+
+<wxs src="/utils/hidePrice.wxs" module="handleHide" />

+ 33 - 14
packageA/activity/detail.js

@@ -172,21 +172,40 @@ Page({
 	},
 	/* 去下单 */
 	clickBut() {
-		wx.navigateTo({
-			url: '/packageA/activity/selectProduct/index?params=' + JSON.stringify({
-				"id": 20230116094803,
-				"version": 1,
-				"content": {
-					nocache: true,
-					sa_brandid: this.data.detail.sa_brandid,
-					sa_promotionid: this.data.sa_promotionid,
-					sa_promotion_itemgroupid: this.data.active,
-					"where": {
-						"condition": ""
+		if (this.data.detail.type == '套餐活动') {
+			wx.navigateTo({
+				url: '/packageA/activity/bindingProduct/index?params=' + JSON.stringify({
+					"id": 20230116094803,
+					"version": 1,
+					"content": {
+						nocache: true,
+						sa_brandid: this.data.detail.sa_brandid,
+						sa_promotionid: this.data.sa_promotionid,
+						sa_promotion_itemgroupid: this.data.active,
+						"where": {
+							"condition": "",
+							packagetypemx: "",
+						}
 					}
-				}
-			}),
-		});
+				}),
+			});
+		} else {
+			wx.navigateTo({
+				url: '/packageA/activity/selectProduct/index?params=' + JSON.stringify({
+					"id": 20230116094803,
+					"version": 1,
+					"content": {
+						nocache: true,
+						sa_brandid: this.data.detail.sa_brandid,
+						sa_promotionid: this.data.sa_promotionid,
+						sa_promotion_itemgroupid: this.data.active,
+						"where": {
+							"condition": ""
+						}
+					}
+				}),
+			});
+		}
 		getApp().globalData.handleSelect = this.creadedOrderForm.bind(this);
 	},
 	creadedOrderForm({

+ 114 - 13
packageA/activity/index.js

@@ -17,12 +17,6 @@ Page({
 	onLoad(options) {
 		this.getList()
 	},
-	/* 处理筛选 */
-	handleFilter({
-		detail
-	}) {
-		console.log(detail)
-	},
 	getList(init = false) {
 		if (init.detail != undefined) init = init.detail;
 		let content = this.data.content;
@@ -47,13 +41,120 @@ Page({
 			})
 		})
 	},
-	/* 	intervalTime(startTime, endTime) {
-			var timestamp = ,
-				startTamp = Date.parse(new Date(startTime)),
-				endTamp = Date.parse(new Date(endTime));
-			return endTamp - timestamp
-		}, */
-	/* 搜索 */
+	onClick({
+		detail
+	}) {
+		console.log(detail)
+		if (detail.type == '套餐活动') {
+			wx.navigateTo({
+				url: '/packageA/activity/bindingProduct/index?params=' + JSON.stringify({
+					"id": 20230116094803,
+					"version": 1,
+					"content": {
+						nocache: true,
+						sa_brandid: detail.sa_brandid,
+						sa_promotionid: detail.sa_promotionid,
+						packagetype: detail.packagetype,
+						"where": {
+							"condition": "",
+							packagetypemx: '',
+						}
+					}
+				}),
+			});
+			getApp().globalData.handleSelect = function ({
+				list
+			}) {
+				return handleSubmit(list)
+			}.bind(this);
+		} else {
+			wx.navigateTo({
+				url: '/packageA/activity/selectProduct/index?params=' + JSON.stringify({
+					"id": 20230116094803,
+					"version": 1,
+					"content": {
+						nocache: true,
+						sa_brandid: detail.sa_brandid,
+						sa_promotionid: detail.sa_promotionid,
+						"where": {
+							"condition": ""
+						}
+					}
+				}),
+			});
+			getApp().globalData.handleSelect = function ({
+				list
+			}) {
+				wx.showModal({
+					title: '提示',
+					content: '是否确定创建促销订单?',
+					complete: ({
+						confirm
+					}) => {
+						if (confirm) handleSubmit(list)
+					}
+				})
+			}.bind(this);
+		}
+
+		function handleSubmit(list) {
+			return new Promise((resolve) => {
+				wx.showLoading({
+					title: '生成中...',
+					mask: true
+				})
+				_Http.basic({
+					"id": 20221128183202,
+					"content": {
+						istool: 0,
+						type: "促销订单",
+						sa_orderid: 0,
+						sa_accountclassid: detail.sa_accountclassid,
+						rec_contactsid: 0,
+						pay_enterpriseid: 0,
+						sa_contractid: 0,
+						sa_projectid: 0,
+						sa_promotionid: detail.sa_promotionid,
+						sa_brandid: detail.sa_brandid, //品牌ID
+						type: "促销订单", //订单类型
+						tradefield: detail.tradefield.join(','), //必选
+						items: list.map(v => {
+							return {
+								sa_orderitemsid: 0,
+								itemid: v.itemid,
+								itemno: v.itemno,
+								qty: v.qty,
+								price: v.price,
+								length: v.length,
+								width: v.width,
+								sa_promotion_itemsid: v.sa_promotion_itemsid,
+								cheek: v.cheek,
+								color: v.color,
+								material: v.material,
+								spec: v.spec,
+								custom: v.custom
+							}
+						})
+					}
+				}).then(res => {
+					wx.hideLoading()
+					console.log("转化促销订单", res)
+					resolve(res.msg == '成功')
+					wx.showToast({
+						title: res.msg != '成功' ? res.msg : '创建成功',
+						icon: "none",
+						mask: res.msg == '成功'
+					});
+					if (res.msg == '成功') setTimeout(() => {
+						wx.redirectTo({
+							url: '/packageA/orderForm/detail?id=' + res.data.sa_orderid,
+						});
+						delete getApp().globalData.handleSelect
+					}, 500)
+				})
+			})
+		}
+	},
 	onSearch({
 		detail
 	}) {

+ 2 - 2
packageA/activity/index.wxml

@@ -6,7 +6,7 @@
 <view class="division" />
 <Yl_ListBox id='ListBox' bind:getlist='getList'>
 	<view style="height: 10rpx;" />
-	<List list="{{list}}" />
+	<List list="{{list}}" bind:onClick="onClick" />
 </Yl_ListBox>
 <!-- 筛选条件 -->
-<Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{false}}' />
+<Yl_Filtrate id='Filtrate' list="{{filter}}" dateRange='{{false}}' />

+ 14 - 0
packageA/activity/modules/list/index.js

@@ -1,7 +1,21 @@
 Component({
+  options: {
+    addGlobalClass: true,
+  },
   properties: {
     list: {
       type: Array
+    },
+    onClick: {
+      type: Function
+    }
+  },
+  methods: {
+    clickItem(e) {
+      const {
+        item
+      } = e.currentTarget.dataset;
+      this.triggerEvent("onClick", item)
     }
   }
 })

+ 2 - 2
packageA/activity/modules/list/index.wxml

@@ -1,4 +1,4 @@
-<navigator class="product" url="/packageA/activity/detail?id={{item.sa_promotionid}}" wx:for="{{list}}" wx:key="sa_promotionid">
+<view class="product" wx:for="{{list}}" wx:key="sa_promotionid" hover-class="navigator-hover" data-item="{{item}}" bind:tap="clickItem">
 	<view class="image-box">
 		<van-image width="100%" wx:if="{{item.attinfos[0]}}" height="100%" fit="cover" src="{{item.attinfos[0].subfiles[0].url||item.attinfos[0].url}}" use-loading-slot use-error-slot lazy-load>
 			<van-loading slot="loading" type="spinner" size="20" vertical />
@@ -27,5 +27,5 @@
 			<van-count-down time="{{ item.surplus }}" format="DD 天 HH 时 mm 分 ss 秒" />
 		</view>
 	</view>
-</navigator>
+</view>
 <Yl_Empty wx:if="{{list.length === 0}}" />

+ 21 - 0
project.private.config.json

@@ -10,6 +10,27 @@
   "condition": {
     "miniprogram": {
       "list": [
+        {
+          "name": "选择套餐",
+          "pathName": "packageA/activity/bindingProduct/index",
+          "query": "params=%7B%22id%22%3A20230116094803%2C%22version%22%3A1%2C%22content%22%3A%7B%22nocache%22%3Atrue%2C%22sa_brandid%22%3A49%2C%22sa_promotionid%22%3A4127%2C%22where%22%3A%7B%22condition%22%3A%22%22%2C%22packagetypemx%22%3A%22%22%7D%7D%7D",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "促销活动",
+          "pathName": "packageA/activity/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "套餐活动",
+          "pathName": "packageA/activity/detail",
+          "query": "id=4127",
+          "launchMode": "default",
+          "scene": null
+        },
         {
           "name": "打款凭证",
           "pathName": "packageA/remitVoucher/index",