1
This commit is contained in:
parent
c06a2c862c
commit
6d7c1384ce
@ -3,8 +3,8 @@
|
|||||||
<view style="height: var(--status-bar-height);"></view>
|
<view style="height: var(--status-bar-height);"></view>
|
||||||
|
|
||||||
<view class="v-navbar">
|
<view class="v-navbar">
|
||||||
<u-navbar title="面对面收款" @rightClick="rightClick" :autoBack="true" :fixed="false" bgColor="transparent"
|
<u-navbar title="面对面收款" :autoBack="true" :fixed="false" bgColor="transparent" leftIconColor="#fff"
|
||||||
leftIconColor="#fff" :titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
|
:titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<view class="v-con-input">
|
<view class="v-con-input">
|
||||||
<u--input type="number" maxlength="5" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
|
<u--input type="number" maxlength="5" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
|
||||||
border="none" placeholderStyle="color:#999;font-size:30rpx">
|
border="none" placeholderStyle="color:#999;font-size:30rpx">
|
||||||
<u--text size="23" color="#303133" text="¥" slot="prefix" margin="0 3px 0 0" type="tips"></u--text>
|
<u-text size="23" color="#303133" text="¥" slot="prefix" margin="0 3px 0 0" type="tips"></u-text>
|
||||||
</u-input>
|
</u-input>
|
||||||
</u--input>
|
</u--input>
|
||||||
</view>
|
</view>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="viewColor">
|
<view :style="viewColor">
|
||||||
|
<view style="height: var(--status-bar-height);"></view>
|
||||||
<view class='order-submission'>
|
<view class='order-submission'>
|
||||||
|
|
||||||
<!-- 商品信息 -->
|
<!-- 商品信息 -->
|
||||||
<view class="storeinfo-wrapper">
|
<view class="storeinfo-wrapper">
|
||||||
<view class="store-item">
|
<view class="store-item">
|
||||||
@ -172,7 +172,9 @@
|
|||||||
import {
|
import {
|
||||||
orderPay
|
orderPay
|
||||||
} from "@/api/payment.js";
|
} from "@/api/payment.js";
|
||||||
import { Toast } from '../../libs/uniApi';
|
import {
|
||||||
|
Toast
|
||||||
|
} from '../../libs/uniApi';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -407,29 +409,6 @@ import { Toast } from '../../libs/uniApi';
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
/*预售协议*/
|
|
||||||
getPresellAgree: function() {
|
|
||||||
this.showProtocol = true
|
|
||||||
this.agrementTtile = '预售协议'
|
|
||||||
presellAgreement().then(res => {
|
|
||||||
this.protocol = res.data.sys_product_presell_agree;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeIsAgree: function(e) {
|
|
||||||
this.isAgree = !this.isAgree;
|
|
||||||
},
|
|
||||||
changeIntegral: function(e) {
|
|
||||||
this.use_integral = !this.use_integral;
|
|
||||||
this.getConfirm(this.addressId);
|
|
||||||
},
|
|
||||||
showPresellAgree() {
|
|
||||||
this.getPresellAgree()
|
|
||||||
},
|
|
||||||
|
|
||||||
showCoupon() {
|
|
||||||
this.getCouponAgreement();
|
|
||||||
},
|
|
||||||
|
|
||||||
// 图片预览
|
// 图片预览
|
||||||
// 获得相册 idx
|
// 获得相册 idx
|
||||||
getPhotoClickIdx(e) {
|
getPhotoClickIdx(e) {
|
||||||
@ -468,125 +447,6 @@ import { Toast } from '../../libs/uniApi';
|
|||||||
// this.$scope.selectComponent('#address-window').getAddressList();
|
// this.$scope.selectComponent('#address-window').getAddressList();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// 授权关闭
|
|
||||||
authColse: function(e) {
|
|
||||||
this.isShowAuth = e;
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ChangCouponsClone: function() {
|
|
||||||
this.$set(this.coupon, 'status', false);
|
|
||||||
},
|
|
||||||
changeTextareaStatus: function() {
|
|
||||||
for (let i = 0, len = this.coupon.list.length; i < len; i++) {
|
|
||||||
this.coupon.list[i].use_title = '';
|
|
||||||
this.coupon.list[i].is_use = 0;
|
|
||||||
}
|
|
||||||
this.textareaStatus = true;
|
|
||||||
this.status = 0;
|
|
||||||
this.$set(this.coupon, 'list', this.coupon.list);
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前订单详细信息
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
getConfirm: function(address_id) {
|
|
||||||
let that = this;
|
|
||||||
uni.showLoading({
|
|
||||||
title: '',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
getOrderConfirm({
|
|
||||||
cart_id: that.cartId.split(","),
|
|
||||||
address_id: address_id,
|
|
||||||
takes: that.take,
|
|
||||||
consumption_id: this.consumption_id,
|
|
||||||
use_coupon: that.subCoupon,
|
|
||||||
use_integral: that.use_integral,
|
|
||||||
product_type: that.product_type,
|
|
||||||
source: that.source
|
|
||||||
}).then(res => {
|
|
||||||
// 默认选中
|
|
||||||
that.product_type = res.data.order_type
|
|
||||||
that.is_take = false;
|
|
||||||
that.platformConsumption = res.data.platformConsumption;
|
|
||||||
res.data.order.forEach(el => {
|
|
||||||
if (el.order.isTake == 1) that.is_take = true
|
|
||||||
el.isTake = 0
|
|
||||||
that.subCoupon[el.mer_id] = []
|
|
||||||
el.coupon.forEach(coupon => {
|
|
||||||
if (coupon.checked) {
|
|
||||||
that.subCoupon[el.mer_id].push(coupon.coupon_user_id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
that.subCoupon['0'] = []
|
|
||||||
if (res.data.platformCoupon?.length > 0) {
|
|
||||||
res.data.platformCoupon.forEach(el => {
|
|
||||||
if (el.checked) {
|
|
||||||
that.subCoupon[el.mer_id] = []
|
|
||||||
that.subCoupon[el.mer_id].push(el.coupon_user_id)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else res.data.platformCoupon = [];
|
|
||||||
that.consumption_money = res.data.consumption_money;
|
|
||||||
that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data
|
|
||||||
.order[that.couponIndex].coupon);
|
|
||||||
that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds
|
|
||||||
.length);
|
|
||||||
that.$set(that, "coupon_amount", parseFloat(res.data.order[that.couponIndex].order
|
|
||||||
.coupon_price) + parseFloat(res.data.total_platform_coupon_price));
|
|
||||||
that.$set(that, "store_coupon_amount", parseFloat(res.data.order[that.couponIndex].order
|
|
||||||
.coupon_price));
|
|
||||||
that.$set(that, "plant_coupon_amount", parseFloat(res.data.total_platform_coupon_price));
|
|
||||||
that.$set(that, 'couponData', res.data);
|
|
||||||
that.$set(that, 'cartInfo', res.data.order);
|
|
||||||
that.$set(that, 'total_platform_coupon_price', res.data.total_platform_coupon_price);
|
|
||||||
that.$set(that, 'enabledPlatformCoupon', res.data.enabledPlatformCoupon);
|
|
||||||
that.$set(that, 'platformCoupon', res.data.platformCoupon);
|
|
||||||
that.$set(that, 'order_type', res.data.order_type);
|
|
||||||
that.$set(that, 'coupon_price', res.data.order_coupon_price);
|
|
||||||
that.$set(that, 'integral_count', res.data.order_total_integral);
|
|
||||||
that.$set(that, 'integral_price', res.data.order_total_integral_price);
|
|
||||||
that.$set(that, 'open_integral', res.data.openIntegral);
|
|
||||||
that.$set(that, 'use_integral', res.data.useIntegral);
|
|
||||||
that.$set(that, 'order_extend', (that.order_extend && that.order_extend.length > 0) ? that
|
|
||||||
.order_extend : res.data.order_extend);
|
|
||||||
that.totalPrice = res.data.order_price
|
|
||||||
that.orderStatus = res.data.status
|
|
||||||
that.proPrice = res.data.total_price
|
|
||||||
that.order_type = res.data.order_type
|
|
||||||
that.order_model = res.data.order_model
|
|
||||||
that.order_key = res.data.key
|
|
||||||
|
|
||||||
|
|
||||||
uni.getStorage({
|
|
||||||
key: "invoice_Data",
|
|
||||||
success: function(res) {
|
|
||||||
that.addInvoice = res.data;
|
|
||||||
if (res.data) {
|
|
||||||
that.getInvoiceDatas(res.data)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
uni.hideLoading();
|
|
||||||
}).catch(err => {
|
|
||||||
return this.$util.Tips({
|
|
||||||
title: err
|
|
||||||
}, {
|
|
||||||
tab: 3,
|
|
||||||
url: 1
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
payItem: function(e) {
|
payItem: function(e) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let active = e;
|
let active = e;
|
||||||
@ -633,37 +493,19 @@ import { Toast } from '../../libs/uniApi';
|
|||||||
that.animated = false;
|
that.animated = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
onAddress: function() {
|
|
||||||
let that = this;
|
|
||||||
if (that.addressInfo.real_name) {
|
|
||||||
that.textareaStatus = false;
|
|
||||||
that.address.address = true;
|
|
||||||
// that.pagesUrl = '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
|
|
||||||
// .pinkId + '&couponId=' + this.couponId;
|
|
||||||
that.pagesUrl = '/pages/users/user_address_list/index'
|
|
||||||
} else {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: `/pages/users/user_address/index?cartId=${this.cartId}`,
|
|
||||||
// });
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `pages/users/user_address_list/index`,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
payment: function(data) {
|
payment: function(data) {
|
||||||
let that = this;
|
let that = this;
|
||||||
createOrder(data).then(res => {
|
createOrder(data).then(res => {
|
||||||
|
|
||||||
let status = res.data.status,
|
let status = res.data.status,
|
||||||
orderId = res.data.result.order_id,
|
orderId = res.data.result.order_id,
|
||||||
callback_key = res.data.result.pay_key,
|
// callback_key = res.data.result.pay_key,
|
||||||
jsConfig = res.data.result.config,
|
jsConfig = res.data.result.config,
|
||||||
// 暂不跳转
|
// 暂不跳转
|
||||||
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message +
|
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message +
|
||||||
'&product_type=' + that.product_type + '&source=' + that.source,
|
'&product_type=' + that.payForm.product_type + '&source=' + that.payForm.source,
|
||||||
goPagesOrder = '/pages/order_details/stay?order_id=' + orderId +
|
goPagesOrder = '/pages/order_details/stay?order_id=' + orderId +
|
||||||
'&credit_buy=1&product_type=' + that.product_type;
|
'&credit_buy=1&product_type=' + that.payForm.product_type;
|
||||||
|
|
||||||
that.orderPay = true;
|
that.orderPay = true;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
@ -690,10 +532,6 @@ import { Toast } from '../../libs/uniApi';
|
|||||||
break;
|
break;
|
||||||
case 'alipay':
|
case 'alipay':
|
||||||
case "alipayQr":
|
case "alipayQr":
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
|
|
||||||
// jsConfig
|
|
||||||
// })
|
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
// #ifndef MP
|
// #ifndef MP
|
||||||
@ -889,51 +727,13 @@ import { Toast } from '../../libs/uniApi';
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.hideLoading();
|
|
||||||
return that.$util.Tips({
|
return that.$util.Tips({
|
||||||
title: err
|
title: err
|
||||||
});
|
});
|
||||||
|
uni.hideLoading();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
isEmojiCharacter: function(substring) {
|
|
||||||
if (substring) {
|
|
||||||
for (var i = 0; i < substring.length; i++) {
|
|
||||||
var hs = substring.charCodeAt(i);
|
|
||||||
if (0xd800 <= hs && hs <= 0xdbff) {
|
|
||||||
if (substring.length > 1) {
|
|
||||||
var ls = substring.charCodeAt(i + 1);
|
|
||||||
var uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
|
|
||||||
if (0x1d000 <= uc && uc <= 0x1f77f) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (substring.length > 1) {
|
|
||||||
var ls = substring.charCodeAt(i + 1);
|
|
||||||
if (ls == 0x20e3) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (0x2100 <= hs && hs <= 0x27ff) {
|
|
||||||
return true;
|
|
||||||
} else if (0x2B05 <= hs && hs <= 0x2b07) {
|
|
||||||
return true;
|
|
||||||
} else if (0x2934 <= hs && hs <= 0x2935) {
|
|
||||||
return true;
|
|
||||||
} else if (0x3297 <= hs && hs <= 0x3299) {
|
|
||||||
return true;
|
|
||||||
} else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 ||
|
|
||||||
hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b ||
|
|
||||||
hs == 0x2b50) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
bindDateChange(e) {
|
|
||||||
let that = this
|
|
||||||
that.$set(that.order_extend[that.virtualIndex], 'value', e.detail.value);
|
|
||||||
},
|
|
||||||
getTime(index) {
|
getTime(index) {
|
||||||
this.virtualIndex = index;
|
this.virtualIndex = index;
|
||||||
},
|
},
|
||||||
@ -955,32 +755,18 @@ import { Toast } from '../../libs/uniApi';
|
|||||||
Toast(res.message)
|
Toast(res.message)
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
Toast(e.message)
|
Toast(e.message)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// #ifdef MP
|
||||||
|
openPaySubscribe().then(() => {
|
||||||
|
that.payment(this.payForm);
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifndef MP
|
||||||
|
that.payment(this.payForm);
|
||||||
|
// #endif
|
||||||
// this.cartInfo.map(el => {
|
|
||||||
// if (el.isTake == 1 || el.order.isTake) {
|
|
||||||
// data.takes.push(el.mer_id)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
|
|
||||||
// return that.$util
|
|
||||||
// .Tips({
|
|
||||||
// title: '余额不足!'
|
|
||||||
// });
|
|
||||||
// data.consumption_id = this.consumption_id;
|
|
||||||
// // #ifdef MP
|
|
||||||
// openPaySubscribe().then(() => {
|
|
||||||
// that.payment(data);
|
|
||||||
// });
|
|
||||||
// // #endif
|
|
||||||
// // #ifndef MP
|
|
||||||
// that.payment(data);
|
|
||||||
// // #endif
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 继续支付
|
// 继续支付
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
<text class='default t-color'
|
<text class='default t-color'
|
||||||
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}
|
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}
|
||||||
<text v-if='addressInfo.brigade'>{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}</text>
|
<text
|
||||||
|
v-if='addressInfo.brigade'>{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none"
|
<navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none"
|
||||||
@ -36,12 +37,14 @@
|
|||||||
<view v-if="goods.product_type == 2">
|
<view v-if="goods.product_type == 2">
|
||||||
<view class="product-item">
|
<view class="product-item">
|
||||||
<view class="img-box">
|
<view class="img-box">
|
||||||
<image :src="(goods.productPresellAttr&&goods.productPresellAttr.image) || (goods.product&&goods.product.image)"></image>
|
<image
|
||||||
|
:src="(goods.productPresellAttr&&goods.productPresellAttr.image) || (goods.product&&goods.product.image)">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view class="content event_content">
|
<view class="content event_content">
|
||||||
<view class="name line1">
|
<view class="name line1">
|
||||||
<!-- <text class="event_name event_bg">预售</text> -->
|
<!-- <text class="event_name event_bg">预售</text> -->
|
||||||
{{goods.productPresell.store_name}}
|
{{goods.productPresell.store_name}}
|
||||||
</view>
|
</view>
|
||||||
<view class="label" style="width: 70%;">{{goods.productAttr.sku}}</view>
|
<view class="label" style="width: 70%;">{{goods.productAttr.sku}}</view>
|
||||||
<view class="price" v-if="goods.productPresellAttr">
|
<view class="price" v-if="goods.productPresellAttr">
|
||||||
@ -378,19 +381,19 @@
|
|||||||
<view class='discount'>暂无优惠券</view>
|
<view class='discount'>暂无优惠券</view>
|
||||||
</block>
|
</block>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class='item acea-row row-between-wrapper'>
|
<view class='item acea-row row-between-wrapper'>
|
||||||
<view>补贴抵扣<!-- <text @tap="showCoupon" class="iconfont icon-wenhao1"></text> --></view>
|
<view>补贴抵扣<!-- <text @tap="showCoupon" class="iconfont icon-wenhao1"></text> --></view>
|
||||||
<block v-if="platformConsumption.length > 0">
|
<block v-if="platformConsumption.length > 0">
|
||||||
<view class='discount money red_packet' @tap='couponTap3()'>
|
<view class='discount money red_packet' @tap='couponTap3()'>
|
||||||
<text v-if="consumption_id">-¥{{consumption_money||'0.00'}}</text>
|
<text v-if="consumption_id">-¥{{consumption_money||'0.00'}}</text>
|
||||||
<text v-else>有补贴补贴未选</text>
|
<text v-else>有补贴补贴未选</text>
|
||||||
<text class='iconfont icon-jiantou'></text>
|
<text class='iconfont icon-jiantou'></text>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class='discount'>暂无可用补贴</view>
|
<view class='discount'>暂无可用补贴</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
|
<view class='item acea-row row-between-wrapper' v-if="priceGroup.storePostage > 0">
|
||||||
<view>运费:</view>
|
<view>运费:</view>
|
||||||
<view class='money'>+¥{{priceGroup.storePostage}}</view>
|
<view class='money'>+¥{{priceGroup.storePostage}}</view>
|
||||||
@ -435,21 +438,23 @@
|
|||||||
<!--优惠明细弹窗-->
|
<!--优惠明细弹窗-->
|
||||||
<discountDetails :isShowDiscount="isShowDiscount" @close="closeDiscount" :couponData="couponData">
|
<discountDetails :isShowDiscount="isShowDiscount" @close="closeDiscount" :couponData="couponData">
|
||||||
</discountDetails>
|
</discountDetails>
|
||||||
<uni-popup ref="tipsRef">
|
<uni-popup ref="tipsRef">
|
||||||
<view class="tips_popup">
|
<view class="tips_popup">
|
||||||
<image class="r_c_gb" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9b08120240131172018671.png"></image>
|
<image class="r_c_gb" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9b08120240131172018671.png">
|
||||||
<view class="ref_content">
|
</image>
|
||||||
<view class="r_c_title">优惠提示</view>
|
<view class="ref_content">
|
||||||
<view class="r_c_text">当前订单金额已大于100元</view>
|
<view class="r_c_title">优惠提示</view>
|
||||||
<view class="r_c_text">建议参与惠农供销活动进行购买,下单满100元即可获得补贴</view>
|
<view class="r_c_text">当前订单金额已大于100元</view>
|
||||||
<view class="r_c_btn">
|
<view class="r_c_text">建议参与惠农供销活动进行购买,下单满100元即可获得补贴</view>
|
||||||
<button class="r_c_btn1" @click="closeAndSubOrder">继续支付</button>
|
<view class="r_c_btn">
|
||||||
<button class="r_c_btn2" @click="gotoCloud">前往活动</button>
|
<button class="r_c_btn1" @click="closeAndSubOrder">继续支付</button>
|
||||||
</view>
|
<button class="r_c_btn2" @click="gotoCloud">前往活动</button>
|
||||||
</view>
|
</view>
|
||||||
<image class="r_c_close" @click.stop="closeTipsRef" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d39b4202401311747186525.png"></image>
|
</view>
|
||||||
</view>
|
<image class="r_c_close" @click.stop="closeTipsRef"
|
||||||
</uni-popup>
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d39b4202401311747186525.png"></image>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -532,7 +537,7 @@
|
|||||||
// 备注
|
// 备注
|
||||||
msgObj: {},
|
msgObj: {},
|
||||||
textareaStatus: true,
|
textareaStatus: true,
|
||||||
platformConsumption: [],
|
platformConsumption: [],
|
||||||
deliveryName: '快递配送',
|
deliveryName: '快递配送',
|
||||||
//支付方式
|
//支付方式
|
||||||
cartArr: [{
|
cartArr: [{
|
||||||
@ -688,20 +693,20 @@
|
|||||||
is_take: '',
|
is_take: '',
|
||||||
domain: HTTP_REQUEST_URL,
|
domain: HTTP_REQUEST_URL,
|
||||||
product_type: '',
|
product_type: '',
|
||||||
source: null,
|
source: null,
|
||||||
interest_rate: '', //利率
|
interest_rate: '', //利率
|
||||||
settle_cycle: '', // 周期
|
settle_cycle: '', // 周期
|
||||||
type_id: '', //店铺类型
|
type_id: '', //店铺类型
|
||||||
consumption_id: '', //补贴id
|
consumption_id: '', //补贴id
|
||||||
consumption_money: '', //补贴抵扣金额
|
consumption_money: '', //补贴抵扣金额
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['isLogin', 'viewColor']),
|
...mapGetters(['isLogin', 'viewColor']),
|
||||||
...configMap(['hide_mer_status', 'alipay_open', 'yue_pay_status']),
|
...configMap(['hide_mer_status', 'alipay_open', 'yue_pay_status']),
|
||||||
red_price(){ // 计算补贴抵扣了多少钱
|
red_price() { // 计算补贴抵扣了多少钱
|
||||||
return (this.proPrice - this.totalPrice).toFixed(2);
|
return (this.proPrice - this.totalPrice).toFixed(2);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
alipay_open(n) {
|
alipay_open(n) {
|
||||||
@ -717,7 +722,7 @@
|
|||||||
this.type_id = options.type_id
|
this.type_id = options.type_id
|
||||||
this.product_type = options.product_type
|
this.product_type = options.product_type
|
||||||
this.seckillId = options.seckillId
|
this.seckillId = options.seckillId
|
||||||
if(options.source) this.source = options.source;
|
if (options.source) this.source = options.source;
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
|
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
|
||||||
// #endif
|
// #endif
|
||||||
@ -1065,16 +1070,16 @@
|
|||||||
cart_id: that.cartId.split(","),
|
cart_id: that.cartId.split(","),
|
||||||
address_id: address_id,
|
address_id: address_id,
|
||||||
takes: that.take,
|
takes: that.take,
|
||||||
consumption_id: this.consumption_id,
|
consumption_id: this.consumption_id,
|
||||||
use_coupon: that.subCoupon,
|
use_coupon: that.subCoupon,
|
||||||
use_integral: that.use_integral,
|
use_integral: that.use_integral,
|
||||||
product_type: that.product_type,
|
product_type: that.product_type,
|
||||||
source: that.source
|
source: that.source
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// 默认选中
|
// 默认选中
|
||||||
that.product_type=res.data.order_type
|
that.product_type = res.data.order_type
|
||||||
that.is_take = false;
|
that.is_take = false;
|
||||||
that.platformConsumption = res.data.platformConsumption;
|
that.platformConsumption = res.data.platformConsumption;
|
||||||
res.data.order.forEach(el => {
|
res.data.order.forEach(el => {
|
||||||
if (el.order.isTake == 1) that.is_take = true
|
if (el.order.isTake == 1) that.is_take = true
|
||||||
el.isTake = 0
|
el.isTake = 0
|
||||||
@ -1093,8 +1098,8 @@
|
|||||||
that.subCoupon[el.mer_id].push(el.coupon_user_id)
|
that.subCoupon[el.mer_id].push(el.coupon_user_id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else res.data.platformCoupon = [];
|
} else res.data.platformCoupon = [];
|
||||||
that.consumption_money = res.data.consumption_money;
|
that.consumption_money = res.data.consumption_money;
|
||||||
that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data
|
that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data
|
||||||
.order[that.couponIndex].coupon);
|
.order[that.couponIndex].coupon);
|
||||||
that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds
|
that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds
|
||||||
@ -1196,7 +1201,7 @@
|
|||||||
let that = this;
|
let that = this;
|
||||||
let active = e;
|
let active = e;
|
||||||
that.active = active;
|
that.active = active;
|
||||||
// console.log(this.active);
|
// console.log(this.active);
|
||||||
that.animated = true;
|
that.animated = true;
|
||||||
that.payType = that.cartArr[active].value;
|
that.payType = that.cartArr[active].value;
|
||||||
if (that.payType == 'weixin') {
|
if (that.payType == 'weixin') {
|
||||||
@ -1221,17 +1226,17 @@
|
|||||||
this.$set(this, "coupon_number", this.subCoupon['0'].length);
|
this.$set(this, "coupon_number", this.subCoupon['0'].length);
|
||||||
this.$set(this, "coupon_amount", this.plant_coupon_amount);
|
this.$set(this, "coupon_amount", this.plant_coupon_amount);
|
||||||
},
|
},
|
||||||
couponTap3: function(item, index) {
|
couponTap3: function(item, index) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/redpacket/redpacket',
|
url: '/pages/redpacket/redpacket',
|
||||||
success:(res)=> {
|
success: (res) => {
|
||||||
res.eventChannel.emit('changeRedPacketInfo', this.platformConsumption)
|
res.eventChannel.emit('changeRedPacketInfo', this.platformConsumption)
|
||||||
uni.$once('changeRedPacket', (data)=>{
|
uni.$once('changeRedPacket', (data) => {
|
||||||
this.consumption_id = data;
|
this.consumption_id = data;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
car: function() {
|
car: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.animated = false;
|
that.animated = false;
|
||||||
@ -1243,14 +1248,14 @@
|
|||||||
that.address.address = true;
|
that.address.address = true;
|
||||||
// that.pagesUrl = '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
|
// that.pagesUrl = '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
|
||||||
// .pinkId + '&couponId=' + this.couponId;
|
// .pinkId + '&couponId=' + this.couponId;
|
||||||
that.pagesUrl = '/pages/users/user_address_list/index'
|
that.pagesUrl = '/pages/users/user_address_list/index'
|
||||||
} else {
|
} else {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: `/pages/users/user_address/index?cartId=${this.cartId}`,
|
// url: `/pages/users/user_address/index?cartId=${this.cartId}`,
|
||||||
// });
|
// });
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `pages/users/user_address_list/index`,
|
url: `pages/users/user_address_list/index`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -1349,7 +1354,8 @@
|
|||||||
success: (e) => {
|
success: (e) => {
|
||||||
// 暂不跳转
|
// 暂不跳转
|
||||||
let url = '/pages/order_pay_status/index?order_id=' + orderId +
|
let url = '/pages/order_pay_status/index?order_id=' + orderId +
|
||||||
'&msg=支付成功' + '&product_type=' + that.product_type + '&source=' + that.source;
|
'&msg=支付成功' + '&product_type=' + that.product_type +
|
||||||
|
'&source=' + that.source;
|
||||||
|
|
||||||
return that.$util.Tips({
|
return that.$util.Tips({
|
||||||
title: '支付成功',
|
title: '支付成功',
|
||||||
@ -1360,10 +1366,11 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: (e) => {
|
fail: (e) => {
|
||||||
console.log(e,'111111111')
|
console.log(e, '111111111')
|
||||||
// 暂不跳转
|
// 暂不跳转
|
||||||
let url = '/pages/order_pay_status/index?order_id=' + orderId +
|
let url = '/pages/order_pay_status/index?order_id=' + orderId +
|
||||||
'&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source;
|
'&msg=取消支付' + '&product_type=' + that.product_type +
|
||||||
|
'&source=' + that.source;
|
||||||
return that.$util.Tips({
|
return that.$util.Tips({
|
||||||
title: '取消支付',
|
title: '取消支付',
|
||||||
}, {
|
}, {
|
||||||
@ -1372,7 +1379,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
complete: (res) => {
|
complete: (res) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
// 暂不跳转
|
// 暂不跳转
|
||||||
// let url = '/pages/order_pay_status/index?order_id=' + orderId +
|
// let url = '/pages/order_pay_status/index?order_id=' + orderId +
|
||||||
// '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source;
|
// '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source;
|
||||||
@ -1412,7 +1419,8 @@
|
|||||||
fail: function(e) {
|
fail: function(e) {
|
||||||
// 暂不跳转
|
// 暂不跳转
|
||||||
let pages = '/pages/order_pay_status/index?order_id=' +
|
let pages = '/pages/order_pay_status/index?order_id=' +
|
||||||
orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source;
|
orderId + '&msg=取消支付' + '&product_type=' + that
|
||||||
|
.product_type + '&source=' + that.source;
|
||||||
return that.$util.Tips({
|
return that.$util.Tips({
|
||||||
title: '取消支付'
|
title: '取消支付'
|
||||||
}, {
|
}, {
|
||||||
@ -1492,7 +1500,8 @@
|
|||||||
default:
|
default:
|
||||||
// 暂不跳转
|
// 暂不跳转
|
||||||
let pages = '/pages/order_pay_status/index?order_id=' +
|
let pages = '/pages/order_pay_status/index?order_id=' +
|
||||||
orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' + that.source
|
orderId + '&msg=取消支付' + '&product_type=' + that.product_type + '&source=' +
|
||||||
|
that.source
|
||||||
|
|
||||||
return that.$util.Tips({
|
return that.$util.Tips({
|
||||||
title: '取消支付'
|
title: '取消支付'
|
||||||
@ -1672,11 +1681,10 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
|
if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
|
||||||
return that.$util
|
return that.$util.Tips({
|
||||||
.Tips({
|
title: '余额不足!'
|
||||||
title: '余额不足!'
|
});
|
||||||
});
|
data.consumption_id = this.consumption_id;
|
||||||
data.consumption_id = this.consumption_id;
|
|
||||||
|
|
||||||
// 先货后款暂不可用
|
// 先货后款暂不可用
|
||||||
// if (this.payType == 'creditBuy') {
|
// if (this.payType == 'creditBuy') {
|
||||||
@ -1725,8 +1733,7 @@
|
|||||||
title: this.deliveryName,
|
title: this.deliveryName,
|
||||||
check: true
|
check: true
|
||||||
}]
|
}]
|
||||||
}
|
} else if (!item.allow_delivery && item.allow_take) {
|
||||||
else if (!item.allow_delivery && item.allow_take) {
|
|
||||||
this.radioList = [{
|
this.radioList = [{
|
||||||
title: '到店核销',
|
title: '到店核销',
|
||||||
check: false
|
check: false
|
||||||
@ -1781,35 +1788,35 @@
|
|||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
},
|
},
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
closeTipsRef(){
|
closeTipsRef() {
|
||||||
this.$refs.tipsRef.close();
|
this.$refs.tipsRef.close();
|
||||||
},
|
},
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
openTipsRef(){
|
openTipsRef() {
|
||||||
// 不是云仓商品且价格大于100元时提示
|
// 不是云仓商品且价格大于100元时提示
|
||||||
// if(this.source!=103&&this.source!=105&&this.totalPrice>=100) this.$refs.tipsRef.open();
|
// if(this.source!=103&&this.source!=105&&this.totalPrice>=100) this.$refs.tipsRef.open();
|
||||||
// else this.SubOrder();
|
// else this.SubOrder();
|
||||||
this.SubOrder();
|
this.SubOrder();
|
||||||
},
|
},
|
||||||
// 继续支付
|
// 继续支付
|
||||||
closeAndSubOrder(){
|
closeAndSubOrder() {
|
||||||
this.closeTipsRef();
|
this.closeTipsRef();
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.SubOrder();
|
this.SubOrder();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 前往活动
|
// 前往活动
|
||||||
gotoCloud(){
|
gotoCloud() {
|
||||||
this.closeTipsRef();
|
this.closeTipsRef();
|
||||||
let street_id = this.$store.state.storage.address.street_id;
|
let street_id = this.$store.state.storage.address.street_id;
|
||||||
let townName = this.$store.state.storage.address.townName;
|
let townName = this.$store.state.storage.address.townName;
|
||||||
let lat = this.$store.state.storage.location.lat;
|
let lat = this.$store.state.storage.location.lat;
|
||||||
let long = this.$store.state.storage.location.long;
|
let long = this.$store.state.storage.location.long;
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/nongKe/cloud_entrepot/indexh?street_id=${street_id}&townName=${townName}&source=103&location=${lat},${long}`
|
url: `/pages/nongKe/cloud_entrepot/indexh?street_id=${street_id}&townName=${townName}&source=103&location=${lat},${long}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -2663,69 +2670,79 @@
|
|||||||
height: 756rpx;
|
height: 756rpx;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
.red_packet{
|
|
||||||
color: #ff5c2d !important;
|
.red_packet {
|
||||||
background-color: rgba(#ff5c2d, 0.3);
|
color: #ff5c2d !important;
|
||||||
border-radius: 60rpx;
|
background-color: rgba(#ff5c2d, 0.3);
|
||||||
padding: 5rpx 10rpx;
|
border-radius: 60rpx;
|
||||||
padding-left: 20rpx;
|
padding: 5rpx 10rpx;
|
||||||
font-size: 25rpx;
|
padding-left: 20rpx;
|
||||||
}
|
font-size: 25rpx;
|
||||||
.tips_popup{
|
}
|
||||||
width: 600rpx;
|
|
||||||
height: 450rpx;
|
.tips_popup {
|
||||||
position: relative;
|
width: 600rpx;
|
||||||
.r_c_gb{
|
height: 450rpx;
|
||||||
width: 100%;
|
position: relative;
|
||||||
height: 420rpx;
|
|
||||||
margin-top: 30rpx;
|
.r_c_gb {
|
||||||
}
|
width: 100%;
|
||||||
.ref_content{
|
height: 420rpx;
|
||||||
position: absolute;
|
margin-top: 30rpx;
|
||||||
left: 0;
|
}
|
||||||
top: 0;
|
|
||||||
height: 100%;
|
.ref_content {
|
||||||
width: 100%;
|
position: absolute;
|
||||||
box-sizing: border-box;
|
left: 0;
|
||||||
padding: 120rpx 30rpx 30rpx 30rpx;
|
top: 0;
|
||||||
display: flex;
|
height: 100%;
|
||||||
flex-direction: column;
|
width: 100%;
|
||||||
justify-content: space-between;
|
box-sizing: border-box;
|
||||||
color: #2E2E2E;
|
padding: 120rpx 30rpx 30rpx 30rpx;
|
||||||
font-size: 28rpx;
|
display: flex;
|
||||||
.r_c_title{
|
flex-direction: column;
|
||||||
font-weight: blod;
|
justify-content: space-between;
|
||||||
}
|
color: #2E2E2E;
|
||||||
.r_c_text{
|
font-size: 28rpx;
|
||||||
font-size: 26rpx;
|
|
||||||
}
|
.r_c_title {
|
||||||
.r_c_btn{
|
font-weight: blod;
|
||||||
display: flex;
|
}
|
||||||
justify-content: space-around;
|
|
||||||
.r_c_btn1{
|
.r_c_text {
|
||||||
background-color: transparent;
|
font-size: 26rpx;
|
||||||
border: 5rpx solid #FF874C;
|
}
|
||||||
color: #FF874C;
|
|
||||||
font-size: 28rpx;
|
.r_c_btn {
|
||||||
padding: 5rpx 28rpx;
|
display: flex;
|
||||||
border-radius: 60rpx;
|
justify-content: space-around;
|
||||||
}
|
|
||||||
.r_c_btn2{
|
.r_c_btn1 {
|
||||||
background-color: #FF874C;
|
background-color: transparent;
|
||||||
border: 5rpx solid #FF874C;
|
border: 5rpx solid #FF874C;
|
||||||
color: #fff;
|
color: #FF874C;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
padding: 5rpx 28rpx;
|
padding: 5rpx 28rpx;
|
||||||
border-radius: 60rpx;
|
border-radius: 60rpx;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
.r_c_btn2 {
|
||||||
.r_c_close{
|
background-color: #FF874C;
|
||||||
position: absolute;
|
border: 5rpx solid #FF874C;
|
||||||
top: 0;
|
color: #fff;
|
||||||
right: 0;
|
font-size: 28rpx;
|
||||||
height: 60rpx;
|
padding: 5rpx 28rpx;
|
||||||
width: 60rpx;
|
border-radius: 60rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.r_c_close {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 60rpx;
|
||||||
|
width: 60rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
Loading…
x
Reference in New Issue
Block a user