|
@@ -106,13 +106,13 @@
|
|
|
<view style="display: flex; align-items: center; width: 90%">
|
|
|
<view class="attr-txt"> 送至: </view>
|
|
|
<view class="atterTxt line1" style="width: 82%">{{
|
|
|
- attrValue
|
|
|
+ attrAddrValue
|
|
|
}}</view>
|
|
|
</view>
|
|
|
<u-icon name="more-dot-fill"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="attribute acea-row row-between-wrapper skeleton-rect" @click="selecAttr">
|
|
|
+ <!-- <view class="attribute acea-row row-between-wrapper skeleton-rect" @click="selecAttr">
|
|
|
<view class="flex">
|
|
|
<view style="display: flex; align-items: center; width: 90%">
|
|
|
<view class="attr-txt"> 参数: </view>
|
|
@@ -122,7 +122,7 @@
|
|
|
</view>
|
|
|
<u-icon name="more-dot-fill"></u-icon>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<view class="userEvaluation skeleton-rect" id="past1" v-if="replyCount">
|
|
|
<view class="title acea-row row-between-wrapper">
|
|
@@ -324,7 +324,7 @@
|
|
|
<script>
|
|
|
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
|
|
|
import {
|
|
|
- getGoodsDetail
|
|
|
+ getGoodsDetail,getUserAddressByUserId
|
|
|
} from "@/api/home.js";
|
|
|
import {
|
|
|
getProductDetail,
|
|
@@ -406,6 +406,7 @@ export default {
|
|
|
data() {
|
|
|
let that = this;
|
|
|
return {
|
|
|
+ attrAddrValue: '请选择收获地址',
|
|
|
imgHost: HTTP_REQUEST_URL,
|
|
|
sysHeight: sysHeight,
|
|
|
a: false,
|
|
@@ -463,6 +464,7 @@ export default {
|
|
|
cartAttr: false,
|
|
|
productAttr: [],
|
|
|
productSelect: {},
|
|
|
+ attrValueId: 0 //已选属性Id
|
|
|
},
|
|
|
description: "",
|
|
|
navActive: 0,
|
|
@@ -496,7 +498,7 @@ export default {
|
|
|
svip_price_open: 1
|
|
|
};
|
|
|
},
|
|
|
- computed: mapGetters(["isLogin"]),
|
|
|
+ computed: mapGetters(["isLogin","uid","userInfo"]),
|
|
|
watch: {
|
|
|
isLogin: {
|
|
|
handler: function (newV, oldV) {
|
|
@@ -847,49 +849,17 @@ export default {
|
|
|
* 属性变动赋值
|
|
|
*
|
|
|
*/
|
|
|
- ChangeAttr: function (res) {
|
|
|
- let productSelect = this.productValue[res];
|
|
|
- // console.log(productSelect)
|
|
|
- if (!productSelect) {
|
|
|
+ ChangeAttr: function (item) {
|
|
|
+ if (!item.id) {
|
|
|
this.$util.Tips({
|
|
|
title: this.$t(`重新选择`),
|
|
|
success: () => {
|
|
|
- this.a = true
|
|
|
- this.attr.productSelect.stock = 0
|
|
|
- this.attr.productSelect.quota = 0
|
|
|
- this.attr.productSelect.cart_num = 0
|
|
|
+
|
|
|
},
|
|
|
});
|
|
|
} else {
|
|
|
- this.a = false
|
|
|
- }
|
|
|
- this.$set(this, "selectSku", productSelect);
|
|
|
- if (productSelect && productSelect.stock > 0) {
|
|
|
- this.$set(this.attr.productSelect, "image", productSelect.image);
|
|
|
- this.$set(this.attr.productSelect, "price", productSelect.price);
|
|
|
- this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
|
|
- this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
|
|
- this.$set(this.attr.productSelect, "cart_num", 1);
|
|
|
- this.$set(
|
|
|
- this.attr.productSelect,
|
|
|
- "vip_price",
|
|
|
- productSelect.vip_price
|
|
|
- );
|
|
|
- this.$set(this, "attrValue", res);
|
|
|
- this.$set(this, "attrTxt", this.$t(`已选择`));
|
|
|
- } else {
|
|
|
- this.$set(this.attr.productSelect, "image", productSelect.image);
|
|
|
- this.$set(this.attr.productSelect, "price", productSelect.price);
|
|
|
- this.$set(this.attr.productSelect, "stock", 0);
|
|
|
- this.$set(this.attr.productSelect, "unique", "");
|
|
|
- this.$set(this.attr.productSelect, "cart_num", 0);
|
|
|
- this.$set(
|
|
|
- this.attr.productSelect,
|
|
|
- "vip_price",
|
|
|
- this.storeInfo.vip_price
|
|
|
- );
|
|
|
- this.$set(this, "attrValue", "");
|
|
|
- this.$set(this, "attrTxt", this.$t(`请选择`));
|
|
|
+ this.attrValue = this.skuArr[0].spceName
|
|
|
+ this.attr.attrValueId = item.id
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
@@ -1008,8 +978,14 @@ export default {
|
|
|
*
|
|
|
*/
|
|
|
DefaultSelect: function () {
|
|
|
- this.attrTxt = '12'
|
|
|
- this.attrValue = '34'
|
|
|
+ this.attrValue = this.skuArr[0].spceName
|
|
|
+ this.attr.attrValueId = this.skuArr[0].id
|
|
|
+ getUserAddressByUserId({
|
|
|
+ userId: this.$store.state.app.uid,
|
|
|
+ type: 1
|
|
|
+ }).then(res => {
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
/**
|
|
|
* 获取优惠券
|