|
@@ -424,7 +424,7 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
applySeckillPriceIfNeeded() {
|
|
applySeckillPriceIfNeeded() {
|
|
|
if (!this.isSeckillActive) return;
|
|
if (!this.isSeckillActive) return;
|
|
|
- // 只在首次覆盖时记下原价类型,切规格不要覆盖这份快照
|
|
|
|
|
|
|
+ // 首次覆盖时记下当前规格原价;切规格时由 applySpecSelection 主动更新为新规格快照
|
|
|
if (!this._originPriceSnapshot) {
|
|
if (!this._originPriceSnapshot) {
|
|
|
this._originPriceSnapshot = {
|
|
this._originPriceSnapshot = {
|
|
|
priceType: Number(this.data.priceType),
|
|
priceType: Number(this.data.priceType),
|
|
@@ -715,6 +715,13 @@ export default {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this.specIndex = index;
|
|
this.specIndex = index;
|
|
|
|
|
+ // 秒杀价覆盖期间切规格,要同步保存新规格原价,活动结束后才能恢复当前选中规格的真实状态
|
|
|
|
|
+ if (this.isSeckillActive) {
|
|
|
|
|
+ this._originPriceSnapshot = {
|
|
|
|
|
+ priceType: Number(spec.priceType),
|
|
|
|
|
+ price: spec.price,
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
this.data = {
|
|
this.data = {
|
|
|
...this.data,
|
|
...this.data,
|
|
|
price: spec.price,
|
|
price: spec.price,
|