|
@@ -11,13 +11,15 @@
|
|
|
v-if='store_self_mention && is_shipping'></view>
|
|
|
</view>
|
|
|
<view class='address acea-row row-between-wrapper' @tap='onAddress' v-if='shippingType == 0'>
|
|
|
- <view class='addressCon' v-if="addressInfo.real_name">
|
|
|
- <view class='name'>{{addressInfo.real_name}}
|
|
|
+ <view class='addressCon' v-if="addressInfo.realName">
|
|
|
+ <view class='name'>{{addressInfo.realName}}
|
|
|
<text class='phone'>{{addressInfo.phone}}</text>
|
|
|
</view>
|
|
|
<view class="line1">
|
|
|
<text class='default font-num'
|
|
|
- v-if="addressInfo.is_default">[{{$t(`默认`)}}]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.detail}}
|
|
|
+ v-if="addressInfo.defaultState == 2">[{{$t(`默认`)}}]
|
|
|
+ </text>{{addressInfo.province}}{{addressInfo.city}}
|
|
|
+ {{addressInfo.district}}{{addressInfo.detail}}
|
|
|
</view>
|
|
|
<!-- <view class='setaddress'>设置收货地址</view> -->
|
|
|
</view>
|
|
@@ -46,24 +48,28 @@
|
|
|
</view>
|
|
|
<orderGoods :cartInfo="cartInfo" :is_confirm='true' :shipping_type="shippingType"></orderGoods>
|
|
|
<view class='wrapper'>
|
|
|
- <view class='item acea-row row-between-wrapper' @tap='couponTap'
|
|
|
+ <!-- <view class='item acea-row row-between-wrapper' @tap='couponTap'
|
|
|
v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && !advanceId">
|
|
|
<view>{{$t(`优惠券`)}}</view>
|
|
|
<view class='discount'>
|
|
|
{{couponTitle}}
|
|
|
<text class='iconfont icon-jiantou'></text>
|
|
|
</view>
|
|
|
+ </view> -->
|
|
|
+ <view class='item acea-row row-between-wrapper'>
|
|
|
+ <view>{{$t(`运费`)}}</view>
|
|
|
+ <view class='discount acea-row row-middle'>
|
|
|
+ <view>
|
|
|
+ <text class='num font-color'>{{freight || 0}}元</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class='item acea-row row-between-wrapper'
|
|
|
- v-if="!pinkId && !BargainId && !combinationId && !seckillId && !advanceId">
|
|
|
- <view>{{$t(`积分抵扣`)}}</view>
|
|
|
+ <view class='item acea-row row-between-wrapper'>
|
|
|
+ <view>{{$t(`赠送积分`)}}</view>
|
|
|
<view class='discount acea-row row-middle'>
|
|
|
- <view> {{useIntegral ? $t(`剩余积分`):$t(`当前积分`)}}
|
|
|
- <text class='num font-color'>{{integral || 0}}</text>
|
|
|
+ <view>
|
|
|
+ <text class='num font-color'>{{integral || 0}}红积分</text>
|
|
|
</view>
|
|
|
- <checkbox-group @change="ChangeIntegral">
|
|
|
- <checkbox :disabled="integral<=0 && !useIntegral" :checked='useIntegral ? true : false' />
|
|
|
- </checkbox-group>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-if="invoice_func || special_invoice" class='item acea-row row-between-wrapper' @tap="goInvoice">
|
|
@@ -169,12 +175,12 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class='moneyList'>
|
|
|
- <view class='item acea-row row-between-wrapper'>
|
|
|
+ <!-- <view class='item acea-row row-between-wrapper'>
|
|
|
<view>{{$t(`商品总价`)}}:</view>
|
|
|
<view class='money'>
|
|
|
{{$t(`¥`)}}{{(parseFloat(priceGroup.totalPrice)+parseFloat(priceGroup.vipPrice)).toFixed(2)}}
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
|
|
|
<view>{{$t(`配送运费`)}}:</view>
|
|
|
<view class='money'>
|
|
@@ -205,7 +211,7 @@
|
|
|
<text class='font-color'>{{$t(`¥`)}}{{totalPrice || 0}}</text>
|
|
|
</view>
|
|
|
<view class='settlement' style='z-index:100' @tap.stop="goPay"
|
|
|
- v-if="(valid_count>0&&!discount_id) || (valid_count==cartInfo.length&&discount_id)">{{$t(`立即支付`)}}
|
|
|
+ v-if="totalPrice > 0">{{$t(`立即支付`)}}
|
|
|
</view>
|
|
|
<view class='settlement bg-color-hui' style='z-index:100' v-else>{{$t(`立即支付`)}}</view>
|
|
|
</view>
|
|
@@ -218,7 +224,7 @@
|
|
|
<!-- #ifdef MP -->
|
|
|
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
|
|
|
<!-- #endif -->
|
|
|
- <home v-show="!invShow"></home>
|
|
|
+ <!-- <home v-show="!invShow"></home> -->
|
|
|
<invoice-picker :inv-show="invShow" :inv-list="invList" :inv-checked="invChecked" :is-special="special_invoice"
|
|
|
:url-query="urlQuery" @inv-close="invClose" @inv-change="invChange" @inv-cancel="invCancel">
|
|
|
</invoice-picker>
|
|
@@ -230,6 +236,9 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ getGoodsDetail, getUserAddressByUserId, postBeforeCheck,getUserAddressByIdAndFreight
|
|
|
+ } from "@/api/home.js";
|
|
|
import {
|
|
|
orderConfirm,
|
|
|
getCouponsOrderPrice,
|
|
@@ -255,7 +264,7 @@
|
|
|
} from '@/config/cache.js';
|
|
|
import couponListWindow from '@/components/couponListWindow';
|
|
|
import addressWindow from '@/components/addressWindow';
|
|
|
- import orderGoods from '@/components/orderGoods';
|
|
|
+ import orderGoods from '@/components/orderGoods/index_mall';
|
|
|
import home from '@/components/home';
|
|
|
import invoicePicker from '../components/invoicePicker/index.vue';
|
|
|
import {
|
|
@@ -306,33 +315,33 @@
|
|
|
title: this.$t(`使用微信快捷支付`),
|
|
|
payStatus: 1,
|
|
|
},
|
|
|
- {
|
|
|
- "name": this.$t(`支付宝支付`),
|
|
|
- "icon": "icon-zhifubao",
|
|
|
- value: 'alipay',
|
|
|
- title: this.$t(`使用支付宝支付`),
|
|
|
- payStatus: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- "name": this.$t(`余额支付`),
|
|
|
- "icon": "icon-yuezhifu",
|
|
|
- value: 'yue',
|
|
|
- title: this.$t(`可用余额`),
|
|
|
- payStatus: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- "name": this.$t(`线下支付`),
|
|
|
- "icon": "icon-yuezhifu1",
|
|
|
- value: 'offline',
|
|
|
- title: this.$t(`使用线下付款`),
|
|
|
- payStatus: 2,
|
|
|
- }, {
|
|
|
- "name": this.$t(`好友代付`),
|
|
|
- "icon": "icon-haoyoudaizhifu",
|
|
|
- value: 'friend',
|
|
|
- title: this.$t(`找微信好友支付`),
|
|
|
- payStatus: 1,
|
|
|
- }
|
|
|
+ // {
|
|
|
+ // "name": this.$t(`支付宝支付`),
|
|
|
+ // "icon": "icon-zhifubao",
|
|
|
+ // value: 'alipay',
|
|
|
+ // title: this.$t(`使用支付宝支付`),
|
|
|
+ // payStatus: 1,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // "name": this.$t(`余额支付`),
|
|
|
+ // "icon": "icon-yuezhifu",
|
|
|
+ // value: 'yue',
|
|
|
+ // title: this.$t(`可用余额`),
|
|
|
+ // payStatus: 1,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // "name": this.$t(`线下支付`),
|
|
|
+ // "icon": "icon-yuezhifu1",
|
|
|
+ // value: 'offline',
|
|
|
+ // title: this.$t(`使用线下付款`),
|
|
|
+ // payStatus: 2,
|
|
|
+ // }, {
|
|
|
+ // "name": this.$t(`好友代付`),
|
|
|
+ // "icon": "icon-haoyoudaizhifu",
|
|
|
+ // value: 'friend',
|
|
|
+ // title: this.$t(`找微信好友支付`),
|
|
|
+ // payStatus: 1,
|
|
|
+ // }
|
|
|
],
|
|
|
virtual_type: 0,
|
|
|
formContent: '',
|
|
@@ -391,7 +400,7 @@
|
|
|
isShowAuth: false, //是否隐藏授权
|
|
|
from: '',
|
|
|
news: 1,
|
|
|
-
|
|
|
+ num: 0,
|
|
|
// invTitle: '不开发票',
|
|
|
invTitle: this.$t(`不开发票`),
|
|
|
special_invoice: false,
|
|
@@ -408,6 +417,8 @@
|
|
|
is_shipping: true,
|
|
|
inputTrip: false,
|
|
|
focus: true,
|
|
|
+ goodsSpecId: 0,
|
|
|
+ freight: 0
|
|
|
};
|
|
|
},
|
|
|
computed: mapGetters(['isLogin']),
|
|
@@ -429,17 +440,19 @@
|
|
|
// #ifdef APP-PLUS
|
|
|
this.from = 'app'
|
|
|
// #endif
|
|
|
- if (!options.cartId) return this.$util.Tips({
|
|
|
+ if (!options.productId) return this.$util.Tips({
|
|
|
title: this.$t(`请选择要购买的商品`)
|
|
|
}, {
|
|
|
tab: 3,
|
|
|
url: 1
|
|
|
});
|
|
|
+ this.num = options.num || 0;
|
|
|
+ this.goodsSpecId = options.goodsSpecId || 0;
|
|
|
this.couponId = options.couponId || 0;
|
|
|
this.noCoupon = Number(options.noCoupon) || 0;
|
|
|
this.pinkId = options.pinkId ? parseInt(options.pinkId) : 0;
|
|
|
this.addressId = options.addressId || 0;
|
|
|
- this.cartId = options.cartId;
|
|
|
+ this.cartId = options.productId;
|
|
|
this.is_address = options.is_address ? true : false;
|
|
|
this.news = !options.new || options.new === '0' ? 0 : 1;
|
|
|
this.invChecked = options.invoice_id || '';
|
|
@@ -484,37 +497,39 @@
|
|
|
methods: {
|
|
|
checkShipping() {
|
|
|
let that = this;
|
|
|
- checkShipping(that.cartId, that.news).then(res => {
|
|
|
- if (res.data.type == 0) {
|
|
|
- that.is_shipping = true;
|
|
|
- that.shippingType = 0;
|
|
|
- this.getaddressInfo();
|
|
|
- this.getConfirm();
|
|
|
- this.$nextTick(function() {
|
|
|
- this.$refs.addressWindow.getAddressList();
|
|
|
- })
|
|
|
- } else {
|
|
|
- if (res.data.type == 1) {
|
|
|
- that.is_shipping = false;
|
|
|
- that.shippingType = 0;
|
|
|
- this.getaddressInfo();
|
|
|
- this.getConfirm();
|
|
|
- this.$nextTick(function() {
|
|
|
- this.$refs.addressWindow.getAddressList();
|
|
|
- })
|
|
|
- } else if (res.data.type == 2) {
|
|
|
- that.is_shipping = false;
|
|
|
- that.shippingType = 1;
|
|
|
- this.getConfirm();
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- uni.showToast({
|
|
|
- title: err,
|
|
|
- icon: 'none'
|
|
|
- });
|
|
|
- });
|
|
|
+ this.getConfirm();
|
|
|
+ this.getaddressInfo();
|
|
|
+ // checkShipping(that.cartId, that.news).then(res => {
|
|
|
+ // if (res.data.type == 0) {
|
|
|
+ // that.is_shipping = true;
|
|
|
+ // that.shippingType = 0;
|
|
|
+ // this.getaddressInfo();
|
|
|
+ // this.getConfirm();
|
|
|
+ // this.$nextTick(function() {
|
|
|
+ // this.$refs.addressWindow.getAddressList();
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // if (res.data.type == 1) {
|
|
|
+ // that.is_shipping = false;
|
|
|
+ // that.shippingType = 0;
|
|
|
+ // this.getaddressInfo();
|
|
|
+ // this.getConfirm();
|
|
|
+ // this.$nextTick(function() {
|
|
|
+ // this.$refs.addressWindow.getAddressList();
|
|
|
+ // })
|
|
|
+ // } else if (res.data.type == 2) {
|
|
|
+ // that.is_shipping = false;
|
|
|
+ // that.shippingType = 1;
|
|
|
+ // this.getConfirm();
|
|
|
+ // this.getList();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }).catch(err => {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: err,
|
|
|
+ // icon: 'none'
|
|
|
+ // });
|
|
|
+ // });
|
|
|
},
|
|
|
// 不开发票
|
|
|
invCancel() {
|
|
@@ -641,24 +656,46 @@
|
|
|
this.computedPrice()
|
|
|
},
|
|
|
computedPrice: function() {
|
|
|
- let shippingType = this.shippingType;
|
|
|
- postOrderComputed(this.orderKey, {
|
|
|
- addressId: this.addressId,
|
|
|
- useIntegral: this.useIntegral ? 1 : 0,
|
|
|
- couponId: this.couponId,
|
|
|
- shipping_type: parseInt(shippingType) + 1,
|
|
|
- payType: this.payType
|
|
|
- }).then(res => {
|
|
|
- let result = res.data.result;
|
|
|
- if (result) {
|
|
|
- this.totalPrice = result.pay_price;
|
|
|
- this.integral_price = result.deduction_price;
|
|
|
- this.coupon_price = result.coupon_price;
|
|
|
- this.integral = this.useIntegral ? result.SurplusIntegral : this.usable_integral;
|
|
|
- this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
|
|
|
- this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
|
|
|
+ let that = this
|
|
|
+ postBeforeCheck({
|
|
|
+ goodsSpecId: this.goodsSpecId,
|
|
|
+ num: this.num,
|
|
|
+ userAddressId: this.addressId
|
|
|
+ }).then(function (res) {
|
|
|
+ //验证是否可下单
|
|
|
+ if (res.code == 200) {
|
|
|
+ that.freight = res.data.freight - 0
|
|
|
+ that.totalPrice = res.data.freight - 0
|
|
|
+ that.cartInfo.forEach(e =>{
|
|
|
+ that.totalPrice += e.salePrice - 0
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.totalPrice = 0
|
|
|
+ that.$util.Tips({
|
|
|
+ title: that.$t(`所选商品属性不支持下单`),
|
|
|
+ success: () => {
|
|
|
+ // that.getCartCount(true);
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
+ // postOrderComputed(this.orderKey, {
|
|
|
+ // addressId: this.addressId,
|
|
|
+ // useIntegral: this.useIntegral ? 1 : 0,
|
|
|
+ // couponId: this.couponId,
|
|
|
+ // shipping_type: parseInt(shippingType) + 1,
|
|
|
+ // payType: this.payType
|
|
|
+ // }).then(res => {
|
|
|
+ // let result = res.data.result;
|
|
|
+ // if (result) {
|
|
|
+ // this.totalPrice = result.pay_price;
|
|
|
+ // this.integral_price = result.deduction_price;
|
|
|
+ // this.coupon_price = result.coupon_price;
|
|
|
+ // this.integral = this.useIntegral ? result.SurplusIntegral : this.usable_integral;
|
|
|
+ // this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result.pay_postage);
|
|
|
+ // this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
addressType(e) {
|
|
|
let index = e;
|
|
@@ -781,64 +818,86 @@
|
|
|
title: that.$t(`正在加载中`),
|
|
|
mask: true
|
|
|
});
|
|
|
- orderConfirm(that.cartId, that.news, that.addressId, that.shippingType + 1).then(res => {
|
|
|
- that.$set(that, 'userInfo', res.data.userInfo);
|
|
|
- that.$set(that, 'confirm', res.data.custom_form || []);
|
|
|
- this.confirm.map(e => {
|
|
|
- if (e.label === 'img') e.value = []
|
|
|
- })
|
|
|
- that.$set(that, 'integral', res.data.usable_integral);
|
|
|
- that.$set(that, 'usable_integral', res.data.usable_integral);
|
|
|
- that.$set(that, 'contacts', res.data.userInfo.real_name);
|
|
|
- that.$set(that, 'contactsTel', res.data.userInfo.record_phone === '0' ? '' : res.data
|
|
|
- .userInfo.record_phone);
|
|
|
- that.$set(that, 'cartInfo', res.data.cartInfo);
|
|
|
- that.$set(that, 'integralRatio', res.data.integralRatio);
|
|
|
- that.$set(that, 'offlinePostage', res.data.offlinePostage);
|
|
|
- that.$set(that, 'orderKey', res.data.orderKey);
|
|
|
- that.$set(that, 'valid_count', res.data.valid_count);
|
|
|
- that.$set(that, 'discount_id', res.data.discount_id)
|
|
|
- that.$set(that, 'priceGroup', res.data.priceGroup);
|
|
|
- that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice),
|
|
|
- parseFloat(res.data
|
|
|
- .priceGroup.storePostage)));
|
|
|
- that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
|
|
|
- that.$set(that, 'invoice_func', res.data.invoice_func);
|
|
|
- that.$set(that, 'special_invoice', res.data.special_invoice);
|
|
|
- that.$set(that, 'store_self_mention', res.data.store_self_mention);
|
|
|
- that.$set(that, 'virtual_type', res.data.virtual_type || 0);
|
|
|
- //微信支付是否开启
|
|
|
- that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
|
|
|
- //支付宝是否开启
|
|
|
- that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
|
|
|
- //#ifdef MP
|
|
|
- that.cartArr[1].payStatus = 0;
|
|
|
- //#endif
|
|
|
- //余额支付是否开启
|
|
|
- // that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
|
|
|
- that.cartArr[2].number = res.data.userInfo.now_money;
|
|
|
- that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
|
|
|
- if (res.data.offline_pay_status == 2 || res.data.deduction) {
|
|
|
- that.cartArr[3].payStatus = 0
|
|
|
- } else {
|
|
|
- that.cartArr[3].payStatus = 1
|
|
|
- }
|
|
|
- //好友代付是否开启
|
|
|
- that.cartArr[4].payStatus = res.data.friend_pay_status || 0;
|
|
|
- // that.$set(that, 'cartArr', that.cartArr);
|
|
|
- that.$set(that, 'ChangePrice', that.totalPrice);
|
|
|
- that.getBargainId();
|
|
|
- that.getCouponList();
|
|
|
- if (this.addressId) {
|
|
|
- this.computedPrice();
|
|
|
- }
|
|
|
+ getGoodsDetail({ id: that.cartId })
|
|
|
+ .then((res) => {
|
|
|
+ this.cartInfo = []
|
|
|
+ let porject = res.data
|
|
|
+ //找出选择的规格
|
|
|
+ porject.goodsSpecList.forEach(element => {
|
|
|
+ if (that.goodsSpecId == element.id){
|
|
|
+ porject.unit = element.spceName
|
|
|
+ }
|
|
|
+ });
|
|
|
+ porject.totalSales = this.num
|
|
|
+ // 计算总价
|
|
|
+ this.totalPrice = (this.num - 0) * (porject.salePrice - 0) + this.freight
|
|
|
+ this.cartInfo.push(porject)
|
|
|
uni.hideLoading()
|
|
|
- }).catch(err => {
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
uni.hideLoading()
|
|
|
return this.$util.Tips({
|
|
|
title: err
|
|
|
});
|
|
|
});
|
|
|
+ // orderConfirm(that.cartId, that.news, that.addressId, that.shippingType + 1).then(res => {
|
|
|
+ // that.$set(that, 'userInfo', res.data.userInfo);
|
|
|
+ // that.$set(that, 'confirm', res.data.custom_form || []);
|
|
|
+ // this.confirm.map(e => {
|
|
|
+ // if (e.label === 'img') e.value = []
|
|
|
+ // })
|
|
|
+ // that.$set(that, 'integral', res.data.usable_integral);
|
|
|
+ // that.$set(that, 'usable_integral', res.data.usable_integral);
|
|
|
+ // that.$set(that, 'contacts', res.data.userInfo.real_name);
|
|
|
+ // that.$set(that, 'contactsTel', res.data.userInfo.record_phone === '0' ? '' : res.data
|
|
|
+ // .userInfo.record_phone);
|
|
|
+ // that.$set(that, 'cartInfo', res.data.cartInfo);
|
|
|
+ // that.$set(that, 'integralRatio', res.data.integralRatio);
|
|
|
+ // that.$set(that, 'offlinePostage', res.data.offlinePostage);
|
|
|
+ // that.$set(that, 'orderKey', res.data.orderKey);
|
|
|
+ // that.$set(that, 'valid_count', res.data.valid_count);
|
|
|
+ // that.$set(that, 'discount_id', res.data.discount_id)
|
|
|
+ // that.$set(that, 'priceGroup', res.data.priceGroup);
|
|
|
+ // that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice),
|
|
|
+ // parseFloat(res.data
|
|
|
+ // .priceGroup.storePostage)));
|
|
|
+ // that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
|
|
|
+ // that.$set(that, 'invoice_func', res.data.invoice_func);
|
|
|
+ // that.$set(that, 'special_invoice', res.data.special_invoice);
|
|
|
+ // that.$set(that, 'store_self_mention', res.data.store_self_mention);
|
|
|
+ // that.$set(that, 'virtual_type', res.data.virtual_type || 0);
|
|
|
+ // //微信支付是否开启
|
|
|
+ // that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
|
|
|
+ // //支付宝是否开启
|
|
|
+ // that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
|
|
|
+ // //#ifdef MP
|
|
|
+ // that.cartArr[1].payStatus = 0;
|
|
|
+ // //#endif
|
|
|
+ // //余额支付是否开启
|
|
|
+ // // that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
|
|
|
+ // that.cartArr[2].number = res.data.userInfo.now_money;
|
|
|
+ // that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
|
|
|
+ // if (res.data.offline_pay_status == 2 || res.data.deduction) {
|
|
|
+ // that.cartArr[3].payStatus = 0
|
|
|
+ // } else {
|
|
|
+ // that.cartArr[3].payStatus = 1
|
|
|
+ // }
|
|
|
+ // //好友代付是否开启
|
|
|
+ // that.cartArr[4].payStatus = res.data.friend_pay_status || 0;
|
|
|
+ // // that.$set(that, 'cartArr', that.cartArr);
|
|
|
+ // that.$set(that, 'ChangePrice', that.totalPrice);
|
|
|
+ // that.getBargainId();
|
|
|
+ // that.getCouponList();
|
|
|
+ // if (this.addressId) {
|
|
|
+ // this.computedPrice();
|
|
|
+ // }
|
|
|
+ // uni.hideLoading()
|
|
|
+ // }).catch(err => {
|
|
|
+ // uni.hideLoading()
|
|
|
+ // return this.$util.Tips({
|
|
|
+ // title: err
|
|
|
+ // });
|
|
|
+ // });
|
|
|
},
|
|
|
/*
|
|
|
* 提取砍价和拼团id
|
|
@@ -886,7 +945,7 @@
|
|
|
getaddressInfo: function() {
|
|
|
let that = this;
|
|
|
if (that.addressId) {
|
|
|
- getAddressDetail(that.addressId).then(res => {
|
|
|
+ getUserAddressByIdAndFreight({id:that.addressId}).then(res => {
|
|
|
res.data.is_default = parseInt(res.data.is_default);
|
|
|
that.addressInfo = res.data || {};
|
|
|
that.addressId = res.data.id || 0;
|