shish 1 lună în urmă
părinte
comite
939d93d074
1 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 4 1
      mallApp/src/pages/item/item.vue

+ 4 - 1
mallApp/src/pages/item/item.vue

@@ -339,6 +339,7 @@ export default {
 
 			if(this.option.hdId && Number(this.option.hdId) > 0){
 				this.hdId = this.option.hdId
+				uni.setStorageSync('hdId', this.hdId)
 			}
 
 			const shopId = uni.getStorageSync('account')
@@ -356,6 +357,8 @@ export default {
 						if(Number(this.hdId) == 0){
 							this.hdId = res.data.hd.id
 						}
+						// 解决新用户扫码登录后,限购接口报“没有找到花店”的Bug,需要同步更新缓存中的 hdId
+						uni.setStorageSync('hdId', res.data.hd.id)
 					}
 
 					//保存当前所在门店信息
@@ -513,7 +516,7 @@ export default {
 						}
 					})
 				if (newList.length > 0) {
-					getLimitBuyInfo({ ghsId, list: newList }).then(res => {
+					getLimitBuyInfo({ ghsId,account: account, hdId: this.hdId, list: newList }).then(res => {
 						const limitBuyInfo = Array.isArray(res.data) ? res.data : []
 						const warnList = limitBuyInfo.filter(item => item.specialPrice === false && item.reachLimitBuyNum === true)
 						if (warnList.length > 0) {