|
@@ -139,9 +139,9 @@
|
|
<view class="purchase" v-if="produceType == 1" @click="goIntegralOrder(product_id)">
|
|
<view class="purchase" v-if="produceType == 1" @click="goIntegralOrder(product_id)">
|
|
<view class="purchase-btn">立即购买</view>
|
|
<view class="purchase-btn">立即购买</view>
|
|
</view>
|
|
</view>
|
|
- <view class="purchase" v-if="produceType == 2" @click="selectSpecs">
|
|
|
|
- <!-- <view class="purchase-btn">立即兑换</view> -->
|
|
|
|
- <view class="purchase-btn">确认</view>
|
|
|
|
|
|
+ <view class="purchase" v-if="produceType == 2" @click="selectSpecs(product_id)">
|
|
|
|
+ <view class="purchase-btn">立即兑换</view>
|
|
|
|
+ <!-- <view class="purchase-btn">确认</view> -->
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
<!-- 二维码购买 -->
|
|
<!-- 二维码购买 -->
|
|
@@ -351,8 +351,6 @@
|
|
this.$set(this.flavorIsActive, name, index)
|
|
this.$set(this.flavorIsActive, name, index)
|
|
this.specs.flavor=name
|
|
this.specs.flavor=name
|
|
if(Object.keys(this.flavorIsActive).length < this.sku.keys.length) return;
|
|
if(Object.keys(this.flavorIsActive).length < this.sku.keys.length) return;
|
|
-
|
|
|
|
-
|
|
|
|
for(let index=0; index < this.sku.sku.length; index++){
|
|
for(let index=0; index < this.sku.sku.length; index++){
|
|
const item = this.sku.sku[index];
|
|
const item = this.sku.sku[index];
|
|
let res = true;
|
|
let res = true;
|
|
@@ -363,27 +361,35 @@
|
|
}
|
|
}
|
|
if(res){
|
|
if(res){
|
|
this.productDetail.price = item.price;
|
|
this.productDetail.price = item.price;
|
|
|
|
+ this.productDetail.integral = item.price
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 重量切换
|
|
|
|
- weightchecked(index,name) {
|
|
|
|
- this.weightIsActive = index
|
|
|
|
- this.specs.weight=name
|
|
|
|
- },
|
|
|
|
- // 包装切换
|
|
|
|
- packchecked(index,name) {
|
|
|
|
- this.packIsActive = index
|
|
|
|
- this.specs.pack=name
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
+ // // 重量切换
|
|
|
|
+ // weightchecked(index,name) {
|
|
|
|
+ // this.weightIsActive = index
|
|
|
|
+ // this.specs.weight=name
|
|
|
|
+ // console.log(this.specs.weight);
|
|
|
|
+ // },
|
|
|
|
+ // // 包装切换
|
|
|
|
+ // packchecked(index,name) {
|
|
|
|
+ // this.packIsActive = index
|
|
|
|
+ // this.specs.pack=name
|
|
|
|
+ // console.log(this.specs.pack);
|
|
|
|
+ // },
|
|
// 选择规格
|
|
// 选择规格
|
|
- selectSpecs(){
|
|
|
|
- this.specs.flavor='五仁'
|
|
|
|
- this.specs.weight='50g'
|
|
|
|
- this.specs.pack='礼盒'
|
|
|
|
- console.log(this.specs)
|
|
|
|
- this.specsText=this.specs.flavor+'--'+this.specs.weight+'--'+this.specs.pack
|
|
|
|
|
|
+ selectSpecs(id){
|
|
|
|
+ // this.specs.flavor='五仁'
|
|
|
|
+ // this.specs.weight='50g'
|
|
|
|
+ // this.specs.pack='礼盒'
|
|
|
|
+ // console.log(this.specs)
|
|
|
|
+ // this.specsText=this.specs.flavor+'--'+this.specs.weight+'--'+this.specs.pack
|
|
|
|
+ console.log(1111);
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:'/pages/my/integral/integralOrder?product_id='+id
|
|
|
|
+ })
|
|
this.Recipientclose()
|
|
this.Recipientclose()
|
|
},
|
|
},
|
|
Recipientopen() {
|
|
Recipientopen() {
|
|
@@ -407,9 +413,9 @@
|
|
arr.push(flavorIsActive[key])
|
|
arr.push(flavorIsActive[key])
|
|
})
|
|
})
|
|
console.log(arr);
|
|
console.log(arr);
|
|
- // uni.navigateTo({
|
|
|
|
- // url:'/pages/my/integral/integralOrder?product_id='+id
|
|
|
|
- // })
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:'/pages/my/integral/integralOrder?product_id='+id
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 跳转积分兑换
|
|
// 跳转积分兑换
|
|
goIntegralOrder(id){
|
|
goIntegralOrder(id){
|